Hello Blog. Welcome to 2012.

So world. How have you been? Me? I’ve been out of touch.

You see… things got pretty hectic there for a while finishing up my latest video game. Granted it shipped over a month ago and I have had a little vacation since then, but it seems to take longer and longer as I get older to recover from the finaling push. That isn’t to say that I am enjoying it any less, it just takes a little longer to recover.

Lately I have been on sort of a digital walkabout. Poking around the programming world to see what is new, interesting and different. In search of the ever elusive wind that rekindles the embers of programming passion.

A word of warning: this entry is going to contain lots and lots of links to additional information for those who aren’t familiar with everything I’m going to talk about.

One thing that I have been playing with is CouchDB. CouchDB is one of the new generation of NoSQL databases. Which is just another way of saying a non-relational databases. A relational database stores everything in terms of tables of relations, where a relation is defined as a list of tuples (ordered lists of elements); and a table is a list of relations where each relation always has the same number of elements.

That sentence sort of got away from me there.

CouchDB on the other hand stores everything as documents. Every database entry can have as much or as little data stored in any type of hierarchy that it wants. This is incredibly flexible and powerful!

CouchDB stores everything internally as JSON documents. JSON is short for JavaScript Object Notation; which really just means it is a way to represent all of the elements of the JavaScript programming language in a text format. Fundamentally it is a markup language like HTML or XML.

This means you can have lists, dictionaries (key/value pairs), all kinds of data structures packed away in there; all mashed around in any form you want to suit your needs. You can even reference other documents just like you would other tables in a traditional relational database.

Another great thing about CouchDB is that it is really built from the web, for the web. By that I mean it uses HTTP and JavaScript for everything. That’s pretty much how the entire internet works. This web page you are looking at right now? You got it through HTTP. It has a ton of JavaScript to make it more dynamic and pull in things like Twitter over there in the side bar. Granted this site also has a bunch of PHP(another programming language) in it, but we’ll leave that alone for now.

I had been following CouchDB from the sidelines for a while and decided to dive in and try it out. I didn’t want to bother hosting my own database to get started with so I headed over to IrisCouch to sign up for a free hosted CouchDB database (is database redundant there? Probably).

I decided to write a little application that could take a list of TV episodes and track what I have and haven’t watched yet. I like TV, but now that I watch it on cable, DVD, Blu-ray, Hulu, Netflix and other sites. It gets hard to keep track of things. Especially when one show pulls you away from everything else for a while; say a month or a year. You can easily forget where you left off (I’m looking at you Grey’s Anatomy!)

So I picked my language of choice and got to work. For those who are curious, I picked Python. Why did I pick Python? Because Python is full of AWESOME! If you want to get something knocked out quickly, it is to me the best way to go.

I put together a list of all of the shows, seasons, and episodes that I cared about as a test. Then I wrote a quick script in Python to create ‘Show’ documents. Each ‘Show’ holds its ‘Season’s, which hold their ‘Episode’s. I used the excellent couchdb-python to do the heavy lifting of connecting to the remote CouchDB, creating the database and uploading the documents. The entire script was less than 100 lines of code, and I use a lot of blank lines. I guess I just like negative space.

Then I put together a simple web page that used JavaScript to query the information from the database. In CouchDB a query is just a function which you write in JavaScript that iterates over all of the elements in the database. As it iterates over them you look at each document passed in and decide if it has what you want. If it does, then you have the chance to create a new representation of the data on the fly (maybe you just want to pull out a couple pieces of information) or just pass through the whole document. CouchDB actually calls it a View, because it is a view of your data, but doesn’t have to be everything. It is simple and brilliant! JavaScript on the back end. JavaScript on the front end.

You can even edit your queries in real time with temporary views.

The end result? In a few hours I had thrown together a really simple, and ugly, site that met all of my needs. Want to see? Here is my quick little tvdb. Obviously it still needs some love and attention. Will it ever get it? Who knows?

I had a lot of fun with my little side project! I learned a lot and now have crazy ideas for things I could do with this type of database!

Well, if anyone is still here, I’ll try not to make all of my entries quite so tech heavy.

-The End-

Sleepless in Cockeysville

I can’t wait until Holly finally gets here. It feels like I never sleep when she isn’t around. I just sit up all night watching tv or playing games. Waiting to feel even the tiniest little bit sleepy.

Over the last month I’ve had far too many nights where I haven’t gone to sleep until after 2am. Then in what feels like seconds the alarm starts ringing at 7am to wake me up. At which point I generally argue with it for an hour or two. Mentally playing the game of what “What can I skip in my morning routine to get five more minutes of sleep?”

Last night was game night aka friendly fire friday and I was up until after 2am again. Then I had to get up at 7:30am to be out the door by 8am to venture off and try and get my driver’s license exchanged for a local one. Unfortunatley when I got there (30 minute drive away) it turns out they had decided that they wouldn’t be open on this Saturday unlike every other Saturday.

I have to tell you. That right there; is a feeling that sucks. You drag yourself out of bed on less than five hours of sleep, drive 30 minutes away, and then find out it was all in vain. At which point you are left with a 30 minute drive back.

I had checked a few weeks ago to see when it was open/closed. I knew it would be closed on the Monday. I just went back and checked the website again, and sure enough, it does say it will be closed today and Monday. Either that is new since the last time I checked or I some how missed it.

So yay… now I’ll potentially have to take another half day off work to go sort out yet another issue. I really think if the government is supposed to be here to serve the people, that it should be open on weekends. You know, when the majority of people actually have time to go take care of things.

They could always be open for only four hours a day Monday-Friday and then open eight hours a day on weekends. Because lets be honest. If you can easily carve out time to go visit places like government offices Monday-Friday, it probably doesn’t really matter what time of the day that is.

This wasn’t meant to turn into a rant, but there it is. I hope everyone else has a great long weekend (*for those in Canada, just have a great weekend).

A Lot Has Happened

So much has happened since last I blogged that I don’t even know where to start.

After an incredibly grueling year on my last project (which consumed all of my “free” time and then some) I decided it was time for a change. So Holly and I packed up and moved across the continent and south one country. Okay, that isn’t entirely true. Holly isn’t here just yet, but soon she will be! I can’t wait!

Moving to a new country has been both easier and harder than I thought it would be. I look forward to when the last few bits of paperwork wrangling is over with.

The new job is cool. The tech is completely different from what I’m used to working with. In some ways that is better, and in some ways that is worse. Hopefully I can have a hand in fixing up those bits that I currently consider to be worse.

Every day at work I get to learn more and more about the existing tech. It is quite a mountain of knowledge that needs to be climbed. I enjoy the challenge though.

Other than that since I’ve been living alone while waiting for Holly I’ve started to remember a lot of things about single life, and how much single life sucked. Take cooking for example; I was never an expert chef by any stretch of the imagination, but I had forgotten just how time consuming it was. Or how… adventurous?

One of those adventures were the “Mustard and Tuna Fish Sandwiches”. No, they were not as bad as they sound. Now don’t get me wrong, by no stretch of the imagination were they good, but they weren’t unbearably awful. How did it happen you ask? I had everything all opened and mixed up and went to add the mayo, at which point I discovered it had expired. It was late enough that I didn’t want to go out and get more so I looked for alternatives. It ran through my head that mustard was good on most of the other meats so why not give it a try? So I did…

Most of the other adventures have been less disastrous and as such don’t bear repeating. Then of course there is all of that laundry. All of those dishes. So much cleaning. All of the shopping. There really seems to be no end to it all.

I am really looking forward to when Spring arrives this year. Taking trips to Pennsylvania, Washington DC, maybe even New York. Plus of course exploring around Maryland as well. Hopefully even driving to visit my family and maybe having them come to visit us.

For now I’ll stop by saying that the adventure that we call life continues on.

Teal Zebras

I’ve been a hockey fan all of my life. That’s 30 years of die hard hockey fanaticism. I’ve cheered on many teams. I own jerseys for half the teams in the league.

I just love the sport. Plain and simple. I love the passion of the players and the fans. There is no other sport like it.

The series that finished tonight between the Detroit Red Wings and San Jose Sharks is only the second playoff series I have ever seen that leaves a bad taste in my mouth. The first one was when the Dallas Stars won the Stanley Cup over the Buffalo Sabres in 1999 on a goal that should never have counted.

I have no problem with a series that is decided because of a team running into a hot goaltender. I have no problem with a series that is decided because a lesser team simply outworks a better team. I do have a problem when a series is decided by poor officiating.

This series from the very beginning was clearly one sided in that department. A Red Wing gets tripped? No call. A Red Wing takes an elbow to the face? No call. A Shark closes his hand on the puck? No call.

I am not one for conspiracy theories, but it is clear that there was some favoritism shown to the San Jose Sharks in this series. Was that because of the individual officials? Was it a directive from the NHL head offices? Are people tired of seeing the Red Wings just keep winning? I don’t know. I do know that I have no interest in watching a tournament that isn’t officiated fairly.

The way that the series was decided leaves me thinking that it isn’t worth watching the rest of the playoffs. Something that I always watch. Each and every year. As many games as I can. I can honestly say that I only have cable so that I can watch hockey.

In fact, I believe I will be turning the dial away from the NHL Stanley Cup Playoffs this year and focusing on what will hopefully be some fair hockey. The 2010 IIHF World Championship of Hockey. I hope everyone else does the same.

Less Than 144 Days

So it has been less than 144 days. Just in case you were counting. Or even thinking of counting. I know it is hard to believe.

The weekend is nearly here. This weekend I’m on my own for Saturday. Holly and friends are heading south of the border for a very busy day of shopping. What am I going to be doing? I expect 10-12 solid hours of playing games and hopefully continuing to celebrate the Red Wings victory that should happen tonight.

Oh, and most important of all; I plan to not work. It’s always nice to take a break.

So, what else has been going on? That is a really good question. There have been some good things and some not so good things. We went out for lunch with some friends at a cool little place called Burgoo. They serve “international comfort food”. Mostly it was just cool to go out and do something with friends. It has been far too long.

We went to the drive-in. A great, and nearly extinct, form of entertainment. We saw Kick-Ass which was remarkably better than I expected it to be. There had been a ton of negative reviews about it, but based on seeing the movie I don’t think the reviewers watched the whole thing.

Our infamous black cat King Leonidus killed the laptop. It was his latest victim in a long line of unfortunate victims. He has killed a TV, a laptop, several glass/crystal pitchers, jugs and vases, even an electric heater with a Wii sensor bar. The cat has mad skillz!

That’s pretty much it. I just wanted to be sure to put something here rather than not. I spent far too long away from my blog and I need to turn it back into a habit.

Have a great weekend world!