4 ms·
Ask HN: Programmers, what is your “scotch file”?
I perhaps the greatest Programming quote of all time, Peter Welch writes:
"All code is bad. 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. It has sensible and consistent names for functions and variables. It’s concise. It doesn’t do anything obviously stupid. It has never had to live in the wild, or answer to a sales team. It does exactly one, mundane, specific thing, and it does it well. It was written by a single person, and never touched by another. It reads like poetry written by someone over thirty."
So, what's _your_ "scotch file"?
- taylodl 7y agoI've been programming for 35 years and I can say I've never once done this. Is this a thing?
- bradknowles 7y agoI started programming in the summer of 1982 (between my Sophomore and Junior years in high school), on a Commodore Vic-20. In the time from that point until now, I can assure you that I have never, ever before heard the term "scotch file" or heard of any one describe such a thing. So, two data points over 35+ years does not constitute a wall of fact, but I do believe it tends to cast a bit of doubt on the claim.
- charlieflowers 7y agoYou guys _might_ have spent too much time with compilers, leading to a case of being a tad bit overly literal.
- 100100010001 7y agoOr the idea presented by Welch isn’t as common as the op thinks?
- charlieflowers 7y agoTo have a wistful longing for clean code in a world full of deadlines and compromises? That’s got to be fairly close to universal among programmers who live the craft. No?
- charlieflowers 7y agoWhich part? The German electronica?
- rurban 7y agohttps://github.com/perl11/potion/blob/master/core/compile.c https://github.com/perl11/potion/blob/master/core/compile.c
- charlieflowers 7y agoCool, looks interesting. I look forward to giving it a deeper look.