I Remember

November 11, remembrance day. 

Never forget.

I Remember

Balsamiq on Debian 8 (Jessie)

I’m getting to the point where I have to start doing some wireframe work, so I can sketch out the UX for PART and some other side projects. One great wireframe tool is Balsamiq. Balsamiq offers installers for 64-bit Mac, and Windows, but nothing for Linux. This is a bit of a problem.

  • Because I am endeavouring to be more mobile, I have to use a laptop; i.e. I can’t be stuck in front of my office computer, which conveniently for Balsamiq is a 64-bit Mac running El Capitan (10.11).
  • I have two laptops at my disposal: one 32-bit Mac, and one 64-bit Thinkpad X200.  Both machines are dual-boot with Debian 8 (Jessie).
  • Clearly, I can’t use the 32-bit Mac, and if I use 64-bit Windows, I lose my development environment.
  • Luckily, Balsamiq runs under Wine.

Now, wtf is Wine?

Wine is a Linux tool that lets you run Windows apps.  Easy enough.  I booted up Debian on the X200 and proceeded to install, only to be faced with:

it looks like multiarch needs to be enabled. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine: Bad EXE format for Z:\home\tendim\LAKESUPERIOR\Balsamiq_Mockups_3\Balsamiq Mockups 3.exe.

What the hell does all of that mean?

Did some searching… I have 64-bit Debian installed, but it looks like Balsamiq requires a 32-bit windows installation. However, you can’t blindly perform a:

apt-get install wine32

Because then you get this message:

tendim@Carrot:~$ sudo apt-get install wine32
[sudo] password for tendim:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine32 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:

E: Package 'wine32' has no installation candidate

Damn it..

Unbeknown to me, there is a wine32 package, but you need to enable multi-architecture; this was the first half of the first error message, “execute “dpkg –add-architecture i386 && apt-get update &&”, which I conveniently ignored.

Anyhoo. Performing:

execute "dpkg --add-architecture i386
apt-get update
apt-get install wine32

Got me what I needed for Wine. Then, I followed the instructions here, and voila!, I now have a working Wine installation.

One final nuance is fonts.. In Balsamiq some text areas weren’t working (i.e. showing garbage symbols instead of actual text). This boiled down to missing fonts. The details are here, but in a nutshell the following got the requisite (minimum) fonts in place:

sudo apt-get install winetricks
winetricks corefonts

Time to get some wireframes going.

Balsamiq on Debian 8 (Jessie)

Installing .deb files on Linux

The Apple Macintosh has been heralded as one of the most user friendly computing platforms ever, with its full vertical integration of hardware, software, and peripheral devices. The Apple Macintosh, and Mac OS, are typically the epitome of user friendliness and accessibility. But, Apple being a business, effectively locks out older hardware from modern software bliss. Ironically, I had to install the most open source operating system in the world, one targeted at tech-heads and developers, to get my 2006 MBP running again at decent speed with more modern applications.

That said, one of my go-to apps is Remember the Milk, which I use to manage my day to day activities. Luckily, RTM has a Linux version. I run Debian, and RTM offers an Ubuntu version. This makes sense since Ubuntu is arguably one of the friendlier and more accessible Linux distributions. But, Ubuntu is built on Debian, so when RTM releases their app as a .deb package, this means I can download it. Woot!

Conventionally, I use apt-get.. I’m still wading in the shallow end of the Debian pool, but you can install a .deb file manually (i.e. without apt-get); this is mainly because apt-get is a front end to the Debian package manager, dpkg.

That said, thank you Ask Ubuntu @ Stack Exchange:

sudo dpkg -i DEB_PACKAGE

sudo dpkg -r PACKAGE_NAME

Now, RTM is happily running on a 11 year old laptop that the manufacturer has all but abandoned, thanks to some great open source software.

Installing .deb files on Linux

Mercury; offline reading.

With all of my at-home time, I’ve been reading a lot of stuff online.  One major challenge is picking up where I left off, or taking stuff offline to read elsewhere (e.g. on the streetcar to work).   Many browers have a Reader Mode which strips down a page to the bare essentials for easy consumption…  Currently to make this offlineish the workflow is:

  1. Switch to reader mode
  2. Print to PDF
  3. Export PDF to my BB Priv (Android) or iPad Mini (iOS)
  4. Read offline

Okay, that is very cumbersome.. Four steps, including an export and an import. And iOS is so crappy that the import is a daunting task.

I found out that Safari’s reader mode is based off of something called Readability.  I’ve never heard of Readability, but they are gone, replaced with Mercury.  This bears some more looking into.  Maybe an app that can slurp content via Mercury, and pump it to a datastore for consumption by other devices?  True, you’d need some cloud type stuff to sync stuff, but since I do this from home anyways, a one time wifi sync would be preferred to the hacking steps above to export to PDF, etc.

Mercury; offline reading.

Linux hacking

With our little one here, I’ve been looking for ways to become more mobile, especially with regards to development. At my disposal I have:

  • An 2006 15″ Macbook Pro (with a Core Duo processor, i.e. the 32-bit one) with a dead battery, so it is essentially a static machine
  • An aging ThinkPad X200, dual boot Win7 and Ubuntu.

Now, the MBP has a great 15″ screen with lots of resolution, but the X200 is truly mobile (e.g. it has a working batter), although the screen is on the small side.   So ultimately I will use both machines, but I have to baseline them with regards to development..

To date my development has been using Eclipse CDT on my Mac Mini.  The MBP only runs Snow Leopard (10.6.x) and the X200 runs Windows; both of these OSs are unusable for (modern) development.  Yes, the X200 also has Ubuntu, but that was just to fuck around, so the entire install is spotty at best.  Solution?  Fresh installs of Linux on both machines.

I managed to get Debian 8.0 (Jessie) installed on the MBP, and except for the buggy graphics driver, the machine is pretty nice to work on.  I worked on that for a week, and today I sat down to wipe Ubuntu from the X200.  It was a pretty simple install, with the following caveats:

  • Debian installer asks for non-free drivers for the wifi, so I had to install over Ethernet and install wifi after the fact. Instructions were found here
  • The X200’s TrackPoint didn’t work, out of the box, so I had to follow the instructions here to get the middle button to allow for scrolling: instructions.

Because the Internet never seems to keep pages forever, I’m jotting notes down here for future reference. For installing the wifi drivers on the ThinkPad X200, instructions for getting wifi to work were pretty simple after the install was complete.  Log in, switch to root (or sudo everything), and:

  • Add a “non-free” component to /etc/apt/sources.list, for example:

    # Debian 8 "Jessie"
    deb http://httpredir.debian.org/debian/ jessie main contrib non-free
  • Update the list of available packages and install the firmware-iwlwifi package:

    # apt-get update && apt-get install firmware-iwlwifi
  • As the iwlwifi module is automatically loaded for supported devices, reinsert this module to access installed firmware:

    # modprobe -r iwlwifi ; modprobe iwlwifi
  • Configure your wireless interface as appropriate.

For the latter (TrackPoint), you had to:

  • Install xinput via:
    apt-get install xinput
  • And then to enable vertical scrolling

    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200

As I type this Eclipse CDT is installing in the background, after which point I can start hacking again on PART.


Linux hacking

The SINs of Birth Certificates.

Well, fucked that up.

Ontario has a lovely 4-in-1 process for registering your newborn, getting a SIN, birth certificate, the works.  This process combines four things:

  1. Newborn registration
  2. Birth certificate
  3. SIN registration
  4. CRA credits registration

It’s a great idea: you leverage economies of scale when doing Step 1, and this information automagically feeds into Steps 2, 3, and 4.  To do the latter three items you normally have to have a wack of certified documentation to prove that you are who you say you are.  Understandably, this prevents fraud, etc.

However, if you only complete Step 1 and have to abort to continue later, you can not use the same service for Steps 2, 3, or 4.  This is nonsensical to me.  While I can appreciate not building the infrastructure to “save and continue later,” Step 1 does give you a confirmation number.  It should be trivial to use that confirmation number as an input to Step 2, and continue where you left off.  Alas, this is not the case.

This means, I have to wait 4-8 weeks for Step 1 to complete (i.e. receive the requisite documentation in the mail), before I can proceed with Steps 2, 3, and 4.  And then each of those steps takes 16 weeks..  In total, an 8 week process has now expanded to:

  • 8 weeks for Step 1
  • 16 weeks for Step 2
  • 8 weeks for Steps 3 and 4 (which can presumably be done in parallel); worst case: 16 weeks, 8 weeks each

This is a far cry from:

  • 8 weeks for Steps 1-4 if done at the same time (i.e. not aborting to continue later)

By aborting to continue later, I have effectively added 32 weeks to the process.


The SINs of Birth Certificates.