(Bones clearly doesn't appreciate it!) Evil Spock has to Stop Bones' brain,Read out what he wants to know, andUnlock Bones' brain, so he can breathe. Of course, this is Evil Spock, so he may not care if Bones breathes or not. Rob Pike has a better way Rob wrote, "don't share memory to communicate, share… Continue reading Don’t Share Memory!
Author: David Collier-Brown
Measurement Heisenbugs
One of my smarter colleagues once said "your metrics are making the program impossibly slow. Turn some off" Introduction I initially thought he was quoting the line from Amadeus, where the Emperor tells Mozart there are too many notes in his music, and to take some out. In fact, he was diagnosing a bug that… Continue reading Measurement Heisenbugs
Your Network is Congested, Part I
Your network is like a python with a fairness problem, If one person is watching a big video, all the little flows can be ignored. The Problem Much of the time the data that flows over your home network is “mice”. Little bits of data from emails or web pages, slack or zoom. Sometimes, though,… Continue reading Your Network is Congested, Part I
Maps and an Old Book
I happen to have a 1984 copy of Ron Brown's "Backroads of Ontario", and Joyce and I went for a drive today, following the Great Pine Ridge west from Yonge Street There is a later version of the book, from 2019, but that's not what I'm writing about: I discovered something I should have guessed.… Continue reading Maps and an Old Book
Cannot and Should Not
In computer science, if someone says "you should not write code with deadlocks", we try to make it impossible. For example, by putting C. A. R. Hoare's "communicating sequential processes" into Go. If we can't do that, we invent "best practices" and "patterns" to help provide a language-structured guide us around pitfalls. We have the… Continue reading Cannot and Should Not
Are the Newspapers Barking Mad?
"It's obvious links aren't taxable, they're only citations. Why do otherwise sane newspapermen want Google and Facebook to pay the papers for links? After all, links bring readers to the papers, exactly as many others have pointed out." I considered the newspapers a bunch of dinosaurs, but then in a podcast, Scott Galloway[1] made an… Continue reading Are the Newspapers Barking Mad?
Literate Programming in Go
I've used literate programming before, especially for hard tasks like squeezing in the code and character tables of Canadian French, which includes accented capital letters. Into an x86 bios ROM of strictly limited size! Literate Programming was invented by Donald Knuth for hard tasks, like writing an entire typesetting program in Java. What I hadn't… Continue reading Literate Programming in Go
Measuring Apples and Oranges
Sometimes you really do have to measure two very different things. Recently I needed to compare an old batch program with a new Golang one, to see how much we’d improved. Introduction The problem sounded simple, but the batch program was multi-process, while the go program was multi-threaded. Hundreds of batch children would come into… Continue reading Measuring Apples and Oranges
Section 230, Facebook and Newspapers
I suspect we need to hold the social media companies responsible for their decisions, not the postings of their readers. If it were a traditional newspaper, Facebook would be responsible for what it chose to write on its front page and what it stuck on page 9. Similarly, it would be responsible for what ads… Continue reading Section 230, Facebook and Newspapers
Time Budgeting
If you're concerned about the performance of your code, there is a classic performance-engineer's approach to managing risk, called a "time budget". If you're inside your budget, you can do capacity planning to get enough CPU and memory resources, at some price. But if you aren't, throwing money and developer time at a fuzzy performance… Continue reading Time Budgeting