I just read yesterday’s Take Outs (by Ken Tegels) which pointed me towards Frans Bouma’s blog which boldly states “Do not read just code, learn algorithms”. I completely agree that good algorithm design is a valuable skill to have, and its not a that applies only to software engineers.
Surgeons invent new life saving techniques every day and document them as a precise algorithm for others to follow. But would you want a surgeon that had never touched a scalpel and doesn’t appreciate its form an handling touch your body? What about the body of one of your children?
Frans, I think you might be missing the point on why people look at code. They aren’t necessarily looking to distill a design from it (although doing a code walk can sometimes help link islands of information together), instead they are looking for form. One classic benefit that I got from reading copious amounts of other peoples code was declaring variables just in time (as opposed to just instansiating just in time).
The reason is that when it comes to refactor the code (you know, behaviour preserving modifications), tool support works best with just intime declaration (think of the Extract Method scenario).
Learning is an iterative process, the act of implementing your design in code (and seeing others implment your design in code) makes you a better designer the next time around – this is where ivory tower architects get into trouble.
In short, good designers don’t buy a one way ticket when going from design to code. Sorry for the mixed metaphors . . . .