Jaevner is a tool for exporting data from a Lotus Notes calendar and importing it into a Google Calendar. Yes, there are other tools that are available that do this. Yes, it can be done using the export and import features of Lotus Notes and Google Calendar. But I have created this anyway.

It is a simple one-way export/import. Any changes you make on the Google Calendar side will be overwritten the next time the tool is run.

At the core it has two parts: A piece of LotusScript code that runs in Lotus Notes, exporting your calendar data as a CSV file. It also starts the second part of the tool, which is a console application that reads the exported calendar data and inserts it into a Google Calendar of your choice.

The source code can be found on GitHub: https://github.com/codemeyer/Jaevner

Timeless games

April 24, 2013 — 1 Comment

I enjoy playing computer games, but I’m not a hardcore gamer by any means. I probably get a few hours in every week nowadays, and I am still fortunate (or unfortunate) to have the ability to get totally sucked into a game. There is a good bunch of games that I like to play every now and then, but at the end of the day, two games stand head-and-shoulders above others by my reckoning.

Sensible World of Soccer

Until the release of Sensible Soccer, the Kick Off series was pretty much considered the best football games for the Amiga. I remember playing it a lot with brother and enjoying it a great deal, but I also remember how difficult it was. It was very hard to have any sense of control over the ball, and the vastness of the football field meant that you had to use the radar/scanner in the corner of the screen to get a sense of where your players were.

sensi

In my mind, Sensible Soccer took the good parts from the Kick Off series and improved on pretty much everything. The graphics were more engaging – charming, even – and the fact that you always see either the penalty box or the center circle of the field means that you have a much better understanding of where your players are and what is going on.

And then there was Sensible World of Soccer which added a managerial side to the game and took it to another level. Having a 20 year career where you could choose pretty much any club team in the whole world, build that team over several seasons, move to another team or even become manager of your national side added a new dimension to the game.

I must confess I haven’t played Sensible World of Soccer much in the past few years, but I have written a program that lets you search for players based on different criteria. It has the incredibly clever name SwosPlayerFinder, and the source code is available on GitHub.

Formula One Grand Prix

Geoff Crammond is the creator of the legendary Grand Prix series of games. The first in the series was released in early 1992 and set the standard for racing games to come.

fogp

I can still remember the day in February 1992 when I was at the computer games shop. I was going to buy a game for my Amiga 500, and I had narrowed the choice down to two games: Formula One Grand Prix and Birds of Prey. I still praise my 12-year old self for going for a milestone in computer racing games instead of another bland flight simulator. Indeed, this is the game that aroused my passion for motorsports in general and Formula 1 in particular.

So where am I going with this?

First of all, it is a strange coincidence that both of these games were released in 1992. But that is of little relevance.

Yes, the graphics are dated of course. But to me, graphics are only a small part of makes a game worth playing. Playability trumps all, and these games have playability coming out of their metaphorical ears. And the conclusion to it all is that to me it doesn’t matter how good your game looks if the playability is missing. Some modern game creators should probably take note!

Back in the good old days when I started doing unit testing and test-driven development, the way I ran tests was to start the NUnit Windows application, run the tests, wait for them all to go through and examine the result. Not exactly slow, but there is some friction, and a hint of context switching as a new window appears right on top of Visual Studio.

Earlier this year I purchased ReSharper from Jetbrains. Using their test-runner certainly reduced the friction compared to NUnit, but there were still the explicit steps of writing code, starting the unit tests, etc.

And then I discovered NCrunch, and all the friction was gone.

So what is NCrunch? To quote their website:

NCrunch is an automated concurrent testing tool for Visual Studio .NET.

It intelligently runs automated tests so that you don’t have to, and gives you a huge amount of useful information about your tested code, such as code coverage and performance metrics, inline in your IDE while you type.

What this means in practice is that NCrunch runs your unit tests as soon as you edit your code. I cannot stress enough what a game-changer this is. The feedback loop is cut down to practically nothing, and there is no need to stop and wait, or launch an external program. It’s just there and does its thing, and you can keep on writing code instead of continually disrupting your flow.

Once you start using NCrunch (or a similar tool, there are others, of course), it is very hard to go back to not having it. Like when you start using ReSharper and then use Visual Studio without it, it feels like something is missing.

The Single responsibility principle states that each class should have a single reason to change. There are certainly many ways to deduce if a class has too many responsibilities, most of which actually require you to use your brain! However, a quick-and-dirty way to establish if a class has too many responsibilities is simply to look at the list of using statements at the top of the file (imports in Java and Visual Basic.NET). If you open the source file in your IDE of choice and the list of usings/imports fills your entire view, the class is likely to have a lot of reasons to change.

Here is what the list of using-directives in one of our classes looked like a few months ago:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Text.RegularExpressions;

The likelihood that a class like this was developed using test-driven development seems slim (and indeed, it was not).

I don’t really believe that we can set a strict “maximum” number of using directives to allow, but probably anything more than six or seven should serve as an indication that perhaps the class in question could do with some refactoring. Perhaps we can use the number of usings/imports as a metric describing code complexity, albeit a very blunt one.