2007-02-15

SPF 0

This winter weather we're having has me longing for summer. Which reminds me of an annual argument my wife and I have sometime in the middle of June.

I come home from work and see that my beautiful wife has been burnt to a crisp by Mr. Sun.

me (head):“Christ. Every fuckin' year. We have to say something.”
me:“Nice.”
Sherry:(feigning ignorance) “What.”
me (head):“And here we go...”
me:“How's that sunscreen? Is it still in the bottle?”
Sherry:“I used it. I swear!”
me (head):“Say something sarcastic. Something witty!”
me:“Right.”
me (head):“See, this is why we never win arguments with her.”
Sherry:“Ask the kids.”
Oldest Son:“Dad, she put it on. I saw her. She put it on herself after she put it on us.”
Sherry:(grinning like an idiot) “See?”
me (head):“First rule of Parent Fight Club: don't involve the kids.”
me:“So you put it on and then...what? You took a shower?”
Sherry:“It must have washed off in the pool.”
me:“Really. If that's the case, then the kids should be burnt as well.”
Sherry:“I don't know. It doesn't matter. I'm not like you. This will turn into a nice tan in two days.”
me (head):“That's why she does it. Every fuckin' year. Say something. Let her know that we're on to her.”
me:“I'm gonna play Quake now.”


And so my thoughts are littered with images of Sherry at the beach with her grandchildren.

Mmmmm. GILF.

2007-02-14

Unit Testing: still rewarding

I'm not going into all of the obvious virtues of unit testing. If you're a developer and you don't know them, you should probably find a new career.

I didn't like unit testing. I didn't like spending my time writing a test when there was plenty of useful code to be written. Working at Capital Blue Cross for a year changed all of that. My partner, Andy H., insisted that I write a unit test for every part of the system. My work wasn't considered done until the corresponding unit test was written. What a taskmaster. Consequently, I didn't feel productive at all.

Near the end of the project, it was time for us to start running the application through its end-to-end testing. After a few runtime setup environment problems and false starts, the application ran without a problem. It was one of those "Did it just run without a problem?" moments of disbelief. Not only did it run without crashing, it produced the output we were expecting. Hopefully Andy will back me up with a comment so my readers know that I'm not making this up.

OK, so unit testing produces applications with less bugs. Duh. If you didn't know that, or worse, you don't believe it, please stop reading now.

Now for the benefits that I wasn't expecting.

Writing testable code means writing readable and organized code. For example, I wrote an object responsible for building an email using contextual data and a template and sending it. I blew through the implementation pretty quickly. In no time, I had a 150 line method that did it all. OK, time to test. Congratulations jackass, you just wrote a lump of untestable code. I was forced to break the huge-ass method into smaller, more testable, methods. When I was done, I had a class that was easier to read. Even better, I had a class that was tested.

No more Winnebago classes. We've all done it. "Oooh, I know, I'll add this neat feature. No one needs it right now, but someone might need it in the future." When writing code with unit testing in mind, you tend to skip those neat-o features when you also have to write a test for them. The result is lean code that does only what it has to do.

Writing unit tests forces you to think about the design from a different perspective. You may write a nicely organized class that is easy to test, only to realize a design flaw while writing the unit test. After writing a unit test with 70 test methods, you may think the class would make more sense if it were broken into two classes.

Even though I've had mostly positive experiences incorporating unit testing into my development cycle, I still feel unproductive while I'm writing a unit test. Hopefully this feeling will change. I guess I feel unproductive because the benefits are delayed. I take great pleasure in watching 16 unit tests fail because a developer (probably me) made a "simple change" to a core class.

2007-02-07

Squirtle 2000-2007

Squirtle

We had to euthanize our dog for obvious reasons. I know it's the right thing to do, but it feels so wrong. At 4:15PM today, he was injected with the blue chemical and died in my arms.

2007-01-28

I Know a Guy Who Knows a Guy

We have/had the worst oil company ever.

Instead of spending my morning protesting in front of the local church, I was busy calling home heating oil companies. After twenty-three separate, "I'm sorry, sir, we only provide emergency service to existing customers," dead ends, I gave my neighbor a call. He's a man who's spent his life in Carlisle and seems to know a little something about everyone.

He leans on me for geek support, I lean on him when I have...I don't...I can't think of...any other kind of problem.

me:“Hey, man. I got a problem with my furnace and I was wondering if you could help"”
John:“Sure. What do you need"”
me:“Um, two hundred fifty gallons of oil.”
John:“Dauphin Oil left you high and dry.”
me:“Yeah...how'd you know"”
John:“Oh, everyone knows they've been havin' problems lately. I bet you're havin' fun tryin' to get someone to fill up your tank on a Sunday.”
me:“I called everyone I could find in the phone book. They all tell me the same thing.”
John:“That they only help existing customers, right"”
me:“Right.”
John:“OK, let me make a few calls. I'll call you back in a few minutes.”
me:“K. Thanks.”
a few minutes later
John:“OK, here's what you need to do. Call Carlisle Petroleum and...”
me:“I already called them.”
John:“Well, call them again. But this time, tell the person that the message is for Paul.”
me:“Paul"”
John:“Paul. And tell them that you're a customer of Dauphin Oil.”
me:“OK. Is that it"”
John:“Yeah. She won't do anything until you tell her that the message is for Paul.”
me:“Tell her the message is for Paul and that I'm a customer of Dauphin Oil.”
John:“Yeah. Tell them that and you'll have heat in an hour.”
CPI Service:“I'm sorry sir, we only provide emergency service to existing...”
me:“This message is for Paul. Please tell Paul that I need oil.”
CPI Service:“....OK, can I have your address and phone number please.”



Fifty minutes later? Heat.

2007-01-24

A Million Dollar Idea

Amazon Web ServicesAmazon has it right. In addition to providing one of the best department stores on the interweb, they have been quietly providing incredible web services. Elastic Computing Cloud, Mechanical Turk, Simple Queue, and S3 are few of my favorites.

All of these services share the same basic theme:
"We can do this server hardware stuff much better than you. So why don't you focus on the software, and we'll do the rest."

How much? Pretty damn cheap. For example, here is their pricing for S3:

  • Pay only for what you use. There is no minimum fee, and no start-up cost.

  • $0.15 per GB-Month of storage used.

  • $0.20 per GB of data transferred.


So what can you do with it? That's up to the developer. There are several free and open source applications that provide slick interfaces to S3. I'm using JungleDisk. It's an active project with binaries for Windows, Linux, and Mac OSX. You give JungleDisk your S3 account information, and it gives you a file system that you can mount as a drive. The virtual file system JungleDisk provides is only available to your local machine, which is a little restricting, but there are ways around that.

Now that no one is still reading, here's my million dollar idea:

S3 + JungleDisk + Linux + Samba + Hacked Router = the perfect network storage/backup appliance.

  1. Install Linux on a router. Linksys seem to play nice with Linux.

  2. Install JungleDisk on the router.

  3. Point the JungleDisk instance to your S3 account.

  4. Install Samba on the router and use it to share the JungleDisk mount point.

  5. Enjoy your worry-free network storage appliance.


So why spend several hundred dollars on a networked storage appliance with limited capacity, when you can have the Infinite Storability Drive from Sparrowlegs Systems Inc.

2007-01-15

Sometimes I pee a little when I cough -Sometimes I ejaculate a little when I yawn

Don't ask me how I found this. I don't want to talk about it.

Clomipramine, is an antidepressant that has many interesting side effects. This one grabbed my attention: yawns can cause orgasms. The second case, "... A married male in his mid-twenties ...", was my favorite.

My mind was/is reeling thinking about the recreational possibilities this drug possesses (wow that word has a lot of S's).

Sherry, if you start taking this drug, can I watch? Imagine, you could climax before, during and after sex!

After I tell you a really funny and witty joke: orgasm.
After I tell you about my exciting day at work: orgasm.
During the 90 minutes of SNL: orgasm.
Morning: orgasm.
Night: orgasm.
An hour after eating turkey: oh god. oh god! orgasm.

Unfortunately, there are several not so entertaining side effects:

... , enlarged/painful breasts, unwanted breast milk production, irregular/painful menstrual periods, ... , trouble urinating, severe vomiting, ... , unusual/uncontrolled movements (especially of the tongue/face/lips), ... , black stools, ... ,vomit that looks like coffee grounds.


Coffee grounds!?

2007-01-14

Challenge Pro Mode Matches On

The development of my favorite Quake 3 mod is alive and kicking. I'm amazed by the longevity of the game. I know it's dated but I love it. As I play into the night, (OK -- 11PM), I must be one of 30 people who hasn't moved on.

A few weeks ago, while aimlessly surfing the interweb1 instead of writing a post for my blog, I decided to check out the Challenge Pro Mode site. Holy sweet Jesus! People are still actively developing the mod! The version I was running was 8 revisions behind. Wow, that's embarrassing. They have an RSS feed now, so I won't miss any future releases.

Here are my impressions so far...

Pros



  • Greatly improved GUI, giving easy access to most of the settings. Wanna hear through walls, turn off rocket smoke, or add cool effects to the Railgun? No problem. It's all adjustable from the GUI. No more editing configuration files.

  • Better looking fonts. Sounds stupid, I know, but they look so much better than the old ones.

  • New in-game announcement voice option, providing a sexy female voice alternative to the default I-also-do-narration-for-movie-trailers guy.


Cons



  • Lower ammo counts for weapon pickup. You know, when you frag someone and get to pick up ammo from the weapon they dropped? For the Rocket Launcher, it used to be a 10 round/rocket reward, now it's 5. Doesn't sound like much but you'll notice.

  • Slightly less running speed. I realized that I wasn't able to make all of my usual trick jumps. Surely, it can't be me.

  • More segmentation faults. The CPMA bots (level 6 and up) appear to be broken again. My version of the game crashes from a segmentation fault whenever I attempt to use them.


In related news, I got a new mouse for Christmas. When it comes to tracking accuracy and speed, this one is better than my old mouse. The buttons could be a little better. There are five buttons in the wheel: scroll up, scroll down, click, tilt-left, and tilt-right. For normal computer use, these buttons are really handy, but in the heat of battle, I still have trouble. The tilt buttons are really sensitive, and the mouse wheel click requires too much force.

1 Deppen, I've added this word to my spell checker dictionary. So, no, I'm not going to stop using it. I'm a pioneer.