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

I agree no paradigm is particularly great for beginners - OOP leads to junior devs separating their code prematurely/inaccurately, writing horrendous inheritance trees etc., functional programming can lead to some really opaque code that feels like you're trying to solve a puzzle when reading it. I do think good principles exist however:

- try to write code that can be easily unit tested

- composition over inheritance

- immutable over mutable + avoid side effects

- avoid recursion unless your data is recursive

etc. etc.



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

Search: