I know a guy who was rejected from a job application for "not having elegant enough code."
I think this is a weak stance because "code elegance" is literally a subjective thing. In my opinion, even if that was the case for this particular hiring authority, a more specific/concrete example should have been provided due to the subjectivity of the word. That said, describe what your version of elegance is and also explain why it is important (or not) to you.
According to Merriam-Webster the word elegance means "a refined grace or dignified property," "tasteful richness of design" etc...
Basically, the word is associated with fluff and its definitions imply superfluous. My question is, why does this word get thrown into code so much and what is your stance of what elegant code even really means? To me, it's like the word "hacker" and means nearly nothing due to its infinite subjective possibility of meanings. Maybe I'm wrong and every single person here will view it as the exact same thing, and I'll eat my words :D
It seems some people associate the word with "clean code" but that's not what the definition of the word implies. Do you associate elegant code with a "clever way to do things?" If I had to put a definition on it personally, I would probably liken the word with "clever."
elegance is very subjective I read a letter conversation between friedrich schiller and sigmund freud about aesthetics and how one might pinpoint/define them and they wrote a lot about how to defined it in the end it was not a clear solution more of a rough estimation to get close to it .....
personally I think there are different types of elegance -> functional elegance, syntactic elegance, structural elegance they could be all together but 90% of the time the community talks about the superficial parts -> structure and syntax.
since elegance is very much based on context so an elegant solution for a web-app can be a crude solution for a desktop-app.
Tough question ... even if the code is elegant in structure (classic clean code approach) is it elegant in function ? a mathematical equation which can be elegant in functional semantics, can be ugly in imperative syntax ...
.....
Alex Harrison
It's definitely subjective but I think that readability and conciseness are commonly held as the defining factors of elegant code. If a new dev cannot go in and understand how the code functions AND efficiently make changes to implement updates, its definitely not elegant code. Just my thoughts as a student of the code