Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I usually aim to make code that solves the problem it was intended to solve, as elegantly as possible. (Where elegance correlates closely to efficiency.) Whether it's understandable or not is completely secondary.

Often this means that if I don't leave myself a reasonable comment about what I'm doing in that spot and why, I'll relearn the importance of good comments later.



What you're describing is often considered to be bad code, not good code.

Maintainability is quite often the most important thing when it comes to coding not terseness (which many do not consider to be elegant at all, quite the opposite, they see it as unnecessarily complicated and obtuse).


What you're describing is often considered to be good code. Maintainability is quite often the most important thing when it comes to coding. Cryptic code, though sometimes a tad bit harder to understand, is often preferable when it substantially increases the performance of the application. Short, descriptive comments do the rest of the work for the maintainer.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: