Copy-Item is 27 percent slower than File Explorer drag and drop on Windows

1 2 3 4 5 File Explorer drag & drop ########## (112 MBps) Copy-Item ####### (82 MBps) Built in SFTP client ###### (70 MBps) Built in robocopy ## (25 MBps) WSL 2 rsync # (13 MBps) In table form: Tool Speed (MBps) Difference Drag and drop ~112 — Copy-Item ~82 -27% sftp ~70 -37% robocopy ~25 MBps -78% rsync (WSL 2) ~13 MBps -88% I feel like I’m losing my mind. ...

December 6, 2025

"Courage to quit" matters more for seniors, less for juniors

As a teenager first getting into computers in the late 2000s I spent a lot of time reading old revered tomes like ESR’s The Art of Unix Programming and SICP . If present-day me were to isekai back in time and lose all of the technical knowledge I had but retain my current instincts, however, I would have left all of this on the table and just built a terrible new automation tool for the surprisingly scriptable MMORPG I was into in PHP 5, with as much disregard for clean code and security practices that I could muster[^1]. Then I would have put that tool online, continued to add new features to the ball of mud, and kept it running for 5-10 years before my first post-college interview. And then the vibe that would come across is less “He’s an egghead, and we like that, but we really need someone who actually does things” and more “He’s a meathead, but inside of that meathead is an egghead waiting to be revealed. We need this kind of junior dev yesterday.” I would have done this even though an objectively far superior tool had already existed for quite some time, making this project “feel like” dead weight in the wide world of software! But why? ...

November 29, 2025

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

Save your disk, write files directly into RAM with /dev/shm

Given my interest in extending the life of my SD cards and hard drives as much as possible, I’m surprised I haven’t come across /dev/shm before. In a word it’s a world-accessible RAM scratchpad, which seems baked right into POSIX, so that virtually every Unix EDIT: Linux system already has it mounted as a tmpfs by default: 1 2 ❯ mount | grep '/dev/shm' tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) Today’s lucky 10,000, indeed. It gets mentioned often in Hacker News comments, but surprisingly I couldn’t find any actual articles talking about it. The existence of /dev/shm is a boon for me mostly because it means I never have to worry about whether /tmp is really RAM-based again. ...

June 26, 2025

Create multi-stage Anki card answers with HTML's <details> tag

This works as of, at least, Anki 24.06.3. According to the Mozilla Developer Network, The <details> HTML element creates a disclosure widget in which information is visible only when the widget is toggled into an open state. In standard web browsers, absent any CSS to the contrary, a <details> tag starts closed until further notice. Since Anki is basically a local web browser on top of a timer, this also works there. ...

June 7, 2025

Binary search isn't about search II. Loop invariant of leftmost element search

In the first “Binary search isn’t about search” post, we spoke about using assert statements to enforce your loop invariants. Our plain old everyday binary search invariant can be summarized as such: For all x in L[0:l]1, x is strictly less than T, the element we are searching for. For all y in L[r:len(L)]2, y is strictly greater than T, the element we are searching for. Or, if we want to be even terser, we could note this as simply ...

March 8, 2025

Binary search isn't about search

Suppose you’re trying to track down a bug that appeared in a series of Git commits. You’ve been idly keeping track of where this bug appears in your lucky commits by hand, while busy with other things. So far you’ve compiled this table: 1 2 3 4 5 6 7 8 9 10 0000000 🧼 clean, no bug. 0000001 🧼 0000002 🧼 0000003 🧼 0000004 🧼 0000005 🧼 0000006 🐛 bug first appears here. 0000007 🐛 0000008 🐛 0000009 🤔 bug mysteriously disappears... Then an EMP explodes in your vicinity and scrambles your memory circuits. The Internet is down, you don’t have the git-bisect man pages downloaded locally, and all you remember is that your first commit was good, your last commit was good but for reasons you don’t understand, and something bad is probably still lurking in there. But where? ...

March 7, 2025

`python -m http.server` as ephemeral Dropbox

Ever need to download a file from a server – or get someone else to download a file from a server, who may not be comfortable with or should have access to scp or sftp? Turns out, if you have Python installed – and you probably do – it comes with a handy one-liner file server for just such an occasion: 1 python -m http.server 12345 # or whatever port you prefer ...

January 21, 2025