Archive for January, 2010


Being Cocky Will Ruin Your Product: A Western Digital Passport Case Study

Product managers, engineers, marketers, and those who support them can be amazingly pretentious. If you are involved in designing a product, please make sure that you understand this important point: it doesn’t matter what you build, or how good a job you do, your product is not cool enough to force on everyone and expect them to like it. Yes, this is a universal law. Yes, even for Apple. Eventually you will find out how much you have alienated your customers.

The Western Digital Passport drives are a perfect example. I recently needed to buy an external backup drive for work. I really liked the Passport drives: lots of storage packed into a sleek form factor small enough to be tossed in a laptop bag. However, they ruined the drives with their awful backup software *ahem* rootkit. They implemented this “feature” in the most awful way possible; it is on the drive taking up space, but the firmware makes it look like a read-only CD image. It is really hard to remove, but it might be possible to disable it with a tool available at Western Digital’s web site. Unfortunately for me, the tool bricked my drive (and lost my data). I guess they posted the tool because removing the software would look like admitting a mistake. I am actually glad it failed because then it was easy to return the drive and get a SeaGate FreeAgent.

If I was in the market for a backup solution, I would have bought a product marketed as a backup solution. Western Digital: I wouldn’t be offended that you gave me free software if you put it on the drive like every other sane manufacturer. All of your funny business adds confusion and gets in the way of me using the drive for its intended purpose: dumb file storage.

The lesson for product designers is clear: understand that every option you remove limits your customer base, and options that look senselessly removed make for angry former customers. If you can provide ease of use without limiting flexibility, exerting control just makes you look like a jerk. Being cocky can ruin your product.

By the way, though not quite as small and sleek as the Passport, the Seagate FreeAgent Go provides more storage per dollar, a significantly longer warranty, and works fuss free.

Thank you Seagate for providing an excellent alternative.

[ Read More | 0 comments | 0 pingbacks | , , ]

Kubuntu Karmic on Dell Mini 10

Background to Buying a Linux System

My family switched to all-Linux in 2002. Mid-2004 was the last time I purchased a Windows license for personal use; though I have a copy of XP that I still occasionally load in a VM. 2004 was the year I bought an HP laptop that came with Windows, and I put Linux on it during its first boot. Since then I have purchased a Lenovo Thinkpad and four Dells with Linux pre-installed. It is infuriatingly difficult to avoid the Microsoft Tax, but it is possible. A lot of vendors offer FreeDOS systems these days. More important than not paying Microsoft (and more difficult) is finding a machine with Linux pre-installed.

This is not as difficult as it was. Not long ago, the only way to obtain a machine pre-installed with Linux was to purchase from a reseller like Emperor Linux. These resellers don’t have the resources of the manufacturer, and they likely paid the Microsoft Tax for you before they put Linux on the device. However, options are gradually improving. The manufacturers have experimented with Linux systems and HP, Lenovo, and Dell all sold consumer equipment pre-installed with Linux in the recent past. (I hear Sony does too, but I refuse to buy Sony products given their history of proprietary technologies, root kits, etc.) Unfortunately, all these manufacturers stopped selling the systems after a short time. After a couple of failed experiments, Dell seems to have figured things out and turned into a reliable Linux distributor with a decent selection of systems. Here is the secret to buying a Linux system from Dell: many of the best Linux configurations are only available when using the “Small and Medium Business” section of their site; the open source offerings page does not list all of their Linux offerings. The rest of this blog post details the other sad secret: Linux systems from Dell don’t necessarily play nicely with Linux.

Before we proceed, I should point out three reasons why it is worth putting in the effort to get a system with Linux pre-installed:

  • Since the manufacturer is willing to support Linux running on the hardware, it is reasonable to expect that it should be easier to configure with Linux than other equipment.
  • Being officially counted as a Linux user sends a direct message to the market that manufacturers should support Linux.
  • Buying a machine with Linux pre-installed confers moral superiority.

Okay, so the second and third reasons are probably imaginary. I am sorry to report that the first reason is largely a fiction as well. It would be more accurate to say: since the manufacturer is willing to support Linux running on the hardware, I know that someone, somewhere got Linux to at least sort-of run.

Notice that saving money is not on the list. I am not sure what back-room deals make it as expensive to buy a machine installed with Redmond’s proprietary OS as it is to purchase a freely available OS like FreeDOS or Linux, but that is how Dell’s pricing model currently works. In other words, at the current time paying the Windows Tax, and then putting Linux on yourself is just as economical a decision as purchasing Linux pre-installed. This is good for Emperor Linux.

Buying a Dell

Dell has been shipping systems pre-installed with Ubuntu for over two years now. The ten minutes I spent playing with the stock OS were impressive. However, I choose to reinstall with the latest stock Kubuntu release for a few reasons:

  • I am a control freak and want to know exactly what is on the system.
  • I am a KDE fan, and Dell ships Gnome by default.
  • The Dell releases are pretty old (they are still shipping 8.04).
  • I don’t see much value in having an officially licensed DVD and MP3 player, though others might.

I bought an Inspiron 530 with Ubuntu over eighteen months ago. It took stock Kubuntu flawlessly and has run great the entire time. It has been the perfect Linux desktop for my kids’ machine. I highly recommend this product.

I have purchased two Inspiron Mini 10v netbooks with Ubuntu since last September. I really like these machines. They took stock Kubuntu okay—you have to install a binary blob for the wireless card (you can get the details in the Mini 10 section below), but everything else worked out-of-the-box. They are reliable machines, though I hated the touchpad for a long time. After three months I am starting to get used to it. These machines are so great that I can’t seem to keep them—family members keep buying them from me and then I have to order myself another.

I was so happy with my previous experiences that I decided to buy the top-of-the-line Linux netbook: the Inspiron Mini 10. This model must be purchased through the “Small and Medium Business” website. It has a much nicer screen, a multi-touch touchpad, faster processor, and more memory. However, getting stock Kubuntu to work on it was not as easy as I expected. Here are the details.

Kubuntu on a Dell Inspiron Mini 10

Proprietary drivers: bringing the pains of Windows to Linux!

Though I don’t know the exact reason Dell ships their Linux netbooks with a lot of binary-only proprietary drivers, I suspect that it has to do with their desire to pack in as much power per battery mWh as possible. The Mini 10 series does have impressive battery life—I am constantly surprised at how long I can go without plugging in (I plug it in most nights and haven’t run out of juice yet). I guess that Dell feels like the only way to achieve that is to use the Intel Poulsbo Chipset that requires a proprietary graphics driver. I suspect similar logic is behind the awful Broadcom wireless card as well.

Broadcom wireless driver

These Dell netbooks are not very useful until you get wireless networking setup. I had to install using a wired connection for both the Mini 10 and the Mini 10v. It is then necessary to setup the binary Broadcom driver. My understanding is that the new Jocky hardware tool will take care of this once all the correct packages are pulled down, but I am more comfortable with the command line.

aptitude install dkms patch bcmwl-kernel-source b43-fwcutter

That command is all it takes, but I’ll offer a little bit of explanation:

  • dkms: This is the Dynamic Kernel Module Support framework. It is a really nice way of making sure that picky kernel modules are always correctly built against the currently running kernel. Not only does this make binary drivers easier to manage, it also solved my constant problems with updates breaking VirtualBox (on my development box—I would not recommend running VirtualBox on these netbooks).
  • patch: This is required for the script to edit the bcmwl package before compilation. It should really be a dependency. It took me a while to realize the error I was getting was due to patch not being installed.
  • bcmwl-kernel-source: This is the proprietary driver for Broadcom wireless cards.
  • b43-fwcutter: This is a tool to install the binary blob into the Broadcom 43XX firmware. I’m not certain that it is necessary. I installed this before I realized that the DKMS driver was failing to build because of the missing patch dependency. I suspect that I would have eventually had problems if I hadn’t installed this tool.

As part of the install, dpkg correctly compiled the kernel module, inserted the binary blob, and got everything setup. KNetworkManager appeared to see the wireless at that point, but KNetworkManager hates my WPA2 setup, so I always use wicd. Don’t forget to manually tell wicd that eth1 is the wireless interface, or wicd will report that no networks are found even though iwconfig will work and wlist scan will show networks.

Sound

Remember to turn up the volume of the PCM channel.

Multi-touch touchpad

Works great:

  • 1 finger tap: left click
  • 2 finger tap: middle click
  • 3 finger tap: right click
  • place 1 finger, drag one finger: scroll (vertical only)

I don’t currently have horizontal scroll or pinch zoom working.

Video

The biggest let down with the Dell Mini 10 is the Intel Poulsbo chipset. The larger resolution of the 10 is the most appealing feature to justify the upgrade from the 10v. Unfortunately, Intel didn’t open source the driver like they have with their other GPUs because the Poulsbo is based on third party technologies. If you think the Intel name will guarantee good Linux support, you are mistaken. Ars Technica has a good rundown on the problem.

The summary is that the binary driver is only supported by Dell on the versions of Ubuntu that they are shipping. Getting packages for other versions and distributions is challenging and not very reliable. However, I was able to get the driver to work on Kubuntu Karmic Koala (9.10).

Here are the basic steps, distilled from a Launchpad Bug Report:

  1. Add this PPA to ”/etc/apt/sources.list”:

    deb http://ppa.launchpad.net/lucazade/gma500/ubuntu/ karmic main
    deb-src http://ppa.launchpad.net/lucazade/gma500/ubuntu/ karmic main
    
  2. Get this missing package: wget xorg-video-psb.deb. Install it with dpkg -i.

  3. Run this command:

    aptitude update; aptitude install psb-kernel-headers psb-kernel-source psb-modules psb-firmware libdrm-poulsbo1 poulsbo-driver-2d poulsbo-driver-3d xpsb-glx
    
  4. Create this file: “/etc/X11/xorg.conf” with these contents:

    Section "Device"
            Identifier "Configured Video Device"
            Option "IgnoreACPI"
            Option "AccelMethod" "exa"
            Option "MigrationHeuristic" "greedy"
            Option "NoDDC"
            Driver "psb"
    EndSection
    
    Section "DRI"
        Mode 0666
    EndSection
    
    Section "Monitor"
            Identifier "Configured Monitor"
    EndSection
    
    Section "Screen"
            Identifier "Default Screen"
            Monitor "Configured Monitor"
            Device "Configured Video Device"
    EndSection
    
    #Added for mouse pad
    Section "InputDevice"
            Identifier "Mouse0"
            Driver "synaptics"
            Option "Protocol" "auto"
            Option "Device" "/dev/input/mouse0"
            Option "ZAxisMapping" "4 5 6 7"
            Option "CorePointer"
            Option "HorizEdgeScroll" "1"
    EndSection
    
  5. Reboot

Once it all works, you are rewarded with a very nice display which makes the netbook significantly more usable.

HDMI out

Video worked fine after enabling the external display with xrandr.

I couldn’t get audio working. Here is what I tried:

  • Unmuted the IEC958 channel in alsa-mixer (and enabled it in KMix to be sure.
  • Changed the device order in System Settings -> Multimedia.

Remaining problems

  • Enabling desktop effects completely broke KDE. I had to revert to a backup.
  • The driver cannot keep up with a full screen Hulu video, even when the video was fully buffered and at a non-HD resolution.
  • The panel that is the top menu for Kubuntu Netbook Remix cannot be resized. On the high resolution screen the lock / logout buttons are very tiny and cannot be configured to be any bigger.
  • I am getting lots of these errors: hda-intel: spurious response 0x0:0x0, last cmd=0x . . . but I don’t see any negative effects.

Conclusion

I am undecided whether the Dell Mini 10 is worth the hassle. I really like the multi-touch touchpad, the additional RAM, and the bigger memory. On the other hand, the significantly cheaper Mini 10v just works. If Intel and Dell could get the video driver problems ironed out, this netbook would be great.

[ Read More | 2 comments | 0 pingbacks | , , , , , ]

NetBeans 6.7 as a PyQt IDE

The Setup

After working for over a year as the only tech guy in our little start-up company, we brought another developer on to help with some of the reporting tasks. In an effort to mitigate the damage a contracted hit-man could do to our collective efforts (the hit-by-a-bus metaphor is so passé), I have been trying make sure my new teammate is familiar with the development tools I have been using.

We are from two very different worlds. I have been comfortable doing all of my development in Vim, though I occasional use Qt Designer for complex form layout and Eric IDE for visual debugging. My teammate found the Vim plus shell toolset to have too steep a learning curve, so I started a quest to find an IDE that we could both use comfortably.

Eric4 IDE

My first attempt was with Eric. It is a decent, open-source PyQt IDE. It is a snap to install on Ubuntu, but my teammate got frustrated installing the various dependencies for development on Windows. Though Eric is an adequate IDE for my purposes, it is very cluttered and has a confusing interface. Given how clumsy it can be to navigate, I didn’t feel good about pushing my team member to get it working. Eric does however have excellent integration with the Qt tools. I was a little nervous to move away from Eric until I realized that most of the magic is done by calling pyuic4 on the back-end.

Eclipse and PyDev

My next experiment was with Eclipse. I used Eclipse plus PyDev long ago, and found it adequate though I reverted back to Vim. When I gave it a fresh look, I was encouraged that PyDev was no longer half-proprietary and had lots of new features. Eclipse also has a lot of database plugins which might help my teammate visualize the structure of our embedded SQLite data store.

Installation on Linux was a single aptitude command, but it proved to be a complex IDE to set up. Learning how to install plugins wasn’t bad, but the selection was confusing. I’m still not sure which Qt plugins are necessary for PyQt development—I erred on the side of installing extra. Then I had to wrap my brain around perspectives, and configure them to be logical (Mylyn looks to address some of these problems, but it was yet another new paradigm that had to be grasped before I could get any work done). I also had to find a supported Mercurial plugin and figure out how to get my existing code into a project—a process which was not very intuitive. Riddle me this: Do you create a Mercurial Project or a PyDev project? Answer: Create a PyDev project and give it your existing Mercurial repo as the home directory, then right click on the folder in the project explorer, go to “Team”, and select “Share Project”. At that point you can tell it that you are using Mercurial. After all this work, I still felt like it was a clunky IDE with no good Vi keybindings (though the reasonably priced proprietary viPlugin might have solved that one). My other big gripe is that when stepping through my Python application, the integrated Python shell does not see the current debugging stack—a feature of Eric that I found to be extremely valuable. My teammate spent a little bit of time trying to install Eclipse and found it to have more dependencies than Eric.

At the end of the day, I think I like Eclipse but I don’t think it will work for my current project. It compares favorably with Visual Studio (which is also a bear to setup for an existing project, especially with a heterogeneous tool set), but it will take a lot of effort to get my team productive in it. Though I expect it would eventually prove adequate, I decided to explore alternatives before settling.

NetBeans Plus nbPython

At some point last month I came across a blog posting about the NetBeans Python plugin. It looked like it might meet our needs, so I decided to give it a shot. I think it is the most complete solution I have come across so far, though it currently has some annoying bugs.

My first impression is that NetBeans is ugly. I mean the kind of ugly that gets kids sent home from school. Yeah, it is Java Swing ugly. Swing’s default look and feel (Metal) payed more homage to Motif than to the competing toolkits of 1995. Metal is so ugly that it single-handedly prevented developers from adopting Java on the desktop (that and the fact that early expectations for Java far exceeded reality, oh and Microsoft’s abusive tactics). But enough ranting, because Sun finally sort of fixed it. To get NetBeans to use the not-so-ugly Nimbus look and feel, simply copy “/etc/netbeans.conf” into your local .netbeans folder, and add --laf Nimbus to the --netbeans_default_options line.

Impressions:

  • NetBeans is pretty usable by default. It is much quicker to get started with than Eclipse.
  • NetBeans appears customizable enough for my needs. It is much more configurable than it at first appears.
  • The options dialog is very poorly organized and hard to use.
  • My Dansguardian setup was blocking the automatic download and installation of updates and some plugins, so I had to add updates.netbeans.org to ”/etc/dansguardian/lists/exceptionsitelist”.
  • I turned off the additional update check in the plugins dialog; it was annoying me.
  • There are some decent dark themes, but it doesn’t look like it because the option window doesn’t change the background color.
  • I installed the “Extra Color Schemes” package under the “Ruby” Category, and settled on “Dark Pastels”. I then changed the default to a fixed-width font (Lucida Sans Typewriter). It looks much better.
  • Unfortunately, I don’t see how to change any window except for the editor window to be dark.
  • The jVi plugin is awesome. It is everything you would expect an embedded Vi plugin to be. Manually installing plugins was a little tricky: Under the “Tools” menu, select “Plugins” then select the “Downloaded” tab and click “Add Plugins”
  • The Mercurial plugin was already installed in the Ubuntu package. It works okay. It is straight-forward to use.
  • It reduced confusion for me to disable the plugins that I am not using (like CVS). The menus are less cluttered now.
  • The Python plugin works good. The Python shell is aware of the symbols in the debugger. There doesn’t appear to be a command history in the python shell, which is annoying.
  • There is a nice SqlBrowser plugin. It’s pretty basic, but it is useful. To hook it up to SQLite, you need to install the JDBC Sqlite Driver plugin, which is downloadable from http://plugins.netbeans.org. Once it is installed, go to the “Window” menu and select “Services”. Then in the Services explorer, you can configure an SQLite Driver data source. Leave the username and password blank. Specify the jdbc connection like so: jdbc:sqlite://home/<dir>/<dbfilename>.db The SqlBrowser does not provide any visual view of tables with foreign key relationships mapped out. But there is a tree view of the database schema and you can execute SQL line-by-line and browse the results.
  • There are some cool tools. It says that I don’t have a very consistent coding style. That is true, and useful. I wish I had started the project with a good coding style and then followed it’s warnings—for new I just have to turn it off.
  • PyLint appears to be integrated already. I don’t see any pylint configuration, but it is giving me warnings that I usually expect from that tool (unused import, etc).
  • I didn’t need to do anything special to work with a PyQt application.

Remaining Problems:

  • It is not saving the Python Platform setting. I have to reselect Python 2.6 (instead of Jython 2.5) each time I open NetBeans. I am hitting the “Make Default” button, but it forgets every time it is closed.
  • Debugging seems kind of buggy. It has problems with my signal handling (the error message says “ValueError: signal only works in main thread”). I commented out the signal assignment for now, and I’ll detect when I’m in debug mode in the future. Now the debugger runs the application alright (don’t be weirded out because it stops on the first line—that’s configurable), but once it hits the first breakpoint it doesn’t want to resume code stepping (though the application GUI is still responsive). I can’t get it to break at a second breakpoint. It sounds like this bug to me: https://netbeans.org/bugzilla/show_bug.cgi?id=169757
  • The UI is sometimes laggy.

Summary: NetBeans is really close to being an excellent Python development environment. I think I’ll nudge my team in this direction and hope that the next release addresses the bugginess that I’m struggling with.

[ Read More | 3 comments | 0 pingbacks | , , , , , ]

Feed Spamming Apology

I discovered today that my blogging platform is including in the blog feed any post I update. And it counts as an update changes like enabling and disabling commenting on an old post. This behavior means that I have been spamming your feeds with old posts whenever I make a these innocuous changes.

I am a little embarrassed, and thought I should apologize.

Sorry for spamming your feeds.

I’ve implemented a band-aid for the bug. I’ll be more careful going forward.

[ Read More | 0 comments | 0 pingbacks | , ]

Email: Password:
OpenID URL:
Forgot Login? Close