3 ms·
I think, just like writing, some code is meant to be read but most is produced as a fact of life. For example, of what I write in my daily life - emails, HN com
by owenversteeg 10y ago
I think, just like writing, some code is meant to be read but most is produced as a fact of life. For example, of what I write in my daily life - emails, HN comments, papers, text messages... the majority aren't meant to be aesthetically pleasing at all. But occasionally I will write something, either on purpose or by accident, that's just a little bit poetic and nice. Or I'll sit down to write a story, or a blog post, or something that's meant to be a bit nicer to read.
There's a continuum of how nicely things are written in real life: if you just crashed your car, you might text your family quickly telling them what happened. Or if the site went down, you might hack together a quick fix. That'll be utilitarian, since in a situation like that you don't give a damn about how well the text/code "flows". Then there's writing where you're not pressured for time, but you don't care about the style: most code people write is like this. Then finally there's code, and writing, that's intended to be beautiful. It's written with the intent of showing it to other people, and with the hope that someone will read it and say "wow".
The reality, however, is that most code - and most writing - is merely utilitarian. And even when people -do- try to make their code (or writing) beautiful, they aren't skilled enough to do it. Hell, just because I _want_ to write like Márquez doesn't mean I can.
There is code that is literature, but it's hard to find. It may be lost, written on a whiteboard in a job interview to impress the company. It may be hidden from the world, the author embarrassed by it. Or, it might be out there somewhere, but nobody's discovered it yet.
- Roboprog 10y agoTo further extend that idea, you can lump code you (must?) read into 2 broad overgeneralizations: * An informative program that you will learn something (good) from. * A cryptic cipher (seemingly) that will only make your eyes bleed and your head ache. Just sayin'.