←back to thread

Be Aware of the Makefile Effect

(blog.yossarian.net)
431 points thunderbong | 7 comments | | HN request time: 0.932s | source | bottom
1. ruuda ◴[] No.42663877[source]
I think LaTeX is the poster child of this. Nobody writes a LaTeX preamble from scratch, you always copy your previous document and tweak it.
replies(3): >>42664055 #>>42664397 #>>42665522 #
2. __mharrison__ ◴[] No.42664055[source]
I use Typst now instead and wrote the "preamble" from scratch. (Because Typst is that much less annoying than LaTeX)
3. sandbach ◴[] No.42664397[source]
Don't do that! If you're always using the same preamble, you should turn it into a .sty file. Then the preamble of new documents is just

  \usepackage{myessay}
replies(2): >>42665379 #>>42669180 #
4. aragilar ◴[] No.42665379[source]
I did that, then I needed to tweak things so I added options, then I needed to use the package somewhere that needed to be self-contained, so I started copy-pasting ;). I've done similar things with makefiles, tox configs, linter settings (all of which started from an initial version I wrote from scratch).

I suspect the real reason this effect exists is because there's copy-pasting is the best way to solve the problem, due to a varying mix of: there being no way of managing the dependencies, needing to avoid (unmanaged) dependencies (i.e. vendoring is the same, only we have a tool managing it), the file (or its contents) needing to exist there specifically (e.g. the various CI locations) and no real agreement on what template/templating tool to use (and a template is just as likely to include useless junk). Copy-pasting is viewed as a one-time cost, and the thing copy-pasted isn't expected to change all that much.

replies(1): >>42667305 #
5. BlueTemplar ◴[] No.42665522[source]
I guess that there's a very important difference between copying something that you understand (or at least the details of which, like syntax, you can easily remember - here comments become important),

and copying something that not only you do not understand, but you were not the one that made it in the first place, and you never understood it !

6. ttyprintk ◴[] No.42667305{3}[source]
Definitely true for linting. Nothing unlike a linter solves the problems we want the linter to solve.
7. fph ◴[] No.42669180[source]
Then you make a change to myessay.sty and suddenly four of your old files stop compiling.