« October 2006 | Main | December 2006 »

November 30, 2006

Mozilla thinks http://www/ebay.com means Yahoo!

I accidentally typed in http://www/ebay.com into my Mozilla browser tonight and was a little confused when Yahoo! came up. When I glanced up at the URL and saw my mistake I was suprised again.

So yes, apparently if I say I want to go to http://www I really mean Yahoo!. Does that mean that Yahoo! is the canonical site for the world wide web? For me Yahoo! is TV listings, but I guess for a good number of folks that is probably true.


Posted by mike at 8:56 PM

November 29, 2006

Pete's Perfect World Shows Signs of Life

Pete's weblog has been dead for some time now, but there are new signs of life over there.

Posted by mike at 10:55 AM

November 27, 2006

In case you were thinking about getting the *other* iPod

It's a little embarrassing to start laughing out loud at your computer, but this line caught me by suprise:

Yes, Microsoft's new Zune digital music player is just plain dreadful. I've spent a week setting this thing up and using it, and the overall experience is about as pleasant as having an airbag deploy in your face.

The entire article is here.

Of course I'm a Mac fan, have owned an iPod (upgraded many times) for many years. And it's funny because it says what I like to hear. Might not be so funny for other folks.

Posted by mike at 5:30 PM

November 26, 2006

A Trip to the New England Aquarium

With a nice long Thanksgiving break from work and school we packed in a number of things we'd been wanting to do. One of the highlights was a trip with the kids to the New England Aquarium on Friday afternoon. A few years back we had a membership and went many times, but it has been awhile. A few weeks back we were gifted a new membership and so took the chance to go down.

Was a nice, warm, sunny day. Unusual considering it is late Novemenber. Some years we would have been walking in snow. We hopped on the train after an early lunch and were in the aquarium around noon.

We spent a chunk of time watching the penguins (Rockhoppers are my favorite) and then spent the rest of the time on the spiral ramp surrounding the mega tank at the center of the aquarium. We stopped at three different locations and watched for 10-15 minutes each; the base of the tank where the sharks tend to roam, the middle where you can see a wide variety of smaller fish and the turtles, and up above the surface at the top.

The photo is one of a few dozen I took trying to capture the kids and the activity inside the tank. If you haven't been, the center of the aquarium is a four-story tank surrounded by a walkway (this virtual map shows the layout). The spiral ramp is lined with nooks to step off the ramp and into a small area (three or four people) to watch activity in the tank. The photo was an attempt to capture the kids watching in one of these cubbys. Was a hard thing to capture. Saul's (9 months) face and finger hint a little at how cool it was to be watching the turtle.

The nice thing about having a membership is you really don't have to get your money's worth out of one trip. It was a very busy day and there were a ton of people. We didn't stay longer than a few hours and then went out to have a snack on Rowe's Warf and enjoy the weather.

On the way home we had time for Jo and I to swing into Crate and Barrel and pick up two presents for mom (one from Jo, one from Saul). I believe that may qualify as the earliest I've ever done any Christmas shopping.

Posted by mike at 9:52 PM

Searching for apt-get Packages on Ubuntu Linux

I've been needing this for some time; the ability to search for apt-get packages on Ubuntu when I don't know the name of the package. Turns out there's a corresponding utility for doing this:

shell> apt-cache search <search string>

You'll want to be sure your repository is up to date with apt-get update. Today I need DBI to get Perl connected to MySQL, but can't figure out what the apt-get package name is (I tried "DBI", "perl-DBI", "DBI-perl"). A search immediately gives me what I need:

shell> apt-cache search dbi
libdbd-mysql-perl - A Perl5 database interface to the MySQL database
libdbi-perl - Perl5 database interface by Tim Bunce
libxml-sax-perl - Perl module for using and building Perl SAX2 XML processors

And find that apt-get install libdbi-perl gets me right back on the road.

Ubuntu (in this case the apt utilities) just makes things so easy.

Posted by mike at 8:24 AM

November 22, 2006

Bar Graphs with MySQL

Stumbled into this today over at squarebits, using MySQL to generate bar graphs:

mysql> select Name, REPEAT("#", Value/20.0+1) Graph FROM Month;
| Name      | Graph                                          |
| January   | ####################                           |
| February  | ############################################## |
| March     | #####################                          |
| April     | #############                                  |
| May       | ###                                            |
| June      | ########################                       |
| July      | ##########                                     |
| August    | #############################                  |
| September | #############                                  |
| October   | #########################                      |
| November  | ######################################         |
| December  | ############                                   |
12 rows in set (0.00 sec)

Pretty cool.

Posted by mike at 9:37 AM

MySQL Cluster Setup, in a Single Screenshot

Have been meaning to post about the cluster setup I'm using for *functional* testing (not appropriate for performance testing or production environments).

The gist is that I'm using Parallels on OS X, running 4 nodes (1 management, 2 & 3 storage, 4 SQL) on 4 virtual machines. Each machine has between 128Mb and 256Mb of allocated RAM which isn't much for a cluster, but is as much as I can give from the 2Gb on the MacBook Pro. Each virtual machine has a version of MySQL 5.1.12 compiled from source. Actually, I built one VM with the compiled and installed source and then cloned that for the other 3 machines. The preferred flavor of Linux for these is Ubuntu server.

As I was setting up for a screenshot I walked through bringing the cluster online and with a little crafting was able to provide (I believe) the information in the screenshot for doing this elsewhere. On each machine screen (numbered 1-4 in order of startup) you can see the network settings, cluster configuration, and commands for starting the cluster up for the first time.

I'm not going to explain all the details, but if you've set up a cluster before you'll recognize the process here. If you haven't, take a walk through the MySQL docs and it might make some sense.

Posted by mike at 12:15 AM

November 19, 2006

How MySQL Loads Configuration Options

A quick refresher on the locations MySQL uses to load up configuration options on Unix:

  1. /etc/my.cnf
  2. $MYSQL_HOME/my.cnf (sometimes this is your datadir, other times it's basedir)
  3. command line arg (defaults-extra-file)
  4. user's home directory (~/user/.my.cnf)

It's available in the MySQL docs, and there's a section on it in Pro MySQL, but it seems a need to remember the exact order only comes often enough to confirm that I haven't committed it to long-term memory.

Posted by mike at 10:07 PM

November 18, 2006

MySQL Cluster not in 5.1.12 Binaries

A week ago I completely refreshed my MySQL Cluster setup (yea, been meaning to post on that) and was a little baffled when the 5.1.12 binaries didn't have the expected cluster programs (ndb_mgmd, ndbd etc). The earlier versions of 5.1.x I'd compiled from source so it had been awhile since using a binary, but on this refresh I didn't want to wait for the machines to configure and make.

When I couldn't find the cluster programs I chalked it up to failed memory, even though I swear I had seen something about the 5.1.x builds being more like the max builds of the past. I grabbed the source and forgot about it until today, when I came across this in the docs:

Due to a build slippage, binary distributions of MySQL 5.1.12 contain neither NDB Cluster nor Partitioning. We apologize for any inconvenience. Please upgrade to 5.1.13 as soon as it is available. if you build from source, you can execute configure with the --with-ndbcluster and --with-partition options.

So my mind wasn't failing me, whew. As the years go on I get more and more nervous about that.

Perhaps this will mean Kevin will get his bug fix sooner than later.

Posted by mike at 3:20 PM

November 15, 2006

A Visually Interesting Line of Code

I wrote this line of code today and thought "that looks kind of cool visually, perhaps even outside of knowing what Perl is doing":

@headers = map { $_ eq "-" ? " " : $_ } @headers;

It's trivial Perl, so I'm not going to get any awards for doing something new or unique, but it is interesting to look at. Isn't far from a palindrome.

For the non-Perl, or non-programmer folks, the line goes through a set of items and turns anything that is a "-" into a space, but leaves things that aren't a "-" alone.

Don't ask why, it's more complicated that worth explaining and would distract from the work of art, which should be allowed to stand on its own.

Posted by mike at 6:05 PM

November 9, 2006

This is not a blog

I have never liked the term blog. It wasn't long after I started writing here that it felt overused by being plastered everywhere and overheard in every other tech conversation. Fast forward a few years and the situation has only gotten worse. Now it's every conversation, tech or non tech, that someone mentions something about a blog. I particularly dislike when the term blog used in an effort to sound hip, knowledgeable, or elite.

I'm not saying I'm going to take offense if someone says they came across something on my blog, it's just a term I find a little annoying. I refer to this as my web log, or weblog. Perhaps I'm just trying to avoid being a part of the blogging craze that seems to have taken over everywhere.

Oh, and for the new folks, blog is a portmanteau of the original term "web log". Another reason to avoid the term.

Posted by mike at 11:56 PM

Upgrade Weblog Software, New Weblog Server

If you're reading this you are seeing the first post from an upgrade to MovableType 3.33 and a move to a new server. The mike subdomain (mike.kruckenberg.com) is now running on a shared-hosting solution in hopes that it will relieve the current kruckenberg server (running on DSL at Pete's house) from bandwidth and other duties.

The new version of MovableType is nice, the subtle changes are welcome and seem to make using the authoring interface just a little more useful. The jury is out on the new server and hosting service. It appears that everything has transferred nicely for the weblog but will give it some time before calling it good.

It feels a little strange. Ever since I started writing here the server has been under Pete's desk at home, first on a T1 and more recently on a 1.5d/768u DSL line. When the server moved to a DSL line I started pushing for a hosted solution and after a few weeks of fiddling I'm now on it. While it's a better solution all-around there's still something that feels out of place about moving off the machine I built from scratch a few years back.

Posted by mike at 10:19 PM

November 5, 2006

Working in a Highly-Productive Organization

Back in March I joined OpenAir as a principal software engineer. It's been a little more than 6-months now and as I was thinking about it my experience thus far is highlighted by a great appreciation for real, prolonged productivity. Allow me to quote myself:

I have come to really love having complete control over how much I get done in a day. It's a lot when as an engineer I don't have a lot of meetings, conference calls, instant message conversations, and drop-in visitors. Besides checking in on email periodically during the day and a daily review of my FogBugz queue, I'm free to do what I really love best...solve problems with my experience and software engineering skills.

To add a little background I'll throw out a few bullet points:

As JT once proclaimed, "Dad loves his work" (although for me it's not with the same intended meaning). I do love the experience of working for this kind of an organization.

Posted by mike at 10:24 PM

Pete Joins OpenAir

(I wrote about this last Monday but lost the post in a machine reboot - hopefully 2nd attempt will take).

Last Monday Pete (who's weblog makes a lousy link) joined the engineering team at OpenAir. Yes, the same company and team I'm working for now. Pete's my brother.

We've talked for years about someday working together, have tossed around a variety of ideas that could have turned into something but until this week the only real "work" we had done together was maintaining the kruckenberg servers.

It all started a few months ago when OpenAir started asking internally for potential engineering candidates. I mentioned it to Pete and after some thinking he applied, came for an interview, was offered the job, did some negotiating, and now he's on board (it didn't happen that fast though).

We've hashed around a few "rules" about working together, and sometimes I get worried that it might be a bad decision, but we decided the risk of a problem was low as neither of us have decision-making ability that affects the other. It could be uncomfortable for one of us if the other "screwed" or "got screwed by" the company, but I think the chances of that are low as we're both pretty level-headed individuals.

We'll see how things change over time, but I'm mostly excited for OpenAir to have another bright open source guru on board, and excited for Pete to experience being part of a highly-productive, minimal-management, work-at-home environment.

Pete's in Boston this week (pick him up at Logan Airport in 1 hour) to meet folks, get some training, and attend the OpenAir User Summit.

Posted by mike at 10:04 PM

November 3, 2006

Gapless Playback on iPod is Good

I haven't said it out loud, but I've thought it many times over the past month or so:

Thank goodness Apple woke up and added gapless playback on the iPod.

Prior to iTunes 7 and a corresponding iPod update the iPod couldn't play two songs in a row without putting a little space in between them. Extremely annoying when listeing to live recordings or albums designed to flow from song to song.

I still brace myself for the annoying space between songs because I'm so used to it, but now every time it doesn't come it's a little celebration that Apple finally did something about it.

Posted by mike at 6:27 PM

November 2, 2006

MySQL, Unix Timestamp, and the Lost Hour

Today I fixed a bug in our application that was interesting to figure out. Without a ton of detail, the gist is that if you convert a datetime to unix timestamp in MySQL:

mysql> select UNIX_TIMESTAMP('2006-10-28 04:00:00'); 
| UNIX_TIMESTAMP('2006-10-28 04:00:00') |
|                            1162022400 |
1 row in set (0.00 sec)

And then add 24 hours to it:

mysql> select 1162022400 + (60*60*24);
| 1162022400 + (60*60*24) |
|              1162108800 |
1 row in set (0.00 sec)

And then convert it back to a datetime it magically loses an hour:

mysql> select FROM_UNIXTIME('1162108800');
| FROM_UNIXTIME('1162108800') |
| 2006-10-29 03:00:00         |
1 row in set (0.00 sec)

If you look closely that's just one hour shy of 24 hours.

Here's what's happening. When coverting the unix timestamp back to a datetime the timezone is taken into consideration and it just so happens that between the 28th and the 29th of October 2006 we went off daylight savings time and lost an hour. Now there's a bug that requires some specific information to duplicate. Luckily the support folks had narrowed the issue down to the exact criteria.

Even though I still need the unix timestamp for doing some other date comparisons, the better way to add a day to a date is to use ADDDATE:

mysql> select ADDDATE('2006-10-28 04:00:00', INTERVAL 1 DAY);
| ADDDATE('2006-10-28 04:00:00', INTERVAL 1 DAY) |
| 2006-10-29 04:00:00                            |
1 row in set (0.00 sec)

Posted by mike at 6:03 PM

November 1, 2006

Making Changes to MySQL Source Code

It's been an interesting last few weeks for me and MySQL. One of my side projects (I currently have three, two are MySQL-focused) provided an opportunity to really dig into the MySQL source code (5.1 tree). For many of my evenings for the past few weeks I've been hacking away, fiddling with the kind of MySQL customizations I've previously only seen other folks do.

The list of customizations:

And of course, while I was in there I threw myself into the authors list just to see what it looked like.

I've been compiling MySQL from source for years and have dug around a little to learn about what's going on under the hood, but never really in the mindset of what it takes to make changes or additions. I've always felt like source modifications required a huge learning curve, and would make the resulting binary very unstable. I don't think that anymore. I suppose it depends on what you're trying to do, but for the few items listed above I was suprised at how straightforward the changes were.

The sad truth is that my work isn't really destined for anywhere. I was doing the modifications simply to verify that they can be done, and offer suggestions on how to best do them.

How cool it would be to hash some of the experience around with other folks at the upcoming MySQL CAMP. Alas, it will have to wait, scheduling conflicts mean I need to be at home that weekend. Perhaps at the user conference in April.

Posted by mike at 11:53 PM

It's Inevitable when Tinkering with MySQL Source Code

It's inevitable that if you play in the MySQL source code for long enough you'll eventually stumble into the source for the show authors command and be tempted to do something with it:

mysql> show authors;
| Name                      | Location               | Comment                           |
| Mike Kruckenberg          | Boston, MA, USA        | Just one line of code, this one   |

Posted by mike at 5:15 PM