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

The example they use is irrelevant. A solved problem can be written how ever one likes.

Code that will change or can’t ever be considered final, is the real challenge.

Overly cutting code into methods makes code just rigid. This could be the point, I guess, but if you need to change the methods name in order to reflect the methods intent, than you just wrote the classic unhelpful comment of:

// check a is not null

if (a != 0) { … }

Overuse of comments has the same issue as overuse of methods.

Without rigor, comments and methods names will start to lie.

Because their content / name weren’t necessary to understand the code. And should just not exist in the first place.






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

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

Search: