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

The list as a whole covers KISS. Every (including those not on the list) programming principle is aimed at the end goal of keeping things simple to prevent maintenance headache.


"Don't repeat yourself" competes with KISS. DRY creates brittle code.

There's low harm in duplication of code. When something changes you don't have to refactor your class structures. You just change the code for the thing it affects. And if you have to make multiple edits it's often pretty obvious what you need to do.

(Data and configuration are different, it's more important for these to have a canonical home.)


I strongly disagree. DRY does KISS. Much easier to maintain one instance of a function/method/block of code than multiple copy/pastes. If something requires different behaviour to what is in that extracted piece of code, then it shouldn't be using the piece of code at all. Therefore KISS and remove that reference. In conjunction with the other principles - delegate and DI/Inversion in particular - it'll be easy to substitute the delegate and minimise change.


To me, that describes "maintainability", not "simplicity".


Over the years I've seen a lot of disagreement between developers as to what "simple" means.


Yes, and some definitions are wrong ;)

I invoke Layne's Law and go back to work.


Perhaps the best example here being whether SOAP is simple or not - some people think it is, others disagree....




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

Search: