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

The mistake is creating an abstraction because of seeing duplication.

DRY is not a good guiding principle. It is an anti-principle.

Abstractions should only be created when they have a clear purpose and create a simpler architecture by encapsulating a single concern.

The reality is that all code is duplication. The reason we write code is because it is the most concise language to specify the intended goal in the current context.

What is unique is not the code that we are writing. The unique part is the code in the current context and each level of abstraction separates the context from the implementation - so that abstraction must be beneficial in organizing the overall solution into individual logical components of singular concern.



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

Search: