Dec 082011

I had hoped that the Lenovo X1 was a fluke and not a precursor of things to come when it comes to screen resolution in the Lenovo product line. Unfortunately, it seems Lenovo is continuing to release high-end notebooks with commodity screen resolutions. Their flagship mobile Thinkpad x220 as well as the new Ideapad u300s both sport 1366×768 resolution displays. Their competition, the 13″ Mac Book Air and the Asus Zenbook UX31 both come with higher resolution displays and much trimmer designs. I have loved my Thinkpads over the years, but unless Lenovo offers better displays in the very near future, my next machine will likely come from another manufacturer.

Oct 282011

Today concludes my eleventh day in Prague attending three conferences and enjoying a few quick days of vacation with my wife.

Carsten Emde of OSADL was kind enough to invite me to speak on the Yocto Project at the Realtime Linux Workshop. I thoroughly enjoy hearing from members of industry, academia, and the Linux development community all at the same conference. I received a lot of positive feedback regarding the Yocto Project and collected my fair share of “todos”. Spending time with the leading Linux kernel developers is always inspirational for me, I invariably return with renewed commitment to improving my technical skills. After so many of these events, I consider these people my friends, and I so enjoy the trips that they feel more like a social event than a professional one. That, in my opinion, is how it should be.

Mary Lou joined me here in Prague while Grandma and Grandpa Mickelson braved our two children so she could get away for the needed break. She joined us on an OSADL sponsored walking tour of Prague covering the caste, lesser town, old town, and new town. We enjoyed the sights, the food was great, and some quiet time alone in a place where we had no responsibilities was wonderful. Her visit was long enough that she got to relax and enjoy her vacation, as well as look forward to getting home to our kids, our home, and our life.

Following our break, the Linux Foundation events began. The Embedded Linux Conference Europe (ELCE) and LinuxCon were held in parallel here at the Clarion Congress Hotel Prague. I spent a good deal of time at the Yocto Project booth, talking with attendees and catching up with team members. People were still trying to figure out how to spell Yocto a year ago when the project was announced. Now that the message has gotten out, there was a surge of interest – largely from people tired of maintaining their own frankenstein OS and looking for a solution. Others came by to be mesmerized by the Yocto Project 1.1 contributions visualization video rendered with the excellent gource project.

I attended excellent talks from Jonathan Corbet of LWN fame, Mathieu Desnoyers (EfficiOS), Grant Likely (Secret Lab), Stephen Rostedt (Red Hat), Frank Rowand (Sony), and Koen Kooi (beagleboard). The hallway track was also excellent. I met with developers and friends whom I only see online, including someone I had never met in person and hadn’t heard from in nearly 10 years when we hacked on some opensource projects together.

I wrapped it up with my presentation on tuning Yocto Project built images for tiny systems. Despite an imposing stack of 48 slides, I delivered the talk in the allotted time with room for questions without sending my audience into a speed-talk-stupor. I received some valuable feedback and made some useful contacts.

I am now exhausted mentally and physically. While I’m rather dreading the travel home, I’m very excited to be home with my family again.

Aug 022011

The Linux desktop took great strides as GNOME and KDE migrated through versions 1 and 2 (and even 3 in the case of KDE). They literally caught up with the competition starting from the likes of fvwm2 and windowmaker in an incredibly short period of time.

Since then though, things have been sluggish at best. GNOME put a lot of work into the nuts and bolts which is a good thing, but didn’t do much to improve the user experience. KDE continued to blaze ahead with new technologies like Plasma and their white-screen-of-death… errr, maybe that wasn’t a feature. So GNOME 2 grew stale, while KDE became shiny and unusable.

While this was going on the GNOME Shell sprang into existence with lots of radical paradigm shifts in the desktop usage model. Not to be outdone, well not without trying anyway, Mark Shuttleworth began pushing Unity onto unsuspecting faithful Ubuntu users. Both of these have been met with significant resistance. While GNOME’s new desktop appears to have lovers and haters, Unity had haters and… well… sheep, but no lovers.

So no that Fedora 15 is out and ships with GNOME3 by default, I figured it’s time I gave it a fair shake as I did unity some time back. I grabbed the x86_64 Fedora 15 live installer and stuck it on a USB key using unetbootin.

So, first things first. Before evaluating GNOME3 I had to make some modifications so that I could do something other than complain about the defaults:

  1. Edit /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml and replace all title_vertical_pad values with “0” (from the absolutely nucking futs default of 13).
  2. Alt-tab between “different windows” is broken by Gnome3’s window grouping. To switch back and forth between two windows of the same application (say two consoles for instance) use alt+~ instead of alt-tab. There are extensions to restore the by-window behavior, but this is simple enough and provides some added functionality.
  3. Install gnome-tweak-tool to be able to setup some decent fonts and font sizes, or alternatively just use the gnome-shell profile editor to select a console font manually. The rest of the fonts seem relatively sane.

This is just what I did to be able to tolerate the live-image from Fedora.

The Good:

  • The death of the folders and files on the Desktop. I hate them – and yet I am simply not diciplined enough not to put them there. In this one case, I appreciate the system forcing better behavior on me :-)
  • Better use of the Desktop. I like the full screen menu, especially with groups and a search function. It’s easy, intuitive, and attractive. Having the panel and the workspace switcher all integrated into that view works well for my workflow.

The Bad:

  • Constant Accessibility icon. If I don’t need this now, I probably am not going to need it tomorrow (crossing my fingers).
  • The panel calendar opens evolution, and only evolution. Evolution sucks (and so does Coke, Casio algebraic calculators, the Chrome browser, and Emacs), we need a calendar service that other applications can provide. Having the address book, mail, and calendar all assumed to be evolution is annoying.
  • The current window icon in the panel… wtf is that all about? It serves no useful purpose that I can determine.
  • The categories list in the Activities->Applications view is very small in relation to the application icons, detracting from the very easy course mouse control required to select applications when you have to revert to careful precise control to select a category.

All the said, Gnome 3 is hands-down a much better integrated and implemented desktop environment than unity. Someone needs to take the developers rose colored shades away, and then I think we’ll have a nice Desktop solution.

Jun 182011

Towers of Midnight (Wheel of Time, #13; A Memory of Light, #2)Towers of Midnight by Robert Jordan

My rating: 3 of 5 stars

Brandon Sanderson does an admirable job working to complete the Wheel of Time as laid out by Robert Jordan. While Jordan began to get off on academic tangents and new subplots with excessive detail on new characters way to late in the series for a reader to care to become invested in them, Sanderson has kept to the existing story very well. The story moves along much more quickly, which is a good thing.

Sanderson continues to present the world of the Wheel of Time in much the same way Jordan did, and during action sequences or other less intimate scenes, it still feel like Jordan. Things start to come apart where dialog or character musings dominate the page. The dialog is jarringly modern, in a David Eddings he-said-she-said kind of way. The metaphors just don’t seem to emphasize and support the alternate world, but instead set it at odds. Still, it seems a small price to pay to get to see the story continue to unfold and, one can hope, come to a close.

View all my reviews

Jun 032011

Lenovo unveiled their much-touted ThinkPad X1. It’s thin, it’s fast, it’s tough, it’s got a lot going for it… but the 13.3″ display comes in only one resolution: 1366×768. Really? 1280×800 was bad enough on the X201 and X220. Even at 800 vertical pixels I’ve run across the occasional dialog box with unreachable OK and Cancel buttons. Are you sure you want to format your root partition? It’s like russian roulette while guessing which of the off screen buttons – presumably [OK] and [Cancel] is selected by default! 768 is just silly.

I understand that most users probably don’t use 6 point font. They probably don’t care if they can only read three Facebook wall posts before having to scroll down. But isn’t there still a market for people that want a high-end screen with their high-end laptop? I’d pay another $100 for 1440×900, and I’m confident nearly every other software developer would as well. I find it a bit amusing that one of the images on the Lenovo web site shows a 3D modeling program on the X1 – not likely people, not with that resolution.

So how about it Lenovo, can we get an optional high resolution screen (as are made available on so many other ThinkPads, past and present) for software developers and other not-blind people?

Jun 012011

After slowly tweaking my bash prompt over several years I’ve finally arrived at something that I feel is simple, functional, and elegant. I’ve addressed my four primary annoyances with working in a terminal:

  1. Finding commands in the terminal scrollback is difficult.
  2. Long working directories cause awkward wrapping.
  3. I find myself using “git branch” and “git status” far too often.
  4. With so many terminals open, it can be difficult to distinguish between them.

I didn’t want fourteen colors, a clock, the date, and my ascii art gravatar in my prompt, so I’ve tried to keep it simple. To address #1 above, I’ve made my prompt green. This makes finding it in the noisy scrollback much easier. This uses escape pres, which are admittedly a bit nasty, but they get the job done:


For #2, I used to show only the leaf of the path, but for *some* projects even this became problematic with pathnames like:


So I took a page out of Joshua Lock‘s book and just ensure my prompt ends with “\n$ ” so my commands start on a new line and in the same column every time.

PROMPT="\u@\h:\w\n\$ "

For #3, also inspired by Mr. Lock, I did some digging and found a ridiculous number of heavy handed implementations, included some running ruby scripts to determine the current git branch. Ruby? Really? Turns out any modern distribution provides the very handy __git_ps1 bash autocompletion feature, so simply adding:

\$(__git_ps1 ' [%s]')

to my PS1 gets me the current branch in square brackets. To show the current state of the repository, including modified files, staged files, and things like being in the middle of a bisection, I export GIT_PS1_SHOWDIRTYSTATE=1 and add bash.showDirtyState=true to my ~/.gitconfig. This adds a * for modified, + for staged (*+ for both), and things like “|BISECTING” when in the middle of a git bisect command. Very handy!

Update (17-Dec-2012): You may find you need to add the following before you can use __git_ps1, particularly if you are on Fedora:

source /etc/bash_completion.d/git

Finally, for #4, I’ve found that setting the working dir in the titlebar of the terminal does a fair job at distinguishing between them. I don’t use many terminal applications (mutt, mc, etc) so the directory is usually adequate. I set a variable and then include that in PS1:


In summary, the setup of my prompt in .bashrc is as follows:

if [ $TERM != "linux" ]; then
PROMPT="\u@\h:\w\$(__git_ps1 ' [%s]')\n\$ "

This results in a prompt that looks something like this:

dvhart@doubt:~ [master]
$ touch test

dvhart@doubt:~ [master]
$ git add test

dvhart@doubt:~ [master +]
$ echo " " >> ~/.bashrc

dvhart@doubt:~ [master *+]
$ git reset --hard HEAD
HEAD is now at 8def692 bitbake TEMPLATECONF

dvhart@doubt:~ [master]
$ git bisect start HEAD HEAD~2
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[e82b229ca456cb77f1da310f7a6f966a4d5e2c95] use __git_ps1 in bash prompt

dvhart@doubt:~ [(e82b229...)|BISECTING]
$ git checkout master
Previous HEAD position was e82b229... use __git_ps1 in bash prompt
Switched to branch 'master'

dvhart@doubt:~ [master]

Update (7-Jun-2011): If you happen to use git to track your home directory config files, such as .bashrc and ~/bin you likely want to avoid using __git_ps1 in your prompt as it will show up pretty much all the time, and lose its effectiveness while working in your actual development project repositories. To address this, I’ve updated my prompt to only display __git_ps1 when the git top-level directory is not $HOME:

# Print the __git_ps1 string unless the git directory is $HOME.
source /etc/bash_completion.d/git
function git_ps1() {
    GD="$(git rev-parse --show-toplevel 2>/dev/null)"
    if [ "$GD" != "$HOME" ]; then
        __git_ps1 ' [%s]'

if [ $TERM != "linux" ]; then
PROMPT="\u@\h:\w\$(git_ps1)\n\$ "
May 282011

As many of you are aware, I have been thoroughly enjoying working at Intel since September 2010. It provides me numerous opportunities to learn new things and advance my existing skills. It is also a very high performance culture with numerous incredible people to model. Coming to Intel as Kernel developer has its challenges. As a kernel guy, people expect you know the low level architecture – but compared to 10+ year Intel veterans (kernel or not) I find I have some catch up to do! Besides just Intel architecture, there are countless other things I want to learn and skills I want to develop.

  • Improve my git fu
  • Follow LKML,oe-core,poky
  • Contribute to PREEMPT_RT Linux
  • Master perf and lttng, in addition to ftrace
  • Internalize the nitty gritty details of the hardware boot process
  • Learn to use Eclipse (mostly so I can understand how others work)
  • Sort out GUI application architecture abstraction (for braindump)
  • Master the programming problems in texts like Hacker’s Delight
  • Read all the Linux kernel books ever written… or maybe just the ones on my shelves currently
  • And that’s just the mostly professional stuff…

I find I can make it partway into a small subset of these, but before I can truly master any of them, I’m pulled away onto some other high priority thing which brings an entire new set of things I need learn more about. I need to be able to assimilate information faster! My eyes and my brain just don’t seem to have the required bandwidth.

What are some ways you have found to master new skills and make deep technical information your own while keeping up with a dynamic work environment?

May 282011

I listened to another great story on OPB radio on the drive in to work today. Peter Thiel has offered 100k grants for a select group of students to drop out and try their hands running a technological startup. He made a couple of points that I found to be worthy of repeating and pondering. As I value education I’ve never stopped to question its impact on my successes in life; I’ve always taken for granted that my education played a significant role. That is where I was introduced to programming, where I stumbled onto internships, from which sprouted my budding career as an enthusiastic Linux kernel developer.

Peter raises the should-be-obvious question about causality, that I’ve been known to raise myself regarding numerous other topics. Do college grads succeed because of their education? Or did they get accepted into college because they have what it takes to succeed anyway? Indeed, college admittance criteria has risen, and desirable universities are harder and harder to get into. If these persons would succeed regardless, then the seemingly universal acceptance that a college education is a virtual prerequisite for success comes into question. If it isn’t, then this incredible demand for education, and the equally incredible cost of education may stand on shaky ground.

While I still hold to the believe that a college education is a very good thing, I think there are many people in this world who could lead more successful lives if we as a people placed more value on vocational skills. Craftsmanship in this country has to be at all time low, and our shop-by-price-alone culture is largely to blame for this in my opinion. Some organizations fight to revitalize skilled trades. This Old House has run internship programs for this purpose. Peter is doing a similar thing, but with a skill that is traditionally accepted as coming from college educated professionals.

Peter also claims that college can sometimes be used as a crutch to avoid making some of those hard life decisions. If you don’t know what you want to do when you graduate high school, don’t worry about it, go to college, you’ll sort it out there. I can see some truth in that from my experience with the university. It can be difficult to see through the academia to what lies beyond. For some, study for studies sake is enough, but I think for most of us, it needs to lead to something more tangible. If I were to take what I’ve gleaned from this news story back with me 15 years, I hope I would have been able to adjust my focus away from the grade to retaining applicable knowledge, and discovering how I could do something with that knowledge – before I graduated and had to decide between the real world, or maybe putting that off while I pursued another degree…

May 272011

I was debugging a problem in a codebase I’m none too familiar with this evening and decided it was high time I learned how to generate a callgraph in python. A very brief Google search landed me here, and a commenter had exactly what I needed:

+                import inspect
+                bb.plain(" << ".join([i[3] for i in inspect.stack()[1:-4]]))

Which generates a very simple call graph:

parse << parse_file << worker << run << _bootstrap << __init__ << start << __init__ << Pool << start << __init__ << updateCache << runAsyncCommand << runCommands << idle_commands << waitEvent << main

Awesome module, thanks for the blog, and thanks for the comment!

May 222011

A month back or so I started tinkering with converting my drupal blog to wordpress. While I liked the idea owning my data, the required maintenance for drupal was more than I wanted to manage. WordPress offers a much more polished administrative interface and is trivial to upgrade, customize with modules, and much more flexible in terms of theming.

To convert my blog entries, I tweaked the script listed here. Since I was using Vernon Mauery‘s Acidfree Drupal module for photo albums, I had my work cut out for me to complete the transition from Drupal to WordPress. I brushed up on my MySQL and wrote some python to convert the acidfree references in the blogs to NextGen Gallery references. The result is what you see here.

While I was planning on hosting this blog on my personal NAS, I decided in the end that I don’t want the NAS to be the primary source of any information: blogs, music, photos, or otherwise. The NAS is a backup, and the only way for it to be a proper backup is if everything on it resides elsewhere. I also didn’t care to have to manage the security issues of exposing my NAS to the intertubes.

As part of the exercise I really wanted to come up with that perfect title and sub-title, that catchy five-words-or-less phrase that succinctly and completely described me and everything I might ever decide to burden my readers with. Thanks to Joshua Lock and Vernon Mauery for listening to me obsess over it. In the end I opted to keep it simple, and make it easy for you to tell whose blog it is in your feed reader (which is how you should be reading all but this post!) So here it is, in wordpress form. If you followed my blog previously, please update your RSS feeds.