From: Robert Myers on
On May 28, 4:12 pm, Terje Mathisen <"terje.mathisen at tmsw.no">
wrote:

> > That has not been my experience with programming, either my own, or
> > the programming of others.  Too many things in programming will work
> > out "as if by magic" under some circumstances and not others.  That's
> > one of the roots of evil in the mess that is called computer science.
>
> Not quite true:
>
> Several of my most cherished programs/functions/algorithms, those I
> consider really elegant, have exactly the ssame feeling of rightness
> about them: All the parts fit together, all the corner cases simply go
> away, and the performance is close to optimal as well.
>

I suspect that the key difference is the depth of understanding of the
programmer.

The context of the discussion was playing with code.

If you have some notion of elegance and can accurately identify it
when you see it, then I would agree with you.

Anyone can play with code, whether they can recognize correctness,
never mind elegance, or not.

Robert.


From: Andy 'Krazy' Glew on
On 5/28/2010 1:12 PM, Terje Mathisen wrote:
> Robert Myers wrote:
>> One of the things that's attractive about applied mathematics as I
>> have experienced it is that, if something goes well, "as if by magic,"
>> it's usually an indication that you have done something right, and
>> perhaps very right. There are exceptions, but the fact that something
>> "works out" is almost always a trail of bread crumbs worth following.
>>
>> That has not been my experience with programming, either my own, or
>> the programming of others. Too many things in programming will work
>> out "as if by magic" under some circumstances and not others. That's
>> one of the roots of evil in the mess that is called computer science.
>
> Not quite true:
>
> Several of my most cherished programs/functions/algorithms, those I
> consider really elegant, have exactly the ssame feeling of rightness
> about them: All the parts fit together, all the corner cases simply go
> away, and the performance is close to optimal as well.
>
> Terje

I've had the same experience with some computer architecture ideas.

I distinctly remember joy, happiness, pleasure when the simplest possible test program for dynamic instruction rewriting
(aka "flattening") turned out to have time to execute N instructions = the inverse Fibonacci function, i.e. Fib(k) = the
number of instructions that could execute in k cycles (for that simple test case).

I looked at the curve, and said "I've seen that before". And I had.

Sweetness, truth and beauty.

Heck, as you can see I'm still floored by it.