Hi, I'm Brandon Thomson. Welcome to my little corner of the Internet.

I'm gonna start with a serious topic, so brace yourself!

After studying the issue, I think the world in the coming decades will be increasingly affected by scarcity of critical resources like petroleum and fresh water. In this essay I'd like to focus on cars as a "jumping-off" point to help you begin or continue your own research on resource depletion. I'll also share an experiment I'm trying which you may find interesting.

Why would anyone research this?

I'm a computer engineer by training and a software developer by trade: obviously not an expert on resources or geology. But I am observing these trends in part because I suspect that I will be personally impacted by resource scarcity in the future, and I want to design my life in a way that can easily be sustained in a future where fewer resources are available for me to use.

My purpose in writing this essay is not to convince you of anything in particular. Convincing people is always very difficult and requires more effort than I am really willing to give to this task. Instead, this essay is aimed more at people who are already open to these ideas. Perhaps you simply have not yet researched the facts in enough depth to come to an understanding about what we are facing?

Speaking of facts, uncovering them can be quite a challenge. People do not always tell the whole truth and when I have looked for expert opinions, I have found there is not always consensus. When one person tells you that everything is fine and another person tells you there are major problems looming, who can you trust? I think that is a very important question.

When it comes to matters like these, there is a lot at stake. Many people have to choose their words very carefully or else they will put their position in life at risk. I am lucky: I do not have to be quite so careful.

Why focus on cars?

I have quite a bit to say about cars, and everyone is familiar with them, at least here in the USA.

But it's important to understand that cars are only a tiny subset of the actual problem. Arguably things like semi-trucks are a lot more important to consider. And so even if a miracle solved all our problems with cars tomorrow, that would only help a little bit with the overall problem of resource scarcity.

But every little bit counts. That's why I have taken the time to write this essay.

Why is car ownership falling?

Let's begin by looking at the trend in car ownership. You might be aware that since 2007, the number of American households without a car has been rising. There is an ongoing debate about the reasons for this. In some essays it is framed more as disinterest than economic difficulty: for some reason Millenials don't mind living in cities, and they don't need cars because they have smartphones and Uber and public transit! These claims are sometimes backed up by polls. But I ask you: if you can't afford a car and you're feeling stressed out about it, are you really going to want to admit that to a pollster?

Don't get me wrong, I think it is wonderful that people are finding alternatives to car ownership. It is something that needs to happen. But for those of us who are trying to understand the world and to predict the future, it is important to get the cause and effect right. And because it is well-documented that Millenials are facing an epic student debt load and greater wealth inequality than previous generations, I suspect that economic difficulty is a big part of this puzzle.

What does economic difficulty have to do with resource scarcity?

You might be aware that there was a drop in the percentage of people working that began around the year 2000 and accelerated after the "Great Recession". That drop has not reversed itself. Here is the chart, take a look for yourself:

I believe this change has occurred because there are fewer good jobs available today than there used to be.

Will good jobs return?

Some people speculate that this is all just part of a cycle, and that good jobs will eventually return. But others are warning us that as oil production peaks and starts to go into decline, it is likely to lead to prolonged economic recession: exactly the opposite of a jobs recovery. And indeed, Peak Oil is not part of a cycle: it is something entirely new and unprecedented.

The decline phase hasn't started yet: instead, global production has been pretty much flat since 2005. And oil is cheap right now, probably in part because fewer people are driving. But if our supply of oil does start to decline in the future, perhaps you can imagine what the effects might look like. Rising costs or recessions that never seem to end could put increasing pressure on people's economic lives going forward. And that pressure may not ease up for a long time.

So what? Who cares?

If you are a technology worker like me, then you are luckier than most. We tend to have better-than-average wages and job security. And so although it seems likely that cars will eventually be unavailable to us, too, for the present we are OK. Most of us will continue driving. In fact, it seems likely that other problems associated with resource scarcity will begin to directly impact most of us long before we experience trouble purchasing and driving automobiles.

But consider your peers: a lot of people really live at the edge as far as finances. They don't have a lot of "buffer" to deal with unexpected changes. So when used car prices rise quickly but their wages do not, what can they do? When they have difficulty finding a job at all, what can they do? Not everyone who experiences financial difficulty is going to be able or willing to relocate to a city where a car is less necessary. But even within cities, public transit is not always sufficient to get people to jobs.

Consider also the young. Here in the USA, children grow up in vast suburban and rural areas. And because cars and oil have been cheap for so long, the infrastructure there is very spread out. Thus, people who live in these areas but who are unable to own a car do not have a lot of options for employment or to obtain basic necessities like groceries.

When children living in these areas come of age, they will be faced with a choice: either relocate to a city, or learn how to live in an environment built for cars, without a car. I am betting that some will choose the latter. And it is largely for their benefit that I am sharing the following experiment here on my website:

My experiment: Bicycing in the suburbs

Over the last few years I've been learning to get by on the outskirts of the Northern Virginia suburbs without owning a car. Having grown up with ready access to vehicles, it's been quite a pain in the ass! But I've been doing it for four years now and I've learned a lot.

Owning a bicycle has been a helpful part of making the “car-free” thing work for me. Here, we have zero public transit. Nadda! Thus, without a car, you have three choices: walk, bicycle, taxi. The bicycle has opened up better choices for grocery shopping and allows me to reach a local farm and the post office.

Before I talk more about bicycling, let me make it clear that I am not a bicycling nerd: I am interested in the bicycle mostly as a tool to help me meet my survival needs, not in bicycling for its own sake. If I just wanted to have fun, there are much more fun things I would rather do with my time than ride and maintain a bicycle! In other words, I am very practically-minded when it comes to bicycling.

As I mentioned before, I live on the outskirts of the Northern Virginia suburbs and the infrastructure here is not set up very well for bicycling. It's doable, but the traffic is heavy and high-speed, the shoulders are small, and the signals sometimes ignore you. To get some idea, check out this video I recorded in 2013:

Bicycle ownership is not the perfect solution for all transportation needs. That's doubly true here in the US where things are spread out and bicycling infrastructure usually sucks. But if you're interested in learning more about using a bicycle for chores or commuting, I have prepared a separate essay including the useful things I've learned from bicycling in suburbia.

So check that out if you like, and consider reposting this content or sharing it! But here I am going to return to the subject of cars and resource scarcity.

Will there be abrupt changes?

History shows that difficulty with automobiles can sometimes increase abruptly for large numbers of people. In the past such events have been resolved relatively quickly, which is good. But when considering the possibilities for the future, I try to remember that the present situation is not like anything we have ever experienced before. I do think it is helpful to learn from historical events, so long as we remember that the overall situation now is not the same as things were then.

Hopefully we'll be able to avoid those kinds of shocks going forward because it is much harder to adapt to abrupt change. For example, you cannot realistically relocate to a city in a week because you're suddenly unable to buy fuel for your car.

Making effective changes in your lifestyle

When people discover Peak Oil or the problems that are related to it, they are often motivated to make changes in their lives. That is good, and it is necessary. But it is also important to make sure that you are really making improvements. Changes which are merely neutral or even detrimental are not helpful.

For example, if you get involved in "local food," that is good! But if you drive your car 25 extra miles each week to visit a "local farm", then it is quite possible you are consuming more fuel than if you had just continued to stop at a closer grocery store on your way home from work. So, that is an example of a possibly foolish change you could make.

I have made plenty of these kinds of mistakes myself. The problem here is taking action prematurely, before you really understand how the world works and what you are getting yourself into.

This is one reason why I do not promote a lot of random ideas on this website. Instead, I am talking about one idea: using a bicycle instead of a car. Of course, that is not the only change I have made in my life... not by a long shot! But I do not want to encourage people to do the things that I am doing which might turn out to be harmful, or too impractical, or that I do not yet fully understand.

Likewise, I want to make sure that if you take my suggestion and consider using a bicycle instead of a car to get around, that you understand as many of the implications of that as possible before you actually do anything. That way, you can avoid doing something foolish with the idea (like buying a bicycle that you will never use because it simply cannot work for you).

Will increased efficiency solve our energy problem?

Greater efficiency makes it at least theoretically possible to get better use out of a declining supply of oil. For example, if everyone's cars magically doubled in efficiency tomorrow, then twice as many people could drive consuming the same amount of oil as before.

I said theoretically because it's tricky: sometimes greater efficiency just leads to greater waste. Also, greater efficiency doesn't necessarily solve economic problems: if a person doesn't have a job so they can't afford to buy a car, then simply doubling the car's efficiency might not help them much. You'd have to make the car cheaper, too.

That said, compared to what they could be, our current cars are relatively fast, large, and bulky. In a certain way, that is good: it means incredible efficiency gains are available to people who can switch to lightweight vehicles. These are already in wide use in less affluent nations, but they are generally unsuitable for highway speeds and do not meet current US safety standards. So for now people here have to make do with things like mopeds which have different rules.

Motor vehicles are so useful that they will obviously still be used even if oil becomes very scarce and costs 10x or 50x what it does today. But they would have to become a lot slower and lighter, and the whole paradigm of using a car to commute to work would obviously break down for the average person at that point. Small motor vehicles would be used more in the way that draft animals have been used in the past: for farming tasks and to move heavy loads (possibly including people, but mostly larger numbers of people) shorter distances at slower speeds.

Would you recommend the car-free lifestyle to others?

Not necessarily. People's circumstances vary wildly. Some have children, others don't. Some can work online or locally, others cannot. There is value in conserving petroleum and being prepared for disruptive changes, but we also have to be realistic.

Still, I think it is wise for everyone to consider the possibilities and to have plans for what they could do if fuel suddenly became difficult to obtain. And regardless of your plans here, I am glad that you have read this essay. You now have a better understanding of the risks, and you know that living without a car in the American suburbs is a possibility. These ideas can now spread through you to others who will be able to make use of them.

Electric cars?

Clearly I can't conclude this essay without mentioning electric cars. Perhaps while reading you have been scolding me with this thought: oil is peaking, but we will all switch to electric cars and continue as before! I have left this until the end for a reason. Currently there's a lot of hype, but keep in mind that electric cars are not yet a proven technology at scale: we have no idea how many of the 255 million passenger vehicles in the US could be realistically replaced with electrics.

Interestingly, many current electric vehicles rely on government subsidies to be cost-competitive. That's not a good sign: it means they take more resources to produce than the oil-burning machines they replace. And although the auto industry likes these "high-end" vehicles because they are more profitable, it seems that what we really need are vehicles which are easier to afford for people experiencing economic difficulty.

Here in the US, our government is currently helping to keep the price of electric cars lower. But I'm not sure it's realistic to expect them to continue doing that indefinitely into the future: it looks like they may already be on shaky ground financially.

Oh, and if we do switch to electric cars, the pollution impact could be immense. That's because renewables will never provide more than a tiny portion of our energy needs, and we don't seem to be building new nuclear plants, either. That leaves coal to make up most of the slack. And in the US there is a lot of coal available to make extra electricity for electric cars, which could be seen as a good thing or a bad thing depending on how much you dislike pollution.

Personally, I'm much more interested in electric bicycles or quadracycles. If you can keep the vehicles slow and lightweight, their efficiency goes up by orders of magnitude. And low-speed vehicles are safer, too! But they aren't much fun in the rain, and a 50 mile commute at 15 mph isn't very realistic. So there are obvious limitations.

My Final Thought

In the greater picture, cars are a relatively small concern. Semi-trucks are more important. Food production is more important. Fresh water is more important. Life cannot possibly continue without these things. Just something to keep in mind as you proceed with your research on resource scarcity.

Thanks for reading,
Brandon

Comments & Contact

There are no comments on this site, but comments are enabled over on the Change Log (it's a blog with shorter posts and more informal writing). You can also email me at bt@brandonthomson.com.

I do my best to reply to questions and comments, but it usually takes me at least a few days to reply. If you send an email and do not receive a reply within 10 days, then it is possible that I did not receive your message. Here are some reasons why that may occur.

You can also find me at: Github, Youtube.

Bicycling Tips

Since you're reading this, I assume you might be curious about using a bicycle for chores or commuting. Here are a few things you might not be aware of:

Compared to a car, it takes more time and effort to get ready for bicycle trips. Particularly in the winter, careful attention must be paid to wardrobe. If there is a chance of rain or snow, you must consider that. You have to check your tire pressure. If you use clipless pedals, then you need to change shoes. You might have to mess with your cargo rack or your bags.

There is more to do at your destination. You have to lock up the bike (and that may not eliminate the risk of theft, depending on where you live). If you don't want your lights and accessories to get stolen, they have to be removed and brought with you. Detaching baskets or bags from your cargo rack takes some time. During the winter, you will want to remove much of your heavy winter clothing.

At first, all of this will seem like a great hassle. But do not assume that it will always seem like a great hassle. Give it time! If you bike regularly and develop habits, it is not bad. You will eventually start getting ready 10-20 minutes earlier than you would for a car trip, and everything will magically take care of itself as you go through your routine.

Unlike a car, it is very realistic to do all your own maintenance on your bicycle: one book will teach you pretty much everything you need to know. Depending on where you live, tools and replacement parts can be ordered online for delivery. If you lack a car, this fact makes bicycle ownership a much more realistic option in suburban/rural areas where you're not going to have a bike shop nearby for the inevitable repairs.

More advice for beginners:

That's what I know about bicycling!

Software

I earn my living through software development and I do most of my work in the Go language. I'm not sure Go is a great choice yet for people who want job security, but the language is excellent for building maintainable software and I highly recommend it if that is your primary concern.

Here are some of my open-source golang packages:

I still have a lot of Go code I use privately that needs to be cleaned up and released, so this section will surely grow over time.

HTTPS Support Available

This site is available over encrypted HTTPS. While HTTP access will always remain available, using HTTPS can help decrease the odds that this site has been modified by your ISP or by a malicious third party 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. I don't have full control over the servers this site is hosted on, though, so you should not rely on HTTPS to prove that this content was really authored by me (and not by a malicious third party).

Click here to reload this page over https.

Why You Should Have Your Own Domain Name (Permalink)

Every now and then you see a post on Reddit or Hacker News from someone who has lost access to their @gmail.com email account. The post then continues for a few paragraphs about the huge amount of grief this has caused this person.

Don’t let this be you. There are three simple steps you can take today to reduce the impact of events like this:

  1. Buy a domain name. You know, like brandonthomson.com. They cost about $10/year.
  2. Spend a few more bucks to get email service for the domain.
  3. Forward your old email to yourname@yourdomain.com. Start giving out your new address.

Done. All of this takes about 15 minutes, and puts you in much better shape than you were with your @gmail.com address.

I used to recommend that people use Google Apps for email on their domain because it was free, but as of 2014 it is no longer free. There are better choices and Google is no longer competitive on price or features. If you are a programmer, I also recommend looking for a service which supports Sieve scripts for easy and maintainable mail filtering.

Some people might wonder, isn’t it smarter to just use your ISP’s email service? Well, maybe. I would say yes only if the ISP lets you use you own domain. But if all you can get is an @comcast.net address, forget it.

It used to be that when an ISP provided an email account with internet access, they were providing a helpful service. But now that reliable email costs at most a few dollars per year, ISP email accounts have become a clever form of vendor lock-in. Think about it: Comcast certainly 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 will cause. Don’t be one of the millions who fall for this trick: get an @yourdomain.com email address and change ISPs at will.

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. The bottom line is this: if something is not hosted on your own domain name, you don’t really control it. You are like a serf serving on the fiefdom of a distant master, who may change the terms of your service at his whim. A domain name costs practically nothing and gives you so much more control over your web presence and your email that the only reasons people choose not to use them are either ignorance or severe laziness.

Well, we’ve solved the ignorance problem. Now you know! I can’t help you with the laziness, but I can suggest you take a couple of minutes today and get this stuff taken care of. It’s worth it!

Why You Should Use Rockbox (Permalink)

In the 21st century, a portable digital audio player (DAP) is one of the few good ways to stay informed about world events.

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.

Footnotes

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.

Dvorak, or Why I Learned to Love the Status Quo (Permalink)

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.

Single-Page Sites (Permalink)

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.

The solution is to use hybrid links: plan for incoming links to be normal URLs so the server can put the requested content at the top of the page. Use hash links in the served HTML for clients that don’t support Javascript, but replace them with normal URLs in Javascript for advanced clients so that “Copy Link Location” gets a proper inbound link instead of a hash link. Finally, use Javascript onclick handlers to do local navigation using hashes, but also replace the text in the location bar with an external URL using the HTML5 History API so that it has a correct external URL if it is copied.

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.

Computer Languages (Permalink)

These days I usually reach for Go whenever I need something more complex than can reasonably be done in sh. It is fast enough for almost every task, comes with a great 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.

In college Python was my favorite language. I liked the apparent simplicity and speed with which programs could be written. Go has now replaced Python as my first choice for all new projects. Why? Many short programs can be written more quickly in Python than in Go. However, I think Go “scales up” much better than Python does. Both for large programs and programs which will be maintained over long periods of time, Go is clearly superior. And since it’s hard to tell in advance whether any given program is going to remain small or grow over time, I find it’s easier to just write everything in Go from the beginning.

Python has a lot of perks 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.

I used to try to avoid shell scripts in favor of Go, but since I’ve started working more closely with FreeBSD I’ve come to appreciate shell scripting much more. When you’re working in the right kind of problem domain shell scripts can be much more readable and concise than Go code, and of course they are also several orders of magnitude smaller in file size. Often file size is more important than execution speed.

I know enough Haskell to keep my xmonad.hs up to date (read: not much). Haskell is fun to play with, but after puzzling over a few of ghc’s legendary 5-page error reports resulting from changing just a single character in my otherwise-working xmonad.hs file, I’ve decided not to use it for any serious work.

I use JavaScript because it’s mostly the only choice if you want to write web apps, but I’m not a big fan of the language. I am never excited to write JavaScript like I am to write Go. When I write webapps, I try to put as much of the logic as I can serverside (where I can use Go) and use Javascript for only trivial things.

Javascript is more tolerable if you can use ECMAScript 5 features. If you can’t (maybe for compatibility with old web browsers), Closure makes it bearable, sortof. Although Closure itself is very technically impressive, I find the end result is still a bit clunky because of the inherent complexity of what it does. Maybe Dart will be a better solution in the long term, but I’m not holding my breath.

Footnotes

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.

Can you connect LED strip lights to your computer PSU? (Permalink)

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 risk 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 would probably still violate electrical codes which specify a maximum power supply size for low-voltage lighting.

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. The power supply shut off with the fuse element still intact.

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 little experiment didn’t trigger the PSU’s short-circuit protection, but the voltage was disturbed enough to cause a reset.

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.

Footnotes

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.

My Internal Software (Permalink)

Lately I've been making an effort to publish more of my "internal" software. You know, the stuff that I wrote just for my use on my own box?

I'll admit I have mixed feelings about publishing this stuff. On the one hand, it seems like a crime that so many tens of thousands of lines of interesting code will disappear forever if I get hit by a bus or something, especially when it's so easy for me to post it online. On the other hand, I do like for there to be a certain minimum level of quality in software that I publish, and my own internal tools are often not up to snuff. I also recognize that much of what I write is hyper-specific to my own needs and will probably never be used by even a single other person, so there's no point in polluting the global hive mind with it.

Thus, while I'll never be one of those people who publishes every last bit of my code and configuration data, I think I should probably publish more of it than I have in the past. Without further ado, then, here are a few of my internal tools:

golang-scrollback-search — A terminal app that helps you search in a running command's scrollback. Particularly useful for servers which spew huge amounts of log data.

Thought Index

Academic

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:

Other Writing

I've given up on Blogger, but here are some notable posts from an old blog:

Project Graveyard

This gem is usually attributed to Leonardo da Vinci: “Art is never finished, only abandoned.” In that light, these projects were loved but are not currently being maintained.

Feedback

This site does not have a built-in commenting system (Why not?) but please let me know about any errors, omissions, or similar problems by email: bt@brandonthomson.com. You can also send me general feedback or comments. I enjoy receiving feedback by email and I look forward to hearing from you.

Atom Feed

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).

Email Problems

If you sent me an email and did not receive a reply within 10 days, my apologies. I usually reply to personal mail, so it seems that something has gone wrong. Here are the most common reasons this can happen, some with remediation steps:

License / Duplication

Feel free to duplicate and distribute any text or HTML content on this page for non-commercial (but see note below about podcasts) purposes according to the terms of the Creative Commons Attribution-NonCommercial 3.0 United States License.

As an exception to the non-commercial rule, this material can be freely read in any quantity on any podcast. Permission is granted regardless of whether the podcast or the associated websites contain advertising or involve commerce. This exclusion applies to audio formats only, so please be sure to remove the content from published text transcripts of your podcast unless you abide by the non-commercial rule.

If you post this content in text format on any domain that also contains commercial advertising or activity, I may consider that to be an infringing commercial use even if you do not personally receive revenue from the arrangement. In such cases I reserve the right to request takedowns if I deem it to be appropriate.

Small excerpts are usually considered fair use in commercial review, criticism, or commentary.

Links back to brandonthomson.com (We do https!) are always appreciated but not required.

Any doubts? Contact me. I enjoy learning where my content is being used, so don't hesitate to get in touch!

(By the way: I'm not a jerk, and it's extremely unlikely that I'll sue you even if you break these terms. But please try to follow them!)

Except where otherwise noted, all text content on this page is copyright 2010, 2011, 2012, 2013, 2014, 2015 Brandon Thomson. Creative Commons License