Coding Horror

programming and human factors

Updating Your Utility Belt

I just updated my utility belt.

Batman Utility Belt

Well, metaphorically speaking – every self-respecting geek has one.

Lately I've been trying to minimize what I carry around even further. After having children I've come to appreciate the value of less stuff in my life. So here's my everyday carry in 2013:

Keychain-edc-2013

Compared to my 2011 everyday carry, I have managed to reduce in size almost everything on it:

I have no idea why I was using a size #1 S-Biner for so long when the smaller size #0 model does the job just fine. And I gave up the USB flash drive altogether in favor of storing files on whatever smartphone I'm always carrying around with me anyway. (But if you need one, look at the USB 3.0 models, which are almost like little SSD drives in your pocket.)

I also flirted with the idea of dropping the standalone flashlight and relying on my smartphone camera flash as a flashlight, but in my testing smartphones make weak flashlights. It might replace one of those button battery style LEDs in an emergency, but it's not even close to what a decent AAA LED flashlight can do for actual nighttime navigation. It is interesting that LEDs haven't advanced much in the last few years on AAA flashlights. There are somewhat newer Cree XP-G2 models which I also experimented with, but I ended up preferring the minimalist, compact form factor of the iTP EOS. Don't forget the lithium AAA batteries to keep the weight down and runtime up, though!

The Leatherman Style is a fantastic new addition, because it keeps the core functions I used the most on the Leatherman Squirt and removes the extra stuff I didn't. Here's an expanded view of the other side.

Leatherman-style-red

So: scissors, knife, screwdriver. Hard to see, but detachable tweezers are also wedged in on the corner. That works for me. These are the functions I used the most on my Leatherman Squirt, by far. The Style is leaner, smaller, lighter … meaner.

(And there's also a nail file, on the other side of the screwdriver, but what is this obsession with nail files on multi-tools? Who are these people filing their nails all the damn time? I've never filed my nails once in my entire life! Can anyone mansplain this to me?)

I also purchased an updated Leatherman Squirt PS4, the one with the integrated scissors as well as the pliers. I'm showing it here fully expanded, next to my old red Squirt that didn't have the scissors.

Leatherman Squirt p4 old vs new

The pliers are great, and probably the only reason to carry this slightly larger multitool if you need it. But I hardly ever did. The physical dimensions aren't terribly different, but the Squirt PS4 is 56.4 grams, versus the Style at 23.1 grams. Quite a weight savings.

(I would be remiss if I didn't point out that the Squirt and Style are only two of the literally dozens of great Leatherman utility tool choices, from pocket to multi-tool. I like the smallest ones in the model range for my minimalist EDC needs, but you might want more. Of particular note is the Style CS which adds an integrated clip and bottle opener, but bulks up to 41.1g)

So that's my updated utility belt in 2013. Less is more, folks.

But there is one more thing…

If you were worried that Haitz's Law wasn't working for us on these LED flashlights, have no fear. Because for $75, you can now own a compact, roughly AA-sized LED flashlight that produces an astonishing 850 lumens. (For context, the AAA flashlight pictured above produces around 90 lumens on its highest setting.)

Pd35-led-flashlight

I got this Fenix PD35 flashlight to play with, along with some rechargeable 18650 Li-ion batteries (think fatter AA, two CR123A batteries stacked on top of each other), and it is nuts. It's actually painful to look at when lit, and it gets pretty warm in your hands on the high and turbo settings. If you've ever dreamed of carrying a lightsaber, and I know you have, wielding this baby will make you realize that dream is closer today than ever before.

It's also a pretty nice flashlight. Just try to resist making lightsaber noises while using it.

[advertisement] How are you showing off your awesome? Create a Stack Overflow Careers profile and show off all of your hard work from Stack Overflow, Github, and virtually every other coding site. Who knows, you might even get recruited for a great new position!
Discussion

The 2013 HTPC Build

I no longer own any laptops. Everything in our house is a tablet: multiple Nexus 7s, multiple iPad 4s, and a Surface Pro. In fact, the only traditional computers I own are my triple-monitor desktop home office beast, and the small Home Theater PC (HTPC) that drives all our home entertainment in the living room.

Htpc-2013-4

It's a Mini-ITX case with compact, console-like 3.8" × 8.7" × 12.9" dimensions. It is a class act, totally at home in any civilized home theater environment.

I love that little HTPC to death. It is such a versatile, flexible, always-on box. The longer I work on my HTPC project, the more I believe the evolution of the HTPC is a nice metaphor for the overall future direction of the PC. In summary:

2005~$1000512 MB RAM, single core CPU80 watts idle
2008~$5202 GB RAM, dual core CPU45 watts idle
2011~$4204 GB RAM, dual core CPU + GPU22 watts idle
2013~$300*8 GB RAM, dual core CPU + GPU×215 watts idle

15 watts at idle! Incredible, isn't it? But you probably also noticed how some of these stats aren't improving so much. Basically, they don't need to – we've reached such an absurd overabundance of computing power that slathering more on top no longer gets us much. It's been about 2½ years since my last HTPC build, and (*) all I did this year is swap out the motherboard, CPU, and RAM:

I started by removing the overhead drive tray, then pulling out the motherboard and anything attached to it. Notice there's a ton of room in the front of the case where the old power supply used to be. No need for it. We're using a more efficient and way smaller PicoPSU. That space is now available for an extra 2TB 2.5" drive, sitting there on some mildly sticky sheets of sorbothane. Once you factor in the PicoPSU, it's a roomy build despite the compact dimensions.

Htpc-2013-2

Then I mounted the motherboard, attached the front USB and eSATA headers, the power/reset switches, and the aforementioned PicoPSU, which you can see sticking out of the motherboard's power header near the hard drive. Note that everything not directly attached to the motherboard is driven off a single power connector, so there are two SATA splitters in use. This particular PicoPSU and power brick are rated to 60 watts which is enough for what we're doing.

Htpc-2013-3

The top drive tray slides in with 3 screws. There's also a place just underneath the two drives above for a slimline Blu-ray or DVD drive, but I found I have virtually no use for optical media any more, so I've skipped it.

Htpc-2013-1

The main motivation for this upgrade is the lower power usage and better GPU performance of the Haswell CPU, versus the Sandy Bridge CPU that was in there. Everything else remains the same, though I have been selectively upgrading bits and pieces since 2011:

Yes, that's right, 4.5 terra-friggin-bytes of storage. What can I say? I like me some media, man. The 512GB boot SSD is a little excessive, I'll grant you that, so feel free to replace the drives with something more modest in your build. I'm just addicted to SSD speed and didn't want to compromise too much on total storage.

You may wonder why I bothered upgrading memory, since the trusty DDR3-1333 RAM in the old HTPC works fine in the new motherboard. Fair question. Normally, RAM speeds are little more than a curiosity on modern computers, as minor improvements in memory speed have long since ceased to produce meaningful differences in benchmarks. But we are using Haswell's on-die GPU, and it relies on main memory as graphics memory. Even a low-end video card will have 1GB of ram on it these days, and games certainly expect GPUs with at least 256MB or 512MB of dedicated, extremely high speed graphics memory. This is the rare case where you do care about memory performance. Consider these AnandTech game benchmark results:

IGP Results_575px

It's a bit difficult to read, but think of it as "percent better than vanilla DDR3-1333", since that's the baseline zero value here. The sweet spot is DDR3-1866 CL9 (light blue bar). That grade of memory is only nominally more expensive, and gets you reasonably near the top of each graph, but this motherboard doesn't support anything higher than 1600. DDR3-2133 CL9 (dark purple bar) is also out there.

Other than lower power consumption, and a modest bump in CPU power, the really big improvement is GPU performance. It's kind of a complicated matrix, but the i3-4130T chip has an Intel HD 4400 GPU, compared to the HD 2000 GPU that was in the i3-2100T I upgraded from. For example, Dirt 3 on medium detail at 1024x768 notebookcheck.net shows a gain from 21.4 fps to 44.6 fps for these specific GPUs – more than double the GPU performance, at the same 35 watt TDP!

That's the other reason I was excited about this upgrade: Steam's Big Picture mode. With that doubling of GPU power, this 15 watt idle HTPC we just built … is now a credible gaming machine!

Steam-big-picture

You will need an Xbox 360 Wireless kit for PC, which works perfectly with Steam Big Picture mode. Just plug and play, provided you stick to the 190 Steam games with full controller support. You'll still have to tinker a bit sometimes to get things to work, and you won't be running Battlefield 4 in hi-def at 60fps or anything, but overall it's quite promising and bodes well for a console-like future. I've had solid results with slightly older games in 720p using medium and occasionally high detail levels, depending on the game.

So what exactly do we get for our upgrade troubles, 2½ years on?

  • A 32% drop in idle power, from 22 watts to 15 watts. And an overall reduction in power consumption when the machine does happen to be doing something. 17 watts when in an active torrent, for example, up to around 50 watts when playing GRID 2.
  • A credible gaming box for the first time, thanks to 2× the GPU power. It also coincides nicely with the maturing of Steam's Big Picture mode. When Gabe Newell talks about Linux as the future of gaming, this is the sort of machine he's referring to.

I'm not sure how much lower we can go on power, but I'm absolutely certain that Intel's on-die GPUs will continue to roughly double in power each generation for the forseeable future. This little HTPC box just keeps getting more versatile over time, while costing me less (in power consumption, at least) every year. It's the funnest build ever. HTPC, I love you, man!

[advertisement] Hiring developers? Post your open positions with Stack Overflow Careers and reach over 20MM awesome devs already on Stack Overflow. Create your satisfaction-guaranteed job listing today!
Discussion

The CODE Keyboard

What would you do, if you could do anything?

I don't mean in a fantasy superhero way, but in terms of resources. If someone told you that you now had the resources to attempt to make one thing happen in the world, one real thing, what would that be?

If you're Elon Musk, the patron saint of Hacker News, then you create an electric car and rocket ships. And then propose a hyperloop. Not bad. Not bad at all.

My dream is more modest. I decided to create a keyboard.

The CODE Keyboard, front image with backlight

I've talked about keyboards here for years, but The CODE Keyboard is the only simple, clean, beautiful backlit mechanical keyboard I've ever found. Because we built it that way.

The name is of course a homage to one of my favorite books.

Code, by Charles Petzold

That's what I've always loved about programming, the thrill of discovering that communicating with other human beings in their code is the true secret to success in writing code for computers. It's all just … code.

CODE
/kōd/
A system of words, letters, figures, or other symbols used to represent others

The projects I've worked on for the last eight years are first and foremost systems for efficiently communicating with other human beings, not computers. Both Stack Exchange and Discourse are deeply concerned with people and words and the code they use to talk to each other. The only way those words arrive on your screen is because someone, somewhere typed them. Now, I've grown to begrudgingly accept the fact that touchscreen keyboards are here to stay, largely because the average person just doesn't need to produce much written communication in a given day. So the on-screen keyboard, along with a generous dollop of autocomplete and autofix, suffices.

But I'm not an average person. You aren't an average person. We aren't average people. We know how to use the most powerful tool on the webwords. Strip away the images and gradients and vectors from even the fanciest web page, and you'll find that the web is mostly words. If you believe, as I do, in the power of words, then keyboards have to be one of the most amazing tools mankind has ever created. Nothing lets you get your thoughts out of your brain and into words faster and more efficiently than a well made keyboard. It's the most subversive thing we've invented since the pen and the printing press, and probably will remain so until we perfect direct brain interfaces.

I was indoctrinated into the keyboard cult when I bought my first computer. But I didn't appreciate it. Few do. The world is awash in terrible, crappy, no name how-cheap-can-we-make-it keyboards. There are a few dozen better mechanical keyboard options out there. I've owned and used at least six different expensive mechanical keyboards, but I wasn't satisfied with any of them, either: they didn't have backlighting, were ugly, had terrible design, or were missing basic functions like media keys.

WASD Keyboards

That's why I originally contacted Weyman Kwong of WASD Keyboards way back in early 2012.* I told him that the state of keyboards was unacceptable to me as a geek, and I proposed a partnership wherein I was willing to work with him to do whatever it takes to produce a truly great mechanical keyboard. Weyman is a hard core keyboard nut who absolutely knows his stuff – I mean, he runs a whole company that sells custom high end mechanical keyboards – but I don't think he had ever met anyone like me before, a guy who was willing to do a no strings attached deal just for the love of an idealized keyboard. At one point over a lunch meeting, he paused, thought a bit, and said:

So … you're like … some kind of geek humanitarian?

I don't know about that.

But I'm not here to sell you a keyboard. Buy, don't buy. It doesn't matter. I'm just happy to live in a world where the first truly great mechanical keyboard finally exists now, in exactly the form it needed to, with every detail just so, and I can type this very post on it. As glorious as that may be, I'm here to sell you on something much more dangerous: the power of words. So whether you decide to use the CODE Keyboard, or any keyboard at all, I'm glad you're thinking about writing words with us.

* Yep, we software guys are spoiled – hardware takes forever.

[advertisement] How are you showing off your awesome? Create a Stack Overflow Careers profile and show off all of your hard work from Stack Overflow, Github, and virtually every other coding site. Who knows, you might even get recruited for a great new position!
Discussion

The Rule of Three

Every programmer ever born thinks whatever idea just popped out of their head into their editor is the most generalized, most flexible, most one-size-fits all solution that has ever been conceived. We think we've built software that is a general purpose solution to some set of problems, but we are almost always wrong. We have the delusion of reuse. Don't feel bad. It's an endemic disease among software developers. An occupational hazard, really.

If I have learned anything in my programming career, it is this: building reusable software, truly reusable software, is an incredibly hard problem – right up there with naming things and cache invalidation.

My ideas on this crystallized in 2004 when I read Facts and Fallacies of Software Engineering for the first time. It's kind of a hit-or-miss book overall, but there are a few gems in it, like fact #18:

There are two "rules of three" in [software] reuse:
  • It is three times as difficult to build reusable components as single use components, and
  • a reusable component should be tried out in three different applications before it will be sufficiently general to accept into a reuse library.

Yes, this is merely a craftsman's rule of thumb, but the Rule of Three is an incredibly powerful and effective rule of thumb that I have come to believe deeply in. It's similar to the admonition to have at least one other person review your code, another rule of thumb that is proven to work. To build something truly reusable, you must convince three different audiences to use it thoroughly first.

OK, so you built a solution that scratches your itch … but does anyone else care? How many other people have the problem that your software or website addresses? How many other competing solutions are there to choose from? Outside of your personal patient zero case, can you convince anyone to willingly, or even enthusiastically, adopt your solution? That's your first hurdle. Can you even get to number one?

How deeply do I believe in the Rule of Three? So deeply that I built two whole companies around the concept.

With Stack Overflow, we didn't set out to build a general purpose Q&A engine. We only wanted to solve the problem of programmers looking for fast, solid technical answers to their programming problems, instead of the endless pages of opinions and arguments they usually got. Oh yeah, and also to deal with that hyphenated site. One of the greatest pleasures of my life is meeting programmers that have never heard of this hyphenated site now. I hope you can forgive me, but I mentally superimpose a giant Dubya-style "Mission Accomplished" banner over their heads when they say this. I grin a mile wide every time.

We launched Stack Overflow to the public in August 2008. It was such a runaway early hit that I started to get curious whether it actually would work for different audiences, even though that was never the original idea. But we decided to play the six degrees of Kevin Bacon game and take some baby steps to find out. Less than a year later we had Stack Overflow for programmers, Server Fault for system administrators, and Super User for computer power users – the full trilogy. Three sites with three distinct audiences, all humming right along.

One customer or user or audience might be a fluke. Two gives you confidence that maybe, just maybe, you aren't getting lucky this time. And three? Well, three is a magic number. Yes it is.

Once we proved that the Stack Overflow engine could scale to these three distinct communities, I was comfortable pursuing Stack Exchange, which is now a network of over 100 community-driven Q&A sites. The programming audience derived assumptions that the engine was originally designed around means it can never scale to all communities – but for communities based on topics that can be understood via questions about science, facts, and data, there is no finer engine in the world. Not that I'm biased or anything, but it's stone cold truth. Don't believe me? Ask Google.

When we launched Discourse in February, I had zero illusions that we had actually built workable general purpose forum software, even after eight months of hard work. That's why the "buy it" page still has this text at the top:

Unfortunately, you can't buy Discourse … yet.

Our immediate plan is to find three great partners willing to live on the bleeding beta edge and run forums with us, so that we can be confident we've built a discussion platform that works for a variety of different communities. We promise to do everything we can to host your forum and make it awesome for two years. In return, you promise to work with us on ironing out all the rough edges in Discourse and making sure it scales successfully – both socially and technologically – to those three very different audiences.

Hey, there's that magic number again!

Even now, months later, we're not even pretending that we have open source discussion software that works for most communities. Hell, the FAQ literally tells you not to use Discourse. Instead, we're spending all our effort slowly, methodically herding the software through these three select partners, one by one, tweaking it and adapting it for each community along the way, making sure that each of our partners is not just happy with our discussion software but ecstatically happy, before we proceed to even tentatively recommend Discourse as any kind of general purpose discussion solution.

Because I worship at the altar of the Rule of Three, it's pretty much been my full time job to say "no" to people every day for the last 6 months:

Hey, Discourse looks great, can you host an instance for us?

Sorry, not yet. Probably in 2014!

We desperately need great forum software for our community! Can you help us set up Discourse?

Sorry, I can't. We're focused on building the software. It is 100% open source, and we do have a pretty good install guide if you want to grab the code and set it up!

We'll pay you to host Discourse for us! Shut up and take my money!

Sorry, I wish I could. It's not complete enough yet, and the last person I want to disappoint is a paying customer, and we don't even have a billing system! We plan to get to hosting in early-ish 2014.

So yeah, I won't lie to you – I'm basically a total bummer. But I'm a total bummer with a plan.

The solution we constructed in Discourse was a decent start, but woefully incomplete – even wrong in some areas. The only way we can figure this out is by slowly running the solution through its paces with our three partners, to live in the same house of software they do as roommates, to walk alongside them as they grow their discussion communities and do everything we can to help build it into a community we enjoy as much as everyone else does. And when there were only one set of footsteps in the sand, well … that's because we were carrying you.

We haven't made it all the way through this process yet. We're only on partner #2; it takes the time it takes. But thanks to the Rule of Three, I'm confident that by the time we finish with partner #3, we will finally have a truly reusable bit of general purpose open source discussion software to share with the world – one that I can recommend unhesitatingly to (almost) anyone, because it'll probably work for their community, too.

So the next time you think "I've built a reusable thing!", stop, and think "how can I find three users, customers, or audiences, to prove that I've built something reusable?" instead.

[advertisement] Stack Overflow Careers matches the best developers (you!) with the best employers. You can search our job listings or create a profile and even let employers find you.
Discussion

So You Don't Want to be a Programmer After All

I get a surprising number of emails from career programmers who have spent some time in the profession and eventually decided it just isn't for them. Most recently this:

I finished a computer science degree last year, worked about a year in the Java EE stack. I liked requirements engineering and more 'management stuff' in university, but let's face it: you tend to be driven to be a programmer.

I enjoy programming itself. I'm not doing it that badly, I even do it better than some people. But it's too frustrating. Stupidly complex stuff (that people consider "standard" even if it's extremely complicated!), fighting against the computer, dumb errors, configuration, and stuff that people even worse than me implemented and I have to take care of. New stuff which is supposed to be incredibly easy, and it's just one more framework.

I think I realized I don't want to program because I landed at a company where people are quite good. And I honestly think I won't achieve that level, ever. And I don't enjoy programming as a hobby.

I'm sure that I'm good enough to be able to make a living continuing as I am … but I don't want to.

And this:

Since the first year of studying programming at university I have known in my heart that computer programming is not meant for me, but I was afraid to do anything about it and here I am now 12 years later programming with no passion. I am a career programmer and an average one at best.

I come to work every day with no passion I just do it to pay the bills. I have done some good projects but I am not at all into it.

It was always our hope that concrete, substantive programming career questions could be asked on Stack Overflow, and some early ad-hoc polling indicated that career questions might be accepted by the community, but if you look at later poll results, it's clear that the career questions came out juuuust under the cutoff point as determined by the Stack Overflow community.

Well, what about the rest of the Stack Exchange network? How about our sister site at programmers.stackexchange which is less about programming problems with source code and more about whiteboard style conceptual programming questions? Apparently, career questions are not welcome there either. But wait! Surely programmer career questions are a fit on a site that's explicitly about career related topics? The very same question was asked on workplace.stackexchange:

I'm graduating soon with a Bachelor's in Software Engineering, however during the course of getting my degree I decided I do not want to be a programmer.

I minored in Business Management and really enjoyed that, particularly the management side of psychology and the basics of the processes involved with restructuring a business, but don't really want to throw away my programming degree either.

Is there a field for someone with a Software Engineering degree who wants to get into business management instead of programming? I'd like to combine my knowledge of making software with some kind of business process oriented work. How should I go about changing to this field? Is this possible without going back to school?

Nope. Sorry. That was closed, too, either because it was seen as a 'recommend me a job' or because it's too specific to programming. Pick your interpretation.

I am sympathetic to this quandary because career questions, by their very nature, tend to be so narrow and opinionated that they are frequently only useful to the person who asked – which is completely counter to the goal of Stack Exchange. You know, endless permutations of things like "My boss Jeff is a total jerk, he constantly changes my code without asking and overrides me all the time with his BS arbitrary decisions, should I quit?"* I can understand deciding to outlaw the entire class of career questions because they're frequently soft, opinion-y, and highly specific to the person asking. It's easier to throw out the whole category rather than do the painful work of sifting through them all to reveal those few rare workable gems.

Stack Exchange wants questions that are as useful to as many people as possible, and actively closes (sorry, "puts on hold") the ones that are not. I will now reprint my favorite diagram, ever, which attempts to explain this:

Who does your question apply to?

The colored part in this target that says "All Programmers"? That's the goal at Stack Exchange. Well, maybe "all bicyclists", or "all cooks", but you get the general idea.

We try our best to teach you to ask questions that hit this sweet spot: answers that get you the information you so desperately need, yes, but also help your peers along the way without devolving into meaningless opinion honeypots. Overshoot and you get either "Too Broad" or "Too Localized". Hitting that target with our questions – or at least making a best faith effort to attempt to, anyway – is how we maximize the results of our collective efforts. Write once, read many.

But back to the topic: what career options are available to programmers who no longer want to program? I feel there is a way to answer this question that would be helpful to many other programmers, that is supported by facts and data and science.

Programming is indeed a field that does require some passion. If you've been programming for a few years and haven't developed a taste for it by now, it seems doubtful to me that anyone would suddenly develop one overnight. However, if you were able to stick with doing something you're not very enthusiastic about for a period of years, maybe there's still a kernel of something there to work with. Or perhaps you're just wearing golden handcuffs.

Golden-handcuffs

Environment plays a big part in any job, no matter how intrinsically amazing that job might be. Who do you work with? What are you working on? What kind of environment do you program in:

  • A startup?
  • A small business?
  • A big business?
  • A consultancy?
  • Freelance?

The "programming" in each of these situations, and the other peer programmers you'll be working with, will be radically different. Consider if the environment and peers may be the problem. Have you tried changing those up, first, before conclusively deciding you need to leave the field forever?

Beyond that, there are lots of related fields where programming skills are advantageous, without having "sit down and write code all day" as part of the job description. So let's think. What jobs exist where …

  1. Programming skills and a deep technical background are typically in the hiring requirements.
  2. There is a documented record of ex-programmers moving into these positions and being successful.
  3. There are a reasonable number of such jobs available worldwide.

Here's where I really wished I could have asked this on Stack Exchange, because I'd much rather crowdsource data to support the above three points, but the best I could come up with on my own is:

In many of these roles, people that truly know the nuts and bolts of programming are quite rare. That's unfortunate, because a deep technical background lets you actually understand and explain what is going on, to customers, to business stakeholders, to peers on related teams. At the very least nobody can dazzle you with technical BS, because you're equipped to call their bluff.

I've seen less "adept" programmers self-select into related roles at previous jobs and do very well, both financially and professionally. There is a lot of stuff that goes on around programming that is not heads down code writing, where your programming skills are a competitive advantage.

Career questions are tough, because ultimately only you can decide what's right for you. But if you're a programmer who no longer likes to program, your technical background can at least open the door to a number of related professions.

* Yes, you should quit. Jeff is a total jerkface.

[advertisement] How are you showing off your awesome? Create a Stack Overflow Careers profile and show off all of your hard work from Stack Overflow, Github, and virtually every other coding site. Who knows, you might even get recruited for a great new position!
Discussion