Amber Alert: Worse Than Nothing?

In the last few years, there’s been a lot of discussion about alerts in the circles I move in. There’s general agreement that a lot of tools don’t provide good alerting mechanisms, including problems such as unclear alerts, alerts that can’t be acted upon, and alerts that lack context. Yesterday and today at the Strata conference, my phone and lots of phones around me started blaring klaxon sounds. When I looked at my phone, I saw something like this (the screenshot is from a later update, but otherwise similar): I’ve seen alerts like this before, but they were alerts about severe weather events, such as tornado watches.

» Continue Reading (about 500 words)

Bloom Filters Made Easy

I mentioned Bloom Filters in my talk today at Strata. Afterwards, someone told me it was the first time he’d heard of Bloom Filters, so I thought I’d write a little explanation of what they are, what they do, and how they work. But then I found that Jason Davies already wrote a great article about it. Play with his live demo. I was able to get a false positive through luck in a few keystrokes: add alice, bob, and carol to the filter, then test the filter for candiceaklda.

» Continue Reading (about 200 words)

MySQL, SQL, NoSQL, Open Source And Beyond: a Google Tech Talk

I’ve been invited to give a Tech Talk at Google next Thursday, February 13th, from 11:00 to 12:30 Pacific time. Unfortunately the talk won’t be streamed live, nor is it open to the general public, but it will be recorded and hosted on YouTube afterwards. I’ve also been told that a small number of individuals might be allowed to attend from outside Google. If you would like me to try to get a guest pass for you, please tweet that to @xaprb.

» Continue Reading (about 300 words)

A simple rule for sane timestamps in MySQL

Do you store date or time values in MySQL? Would you like to know how to avoid many possible types of pain, most of which you cannot even begin to imagine until you experience them in really fun ways? Then this blog post is for you. Here is a complete set of rules for how you can avoid aforementioned pain: All date and time columns shall be INT UNSIGNED NOT NULL, and shall store a Unix timestamp in UTC.

» Continue Reading (about 100 words)

Generating Realistic Time Series Data

I am interested in compiling a list of techniques to generate fake time-series data that looks and behaves realistically. The goal is to make a mock API for developers to work against, without needing bulky sets of real data, which are annoying to deal with, especially as things change and new types of data are needed. To achieve this, I think several specific things need to be addressed: What common classes or categories of time-series data are there?

» Continue Reading (about 500 words)

Speaking at Percona Live

I’m excited to be speaking at the Percona Live MySQL Conference again this year. I’ll present two sessions: Developing MySQL Applications with Go and Knowing the Unknowable: Per-Query Metrics. The first is a walk-through of everything I’ve learned over the last 18 months writing large-scale MySQL-backed applications with Google’s Go language. The second is about using statistical techniques to find out things you can’t even measure, such as how much CPU a query really causes MySQL to use.

» Continue Reading (about 200 words)

On Crossfit and Safety

I’ve been a happy CrossFiter for a few years now. I met my co-founder and many friends in CrossFit Charlottesville, completely changed my level of fitness and many key indicators of health such as my hemoglobin A1C and vitamin D levels, am stronger than I’ve ever been, feel great, and now my wife does CrossFit too. It’s fantastic. It’s community, fun, health, fitness. It’s the antidote to the boring gyms I forced myself to go to for years and hated every minute.


But there is a fringe element in CrossFit, which unfortunately looks mainstream to some who don’t really have enough context to judge. From the outside, CrossFit can look almost cult-like. It’s easy to get an impression of people doing dangerous things with little caution or training. To hear people talk about it, everyone in CrossFit works out insanely until they vomit, pushing themselves until their muscles break down and vital organs go into failure modes.

» Continue Reading (about 2800 words)

How to Tune A Guitar (Or Any Instrument)

Do you know how to tune a guitar? I mean, do you really know how to tune a guitar?

Guitar Closeup

I’ve met very few people who do. Most people pick some notes, crank the tuners, play some chords, and endlessly fidget back and forth until they either get something that doesn’t sound awful to their ears, or they give up. I can’t recall ever seeing a professional musician look like a tuning pro on stage, either. This really ought to be embarrassing to someone who makes music for a career.

There’s a secret to tuning an instrument. Very few people seem to know it. It’s surprisingly simple, it isn’t at all what you might expect, and it makes it easy and quick to tune an instrument accurately without guesswork. However, even though it’s simple and logical, it is difficult and subtle at first, and requires training your ear. This is a neurological, physical, and mental process that takes some time and practice. It does not require “perfect pitch,” however.

In this blog post I’ll explain how it works. There’s a surprising amount of depth to it, which appeals to the nerd in me. If you’re looking for “the short version,” you won’t find it here, because I find the math, physics, and theory of tuning to be fascinating, and I want to share that and not just the quick how-to.

» Continue Reading (about 8700 words)

A review of Bose, Sony, and Sennheiser noise-cancelling headphones

I’ve used active noise-cancelling headphones for over ten years now, and have owned several pairs of Bose, one of Sony, and most recently a pair of Sennheiser headphones.

Sennheiser PXC 450 NoiseGard Active Noise-Canceling Headphones

The Sennheisers are my favorites. I thought I’d write down why I’ve gone through so many sets of cans and what I like and dislike about them.

» Continue Reading (about 1000 words)

Xaprb now uses Hugo

I’ve switched this blog from Wordpress to Hugo. If you see any broken links or other problems, let me know. I’ll re-enable comments and other features in the coming days. Why not Wordpress? I’ve used Wordpress since very early days, but I’ve had my fill of security problems, the need to worry about whether a database is up and available, backups, plugin compatibility problems, upgrades, and performance issues. In fact, while converting the content from Wordpress to Markdown, I found a half-dozen pages that had been hacked by some link-farm since around 2007.

» Continue Reading (about 500 words)

Immutability, MVCC, and garbage collection

Not too long ago I attended a talk about a database called Datomic. My overall impressions of Datomic were pretty negative, but this blog post isn’t about that. This is about one of the things the speaker referenced a lot: immutability and its benefits. I hope to illustrate, if only sketchily, why a lot of sophisticated databases are actually leaps and bounds beyond the simplistic design of such immutable databases. This is in direct contradiction to what proponents of Datomic-like systems would have you believe; they’d tell you that their immutable database implementations are advanced.

» Continue Reading (about 2200 words)

Early-access books: a double-edged sword

Many technical publishers offer some kind of “early access” to unfinished versions of books. Manning has MEAP, for example, and there’s even LeanPub which is centered on this idea. I’m not a fan of buying these, in most circumstances. Why not? Many authors never finish their books. A prominent example: Nathan Marz’s book on Big Data was supposed to be published in 2012; the date has been pushed back to March 2014 now.

» Continue Reading (about 500 words)

Napkin math: How much waste does Celestial Seasonings save?

I was idly reading the Celestial Seasonings box today while I made tea. Here’s the end flap: It seemed hard to believe that they really save 3.5 million pounds of waste just by not including that extra packaging, so I decided to do some back-of-the-napkin math. How much paper is in each package of non-Celestial-Seasonings tea? The little bag is about 2 inches by 2 inches, it’s two-sided, and there’s a tag, staple, and string.

» Continue Reading (about 400 words)

Staying Secure Online

This is a public service announcement. Many people I know are not taking important steps necessary to secure their online accounts and devices (computers, cellphones) against malicious people and software. It’s a matter of time before something seriously harmful happens to them. This article will urge you to use higher security than popular advice you’ll hear. It really, really, really is necessary to use strong measures to secure your digital life.

» Continue Reading (about 3100 words)

How is the MariaDB Knowledge Base licensed?

I clicked around for a few moments but didn’t immediately see a license mentioned for the MariaDB knowledgebase. As far as I know, the MySQL documentation is not licensed in a way that would allow copying or derivative works, but at least some of the MariaDB Knowledge Base seems to be pretty similar to the corresponding MySQL documentation. See for example LOAD DATA LOCAL INFILE: MariaDB, MySQL. Oracle’s MySQL documentation has a licensing notice that states: You may create a printed copy of this documentation solely for your own personal use.

» Continue Reading (about 300 words)

Props to the MySQL Community Team

Enough negativity sometimes gets slung around that it’s easy to forget how much good is going on. I want to give a public thumbs-up to the great job the MySQL community team, especially Morgan Tocker, is doing. I don’t remember ever having so much good interaction with this team, not even in the “good old days”: Advance notice of things they’re thinking about doing (deprecating, changing, adding, etc) Heads-up via private emails about news and upcoming things of interest (new features, upcoming announcements that aren’t public yet, etc) Solicitation of opinion on proposals that are being floated internally (do you use this feature, would it hurt you if we removed this option, do you care about this legacy behavior we’re thinking about sanitizing) I don’t know who or what has made this change happen, but it’s really welcome.

» Continue Reading (about 300 words)

S**t sales engineers say

Here’s a trip down memory lane. I was just cleaning out some stuff and I found some notes I took from a hilarious MySQL seminar a few years back. I won’t say when or where, to protect the guilty.[1] I found it so absurd that I had to write down what I was witnessing. Enough time has passed that we can probably all laugh about this now. Times and people have changed.

» Continue Reading (about 500 words)


I just tried out EXPLAIN UPDATE in MySQL 5.6 and found unexpected results. This query has no usable index: EXPLAIN UPDATE ... WHERE col1 = 9 AND col2 = 'something'\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: foo type: index possible_keys: NULL key: PRIMARY key_len: 55 ref: NULL rows: 51 Extra: Using where The EXPLAIN output makes it seem like a perfectly fine query, but it’s a full table scan.

» Continue Reading (about 200 words)

Freeing some Velocity videos

Following my previous post on Velocity videos, I had some private email conversations with good folks at O’Reilly, and a really nice in-person exchange with a top-level person as well. I was surprised to hear them encourage me to publish my videos online freely! I still believe that nothing substitutes for the experience of attending an O’Reilly conference in-person, but I’ll also be the first to admit that my talks are usually more conceptual and academic than practical, and designed to start a conversation rather than to tell you the Truth According To Baron.

» Continue Reading (about 200 words)

Looking for a freelancer

I’m looking for a freelancer to convert this WordPress blog into Markdown for use with Octopress. It should be straightforward – I have already used a plugin to export the data as Markdown. However, a few extra things will need to be taken care of. I have posted this job on Elance. Please submit proposals there!

» Continue Reading (about 100 words)