Hacker News new | ask | show | jobs
by boredemployee 1261 days ago
could writing code be considered as an art? genuinely asking
5 comments

There is "code as art" where the code itself is art. A while back there was a program floating through the nerd community that was C code laid out in the shape of a giant C, which actually compiles to a valid program.

Then there is "code as an artform". Think code golf, or other such challenges that encourage incredibly creative solutions.

Then my personal favorite is simply "beautiful code". Sometimes an algorithm or a function will just be elegant in its construction or simplicity. Sometimes you have a real hairy problem that seems very complex at first, but the solution ends up as a small, clean function with no frills, no bugs. It's about beautiful solutions more than the text of the code.

Code can be art, but it usually isn't. The first two categories are something done intentionally as a form of expression, but the last is more akin to a sunset or a rainbow. Sometimes beauty appears when we don't intend or expect it. But I think that still qualifies as art.

I think the art is to find the best abstraction/metaphor for the problem needed to be solved that is both easy to reason and maintain.
Whenever I hear someone describe programming as art, I think of this essay[1].

That isn't to say it can't be art. Only that those with an interest in calling it art usually aren't the appropriate authorities.

[1]: https://idlewords.com/2005/04/dabblers_and_blowhards.htm

"Art is a diverse range of human activity, and resulting product, that involves creative or imaginative talent expressive of technical proficiency, beauty, emotional power, or conceptual ideas.

There is no generally agreed definition of what constitutes art,...":

https://en.m.wikipedia.org/wiki/Art

If I quoted ChatGPT for this question, how does HN feel?
Personally if I want ChatGPT's opinion I'll just ask it myself. I'm here for the human comments.
It's a good day to reflect on code recently pushed, or a PR submitted, to retrace the lines and marvel at it (in one's head, on the commute home, or underneath a watery drone).

If programming itself isn't art, the cognition of its product surely is. Art in a gallery asks to be observed again, studied again, brought to the context of each discovered age, again.

Everything can be considered art depending on who you ask, I don't think anyone agrees on what actually is or isn't.