Aside from my contact info, a majority of the content on this site is about computing, computer programming, software, and the Internet. If you're not interested in these subjects you may not find much of interest here. The videos I post to YouTube are an exception; almost none of these are computer-related.
Send email to firstname.lastname@example.org.
A couple of things you should know:
If you sent a reasonable message and didn't receive a reply after more than a week, it's quite possible that I simply didn't see your message. I get a lot of junk mail, and sometimes an automated system goes amiss and I get thousands of emails which have to be deleted in bulk. As a result I often move through my inbox quickly, deleting messages in great batches all at once.
The point here is that I won't consider it rude if you resend a message that you think I might not have seen. Consider trying a different subject line the second time.
You can also leave a voice message at 1 (703) 596 2445 (this line is voice mail only). All voice mails are transcribed into my email box, so this method usually won't help you get a response faster. I get much less voice spam than email spam, though, so I tend to pay more attention to these messages when I see them.
I do not currently use any social media applications, so if you found a Brandon Thomson on one of these, it's either:
I do have a YouTube account, but I don't monitor comments there.
This site is available over encrypted HTTPS. While HTTP access will always remain available, using https can help decrease the odds that the site's code has been modified by your ISP before being delivered to your web browser. I'm not fully convinced that HTTPS as it's implemented in modern browsers is a good thing to promote, but in this case I have decided to enable it. Click here to reload over https.
xmonad LaTeX Erowid SuperMemo Solarized Click‑Stand mplayer2 Dungeon
Soup Rockbox PRISM‑Break Deshaker ZFS Newsbeuter FreeBSD DuckDuckGo chromium youtube‑dl Perfect
Diet mpd Closure
Guests vimus Remind Sabbath
Manifesto Vim Go EFF
I provide these links because I like these projects and want to promote them; I don't mean to imply that I am affiliated with any of them.
Legend has it that the standard QWERTY keyboard layout we all know and love was designed to slow typists down so they wouldn’t jam up the keys on old typewriters with long levers. True? Who knows. In the modern era we have an alternative in the Dvorak layout, developed in 1936 by a guy named (you guessed it) Dvorak. Supposedly he studied common English texts and assigned letters proper positions based on their frequency, thus saving us all many many miles of finger travel, if only we would use it.
Sounds reasonable, right? I certainly thought so.
I used a Dvorak keyboard layout for more than seven years. It was fun and liberating in the beginning. Not only was there the sense that I was cooler than everyone else, but I invariably got to enjoy a humorous little moment whenever someone tried to type something on my machine (alternate keyboard layouts are very rare in this country and almost always elict profound confusion). “Having a little trouble there? Oh, ha ha, let me help you with that.” That was always entertaining.
Truth is, though, I never typed any faster with Dvorak. I’ve always been around a 60wpm typist when I’m trying, and it was generally the same after a month or two of full-time Dvorak use.
The biggest difference with Dvorak was how comfortable it was for normal English sentences. It’s hard to explain how a keyboard could be more “comfortable” to someone who’s never tried an alternative layout, but basically there’s less stress on your fingers because they don’t have to move as far. Typing feels very fluid with Dvorak; QWERTY is just frenetic by comparison.
You’re probably wondering why I switched back after seven years. It’s true that it was annoying to need to learn how to change a keyboard layout every time I used a new operating system (Windows, Mac Classic, Mac OS X, FreeBSD, Linux, I knew how to do it everywhere), but it was certainly doable.
But no, the real problem is that if you do not control the machine, you cannot change the layout.
Back when I was attending a university I was embarrassed to look like a computer novice in front of the other students whenever I needed to use a public terminal. I had to revert to hunt-and-peck because the keyboard layout was not changeable (and for good reason, I suppose). I don’t much mind looking stupid, but it does get old explaining to people why you cannot in fact type on a standard keyboard.
The issue became more serious when I needed to use locked-down Windows and Solaris systems to take exams. Typing speed was essential and it just wasn’t possible for a mere user to change the keyboard layout. You could say the school deserves blame for failing to allow this, but didn’t I deserve more blame for being a weirdo? Anyone who considers using Dvorak should know that any time you take a computerized test like the GRE, you can bet you won’t be able to change the layout.
The other big problem with Dvorak is that programming languages and keyboard shortcuts are almost invariably designed around a QWERTY layout. Ctrl-C and Ctrl-V? Not exactly convenient in a Dvorak layout. Linux commands like ‘ls’ which are easy to type in QWERTY are more painful in Dvorak. These things are more important and annoying than you might imagine unless you have used Dvorak for a long time. It also wasn’t uncommon to find software, especially full-screen games, which ignored the system keyboard layout and assumed I wanted QWERTY. Flash games that used the keyboard were usually pretty awful too.
I wasn’t a Vim user at the time, but I doubt Vim with Dvorak is as nice as Vim with QWERTY. Sure, some users have written little hacks that change the keys around to make it more usable, but I bet there are plugin incompatibilities, problems, and stupid annoyances that come because it’s just not a popular configuration.
I loved Dvorak for all its merits, but I’ve also learned the value of adhering to a flawed standard. I suspect I won’t be switching back.
Give feedback on 'Dvorak, or Why I Learned to Love the Status Quo'
Read more thoughts like this one
I didn't have much reason to record videos until I started riding a bicycle regularly. After regretting not having a camera on several rides, I now make sure I have at least one with me every time I go out. So, here you'll mostly find interesting highlights from those cycling videos.
Timelapse Bicycle Ride into Sunrise — Riding into the early morning sun US Route 29 North (and south, later in the video). Please check out http://bthomson.com/yt for more cool videos! Riding a b [...]
Time-lapse Bicycle Ride US 29 South in Gainesville — Bicycle ride South on US 29 in Gainesville, Virginia. Cloudy, early morning, summer 2013. 3x speed. Please check out http://bthomson.com/yt for more cool vid [...]
Sunrise Time-lapse Bicycle Ride — This is Linton Hall Road in Gainesville, Virginia. Please check out http://bthomson.com/yt for more cool videos! Video was taken with a head-mounted camera a [...]
Crazy Aquarium Fish 5 — Please check out http://bthomson.com/yt for more cool videos!
Crazy Aquarium Fish 3 — Please check out http://bthomson.com/yt for more cool videos!
Crazy Aquarium Fish 2 — Please check out http://bthomson.com/yt for more cool videos!
Crazy Aquarium Fish 1 — Please check out http://bthomson.com/yt for more cool videos!
Bicycle High Beam Demo — The bicycle high beam is a 400 lumen Fenix flashlight mounted to my head. A wire runs from the flashlight to a squeeze-activated switch, which I hold on my h [...]
Lost My Blinky in the Road — My first ride with a new amber blinky light. As you will see, I hadn't secured it well enough. Luckily it fell off in a fairly safe place, and I got a funny [...]
Close Pass by Semi Truck — This 4-lane road has a 55mph speed limit. I've learned to avoid riding in the shoulder along roads like these: it encourages drivers to pass me in the right [...]
Crazy Deer Tries To Keep Up With Car — This fawn was with its mother next to the road, but took off running parallel to us as we passed. Shot in Skyline Drive, Virginia. Please check out http://bt [...]
Cycling on Linton Hall Road — Highlights from an early morning ride along Linton Hall Road in Virginia. Please check out http://bthomson.com/yt for more cool videos!
Deer on Roadside — Coming down a hill on a bicycle when I saw this deer near the right side of the road. Sorry about the grainy video; this was early morning twilight and I did [...]
Crazy Twirling Fish — One day this fish started whirling around constantly, crashing into other fish and even the aquarium bed. He has some difficulty eating but otherwise seems O [...]
Motorist shouts "You're Dedicated!" at Bicyclist — While cycling at 3am, a driver informs me that I'm dedicated. (The right lane becomes right-turn-only in 300ft, in case you're wondering why I'm in the middl [...]
FedEx Truck Runs Red Light — In Virginia, a right turn on red is legal only after stopping.
Motorist Honking at Bicyclist — There is an entire empty lane between me and this motorist, but for some reason he honks repeatedly while passing. This is unnecessary and dangerous. One sho [...]
These are the same projects listed above, but in long format (for search engines and people who don't like HTML trickery):
I provide these links because I like these projects and want to promote them; I don't mean to imply that I am affiliated with any of them. Although some of these are commercial ventures, no consideration of any kind was provided in exchange for the links.
My favorite part of college, besides learning about Unix, was getting to use LaTeX and all the neat packages like PGF/TikZ. For whatever reason I enjoyed that a lot more than the actual content of all the assignments and papers I worked on.
Some selected work:
Every now and then you see a post on Reddit or Hacker News about how someone has lost access to their @gmail.com account. The post continues for a few paragraphs about the grief this has caused them.
There are four simple steps you can take today to reduce the impact of events like this:
All of this takes about 15 minutes and puts you in much better shape than you were with an @gmail.com address. If your Google Apps account is disabled, you will at least have offline access to your email. Recovering access to your incoming mail will be a bit of a pain, but at least you can do it. You can run your own mail server or even point your domain at a service like mailinator temporarily while you’re working on a permanent solution.
Why gmail? Isn’t it smarter to just use your ISP’s email service?
It used to be that when an ISP provided an email account with internet access they were providing a helpful service. But now that free, reliable email accounts are widely available ISP email accounts simply serve as yet another clever form of vendor lock-in. Comcast knows that if you have an @comcast.net email address you’re going to be less likely to switch to Verizon because of the additional headache it causes.
Unfortunately millions of people fall for this trick.
So far I’ve only talked about email, but all the same ideas apply to web services. You want to put as much of your content as you can on yourname.com, not yourname.blogspot.com or yourname.wordpress.org or facebook.com/yourname. It will save you a ton of headache when something goes wrong with one of these services and you have to migrate to an alternative.
A domain name is only $10 a year and gives you so much more control over your web presence and your email that the only reason people choose not to use them has to be out of ignorance or severe laziness.
Take a couple of minutes and get this stuff taken care of. It’s worth it.
Give feedback on 'Why You Must Have Your Own Domain Name'
View Thought Index
It seems like it wouldn’t be too hard to create a p2p system similar to bitcoin which could be used to verify that copyright over some material was registered by a certain party at a certain date and time. It could store hashes only and charge a small fee in bitcoins per registration to prevent spam/pay node operators for their costs. Verifying assertions could have a smaller fee.
I don’t think hash collisions would be a big deal if you used a SHA of sufficient length for the input and made a rule that all submissions must have a declared format and be plainly readable to prevent people from claiming the hash actually references some garbage collision input they created.
I think courts could be convinced that such a system is trustable; harder would be getting enough people to run the software and then convincing content creators to register their works before publishing them so malicious parties couldn’t do it post-hoc.
EDIT: After this was published I noticed someone else had a similar idea, but they wanted to insert the hash directly into bitcoin’s blockchain. If it’s possible, that’s probably more clever because you leverage the already-existing bitcoin client infrastructure.
Give feedback on 'P2P Copyright Registration'
View Thought Index
I waste a lot of time mucking about with various software systems, so I feel entitled to a short rant about programming languages.
These days I usually reach for Go whenever I need something more complex than a few lines of sh. It is fast enough for most tasks, comes with a good standard library, and has an engineering-oriented design philosophy (in other words, it is concerned almost entirely with practical matters for programmers and is of very little interest to academics).
Unlike many other languages, Go’s feature set is intentionally kept rather limited. This sometimes annoys those of us who like to geek out with language features, but also limits Go’s bloat, keeps its compilers fast, and reduces its learning curve.
This site is served by Appengine Go.
Go has replaced Python as my first-choice language for all new projects. Python was great, and has a lot of features I miss in Go. List comprehensions are probably numero uno, followed by autocompletion in the REPL when parsing XML files or working with unfamiliar APIs1.
Many short programs can be written more quickly in Python than in Go. However, I think Go “scales up” much better than Python does. And since it’s hard to tell in advance whether any given program is going to remain a small program or grow over time to thousands of lines, it’s easier to just write everything in Go.
I really try to avoid shell scripts for anything that is more complicated than “launch a bunch of programs” or “launch a program with these arguments.” I almost always regret it when I break this rule and end up with a shell script with logic or control flow. However, I have found that launching short shell scripts from large Go programs can be very convenient. For example, zsh’s advanced globbing can be very convenient to get a list of files which can be passed back to Go for further processing. In this way can take advantage of the shell’s conciseness without sacrificing Go’s explicit error handling.
I know enough Haskell to keep my xmonad.hs up to date (read: not much). Haskell is fun to play with, but you really haven’t lived until you’ve tried to decipher one of ghc’s legendary 5-page error reports resulting from changing a single character in an otherwise-working compile. Haskell is cute, but I am hesitant to use it for serious work (not to imply that one cannot use such a language for serious work, just that I’m not interested in doing so).
I admit to using Makefiles for lots of weird things, not just builds. Make is great if you stick to the simple parts. It makes it easy to run complex data transform processes on a filesystem in parallel.
Give feedback on 'Computer Languages'
1. I suspect we'll have similar functionality for Go eventually. Some folks have made promising progress with a edit-compile-run loop which can be almost as fast as a REPL for small programs.
View Thought Index
In the 21st century, a portable digital audio player (hereafter: DAP) is more or less a requirement if you want to stay informed about world events. These devices make it practical to learn during short downtimes like walking to the car, riding in an elevator, or heating up your dinner. They can also be used for extended listening.
Many people use their cell phone as an audio player. I prefer not to carry a cell phone when all I need is an audio player, because:
These drawbacks can be solved (or at least made less severe) by simply using a dedicated DAP instead.
Once you’ve decided to get a dedicated DAP, you’ll want to learn about Rockbox, a custom firmware which can be loaded onto a variety of DAP devices. Rockbox adds a ton of features to each device, and, perhaps more importantly only needs to be learned once. After you’ve learned the interface, switching to a new DAP model will not require any re-learning because it will still be the same old Rockbox.
Before you can decide which DAP to buy you’ll want to look at the list of supported devices. The ideal player is supported by Rockbox, has an SDHC/SDXC-compatible card slot for future storage upgrades (some players which only support SD in the stock firmware support SDHC in Rockbox), and uses standard AA or AAA rechargeable cells1. An old-school monochrome reflective LCD display should be preferred since it can be read in most conditions without wasting the energy for a backlight. Display resolution is relatively unimportant because Rockbox can be configured to use tiny fonts so that you can get a lot of mileage out of a few pixels; commercial audio players often use gigantic non-configurable fonts which make it annoying to navigate.
Commercial interests would prefer that you buy a new portable audio player every couple of years but there’s no good reason to do so as the technology has been more or less perfected at this point. It would be better for everyone if we could step off the hype train for a minute and start building hardware to last for the long haul (instead of planning in advance to send it to the landfill every 24-36 months), but I digress.
Factors besides these aren’t nearly as important.
Unfortunately as of early 2012 I think you can only find any 2 out of 3 of these features in new products (some discontinued models have all 3, but you’d have to buy one used).
Widely available dual portable charger/power-sources which accept AA cells and output regulated USB 5V may help you get more life out of an old player with a dying custom-fit lithium ion battery (don’t buy a “new” battery since you’re likely to get old stock that’s been sitting on a shelf for years). You may even be able to remove the internal battery and run the player directly from the external power source to help avoid charging losses. These devices can be had for less than $20 although finding a quality one can be challenging. Apparently short circuits and melting are not unheard of.
If your player lives on a shelf, efficient switch-mode power supplies with a USB connector are pretty cheap these days and handy because they are compatible with lots of devices. Be careful, though: more cheap junk than ever is being sold online and you should always verify UL certification on anything plugged into your mains if you want to avoid nasty surprises.
Give feedback on 'Why You Should Use Rockbox'
1. Replaceable, standardized batteries have many advantages over custom-fit lithium ions. For one, you can carry a spare set and replace them in order to return the device to full charge instantly. For another, they can be cheaply replaced at end-of-life without needing to replace the player. The "gumstick" battery size is more space-efficient than AAA or AA due to its square shape, but is also less common and probably not desirable for that reason. Unfortunately, standard batteries are typically larger and heavier than custom-fit lithium ions of equivalent capacity.
View Thought Index
In an era where many (most?) people have broadband and high-speed high-latency satellite Internet is becoming more common, I’m not sure it makes sense for small personal sites like this one to have multiple “pages” anymore. Browser vendors are gradually hacking around the inefficiencies of the HTTP protocol with prefetching and pipelining, but while we’re waiting, this site aims to be as fast as possible without sacrificing usability or backwards-compatibility.
Serving all your content as a single HTML file has some interesting advantages. For starters, anyone who wants an offline copy of the entire site can create one instantly using the “Save as…” feature in every browser. Modern browsers and computers can handle enormous HTML documents (especially when no complex style rules are used), so document size isn’t a big issue.
Another benefit: content is more “discoverable” than on a traditional multi-page site since users can just scroll down to find it all rather than having to step through a hierarchy of links. Of course we still have links here, but they mostly scroll the page or go offsite. Zero-latency local link handling should be refreshing for satellite Internet users! Want to search for something? Forget about Google, Ctrl-F is all you need.
Getting the links right is a little tricky. If you want users to see the content they expect quickly, inbound hash links are a no-no. An inbound hash link to content half way down the page requires people to wait for a mountain of content they don’t care about to finish loading before they can see what they were interested in, a situation that is especially problematic for dial-up users.
The URL hash isn’t sent to the server so there’s no way to rearrange desired content to the top if you rely on inbound hash links, either.
I know, it’s a bit confusing and I didn’t do a great job of explaining it. But if you look at the HTML source of this site and observe how the links behave it should be pretty easy to figure out what’s going on.
This solution works pretty well. Browsers pre-emptively render while content is streaming so low-bandwidth users who load the site without a fragment link still see what they were expecting quickly even though the total content size is very large. If they leave before the whole site is finished loading, oh well, no harm done.
Mobile browsers are another issue entirely: users of such browsers often have small bandwidth caps and would probably appreciate having their bandwidth conserved. I never use such devices so I admit being a bit biased against them.
There are some disadvantages, to be sure: non-technical people won’t necessarily understand what permalink means and can inadvertently share links that load the wrong part of your page. Technical users usually get the idea but can get confused at first since the technique is uncommon.
If you care about “SEO” or are trying to maximize ad revenue you obviously shouldn’t touch this technique with a ten-foot pole. But those sorts of sites usually aren’t all that user-friendly anyway. We’re trying to maximize user-friendliness here.
I’m not sure whether or how much search engines punish sites that design pages this way. I know they must have some way of dealing with duplicate content on multiple pages because most of the popular blogging software replicates content onto a home page, category pages, etc. It’d be nice if there was some standard to tell them, “Hey, ignore this content on this page,” but I’m not aware of any such standard.
Anyway, I’ll keep an eye on it and update this section if I get more data.
Anyway, those are some of the reasons this site has been constructed as a single “page.” If you’re a technical person thinking about setting up a site I recommend giving it a try.
Give feedback on 'Single-Page Sites'
View Thought Index
Got a 12v LED light strip? Wondering if you can hook that up to your computer? Doing so almost certainly violates some electrical codes and also good common sense, but yes, it will technically work. It’s also pretty damn convenient for, say, putting bias lighting behind or around your monitor since it will always turn on and off with the computer and you needn’t ever bother with a switch1.
The real thing you want to avoid here is accidentally starting a fire. Unfortunately, it’s possible: a not-quite-ground fault which develops in the led strip or wiring which has high enough resistance to avoid triggering the PSU’s short-circuit and over-current protection but low enough resistance to draw, say, 20 amps of current could do it. Computer PSUs are powerful enough to supply that much current continuously (unlike your average wall wart) and risk of fire is a reality.
You could mitigate against that situation by adding a small inline fuse, automotive or glass-tube-style2. Anywhere from 250ma to 3A seems reasonable depending on how many LEDs you want. This would reduce the level of risk to something I’d consider reasonable but probably still violates electrical codes which specify a maximum PSU size for low-voltage lighting. So, don’t invite your local fire marshal in to examine your handiwork.
Once the risk of fire is reduced the next question is, what happens to the voltage on the 12v rail when there is a short behind the fuse? Does it drop far enough to crash the PC (or trigger the PSU’s short-circuit protection and shut the whole thing off)?
The ATX spec says power supplies should shut off very quickly when a load of less than 0.1 ohm is detected (if you have a cheap one I suppose it might smoke instead!) I decided to test my 450W FSP Group PSU to see what would happen.
The 2A fuse I tested had a cold resistance rating of 0.055 ohm, meaning we’d expect that when the fuse is used to short 12v and ground the PSU will shut off, probably before blowing the fuse. Indeed, that was the case.
Soft power on was not functional after the PSU’s short-detection triggered. To get it to turn on again, I had to use the hard switch to disconnect power for a while.
For the next test, to get the resistance above 0.1 ohms I added a few 1 ohm resistors I had lying around inline with the fuse.
This time the fuse blew with a bright flash. I looked at the computer screen to see that it had rebooted, but the PSU was still running. Apparently this didn’t trigger the PSU’s short-circuit protection but the voltage did drop off long enough to cause a reset.
Most probably the instantaneous current was too high for the PSU to cope with and still maintain regulated output.
That’s somewhat of a bummer because it means there’s a good chance your PC will reset if you accidentally short your LED string, even with a tiny fuse in there to boost the short resistance a bit. But then, if that’s happening to you more often than once a decade you’re probably doing something wrong.
In any case I’d strongly recommend against using a PWM dimmer with this setup. Good PSUs/motherboards can probably cope with the additional high frequency noise but it certainly isn’t going to do the components any good.
Give feedback on 'Can you connect LED strip lights to your computer PSU?'
1. Another way to accomplish this same goal is to hook a current sensor up to a relay which controls the supply side of a separate power supply for your LEDs. The current sensor detects when the computer PSU is not drawing much current (because, say, the PC is off) and switches off the relay. This disadvantages of this technique are that it wastes some power, requires additional expensive components, is less reliable, and has to deal with mains voltage making DIY treacherous and inadvisable. The main advantage is you can buy off-the-shelf kits that do it: I have an APC UPS with this feature built in, and similar surge protectors are available. A second advantage is that you don't have to worry about disrupting the computer if there is a short in your light strip since it has its own independent voltage source.
2. You could consider using resettable fuses in place of regular ones like most USB ports do, but I think they're a bit more challenging to mount inline on a wire run. I suppose you could solder wires directly to the leads rather than using a fuse holder since it shouldn't need to be replaced. Keep in mind that your PSU may also be able to source more current on the 12v rail than a given resettable fuse is rated to interrupt, so consider all the numbers carefully if you go that route.
View Thought Index
After some pain getting xmonad installed as my default WM on 11.10 last year, for 12.04 Precise I decided to try a different method. This time I started with Ubuntu Server and installed only the Xorg package without bringing in all the gnome dependencies. No lightdm either; I log in to a text console which automatically starts X (detailed instructions). I like it because it’s simple and easy to understand.
It works quite nicely. The only tricky part is to make sure you manually add your user to the “video” and “audio” groups, otherwise you will end up with software 3d only and no pulseaudio/alsa. Desktop does that by default, server won’t. The Ubuntu wiki says not to add your user to the audio group, but it worked great for me.
(I never do dist-upgrades to upgrade Ubuntu in place; always a clean install. They’ve caused too many subtle issues over the years. And why bother when reinstalling is so easy.)
Reinstall time is a good moment to secure erase the SSD, which might improve performance over upgrading in place depending on how much you’ve been using it.
Give feedback on 'Trimming the fat with Ubuntu Server'
View Thought Index
I've given up on Blogger, but here are some notable posts from an old blog:
This site does not have a built-in commenting system but please let me know about any errors, omissions, or similar problems by email: email@example.com. By default I assume that people who send corrections want to be credited, so please mention if you do not want the name associated with your email to appear on this site (your email address will not be displayed publicly).
Most content on this page is also available through an atom feed. Sorry, no RSS.
Unlike a typical blog, here I frequently update old content to reflect my latest thinking. My goal is not to have any articles on the site that contain outdated information or that I no longer agree with.
Unfortunately, this style of publishing creates a slight impedance mismatch with typical feed semantics. So, here is how this feed works:
I don't always make new posts on a consistent basis. Even if new items don't appear here for a year or two, that doesn't necessarily mean I've abandoned the feed or never plan to post here again. I might just be taking a break.
This feed was only tested in newsbeuter, so please let me know if you run into any problems with your particular client.
Finally, this feed will always contain *all* the items *currently* published on this site (not just the n most recent items, and also not necessarily all the items that have ever been published).
This content is copyright 2010, 2011, 2012, 2013 Brandon Thomson. Feel free to duplicate and distribute for non-commercial purposes according to the terms of the Creative Commons Attribution-NonCommercial 3.0 United States License. Please use this content responsibly. Small excerpts are usually considered fair use in commercial review, criticism, or commentary. Links back to www.brandonthomson.com are always appreciated and never required. Thanks :)