Hacker News new | ask | show | jobs
by chimprich 3562 days ago
A lot of those problems are quite dependent on your choice of language. Java, and similar languages, implicitly bias programmers in favour of building multi-layered abstracted monstrosities. Inheritance and interfaces can be powerful weapons for evil. Lots of the original Java libraries pushed people in the wrong direction.

I'd agree that finding the right level of abstraction is hard, easy to misjudge even for an experienced programmer with YAGNI in mind, and that you can do more damage by over-abstracting than not abstracting. Most programmers experience this the hard way sooner or later.

I'd disagree that having objects/functions do more than one thing or not be able to be pulled apart into individually testable units can be a good thing - except in very rare cases, or to compromise with existing legacy code.

Would you mind giving an example of where an object should do more than one thing?