Thursday, January 29, 2009

Iphone 3G or Blackberry Bold - Help Me Decide

Ok Interwebs I need your help. I need a new cell phone and have it narrowed down to the IPhone 3G and the Blackberry Bold. But I don't know which one to get. Here are my needs/thoughts please share your opinion with me! Thanks.


I am buying this phone, my employer isn't so I want a phone that will not only do well for my work but also will be good for more casual use. My company uses Lotus Notes (ugh) for email and we have a Blackberry Enterprise Server for pushing email to our phones. I love to listen to music but rarely carry my iPod becuase my cellphone is already in my one keyless pocket. I have a Blackberry Pearl right now and it's music interface sucks.

Honestly, I'm torn because I think the IPhone will be better for my personal desires while, obviously, the Bold will be better for my work needs. It's a 50/50 proposition. I'm honestly leaning toward the IPhone due to the expandability of the Apps and the built in IPod. I'm hesitant to use the IPhone because I dislike ITunes and I'm afraid the battery won't last considering all the email checking and replying I do on my phone currently.

So folks - help me decide. Which phone should I get and why? Thanks!

Friday, January 23, 2009

My Virtual Machine Hell

Normally when I first hear about a new technology I jump right on it. I am always installing new software to try things. Yet, for some reason I have never installed a virtual server technology. I've never done anything with any virtual machines. Heck, in ma.gnolia.com I have had the link to the free version of VMWare server bookmarked for almost 3 years but until this week I had never even tried to install it. What's up with that?

As I mentioned in my prior blog posting however I have decided to dive into the land of virtual machines. My first effort was to download and install VMWare Server 2.0. It is a pretty sizable download and it runs via a web-interface and is built upon tomcat. It is kind of a beast. I installed it and got it running but it was painfully slow for me. Then, when I tried to connect to my virtual machine from within Chrome I was told to download and install a plugin but the whole server seemed to crash. Also, the normal instructions for a VMWare image didn't work (clicking on the .vmx file) Instead I had to copy the image files into a directory under the "virtual machines" directory created by VMWare Server.

After the crash I decided to uninstall VMWare Server 2.0 and try something else. I had thought about checking out VirtualBox when I had installed Ubuntu on it's own partition so I decided to see if a version existed for windows and sure enough one did. So I installed it and then installed Ubuntu inside a new VM. Well, I tried to. It took me about 3 or 4 efforts to get the install to actually work. And when I say installs that means re-installing VirtualBox as well. Heck, VirtualBox itself just seemd to hang on installing a few times. Finally I managed to get Ubuntu 8.1 installed but any interaction with it was painfully slow and laggy. I also couldn't work with it in anything greater than 800x600 resolution (though I didn't get to try the guest user tools). I tried to update the ubuntu install but it took over 13 hours to not even complete the update download (on a strong connection) so I finally aborted and decided to try something different.

A co-worker had a copy of VMWare Server 1.8 handy that I decided to install. It isn't webbased and a few other co-workers have had some good luck with it. It installed without a problem and the ubuntu image I already had worked just fine. Now I'm finally able to start working with Ubuntu inside my VM so I can begin to dig into CruiseControl.rb - I will detail how I get that all setup in a later post. Stay Tuned.

Tuesday, January 20, 2009

CruiseControl.rb

I mentioned in the past that I was going to try to setup CruiseControl.rb on my CI server. However, there seems to be some kind of conflict in system settings between CC.rb and vanilla CC (the java version). Thus, I wasn't really able to proceed since I needed the java version to keep running because some active projects are being built with it.

I also tried it on my laptop but that ended up causing me some problems because of my current ruby needs; thus I was kind of stuck. However, I think I am going to do a couple things to change things up and make it more practical for me to run CC.rb.

First I'm going to get rid of my ubuntu install. I never boot into it really and I need the harddrive space back for step 2. The second step is installing ubuntu in a virtual machine. I'm not sure why I didn't do it that way in the first place. This will let me continue to work in windows (where all of my project work is) while also working on getting CC.rb setup. I think this will give me a great opportunity to experiment and will also give me more time in linux mucking around.

I will probably take the easy way out of installing CC.rb and that is by using a handy tool/script pack called cinabox that was created by one of the authors of a cool tool I like to use called Pivotal Tracker.

I'll probably post about my VM setup experience as well as how well cinabox works out for me. So stay tuned.

Site Feed

I just updated the sites feed to be published by feedburner instead of the normal blogspot feed. This shouldn't have any impact on my few (if any) subscribers but I thought I should give a heads up.

I'm also including, at least as a temporary trial, google adsense in the new feed. If it seems like a pain in the ass or is too distracting, or if my few (if any) readers complain about it then I'll remove it.

Sorry for this totally meta post.

Tuesday, January 06, 2009

Unit Testing Coldfusion (CFC) Private Methods

To be honest I've not really seen much written detailing good (or even standard) ways of unit testing private methods without making their scope less restrictive than private. Thus I'll detail the way a co-worker a technique a co-worker and I came up with that seems like it will work pretty well. If you see any potential problems with this approach please just let me know in the comments.

The approach is fairly simple. We create a helper class that extends and "wraps" our class to be tested. This helper class then has simple methods in it that expose the private methods via a wrapper. So let's say we had a class, MoneyLender, with the private method of computeInterest(). Let's ignore whether that method should be private or not for arguments sake. We would create a MoneyLenderTestHelper class with a method in it called computerInterestWrapper() which actually just returns the private computeInterest method.

Right off the bat I have one potential concern and that is will the other private things (methods, member variables, etc) still be exposed to the private method that is being returned? I haven't tested this out yet so I don't know.

Anyway, my test would then instantiate the MoneyLenderTestHelper class, and call the computeInterestWrapper() method to get a reference to the private method to be tested. Then I could execute the method and perform the test. If the test needed to analyze the state of any private member variables I could create a helper method in MoneyLenderTestHelper that would inspect the private variable.

The main reason for returning a reference to the method in the helper class, instead of calling the helper method there, was so that I don't have to maintain the method signature in both the class being tested and in the helper class. My test obviously has to know the signature but overall this seems more maintainable.

What do you think? I'll post more as I muck around with the approach and let you know how well it all works. We've already implemented the idea on a few test cases but the private methods don't actually touch any private member variables; however, in the cases we have tried it with the technique has worked out well.