Wednesday, 18 February 2009

HtDP for the experienced programmer

I am a fan of Scheme (a programming language for the soul) and SICP "the greatest book on programming ever written", but my hat goes off to the creators of DrScheme, a great interactive environment for the beginner and experienced programmer alike.

The other night I swallowed my pride and started to work through HtDP (How to Design Programs), the PLT Scheme gang's reaction to the fact that SICP (which came from MIT) while great for the suitably talented individual does not by-and-large work for the mainstream. In this book they explicitly teach program design, a systematic approach to thinking and problem-solving that it seems only a few people get by the more traditional osmotic process.

HtDP is covers a great range. Although principally geared to college level, it can be taught in high schools (at a slower pace), and can teach most experienced practitioners more than a thing or two.

Additionally, the people on the PLT Scheme mailing list are incredibly friendly and supportive. Here's what Matthias Felleisen, first author of HtDP (among many other things) wrote when I mentioned that I was starting to work through HtDP, but was having difficulty restraining myself from skipping ahead:
If you are an experienced programmer, you should read HtDP like this:
  • Read the sections whose title starts with "Designing ...."
  • Also read the "iterative refinement" sections
  • Pick five exercises in the preceding and/or follow-up section and solve them according to the recipe
    [my emphasis]
  • Unless you're stuck move forward
  • Try to understand the "symmetry" between data definitions and templates
I expect that somewhere around late part II, you will slow down. You may pick up real reading as of part III, though some may make it thru III and only "stutter" in IV.

  • Use check-expect to express your examples/tests
  • Avoid exercises, replace them with but that's a non-trivial switch
And holler if you are having trouble -- Matthias
In short: Great tools, great teaching materials, supportive and experienced community.

No comments: