Love your Free Ride entries; Keep them coming!

So far we have received 16 entries for the Proven Scaling Free Ride to MySQL Conference and Expo 2007, which will be in Santa Clara, California, April 23-26. (A recap: We are providing free airfare, hotel, meals, and a full conference pass to three people who impress us with their submissions.) A few of the submissions so far have had the panel laughing hysterically (and we DO appreciate a bit of humour in our judging). A few of you have not tried at all. I thought I’d provide some tips on what helps and what hurts as you submit your entries:

  • Helps: Showing that you have a sense of humour, and can tell a good story.
  • Hurts: Leaving all of the entry blanks empty.
  • Helps: Showing some humility, and that you will appreciate the free ride.
  • Hurts: Not knowing what the conference is about.
  • Helps: Telling us a little about how you intend to spend your time at the conference if you are chosen.

Submit your entry today! The deadline is this Friday, March 23rd at midnight PDT (GMT-7)!

Want a free ride to MySQL Conference & Expo?

Proven Scaling will sponsor three people to attend the MySQL Conference and Expo 2007 in Santa Clara, California, April 23-26!

That’s right, we will pay for your airfare and hotel, transport from the airport, and even a stipend for meals! MySQL AB has graciously provided us with conference passes for the Free Ride winners, so the winners will each receive a full conference pass.

Go to Proven Scaling Free Ride to enter. The deadline is midnight PDT (GMT-7), Friday March 23rd (just over a week away), so do it soon!

I look forward to reading your entries — and I hope to see you there!

Computing distance in miles

At the MySQL Users Conference, I mentioned that I had a stored function for computing distance in miles/kilometers/etc. from latitude and longitude. Some people have asked me for it, so here you go.

First, a general function for computing great circle distance from the radius of the great circle, and latitude/longitude for each point:

DROP FUNCTION IF EXISTS gc_dist;
CREATE FUNCTION gc_dist (
  radius DOUBLE,
  A_lat DOUBLE,
  A_lon DOUBLE,
  B_lat DOUBLE,
  B_lon DOUBLE
) RETURNS DOUBLE
RETURN (2 * radius * ATAN2(SQRT(@x := (POW(SIN((RADIANS(A_lat)-RADIANS(B_lat)) /
 2), 2) + COS(RADIANS(B_lat)) * COS(RADIANS(A_lat)) * POW(SIN((RADIANS(A_lon) - 
RADIANS(B_lon)) / 2), 2))), SQRT(1 - @x)));

Next, we can use gc_dist() to compute the distance in miles—on Earth—by passing in the radius of the Earth in meters:

DROP FUNCTION IF EXISTS earth_distance_miles;
CREATE FUNCTION earth_distance_miles (
  A_lat DOUBLE,
  A_lon DOUBLE,
  B_lat DOUBLE,
  B_lon DOUBLE
) RETURNS DOUBLE 
RETURN gc_dist(3963.1676, A_lat, A_lon, B_lat, B_lon);

You can also easily write another stored function to do the same using a POINT data type by using the X() and Y() functions within the stored function to extract the latitude and longitude. I’ll leave that as an exercise for the reader.

MySQL Users Conference 2006

Well, the conference is now over! I had a great time, and met a lot of awesome people. It was awesome, I truly enjoyed meeting many of you, and will definitely see you next year.

I’ve uploaded my photos and presentations for your enjoyment:

See you all next year!