View Single Post
  #20  
Old August 10th 03, 04:53 PM
Andrew Gideon
external usenet poster
 
Posts: n/a
Default

Roger Halstead wrote:

I've seen code that students turned in where it took more work to
decipher than it did to write it. Course I saw a few students who
could write Pascal that way too and it's almost a plain language when
it comes to source code.


Please help.

You've the perfect opportunity to teach that code is almost universally read
more than it is written. More, the reader is typically unfamiliar with the
code being read - even if it's the author, but a few days or weeks or
months or years downstream.

This should motivate the writing of code designed not to be written quickly,
but read easily. Avoiding nested returns, keeping logic expressions
simple, commenting, writing short functions...

I taught in a "new hire" program for a number of years at a couple of
investment banks in NYC a while back. Too may (most?) of the people hired
regarded the concept of writing code to be written as foreign.

- Andrew