Hacker News new | ask | show | jobs
by BishoyDemian 1749 days ago
Premature optimisation is a real pain when it comes to software design and architecture. However, abstraction is a powerful and necessary tool that can make our life a lot easier by avoid repetition (DRY - don't repeat yourself).

A good architect worth their salt will be able to find the right balance. To distill and simplify a problem down to the absolute minimum where it cannot and should not be abstracted anymore before it lose or miss its core objectives and reason to exist.

1 comments

A somewhat cheesy aphorism for this is "Dry but not so dry it cracks".

Personally I like the rule of thumb that you let 3 instances of something occur before you try to refactor it into a single design.

Without examples of real usage it's far too easy to come up with bad abstractions. I'd rather have code that's easy to delete later.