Relax, Willya?

I don’t know why it is I can’t seem to leave work unfinished. Partly, I think it’s because I know someone’s going to see this thing I’m working on… and I don’t like people seeing work half-completed. It reflects poorly on me, it looks like crap, and inevitably someone’s going to want to “change” something because they’re only seeing the halfway version and not the finished result.

Tonight, I’ve written some 500+ lines of code. Ridiculous code. Embarassing shit that I will never show another person. I’m betting, with some time and finesse, it could be brought down to 100. Maybe less. The project I’m working on is a poker game, but it’s not really poker. In fact, I’ve just got it rigged so that you either crap out, get a pair, get three of a kind, or get a royal flush. The odds are shifted around so that it does take a few attempts, but the end goal is to “get” the royal flush.

The more I worked, the more I had to end up writing exceptions and escapes. By the time evening rolled around, I started to wonder (and still wonder now) whether my approach made any sense. I feel like I’ve overcomplicated everything… but had gone too far to really turn back. The only recourse would have been to ditch all the code and start from scratch.

All these exceptions. The poker setup was Texas Holdem, so there are two “Hole” cards down, five on the table. To make things more exciting, the two “Hole” cards always had to be possible Royal Flush cards (ie, 10, J, Q, K or A). Four outcomes: Royal Flush, Three of a Kind, Pair, or Nothing. Seemed pretty basic.

What I didn’t count on was trying to account for things like straights and flushes. So not only was I trying to come up with logic to adhere to the particular result… I also had to ensure that other combinations didn’t occur.

I feel slightly better about things now, but I feel like a noob. This whole project feels like a Programming 101 homework assignment, and something a more skilled programmer could have finished in about 1/10th the time.

I need to stop being so compulsive about things. I’m questioning where I find my happiness/satisfaction. And yet, I’m staying up all hours to do work.

The one plus from this evening: I got to see Katie earlier. We’ve traded messages (although she never calls me back *ahem*), but it’s been a long while since we’ve talked. I saw her in the studio as I as walking back from getting a Mountain Dew… and she ran out and hugged me (it was one of those running/tackle hugs which, given my mood was quite nice).

This Post Has 0 Comments

Leave A Reply