The narcissism of small code differences

  • Thread starter Steven D'Aprano
  • Start date
R

Rick Johnson

Uses an example written in Ruby, but don't
let that put you off:

Why would it? I write Ruby code all the time. Ruby code in
and of itself does not bother me, what bothers me about Ruby
is the ease at which a programmer can write inconsistent and
convoluted code -- evidenced by the poor examples in your
linked article. Case in point.

To save anyone else from reading this long-winded "blab
fest" chalk full the driest humor and "cyclic illogical
meandering" that could make a ferris-wheel blush with
jealousy...

In a nutshell the author attempts to plead for the
"longevity" of "old code bases" simply on the basis of his
assertion that "old code bases" are "less buggy" and
contain more "wisdom" than their new brethren -- both of
which are absurd conclusions!

Now, whilst he is correct regarding the narcissism of
programmers (i must admit we are all guilty of this deadly
sin), his attempts to draw parallels between "Freudian
pathologies" and "software development idiosyncrasies" is,
in fact, the very HEIGHT of sophistry!

Has the author considered that new functionality often
renders old code bases useless, or at the very least,
antiquated? Even code bases that are in fact "bug free" (for
*some* definition of "bug free"!)

Has the author consider that changes in external
dependencies can render a code base useless? Py3000 ring
a bell folks?

Is the author also unaware of evolution?

Doth he falsely believe that even the BEST programmer can
look back on code he wrote a few years ago and not think of
some way it could be improved? GvR had such a realization
not so long ago -- and then there was Py3000!!!

From something as simple as code restructuring for
readabilities sake; to choosing better naming conventions;
to improving consistency; reformulating algorithms to
eliminate bottlenecks; taking advantage of new functionality
in external libraries; or implementing new design patterns,
and on and on -- the list is limitless man!

The fact is, no code base will ever be perfect. Code will
constantly need updating and upgrading. The challenge is to
remove the old crusty bits and inject consistency everywhere
we can. That's not narcissism, that's altruism.
 
M

Mark Lawrence

I never thought I'd be saying this but welcome back Rick :)

Why would it? I write Ruby code all the time. Ruby code in
and of itself does not bother me, what bothers me about Ruby
is the ease at which a programmer can write inconsistent and
convoluted code -- evidenced by the poor examples in your
linked article. Case in point.

To save anyone else from reading this long-winded "blab
fest" chalk full the driest humor and "cyclic illogical
meandering" that could make a ferris-wheel blush with
jealousy...

In a nutshell the author attempts to plead for the
"longevity" of "old code bases" simply on the basis of his
assertion that "old code bases" are "less buggy" and
contain more "wisdom" than their new brethren -- both of
which are absurd conclusions!

I recall that the demise of Netscape was due to them trying to
completely rewrite code of this nature. The exception that proves the rule?
 
C

Chris Angelico

I recall that the demise of Netscape was due to them trying to completely
rewrite code of this nature. The exception that proves the rule?

No, I would say Netscape's experience is a strong supporting example
of the contrary position. I've frequently had need to reimplement
something (most recently as part of porting functionality from RosMud,
written in C++, to Gypsum, written in Pike), and referencing the old
code is the best way to benefit from X years of corner-case
discoveries and bug fixes. Sometimes I'll even copy and paste a
comment from one version to another, because it perfectly explains
some oddity that the code has to handle - even if the code itself is
completely rewritten. Definitely if hunks of code can be kept, they
should be. The old code base *IS* less buggy and contains more wisdom.
Hardly absurd.

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,243
Latest member
Weeb3PRAgency

Latest Threads

Top