in reply to IYO, what is elegant code?

Elegant code can be code that is easy to work with.

Say you want to implement a new feature, and it turns out you do it by thinking a lot and coding a little. You think for half an hour and then edit two lines of code and write three new ones and then you're done. That's elegant.

I've only ever experienced that with code that was very well factored.