2,751 tweets, and 5,339 including replies.
2022
August
- A good README is like a well-written novel: hook, detail, conclusion.Loved reading the one for Pressly's Goose recently. Intro, basic usage, examples, more advanced usage/examples, best practices, license. 80% of what I need in two min of reading.github.com/pressly/goose
- Updating a Rust project after a 1.5+ years, was relieved to find relatively few new errors/warnings, suggesting the language is stabilizing.
And while many linters are good, Clippy still has to be the best. Really appreciate how errors give you an exact fix with laser precision.- Hah — amazing. Jacques Cousteau's Calypso really did have a below-waterline observation chamber like the Belafonte's in Wes Anderson's _The Life Aquatic_.
At 56% Rotten Tomatoes, this is seriously one of the most underrated movies of all time.en.wikipedia.org/wiki/RV_Calypso- OMG, links, lists, and headings are supported in Godoc as of 1.19, all using Markdown-inspired syntax. Love it.
go.dev/doc/go1.19#go-…- Tried it. Running the CLI gauntlet took 15 min to get right. Procured a workload ID provider, but it failed with vague errors.
Gave up, went to service account JSON. Succeeded, but it took a half hour to brew the right blend of obscure roles.Someone get Google IAM a PM, stat! twitter.com/brandur/status…July
- Cool vintage: Cyma WWW, one of the dozen brands that met British Ministry of Defence (note: spelled with a "c") specs to be distributed to soldiers during WWII. Great 38 mm steel case. Temporarily babysitting this one for a friend.
- Google has jumped the shark on auth. Their service account JSON blobs were bad, but now it's worse.There's risk to API keys in that they could leak, but alternatives should be weighed against ergonomics. You practically need a PhD to get up and running.cloud.google.com/blog/products/…
- Having achieved its final form of TikTok-ification, my long-term gambit to never use Instagram has finally paid off.
Even before that happened, Twitter's 280 characters were high art by comparison.- Someday, I would love to see the source code for S3.
That project must be the greatest pile of nightmare code ever written, and simultaneously one of the most impressive engineering feats in history.- Advantages to micromanaging DB queries in Go (as is standard in Go) are no accidental N+1s from lazy loads, and we're far more likely to batch select/upsert rather than one-off loads/saves/updates.
Downsides in the form of dev time are very considerable, but it's not purely bad.- What do Go people do to operate prod without a REPL?
We've been playing with a BG worker that looks for DB flags from operators. Surprised you don't have more people sharing techniques like this because REPL-less life makes even trivial ops a headache.brandur.org/fragments/oper…- The effort that's gone into applying leap seconds safely is impressive/terrifying.
Google/AWS smears are 24h centering on the leap. FB, 17h starting on it.In Google's docs note the TAI ref, basis for UTC, and 37s ahead because it doesn't observe leaps.developers.google.com/time/smear- Out of all the amazingly great consumer tech we've gotten in the last decade (e.g. OLED, retina res, USB-C, ƒ/1.6 lenses in phones), my favorite has to be the M1.
Not having to think about battery life — even when working all day away from an outlet — is a total game changer.- Finished "The End of the World Is Just the Beginning" by Peter Zeihan.
He's super bearish on China, which 6 mo ago I wouldn't have bought, but between trouble in economy/finance/housing and Covid Zero suggesting Xi's fired every dissenting voice, I need less convincing nowadays.- Exposé is my absolute favorite useless feature of macOS and I hope it never goes away.
- Thanks to everyone who emailed about Nanoglyph's signup being broken. It's fixed.
This is what happens when you connect a Heroku DB to a non-Heroku platform (Google Cloud Run) and they (justifiably) roll creds.Friendly reminder: never write software.nanoglyph-signup.brandur.org- A minor nicety of using UUIDs as primary keys (as opposed to bigint) I'd defend is that you can give related objects all the same ID when you know there's always going to be a 1:1 relationship. Makes it easy to find things quickly.
(And not to worry, we still use FKs too.)- RT @craigkerstiens: Reason 167 to work @crunchydata, you can debate with me and @brandur on database design patterns on a daily basis...
- Continuing my streak of totally-popular-with-everyone database opinions, here's one on why soft deletion (`deleted_at` columns) is a net negative, and what to do instead.
brandur.org/soft-deletion- RIP one of the best free credit cards ever — 5% on Uber; 3% dining, hotels, airfare; $50/yr Spotify; $600 mobile phone damage protection (which I totally used once after falling on iPhone trail running); no fee.
But, alas, seemed too good to be true. Was.- One of my techno utopia fantasies is that 90s Japan had been better at software/chips, and by now we'd have a plethora of ARM-based netbooks in the spirit of the Vaio P running a non-Mac non-Win non-Android OS.
As cool as Apple is, we're far too reliant on their continued mercy.- Put down some thoughts trying to articulate where I've found it appropriate to push logic down to the database in the form of stored procs and triggers. The opacity of the side effects of such isn't great, but it's a useful technique given some restraint.
June
- `xerrors.Errorf` undeprecated last week:go-review.googlesource.com/c/xerrors/+/41…This is the kind of good samaritanism the Go community needs.Gentle reminder that `fmt.Errorf` is incapable of capturing a backtrace, which makes it totally unsuitable for production use of any kind.
- The alternate history reel at the beginning of seasons of "For All Mankind" is some of the best three minutes of TV all year.
- Great concept for a new publishing protocol.
Users publish to a single slot that's overwritten with new content. Instead of a timeline dominated by the noisiest who tweet every five min, a broad view of everyone in the space.No likes, replies, or favs.robinsloan.com/lab/specifying…- 1.18 again: finding that x/maps and x/slices don't do enough (no `Map`???), but projects like github.com/samber/lo do maybe too much.
So far, adding functions that reuse lo's naming conventions given it's the best standard we have, but curious how others are running things.- My first use of `x/sync/errgroup` today as an informal goroutine pool in (or close to) stdlib.
Very nice — will even cancel context in case a Goroutine fails. errgroup isn't new in 1.18, but `SetLimit` for parallel control is. Been wanting this in Go for many years.- Notable with Boudin's ousting (and just like the school board's) is that if you judged by local voters' guides or mailers you get around here, every man, woman, and dog in the city was against the recall.
Meanwhile, he's utterly dismantled when the people get to speak.- The combination of Sorbet abstract implementations + Ruby single-line method definitions (added 3.0) are great looking code.
One thing Ruby still has going for it is aesthetics.- Every time I think that Apple has finally righted the ship, they do something like put an M2 exclusively into the Touch Bar MBP.
May
- Shower loop:• Not writing enough.• Maybe need better tools? (iA Writer + Vim bindings??)• No, it's a poor carpenter who blames his shoddy tools. Remember GRRM on DOS WordStar 4.0.• Wait, it's been 11 years and no Winds of Winter.• So, need better tools?? No, come on.
- FF7 INTERmission review: Wow, Yuffie's combat is fun. Huh, this is a lot of consecutive bosses for so early in the game. Oh, it's over isn't it.
- Revised asdf upgrade guide:
1. `rm -rf ~/.asdf/`2. Close all shells.3. `tmux kill-server`4. In new shell, verify `$ASDF_DIR` unset.If it continues to fail:5. Dig hole. Place computer inside.6. Douse with gasoline.7. Light on fire. Run away.twitter.com/brandur/status…- "What problem are you really trying to solve?"
— Sacred mantra of the Gopher pseudo-intellectual- Out of curiosity, have been reading Bill Gates' 1995 "The Road Ahead" and its predictions hold up well so far. Here's the pages describing the "wallet PC" (AKA smartphone) and use of biometrics to protect wallets.
iPhone releases 12 years later in 2007, TouchID 18 years in 2013.- G Suite legacy edition SAVED.
The first time procrastination / brinksmanship has worked out for me, ever.support.google.com/a/answer/60217- It felt like wasting time when I did it, exporting my collection from Flickr was one of my best ideas in years.
Kind of an indictment that a platform for sharing high-res original photos is ~worthless, but add an algorithm, filters, and hellish cropping and you've got $100B.- Great piece.
The Fed takes credit for all economic gains, while ignoring their role as a primary instigator of wealth inequality through asset inflation.Continually amazed how rare it is to hear of the downsides of zeroed rates/QE from the mainstream.thelastbearstanding.substack.com/p/the-case-for…- How insulting. I'm actually a Node developer. twitter.com/craigkerstiens…
- This is the kind of thing that makes me lose the thread on SQL DSLs. Took 10 min of trial and error to write that.
But ironically, still safer than many alternatives, where SQL is in code only as a simple string.IMO, best option is real SQL, parsed before runtime. e.g. sqlc.- Judge my Go sin: vendored like half of `encoding/json` to get more flexibility around encoding.
The only customization knob `encoding/json` gives you is `json.Marshaler`, which takes no parameters, and doesn't go very far. IMO strong argument this package should expose more API.- Babel, dart guns, and institutional stupidity — Jonathan Haidt argues convincingly that the virality effects of social media are incompatible with a functional democracy:
theatlantic.com/magazine/archi…In podcast form:overcast.fm/+vpWYPmZ8g- Very fair and comprehensive treatise on Go.
Generally nice language with a hundred oddities to know about. Usually better not to dig into the "why" of them because more often than not, reading the facile rationalization is bad for blood pressure.April
- Watched "Last Night in Soho" — solid horror that doesn't rely on jump scares (a superior genre of horror).And now I want to go to pubs and see if I can get any of them to give me a Kronenberg 1664 when I order "a pint of the numbers". What are the chances that works? 10%?
- We put a change into our Ruby code to treat UUIDs as 16-byte bytestrings instead of their normal string format.
A small tweak, but kind of fun — UUIDs can plausibly live their whole lifecycle as binary without being rendered to a string. Also, type-safe.brandur.org/fragments/ruby…- PayPal evacuating SF June 3rd. That's everyone in payments gone — Block (Square), Stripe, Brex, Credit Karma, etc. I'm sure just a coincidence — no relation to Prop C.
Once again, San Franciscans get what they ostensibly want. We'll see how long this train can stay on the rail.- Imagine if you had to type your password back into every app on your phone every week like is somehow still a normal thing on your desktop.
- Everyone who's ever put Ruby in prod knows that safe refactoring isn't possible except in very small incremental steps.
We find that a combination of Sorbet plus high branch coverage makes large changes possible. Turns out, type annotations are good.brandur.org/fragments/larg…- A year into professional Go dev, my main day-to-day complaint: too. much. code.
Too many `if err != nil`, too many stanzas that should've been one-liner map/reduce, too much boilerplate. It's a problem for dev speed, but mainly refactoring because there's just so much to change.- Brilliant.
twitter.com/micsolana/stat…- Manhattan.
- Just in case there's anyone else out there who hasn't seen this work of genius. Keep an eye on that counter in the bottom right as you scroll down.
March
- The Expanse might be one of those vanishingly rare pieces of media where the TV series is better than the books. TV makes the universe come alive, and hits a perfect sober/serious quality that books suggest, but don't quite convey.(Only on book three so far, so grain of salt.)
February
- (Mildly interesting —) Did a benchmark of ECDSA (EC = elliptic curve) as we were migrating today from RSA.(On my MBP at least) RSA is slower, but mostly on signing. Verification is about the same speed. Signing is slower by ~100x though, so it was worth the effort to move.
- ffmpeg is an API that's coincidentally on the command line. Thus, Handbrake.
There's never been another program I've used so much and still know so little about. My last args:`-map 0:0 -c:v libx265 -preset fast -crf 28 -map 0:a:0 -c:a aac -map 0:s:m:language:eng -c:s copy`- Tiny development log from today: using a Sentry span sampling function to drop spans that no one will ever look at so that we can keep the rest.
brandur.org/fragments/sent…- I assumed these Sentry spans were self-satisfied technical wankery on my part, but they really helped fix a perf bug that would've been hard to find.
See the ~80 ms gap in this pic — I wasn't sure what it was, but knew it was happening between auth check and remote service call.- Disk space critical, so reencoding videos to x265. Perplexed why one series wouldn't go < 1.5 GB/file. Turns out, assuming audio streams would be small, told ffmpeg to map them to out. Final artifact: 300 MB video + 1.2 GB audio.
Lesson: ffmpeg is hard. 1,000th time learning it.- One day we realized that both our major production systems only had one stateful dependency, and decided to see how long we could keep it that way.
Not strongly prescribed, but food for thought anyway — on single dependency (Postgres only) stacks:brandur.org/fragments/sing…- Email deliverability is hard, so double-posting here as well: published 031 about API reference docs.
A few stories about doing building them with JSON hyper-schema at Heroku, custom DSLs at Stripe, and now via Go's reflect/docs packages at Bridge.brandur.org/nanoglyphs/031…- My favorite character in Raised by Wolves is Ragnar Lothbrok.
- With every new G of cellular: more theoretical bandwidth, more alphabet soup, and higher prices. Meanwhile, reception and real world performance frozen in amber for ten years now.
Screencap taken the precise geographic center of San Francisco, which is on top of a big hill.- One of the less predictable casualties of San Francisco's lockdown-infinite policies is ... bicycling?
Contrary to the popular anti-tech narrative, it turns out that young tech workers were the only class of SF society who were willing to try alternative eco-friendly transport.- I am totally YOLOing all JS I write now: for ... of / const / IntersectionObserver / => / async / clipboard API / Map — all 95%+ support.
No build pipeline. Direct debugging. Only way to live. What's a polyfill again?- AirPods Max bought 2021/02/24. Sending them for one more warranty claim before the year horizon — claim no. 4.
Great looking headphones. Easily the shoddiest tech product I've ever owned. Like, black comedy level lol.Pic of warranty replacements no. 3 for two separate pairs.- We encode IDs as an in-house format called EID, which is 128 bits like UUID, but easy to select. We use ULID's time-based algo so they're ordered.
Few downsides except that the SQL enc/dec funcs are the most brutal computer code I've ever written lol.January
- One of my proudest automations — docs/API structure read from Go code → OpenAPI → Hugo-friendly Markdown → HTML, all pushed automatically via GitHub Actions.API ref is complete, but docs are human-written so they don't read like cold machine output.
- ffmpeg is an API that's coincidentally on the command line. Thus, Handbrake.
- (Mildly interesting —) Did a benchmark of ECDSA (EC
- We put a change into our Ruby code to treat UUIDs as 16-byte bytestrings instead of their normal string format.
- The alternate history reel at the beginning of seasons of "For All Mankind" is some of the best three minutes of TV all year.
- Having achieved its final form of TikTok-ification, my long-term gambit to never use Instagram has finally paid off.
- Updating a Rust project after a 1.5+ years, was relieved to find relatively few new errors/warnings, suggesting the language is stabilizing.