Thursday, July 26, 2007

The Interface Tax

Evan has an OK post here, detailing the intrisics of Object Composition and Inheritance. He is very right in the way he is doing stuff, but while I was reading, something was bothering me as well. The thing that bothered me was that the code I am writing in the projects I am doing right now does not look a lot like what he is doing - and I think that I am following the OOP principles just as well as he is. So what is the difference? Actually it is that I am not "paying the Interface tax".

When I had my Advanced OOP course at ITU we really got down and dirty with using interfaces and loosely coupling everything everywhere in the programs, and for a while I followed that road in my stuff as well. But then I began to bug me that for every odd class there was an interface mirroring the methods on that class. Every time I needed new functionality in that class, I off course duly changed the interface. The great thing here is that the only class ever implementing the interface now, and propably forever, was that class that caused the interface in the first place. I call that paying the Interface tax, and in my eye it is a bad case of YAGNI.

I am not saying that interfaces are bad. They are good - for the right occasions. If you find yourself making interfaces for data entity classes, you are probably getting taxed badly. I usually only get to the point of using interfaces when making "framework stuff". Things I know will be used over and over in different projects. In an application, good old inheritance will more often be what I am after. It can save me a lot if implementation by inheriting functionality and save me the hassle of having YAGNI interfaces only being used by one class hierarchy at a time. And you can always refactor into an interface when the need arises.

So before signing up for the interface tax, remember that simplicity is King.

PS. Have you noticed the great TLA for todays topic. *DUCKING*

 

kick it on DotNetKicks.com

Friday, July 20, 2007

The Wii song

This is just SO much fun! SarcasticGamer.com is my new fave RSS feed. Their podcast is a hoot. Honest, no-punches-pulled opinions about the gaming hype sprikled with great radio sketch material. w00t!

Skill mastery in games

Stumbled on this interesting article from Gamasutra on the chemistry of games. Apart from presenting ideas it also tries to give a quick set of tools for evaluating your gameplay too see if it is fun, and maybe find out what is wrong with it. Worth a read, and maybe I should try it out on my Warlocks game - that BTW is getting closer to a playable state, so keep your eyes and ears open for a beta-invite. ;-) As a special treat for those who read my blog, here is the first public screenshot of the game in action. You can't wait now can you?!!! It is made with XNA using stock graphics and free sound effects. It is running on both Windows and the 360.

warlocks

Thursday, July 19, 2007

The Gaming BuzzMetrics

Just tuned in to Allans blog. I know Allan from ITU, having shared the experience of their enrollment course and AI course with him. He is currently employed at Infopaq. His blog is a tech blog, and there are some interesting stuff there.

While stripmining his blog, I cam across a link to the BlogPulse site, where you can make graphs displaying the trends of terms in the blogosphere, ising a technology called BuzzMetrics. Of course I had to take it for a spin in my world - so here is a chart of the Console War in the last three months.

200707190546155mH1FgDwuxaL3Ze5bqup

So it seems as Wii is the most talked about console with the PS3 and MS battling for second place. Not that far from the sales figure truth. Fun to see that the E3 spike seems to have given the Wii most coverage.

BTW, my search criteria for the chart was "XBox" or "Xbox 360", "Playstation" or "PS3" and "Wii".