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

+1. Add:

- Use long expressive variable/function/class names that tell me exactly what this variable/function/class does

I have to constantly fight the urge to have code fit in the littlest amount of space possible.



Variable names sound be succinct . They don't need to be short, but they also shouldn't be essays. I had one coworker who would essentially write everything the function did. Variable names would be 100+ chars. It was impossible. Variable names should be as long as needed , but no longer.


I use variable, function and class names as a rough guide on whether I need to refactor. If I name it accurately and the name gets too long, its probably doing too much.




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: