Making the case for repeat

K4NTICO bborcic at
Sat Jun 13 15:48:54 CEST 2009

On 13 juin, 14:15, Steven D'Aprano
<st... at> wrote:
> Boris Borcic wrote:
> > This reminds me of an early programming experience that left me with a
> > fascination. At a time where code had to fit in a couple dozens kilobytes,
> > I once had to make significant room in what was already very tight and
> > terse code. Code factoring *did* provide the room in the end, but the
> > fascinating part came before.
> > There was strictly no redundancy apparent at first, and finding a usable
> > one involved contemplating code execution paths for hours until some
> > degree of similarity was apparent between two code path families. And
> > then, the fascinating part, was to progressively mutate both *away* from
> > minimality of code, in order to enhance the similarity until it could be
> > factored out.
> > I was impressed; in various ways. First; that the effort could be
> > characterized quite mechanically and in a sense stupidly as finding a
> > shortest equivalent program, while the subjective feeling was that the
> > task exerted perceptive intelligence to the utmost. Second; by the notion
> > that a global constraint of code minimization could map more locally to a
> > constraint that drew code to expand. Third; that the process resulted in
> > bottom-up construction of what's usually constructed top-down, mimicking
> > the willful design of the latter case, eg. an API extension, as we might
> > call it nowadays.
> This is much the same that happens in maximisation problems: the value gets
> trapped in a local maximum, and the only way to reach a greater global
> maximum is to go downhill for a while.
> I believe that hill-climbing algorithms allow some downhill movement for
> just that reason. Genetic algorithms allow "mutations" -- and of course
> real evolution of actual genes also have mutation.
> --
> Steven

Indeed exactly. But it wasn't quite the same to think through it first
hand, as I said that the subjective feeling was "perceptive
intelligence got exercized to the utmost".

To illustrate, it is very much the memory of that experience - the
perceptive training - that made me notice, for another high point,
what I think to be a common factor worthy of capture between the
sociology of Archimedes' Eureka and that of Einstein's E=mc^2, let's
just describe Archimedes' case in the right manner: There is a trading
port city, and thus citizens who are experts in both floating ships on
the seas and of weighting goods on the scale in the markets. And then
comes Archimedes who says : "hey, experts, I show you that these two
aeras of your expertise that of course you think have nothing to do
with each other except for what you know so well and clear - they are
in fact two faces of a single coin that you ignore."

And thus a codeful question : "What does F(Syracuse) hear if F(Eureka)
is the = in E=mc^2 ?"

And a more serious one : what happens to the potential for similar
discoveries, when society specializes expertise to the point that
there isn't any more any community of "simultaneous experts" ?

Cheers, BB
"Hope achieves the square root of the impossible"

More information about the Python-list mailing list