The law of diminishing returns needs no introduction. Your second slice of pizza is less satisfying than your first. Your second million dollars is less valuable to you, personally. If you think econ 101 has any life wisdom to impart, it deserves being elevated to the status of “life heuristic” - especially because, unlike some other concepts in econ 101 (comparative advantage anyone?) it feels true in a boring way, not in an actively counterintuitive way.| Posts on Andrew Quinn's TILs
In order to learn a word, we need to come across it several times. It seems that the minimum amount of times we need to meet a word is somehwere around 7 or 8 meetings, but it's very hard to put a figure on it. -- Paul Nation, [2020 Victorial University of Wellington](https://www.youtube.com/watch?v=FlJj8vpJxfE) He’s right, but that never stopped me. I say 10 sentences in a specific practice: When you come across a word you don’t know enough times for it to bother you,| Posts on Andrew Quinn's TILs
I’ve been on vacation this week, and part of what I’ve been up to is fixing up the Selkouutiset Archive. Like most of my websites these days, SA is powered by Hugo, which means handling a lot of Markdown documents, which means I opted to use an intermediate Git repo as a submodule to actually store the custom-processed documents. After a few tweaks here and there, I found myself wanting to quickly flip through all of the Markdown documents I had generated for each news day.| Posts on Andrew Quinn's TILs
1 wall "Hello, world!" will send a message that looks like 1 2 3 Broadcast message from root@localhost (pts/0) (Sat Feb 1 14:50:14 2024): Hello world! to every user currently logged in to the system. When might this be relevant? When you’re working in a small team, by remoting into custom hardware, and constantly reflashing the device, to give everyone a heads up, for instance: 1 wall "Device will be reflashed in 5 minutes" && sleep 300 && .| Posts on Andrew Quinn's TILs
Hyvää uuttaa vuottaa! As stated before, my TIL is up and running once more. Some things I’m going to be experimenting with this year: Self-hosted stuff, speficially on the Raspberry Pi. One of those fancy new split keyboards I keep hearing everyone talk about. Coding more, and thinking about coding less.| Posts on Andrew Quinn's TILs
Hei kaikki. I’m going dark for the rest of the year as I switch my attention to reading a lot of Finnish, since Free Voluntary Reading is the best way to learn a language. Hyvää joulua ja onnellista uutta vuotta!| Posts on Andrew Quinn's TILs
Shell Bling Ubuntu and finstem now have what I’m calling “speed paints” of how someone, starting from scratch on a standard Ubuntu VM, might install the programs. This came out of me realizing ffmpeg makes speeding up a video recording of a VirtualBox session a one-line operation: 1 ffmpeg -i output.webm -filter:v "setpts=0.1*PTS" -an output-fast.webm When I watched them back, I realized it gave me a really good sense of what the installation should feel and look like, even if I hadn’...| Posts on Andrew Quinn's TILs
fzf is an incredibly useful bit of software, if someone shows you how to use it. There’s a lot more to it than just fuzzy-switching directories and fuzzy-searching you shell history – it also comes with a preview pane that updates on every keystroke. Try 1 echo '' | fzf --preview 'echo {q} {q}' and typing something to see how it works. ({q} is the query you type in at the bottom of the screen.| Posts on Andrew Quinn's TILs
At work I’m currently experimenting with using Vagrant to automate getting an entire local network of our tiny embedded Linux systems running all on my local box. Alas! One of our devices uses a custom Yocto distribution! But wait, we have scripts to run these as VDI images, and apparently that’s enough for Vagrant to get to work! 1 vagrant package --base my-virtual-machine Further reading materials for future me: Creating a Base Box, and the Box File Format.| Posts on Andrew Quinn's TILs
There are only four single-digit primes: 2, 3, 5, and 7. So all two-digit numbers are either prime, or divisible by one of these four numbers. Of the four, 2, 3 and 5 are all very easy to spot check whether a number is divisible by them or not (for 3, add the digits first, and see if that sum is divisible by 3). If a given 2-digit number doesn’t fall into this category, 7 times out of 8, it’s prime.| Posts on Andrew Quinn's TILs
haskell-kata’s Quickstart now has this neat little ditty at the start: 1 2 git config --local alias.build '!sh -c \'for file in *.hs; do ghc -o "${file%.hs}-bin" "$file"; done\'' git build Git is the gift that keeps on giving. I was on the hunt for a subdirectory-scoped alias, and I just discovered this incredibly flexible way to create new Git subcommands. History: 2 years ago I read through the 1200 page behemoth Haskell Programming from First Principles.| Posts on Andrew Quinn's TILs
Apparently so.. The resemblence is uncanny. I’ve apparently been out of the FP game too long, I thought Stack was the latest and greatest in abstracting over the toolchain.| Posts on Andrew Quinn's TILs
For some reason, my daily archive of Finland’s “clear news” broadcast didn’t work today. Why not? TL;DR: Just a Git snafu. Quick recap of the archive: There are 3 Git repos: selkouutiset-scrape simply scrapes the HTML https://yle.fi/selkouutiset at 6 PM every day via a Github Action. selkouutiset-scrape-cleaned pulls in scrape and turns it into a stack of translated, properly-named Markdown files, by the magic of shell scripts, systemd timers, and a tiny VM in a datacenter somewhere.| Posts on Andrew Quinn's TILs
Recommendations appreciated. Disclaimer: Most of these make little sense in an Internet medium anyway. An index. An index simply lists the terms and topics discussed in a document, along with the pages they are listed on. A glossary. Could be as simple as a CSV file of terms and definitions, or as complex as a whole extra glossary/ folder. Related: A “Acronyms and Abbreviations” section. Even moreso than the last, this could be a simple CSV.| Posts on Andrew Quinn's TILs
At least on Linux. Don’t believe me? Run tcpdump -nn -i <interface> 'host example.com' in one shell and traceroute example.com in another. tcpdump will pick up all 3 of {ICMP, UDP, TCP}, and on my machine the pattern is clear: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20:58:47.187086 IP 1.2.3.4.41369 > 93.184.216.34.33434: UDP, length 32 20:58:47.187160 IP 1.2.3.4.39830 > 93.| Posts on Andrew Quinn's TILs
Example from yesterday’s news. Count ’em yourself – there’s 76 of them there. Mass i18n efforts like this are I think an underappreciated benefit of what static site generators like Hugo can give you. Actually, especialy Hugo – it’s multi-language support is very good, like darn near everything about the platform once you get past the initial learning curve. Another underappreciated benefit: When building HTML pages is fast, you can afford to build a lot of them.| Posts on Andrew Quinn's TILs
I love pomodoros 🍅. But I have to admit, most of the time when I reach for them, it’s because I"m already having trouble staying on task with whatever I’m doing. I generally don’t get a lot of value out of the ’longer break’ option, a steady beat of work and breaks is enough for me. In those circumstances I often find solace in the idea that a well-constructed pomodoro creates a certain lower bound on my work-to-play leverage ratio.| Posts on Andrew Quinn's TILs
I’ve discovered one big downside of [putting systemd times into ~/.config/systemd/user/][1]: They stop running when you log out. Two ways around this problem: Bite the bullet, and install the timers into /etc/systemd/. This means giving up chezmoi version control, making the overall system more snowflake-y. I’m not crazy about it. Remote in with tmux, instead of ever logging out, just use C-b d to detach from the session. I’m going with #2.| Posts on Andrew Quinn's TILs
Some more updates to the main repo of this TIL site today, in particular I have added a new fzf-tags.fish script. til uses this script to Scrapes all the YAML tags: frontmatter from all current Markdown posts, Puts me into a multi-select fzf menu containing them, and Puts anything I select into the tags: of the new blog post. Tags form natural breadcrumb trails throughout a blog as it grows organically over time.| Posts on Andrew Quinn's TILs
A communication heuristic, optimized for asynchronous communication of detailed concepts between human beings. Not really a TIL, I’ve been sitting on this one for a while. Rationale Existence “proof” Our short term memory can hold at best about 7 +/- 2 chunks of information at a time. Start with the lower end of that: 5 chunks. Assume that whatever someone is “really” trying to do takes up 1 of those 5.| Posts on Andrew Quinn's TILs
This blog now has a swanky new RSS feed button right on the front page, courtesy of the well-designed PaperMod theme powering things on the backend. Hugo newbies often don’t know that Hugo usually generates these RSS feeds automatically for new websites. You usually have to go out of your way to turn them off. Example: https://andrew-quinn.me/index.xml exists, and has existed for quite some time, without me needing to lift a finger (although I might want to put a button on my home site too!| Posts on Andrew Quinn's TILs
For a long time after moving my website from Netlify to Azure, none of my fancy emoji or weird umlaut characters would display properly. Today I fixed that by popping back into the the Hugo theme I built off of minimum-viable-hugo and adding 1 <meta charset="utf-8"> to themes/minimum-viable-hugo/layouts/index.html and themes/minimum-viable-hugo/layouts/partial/head.html. (There’s probably a way to intimidate Azure Static Web Apps into using UTF-8 by default too, but I didn’t bother to look.| Posts on Andrew Quinn's TILs
TL;DR systemd timers are a serious upgrade from cron. Accept no substitutes. ~/.config/systemd/user lets you run user-scoped timers and services, in a place where you can version control them with Git easily, and even keep a handy backup with chezmoi! Story We had the great honor of having our friend Tri Phung (LinkedIn, GitHub) over for dinner yesterday. As is often the case the conversation turned to work. I’ve been on a kick of using Github Actions remotely and shell scripts + systemd se...| Posts on Andrew Quinn's TILs
1 2 # ⚠️: Reboots your VM. su -c "$(whereis adduser | awk '{print $2}') $(whoami) sudo && $(whereis reboot | awk '{print $2}')" In all its glory! For Debian 10 and up, because Debian 10 is where the sysv to systemd conversion became totalizing. Let’s break down quickly why each part of this is needed: Since we are trying to add ourselves to the sudo group right now, we obviously can’t use sudo.| Posts on Andrew Quinn's TILs
This weekend I’ve been procrastinating playing the long game by getting some nice workflows set up for my TIL content repository and its associated website (cf Context, below). If all goes well, by the time I hit :wq on this TIL, it should invisibly trigger 2 Git commits, a Hugo build, and then appear on the site fully-birthed. One of the more interesting patterns I noticed was the .nojekyll empty file which I had to build to get GH Pages to stop tussling with my Hugo Action for turf.| Posts on Andrew Quinn's TILs
I’ve been a big fan of both spaced repetition in general and the Anki spaced repetition system in particular for a long time now. So today, after a fresh new install and blinging out of Ubuntu 23.10, I decided to take the next step, as I often do with programs I use a lot, and try to build and compile it myself. This turned out to be pretty easy! The docs warn that .| Posts on Andrew Quinn's TILs
Tonight I was hacking away at some more little automations to make this TIL nice and presentable over at https://hiandrewquinn.github.io/til-site/. Git has a wonderful system called “hooks” which live under .git/hooks/, come loaded with examples so you can remember how they all work, and – surprisingly – don’t contain a local post-push hook! There’s post-receive, but that expects to be able to run a script on the server side – not helpful when I’m pushing to one of Github’s ...| Posts on Andrew Quinn's TILs