Experiment registry: Can I simply enjoy everything I do?

N.B.: If I link you to this personally, it is to explain why I usually seem to be in a great mood. It’s an experiment. I’m normally in merely a good mood, and I am pushing myself to be great. This is an unusual entry for a Today I Learned site, even by my standards. But I think it’s something I would prefer to pre-register ahead of time. I’ve always been predisposed to mirth. I laugh easily; I rarely get depressed; I’m just about always in a content mood these days, in no small part because I have actually succeeded on the meager goals I set for myself as a teenager (soulmate: check, child: check, sujuvuus vieraalla kielellä: yhä työn alla mutta kyllä se siitä, give me maybe five more years). Yet for some reason I have always felt it is, I don’t know, low status to be so effortlessly joyful and opulent. Like people will take you less seriously or something. So I’ve been reluctant to push my naturally good mood into the realm of actively loving life as my default state. ...

July 7, 2025

Enforce GPL compliance by offering bounties?

Epistemic status: Very unclear, also I Am Not A Lawyer This Is Not Legal Advice Get Off My Lawn (N.B.: I"m using “GPL” with broad strokes here, to point at “open source licenses it’s straightforward to run afoul of”.) Policing is always hard in a world of limited resources. Especially when one is targeting sophisticated, well-monied criminal organizations, it can take an awful lot of time and effort merely to credibly reveal that wrongdoing has taken place. Would it surprise you if I said the average criminal software organization is probably, on the margin, more sophisticated than the average criminal organization? If so, you should probably expect that the former’s crimes are brought to life even less often than the latter’s. ...

September 21, 2024

How I ask GPT-4 to make tiny Python scripts in practice

First get a working script. “Hey GPT-4, write me a ChatGPT script that does .” Manually check over the script and iterate until it’s giving me what I want. “Now wrap the script into a click command-line interface.” I almost always specify to use an --input flag and an --output flag. If the data it’s working with is human-readable, “Make it so that if --input is not specified, it reads data from stdin.” If the data it’s writing is human-readable, “Make it so that if --output is not specified, it emits data to stdout.” If the script is complicated enough that error logging is warranted: “Add logging and colorlog. Ensure all error messages are written to stderr so that it does not clash with output.” This advice is optimized for small Python scripts, usually under 200 lines in total, for automating semi-mundane tasks like ...

August 22, 2024

My pet theory of how great software gets started

(Inspired by yungporko’s Ask HN post, which got me thinking.) Pretty much every community, dojo, workplace, subculture, scene you can imagine in the modern day had a software sub-scene embedded within it. It can be as small as “that guy who does our Excel”, or as large as the scene itself . This is owing to the fantastic generality of software as a way to make almost anything more efficient, but we won’t go on that tangent now. ...

July 16, 2024

What scripting languages come out of the box on Debian 12?

Poking around in a fresh VM in Vagrant, I see bash dash, a POSIX compliant shell linked under sh python3, 3.11.2 at the time of writing awk, specifically mawk sed, if you count that (I do) perl, specifically Perl 5 There may be others I missed. Why I’m curious: Knowing that a language is installed by default on the most popular Linux distribution can simplify certain concerns considerably, which are of special interest to people who don’t work on Internet-connected boxes. Knowing that Python/Perl is already on there means that, provided your script only relies on the standard library, you should be able to just scp it over in a pinch and have it “just work”. ...

June 23, 2024

OpenBSD, the computer appliance maker's secret weapon

Between our ESP32 prokaryotic organisms and our 24/7 Internet-enabled megafauna servers, there exists a vast and loosely-defined ecosystem of things the B2B world likes to call computer appliances. Picture a bespoke Pi 4 packaged up neatly with some Python scripts, a little fancy plastic embossing, and maybe a well-guarded id_ed25519.pub in case you end up in hot water during the (long - very long, stable cash flow for generations long) maintenance contract, and you’re in the ballpark. ...

June 5, 2024

tmux is worse is better

tmux (short for “terminal mux” (short for “multiplexer”)) is i3 for your terminal. Oh, it’s so much more than that, and I recently discovered with some joy that it is installed by default on OpenBSD, but its fundamental value add to any programmer who has to SSH into servers more than once a week is it allows you to split your screen up into multiple independent shells without needing a graphical environment at all. If you want to walk the path of true digital minimalism, vanilla Vim and tmux or its spiritual grandfather screen are all you need. ...

May 23, 2024

Beware those who promise increasing marginal returns

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. ...

April 9, 2024

Most 2 digit numbers not divisible by 2, 3, or 5 are prime

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. ...

December 4, 2023

Pomodoros and leverage ratios

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. The classic 25 minutes on, 5 minutes off gives you a 5:1 ratio. ...

November 27, 2023