Showing posts with label algorithm. Show all posts
Showing posts with label algorithm. Show all posts

Wednesday, September 17, 2008

Parsing the Integer; Hunting the Snipe

Today was all about consolidating yesterday's admittedly confusing foray into integer and modulus division. (Sorry!) It seems like most of you get it, now, and should be able to finish your ParseInteger programs tomorrow.

Many thanks to all those students who were able to finish early and then move on to help others.

If there's one thing I want you to take away from today, it's some hints about the thinking process that you can (and should!) go through when confronted with a difficult programming problem.
  1. Write down what you're supposed to do. Write it down, even if it's already given to you written down. The actual act of writing it down shifts your brain into the problem space.
  2. Write down what you know about the problem. Don't worry too much about how organized it is. If you have pieces of the puzzle put them down even if you don't know how they fit together. This is just a version of the kind of brainstorming you might do before writing and essay or short story in English or the kind of noodling a musician might do when approaching a composition.
  3. Get a high-level design down on paper - just the big, gross steps of what you think needs to happen in the program. E.g. Get some input; Process some input; Print some Output.
  4. I didn't talk about this but the fourth thing is to experiment. Hack at it. Try some stuff and see if it works.
Don't forget to check my notes that I did on the projector today and put in the Handout Folder.