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

My father was a magazine editor in the 1980s.

Paragraphs for his publications had to be short due to the limitations of magazine layouts.

“For the bulk of your work, a paragraph can only be one or two perfectly written sentences” he insisted.

I feel like there’s a parallel from that to writing functions.

Magazine readers, and programmers both read high density text rather quickly.

We should make it easier for future readers to quickly understand your point/function.

We should write short, correct functions.

Only add abstraction when you absolutely have to and write more documentation in the case that you do.

Edit: missed the length of the function comment, ignore my diatribe




How is this positive? Respect the limitations imposed by a framework or structure instead of thinking how that could be improved? Conciseness is a value if it helps the communication and understanding, but it’s not an absolute value. And that is true for code, as the post explains quite well.


But the point here in the article is actually that the longer code was better than the shorter code.




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

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

Search: