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

In particular, a good approach to this is to abstract the common parts to all those into just some very simple functions. Abstract bottom to top, not top to bottom. There is no need to create a single point where everything happens and deals with the 2^n combinations.

You still reduce repetition, you can still change stuff in a single point, but you retain the ability to make custom changes if needed.



> Abstract bottom to top, not top to bottom.

Amen. With the caveat that this is a guideline, not a rule.




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

Search: