
Ask HN: Programmers, what is your “scotch file”? - charlieflowers
I perhaps the greatest Programming quote of all time, Peter Welch writes:<p>&quot;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.<p>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.&quot;<p>So, what&#x27;s _your_ &quot;scotch file&quot;?
======
rurban
[https://github.com/perl11/potion/blob/master/core/compile.c](https://github.com/perl11/potion/blob/master/core/compile.c)

~~~
charlieflowers
Cool, looks interesting. I look forward to giving it a deeper look.

------
taylodl
I've been programming for 35 years and I can say I've never once done this. Is
this a thing?

~~~
bradknowles
I 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
You guys _might_ have spent too much time with compilers, leading to a case of
being a tad bit overly literal.

~~~
100100010001
Or the idea presented by Welch isn’t as common as the op thinks?

~~~
charlieflowers
To 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?

