juli 2008 - Posts
I’ve moved my RSS feed over to Feedburner. For those of you who are subscribing, I’ve done my best to add redirection to the HTTP response from Community Server so that you don’t need to update the URL (keeping my fingers crossed).
The new URL for my feed is : http://feeds.feedburner.com/einari
UPDATE: Go to my new blog for updates on Balder and SL3 support and much more here
I’ve been quite busy the last week working on the Balder engine. I’ve focused my energy on improving the rendering pipeline, both for functionality and speed and have managed to overhaul it quite a bit. In addition, texturemapping is becoming a fact. Thanks to Whizzkid for pointing out problems that was in the Matrix class in version 1.1 that was now fixed and to this article by Florian Kruesch
You can have a look at a very crude sample here with a lot of bugs in it due to heavy refactoring. I’ve decreased the framerate of the sample by purpose, I’ll be working to improve the samples as well as improving the engine and its features the next couple of weeks. All sourcecode will as always be checked in and available at the Balder Codeplex project.

I must warn you, this post might contain ramblings of a mad man.. :)
I’m not going to debate wether or not we have a problem with regards to the environment, but one thing is for sure, we can all become better consumers and consume less. We, and then I mean everyone not only developers, tend to consume more than we need. For instance, when going into a meeting, everyone grabs a pen and some paper in case they want to make notes. Most of us don’t write any thing sensible, we doodle crazy drawings, play tic-tac-toe with ourselves or other participants of the meeting. On occasion we make a note of something and in many cases we don’t look at the note anymore. Of-course this is generalizing and hopefully not everyone does this, but I think a lot do. A better way would be to let one person take notes of the entire meeting, on a laptop even, and distribute this afterwards - digitally. I also see a lot of people printing emails and walking into someone's office with the printout to discuss the content. There is something called the forward button. :)
One thing that would probably give even better results, would be to put your computer in sleep mode when you leave work for the day and have a scheduled task that wakes it up right before you get to work again (Vista only – read Sarah Perez’ recipe here). This is a pretty good option if you don’t want to shutdown completely. Going into sleep, all your applications are sleeping as well. When it’s waking up, everything is just the way you left it.
Now, what can we as developers do to be more environment aware? I know this is at best provocative for some; Write optimal code. Imagine if all the code all developers wrote was written to execute optimally on the processor and didn’t use more memory than it actually needed, then 640KB would actually be enough, just kidding. In fact, I think there could actually be an environmental upside if one were to start considering optimal code as a feature. We wouldn’t need all that RAM in our computers, for one. We wouldn’t need to scale into clusters or increase cluster sizes as often, which would lead to less hardware. Most computer hardware is manufactured in Asia, they use a lot of coal to generate power there that the factories use, coal produce CO2 and is not cleaned as with modern coal plants. After manufacturing they need to package it. Products like RAM are often put inside plastic containers and these are then placed in larger cardboard boxes. After its been packaged, it needs to be shipped. This is usually done by boat, which has a CO2 footprint attached to it.
There are of-course economical consequences if people don’t need all that RAM anymore and RAM prices would go up. Other consequences such as they wouldn’t need all the factory workers, seeing that demand would go down. And most likely a bunch of other consequences. But still, it’s an interesting thought I think.
What do I mean by writing optimal code? Should everyone start writing native assembly language? That would be cool. Time to market would end up at a ten-fold of what we’re able to do today. This is probably not the solution. I think the solution lies within a couple of things. Writing optimal code does not necessarily mean that you’re going to spend a lot of time doing just that, but being aware of a couple of things might help you out and understand the platform the code is running on. With the knowledge of how the execution environment works and how the platform works, the developer has the power to improve their code from the first line one writes. In addition to this, one could use profilers to find bottlenecks in the code. Companies are too focused on getting stuff out the door as fast as possible that for instance the speed of a solution is often compromised. I think it is very important that when planning a project, one includes speed as a feature. Almost every user story/Scenario/Product backlog item should have a QOS (Quality of Service – MSF Agile terminology) attached to it stating the performance requirements. The same goes for memory consumption. Too often we see that developers use caching to overcome speed issues, resulting in heavy memory usage. I think that in many cases the speed issue could have been solved at a lower level if the developers had the time and resources (money) to do it. So in many ways, management and marketing must be willing to give the developers more time or cut back on the feature list and be willing to let the developers have speed as required feature. After all, the customers will be happier with a more responsive solution.
I realize that I’m not exactly going to change the world by posting this. I’ll probably just piss someone off instead, or be completely written off as an fool or something. But it’s a risk I’m willing to take. :)
On a side-note, very much related though; I’m looking forward to the Performance by design using the .net framework that is one of the sessions for the pre-conference at PDC this year.
Have a nice weekend everyone. If I’m not put in a straightjacket during the course of the weekend, I’ll probably post something next week. :)
August is traditionally the startup month after the summer for NNUG activities and NNUG Bergen has really put together a killer evening as a startup for the fall.
On the 29th of August, they’re having the most impressive lineup in NNUGs history (as far as I know). Dan North from ThoughtWorks and Christian Weyer from Thinktecture are coming.
Keep up the good work guys!!
Read more about it over at Jon Tørresdals’ blog.
I'm always eager to know who actually reads my blog, whenever someone leaves me a comment I go straight to find out if the person has a blog. Stefaan Rillaert left me a comment and he had a blog and his latest posting made me curious. It was a link to a test that apparently will reveal what kind of programmer you are.
I became the following.
You'll find the test here. And of-course we put our complete faith in these tests. :) Actually, I think my result came out pretty good. It is at least how I see myself.
Finally managed to fix the 2D parts of the Balder engine and also the SlotMachine game I entered the European Silverlight Challenge with earlier. There are so many breaking changes between the versions of Silverlight that I see now that I need to rewrite quite a bit of my projects. You can find the game here.

UPDATE: Go to my new blog and the post about the updates for Balder, 3D in Silverlight, here
I’ve been swamped with work the last 6 months and haven’t had time to do any Silverlight stuff, but now I’m bouncing back and have started to get all my projects up and running again on SL 2 Beta 2.
First off is the 3D engine I started on last year; Balder. I’ve got a couple of issues I need to solve, but it is basically working again, have a look here. You might find quite jerky at the moment, I need to alter the entire rendering pipeline as it was originally optimized for Silverlight 1.1 back in the days :). Quite a lot of water has gone under the bridge since then.
I’m still running Windows 2003 and IIS 6.0 on my server and needed to register XAP as a global MIME type for my server, seeing that I will be publishing a bit of Silverlight bits now and then. I’ve only come across IIS 7.0 guides for this, so I thought I’d share how to do this in IIS 6.0.
Open up IIS Manager (mmc %systemroot%\system32\inetsrv\iis.msc). Right click the computer name an select properties.
Click the MIME types:
Click new and type in the following:
Then you will probably need to reset IIS (run->iisreset or right click computer->All Tasks->Restart IIS).
Now you can deploy your Silverlight 2 XAP application to IIS 6.0.
If you’re like me, you skip all readme files when installing something new and start hacking away instead. In most cases this works out fine, but every so often I would probably be better off just reading the readme or any other documents that came with the software I installed. Anyhow, this was also the case when I installed the latest Silverlight 2 Beta 2 SDK. There was a lot of broken changes between beta 1 and beta 2 and I wanted to update all my Silverlight projects and republish them on my blog, but ran into a couple of cases I’d like to read more about in the documentation, only to find out that the documentation was not where I expected it to be; in my MS-help, like all the other help collections I’ve got installed. Well, to make a long story short, here’s the recipe:
Open MS-help from VS2008 choosing Index. Type in Collection Manager :
Then select Help. You’ll get a nice page you can start selecting what collections to enable or not:
Select your collections, such as the Silverlight 2 SDK Documentation.
During my stay in Turkey for the Xna workshop I created a simple content importer that makes it easier to work with 2D animations. Very often you see people use spritesheets as the solution for animating 2D, which is of course not a bad way, it is a very optimal way to do things. I’ve always liked the simplicity of working with single frames, at least while I’m working on a solution, that way I can easily change stuff around. The content importer I created works with a simple Xml file (in fact just a serialized version of an object called SpriteAnimation), in this Xml file you can specify a base assetname as a format string, and you specify how many frames there are in the animation. The assetname must include the asset path as well.
The SpriteAnimation class is the one to use, it is also found in the content pipeline project, not exactly best practice. But it works for the demonstration purpose it was intended. :)
Using it is very simple:
In your draw method call the animations draw method with the spritebatch to draw into.
You can dowload the project from
here.
Still got funds left that can be spent for a developer related conference? You should really consider going to Microsoft's PDC this year. I’ve been to PDC’03 and PDC’05 and they were awesome, I would expect nothing less from the conference this year.
Anyways, go to http://microsoftpdc.com/ and get your ticket today. (Apparently I was the first Norwegian guy to get a ticket.. Ordered it the same day they got available.. :) )
Hope to see you there!
As you might have noticed, my blog lives on the domain “dolittle.com”. A domain that is hosted by myself on an old laptop sitting in my basement. :) Anywho, the last couple of weeks I’ve been asked a few times about what's up with the name DoLittle and does it have a meaning of some sort. I didn't have a straight answer for anyone who asked, to be honest; I couldn't really remember. Until it all came back to me a couple of days ago.
The year was 1997, I started to look for some freelance work for moonlighting besides my daytime job. In order to freelance work I needed to register myself as a single-person company with the government. I needed a cool name, or at least a cool URL. My objective was not to do a lot of business; one could say I wanted to do little. But that was not the real reason behind the name. At that point I was really focused on creating reusable code (I'm still focused on that. :) ), I was always building code with the idea of trying to create libraries and frameworks that would enable me to do as little as possible code for the next projects. Finding the common denominators became my life work. In addition to this I was also convinced (still am), that computer software should really be focusing on helping the user achieve desired result in as little time and with as little effort for the user as possible. I even remember coming with a slogan for the company "DoLittle .. so that you don't have to do much.. " or something to that effect.
That is the story behind the name.. :)
After some 6 and a half years working at the same job (Notus, acquired by Visma this year), I’ve just signed a contract with Objectware a part of the Itera Consulting Group. I will start there on the 1st of September this year.
Some of you might have noticed a comment on one of my latest posts; congratulating me on my new job, way before it was ready to be announced to the world. :) Well, the cat is out of the bag.
Here are some of the pictures from the workshop we held in Turkey. Click the images to see larger versions.
We started on Tuesday with a 2 hour presentation (30 minutes) and live coding (90 minutes).

Below you see all the people involved for the workshop; students, METU staff, Microsoft staff and myself. The students got diplomas for attending, signed by me. I even had to hand them out and called out their names in the best Turkish-dialect my vocal-cords could come up with. :)
We divided all the students into groups that would work together to create a game each. Below you see the winning team. All the students voted for which game they liked the best and we had a tie between two teams. The students wanted me to vote as well between the two and the result was the team below (sorry for the other team – your golf game with PhysX was great!! It was a tough call!).

Below you’ll see me assisting one of the developers on one of the teams; I’m trying to figure out a problem with a struct for a bullet system. The bullets didn’t want to move, for some strange reason… We figured it out eventually, but couldn’t exactly tell what was wrong or not…

During the workshop I held a few presentations were I walked through different concepts. The presentations was ranging from how to get started with a game project, independent from technology – to graphics concepts and finally specifically using Xna to do the job.
You’ll find all the presentations here.
More Posts
Next page »