Larry McVoy <[email protected]> writes:
>It's a sign of a naive programmer when you hear "this code is all shit"
>and it's useful code. That means the programmer would rather rewrite
>working code than understand it enough to fix it. Extremely common.
>And extremely wrong in almost all cases. It's *hard* to understand code.
>Get over it. Read the code, think, read again, think some more, keep
>it up. Always always always assume the guy who came before you *did*
>know what they were doing. Otherwise all you do is replace mostly working
>code with brand new code that works for the *one* case in front of the
>new programmer and none of the 100's of cases that the old code handled.
Once again. BS. 99% of the cases where I had to work on foreign code,
it was a codebase where someone with a clue wrote something nice, and
then lots of people without clue "improved" that code. Then I start to
work on it and have to clean up the mess. First thing is that you want
to everytime is, to _understand_ what the original author wanted to do
with the code and what the clueless did to this idea. A debugger is a
decent toy for this. commons-logging another.
Code which was written like you describe is never hard to
understand. Clueful people know that they have to comment their
"tricks".
Ask me about Bean-Setters with a return value. Now that's clever. =:-(
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [email protected]
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [email protected]
D-91054 Buckenhof Fax.: 09131 / 50654-20