cover photo

Mike Macgirvin

mike@macgirvin.com

The Darkness

Mike Macgirvin
  last edited: Thu, 21 Feb 2008 07:11:29 +1100  from Diary and Other Rantings
Yesterday around lunchtime an entire subnet at the school went 'dark'. This is not good. The session ('semester' for my  friends in the northern hemisphere) starts on Monday. This is the absolute busiest time of year for faculty and staff because we've got a lot of stuff to prepare for next week when the hammer falls.

The curious thing is that the subnet that went 'dark' was only one subnet, and another subnet which traverses the same wire continues to work fine. So only a random smattering of machines was affected. This made it very difficult to even track down what happened because it appeared as a random cluster of machines that suddenly could not route packets. As it turns out they're all related by having an equal third byte of the IP address. What made it even more difficult to troubleshoot is that two of these machines which went dark are the primary DNS servers, so when they vanished, nobody could see anything 'by name' until we patched a couple of machines over to an alternate.

Trying to get anything done by IP number is a minefield, because even if you don't use any hostnames directly, you might accidentally touch a server or service which does - and you're screwed; waiting for it to time out (if you're lucky).  Some services just hang until you get tired of looking at the hourglass icon and then you have to go find another already logged-in session somewhere else to work. Can't start any new sessions because they mount home directories, which touch name servers and will hang.  

So I'm chugging the morning coffee and heading off to work an hour early this morning to try and recover from this disaster. Spent half the night awake formulating a plan after spending the entire evening determining for certain where the problem was. The problem is a router that's locked in a closet, and only the main campus IT folks have keys. Coincidentally, they made some configuration changes in that closet yesterday. Around lunchtime.

Gentlemen, get over here right now and unlock that door.

Unfortunately it isn't that easy, as there are layers of bureaucracy to contend with. My backup plan is to move two of our absolutely critical machines out of the darkness and into the light. One of them I can unplug and carry away. The other is a virtual machine living on two networks (which can run elsewhere) but I've got to find a wire in another room/building that can talk to both subnets. Oh and a cooperative host with enough disk and memory, that won't mind being loaded up with an alien machine.
Q=`(parlez vous|hablas|sprechen ze) $geek?`

Mike Macgirvin
  from Diary and Other Rantings
It just occurred to me that in the last 4-5 days I've written 'code' in Visual Basic, SmallTalk, lisp, C, bash, awk, PHP, perl, and python. Thousands of lines of code total. And there are probably a few dialects I forgot here. Not to mention 30-40 different flavours of config files, sed, Oracle-SQL, mySQL, and LDAP and some other stuff that don't quite qualify as 'code' but still involve intimately knowing a strange computer dialect. Oh yeah, HTML and JavaScript (of course).
A Bit of Excitement

Mike Macgirvin
  from Diary and Other Rantings
The fire brigade just rolled in. Seems somebody started a blaze in the building next door. I'd expect something like this in the Biology Lab or even the machine shop, but in the Math Department? Oh well. Hope it doesn't shut down any of our routers that are about twenty feet away from the smoke cloud.
 work
ouch

Mike Macgirvin
  from Diary and Other Rantings
Think I might have a fractured wrist.
 work
An hour before first class

Mike Macgirvin
  from Diary and Other Rantings
Classes haven't yet started for the day. I'm walking down the hall and there's a 20-something long-haired guy sprawled out across the floor in the middle of the hallway.

He's breathing. That's a good sign.  He lifts his head as I get closer. Gives me a strange look as if to say "You're probably wondering what I'm doing here..." or "you probably think I'm weird", but doesn't even shift his position - which is completely blocking the hallway.  

Nope. Not at all. I step over him and continue to the bathroom.
 work
Unix security

Mike Macgirvin
  from Diary and Other Rantings
I'm putting together a hilarious saga that I ultimately intend to submit to worsethanfailure.com...

Spent the last week analyzing the Unix systems here in the labs to get an idea of what was running on them, and also to do a security audit. First though I had to break into the boxes, as my predecessor didn't leave any system passwords. Turns out this was easy.

First thing I found on one of the systems is that the 'init' process was running under the account 'Katrina' (names have been changed to protect the innocent). Now 'init' is always owned by 'root' (the system admin account). So this means that somebody else on the system has the user id of '0', which is the administrator ID number on Unix.

As it turns out, I can change Katrina's password, since it's all stored in Windows Active Directory and exported to Unix via LDAP. So I did this and logged in as Katrina. Voila - I've got root access. Did this on several boxes to reset the root password.

Now there's no easy way to find a list of accounts, since this is all done in Windows and authentication is FM (freaking magic).  So I wrote a little 'C' program to find all this info spread around the university and generate what looks like a standard Unix passwd file, which is something I understand.

Next I ran a little awk script to go through and find out if anybody else had UID '0', or administrator access. I'm glad I did this. Turns out that 279 people have administrator access. (There should be exactly 1). Now we manage accounts here for about 1800 people, so somewhere around 1 in 6 have had elevated system privileges.  

These UID's were generated by a software utility my predecessor wrote to add all the Unix attributes to the Windows Directory. This utility has a lot of bugs, and this is only one of them. Duplicate UID's, non-existent home directories that never get created, no-UID (which defaults to 0), etc.

Sigh... Anyway the short story is that I've got a lot of work left to do.
Back to work

Mike Macgirvin
  from Diary and Other Rantings
Once more became gainfully employed. Started this morning at a large nearby University managing computer systems for the Electrical Engineering Labs.

Lasers, robots, tesla coils. The morning drive is over the edge of the escarpment, through the rain forest and along the coast. And the real kicker is that they're gonna' pay me for working here.
 work
The Google Interview

Mike Macgirvin
  last edited: Thu, 31 May 2007 11:57:54 +1000  from Diary and Other Rantings
Google is legendary for their brain-teaser technical interviews that weed out anybody who is less than Mensa. Mine went extremely poorly. I don't think they're going to be calling me back. But it's too bad, because it wasn't my fault.

First of all I don't understand the logic in having a phone interview between Australia and Mountain View California USA. I guess nobody in Sydney is qualified to ask technical questions. Oh well.

But here's the first question:

Given several points in 2-d space, construct a line between them.

OK, this isn't hard, but first I have to know the goal of the line. So I ask her. What's the goal of this line? And is there a vector or direction preference?

She answers - what do you mean a 'goal'? She sounds annoyed. It's just a line. How do you construct it?

So I start probing. OK, well you can just connect the dots. I doubt that's what you're after; but at least I may be able to further ascertain the goal you have in mind. She rejects connect the dots outright - even though it satisfies the problem criteria; and without providing any more input.

So I have to answer that I cannot solve this problem. I don't have enough information. She then goes on and says OK, forget it. Now instead of points you've got lines. Same question. Construct a line between them.

I've still got the same problem. There isn't enough information. I cannot answer it. I start by finding the midpoint of the lines, maybe we should draw through them all? BZZZZT! Wrong answer. She starts to question how you would find out if two lines overlap. So clearly she has another goal in mind, but for the dickens I can't tease it out of her. It starts to look like she had a scatter plot in mind. You know - you've got a bunch of random data points, find the mean. But even here, you need a further goal. Are you going against the x or the y axis?  It's still unsolvable. I'm starting to show my exhasperation - so is she.

But there's no place for me to go. No way out. Let's imagine some possibilities. Connect the dots in the Y direction. Find the mean in the Y direction. Solve for x instead. What if the points describe the circumference of a circle? Am I to draw the circle, draw a line through it, or draw something looking like the AT&T logo on these points? All of these solve the first problem. When you turn it into lines, am I finding the mean, or constructing segments? What if I've got multiple sets of parallel lines that look like the I Ching? What kind of line am I expected to draw?

But she cannot even envision these possibilities. She's looking for some simple answer to a problem that she hasn't been able to convey - and so I am unable to answer it.

Let's move on. Question two. You've got an array of integers. Sort them, in 1/n time or better. We know the min and max.

Maybe this can be done - but I'm just not seeing it. I tell her so. I also spend a few moments looking at possible ways to do it, but they all lead to dead ends. She stresses again, we know the min and max, as though to say that this is an important fact to consider. Well yeah, but it doesn't help. Best you can do is 2(1/n). But she's given up on me and the phone call is coming to an end. I am guessing she was looking for something like - construct an array with (max-min) elements. go through your original array and drop each element into its index in the second array. You're done.

But you're not. What if you've got holes in the destination array? You've got to make a second pass and prune all the holes.  Or you sort into a linked list in the first place, which means that min and max aren't helping you; and this takes log time so it doesn't fit the solution set. I then turn my brain into a CPU and drop into assembly language. Let's see, take the first number and stick it into a register... load the next, branch if greater... I'm visualizing how to solve this the best way.

She's almost scolding me by now. What's a register? What does that have to do with the problem? I don't have time to explain the inner workings of a microprocessor and it wouldn't help anyway - our conversation was finished. Too bad, I thought I was getting somewhere with the assembler sort; but totally lost the train of thought when she asked me what the hell I was doing.  

So anyway - for any of you thinking of joining Google, best of luck. It doesn't matter if you're clever. What would probably help is if you get an interviewer that has actually had to solve real world problems rather than theoretical questions from a cheat sheet. Or - if you're clairvoyant.
Cut Loose

Mike Macgirvin
  last edited: Sat, 24 Mar 2007 08:19:58 +1100  from Diary and Other Rantings
I knew it was a bit of a stretch to ask my employer to let me continue on my project from across the globe. Though these days, telecommuting has become a lot more common. It's not considered unusual to find somebody working in Silicon Valley from a farmhouse in Vermont. But a farmhouse in Burrawang, Australia turns out to be an unworkable complication for this particular job.

On Monday I was introduced to my "replacement", and today I was officially requested to tender my resignation, so I guess it's back to the job market once again.

So if y'all know of anybody looking for software pros down under... (or if you just need somebody that can get the job done...)
 work
So anyway

Mike Macgirvin
  from Diary and Other Rantings
The house is pretty much sold. No time to celebrate - at this point, it's just another item to check off the list of things to do. Now it's time to pack the bags. I've got a little over 3 weeks left. Have to get the movers in, sell off the rest of the furniture that isn't going, and then find a home for anything that's left over - even if that home happens to be a landfill.

Yet another chapter coming to a close. It's still unclear whether I will be able to retain my employment from half a world away. Could go one way, could go the other at this point. Meanwhile, I'm still putting in regular work weeks while trying to accomplish all this other stuff.  

Then there are the little details - hundreds of them. Closing out utilities, transferring financial arrangements. Figuring out how to sell the car and perhaps of some importance, how to get to the airport.
 home  work
Zero Waste

Mike Macgirvin
  from Diary and Other Rantings
In the coffee break room at the office somebody left a bag of Jelly Beans to share.

Why am I writing this?

I grabbed a few. All were very funny looking candies. Warped, conjoined, pimpled. The strangest looking jelly beans I've ever encountered. I looked at the bag. They are called 'Belly Flops' - by the Jelly Belly company. Everything that didn't meet their rigorous standards for presidential candies. (Some of you may recall that Ronald Reagan kept a bag of Jelly Belly's on his desk to share with visiting heads of state.)
 work
It started...

Mike Macgirvin
  last edited: Sun, 03 Dec 2006 06:13:30 +1100  from Diary and Other Rantings
I get offers in the mail all the time. New credit cards, life insurance, you name it. But this one was different. Seems that now that I'm a pentagenarian (fifty-something) I'm officially eligible to join the AARP. Oh no! That's like for old people. How depressing. I guess it means that I'm not young anymore. If you're reading this at a much younger age, don't laugh. It's going to happen to you too.

Did you know that nowhere in the mailing or even on the AARP website does it say what AARP stands for? That's interesting. They just assume everybody knows. I was just checking for accuracy. Best as I can tell it's the 'American Association of Retired Persons'.

But it's interesting timing. This month marks the first time in about 6-7 years that I had more money at the end of the month than I had at the start of the month. So it's the first time in a long time that I haven't been 'living off retirement'.

Partially this is due to the fact that the advertising contract between Sonica Music Company and AT&T finally expired. That's $600 a month I don't have to waste anymore. (Sonica has been closed for almost a year now, so the Yellow Pages advertising isn't doing me much good). Next month the (postal) mail forwarding finally comes to an end; and also my last remaining account - Valley Yellow Pages; is due to expire. Thankfully it is nowhere near the AT&T monthly amount.

Then all that will remain of Sonica is a website or two. (OK 5, but who's counting?). I'll probably keep them running since they are reflections of and profiles of this site. I thought they would be useful community sites for Mountain View musicians, but there hasn't been much interest. Not like any of the other community sites are faring better - but we're finally up to 50 members. That's about two per website.

Oh, and I still have the signs. They're cool signs. Oh, and a bunch of cool guitars. And ... oh nevermind.
Rule #45 of corporate America

Mike Macgirvin
  from Diary and Other Rantings
Rule #45:

Don't be the last one left at the table for company dinners. That means you're the one who is going to pick up the bill. In this case, it was arguably one of the most expensive Italian restaurants in Santa Monica. 35 people, ordering dozens of bottles of nice wine at about $300 a pop. Filet mignon was the budget entree, and you can always tell the price structure because it is inversely proportional to the amount of food you actually get; and directly proportional to the amount of colored squiggles the chef decorates each plate with. I made certain to exit before the tab came due. I've been on the losing side of that battle more than I care to discuss...
 work
Fuzzy Tools

Mike Macgirvin
  last edited: Tue, 17 Oct 2006 08:52:14 +1000  from Diary and Other Rantings
I've been watching the whole bruhaha at Seattle911.com with some interest. This is a homegrown website that takes live 911 feeds and puts them on a Google mashup. Cute and clever use of technology. The Seattle Fire Department responded by changing the logs to image format rather than text.

That's the background. Reading some of the articles pointed me to 'gocr' which is a free OCR package. Now this is useful - I wasn't earlier aware of its existence. It basically takes an image and tries to distinguish text in the image and gives you the text. If you saw my article on comment spam, you'll realize that 'captcha' images to prevent spam are doomed. This is where you type into a box the letters you see in the picture. Most of these are annoying anyway, but it's pretty hard to get them through a clever command-line driven OCR program. If you make it so hard to read that gocr can't read it, chances are that none of your audience will be able to either.

But I have an even deeper interest in this stuff.  Gocr is a framework for finding recognizable stuff in images. Something the world has needed for a while now is something that can filter porn. In theory there isn't much difference between distinguishing the letter 'b' in a picture (in any of 600 different fonts) and say a breast (in any of 600 different sizes/shapes). I'm being polite. Any anatomical feature.

Some folks worked on this problem back in the '80's, correlating the prevalance of what could be termed 'skin tones' in an image.

The tools and concepts are out there. It shouldn't take much more than a man month or three to put them together into a porn filter. There's probably a market for such a thing.

OK, gocr is probably encumbered with the GNU General Public License. So maybe there isn't much of a market unless one just uses the general pattern recognition concepts (but not the code) and starts from scratch. I don't have anything against the GPL. It serves its purpose, but it does make it hard to re-use code in the workplace. It's a bummer to always have to start from scratch, when the software already exists and has been pretty much debugged. If I'm releasing code into the public domain, I always use either the Berkeley/Stanford license or no license at all. Free, no warranty, blah blah. The GPL is basically a self-replicating virus - which was written by lawyers instead of geeks.
First day of work

Mike Macgirvin
  from Diary and Other Rantings
Started the new job today. I'm working for a large PC security firm doing web stuff.

That's about all I can tell you right now.