Many people cite the famous quote "Premature optimization root of all evil", but that's just a specific case of a more general problem: trying to fix things that aren't identified as a problem. YAGNI is God.
Many people cite the famous quote "Premature optimization root of all evil", but that's just a specific case of a more general problem: trying to fix things that aren't identified as a problem. YAGNI is God.
I, of course, agree completely
However it can be tricky to pull off if different people have different ideas of what a "problem" is. To me, duplicate and/or unclear code is a big problem. Something that needs fixing straight away. Other people don't seem to think that way unfortunately.
Re:But what's a "problem"?
drhyde on 2005-10-04T10:12:29
I'm of the opinion that premature generalisation of code is just as evil as premature optimisation. So many people want to write all-things-to-all-men generic frameworks when all their customer has asked for is Hello World.Re:But what's a "problem"?
Adrian on 2005-10-04T10:30:24
I agree completely that premature generalisation that creates the kind of uber-frameworks that many Java folk seem enamoured off is evil.
That's not my aim however. I'm removing duplication. I'm solving an existing problem with less code. I am very definitely not trying to solve any general problem that isn't in the code already.
Re:But what's a "problem"?
drhyde on 2005-10-04T11:59:27
I wasn't talking about you - or indeed about anyone in particular. The thread just prompted me to repeat something I was ranting about in the pub last night.Re:But what's a "problem"?
Adrian on 2005-10-04T12:15:20
In that case rant away:-) Re:
Aristotle on 2005-10-15T16:27:54
Re:
Aristotle on 2005-10-15T16:34:30
I haven’t had any luck trying to track this down, but Knuth is said to have something along the lines that each problem in software can be solved with either more or less abstraction, and that experience tells us which one is the way to go.
(If someone has a citation, I’d love to know it.)