Quoting Steve Reinhardt <[email protected]>:

On Sun, Jan 1, 2012 at 10:36 PM, Gabe Black <[email protected]> wrote:

A hack that works is not necessarily any better than code that doesn't
work because it will have to be maintained and worked with/around for a
long time.


I strongly disagree.  There's a huge difference between "works" and
"doesn't work", because those map directly to "useful" and "not useful".
 Obviously "maintainable" is also hugely important, but if we think that
"maintainable" is more important than "works", we should just give up now.
 A piece of code that does nothing is supremely maintainable, and its only
flaw is that it's not useful, so that's the destination you're headed for
if you prize maintainability over utility.

Obviously we really want both, but let's keep our priorities straight.

Steve
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev


I'm keeping my priorities where they are. It's much better to take the extra time to do something the right way than to waste little bits (or lots) of time again and again over the long hall. That's especially true when the first pass becomes the only pass, and some poor soul gets stuck with fixing it after everyone including the original author has forgotten all about it.

And of course I'm not talking about extremes. Never writing the code at all is not the same as taking a bit longer to write quality code with a good design. Quality code is not the same as perfect code. But I would much rather somebody describe what should be done in a comment and put in a panic or warning than write something that tricks you into thinking it's handled and has to be untangled later, possibly even forcing a rewrite of dependent code. This is not a hypothetical problem, although extreme examples of it are thankful not that common. It's not fun to have to go three of four steps away from what you're trying to do and reverse engineer some random code so that everything doesn't break when you make your own change.

Gabe
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to