Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Elegance is so subjective. Many developers seem to define it as making design decisions their way. Working is much less subjective.

In my opinion, it's better to focus on improving what is measurable. That means focusing on making more things work than making things more elegant.

Of course, this whole debate is a broad generalization and the devil is in the details.



I agree, but there are probably some basics that we can all agree on that makes code inelegant.

I have been rewiting some of my own code recently.It was a quick temporary solution that grew and grew. I used OOP to avoid cutting and pasting, but I realise that one central method didn't have any concrete set of input or output paramaters, it changed depending on what was calling it - very nasty. It was essentially doing three things, rather than one. (It worked, as the guy in the article descrbes)

I think seperation of concerns, making one function do one thing etc, is a start in making elegant code. Or at least not fugly like it was before.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: