[OT] Programming practice question

Philip says:

>Your code is kind of messy right now. You can reach the milestone on
>time if you write more messy code.
>But you'd save time in the long run if you stepped back, reviewed your
>code, and reorganized it in a cleaner fashion first. But you don't
>have time to do that now, due to tomorrow's deadline.
>What do you do?

I think it depends on the nature of the deadline. If it would cause
some embarassment or loss of face, then move the deadline and do it right.
If it’s an internal milestone, then you genuinely DO need to slip
the schedule, because the code isn’t ready yet.

If it’s for a demo at a trade show or for venture capitalists, and
missing the deadline means you go out of business, then by all means
shove in the messy code – AS LONG AS you can then spend the following
week cleaning it up. Don’t allow “Broken Windows” to remain broken
for long.

If the milestone you mention is to an external entity (as in shipping
the product out to unsuspecting QA testers (aka users)), then I would
strongly suggest moving the deadline. Bad code internally is bad enough,
but out in front of users it provides an excellent breeding ground for
all manner of hidious bugs, which will cost you far more in the long
run than slipping the schedule by a week here in the short term, IMHO.



Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development and Mentoring for Agile Methods
web: http://www.pragmaticprogrammer.com email: andy@pragmaticprogrammer.com

Author of “The Pragmatic Programmer” * “Programming Ruby” * The Agile Manifesto
Columnist for IEEE Software Magazine
Pragmatic T-shirts available at: www.pragmaticprogrammer.com/merchandise.html