Archive for January, 2008

h1

Learning Hurts

January 9, 2008

I love learning new things. I enjoy the feeling of accomplishment of figuring out how to do something and solving a problem. I wish it wasn’t so painful sometimes, though. I think I spent two hours this morning figuring this one out…

I’ve been writing a simple script to dump data, some of which is a code/index that represents one of several possible strings, which are also stored in the database. Following some work that has been done previously, I set up an hash (an associative array composed of key/value pairs) to hold the strings for inclusion in the data to be written to file. But it wasn’t working. “Gee, why wasn’t it working?” Well, I’ll tell you why. Because of ‘ ‘. “What?” The space. The empty space between those two quotes. The database was returning a two character string ( ‘ 1′, ‘ 2′, etc…) and the strings in the hash were inserted with keys ’1′, ’2′, and so on. Two hours to figure out that I needed to tweak the data from my query. Of course, I’ve since figured how I could have coded that into the query and avoided the extra work in the first place. Hmph.

Yeah, Christmas and stuff. I hope everyone had a good one. There’s a few people I still have yet to call and say ‘Hi, I’m alive!’ but I promise I’ll get to you. (Sorry Aunt Lill!) I had a good visit with mom in Tennessee where I was unexpectedly removed from my online life completely for three days. (No Starbucks or other internet cafes!) Mom even suffered through a grueling cave tour with me, which was very cool. It’s amazing to see the area since they removed the highway over the gap since the tunnel was opened, which allowed the entire area to be restored to it’s natural state. I remember ‘back in the day’ when we went to that same cave, which was right on the side of the highway, which ran along the side of the mountain –across from which was a sizable store with knickknacks and stuff. All gone and one wouldn’t guess without prior knowledge. Very awesome.

Travel early and on Christmas day wasn’t bad at all and I was happy to make it back and find Cleo and Cosmo watching the Twilight Zone marathon on Sci-Fi. It’s ironic to me that I survived my travels without picking up any bugs, only to catch a cold from friends here during new years. Thanks.

Follow

Get every new post delivered to your Inbox.