Incredibly busy as usual

I have lots of drafts in queue, just not enough time to finish them. I’ll make a concerted effort this weekend. As an update to a previous post, I managed not to collapse during my brown belt test (had some respiratory issue going on … allergies, or a cold, or something). The kata were not … Read moreIncredibly busy as usual

Tiburon extensions

Basically, I can boot quite a few Linux systems completely stateless. I like this. Makes setting up clusters drop-dead simple. Makes setting up/testing hardware similarly simple. Where I am going with this: I’ve been playing with Solaris 11, and to a lesser extent, the Illumian distros for Solaris. So far, I like what I see … Read moreTiburon extensions

Code angry: fixing a self-inflicted bug in Tiburon

I hate when I try to write generalized code up front. That is, I try to write a code base that is sufficiently generic that it works for all possible use cases. Some argue for this sort of development. I don’t like it. But I do fall into this every now and then.
Tiburon suffered from some of this. I want one system to “bind them all, and in the PXE process, boot them.” So I threw everything (including the kitchen sink) into it.
It sorta broke on me on Thursday.
I was working on a set of changes to boot Centos 6.2 via Tiburon. I wanted to add some features. I kept running into design … er … features.
So I took a scythe and cleaned out the dead code. I (massively) simplified the current code base. I knew I had to do this, I tried pushing too much functionality into Tiburon, functionality that I’ve since superceded with the boot time autoconfig scripts.
So I pulled that crap out. I rethought a few things, including how I passed some arguments.
Way back when I started learning Perl, I passed arguments to subs (methods) like this:

&function($arg1, $arg2, ..., $argN);
sub function {
my $arg1 = shift;
my $arg2 = shift;
.
.
.
my $argN = shift;
# do stuff
}

Ugly, ain’t it. Hard to maintain too. Basically, if you need more than 2 to 3 arguments, create a hash (collection for python-philic) that maps a named key into a value. Then pass a reference to the hash. Brain dead easy, never have to worry about argument order again.
For reasons I don’t grasp, Tiburon had a few calls like this in its core.

Read moreCode angry: fixing a self-inflicted bug in Tiburon