in reply to Bad Karma = Bad Code

++frankus... How did you know? I've learned to deal with this kind of thing by doing whatever I can to keep my code flexible, readable, and maintainable (not to mention correct). Because I know that I'm the one who will pay for it in the end if my code doesn't meet those standards.

It's not easy to plan for future change, especially when you're on a tight deadline and your boss wants changes quickly. Still, each time I hear the little voices in my head saying, "It's only a temporary change, it's okay to stick in this kludge for now...", I try to resist it. Each time I feel like cutting and pasting, I remind myself that it doesn't take that much more time to pull the common code into a subroutine. Each time I feel like sidestepping something that does take time, I remind myself that it will take even more time in the future to undo my sloppy changes.

Anyway, it's tough, and I'm right there with ya. :-)

-- Mike

--
just,my${.02}

Replies are listed 'Best First'.
Re^2: Bad Karma = Bad Code
by Aristotle (Chancellor) on Aug 14, 2002 at 21:56 UTC

    On quite a bit of a tangent, I'm looking forward to the well-defined Perl6 grammar that will allow us to do stuff like advanced LISP modes in some editors/IDEs allow: select some code and have it factored out into a subroutine with all local variables declared and everything necessary to make it work as it did in its old place, while substituting an equivalent function call to it in the place where that code was. Extraordinarily convenient.

    And ++ to frankus :-)

    Makeshifts last the longest.