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_x1_i1 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:

\[\e[32;1m\]$PROMPT\[\e[0m\]

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

linux-yocto-2.6.37+git1+79669230fd82a3e7e254cf8b596a2388a4333e62_1+e53debfc6896bb89174ebb74154ed9b3bc72b59c-r18

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:

TITLEBAR="\[\e]2;\w\a\]"

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

if [ $TERM != "linux" ]; then
    TITLEBAR="\[\e]2;\w\a\]"
fi
GIT_PS1_SHOWDIRTYSTATE=1
PROMPT="\u@\h:\w\$(__git_ps1 ' [%s]')\n\$ "
PS1="$TITLEBAR\[\e[32;1m\]$PROMPT\[\e[0m\]"

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]'
    fi
}

if [ $TERM != "linux" ]; then
    TITLEBAR="\[\e]2;\w\a\]"
fi
GIT_PS1_SHOWDIRTYSTATE=1
PROMPT="\u@\h:\w\$(git_ps1)\n\$ "
PS1="$TITLEBAR\[\e[32;1m\]$PROMPT\[\e[0m\]"
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 http://stefaanlippens.net/python_inspect, 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
 

wordpress-logo 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, dvhart.com in wordpress form. If you followed my blog previously, please update your RSS feeds.

May 042011
 

elc-rt-roadmap With the soon to be legendary “roadmap” Thomas Gleixner presented at the 2011 Embedded Linux Conference for the PREEMPT_RT patch series, people are likely wondering what that means for projects like The Yocto Project which make the PREEMPT_RT patch series available as part of a larger integration project.

It is our goal to maintain the linux-yocto recipes and git repositories as closely aligned with the mainline kernel as possible. This primary goal sets the schedule for which kernel version will be used as the basis for the next major release. 0.9 released with 2.6.34, 1.0 with 2.6.37, and 2.6.39 or 40 are likely to follow. These won’t necessarily align with the supported PREEMPT_RT kernel versions.

We have a few options. First, we could port PREEMPT_RT to whatever the next kernel version turns out to be. Second, we could release a separate kernel tree just for RT. Third, we could just not include PREEMPT_RT when the versions do not align. There is precedent for the first option, and indeed this exactly how we provide a 2.6.34 PREEMPT_RT tree with 0.9 and 1.0. We took the third option for 1.0 and the 2.6.37 tree, preferring to stick with the 2.6.34 version for RT kernels rather than do yet another forward port to 2.6.37, duplicating much of Thomas’ work toward a 2.6.38 PREEMPT_RT. This is time consuming, error prone, and doesn’t contribute to the overall quality of the PREEMPT_RT patch series as it is somewhat apart from that which Thomas releases. The second option, a separate kernel tree, is contrary to another key goal of The Yocto Project, which is to reduce duplication of effort. A separate kernel tree would require duplication of the meta branch, and all the bug fixes, security fixes, and feature sets would have to be applied to each tree.

Going forward, our approach to PREEMPT_RT will be as follows. We will strive to align with the official PREEMPT_RT releases. When that is not possible, we will favor skipping RT support in a kernel version or two just as Thomas does with PREEMPT_RT. In very rare occasions, such as with the 2.6.34 kernel, we may opt to forward port PREEMPT_RT to align with the current linux-yocto recipe’s base kernel version.

May 032011
 

I’ve reviewed Ubuntu’s NetBook remix and then 10.10′s Unity, and wasn’t impressed with what appeared to be beta-ware at best. Now that 11.04 is out, I felt I should give it a spin before abandoning my preferred distribution of the last several years. I grabbed the amd64 11.04 live cd, used unetbootin to make a bootable USB Key, and booted my x201 to the Natty Narwhal.

First the good. The Unity interface has been polished up a bit, it’s smoother and less clunky. Some small space savings features are effective: the maximized window title bar in the panel and the mouse-over file menu in the panel (ala Mac OS). The narrow scrollbar will a mouse over grab bar is actually particularly nice (or is this just GTK3?).

Unfortunately, not all the core applications work with these enhancements. Firefox and Libre Office in particular. They use the traditional scroll bars, and Libre Office’s file menu doesn’t relocate to the panel. This sort of partial implementation doesn’t stop there. The new menu system was non-intuitive for me and I found it difficult to navigate. There were few categories and the intent of the Ubuntu button versus the Applications button on the panel (labeled with a magnifying glass with a + ???) is still unclear to me. While the Unity bar and the new full screen menu system feel like a move away from the Desktop/Files/Folder paradigm, there are still icons on the Desktop, which are often obscured by the new UI elements.

Sadly, the dark gray, orange and purple scheme from 10.x persists, and is as garish as ever. The UI’s name doesn’t seem to have done much to influence the design of Ubuntu’s latest desktop. The icon theme feels at odds with the default color scheme and artwork. While the garish colors and the icon theme can be easily changed, some bits here and there, such as the Unity panel, are unaffected by the theming, and remind me again that Unity falls short unifying the components that must work together to provide a polished desktop user experience.

While I have enjoyed using Ubuntu for several years, I have become increasingly disappointed in their focus on creating their own UI rather than embracing, infuencing, and supporting efforts like GNOME 3. I won’t be using the Install icon, when it comes to upgrade, I’ll be moving on to Fedora 15.

Mar 132011
 

We are being harassed by collections agencies looking for individuals we do not know and do not live here. We recently changed our number for a similar problem with agencies looking for individuals with the same initials (m. hart) as our previous public number. We now have a private number, but that number has been associated with persons with unpaid debts in the past. I am extremely frustrated that the primary use for my phone service is for collections agencies to try and reach people I do not know. Phone service providers need to provide their customers with a means to prevent this. For example, a blocked number list that I can add numbers to from the web interface. The caller should just hear the phone ring and never be directed to voicemail or receive any kind of message. If something doesn’t change soon, I am considering canceling my voip service since I strongly object to paying for a service which provides more rights to collections agencies than to me.

For now, I’ve filed complaints against GE Money with anyone who will listen and will be canceling every account I have with them. Good-bye GAP card. If you object to being called repeatedly at inconvenient times, having your child woken up early, and being lied to over the phone – consider doing the same.