Apr 26 2009

Outsourced my web hosting….

Category: BloggingPhil @ 8:19 pm

moz-screenshot-6I can’t believe that I just outsourced myself! After my recent Ubuntu upgrade experience, I finally pulled the plug and signed up with bluehost.com. For the money, it is really not a bad deal; especially if you are crazy enough to have multiple domains. Now I just have to figure out the logistics of changing the name servers and track down where the email goes. Not too big a deal, I’m just not looking forward to explaining to my family, just where to find their email!

I was really impressed with the cPanel application, just a couple of mouse clicks and you have a WordPress installation, another couple clicks sets up your email, and a few more sets up the FTP space. Pretty slick! This was not near as much fun as spending multiple evenings learning how to set this up on my own box; now I can really appreciate everything that cPanel actually does.

As a test, I transfered one domain, windyknolldesignstudio.com. Hopefully, in the next two days, all of the name servers will be synced up and I can see what I actually did! When I decide to move beilers.com, there is even a way to transfer my blog to the bluehost server; that will be an interesting test!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 25 2009

Ubuntu 9.04 Upgrade Disaster, Almost….

Category: Blogging,UbuntuPhil @ 6:38 pm

My Ubuntu 64-bit 9.04 upgrade did not go very smoothly, it left my machine un-bootable. The upgrade downloaded all of the packages, but seemed unable to install anything. The detail window was full of the same message, something about a dpkg failure. I was really bumming, as the upgrade on my 32-bit laptop worked flawlessly. I hoped that I could recover my blog, but was not exactly sure how it would workout. I tried using chroot after booting from the CD, but the install messed up the file system so badly, nothing would run.

I found an old 40GB Quantum Fireball drive in the basement and did a clean install. You have to give the Ubuntu team credit (even though I was pretty mad about my upgrade problem); the install was really quick and everything was auto configured after the install. I was super happy! The clean install actually fixed my NVIDIA driver issue; one of the 8.xx patches toasted my video settings about a month ago. I lost my advanced desktop effects, screen savers, and Avant Window Manager (dock). This actually ticked me off too, I hate when things don’t work like they are supposed too!  One thing that was really surprised me was how slow that old IDE drive was verses the new SATA technology. I have to get that drive out of my box, ASAP!

It was pretty easy to recover MySQL and WordPress. I never took the time to figure out how to backup MySQL, so I was a little worried about losing my blog data; I guess that will now be my number one priority.  The restore was as simple as copying all of the files from /var/lib/mysql and /var/www from my old drive to the new drive. I just had to change the file owners and groups, restart MySQL, and my blog was back, up and running. Not too bad!

Not that it would have helped, but my trusty NAS storage seems to have bit the dust last week; great timing!  I have been using a Buffalo Technology LinkStation for several years as my off-site backup, it is out in the barn! It has always worked perfectly, other than a noisy fan, which has been fixed in the new models.

I’m going to stop locally hosting my blog and sign up with bluehost. I think this will fix several issues for me; I won’t have to run my computer 24×7, upgrades won’t be such a risk, and maybe using them as an off-site backup.  I also plan to move my wife’s web site, she has an interior design business, over to bluehost as well; then I can setup a real site for her, rather than some simple web pages.

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 23 2009

Moving from Continuous Integration to Continuous Testing…

Category: Java,TestingPhil @ 1:01 am

I have been following Kent Beck on Twitter for some time, keeping an eye on his jUnit Max product. I think it is a very cool idea, especially with the Eclipse integration. If you have a well written jUnit suite, this could be pretty slick. I only wish Kent would kill the subscription idea; I can’t really blame him for wanting to make money, he just won’t be getting any from me! It is a bummer the tool is not free. It is hard enough to get some developers to build unit tests, now I’m going to charge them a subscription fee to execute the tests… Not happening!

Here was a short little post on the concept. Give it a read and share your thoughts…

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 22 2009

Validating and Managing Argument Dependencies with Args4J

Category: Java,TestingPhil @ 7:17 pm

I recently reviewed some Java code that was designed to process a set of arguments; my first thought… there has to be a better way! I did a quick Google search and found multiple command line processor implementations. My favorite seems to be the Args4J implementation. I like the simple Java Bean approach, taking advantage of Java 1.5 annotations, enumerations, and generics. The best part is the auto-magic type conversion from string arguments to bean properties. It feels a little like Apache BeanUtils, but the annotation processing makes it more flexible.  A pretty slick implementation, but with a couple of small tweaks, would have been even better.

The Args4J implementation provides an ample collection of option handlers to support automatic type conversion of the basic Java types. Option handlers are provided for the all of the numeric types, URLs, Files, bounded lists (enumerated values), as well as unbounded lists. The implementation is easily extended; custom option handlers can be added to support your own object types or specific input formats, such as dates.

Overall, Args4J is very well done; I would have liked to see a little more support in the following areas:

  1. Args4J provides no default support for handling Java Date Types. I created a simple abstract option handler to support any data format.  A concrete class is required for each desired format; but the subclass only needs to provide the requested date string format. An abstract date handler class might be a nice addition to Args4J, even though it was very simple.
  2. Args4J does not provide any type of argument validation, beyond basic type conversion. In my AbstractDateHandler class, I implemented a validate(<T> value) method. The validate method is invoked before the date instance  is “set” on the bean.  This implementation allowed me to ensure the specified date was before today’s date.  This was really pretty clean; if the specified date was in the future, the option handler threw a CmdLineException containing the validation error in the message. This exception was handled up the call stack, just like any other type conversion issue, no special coding required.
    • I can see this being very useful for numeric types as well. Maybe only positive integers are valid for as a specific parameter. The current Args4J implementation provides no way to seamlessly provide this type of validation via the Option Handlers (without cloning an the existing handler).
    • This type of validation can be implemented in the Java bean, but the annotation must be specified on the setter, rather than the property.  Some developers might actually prefer the validation logic it in the bean. Personally, I would rather see this logic managed by the option handler.
  3. The biggest hole in the implementation is the management of argument dependencies. For example, it would be nice to validate if the specified start date parameter is before the end date parameter, or if the print parameter is specified, the filename parameter is not allowed. This type of validation can be implemented in the bean, but would be invoked outside of the argument processing flow. You will have to mange exception logic in two places, once for the “type conversions” and another for the intra-argument dependencies.
    • There are some flaws in my theory, but I thought it would be better if the option handlers had some knowledge of their own dependencies. My theory works well for required options, but not so well for optional ones.
    • I created a custom CmdLineProcess class, which was hidden by suggestion #4 below. This class owned a dependency manager instance which made the previously processed command line values available to the current option handler.
    • An ArgumentsDependency class was accessible during the validation process. The handler could now ask the dependency manager for values that were processed by other handlers. In this example, the EndDateHandler is asking for the dependency manager for the value parsed by the StartDateHandler.
    • I know this is not perfect, but I really like the way the validation is implemented in a consistent manner, making it possible to handle all exceptions the exact same way.
  4. The implementation also provides a Starter class, which eliminates the need for the developer to write a main() method. It is an interesting idea, but I need to give this style a little more thought! I like having my options class independent of the execution class. The Starter approach merges the options and driver (main) logic into one single class.  I would have preferred to see an argument processor class, with a method like: public T parseArgs(final String[] args, final Class<T> clazz). The argument processor would catch all of the exceptions and output the validation errors and usage information; the caller would need to do no extra processing or validation.

I hope this gives a little more insight into how Args4J is actually implemented and one possible method for extending it. Maybe someone has already handled these problems in a more elegant manner, but I did not to change any of the Args4J source code. That restriction did not give me a lot of flexibility to implement my enhancements!  Overall, Args4J is a simple and elegant solution for sometimes messy problem.

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 12 2009

Angry Coder Mode

Category: Software DevelopmentPhil @ 1:46 pm

When you start researching the code review process, you run across a lot of interesting blog postings, from the process perspective to the emotional aspects.  I found this one, Working with your angry coder, and thought it was worth sharing. I stole the picture from his site too; both the kids and I thought it was funny!

Over that last year, I have definitely tried to be more aware of the comments I make. However, I do remember saying this phrase numerous times in the past “Whoever wrote this code should be shot!”.  I too apologize for to all of the people I’m made cry over the years! I believe that most of these comments were directed at the code and never the original author; I don’t think I am that angry!  I do have a passion and strive for perfection (at least the best job that I can do, given the scenario), which makes it very easy for me to be perceived as an angry coder. I used to think that I was the only one who cared about developing  software quality. Someone told me that most developers are generally passionate about something in the process, usually just not from the same perceptive as me. So in reality, everyone is trying to do the best they can, we are all just coming at it from different directions. We just have to find a way to work more smoothly as a team. As one of the comments said, it is all about understanding each other. To bring this back to the code review process, I think it is all about finding bugs and learning from each other.  If we truly practiced collective code ownership, maybe none of us would take the comments so personally and we would have less anger!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 11 2009

RC Madness…

Category: FamilyPhil @ 3:03 pm

We gave our youngest son a nitro RC truck, the T-Maxx3.3 from Traxxas, for Christmas last year. He has wanted one for a couple years, and this year it was the only thing he wanted! We purchased it from Awesome Hobbies in Stafford VA. Not exactly sure how we ended up down there, but the owner has a pretty cool setup for the RC crowd. He recently moved his store from a strip mall to a large lot outside of town, probably about 3 acres or more. He built a race track that is about the size of a tennis court and holds several races throughout the year. Michelle took Nicholas down to the track last week; his first time on a real course. He said that it was the best day ever! How great is it to hear your kid say that? As you can see from the video, the track has lots of tight turns and jumps. There is more to it than just putting the hammer down! He learned how to control his truck in the air, it is actually pretty cool. Some of those cars/trucks go about 10 or 15 feet up in the air, they are really moving! He told me that when you are in the air and your truck’s nose is straight down, hit the gas to make it even out. If the nose is straight up, hit the brake. He even learned how to take off the engine; maybe I can have him work on my Chevelle next!

A couple weeks ago, we took him down to the track to see a race. I was amazed at the money, this was definitely not a sport for kids! There were more than 50 people there and most of them there were pulling enclosed trailers behind their trucks. There was even a huge RV there, I have no idea where they drove in from! Each enclosed trailer was basically a mobile “pit area”; they all had generators, air compressors, little power washers, and every imaginable tool at their disposal. I thought I was at a NASCAR race, the kids thought it was pretty cool too.

These trucks are not simple little toys, they actually require a lot of maintenance and up keep. We tried to get him into the electric versions, which actually cost even more, but he wanted nothing to do with them! He’s a real man, he wants to smell that smoke and hear the engine scream! We also learned that there is another group of enthusiasts out there that have a “car show” club. The shop owner said that he was working on “upgrading” a couple of vehicles, with the owners investing over $3500 (each) in tweaking out their vehicles. I could see dropping that into my Chevelle, but not my kids RC truck!!! But thats just me. I don’t think my wife likes the idea of me dropping that money into the Chevelle either, I think she is thinking sofa…. Funny how that works out!

Michelle shot this video at the track, while she was running out to flip over wrecked cars, so cut her a little slack! FYI, this ScribeFire plug-in is pretty cool, you can search You-Tube and plug your video right into your blog! (Video Removed – bummer)

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 11 2009

Code Reviews – What is the point?

Category: Software DevelopmentPhil @ 11:58 am

I recently did an impromptu survey of some friends and coworkers concerning how they conduct code reviews. The responses I got back were a little surprising and definitely not what I was hoping for. None of the responses were incorrect or wrong, but I was hoping that my vision and theirs would be a little more aligned.

Like many of you, I have been involved in my fair share of code reviews. Unfortunately, most of these quote code reviews are more of a code presentation, rather than an actual review. The presenters typically don’t prepare anything for the reviewers, and if they do, the reviewers never have the time to study or evaluate the material. Once the code has been reviewed, you have the challenge of dealing with the  issues generated by the reviewers: How are the issues being tracked? Is there a discussion or evaluation of each issue? How are the issues being prioritized? When and how will each issue be fixed? Don’t forget about the general coordination and procedural aspects: Who is doing the coordination? What code is being reviewed? Who are the scribes? What is the appropriate tracking or reporting format? This is all part of the traditional code review process, or so I thought!

The most interesting response from my survey was that many people considered my definition of a code review to be rather old school and non productive.  I’m not old school, just getting older and hopefully wiser! Several teams said they used tools like Checkstyle and PMD to verify the code, combined with Agile and Pair Programming techniques; thus minimizing (but not eliminating) the need for an actual code review. Teams that conducted reviews seemed to prefer the Net-Meeting (a shared desktop) approach, over meeting together in a conference room. Net-Meetings can be valuable, but I believe that most people are either surfing or reading emails and generally not paying attention during the meeting. Some teams even fix issues right there in the code review. Personally, I think this is very bad practice and not a good use of everyone’s time. Up to this point in the process, I’m pretty much on board with everyone’s process, but I think there is too much informality and and not enough traceability in the overall process. I don’t want to add more bureaucracy, I actually want to make the process more efficient and effective.

I believe in the “pair programming” principal, but consider “pair designing” much more valuable. Teams could minimally implement (and should) some type of virtual partners to get the benefits of pair programming. I like working on projects where some of the team members monitor all of the check-ins, basically performing continual code reviews throughout the development process.  I realize code reviews can have other potential values, such as cross training, mentoring, and promoting consistency and reuse. However, I don’t believe this is the purpose of a code review; isn’t it really about identifying programming flaws? So the question is, what is the most effective way to find bugs?

Some code reviews focus too much on the fluff. Are the indentations and parenthesis in the right place? Are the classes, properties, and variables named appropriately? Is the code well structured? All important aspects, but really don’t need to be addressed in a code review process. All of these issues should have been identified during construction phase using freely available tools, integrated with the IDE and the Continuous Integration (CI) process. I have been using the Checkstyle and PMD for many years to accomplish this task. They can provide value when the team requires the violations to be fixed. I typically configure the Eclipse plug-ins and CI tool to fail if any violations are encountered. Additionally, the CI tool will continue to run, spamming the contributors until the issues are resolved. I have the same philosophy for failed jUnit tests too, I run a tight ship! When violations or jUnit failures are flagged as warnings, rather than errors, they typically get ignored by the developers and are never addressed. When used correctly, Checkstyle and PMD will encourage and enforce specific coding practices, acting as a virtual coding partner, identifying issues when they are created.  Personally, I think these tools help me write better code; as the code evolves and begins to deviate from the original design, these tools usually pick up on the “band-aids” and allow me to fix/adjust the design before it is too late.  I recently added two more tools to my quality validation toolkit, Findbugs and the Testability Explorer.  There is some functional overlap in these tools, but I still like using all of them as a suite, as they each do their job a little differently. Findbugs is very interesting, it works from the compiled byte code, rather than the source code. Findbugs analyzes your code and its interaction with the other included libraries. It will detect problems such as unclosed resources, synchronization issues, and returning mutable collections. The Testability Explorer is my current favorite, but not as easy to understand as the other tools. I will write about it in another post.

Let’s say that we have we have these tools in place and our code is super clean. Unless projects implemented pair programming and are skipping the code review process, most schedule some type of review at the end of the coding cycle. I think most teams identify a random subset of code and schedule a series of meetings to conduct the reviews.  I say random because the developers pick and choose what files are to be reviewed.  How can we be sure that all of the important changes have been identified? This is where each team charts their own path. Some teams have a code “presentation” session with no pre-meeting preparation what so ever. Other teams email out a source file or URL list for each file to review. On the last code review that I helped coordinate, we sent out FishEye URLs for each file to the reviewers. This was pretty cool, because the URL represented the actual changes, not simply a link to the file. This allowed the reviewer to focus on the changes, rather than the entire file. This is point where I believe the whole processes breaks down, how do you report changes back to the developer and track the resolution? Usually issues and comments are sent back in email format, added to a spreadsheet, and checked into version control. One team actually generated PDF versions of their source code and mailed that out, the reviewers then added annotations to the PDF for their comments; kind of interesting. At our code review meetings, we tried to walk through the email comments and tried to address each one. This worked pretty well for those that actually prepared, but we still had lots of manual follow up work.

What I dislike most about this process is the management of these problems. Wouldn’t it be interesting if each issue had its own mini-workflow and was stored in some kind of relational database. Ideally, some kind of Eclipse plug-in to manage them, not necessarily linking the issue directly to the source code, but giving the developer quick access to the problem and approximate location within the file. The issues could easily be easily categorized by type and severity, and managed by the development team, and ultimately reported to management.  There are numerous commercial tools (SmartBear, Atlassian)  and even open source tools (CodeStriker, Rietveld, Review Board) which will automate much of the review process. These tools are actually very cool. It would be so efficient to review, debate, and resolve each issue in an on-line tool,  looking at the actuals changes; just click on the line where the problem exists and create a new comment (start a workflow). The biggest problem with many of these open source tools is around deployment. Many corporations have rules and processes for bringing in open-source tools.  Most of these tools have tons of required components, just to make them work in the environment. Its not like I can just log on to one of the UNIX servers and do a bunch of apt-gets to install the software. Review Board for example, requires: python-setuptools, memcached, libmemcache-dev, Djblets, Django-Evolution, Django, flup, and Python Imaging Library, plus integration with a database. Oh, guess what… it does not support Sybase or Oracle!  Why can’t these guys just give me WAR file that I can drop into an Tomcat server or better yet, have it integrated with Jetty so I can just fire it up!

Even though I appear to be on my own code review island, I will keep monitoring this tools for one that can easily be integrated into the corporate environment. I just might have to build it myself!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Apr 06 2009

Slowing down the spammers with WP-reCaptcha

Category: BloggingPhil @ 4:40 pm

I was joking with my friends that President Obama had visited my blog twice last month and actually left some comments. I was so excited, but I could not understand why he was pushing Viagra…. those liberals are just too funny! My blog gets its fair share of spam, fortunately the Akismet plug-in does a really good job at flagging the spam comments; I just have to go into the dashboard every so often and clean them out.

I happened to hit a website today that had a nifty little captcha enabled for all of the comment fields, it was a WordPress plug-in called WP-reCaptcha. All you need to do is create an account at reCaptcha.net, generate some keys for your website and plug them into the admin screen. Can’t be much easier than that. It will be interesting to see of I get any more comments on by postings, my real readers never leave them. Good bye spammers, I will miss you!

There is another interesting feature that reCaptcha offers, the hiding of email addresses. You can generate an email url or an obsured email address format (p@beilers.com). Not exactly sure where I would use this feature, but sometimes it is just good to know about these little things!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png