12 points · by dizm · 18y ago · 12 comments
Programmer: That feature you asked for two weeks ago? It's done. Take a look. What do you think?
User: Oh... hmmm... yeah, that's kinda wrong... See, I know I said I wanted X, but I just realized I actually wanted Y. But Y is very similar to X, can't you just tweak it and I'll come back to take a look after lunch?
Programmer: Well, actually, yeah, Y is a lot like X, but I tried to just "start shipping great software," so I didn't take the extra day which will make X->Y only take an hour or two. I'll have to start from scratch. See you in another two weeks.
User (two weeks later): Actually, Y isn't quite right. Can you do Z?
I'll go so far as to claim that code which can't adapt to changing requirements is either (1) pure genius because it just works and does exactly what users want, and therefore rare, or (2) unused, or (3) thrown away. Obviously it shouldn't be overdone, but the ability to balance between flexibility and delivering working applications is precisely what defines people who, as the author puts it, "ship great software."
The less code you have to write initially, the less you'll have to scrap when the rewrite comes. And the rewrite always comes. The question is when.
What people usually do (and this author, in my opinion, is doing) is observe one unhelpful behavior and conclude that the opposite behavior must be "correct". I think this is because building software is a complex activity, so we seek invariant principles to simplify it. Then we view the complex activity through the filter of our "correct" model (which we've identified with it) and get a feeling that we know what we're doing. In the end this causes a lot of problems.
The simplest solution is often also the most flexible. I don't think you can argue that simple is bad design.
During requirements and feature planning, I have often found that features get more and more complicated until - guess what - things click, similarities become obvious, and you end up with a solution that's a lot more simple - and more flexible - than you expected. You don't always get that "aha!" moment, and you can't spend your entire development cycle chasing it, but it is often there.
Talking about getting things done in the least amount of time and then bringing up the retarded old "it's all Turing complete" argument shows that he has some more thinking to do on this subject.
This is part of what the big deal about 'agile' methodologies is: People remaining flexible about requirements because they don't really know what will be needed in the future. Specs change and grow and the more flexible your code base is, the easier it is to make changes and maintain.
Granted it can be overdone, (some of the worst WTFs come from overly flexible code,) Ideally, a program should be flexible enough to allow for any reasonable change or extension.
The typical agile answer is, "We'll just refactor to allow the necessary changes as we go along." This is an oversimplification, because the cost of such refactoring isn't always low. Sometimes it's no less than the cost of rewriting the system. Other times the refactoring leads to suboptimal solutions for X', compared with what you would have if you designed for X' originally. I've seen agile projects get into trouble this way.
There's no question that up-front generality is often misplaced (since you can't know for sure what you'll need in the future) and can cause a lot of complexity damage. But the answer doesn't lie in making a "process" out of a half-dozen or dozen principles and pretending you've solved the problem.
Personally, I'm not a huge fan of agile but it does hit on a few things right.
YAGNI principle
Grammar error or Freudian slip?