– 🕓 2 min read – Translated to [sv]

Switching to Pelican

I keep forgetting to mention it, but this May was the fifth anniversary of this blog. Thus, it's time again for some housekeeping. Three years ago I stopped using Wordpress for my blog and moved it to Octopress. Octopress is a great blogging framework, but its current incarnation has some major shortcomings. Those will be fixed with Octopress 3.0, but 3.0 has been a long time coming, and due to the changing distribution model the work to move from 2.0 to 3.0 may be substantial. Plus, Octopress isn't the best fit for me because it's written in Ruby, which I don't know and don't have much interest in learning; I much prefer Python.

I recently learned of Pelican, which is a Python-based blogging tool. Luckily, Maurizio Sambati has already done the hard work of porting the Octopress theme to Pelican. Since my blog's theme is the Octopress theme with a few tweaks, it wasn't an inordinate amount of work to port my own theme to Pelican. Jake Vanderplas also did some great work in porting some of Octopress' Liquid tags to Pelican, and he also has a great blog post which walks through the process (and describes some of his reasons for switching, which mirror my own). In the end, it did take me several hours of work to move everything over and clean up some of the posts where I was making use of various Octopress plug-ins, but I think it will be a boon in the long run. (Please let me know if anything appears to be broken, as it's possible that I missed something.)

In addition to being easier for me to use and contribute to, I'm really excited about Pelican's support for tags. Tagging will help organize my blog, especially since I've limited myself to having only a few categories since I'm committed to having a unique, easily-distinguishable color for each one. I'm also excited that Pelican has built-in support for translating articles, which I plan to take advantage of to practice the languages I'm learning.

Check back in three years to see which new blogging platform I switch to next!

– 🕓 7 min read

TV Series Review: Mr. Robot, Season One

I don't watch a whole lot of TV. In fact, I don't even have cable. The only shows I end up watching, therefore, are those I'm introduced to or I read about. Mr. Robot is the latest such show; I read David Auerbach's piece on it and was intrigued. In Auerbach's words:

Real misfits—disturbing, unappealing, unlovable misfits—make for poor Hollywood protagonists. It takes some faith to inject a genuinely alienating hero into a film or TV show. But ever since the broader world of tech has gained a whiff of cool over the past decade or so, Hollywood's portrayals of hackers, programmers, and other screen-strapped geeks have tended to sugarcoat the frequently unvarnished and even unappealing aspects of a culture that prides itself on not caring about the mainstream. I'm not bemoaning the lack of shy nerds with hearts of gold here, but of awkward and even abrasive characters who talk too loudly, can't follow conversational cues, transgress boundaries obliviously, and harbor conspiracy theories or other unappealing ideas—like a lot of actual hackers out there. We forget that people detest savant types for reasons beyond their smarts, and a lack of social graces is one of them.

Elliot, the protagonist of the new USA Network drama Mr. Robot, comes far closer to this type than an American television show has dared for a while. (Elliot isn't the titular Mr. Robot—that's Christian Slater.) As played by Rami Malek, Elliot doesn't have the charisma of Benedict Cumberbatch's Sherlock or the anti-charisma of Hugh Laurie's Dr. House. Unlike Tony Shalhoub's Adrian Monk, he's not a collection of quivering nerves and endearing eccentricities. These characters—all nerds of one sort or another—are fundamentally capable of functioning in society, and Elliot really isn't. He and the world just don't hook up in the right way. Taking copious drugs in order to function, he carries a vacant and flattened affect, neither making eye contact with anyone nor turning away when they look at him. With his emaciated face and sunken eyes, Malek gives an impression of emptiness, paranoia, and above all disconnection.

This is probably a polarizing description: some people will be immediately interested while others will probably question why anyone would want to watch it. It was very much the former for me, possibly because Auerbach's description of Elliot hits a bit close to home. I watched the first episode and was instantly hooked. The show immediately draws you into its world: a sort of dystopian present, a mirror image of our own reality, but viewed through the eyes of a brilliant, cynical, emotionally troubled young man who struggles not only with an unfeeling universe but also with drug addiction and mental illness.

Atypically for movies and TV, Elliot's mental illness is depicted respectfully and at least somewhat accurately, too. He's not an over-the-top Hollywood psycho, but merely a vulnerable person suffering from paranoia and delusions. And being a software developer, I also really appreciated that the show nails the technology. It's not completely realistic, but that's to be expected; the reality of programming and hacking is that they're slow, analytical processes, often consisting of long stretches of thought punctuated by short bursts of activity. In other words, they're boring to watch, and sometimes to undertake, too. Mr. Robot strips that away, but it keeps the interesting aspects intact without insulting the audience's intelligence with impossible technology, meaningless invented jargon, or awful 3D GUIs.

– 🕓 13 min read

Observations from Three Years in America

Some of this post is adapted from a Facebook comment I wrote earlier in the year in response to this CBC article. Many of the statements in this post are conjecture based on my own experiences and perceptions; I do not claim that everything in it is broadly applicable.

May of 2015 marked the beginning of my fourth year in the United States. Now that I have a green card and don't have to worry quite as much about saying the wrong thing and getting kicked out of the country, I wanted to take the opportunity to discuss what it's like to live here from my perspective. I was going to write "from a Canadian perspective," but of course, I don't speak for all Canadian immigrants.

Before I started my career, I had never really planned to come to the US. I was only part of the way through my senior year at the University of Alberta when I happened upon a Microsoft recruiting booth at a career fair. Microsoft was the only real technology company present; most of the others were oil and gas companies, that being what Alberta's economy is primarily based on. I left a resume with them, not really expecting much to come of it.

As it turned out, I did get a call back (which I almost missed—funny how such small events can result in drastic changes in one's life). A few weeks and several highly stressful interviews later, I had signed a job offer. Shortly after I graduated, my wife and I were on a plane to Seattle. Even at that point, I didn't really expect to live in the States for more than a year or so. My goal was primarily to get a "marquee company" on my resume (a piece of advice a friend and former colleague gave me) and then use that as a bargaining chip to get a better job back home. But now it's been more than three years, and not only am I still here, but I no longer have plans to leave in the foreseeable future.

– 🕓 2 min read

Windows 10!

Windows 10 is out today! This is the first release of Windows that I have worked on as a developer , and I'm proud of what my team and Microsoft as a whole have accomplished in the past year-and-a-half or so. Several tech websites have already posted reviews, and so far the trend is very positive. A colleague of mine posted some excerpts, which I'm going to borrow:

Windows 10 represents the obvious future of PC operating systems. It makes Mac OS X feel old-fashioned, stuck in a time where The Desktop was a thing that mattered and the only way to access the Internet was through a browser.

So the question finally presents itself: should you upgrade your machine to Windows 10? Yes, you should.

The best part of Windows 10 is that it ends the cycle of good and bad in favor of something great.

It's nice, for once, to be able to recommend a new version of Windows without any hesitation.

If you are on a PC at all, Windows 10 is where you want to go. That it is free—for now—only makes the point simpler.

If you haven't already done so, you can follow the instructions here to get your free upgrade. It's very exciting to have played a role in the creation of the latest and truly greatest version of Windows; I think this is a huge achievement for Microsoft, and I'm happy to have been a part of it. The real reward, though, is seeing people use and enjoy Windows 10—and that starts today!

– 🕓 10 min read

Game Review: Bloodborne

[I completed this review after playing Bloodborne for approximately 30 hours. I have finished the game, but I have not discovered 100% of the content. I played the entire game solo, not using any summons to help with boss fights. I have not yet participated in any PvP.]

Bloodborne is the spiritual successor to From Software's Demons Souls and Dark Souls series, and its pedigree is clear right out of the gate. Upon starting the game, you'll enter the character creation menu and be asked to choose from a number of classes with different stats, but will be given almost no explanation of what the stats mean or how they affect gameplay. If you're a Dark Souls veteran, you can make some educated guesses, but new players will be completely on their own. After a short introductory sequence, you're thrown into an open world replete with buildings of impossible scale, which stretches vast, seemingly endless distances in each direction. You're completely on your own to make your path through this world, and there's no obvious "correct" route; in fact, a friend and I found different bosses first, because we had taken different routes from the start.

If this experience sounds like it might be frustrating for new players, that's because it absolutely can be. Even for veterans of the series, the complete lack of guidance can feel punishing at times. And yet, I can't stress how much I absolutely love it. The freedom not only to explore, but to truly discover the workings of the world, and to make mistakes, is what made the Souls series what it was, and Bloodborne continues this legacy. The game pays homage to times past, when games didn't hold the player's hand throughout the entire experience, and it does so with such expertise and craftsmanship that none of its contemporaries can compare.

Like its predecessors, Bloodborne adeptly balances challenging and sometimes frustrating gameplay with frequent rewards and other powerful motivators: the prospect of discovering something new, of overcoming the next challenging boss, of finding the next area, or of glimpsing another thread of the world's deep backstory. These enticements work so well because of the depth and imagination with which the world is crafted. There's a constant sense of cataclysmic urgency, but you won't truly understand it until you take the time to piece together all of the subtle clues placed throughout the world. Bloodborne gives you very little to go on, but it trusts you to have the fortitude and curiosity to work things out for yourself.

– 🕓 3 min read

Windows Hello, Microsoft Passport, and Tamriel Unlimited

Lots of exciting news today! First off, Microsoft has made a couple exciting announcements about Windows 10. Full disclosure: I am a Microsoft employee, so I am posting these for self-interested reasons, but I'm also genuinely really excited about what they mean for Windows.

The two new features are called Windows Hello and Microsoft Passport. Windows Hello is a software feature which, with supported hardware, offers "biometric authentication which can provide instant access to your Windows 10 devices." But Windows Hello is not just the same old support for fingerprint readers that Windows has had for many years now; it "enables you to authenticate applications, enterprise content, and even certain online experiences without a password being stored on your device or in a network server at all."

To accomplish that, Windows Hello works in conjunction with Microsoft Passport, which enables you to "securely authenticate to applications, websites and networks [...] without sending up a password. Thus, there is no shared password stored on their servers for a hacker to potentially compromise."

– 🕓 4 min read

Fun with the Microsoft Band SDK Preview

First of all, happy Pi Day! Using the standard United States date format, today is 3/14/15, which makes it the most significant Pi Day this century.

Anyway, I've spent the past few hours tinkering with the Microsoft Band SDK Preview, and although I think it's unfortunate that there's no SDK for writing apps which actually run on the Band itself, you can still accomplish some pretty cool things with the phone SDK. Unfortunately, this being a preview release, the documentation is a bit sparse, and I had some trouble figuring out how to get things working. Thus, I wanted to share some of what I've learned. If you prefer to dive right into the code, I've got a small C# sample application on GitHub.

Standard disclaimer: although I am a Microsoft employee, everything I am posting here and on GitHub is my own personal work done on my own time. None of it should be considered as officially representative of Microsoft in any respect. While I will do my best to answer any questions I can related to the Band SDK Preview, I cannot provide official support for this or any other Microsoft product.

Let's get started. If you're following the documentation, the first few steps describe how to connect to the Band, as one would expect. The sample code provided creates a connection within a using block. This ensures that the connection is disposed of as soon as control leaves the block, which is sensible since maintaing a connection to the Band, especially when subscribed to multiple sensors, can severely impact its battery life. However, this approach can also be a bit misleading, because if you do want to collect data from the Band over some interval of time, you will only be able to do so during the lifetime of the IBandClient returned by ConnectAsync. As soon as the IBandClient is disposed of, your connection will be closed and you will no longer receive sensor data.

Since you'll typically only be connected to one Band at a time, the easiest way to solve this problem is to store the IBandClient as a static member variable of your Application class. (Note: I don't guarantee that this is the optimal solution. I am by no means an expert here.) This also makes it easy to access your Band client from different pages within your application, and to unsubscribe from sensor data when you no longer need it so that you won't drain the Band's battery.

– 🕓 5 min read


I've been working on my next book review for a few days now, but I'm finding that when I try to work on it, words don't come quickly or easily to me. So, what the hell—might as well try something different. Music is immensely important to me. I've got a fairly large collection spanning over a thousand artists in dozens of different genres; I spent two years working in a record store (back when those still existed) and I consider music crucial to my ability to handle difficult emotions, be productive, and maintain sanity.

However, I've always been reluctant to write about it, because I'm basically musically illiterate. I don't play any instruments; I can't tell a C from an F; I can barely pick out the individual instruments in a song; I don't even know the right terminology to use when discussing what makes music good or not. I hope that eventually I'll be able to take some music lessons and correct this to some extent, because I also believe that you can't fully appreciate something you don't understand. But for now, I remain ignorant of the intricacies of musical composition. Thus, I'm not going to be so presumptuous as to call this a review, but... well, keep reading and you'll see what I'm on about.

I go through periods of obsession with musical artists where I'll discover someone new and become absolutely, completely captivated by them, usually buying several if not all of their records and listening to them over and over again until I've thoroughly "worn out" every single song. Then, if I'm lucky, I find someone new to become obsessed with, and the cycle begins anew.

Last month it was Lana Del Rey: her albums Born to Die and Paradise are absolutely phenomenal, and she herself is just an incredibly talented artist. One thing I find particularly interesting about Lana is how her sound—her voice, in particular—seems to evoke the 1950s; according to Wikipedia, "her music has been noted for its cinematic sound and its references to various aspects of pop culture, particularly that of 1950s and '60s Americana." But Del Rey's music doesn't sound dated—lyrically, she manages to capture a timeless quality while also epitomizing modernity and the hollowness of American decadence. It's a combination unlike anything else I have ever heard, and I still find it almost intoxicating.

Del Rey has announced a fourth album, Honeymoon, which is billed as being more like Born to Die and Paradise than her third album, Ultraviolence, which I have to admit that I didn't care for as much. Naturally, I'm really looking forward to that. Enough about Lana, though. This month, I'm hooked on Taylor Swift's latest album, 1989.

– 🕓 2 min read

Configuring DPI in Lubuntu/LXDE

Updated 2015-10-10: Paul suggests that this can also be accomplished by editing or creating /usr/share/lightdm/lightdm.conf/50xserver-command.conf and adding the command xerver-command=X -core -dpi 150. I haven't tried this myself. Alternatively, you can just use Xubuntu instead, which seems to run just as well, and has a handy UI for adjusting DPI. It also handles multi-monitor setups much better.

If you've tried to use Lubuntu (or LXDE on another distribution) with a high-DPI display, you've probably noticed that fonts and other UI elements are so tiny as to be illegible without a magnifying glass. You've probably also noticed that there is no GUI with which to adjust the UI scaling factor. Happily, it is possible to change the DPI settings in LXDE, but this being Linux, it requires editing obscure configuration files. Here's what you'll need to do:

  1. In your home directory, create a new text file named .Xresources
  2. In this file, enter your desired DPI in the following format: Xft.dpi: 150
  3. Restart the X server. You can do this by pressing Ctrl + Alt + F1 to enter single-user mode, then running sudo service lightdm stop, and then sudo service lightdm start. (Note that it may be a different service if you are not running Lubuntu. Alternatively, you can just reboot your machine.)

This will scale UI elements in most, but not all, applications. For instance, it doesn't resize the desktop panel, so you'll likely want to do that as well. Luckily you can do so easily by right clicking on an empty space on the panel and selecting Panel Settings; from there, just change the height of the panel in pixels to a suitable value.

This is yet another tip that I'm posting mainly becuase it took me an inordinate amount of time to figure out how to do it. I found many suggestions on how to enable scaling, but none of them worked until I stumbled across the above instructions on the blog of bebabi34. His blog is in Italian, so naturally it's not very searchable for English speakers; hopefully by reproducing his instructions here, I can save others some time.

– 🕓 2 min read

The care and feeding of software engineers

Via a friend's Facebook feed comes this excellent article about "the psychology of software engineers and what makes us the way we are." I'm in almost complete agreement with the article, although I do somewhat take issue with this paragraph:

Part of the problem [of software engineers consistently giving overoptimistic estimates and then failing to meet them] is also our fragile egos. We get afraid that if we give an estimate that is "too long", that people will think less of us. "Good engineers" should be able to work faster, they say, and so we acquiesce.

I don't really think software engineers in general have "fragile egos," or at least not to a greater extent than people in any other profession. We are notoriously bad at giving realistic estimates, but in my experience, this is often because we're actually incentivized to do so: deadlines are set before the amount of work required for a project is actually determined, or without regard to it, and then we're made to fit our estimates into too-short iterations while still trying to accomplish all we set out to do. There's a common sentiment that it's better to be under-optimistic and out-perform your goals than the converse, and while that seems true in theory, in practice there don't seem to be many discouragements to failing to live up to estimates that everyone already knows are unrealistic and often meaningless.

By contrast, I think the fear that people will think less of us for giving "too long" estimates is completely valid in a culture where it's commonplace to set unrealistic goals and then break our backs trying to achieve them by any means necessary. I think this especially true at the feature team level when one is working on a large piece of software. What do you expect to happen to a team that estimates up front that its feature cannot be completed within the release window? (Remember, adding more engineers might just make the problem worse.) I think it's safe to say that it won't involve promotions and pay raises.

Finally, as my wife pointed out when we discussed this article, the planning fallacy is by no means unique to software engineers.

All of that said, I think the rest of the article is very good; this part in particular struck a chord for me (emphasis mine):

So, without enough information, changing requirements, not enough knowledge to do the job, and people constantly second guessing us, we trudge into work every day. Being creative people, we put up with all of this because we know that one day people will use our work. That's really what drives software engineers more than anything else: the idea that people we don't even know will be affected by our work. Whether you’re working on a web site visited by millions each day or you’re working on a point-of-sale system for restaurants, the knowledge that we’re affecting people's lives is a powerful driver.