Gonzo blogging from the Annie Leibovitz of the software development world.

Month: April 2004 (Page 1 of 2)

Even the best ideas…

Brian Hook, founder of the independent game company Pyrogon, posted A Pyrogon Postmortem, an article of the reasons he believed his company failed. Read the article, it is a very interesting read.

Here are some highlights that I’ve experienced myself over the years in one way or another and echo so true with my own productions, attempts, and otherwise crap that I call software.

Publishers Never Say No, They Just Stop Answering E-Mails

Publishers will always act interested and will never say “No, we’re gonna pass”. Disinterest pulls a publisher out of the loop, which could put them at a competitive disadvantage, and saying “No” is a bridge that few publishers want to burn even with relative nobodies.

A Good Demo Is Not Enough — It Must Be Jaw Dropping

You need a killer demo, not just a good one. Talk is cheap, and a 300 page design doc, presentation, and even a team “on paper” won’t get you a deal. You have to spend time and effort putting together something that is so mind blowing the execs are flat out scared you might sign with someone else. It’s the difference between a pretty girl smiling at you and a naked pretty girl straddling your lap and licking her phone number onto your face. Publishers need to feel like the latter if you want to get a deal.

Bottom line, think small and grow. Baby steps. Don’t try building the next killer Doom 3 because you’ll still be sitting there years from now trying to catch up with hardware. There’s a reason why Valve, iD Software and other companies make the games they do. They throw millions of dollars of research into building a robust engine they can market. Doom 3. Half-Life 2. Unreal Tournament. They’re just window dressing for the real kill. The marketing and sale of the engine (and the royalties through licensing that come with them).

The guys over at GarageGames have it right. They took a AAA engine and sell it for $99. Yup, for less than a C-Note you can get a full featured engine, source code, tools, and support and build yourself a professional quality game like Tribes and Tribes 2 (which was built using the Torque engine). Will it compete with Doom 3, HL2 and others? In certain areas yes, in others no, still others it will kick ass (like the terrain engine which lets you build almost limitless sized worlds with no degradation on performance).

Grant you, combine some of the features of all of these and you would have a beast not to be reckoned with. The vast terrain engine of Torque, the seamless integration of worlds from Dungeon Siege, the dynamic physics of Half-Life 2 and the on-the-fly level compiling power of Doom 3 and you can write your own cheques.

Multiple inheritance in C#

Can you inherit from multiple classes in C#? No, the language doesn’t support it however there are ways around it.

From a design perspective you have to ask yourself, Will a Class fully represent an object? Meaning that, if we have a base class with abstract methods designed for a particular application and we know that the inheriting object will only need the methods defined in that class. We now have a valid design pattern here.

The Vehicle Car Object

Lets say we have an abstract class called “Vehicle” as well as another class called “ConstructionVehicle”. The vehicle class has methods such as Accelerate() , Stop(), and the “ConstructionVehicle” class has methods such as ExecuteDump() and TurnOnBackUpSound(). If we were only going to build a Car object and know we would only use those methods from the “Automobile” class this would be fine.

The DumpTruck Object

Now we want to create another object called “DumpTruck”. We could inherit from the Automobile class but that class does not have the methods that we need called ExecuteDump() and TurnOnBackUpSound(). If we were using a language such as C++ we could easily inherit from both classes using multiple inheritance. However, seeing C# is our language of choice, multiple inheritance is not an option, you may only inherit from one Base Class.

From Abstract Classes to Interfaces

From a design perspective we must choose a different design. C# supports what is called “Multiple Implementation”, which is to says a class can implement more than one interface. Our design now changes the “Vehicle” class and the “ConstructionVehicle” class into interfaces. Below we have

defined the two interfaces with their very simplistic methods:

interface IConstructionVehicle


  void ExecuteDump();

  void TurnOnBackUpSound();


interface IVehicle


  void Accelerate();

  void Stop();

  void TurnOnBackUpSound();


If we built a class that inherited from these two interfaces we would be able to do so spanning multiple inherited interfaces. Design problem solved!

Or is it?

Explicit Interface Implementation

If you look at both interfaces defined above you’ll notice that they share in common a method of the same name “TurnOnBackUpSound()”. Problem? No, in fact C# supports what is known as “Explicit Interface Implementation”, which allows the programmer to specify which member of

which interface they want to use. Putting the Interface name in front of the member name allows this to happen as shown below.

public class DumpTruck: IEngine, IBody


  void IEngine.Test()


    Console.WriteLine("This is the Engine TEst");


  void IBody.Test()


    Console.WriteLine("This is the Body TEst");



Implementation Hiding

Another benefit to this technique is something called “Implementation Hiding”. Implementation Hiding allows the methods from the implemented interface to be hidden from the derived class unless the developer explicitly calls the interface. This technique obviously reduces the clutter for a developer.

From a theoratical point of view MI has it’s place. In many situations we need to make a decision whether to define an interface or an abstract class with same signatures. An interface and abstract class are exactly the samething except abstract class would allow some non-abstract members which can act as shared common code plus it can have protected overridable members. If MI is not supported then I have to really think whether to put my signatures in interface or an abstract class and decision would be based on limited knowledge whether client classes could have been already been derived from other class.

Microsoft says:

1. The number of places where MI is truly appropriate is actually quite small. In many cases, multiple interface inheritance can get the job done instead. In other cases, you may be able to use encapsulation and delegation.

2. Multiple implementation inheritance injects a lot of complexity into the implementation. This complexity impacts casting, layout, dispatch, field access, serialization, identity comparisons, verifiability, reflection, generics, and probably lots of other places.

So in nutshell, there’s no simple answer. If there is no MI, your ability to share common code along with abstract members might be limited but you might want to first consider refactoring your code and design before blaming the limitations of a language.

More MVP info

I received my MVP package from Microsoft and spent the better part of the weekend just reading all the NDAs and such that came with it. The MVP program is great but as with anything, it comes at a price. I’m still trying to figure out of this NDA overrides, compliments, or replaces the one we have at work with Microsoft. Can I access MVP type information for my day job or is that information I would obtain under the MVP NDA and not our corporate one. Sigh.

The MVP Global Summit for 2004 just passed so I missed out on it. I’m assuming I’ll be invited to next years because my acceptance came just after the summit. The summit is under pretty tight wraps, even by Microsoft’s standards. No reporters were allowed to listen to speeches and nobody was allowed to bring laptops or recording devices to the presentations (with a keynote speech by CEO Steve Ballmer and Windows Group VP Jim Allchin). Some MVPs did post what they could on their blogs so you can check out what little details there were here:

MVPs at the Summit – Betsy Aoki

MVP Summit – James Curran

MVP Summit – Sander Gerz

Musing from the MVP Summit – Bill Graziano

Summit Day 3 – Ambrose Little

The really interesting thing about the MVP program is that they have now launched a pilot where MVP partners will be allowed to add to the Microsoft official Knowledge Base. This is the first time people outside of MS have been allowd to add to the KB so it’s very exciting. Called the “Community Solutions Content Program for Microsoft Knowledge Base,” the inaugural program allows the company’s certified MVPs to add content to the company’s database of technical and how-to articles that fuels its online customer support system.

It seems to me that Microsoft might be walking a PR tightrope with this move. On the one hand, it’s good that they’re recognizing the efforts of independent developers to work around bugs and find innovative ways to use Microsoft products. On the other hand, isn’t that what we depend on the manufacturer for? What does it say about Microsoft to discover that they couldn’t get around to documenting some critical feature, and couldn’t even be bothered to pay an employee to do the documentation after the fact?

As a working developer, you’ve got better things to do than worry about the political implications of KB article authorship. No matter who writes them, the articles are one of the best resources around for making use of Microsoft products, and you’d be silly to ignore some or all of them just because of who wrote them.

Hurray for me

I was told (by a third party rather than Microsoft, guess they haven’t got to me yet) that I’m now the proud recipient of the 2004 MVP Award in the Microsoft SharePoint Portal Server 2003 space.

The MVP Award, which stands for “Most Valuable Professional” is an annual award given to outstanding members of Microsoft’s peer-to-peer communities (Microsoft’s words, not mine). What it really means is that I can put [MVP] after my name when posting to SharePoint newsgroups and there’s a nifty logo I can put on my website and not have the Microsoft lawyers come banging on my door.

You can view the full list of SharePoint MVPs here (Alphabetical order by first name so I’m on top, sweet).

« Older posts