music to your /dev/ears
Thursday, January 25th, 2007Listen to the penguin g0ds sing!
$ cat /proc/kcore | /dev/sound
Listen to the penguin g0ds sing!
$ cat /proc/kcore | /dev/sound
Tonight I am at the tipping point of writing unit tests. Initially I spent 4x effort on writing tests vs. writing code. Ugh! it was brutal… I felt like I was running through sand just to develop a single feature! Though, now I am gaining 10x in effort when refactoring.
I’ve been writing a Ruby API for a particular “application” and have been 1:1 diligent on writing unit/mock tests for every piece of code.
After weeks of contemplation, I decided to refactor/modularize the code into a hierarchical ‘module’ namespaces (like java package namespace). Changing this has HUGE ramification on how each piece of code “sees” any other dependent piece of code. After a few minutes of global regex’ing, the unit test framework to include the new namespace names… wha-la! test passed. Do I trust it… yes. code that test code. heck yeah!
I have always been a firm believer in unit testing… on the fence about test-driven development (TDD) from a practical/experience standpoint… but having a test framework in place upfront makes a critical difference. onward ho!
It’s a new snowboard season and I managed to get two full days in at Whistler this past December 2006. I met up with my friend Luis (on right) and his female companion Kerry. We hit some sick hike-to lines at the top of Blackcomb and had some incredible views to go along. One day I’ll have something like this in my backyard… Luis and I are a great pair to hit the slopes because we have similar interests and “go anywhere” spirit. Though, Luis is definitely leading the way when it comes to serious vertical terrain. I wish we had pics of our double-black diamond runs Couloir Extreme and Ruby bowl area.
I ran into a super crazy linux environment problem that inadvertently caused a runtime exception with InstallAnywhere. The solution left me shaking my head because I never would have guessed it. So, here’s the solution in case someone runs into the same issue. Thanks to Adam Funk for taking the time to post the original solution. I was installing a software package on Ubuntu 6.10 — though the problem is with the installer application InstallAnywhere.
The Problem - InstallAnywhere pukes with a nasty “Malformed encoding” stack trace.
dthomas@dthomas-laptop$ ./Application_4_5_1_Linux_x86_2_2.binPreparing to install... Extracting the JRE from the installer archive... Unpacking the JRE... Extracting the installation resources from the installer archive... Configuring the installer for this system's environment... Launching installer... An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX) Stack Trace: java.lang.IllegalArgumentException: Malformed uxxxx encoding. at java.util.Properties.loadConvert(Unknown Source) at java.util.Properties.load(Unknown Source) at com.zerog.common.java.util.PropertiesUtil.loadProperties(DashoA8113) at com.zerog.lax.LAX.(DashoA8113) at com.zerog.lax.LAX.main(DashoA8113)
The Solution - Remove “\u” from your PS1 environment variables then re-install
For some reason, InstallAnywhere is loading and interpreting environment variables from the shell and thinks \u is the start of an encoding… Maybe this is an episode of “When regex goes wild, Part 1″. I have the following in my .bashrc:
export PS1="[\w]\n\u@\h$ "
Either remove the “\u”, comment out PS1 from your .bashrc, or run “unset PS1″ before installing your application. Keep in mind if you unset your PS1, the shell prompt will be invisible… you can still execute commands, you just won’t have a nice blinking cursor.
Anyone who works with files knows that the unix CLI is the undisputed champion. Though, I frequently work with customers who use Windows exclusively and don’t have the interest or permission to install tools like GnuWin32 or cygwin. In this case and especially when troubleshooting, I’ve found the following trick to emulate “pipe xargs” when manipulating or running a command on sets of files.
As one would expect, it takes 2 lines in DOS to produce the same effect in Unix… but I digress. At least the “pipe xargs” can be emulated with relatively minimal effort in DOS.
After almost 10 years as a Redhat junkie, I finally made the move to debian… well, kind of. I’ve had a GNU-based, philosophical interest in debian for many many years, but never adopted the distro after numerous failed installs based on unsupported bleeding edge hardware — we all want the latest gear, right?
Enter Ubuntu…. I installed Ubuntu 6.10 exclusively on one of my spare boxes (Intel P4/1Ghz/1Gb). I also formatted my work laptop (Intel PM/2Ghz/1Gb) and dual-booted it with Ubuntu 6.10 and Windows XP. To my surprise but not shock, the install was trivial and all hardware on both machines was fully recognized and supported — even the wireless network adapter on the laptop! So far the only things that tripped me up were:
Of course the first thing I replaced was Gnome/Metacity in favor of the best window manager of-all-time WMII — who needs a mouse! I’m sure I’ll be ranting and raving about this distro for a few weeks/months to come…