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

An excellent balance is to try to make a function only do one level of abstraction at a time. It's a bit of a flexible guideline, but basically you shouldn't call `isUserActive`, do some complex arithemtic, read extract data from a complex data structure, and call a templating engine in one function, since those a results all different levels.

As long as what are doing is approximately the same type of thing, it is fine to do a lot of things without breaking readability.



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

Search: