Welcome!

.NET Authors: Pieter Van Heck, Gary Kaiser, RealWire News Distribution, Kevin Benedict, Shelly Palmer

Related Topics: .NET

.NET: Article

What I Did on My Holiday Vacation

What I Did on My Holiday Vacation

For the second year in a row, I had a lot of vacation left at the end of the year. Combined with two major holidays, this allowed me to take off the second half of December. Not wanting to let my brain get flabby, though, I engaged in a number of mental pursuits to keep my cerebellum in shape!

Hamurabi.NET
For those not familiar with the original, Hamurabi was a popular computer game back in the days of mainframe computing - when I was a kid teaching myself the basics of programming on my mom's remote dial-up terminal (complete with a 300-baud "acoustic coupler" modem - like in the movie War Games). In short, you start the game - which is completely text based - with a certain number of people, grain, and land, and over the course of 10 turns (years, in game time) you make decisions about how much to feed, plant, buy, and sell in order to make your kingdom prosper.

I had such fond memories of playing this game - and another, slightly enhanced, later version of it called Dukedom - that I went looking for it on the Internet. I found the original BASIC source code in a few locations, but couldn't find a free BASIC interpreter capable of running it (not that I spent too much time looking). I also found a few JavaScript implementations, though, and that is when the idea struck - I would convert Hamurabi to .NET!

If you visit www.GotDotNet.com/workspaces/hamurabi, you can download both the source and executables for my fully functional .NET port of Hamurabi, which I have affectionately dubbed Hamurabi.NET. The Workspaces at GotDotNet are very interesting; they provide a Web-based collaboration tool, complete with source control, for anyone who would like to do some .NET development on a team. The best part is the fact that your Workspaces don't even need to be public - you might even be able to use them for projects at your place of business if more conventional tools aren't needed.

Version 0.1 is a fully functional port of the original Hamurabi game. I began by transliterating the code, then got a little more object oriented by refactoring the original functionality among separate People, Land, and Grain classes (the three main objects in the game). I also refactored the user interface to take advantage of modern GUI capabilities by working in a slightly more event-driven manner, rather than the simple state machine that drove the original game.

In version 0.2, look for mobile device support and off-loading of the main game logic to back-end Web services. More coders are always welcome!

System.Diagnostics.GreatCustomerService
After having whined (I admit it, I whined) in my previous editorial about the undocumented blocking behavior of the PerformanceCounter class, I am happy to announce that Microsoft has promised to consider adding this to the .NET Framework documentation. In contrast to the myriad issues I have reported over the years with Sun's MIDP implementation of Java for Palm OS - none of which have ever been addressed - I think this is quite impressive!

Converting Java to .NET
Along the same lines as my Hamurabi conversion project, the theme of this issue is the conversion of Java code to .NET. Infragistics, IBM, and JuggerNET - three organizations with a long history in the J2EE/.NET migration space - have all contributed material that you are bound to find informative.

More Stories By Derek Ferguson

Derek Ferguson, founding editor and editor-in-chief of .Net Developer's Journal, is a noted technology expert and former Microsoft MVP.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
KindlyRat 01/28/05 09:26:25 PM EST

I have a good copy of GW-BASIC AND HAMURABI on my site above. You have to use all capitals for it to work.
How's about helping me with Santa Paravia & Fiumaccio ?