Installing VMware Server 1.0.6 on Ubuntu Hardy

It generally works pretty well, but I found the following problem, and Google was no help:

Building the VMware VmPerl Scripting API.

Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

Unable to compile the VMware VmPerl Scripting API.

********
The VMware VmPerl Scripting API was not installed.  Errors encountered during
compilation and installation of the module can be found here:
/tmp/vmware-config4

You will not be able to use the “vmware-cmd” program.

Errors can be found in the log file:
‘/tmp/vmware-config4/control-only/make.log’

When you look at make.log, you see a series of errors like this:

In file included from VmPerl.xs:6:
/usr/lib/perl/5.8/CORE/perl.h:420:24: error: sys/types.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:451:19: error: ctype.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:463:23: error: locale.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:480:20: error: setjmp.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:486:26: error: sys/param.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:491:23: error: stdlib.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:496:23: error: unistd.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:776:23: error: string.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:925:27: error: netinet/in.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:929:26: error: arpa/inet.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:939:25: error: sys/stat.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:961:21: error: time.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:968:25: error: sys/time.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:975:27: error: sys/times.h: No such file or directory
/usr/lib/perl/5.8/CORE/perl.h:982:19: error: errno.h: No such file or directory

The answer is simple:

sudo apt-get install libc6-dev

Now Google has the answer.

Seamless SSH

I’m transitioning my daily work desktop from OS X Leopard to Kubuntu Hardy. (I’ll be writing more about that in the future.) My job is split between managing people and doing development and system administration for a bunch of Ubuntu boxes, so running the same platform that I’m administering makes a lot of sense. I DO miss some of the fit-and-finish of OS X, though, and I haven’t completely transitioned over to Linux for everything.

Ssh-agent is a great program that lets you add the password to your SSH private key to memory, and then you don’t need to type in the ssh key passphrase every time. The basic usage is that you start BASH as a child of ssh-agent, and then use a program called ssh-add to prompt you for the password and store it in memory.

On OS X, there’s a GREAT program called SSHKeychain that handles this, storing the password in your OS X keychain, so it’s really seemless.

On Linux, you need to type in “ssh-add” manually every time you want to store the key, and after that your SSH sessions will be seamless.

However, I’m always forgetting to do that, and thus getting prompted for the password. Too many seams. I added the following code snippet to the end of my .bashrc file, and thus, every time I open a bash shell, it checks whether ssh-agent has any keys in memory. If it does, the shell starts as normal. If ssh-agent doesn’t have any keys in memory, it prompts you for the password. Simple, and as seamless as I can make it.

## Add key to ssh-add if it has not been added.

ssh-add -l &> /dev/null
SSHADDRESULT=$?
if [ "$SSHADDRESULT" -ne "0" ]; then
ssh-add
fi

UPDATE 2008-07-02: Here’s a much more succinct way of writing that:

ssh-add -l &>/dev/null || ssh-add

Real Apple Fanboyism

In much of the web, being called an Apple Fanboy simply means you’re debunking myths thrown about by Mac-haters. And the Macalope is great at that. And if that is being an Apple Fanboy, then I am guilty. There’s a lot of hate thrown around there just because Macs are “cool” and some people have a problem with that.

However, there’s some talk around Apple’s projections of selling 10 million iPhones in a year that are starting to bother me.

Regardless, Macworld’s Jason Snell has already detailed how Apple will likely beat the 10 million mark for calendar 2008. So the question really is just by how much.

Frankly I don’t care if Apple beats their projections or not. This won’t affect the quality of the iPhone, the quality of other Apple products, or anything else I care about. I’m not a cheerleader, I’m someone who wants to use products that don’t suck. And as long as Apple’s products suck less than anyone else’s, I’ll use Apple.

Book Review: “Release It!” by Michael T. Nygard

I just finished “Release It!: Design and Deploy Production-Ready Software” by Michael T. Nygard, from The Pragmatic Programmers. This isn’t the book I thought it was when I bought it, but it’s still a really valuable read. “Release It!” focuses on (and most of the author’s experience seems to be) massive, web-scale e-commerce sites, generally running on Java. While on the surface it has little to offer to other worlds of software development, digging a little deeper shows ideas that are applicable across all software development.

If you’re doing massive web stores in Java — well, you’ve probably already read this. If you haven’t I’d say this book is a must-read. Of course, my projects aren’t web-scale, aren’t e-commerce, and don’t use Java, and to this point, haven’t — so do take my comments with whatever amount of salt you feel is appropriate.

Even if you’re doing shrink-wrap software, I’d say “Release It!” has something of value for you — it appears to be a collection of hard-won, common-sense techniques for creating what Nygard calls “cynical software” — software that assumes that itself, and the other software it links to will all fail at one time or another, and is prepared for that failure. A number of failure modes spring to mind, but Nygard enumerates them, the anti-patterns that create them, and the patterns you can use to respond to them with exceptional clarity and obvious expertise.

In addition to being chock-full of good ideas and interesting concepts, it’s also filled with entertaining war stories about various failures and how Nygard and his team responded to them. And for a systems geek, there’s few more satisfying ways to spend an hour than reading about the nightmare series of cascading failures that ruined someone else’s weekend.

Highly-recommended.

Not Enough

I’m having a … crisis of confidence isn’t the right word, but I’m not sure what is. Let me set the stage. I work at a spectacular place, and have a job I care deeply about.

The success of our company depends on my performance. If I do my job poorly, our company could go broke, and all our employees could be out of work. (Lest you think I sound grandiose, there’s a number of other people at our company who can make the same statements. I’m not unique; our company depends on the efforts of a number of very talented people.)

Our products improve the quality of life for thousands of seniors across the country, and there’s other groups of people I can’t talk about yet who may also start being helped by my company. If I do my job well, their lives get better, and if I don’t, their lives don’t improve as much.

Now, this is not life-or-death. I’m not a doctor or a  pilot, and nobody’s going to die if I mess up. But quality of life is important — in the best case, our products could give a grandmother a few more months or years of recognizing her grandchildren. In the worst case, our work brings a smile and a slight lift to a senior’s day.

So those are the stakes, and I have a challenging job I care deeply about. Where’s the problem?

My crisis of confidence is that I’ve realized recently that I’m just not smart enough, and I know there’s nothing I can do to get smarter. I reached the limits of what I could do with BASH programming — so I taught myself Python, and began using that instead. Almost everything that I do involves editing text of one kind or another, on multiple platforms. After working with Vim and TextMate, I’ve settled on Emacs, and I’m working hard to master it. It’s available on every platform I use, and becoming an expert will reward the effort I put in. I spend my free time reading technical or management books, trying to improve my skills. I can make myself both more efficient and more effective. But I can’t make myself smarter.

The answer to all this is to simply to do the best that I can, accept that I’m doing the best that I can, and move on. Usually I tell myself that it’s enough to make our procedures and our product a little better every day. And usually that helps. Not tonight.

If I were to suddenly have a 100-fold decrease in my job performance, could that torpedo the company? Yes. (Again, there’s other people at work who could say the same thing.) What effect could a 100-fold increase have, both for the company and the users of our products?  Hard to imagine, but it would be significant. But I don’t see how a 100 times increase is possible for me — I’m already busting my ass to get to where I am.

I’m not beating myself up because someone else attacking the same problem could do it 10% better than I could. Someone else (I don’t know who, but let’s imagine) might do it ten-thousand times better. There’s no fixed endpoint, no race I have to finish. Part of this job is defining the endpoint, and a flash of inspiration could put it somewhere many orders of magnitude better than anything I can do.

I want to improve by orders of magnitude, and the best I can come up with is tacking on a few percentage points of improvement here and there.

Now realistically, I may not be the best, but I’m the best Dakim has, at least for my position. And Dakim would have a hard time replacing me if I left. But if there were some real rockstar to take my place (and people significantly better than me do exist), that rockstar could make my contributions look puny, and could take our product much farther than I’ve been able to.

Where does that leave me? It leaves me going to work in the morning, continuing to bust my ass and do the best I can.  And hopefully, able to forgive myself for my best being what it is.

Nice little BASH one-liner to iterate through a directory

for afile in /home/auser/adirectory/*; do echo $afile; done

Useful for all kinds of things. And I can never remember how the syntax changes between doing a for statement in a bash script and doing it as a one-liner on the command line.

Job Interviews; Personality Does Matter

I recently interviewed a very intelligent, capable programmer who was near the start of his career. I decided not to make him an offer, and he sent a very nice follow-up e-mail asking for tips on how to present himself better. I figured my reply might be very useful to other applicants, so I’m posting most of it here:

First, lose the headphones. That didn’t affect our decision at all, but I could imagine it affecting it at other companies.

Second, you’re obviously intelligent and capable. You messed up on the unit test, but I’m attributing that to interview nerves – I’m reasonably certain you could handle the technical demands of the job. But that’s only the first hurdle.

The next is personality and fit with the company — and this is a sticky one. In an interview, I’ve got about an hour to decide if you’re the kind of person I want to spend the next three or more years with, in relatively close quarters. Can you argue a position strongly, but lose gracefully? You may be right about the technical merits of something, but the business reality means we have to do something else — can you live with that? On a good day, we go two steps forward and one step back — bad days it’s one step forwards and two steps back. Can you deal with that frustration? I received certain cues from you — interrupting, hitting the table during the coding test, etc. — that you might have been hard to work with. Is that true? I can’t tell in an hour. But saying “no” to a candidate who would have been terrific is a smaller risk than saying “yes” to a candidate who turns out to be a bad hire.

I hope you appreciate my honesty in writing this, rather than brushing you off with “not a good fit.” I did so because I think your question about your interview performance is sincere, and I’m hoping my answer helps.

If it’s not obvious from reading the e-mail, Rands has been a big influence on my management style.

Getting it out of my head

I had a conversation with a friend on Sunday that really stuck with me — made it difficult to sleep that night. She was talking about her father, a retired cop, who carries a gun with him everywhere. It was a sad story, for a lot of reasons, but it’s not my story, and I don’t have the right to share it.

I did share my own story — the story that kept me up Sunday night. I told parts of it to other people on Monday, and I wrote the whole thing down tonight — bright light slays demons, and I don’t want this in my dreams anymore.

You can read it here: http://www.sudosu.net/essays/no-more-guns/ .

I’ll steal good ideas from anywhere

This is from a “Fresh Air from WHYY” Terry Gross interview with Dr. Richard Shannon, Chairman of the Dept. of Medicine of the University of PA Health System.

@ 43:48

“We learned early on that much of the focus in infection prevention was on how you place the catheter. What we learned through our observations (and borrowing the processes from Toyota) was it was in maintaining the catheter. Once it was in, how do you take care of it? And what we initially discovered was, there weren’t reliable processes in place by which nurses and others took care of catheters. So now it’s very unambiguous, very clear to everybody where the catheter is in the person’s body, what the condition of the catheter is every day. There’s a specific person responsible each day for looking at that catheter site and making sure it’s intact. And any time there’s a question, that’s immediately kicked up to a higher-level person who can make a decision about whether the catheter needs to come out or not.

“So identifying a highly-reliable, unambiguous process in which everyone’s responsibility is made clear creates a much more likely defect-free process during the course of that catheter being in place.”

It’s not that Shannon tells us anything really new here. It’s that he talks about one aspect of what I’m trying to do at Dakim, and comes up with something better than a trunk of Strunks:

“A highly-reliable, unambiguous process in which everyone’s responsibility is made clear.” Damn right.

Worst. Cover. Letter. Ever.

This used to contain the text (with names and e-mails taken out) of a cover letter I received from someone applying for a job. The letter was a masterpiece, insulting (either by assertion or implication) almost everyone at the company.

Despite the over-the-top nature of the letter, posting it here and picking on it started to seem more and more like kicking someone when he’s down. There was no larger message, no lesson to learn from the letter — just me making fun of someone who made an asshole of himself.

I deleted it. I don’t want to be that guy.