TexanFeller
Joined 14 years ago
Joined 14 years ago
1. Set up a container image based on our prod Postgres DB's version with current prod migrations pre-applied.
2. Configure Testcontainers to be reuse the container between tests, at least within the same file.
3. ~25 lines of init code that apply local-branch migrations to a template DB and copy test data to it on the first test.
4. When the template DB already exists, test setup just drop the DB and copy it fresh from the template DB.
I find tests that actually perform the actions catch a heck of a lot more bugs and are easier to setup up than code that uses a lot of mocking or "test implementations" of a class. And with just a little care the performance penalty is negligible and way more than worth it.
Long ago I was struck by an idea I heard about human reasoning that I paraphrase as "human reasoning evolved not to reason, but to provide reasons"[1]. Basically that the heaviest evolutionary pressures on our brain were for social utility, like for influencing others to do something for us, or giving pre/post justifications for our actions that most others are likely to accept to avoid punishment. The flawed mechanisms that we developed to do such things are not significantly grounded in logical reasoning, but can sometimes be pressed into duty for that.
LLM models are trained to "generate the best next token" which augments the response so far and makes the evaluator happy. When I reflect on my own mind responding quickly to someone in a meeting it doesn't feel altogether different from that. We don't typically carefully and fully logically reason before we start talking. We typically start talking and think only a little ahead about what we say next that supports and doesn't contradict what we've said already. As we're speaking we are monitoring the other person's facial expressions to infer their emotional response and adjusting our next words based on that. I think at least common neurotypical[2] conversation might be closer to the "next token" reasoning than we would be comfortable admitting.
[1] I _think_ who I heard say that was Hugo Mercier, on either Sean Carroll's consistently amazing science podcast or maybe on Lex Friedman before he veered into Joe Rogan emulation. I'm normally a little suspicious of the theories of psychologists and cognitive scientists, but I intuitively related to many of his lines of thinking.
[2] I'm arguably pretty neurodivergent in more than one way so I think my thought processes are a little different by default, but that makes me more reflective about common conversation. When I'm trying to mask and communicate more similarly to a neurotypical corporate employee I feel like I become a "stochastic parrot" that's just predicting the best next few words to improve the emotional response I'm reading in my conversation partner.
Very true in some sense, but I continue to encourage DRY-bias because I've literally never seen teams duplicate code responsibly and later dedupe it when it's the right time. 95% of the time this sentiment is quoted to justify shipping quick slop and stable reusable bits are never extracted into a shared lib later.
One of my criteria for presidential candidates is that they seem willing and able to push the button when previously stated red lines are crossed, or at least are perceived to be the type capable of it. One of the characters I’ve hated most in all the books that I’ve read is the woman in The Three Body Problem who jeopardized humanity by being too soft to hit the MAD button.
TM heavily throttles disk I/O used for backing up in order to ensure that normal user activity isn't affected. That makes it appear that TM is dramatically slower than you would expect which greatly annoys me. This becomes obvious after you run this command which will make both the preparing and transferring phases go closer to the theoretical speed you'd expect:
sudo sysctl debug.lowpri_throttle_enabled=0
During the day I need to pull large data files from the work VPN so it's nice that that can happen at full speed even when Steam and movie streaming are also at full throttle. Combine that with backups and moving various files back and forth to my NAS and I'm very happy to have 10Gb local wiring.
Before I was using one of the common Synology consumer NAS boxes that are often recommended. The NAS didn't report any errors with the drives or its own hardware, but at least once a month TM would glitch on at least one of my home laptops.
My new setup is an Asus FLASHSTOR 12 Pro Gen2 FS6812X. For a year now it's been running without a single apparent TM glitch while backing up multiple personal laptops and my work laptop. Sometimes I'm plugged in and sometimes I'm backing up over WiFi, but it's always worked.
I tried various recommended settings for the Synology and nothing helped so I strongly suspect that the Synology network protocol(SMB, AFP, etc.) implementations were either buggy themselves or at least not compatible with quirks in Apple's implementations. Synology->Asus fixed all my TM problems instantly and seemingly permanantly!
It's wild to me that 10gbit isn't the norm by now and tech people who should know better seem to think WiFi matches or even exceeds even 1gbit ethernet. My MBP connects to my WiFi7 setup(Ubiquiti E7) at a nominal 1.5-1.9gbit but Time Machine backups and file transfers are slower than plugging into 1gbit ethernet, probably in large part due to latency and retransmissions. Not to mention that ethernet works with near 100% reliability with dramatically less variation in speed and error rate.