New
The latest blog posts to take off on Hacker News. 2,330 posts.
A Not-Called Function Can Cause a 5X Slowdown
Subtitle: Making Windows Slower Part 3: Process Destruction In the summer of 2017 I wrestled with a Windows performance problem. Process destruction was slow, serialized, and was blocking the syste…
Teensy 3.1 bare metal: Writing a USB driver (2014)
Electronics, Embedded Systems, and Software are my breakfast, lunch, and dinner.
How I Wrote a Modern C++ Library in Rust
Since version 56, Firefox has had a new character encoding conversion library called encoding_rs. It is written in Rust and replaced the old C++ character encoding conversion library called uconv that dated from early 1999. Initially, all the callers of the character encoding conversion library were C++ code, so the…
Developer on Call
For the system at work, I am on call one week every seven weeks. For most of the past ten years, I have been on organized on call rotations for the systems I have been developing. I think being on …
Pointers in C (2010)
This document comes with a companion example program, available as one file or as multiple files (zipped) .
How Does React Tell a Class from a Function?
We talk about classes, new, instanceof, prototype chains, and API design.
Designing and building an FPGA sprite-based graphics accelerator (2014)
A very warm welcome to my most ambitious project to date. In this project I’m going to attempt to design and build a sprite-based graphics accelerator that will function as a co-processor to an MCU. Using cheap off-the-shelf components I’m hoping to achieve a level of gaming performance that compares well to popular…
Algebras we love
If you work with anything that can be modeled mathematically, you most likely know that many things you work on can be expressed with algebras. However, if you are not a graduate of a computer science course or similar you might not know how ubiquitous they are and how often you rely on some of them. (And I don’t mean…
Emulate Mac OS 9 with QEMU
(Updated Dec 11, 2018)
How Google Code Search Worked: Regex Matching with a Trigram Index (2012)
In the summer of 2006, I was lucky enough to be an intern at Google. At the time, Google had an internal tool called gsearch that acted as if it ran grep over all the files in the Google source tree and printed the results. Of course, that implementation would be fairly slow, so what gsearch actually did was talk to a…
A Programmer's Introduction to Mathematics
For the last four years I’ve been working on a book for programmers who want to learn mathematics. It’s finally done, and you can buy it today. The website for the book is pimbook.org, which has purchase links—paperback and ebook—and a preview of the first pages. You can see more snippets later in the book on the…
The Second Edition of “Refactoring”
I'm finishing a new edition of my Refactoring book. Here's details and periodic memos about my work.
The deepest problem with deep learning
Some reflections on an accidental Twitterstorm, the future of AI and deep learning, and what happens when you confuse a schoolbus with a…
The Making Of Dust (2003)
For a long while Dust was the world's most-played Counter-Strike map and it's still the one for which I am best known. Yet few players realise it was the product of thievery and luck...
Maximizing password manager attack surface
Kaspersky Password Manager uses a unique approach to maximize the attack surface. A quick introduction.
Portability of tar features
The tar format is one of the oldest archive formats in use. It comes as no surprise that it is ugly — built as layers of hacks on the older format versions to overcome their limitations. However, given the POSIX standarization in late 80s and the popularity of GNU tar, you would expect the interoperability problems to…
Starting a Business in Silicon Valley
A Personal Story (This is the text of an essay I read in a presentation at African Leadership University in Mauritius. Please see the video of that presentation here. For the other lectures from that trip, please see this playlist.) When it comes to starting a business, Silicon Valley is...
UTF-7: a ghost from the time before UTF-8
On Halloween this year I learned two scary things. The first is that a young toddler can go trick-or-treating in your apartment building and acquire a huge amount of candy. When they are this young they have no interest in the candy itself, so you are left having to eat it all yourself.
How to design co-programs
I recently attended the Matthias Felleisen Half-Time Show, a symposium held in Boston on 3rd November in celebration of Matthias’s 60th birthday. I was honoured to be able to give a talk ther…
De-facto closed source: the case for understandable software
For someone who has been a strong supporter of FOSS for a very long time, watching what has been happening to the various FOSS communities over the past half decade or so is kind of depressing (with some exceptions, of course).