Posts Tagged ‘General Programming’

What I Learned from MUDs

Friday, August 1st, 2008

The first bit of code I ever worked on was ROM 2.4, a text-based MUD server written in C.  At the time I didn’t know the first thing about programming, but through trial and error I was able to feel my way around the source code and slowly learn how the language worked and how to make the program do what I wanted.  Some experienced programmers called me the “snippet king” because I used a lot of pre-written additions to expand m game, but I see it as part of the learning process.  If I were to work on a MUD again, I now have the knowledge to do all of the programming myself - but if it weren’t for my baby steps back then I may never have become a programmer at all.

Text-based gaming is all but unheard of now that games like World of Warcraft and Everquest have taken hold.  In my opinion this is a crime because the worlds created through words were so detailed and so interactive that replacing them with pretty graphics makes for a much shallower experience.  It used to be possible to make life-long friends and really share interested, now the genre has been opened up to the lowest common denominator and there is so much swearing and name-calling that many older, more mature players don’t even bother.

I learned a lot of skills from my days playing MUDs that have helped me in my professional life:

  • Programming (obviously)
  • How to interact with others online
  • How to type very fast
  • How to write with personality
  • How to be thick-skinned (when people think they are anonymous, they are quicker to criticize and personally attack you, especially when you’re involved in content creation)

Form Trumps Function

Wednesday, April 30th, 2008

One (sad?) truth I have learned through the past several years is this: Form Trumps Function, every time. You can write the most elegant code in the world, produce an application that meets requirements 100%, but if it isn’t pretty to look at, your time has been wasted.

In fact - you can show a client a beautiful shell of an application that has no functionality at all, and they will love it.  Show them the same application feature-complete but without the design, and they will not want to pay for it.

The bottom line is this - when writing code, be it for web or for the desktop, always have an eye for the ‘look’ of your product.  Even when a separate designer is involved, the programmer can take responsibility for the ‘feel’ of the application - how the buttons move around, tab order, this kind of thing.

I am considering spinning this blog off to a second one devoted to designing applications (both GUI and web).  The design element can’t be ignored, so hopefully getting programmers more involved in the process will improve the situation on all levels.

C#: Finding the Number of Days Between Two DateTime Items

Tuesday, April 29th, 2008

One very common requirement is for the number of days elapsed since a particular Date and Time. In C# this can be accomplished through the use of the TimeSpan class.

The easiest way to create a TimeSpan is like this: