Wait Wait, Wait, Wait

Wait! Wait, Wait, Wait!

Before us we have two basic tasks : we want to generalize the MenuForAccelerator a bit, and we want to put the *menu feature into the CustomerTest class. I was just about to start the chapter about doing that, because I know just how to do it and Im on a roll, but that would be wrong. Why? Because right now, the code is the simplest code that could possibly work, and it does work. I have no feature-driven need to generalize it.

(Im sure) Im going to ask for features that will break this code. So why shouldnt we do this? We shouldnt do this because its more important to focus on delivering real customer value. The existing code is solid, tested , and clear. Its just not super-general. If it needs to get general, we can do that just as well later as we can now. We should turn our attention back to pleasing our customer. Thats what keeps the paychecks rolling in.

I know we always like to say itll be easier to do it now than it will be to do it later. Not likely: I plan to be smarter later than I am now, I plan to have the same tests, and I plan to have an actual need that will direct what I do, not my current fantasy about whats needed. I think itll be just as easy later, maybe even easier. Why pay now when we can pay later? Theres no interest charge running.

My advice, and Im going to follow it, is to leave well enough alone. Well probably see this code again, and when we do, well improve it. If somehow we dont see it again, well then it certainly doesnt need improving now.

Keep an eye out. See if when we come back to this code, it takes us somehow longer to improve than it would right now. Im betting that well be just fine.

Extreme Programming Adventures in C#
Javaв„ў EE 5 Tutorial, The (3rd Edition)
ISBN: 735619492
EAN: 2147483647
Year: 2006
Pages: 291

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net