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

>I generally find if you need multi letter variable names it means your function or scope is to long, or manipulating to many things. It's a nice little red flag for me.

Many times your function should be longer, rather than shorter.

Short methods and functions used just for the sake of being short just move the complexity of understanding in the interaction between them, making logic harder to follow an algorithm when it could have been all in the same place (for related functionality of course, I don't advocate having a function do 2 different irrelevant things).



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

Search: