How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

David Kastrup dak at gnu.org
Sat Aug 21 06:36:43 EDT 2010


John Passaniti <john.passaniti at gmail.com> writes:

> Amen!  All this academic talk is useless.  Who cares about things like
> the big-O notation for program complexity.  Can't people just *look*
> at code and see how complex it is?!  And take things like the years of
> wasted effort computer scientists have put into taking data structures
> (like hashes and various kinds of trees) and extending them along
> various problem domains and requirements.  Real programmers don't
> waste their time with learning that junk.  What good did any of that
> ever do anyone?!

It is my experience that in particular graduated (and in particular Phd)
computer scientists don't waste their time _applying_ that junk.  They
have learnt to analyze it, they could tell you how bad their own
algorithms are (if they actually bothered applying their knowledge), but
it does not occur to them to replace them by better ones.  Or even
factor their solutions in a way that the algorithms and data structures
are actually isolated.

I think there must be some programmer gene.  It is not enough to be able
to recognize O(n^k) or worse (though it helps having a more exact rather
than a fuzzy notion of them _if_ you have that gene).  You have to fear
it.  It has to hurt.  You need to feel compassion with the CPU.  It's
not enough to sit there in your easychair, occasionally sucking on your
pipeline and listen to its story about a hard realtime youth and its
strained connection to its motherboard.  When it stops, you have to see
its benchmarks and feel their pain in your own backplane.

-- 
David Kastrup



More information about the Python-list mailing list