Hacker News new | past | comments | ask | show | jobs | submit login

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.




Because I was curious: https://en.wikipedia.org/wiki/Arithmetic_IF

It's a three way if statement that scrutinizes a number rather than a boolean, with branches for negative, zero and positive values.


Sounds interesting! We're trying to figure out if we should be focusing on more modern books even if they're "unproven" or classics even if they're outdated. Sometimes reading the classics can be a lot of fun because, like you said, they serve as historical documents. As someone who started their career a lot later, it's crazy to me that GOTO used to be in style, but I suppose for it to fall out of style there had to be a book arguing against it at some point. It'd be interesting to read the original arguments!


Do like the arithmetic if mentioned in a nearby comment, but better :) :

Do all four: modern / classic x proven / unproven.

Choose based on your gut feel plus logic plus reader suggestions.

Why live by constraints? ;)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: