Recession, War, Politics, Poverty…. Software Development?

July 17th, 2009

The way things are these days, you’d think that I, like I would imagine many other people in the world, would be thinking about money, the recession, the potential for war between countries who have been flirting with the bomb, my mother and the sale of her house, poverty in Africa, and the general suckage (is that a word?) in the world.

But no, I’m not thinking about those things.  What’s on my most most of the time is software development and programming.  I’m constantly thinking about what I’m good at, what I suck at, and what I need to do to get better.  Is that selfish?  Let me answer that - yes it is very selfish, but I don’t necessarily believe that selfishness is always a bad thing (part of me can relate to Ayn Rand’s philosophy of Rational Self-interest).

The question though is not “is this selfish?” Rather, the question I’m putting out there is “is this normal?” There are enough things going on right now in my life, dealing with situations and people that I find simply unreasonable, that I’m finding it hard to identify what is “reasonable” any more, because what I see as unreasonable seems to be the norm for the majority.

So is it wrong to think about my career and personal development during times of stress? I feel it to be instinctive to focus on your strengths during times of uncertainty, but what do others out there think? Do you feel that in times of stress, you should cut away from what you’re used to and try something new, or go on vacation? Or do you believe that it’s the perfect time to share with others, give back to your community or family and try to increase your karma (if you believe in such things)? These courses of action are not mutually exclusive, but it helps to identify what needs focus if they’re not jumbled together.

If this post seems a little incoherent, it’s 1am, and my eye-lids have been drooping constantly since I started typing.
Have a good night all :)

Converting Freemind Mind-maps Directly to Perl Hash Trees

May 29th, 2009

I use Freemind quite a bit for brainstorming and as an outliner.  One of it’s better uses for me is to hammer out an idea for a perl hash tree very quickly.  The problem is that once I have the hash tree exactly the way I want it in Freemind, I have to manually re-create the hash tree in perl source, with all the required formatting.

This is no longer the case, as I’ve written a quick and dirty “freemind2perl” script (below) which takes a Freemind mind-map file, and converts it into a perl hash tree automagically.  I’m not sure if it will work with all versions of Freemind, but mind-map files (.mm files) are XML based, and the format really hasn’t changed across versions.

Just save the script below as ‘freemind2perl.pl’ and run it with ‘perl freemind2perl.pl yourmap.mm’.  It requires the “XML::Simple” perl module to be installed.

Here’s the script (click here to download):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/perl -w
 
use strict;
 
use XML::Simple;
use Data::Dumper;
 
my $xml = new XML::Simple;
my $mm_file = shift;
my $data = $xml->XMLin("$mm_file");
my $clean;
 
sub prep_clean
{
    my $data = shift;
    my $clean;
 
    foreach my $key ( keys %{ $data } )
    {
        if ( $key eq "TEXT" )
        {
            $clean->{$data->{$key}} = 1;
        }
 
        if ( $key eq "node" )
        {
            if ( ref( $data->{$key} ) eq "HASH" )
            {
                $clean->{$data->{'TEXT'}} = prep_clean(\%{$data->{$key}});
            }
 
            if ( ref( $data->{$key} ) eq "ARRAY" )
            {
                my $sub_hashes = {};
                for ( my $i = 0; $i <= $#{$data->{$key}}; $i++)
                {
                    foreach my $sub_hash ( \%{ $data->{$key}[$i] } )
                    {
                        my $subout = prep_clean( $sub_hash );
                        $sub_hashes = { %$sub_hashes, %$subout };
                    }
                }
                $clean->{$data->{'TEXT'}} = $sub_hashes;
            }
        }
    }
    return $clean;
}
 
$clean = prep_clean( \%{ $data->{'node'} } );
 
print Dumper(\$clean);
 
exit;

VMware vSphere 4 Announced!

April 21st, 2009

Working at VMware, I (virtually) had a front-row seat to the VMware vSphere simulcast on April 21.  It was an exciting event - everyone was anxious to hear what our industry partners (Cisco, Intel, Dell, etc) had to say about the new product.  The overall excitement and energy shown by these companies was impressive.

I think what I liked most was Steve Herrod’s “Blackberry Demo” which showed how resilient the platform was even to extreme hardware failure.  I don’t think many people truly understand what this technology means for disaster recovery and disaster avoidance - it essentially eliminates the risk.  I know it’s a big claim, but if your company does it’s due diligence, and has an appropriate and active back-up strategy for all critical systems; if you have proper 2×2 redundancy of systems in place to make sure that there are no single points of failure, you can essentially have 99.999% uptime at a fraction of the cost of doing all of this on physical systems. Small businesses can now experience the stability of software and services which were previously enjoyed only by large corporations which could afford it. And these same small businesses now have a new arsenal of tools which can help them compete against their larger, more established counterparts. It is an exciting time in the industry.

If anyone has an interest in virtualization, but doesn’t know where to start, the best thing to do would be to download a copy of VMware Server, or VMware ESXi. Both are free to download and use, and include the latest features and capabilities built into the enterprise (ESX/vSphere) hypervisors.

Double Shot of Tequila

April 18th, 2009

I woke up early this morning with a mission on my mind, to finally organize my server rack the way I’ve always been meaning to, but for some reason (*cough*laziness*cough*) , I never got around to it.  I had recently bought some new hardware to re-build a system which I thought was dead, but which turned out not to be.  I didn’t really feel like returning the hardware, because this was the chance to build an up-to-date server to migrate all my VMs over to, which is something else I’ve been meaning to do for quite some time.

In any case, I finally got around to re-organizing my server rack today, and I’m proud of how it turned out.  With that accomplishment in hand, I decided to install our living room air conditioner (starting to get a tad warm, especially for computer systems). I headed out to Home Depot and purchased some wire mesh, or “screen” as one of their reps called it. Last year we found that we had a lot of mosquitoes and small flies coming in through the air conditioner. Considering it was a fairly inexpensive one, I figured that I got what I paid for. I decided to turn my $100 air conditioner into a $300 air conditioner, but adding on some custom filters in order to block any debris which it may collect through it’s many open vents. The roll of mesh cost around $15, and was easy enough to cut and shape. The end result turned out better than I had expected, and so this year I expect we will have a lot fewer bugs getting in.

And so the air conditioner was installed - this too had been completed.  I was on a roll and feeling good.  I decided then to try my hand at building my new server from scratch.

I had an old rack-mount server case1 which I gutted, and started building the new server in there.  The new components included a new motherboard - the Asus M3N78-VM, an AMD Athlon 1640 CPU, and 4GB of OCZ Dual Channel SLI Ready RAM. The Micro-ATX form factor of the motherboard made it super easy to fit into the monster rack-mount case. With a few simple connections, I was ready to test boot-up, and things should have been smooth from there. It wasn’t.

The system wouldn’t power on - at all. My first mistake was that I plugged the front panel connectors into the wrong pins on the motherboard. No sweat, figured that out, and moved forward. Switched it on again, saw the motherboards “SB Power” LED come on (which was a good sign), fans started spinning, thought I was getting close, but nothing. I couldn’t get it to POST anything, no errors, warnings, or beeps at all. I decided to rip out all the peripherals and go bare-bones in order to isolate the problem. Still nothing!! Removed RAM, nothing.. Removed the CPU, nothing. So at this point, aside from being frustrated, I’ve been able to narrow it down to one of two things, it’s either the motherboard, or the power supply. The power supply should be fine, because it worked with the old hardware that I had in the case originally. However, there is a chance that the power supply isn’t compatible with this motherboard in some way.

If it’s not the power supply, then I’ve received a motherboard that was DOA. I’m hoping this is the case! I’d hate to take this thing back to Tiger Direct tomorrow, have them test it out, and find out that it’s just fine. That would be both embarrassing and frustrating.

Anyway, after all these triumphs and frustrations, I decided to finish off the night with a double shot of Tequila, and damn did it go down smooth :)

If this blog post seems at all incoherent, it probably has to do with the fact that its late, and I’m tired.  Oh, and maybe just a little to do with that double shot of Tequila.

  1. solid steel, heavy beast []

I’m not crazy

April 16th, 2009

At work these days, because I’m the only developer on my “team”, I’ve been in the situation where I’m extending (which includes extensive, and often times ridiculous rounds of debugging) other peoples code.  Many of the projects I’ve inherited weren’t written to be maintained by anyone other than the original developers.  I’ve long ago come to accept that most programmers are not passionate about simplicity and elegance, and therefore write endless reams of code that over-complicate simple problems.

Now at VMware, I do work around some severely intelligent people, but unfortunately they are not developers, so I don’t work with them.  Because of this I often times rant to them about the ridiculousness of a given situation; and they’re smart, so they understand the problem technically, but because they aren’t working with me it would be hard for them to empathize with my frustrations.

I love reading Paul Graham’s essays every once in a while, because he seems to be able to understand and articulate my frustrations so well.  One in particular that I’ve been re-reading is Great Hackers which always makes me breathe a sigh of relief because he reminds me that I’m not crazy.

If you are a manager and have to manage a group of experienced programmers, I urge you to read that essay.  You just may prevent one of your developers from committing heinous acts of insanity.

WebPIM: A Custom, Web-based, Personal Information Manager

March 27th, 2009

I’ve always wanted a web-based application to help me manage all my stuff. “WebPIM” (as I’ve nick-named it for now), is currently one of my main personal projects that I have been working on.  I started this project back in 2003 as a simple web-based file manager, and have been slowly hacking away at it in my spare time ever since. “WebPIM” can act as a central reference point for all personal or project information. The way I’ve implemented my custom PIM is purely based on the way I work, so it may not be to everyone’s liking. However, I think it could really help individuals who need a way to organize tasks, projects, documents, and general files in a free-form, yet hierarchical and accessible way. Much of the thinking behind the way WebPIM is being developed relates to GTD1, and how to get “stuff” off your mind, and into a system.

Here’s the general idea - you have a lot of “stuff” - stuff that’s just sitting around on scraps of paper, on your hard drive, in your e-mail, and every other place you can’t seem to remember. This may be un-important stuff, or it may be severely important stuff - but none of it is organized into any kind of easily reference-able and “trusted system”2.

You have several options; the first of which is to do nothing. Unfortunately, ignoring the problem and hoping it will go away won’t solve the problem. Lets assume you want to change your situation, and we’ll use my experiences as a baseline for discussion.

I have tried many personal information managers over the years, and all of them have been incomplete in one way or another. Also, with the new wave of hosted applications like Google’s GMail, Calendar, and Google Docs, I am becoming more and more uncomfortable storing all my stuff on a remote, corporate server over which I have no control3.

My solution to this dilemma has been to write my own PIM, and so far, I’ve been happy with the results.

The way WebPIM currently works is by operating as a front-end to a linux based file-system. From WebPIM, I can create directories, create text files, upload files from my local hard drive, and move files around from one directory structure to another. This is the simple stuff that I think any web-based file manager should be capable of. More than this however, WebPIM provides the following features:

  • Move multiple files from one directory to another (batch move)
  • Text-dialog editing of all files (you can edit HTML and XML files in the interface)
  • Full path display when traversing directories, which allows you to go directly to any directory within your current absolute path via a hyper-link
  • Web-download functionality allowing you to download a copy of your favourite web page or web-accessible file into your current directory.
  • Recursive web-download, so that you can download an entire website for later reference (implemented using HTTrack4 in the back-end).
  • Project short-cuts, so that you can create short-cut groups to access multiple directory structures on the same interface. This allows you to access general reference information, along with specific project information all within the same interface, and without disrupting your overall PIM hierarchy.

I think the idea can be better explained with a screenshot of the main interface:

WebPIM Interface
- WebPIM Interface (Click on the image for a larger view) -

 

Obviously there is still a lot of polish required before this becomes useful to the general public, but I really do believe there is a market for it.  If anyone is interested in trying this out, leave a comment and let me know.  I can probably set up a demo, or provide the source code as-is so that you can give it a shot on your own system.

  1. Getting Things Done - David Allen []
  2. GTD terminology []
  3. This has become more and more of a concern for me, having accounts on Google, Facebook, and others. Maybe I’m just paranoid. []
  4. www.httrack.com/ []