Software Development in the Real World – Geniuses and Numpties

Although I am officially a “Technical Specialist” on paper for Microsoft technologies, the ability to pass an exam is pretty much useless when faced with real world development decisions.

People sometimes ask me what it’s like – being a software developer – usually with regard to their children who are flirting with the idea as a career. I almost always reply that it’s soul destroying – because 90% of the detail you learn is only good for a few months. The important realisation is that the 10% – the core skill set – is invaluable, and is strangely a mixture of real world experience and textbook study.

Throughout my career I have seen a lot of developers at work – and many different personalities and approaches. Some are great problem solvers, some are plodders, some are pedants, and some are unquestionably brilliant. Working in a technical field can be a great leveller at times – while you may think you have just achieved something particularly clever, there will almost certainly be a far better way of doing what you have done.

I learned a lot a couple of years ago while writing my own chess engine. I never finished it, but while figuring out how to solve the various problems intrinsic to it’s function, read some quite wonderful research papers written a long time before software was ever written on modern computers. Before we were all born, the likes of Alan Turing had solved some of information theory’s greatest questions.

One of the biggest leaps you need to make after leaving college is realising that brilliant people are out there, and that they are also just as normal as you or I. They will delight in passing on their knowledge. Your interest will be repaid, and you will benefit from their insight. You will stand on their shoulders as generations have done so in the past.

While working to integrate an element of a larger system late this afternoon into the behemoth that is Microsoft SharePoint Office Server, I felt privileged indeed to have colleagues around me who have scratched and scraped a huge amount of knowledge together, and were only too keen to share it.

I am wise enough to know that while I may be a creative and at times very clever developer indeed, being clever is not the same as being wise. Cleverness implies intelligence. Wisdom implies knowledge. Two quite different things.

{0 comments - leave a comment!}

Microsoft Certified Technical Specialist (MCTS) – Web Developer

ballmer3

After several years working with the Microsoft .NET platform, I have finally been afforded time at the beginning of this year to sit down with the books, study, and hit the exam trail. After taking two exams in the past couple of weeks (detailed below), I am now officially a “Microsoft Certified Technical Specialist”.

Here’s the two exams I passed;

  • 70-536 Microsoft .NET Framework “Application Development Foundation”
  • 70-528 Microsoft .NET Framework 2.0 “Web Based Client Development”

While I’m pleased I now have the certification under my belt, I was somewhat shocked at the lack of real-world development skills tested by the exams. I’m wondering if Microsoft will ever unleash a “design patterns” exam, to test the way a developer approaches problems, and develops solutions.

Perhaps making a judgement about somebody’s actual skill as a developer is far too expensive to test in any kind of sensible manner. As an example, the systems integrator I current work for has a “first hurdle” programming test for new applicants using any language you like on paper. I obviously can’t give away the test questions, but they are heavily based in classic computer science problems (and therefore the world of design patterns).

I digress. I am now a Microsoft Certified Technical Specialist – meaning I can add the letters MCTS after my name in business correspondence if I so wish… I think not somehow. If colleagues who know my past history with all things Linux and Open Source are to be believed, the acquisition of Microsoft certifications signals the completion of my descent towards the dark side.

Fear not – while not working on .NET projects, I am still studying the various developments in the world of PHP, Python and recently Ruby, and nothing is going to change that any time soon.

{0 comments - leave a comment!}

Wordpress Theme Design and Development

bwd_screenshot

I’ve been working away for the last couple of evenings to design and build a new theme for Wordpress. It’s name thus far is “Subminimal” – I have no real reason for the name – it just sounded good when I thought of it. At the moment, my freelance work site “Beckett Web Design” has the new theme, and it’s about time too – it’s pretty difficult to convince people you are any good at this stuff unless you can demonstrate it. I think this theme demonstrates it pretty clearly.

There’s a lot I still want to add to it – things like popular posts, and a tag cloud, but it’s coming along okay. If you’re wondering why it’s such a “corporate” looking theme, it’s because that’s it’s intended market – companies. Although I might be proved wrong, I can’t see a personal blogger using it as their normal blog theme.

Perhaps a personal blog theme will be the next project. Who knows… of course my next job will be to package this up and make it into something other people can download and share. That will mean boring chores like testing, documenting, committing it to version control, and providing some community tools to support it. I’ll have to keep telling myself that this is going to be fun!, honest!

{0 comments - leave a comment!}

Writing a Chess Engine

Chess Pieces

Every few years, I find myself returning to a project I have had kicking around since leaving college – writing a “chess engine”. For those who are casual readers of my blog, it might be worth explaining what a “chess engine” is.

A chess engine is a computer program that can play chess. Simple. The term “engine” is used because it doesn’t attempt to draw a nice looking board on the screen and let you slide pieces around – it will typically require typed moves such as “e2e4″, and respond with something like “e7e5″ (the coordinates of the squares on the chess board, if you were wondering).

I don’t really have a hobby, and I have been warned by people far more clever than myself over the years to stay away from writing a chess program – purely because they know the territory and have war stories to tell.

Chess has been perhaps the most interesting computer science problem for decades – and certainly the most researched. Most people are aware of projects such as “Deep Thought”, and “Deep Blue” at IBM – the projects that defeated Garry Kasparov in a series of high profile matches. It’s unique appeal to computer science lies in the apparent simplicity, and yet unfathomably complex nature of the problem to solve.

As soon as you start thinking about how to make a machine play chess, you come across a well worn term – “combinatorial explosion”. If you try to work out the possible future moves in a game of chess, you quickly end up with more possibilities than there are atoms estimated in several universes. The problem therefore becomes one of applying human intelligence to help the machine appear to think.

“Appear to think” is a good term to us. Computers can’t think – well, not yet anyway. They can however add stuff up incredibly quickly, and remember lots of small things perfectly. Here lies the problem for teaching a machine to play a game. Do you spend all your time getting the machine to calculate myriad rules, evaluations and comparisons to approximate “judgement”, or do you build a very fast idiot (try every move rather than trying to decide on one).

The clever route towards making a good chess engine – and the one that has occupied brainy people for decades – is in finding cheap ways to make a fast idiot more selective.

You start to read research papers about “rotated bit boards”, and “pruning algorithms”. One of the pieces of research that came out of the IBM projects involved selective deepening of their high speed idiot’s vision – kind of like teaching it to hedge it’s bets (“this looks so promising, I’m going to spend more time than I should checking this particular idea out”). The idea won important awards from people who give awards to brainy people.

So here I am. Thinking about writing my chess engine again. I have written up the ideas from my head several times over the years – and got 50% of the way towards a working implementation in C once. At the same time as interesting me, it also scares me.

I’ve read “A Beautiful Mind”. I know what happened to John Forbes Nash Jr. Perhaps the fact that I’m no genius will save me from his fate.

{0 comments - leave a comment!}

Cloning Objects in C#

I debated about writing this in a different place on the internet, but seeing as this blog has become a drop box for anything and everything that enters my head and exits via my fingers, I thought “what the hell”.

I tripped over something in programming today while wrestling with an insanely complex problem – something I have seen before, and something I should have remembered. I remember thinking the same last time I came across it too.

Here goes… feel free to stop reading if you’re not (a) a software developer, or (b) studying to be a software developer.

When you write a C# program, you often write classes, and create objects that are based on those classes. Sometimes you will want to make a copy of an existing object. There’s a gotcha involved though.

Example code…


public class Starship
{
  public string Captain = "";
}

// we'll make a starship
Starship enterprise = new Starship();
enterprise.Captain = "Kirk";

// and then we'll make another one based on the first
Starship excelsior = enterprise;
excelsior.Caption = "Sulu";

The catch here is that now “enterprise” captain is also Sulu. Even after being a developer for over 10 years now, I still forget that objects are always referred by reference – only scope of methods they are passed into will interfere with that.

What I should have done is implemented a “Clone” method on the Starship class that specifically made a new one, and returned it.

Example…


public class Starship
{
  public string Captain = "";

  public object Clone()
  {
    Starship result = new Starship();
    result.Captain = this.Captain;
    return result;
  }
}

// and the calling code...
Starship enterprise = new Starship();
enterprise.Captain = "Kirk";

// now make the clone
Starship excelsior = (Starship)enterprise.Clone();
excelsior.Captain = "Sulu";

Implementing a clone method makes sure we do exactly what we intended to do. It turns out that the .NET “ICloneable” interface is really nasty too, because it performs a “shallow copy” by default – meaning any deep data structures within an object being cloned continue to be copied by reference unless you are very careful – but the syntax to do that is a bigger subject than I want to get into right now.

Apparently there are discussions under way to drop “ICloneable” from the .NET framework. After seeing the results of it’s default implementation today, I can understand why.

{0 comments - leave a comment!}