Wednesday, August 29, 2007

Code Ruler Results

Today's assignment is Code Ruler. My code is here. (The zip file contains the entire project, plus javadoc documentation. I had to change Code Ruler's default project settings to get the Java 5 features to compile.)


Group Member

Brian Jaress

Evaluation Results

Migratingjaress
14733
14717
0792
Gang-Upjaress
382583
245592
291543
Split-Upjaress
318328
349502
440269

Lessons Learned

I learned a bit more about Java, especially Java 5. Mostly I re-learned the lesson that code should only be written when you know you need it.

I'm also slowly getting used to the tools -- forcing myself to only edit the code in Eclipse and learning a few javadoc quirks. I managed to download and import our formatting rules for Eclipse, so my code should be nice and standard (except that I edited the rules to change the line width from 100 to 72 characters. There are standards, and there are standards.)

Sunday, August 26, 2007

Assignment 02: ConsultComm

Today's assignment is to evaluate an open-source Java project on Sourceforge according to our Three Prime Directives.


Overview

ConsultComm is timekeeping program. It helps you keep track of what you have been doing and how long each thing took. From its website:

ConsultComm is a small, lightweight, platform-independent program written in Java that allows anyone managing multiple projects, clients or tasks to effectively keep track of exactly how long they've worked on each project.

-- http://consultcomm.sourceforge.net/

ConsultComm does a good job of satisfying Prime Directive 1, but it is less successful with Prime Directives 2 and 3.

Useful Task

Keeping track of time spent is a useful task, and ConsultComm does that successfully. You can have several tasks in groups, each listed with the time spent so far. There's a built-in timer that you can start and stop which credits time to the currently selected task.

Installation and Use

A typical user could install this program successfully.

An installer is available as a jar file, created using IzPack. It is a typical wizard-style installer, though there is a slightly confusing option at the end about "targets." (It can be ignored.)

Some users might not be able to successfully use ConsultComm. The interface is simple but a little tricky, and there is no user documentation.

The easiest, most prominent feature is a button which starts and stops a timer. If you use that feature first, it will appear to be doing something while actually doing nothing. Before you use the counter, you have to create a project so that the time elapsed will be recorded somewhere rather than thrown away.

You can create projects using a menu or a keyboard shortcut. It's fairly easy once you know that it's what you need to do. If you've used the default install, it also asks about JDBC exports. You can ignore that and hit "save."

Improvable

A determined outside developer could probably contribute to ConsultComm.

The current development branch is in the Subversion repository at https://consultcomm.svn.sourceforge.net/svnroot/consultcomm/trunk, and the developer documentation is in the form of javadoc comments.

It takes a little while to figure out how the program is organized. For example, everything except the updating of the current project's time on a clock tick is done through JavaBean event listeners. (The main window registers as a listener for the clock and responds to the event by finding the currently selected project and directly changing its time.)

Wednesday, August 22, 2007

Assignment 04

Today's assignment was FizzBuzz.

The Experience

It took a total of eleven minutes from the time I launched Eclipse to the time I was satisfied that the program produced the right output.

The single biggest step was checking the output (and I didn't check all of it). As a category, figuring out how to do things in Eclipse took the most time. I spent some time walking slowly through the wizards for starting a project and class, reading it all to figure out what information I was supposed to give it.

Then I spent a big chunk of time figuring out how to run a program from inside Eclipse to test it. Once I got it to run, I could run it again by clicking the "run" button or the Run -> Run.. menu item, but the first time I had to try a couple different things before Eclipse realized that my class was a program.

The time for actually writing the code was probably shortened by the fact that we wrote out the program on paper in class yesterday.

The Code

This is with Eclipse's default indentation. I gathered from class that we will use a different One True Way, but we haven't learned it yet.

public class FizzBuzz {
        public static void main(String[] args) {
                for (int i=1; i<101; i++) {
                        if (i % 5 == 0 && i % 3 == 0) {
                                System.out.println("FizzBuzz");
                        } else if (i % 3 == 0) {
                                System.out.println("Fizz");                       
                        } else if (i % 5 == 0) {
                                System.out.println("Buzz");                       
                        } else {
                                System.out.println(i);                                                 
                        }
                }
        }
} 

The Lesson

Anything we learn, we're going to learn the Java way.

I'm a little worried that this class will turn into "Java for Enterprise Development" with actual software engineering taking a back seat.

I still have my undergraduate software engineering textbook. Chapter sixteen covers object oriented design, including a brief introduction to Java.

Tuesday, August 21, 2007

Engineering Log

This is a special-purpose blog. It will serve as my required engineering log for ICS 613 in Fall 2007. (Creating a blog on Blogger is one of our assignments.)

For anything not related to that class, you can find me at my personal blog.