4 ms·
> Every programmer occasionally, when nobody’s home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file o
by enriquto 8y ago
> Every programmer occasionally, when nobody’s home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. It’s a different file for every programmer. Sometimes they wrote it, sometimes they found it and knew they had to save it. They read over the lines, and weep at their beauty, then the tears turn bitter as they remember the rest of the files and the inevitable collapse of all that is good and true in the world. This file is Good Code.
oh my god! this is so much me it is not even funny
- skytreader 8y agoFunny thing. I see this article is from 2014 so I may have read it before, or been quoted to me before. But just last December I got into a discussion about clean code with someone who looks at me for some mentorship and I used this "line" (for lack of better term) to drive home my point. It wasn't verbatim of course, but I particularly remember the reference to "light German electronica", and I don't even listen to _any_ electronica to begin with. And today I encounter the actual article where this originated from. This bit is iconic.
- _bxg1 8y agoI've come to believe that the only good code is code with no actual requirements.
- repsilat 8y agoI took six months off to sit on a beach and write a bit of code, answer to nobody, and I'm not so sure. (I made https://6gu.nz https://6gu.nz, if it's still up...) I learned that corporate project management isn't the problem. I am the problem. Sometimes I'll take a little short-cut, because an innocuous little hack that adds a constraint or assumption seems like better value than going the long way round. Sometimes the design changes as you figure out new ways the product can/should work to be cooler, and old abstractions are no longer useful, or new abstractions become useful, or data that lives over here now needs to get aaaallll the way over there, God Dammit. All abstractions leak, and the first design is never right. And maybe it's fine, because I wrote it all and I can rewrite it quickly enough, but in the real world we can't just go and rip up that code because we don't have the muscle-memory for it, and because of Chesterton's fence. Maybe good code is code that can be deleted easily, or rewritten without fear. Maybe it is code that has been rewritten enough or has survived long enough to embody some kind of wisdom. I know that it is simple, and that it makes the life of its user simpler.
- _bxg1 8y agoI didn't say code with no business requirements; I said code with no requirements. Nothing it's actually bound to do. Pure description, not of what's useful but of what can be beautifully expressed. I've done a bit of coding like this just to see, and it was an interesting exercise.
- redsavagefiero 8y agoWell there is configuration driving your logic...if your logic is supple the configuration is not that important.