I Finally Upgraded to Debian 5

On my production web server, I’m kind of a crazy fool.  I often do things that make people cringe and scream and say “what the hell are you doing?”

One of those said things is doing a distribution upgrade on-the-fly of the OS.  Since the installation of my server some three and a half years ago, Debian has had two major releases.  My server started with sarge, upgraded to etch, then upgraded again to lenny.  Unfortunately this time after 1210 days without rebooting my server I was forced to reboot. That is to say, since I installed my server where it lives it had never been rebooted.

The reboot occurred because the new libc required kernel 2.6. I was still cooking with an old 2.4 kernel.  After a pile of apt-get trickery, I got the necessary packages installed and had to reboot.  Once the 2.6 kernel was up and running everything else installed without a hitch.  I had to track down a few configuration changes with a couple of things, but overall I think the upgrade went smooth and with only a few minutes of downtime.  Not bad, I say, not bad.

Summer Project: Updates (Aka WTF Am I Doing?)

My ‘summer project‘ has now been demoted to just a ‘random project.’  Although I still intend on finishing it at some point, it’s clearly become far too delayed to call it a summer project anymore. I got overly distracted throughout the summer by family, fun, non-fun, and other projects.  Projects that I’ll explain a bit here… Continue reading Summer Project: Updates (Aka WTF Am I Doing?)

Adding an Auto Increment Column After The Fact…

Yep, I pulled a ‘whoops’ today. I made a table, filled it with data, then realized I forgot my standard ‘id’.  My primary key, auto incrementing column that makes me feel good about myself.

Once I noticed it was gone, it was easy to add it back. Right? Right? Well, not so fast.  You can add the new column at the beginning of the table.  But as soon as you go to set it to a Primary, Auto increment, MySQL is going to cry because of all the zero values.  The primary key’s can’t be the same so it blows up.

Before setting it to be the primary key, you need to auto-fill it.  You can do it programmatically with any script of your choice, but I find it easy to do it with MySQL…

SET @pants := 0;
UPDATE `ratings` SET id = (SELECT @pants := @pants + 1);

And that’s it.  Time for a beer.

OpenID Providers, Where Are You?

OpenID would be much easier to implement and use if the big-guns who’ve all promised support over a year ago actually have working production environments.   Yahoo! is currently the only one of the big three who properly support OpenID.  Google, Microsoft, where are you?  Enough with the usability testing – lets roll this shit out.

GeoLocation Technology is Frightening Me.

Firefox 3.5 added support for “My Location”; Google Maps added a feature “Show My Location.”

One random day I thought I’d try it out and see how well it does. I’m only using a laptop with no real GPS technology built in.  I have a phone, but it doesn’t support anything fancy. It’s just a phone.

When I first clicked the “Show My Location” circle on Google maps, Firefox was kind enough to ask me if it was OK for Google to know this. I said yes, because I wanted to know.  To my surprise, awe, and WTF? It had my location closer than I could have ever imagined. Continue reading GeoLocation Technology is Frightening Me.