Monday, November 17, 2008

Power and Responsiblity

This week we continue to upgrade our, team-silver, DueDates project. For version 1.2, we will be adding the new feature of sending the results to either an email or straight to the console and to check the user’s account for live updates from the library’s website. We split the task evenly, Ronn being responsible for the email feature and I was responsible for the update check feature. Even though it was a simple upgrade we met on a regular basis, just like on our previous improvements of the program.

You've got Mail
The new email feature is possible by integrating an open source java program called JavaMail. This new open source program, JavaMail, requires the user to supply not only an email address but also the email’s SMTP server. For email’s that require an authentication for the SMTP server, JavaMail has the option of authenticating, but that was the hard part. Most email providers require that the program authenticate the server being used, which made this problematic for finding an email we can use to test. Luckily my work place, University of Hawaii Star Degree, uses Microsoft Exchange as the email provider, which made it possible to use my email from there as a test dummy.

Updates Anyone?
The one part of the project I was responsible for was having the project check for updates of the user’s library account. This was possible by using java’s TimerTask and Timer, which are already included in the Java package you needed to download for the use of the program. Checking for updates requires the user to provide an amount of time of when to check the site, the time was calculated in milliseconds in a day. It was necessary for me to break out some of my old math skills, which I haven’t used in a long time, to calculate the right amount of intervals to enter and provide a formula for our users on how to calculate their own intervals of time.

Damn FindBugs
We had some problems in this version of DueDates, the small problem was finding an email address for testing the email feature and the big problem was integrating the update check feature with our program. Well the email problem was easily solved, which I mentioned earlier; but the update check, on how we integrated this feature with our program, was getting an error when doing a FindBugs check. FindBugs, a quality assurance tool, didn’t like how we were passing the original user’s input to the TimerTask. After a day of attempting to restructure the project for this new integration; what I thought was so confusing and causing me to run around in circles, was simply solved by just cloning the user’s inputs. Who would have thought that the solution was something so simple? Once these dilemmas were resolved, we are finally ready for the release of version 1.2.

Be Responsible
This new version of the program can either be very useful or a good way to pull an office prank. It is useful because, you can check for updates and at the same time receive emails of those updates. Also it can be a good tool for pulling pranks by spamming a co-worker or co-workers in an office, spamming them with meaningless things and having it being from anyone you want it to be. I thought about playing with this tool to pull an office prank, but declined. It just made me realize how much power we, software engineers, have with all our modern technology. “With great power there must also come great responsibility” – Stan Lee.

DueDates v1.2
User Guide

No comments: