July 2006 Archives

Sorry for the lack of activity at LTM lately... things have changed over here and I've been too "busy" to write. See, while on my business trip to Asia, I told Tomo that working from home wasn't working for me. Being completely isolated all day, stuck in my house from morning to night... it sucked. Tomo was understanding and agreed to let me out of my commitment (I originally said that I would stay with them at least until the end of December) so I began the job search here on Maui.

One place that I had previously contacted seemed interested in me but had not yet made a job offer. But, by the end of my first week back on the island, I had received a job offer paying more than I was currently making! The new place wanted me to start working on July 10th, so I let Tomo know that I would be finishing my contract the week before that. He was ok with it, and told me that they didn't really have any more projects for me anyway. So, my last day with e*** turned out to be June 20th! THREE WEEKS OFF!

So for the last 2.5 weeks I have been playing and relaxing in Hawaii... which, as you can imagine, does not help me keep my website updated. I wanted to be outside playing in the sun, not inside typing on the computer! But now that my three week vacation is almost over, I'm starting to become aware of the things I've neglected... So, expect more regular updates going forward.

X3

Three weeks ago I bought my main mode of transportation... a Trek 7100 bicycle. It’s a hybrid style bike, which means it has skinny tires like a street bike but has the shape and feel of a mountain bike. At $320, I thought it was reasonably priced and I’ve been VERY happy with it. Since that Thursday three weeks ago, I’ve ridden over 120 miles! I thought it might be fun to track all of my trips, so I spent some quality hours in the last week creating a webpage to enter and display my bike trips. I am quite excited about it, so unfortunately for you I am now going to describe it.

First off, here’s the webpage for displaying my trips (or here’s a version with more features, but it’s a beta version since I don’t like how it opens new windows). I’ve also added a permanent link to the ride log page on the right sidebar. Anyway, the very cool thing about that page is it’s generated on the fly from info in a MySQL database. The database contains a few tables that track rides (dates, routes, miles), places (place names, addresses or coordinates) and distances (a list of two locations and distances between them).

The pages are all written in Perl from scratch and access the database using the Perl Database Interface (DBI). I had never used the DBI before, so this was all new to me (in fact, I’ve not used Perl much since college, so this was quite a learning experience). So, you’ve seen the display page, but let me show a bit of the slick input pages. Here’s the initial page where I can put in trip data.

The date field is auto-filled with the current date using a nice piece of Javascript code that I found on a tutorial page. And here’s the same page with a sample trip put into it.

Routes are described using the pattern above, which was convenient for parsing while also making a decent amount of sense. Once the ‘Submit’ button is pressed, the first Perl script is run. First task on the list is to make sure all of the places entered are recognized. In this example, I had already entered trips that included ‘Home’ and ‘Bike shop’ previously, so their addresses are already in the database. Here is a screenshot before I have typed anything into the fields.

Since Safeway is a new location, I can type in the address and then the address will be remembered for any trip in the future that includes Safeway. Hitting ‘Continue’ brings me to the next page which deals with the trip distances for each leg of the trip.

A previous trip contained the ‘Bike shop to Home’ leg, so the distance for that portion of the trip is already known. For the other two legs of the trip, I need to look up the distances and enter them into the webpage. Fortunately for me, I was kind enough to automate the looking up of distances. Because the addresses are known for these places, I was able to automatically create driving direction links to local.live.com for each of these legs. For example, the ‘Home to Safeway’ link in the screenshot above would take me to this page. So, all I need to do is click these links and enter the mileage in the appropriate boxes.

With a click of the ‘Finish’ button, the mileage for the new trip legs are saved for future reference and the actual ride data is saved as well. I never have to touch messy URLs, the links to waypoint maps on the display page are generated using the place addresses or even latitude/longitude coordinates!

The only thing I haven’t spent much time on yet is the look and feel of the pages. I would prefer the ride log page to look a little nicer than just plain old HTML tables, but I’ll save that work for some other day. The important thing is that I can easily enter in ride data right now and it’ll instantly show up on the log page!

As Kara mentioned on her blog, we tried surfing over the weekend. But this wasn’t beginner friendly surfing, it was “here’s a board, go try it” surfing. Kat called us on Sunday and told us that she was meeting a friend, Tim-boy, at Breakwall in Lahaina and we could join if we wanted to try our hand (foot?) at surfing. Tim-boy had an extra board already out at the beach, so we picked up one more at his house and headed out there. Kara and Kat went out first but before Kara could even try anything, she got nailed in the back of the head by a stray board. She returned to the shore and once I had her sitting down and she assured me that she was alright, I took the extra board out.

First off, paddling a giant board past all the breaking waves is tough work! My pecs definitely got a workout that day. Once I got out to where the waves were rolling in, I tried getting up quite a few times. I felt like I was catching the waves, but I just didn’t know how best to get in an upright position on the board. With no one out there telling me what I was doing wrong, it was really quite futile. But I had fun anyway, I figured I’ll have plenty of time to really figure out how to do it, so this was just an introduction to controlling a surfboard while not standing.

Today I signed Kara and myself up for SCUBA lessons! We’re doing a PADI open water certification; our all day lessons are on August 13, 19, and 20. I rode my bike out to Maui Dreams Dive Co. today after work to sign up and they gave me a packet of information to study up on before our first lesson. We have to read a 250 page book and take a bunch of open-book tests before we can even get in the water! And I’m so excited about it that I’m already 40 pages into it!

I’m surprised at how much I’ve already learned. Like, did you know that you NEVER want to hold your breath while SCUBA diving? As you ascend, the air in your lungs expand, so if you’re breathing normal the air escapes naturally. But if you hold your breath, your lungs can rupture!! Yikes! Also, did you know that your nose is enclosed in your mask for a more practical reason besides “keeping your nose dry?” As you dive, the air in your mask compresses, so you must equalize the pressure in your mask by exhaling air into your mask! Wow! Pretty much all the stuff I’ve learned so far is about air under pressure, who knew it could be so interesting!

Today is my first Friday at my new job and I’m glad to report that I am really happy so far! I won’t be posting details of the job here on the ol’ blog, but I will say that this company is unlike the other companies I’ve worked for. My previous companies have been solely software focused, but this place is a science company with a burgeoning software team. That means I get to work with smart people with completely different skill sets and areas of knowledge. Very cool!

I Billy-ized my work keyboard this morning… Stupid insert key.

Riding to work has been very enjoyable. The ride takes 20 or so minutes so it’s a nice little workout to wake me up in the morning. This morning I left a little earlier than normal, so I took my time and enjoyed the beautiful sites of Haleakala, West Maui Mountain, and the ever present Pacific Ocean. I get to bike around on Maui every morning before I go to work... I hope I never wake up from this dream!

Yesterday I rode my 200th mile on my new bike. I bought it less than a month ago...

I stopped reading Dune: House Atreides a few weeks ago, it was absolutely dreadful. I made it through about half of the book before I just decided to put it down and walk away. Let me try to sell it to ya:

Frank Herbert’s son teamed up with a crappy Star Wars book author to write a Dune prequel in which they expose all of the mysteries that made Dune so great...

I KNEW this book was going to be bad, but I honestly didn't think it'd be THIS bad. In my defense, I really didn’t have much selection in the English used book store in Takadanobaba...

By popular demand, the width of the comment textarea has been increased. Check it out and let me know if you are pleased.

Since I was working on comment stuff, I got to wondering about just how many comments have been left on my site... So, I threw a query at my database and it returned a shocking number... exactly 1100 comments! I figured it must be a mistake, so I browsed through the results and what do you know... 1100 comments. Crazy!

Kara and I went to the beach on Saturday (surprise!) We usually go to Big Beach, so I suggested that we check out a different beach. We ended up going to Palauea Beach which seemed to have pretty decent boogie board waves. As we got in the water we noticed that it was kinda dirty. There is construction going on nearby, and it looked like there had been red dirt runoff from the site because the water was really murky at the shore. Murky water = greater chance of shark attack, but we decided to brave it anyway.

The waves were really nice for boogie boarding, but the dirty water was bothersome. I caught a few waves, then while I was standing in neck-high water waiting for the next wave I felt something flutter past my chest! I quickly looked down, and saw something swimming around me! I jumped back, but then I got a better look at it and realized it was a 6 - 8 inch fish. Backing up didn’t help, the fish followed me and kept staying directly under my boogie board. I showed the fish to Kara and then tried moving my boogie board so it would go away, but it wouldn’t!

It was about that time that we decided to get out and find a cleaner beach… We checked out Po’olenalena Beach but it was just as dirty. So Big Beach it was!

Did you hear about Hurricane Daniel? I did. Last week I got an email from work saying that Hurricane Daniel was near Hawaii but wasn’t expected to reach the islands. Then a few days later they said that it WOULD reach the islands but would probably be downgraded to a tropical storm by then. As of yesterday, Daniel officially became a tropical storm, so I guess we’re safe. It should be here by the end of the week. Weird, I live within reach of hurricanes now...

I added a tiny feature to my site last night... The total distance I've ridden on my bike now shows up in the right sidebar. I suppose I really need to spend some time on the actual bike log page since it looks so crappy...

Maybe some day, I'm too busy riding my bike right now!

Random Photo