A wonderful weekend

I had a terrific weekend celebrating the marriage of Aaron & Amanda Froberg. Lots of driving back and forth between Minneapolis and Chisago City (50 mi. north), but well worth the effort.

As you may have read I’ve just purchased an new camera and so I took plenty of pictures. However since I just purchased a new camera, it will take some time to correct my errors in judgement and post the photos in a more pleasing light.

Enjoy!

New Camera


me
Originally uploaded by danieldflies.

I purchased a Canon Digital Rebel XT Wednesday and a new 70-200mm lens yesterday. Here are some shots that Matt Hardy and I took outside his apartment in South Minneapolis.

Pair Programming with Nic

This weekend I made the trip to Morris, MN to do some pair programming with UMM professor & friend Nic McPhee. The objective of the day was to help me on my path back to programming.

I knew I want to do a few things, 1. re-awaken my Java brain cells 2. learn Eclipse, and 3. get started on learning Ruby, anything else would be a blessing. Current UMM and Nic is in a unique to help me with all three. UMM uses Java as the main language for programming classes and most of the students are now using Eclipse (in my day we used Emacs and some used Vim). Luckily Nic is contemplating a switch to Ruby for the Intro to Computer Science class down the road, but more imediately for the Software Engineering course this fall for upper-division students. This change has required Nic to spend a good chunk of his summer learning Ruby, so I’m going to use that knowledge to get some Ruby exposure.

Nic and I worked on a problem that I see a lot at work, fiding the matches between two lists of users. Now for this venue I’ve changed the list of names to those who have a much lower expecation of privacy.


List 1:
Castillo, Louis
Morneau, Justin
Mauer, Joe
Cuddyer, Micheal
Hunter, Tori
Punto, Nick
White, Rondell
Ford, Lew
Stewart, Shannon
Kubel, Justin
Tyner, Justin
Liriano, Francisco
Santana, Johan
Silva, Carlos

List 2:
Mauer, Joe
Konerko, Paul
Thome, Jim
Cano, Robinson
Lopez, Jose
Glaus, Troy
Tejada, Miguel
Young, Michael
Dye, Jermaine
Matthews, Jr, Gary
Ordonez, Magglio
Ramirez, Manny
Rios, Alex
Sizemore, Grady
Liriano, Francisco
Rivera, Mariano
Ryan, B.J.
Santana, Johan
Zito, Barry

As you may have guessed I’m using players from the Twins roster and the 2006 AL All-Star roster.

Here is the Java code:


public class MySearchClass {

private List mnTwins;
private List allStars;

public static void main(String[] args) throws Exception {
MySearchClass searchClass = new MySearchClass();
searchClass.compareFiles(args);
}

private void compareFiles(String[] args) throws Exception {
mnTwins = openAndReadFile(args[0]);
allStars = openAndReadFile(args[1]);

Collections.sort(mnTwins);
Collections.sort(allStars);
int twinsIndex = 0;
int allStarIndex = 0;

while(hasEntries(twinsIndex, allStarIndex)){
String twinsPlayer = mnTwins.get(twinsIndex);
String allStarName = allStars.get(allStarIndex);
if(nameMatch(twinsIndex, allStarIndex)){
System.out.println(twinsPlayer + "t"+ allStarName);
allStarIndex++;
} else if(twinsPlayer.compareTo(allStarName) < 0) {
twinsIndex++;
} else {
allStarIndex++;
}
}
}

private boolean nameMatch(int termedIndex, int activeIndex) {
return allStars.get(activeIndex).startsWith(mnTwins.get(termedIndex));
}

private boolean hasEntries(int twinsIndex, int allStarIndex) {
return twinsIndex < mnTwins.size() && allStarIndex < allStars.size();
}

private static List openAndReadFile(String fileName) throws Exception {
FileReader fileReader = new FileReader(fileName);
BufferedReader bufferedReader = new BufferedReader(fileReader);

String line = bufferedReader.readLine();
List names = new ArrayList();
while(line != null){
names.add(line);
line = bufferedReader.readLine();
}
return names;
}
}

For some reason the List are typed properly they should be a String. Check out MySearchClass is written correctly and that it will compile.

Now here is the Ruby code we wrote afterwords:


class TwinsAllStars
attr :mnTwins
attr :allStarRoster

def read_names(file_name)
names = Array.new
File.open(file_name) do |file|
file.each_line { |line| names << line }
end
return names
end

def initialize
@mnTwins = read_names("mnTwins.txt").sort
@allStarRoster = read_names("allStarRosterList.txt").sort
end

def processFiles
puts @mnTwins & @allStarRoster
twinsIndex = 0
allStarIndex = 0
termedName = @mnTwins[twinsIndex]
allStarName = @allStarRoster[allStarIndex]

while hasEntries(twinsIndex, allStarIndex) do
if allStarName.match(/^#{termedName}.*/)
puts termedName + "t" + allStarName
allStarIndex += 1
allStarName = @allStarRoster[allStarIndex]
elsif termedName < allStarName
twinsIndex += 1
termedName = @mnTwins[twinsIndex]
else
allStarIndex += 1
allStarName = @allStarRoster[allStarIndex]
end
end
end

def hasEntries(twinsIndex, allStarIndex)
twinsIndex < mnTwins.size and allStarIndex < allStarRoster.size
end
end

user_conflict = UserConflict.new

user_conflict.processFiles

Now as you can see it is nearly a duplicate of the way we solved the problem in the same way we solved it with Java. After some thought we looked at the problem again and realized we could do a better job with a different data structure, istead of Lists we would use Sets. Here is our new Ruby code:



def read_names(file_name)
names = Array.new
File.open(file_name) do |file|
file.each_line { |line| names << line }
end
return names
end

mnTwins = read_names("mnTwins.txt").sort
allStarRoster = read_names("allStarRosterList.txt").sort

puts mnTwins & allStarRoster

Ahh, now that looks right. A nice simple way to find the matches.

Please let me know if you have any comments and if we could have done it better.

GPS tracker for Photography

Check out this cool gadget from DPReview Sony GPS tracker for photography.

By syncronizing your date and time stamps with this device you can show exactly where you took a picture. And the coolest part is that the mapping solution is online using Google! Maps. DPReview notes that the syncronization software will write the GPS info in to the JPEG EXIF header, very cool!

On the Journey Back

So after Agile 2006, I’m slowly working my skills back up to par. I’m hoping to use this as a forum to discuss projects and tools.

Obviously I’ve started with Java, since I spent most of my formative years (read: college) with the language, but I’m looking expand skills and try new things.

But, of course, where do I start?

I’ve downloaded Eclipse and the newest release of Java. I’m not sure what projects to start with. I was on SourceForge.net, but I couldn’t do a descent search for Java projects. So I’m left with an empty editor.

Give me your feedback and ideas. Thanks.

Eclipse.org

Java

I’M BACK!!

The second annual Agile Conference was held in Minneapolis, MN. After along two years away, I’m glad to say I’m back!

It is time to start a new chapter in my professional development with a return to Agile and XP! Look for the FliesXP web-site in a few days for more details.

For more information check out this year’s conference site:
Agile 2006 International Conference

Choosing my EPL team

I’ve been going through the process ever since the World Cup ended a few weeks ago. My process was a little different, but this greatly boosts the amount of evidence to use in making a decision.

I’d did think about choosing some other teams in the big leagues in Europe (Germany, Italy, Spain), but I’d like to get first hand experience during my trip to London in September.

Check out this link it gives great analogies to U.S. teams to best describe their style, history, or fans. Check it out and join the grow number of American EPL fans.

ESPN.com: Page 2 : Choosing my EPL team

Joga Bonito

Here are some great vidoes from Nike Soccer.

Ronaldinho Joy

Brazilian Ping Pong

We got snakes!

Snakes On A Plane

Check it out: We Got Snakes.mp3

.

Top Ten List from the Late Show with David Letterman circa 1997.

Top Ten Ways to Mispronounce Kirby Puckett

10. Kooby Pickett

9. Creepy Pockets

8. Bernie Crumpet

7. Turkey Bucket

6. Buddy Hackett

5. The Puckett Formerly Known as Kirby

4. Punky Brewster

3. Kent Hrbek

2. There once was a man from Nantucket who Kirbied his very own Puckett

1. Englepuck Kirbydink