Policy of transience

28 points by pushcx


n1000

I love Simon’s articulation of a tension I’ve been feeling in my own work. I love REPL workflows. I’m addicted to evaluating expressions in my editor: function interiors, half of a data pipeline, little scripts I write in the middle of a file. You get immediate feedback and can go seamlessly from a “scratchpad” to a working program.

That’s the idea at least. I’ve been burned several times writing data processing scripts that depend on some saved state in R’s “workspace”. It probably sounds crazy to engineers working in other languages, but I’ve seen some horrible situations with load-bearing global state in pipelines in jupyter notebooks or R scripts.

REPL work (and you can make a lot of languages into REPL languages with something like SLIME) frees you from having to think about state or your environment when you’re just hacking around or debugging. The freedom costs something. I won’t give it up, but I need to develop better practices to avoid digging myself too deep of a hole.

n3t

It reminds me of https://grahamc.com/blog/erase-your-darlings/ and https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ that implement similar policies with NixOS.

Personally, I often use /tmp as a scratchpad and really like the fact that it gets cleaned up automatically.

I also have ~/tmp (a regular directory, not a ramdisk) but it tends to accumulate cruft. Somehow I never feel confident to just remove everything in there without making sure I won’t miss anything.

dubiouslittlecreature

I might adopt some of this.

jbert

Very early on I adopted (from my first manager [*]) the habit of using tt as the name of a temporary file (embellished as tt.go, tt.hs etc). This is a signal to my future self that there is nothing of permanent value inside and it can always be safely deleted. I find this helps avoid a lot of the creeping ~/tmp directory issues. (If I need a dir I can mkdir ~/tmp/tt, work in there and happily nuke it next time).

I guess I assumed that everyone does something like this (but with different file names)?

[*] - I think he mentioned it came from an AT&T practice, likely early 90s? Unsure.