Hacker News new | ask | show | jobs
by gorpovitch 2215 days ago
When I hear people talking about programming as an art, I usually assume that the decisions they make about their code tend to be about how elegant and beautiful it is, not efficient and valuable. It's fun and satisfying to write elegant code, but your company hired you to produce value, not art.
2 comments

Elegant and beautiful things are often also efficient and valuable.
> what does Hardy mean when he says there is no permanent place for ugly mathematics? He means the same thing Kelly Johnson did: if something is ugly, it can't be the best solution. There must be a better one, and eventually someone will discover it.

I don't think Hardy's take really stands up today. There is at least one mathematical fact which has been proven through exhaustive computerised tests, and which no-one has (yet) been able to prove without using computers.

Ugly? I suppose so. Is there a 'place for it'? I don't see why not.

https://en.wikipedia.org/wiki/Four_color_theorem#Proof_by_co...

Right, there is also difference between short-term value and long-term value.
> how elegant and beautiful it is, not efficient and valuable

Perhaps a nitpick, but 'correct' deserves a mention somewhere.

As others have said, elegance in code should generally align with efficiency and correctness.