|
|
|
|
|
by 256_
706 days ago
|
|
Well if you're interested, the Elements of Programming Style, to me, was interesting for two reasons. It presents plenty of timeless insights about programming, but it's also very interesting as a historical document; it argues against old-fashioned GOTO-based programming in favour of structured programming, and for-loops executing 0 times, for example. It has a list of rules of thumb at the end, which contains my favourite part of the book. Pretty much all of them are timeless, but right in the middle is "Avoid the FORTRAN arithmetic if." The one big thing I disagree with it on is the weird idea that you should never have 2 IFs in a row. |
|
It's a three way if statement that scrutinizes a number rather than a boolean, with branches for negative, zero and positive values.