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

When I was working in Ruby, I think the default function length was 5 lines. I used to be on board with this until I helped write a whole system adhering to this.

Small functions aren't bad per se, especially if they are re-used a lot, but I no longer believe that they are inherently good. Especially awful are having a lot of tiny single-use private functions.

I think that developers often want an easy way to say "we must do this" and have a tool tell them to do so. Tools can get us pretty far but at some point writing good code is going to come down to taste. This is of course very hard in many large project situations where its every team for themselves, and often every developer for themselves within a team.



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

Search: