Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #58928 > unrolled thread

The narcissism of small code differences

Started bySteven D'Aprano <steve+comp.lang.python@pearwood.info>
First post2013-11-09 12:42 +0000
Last post2013-11-11 20:53 +1100
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  The narcissism of small code differences Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-09 12:42 +0000
    Re: The narcissism of small code differences Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-09 13:02 +0000
    Re: The narcissism of small code differences Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-10 22:50 -0800
      Re: The narcissism of small code differences Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-11 09:25 +0000
      Re: The narcissism of small code differences Chris Angelico <rosuav@gmail.com> - 2013-11-11 20:53 +1100

#58928 — The narcissism of small code differences

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-11-09 12:42 +0000
SubjectThe narcissism of small code differences
Message-ID<527e2d9c$0$29972$c3e8da3$5496439d@news.astraweb.com>
Uses an example written in Ruby, but don't let that put you off:

http://raganwald.com/2008/05/narcissism-of-small-code-differences.html


-- 
Steven

[toc] | [next] | [standalone]


#58932

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-11-09 13:02 +0000
Message-ID<mailman.2293.1384002151.18130.python-list@python.org>
In reply to#58928
On 09/11/2013 12:42, Steven D'Aprano wrote:
> Uses an example written in Ruby, but don't let that put you off:
>
> http://raganwald.com/2008/05/narcissism-of-small-code-differences.html
>

Wonderful read, thanks very much for the link.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#59050

FromRick Johnson <rantingrickjohnson@gmail.com>
Date2013-11-10 22:50 -0800
Message-ID<b794f36e-d43e-428e-b8e5-adcf986fabfc@googlegroups.com>
In reply to#58928
On Saturday, November 9, 2013 6:42:04 AM UTC-6, Steven
D'Aprano wrote: 
> 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.







[toc] | [prev] | [next] | [standalone]


#59052

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-11-11 09:25 +0000
Message-ID<mailman.2363.1384161929.18130.python-list@python.org>
In reply to#59050
I never thought I'd be saying this but welcome back Rick :)

On 11/11/2013 06:50, Rick Johnson wrote:
> On Saturday, November 9, 2013 6:42:04 AM UTC-6, Steven
> D'Aprano wrote:
>> 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!
>

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?

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#59057

FromChris Angelico <rosuav@gmail.com>
Date2013-11-11 20:53 +1100
Message-ID<mailman.2364.1384163608.18130.python-list@python.org>
In reply to#59050
On Mon, Nov 11, 2013 at 8:25 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> On 11/11/2013 06:50, Rick Johnson wrote:
>>    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?

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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web