logo       

Re: [OT] Programming practice question: msg#01200

lang.ruby.general

Subject: Re: [OT] Programming practice question


On Tuesday, August 13, 2002, at 12:03 pm, Philip Mak wrote:

Suppose you're programming some system. You have to reach a milestone
tomorrow.

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?

Personally I would get to the deadline writing one more days worth of untidy
code - because lets face it, if it's that bad, that it can not be rectified in one day,
another day is not going to make any difference.

I would then do a code review after the said milestone and isolate the main
areas that are of 'issue' and then concentrate on refactoring the code so as to
improve it. As is the nature with refactoring, things should cascade until you
reach a point where you either have to stop - in which case the code should
be even slightly better, or because the job is complete in which case the code
is better. If this is done in parallel [ie. with a view of the planned future
development of the code] then you should not loose too much time and
would be in line for a better engineered product. Although having said that,
it's also important that you apply the correct refactorings.

Another point to consider is this: does the system have to be maintained or
is the code being developed for a one off tool to solve a one off problem? If
it is, then I do not [personally] feel that a beautifully engineered code base
and solution is necessary - yes it is good practice, but really when push comes
to shove - you are up against a deadline and deadlines are hard to keep at
the best of times without adding to the work. |f it isn't then it is definatly
important to make sure that things are maintainable.

But, this is all my initial thoughts on the question,

Regards,

Chris




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise