←back to thread

Be Aware of the Makefile Effect

(blog.yossarian.net)
431 points thunderbong | 2 comments | | HN request time: 0.52s | source
Show context
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 #
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 #
1. 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 #
2. ttyprintk ◴[] No.42667305[source]
Definitely true for linting. Nothing unlike a linter solves the problems we want the linter to solve.