Monday, August 28, 2006


Programmer's Bill of Rights

Jeff Atwood for president! I completely agree with his Programmer's Bill of Rights and I wish I worked in a place they were respected. Let's see how "compliant" I am:

  • Every programmer shall have two monitors: I wish! Then again; I cannot complain as I am one of the lucky few with a 17 inch monitor on my laptop.

  • Every programmer shall have a fast PC. It was fast 2 years ago… Having a fast PC is a must though. Waiting wastes the clients time and causes frustration (especially if you're not lucky enough to have a permanent place to make your home so you have toys to play with. Hm... If it was safe to leave anything more valuable than a chewing gum on the desk I could do some Lego NXT coding during lunch :-).

  • Every programmer shall have their choice of mouse and keyboard. Compliant! (I buy my own...)

  • Every programmer shall have a comfortable chair. Very important in the long run. I seriously hurt my back in the past because of a lousy chair combined with tons of overtime andlittle exercise. A double disk hernia is not fun at all. It took me years of pain & practice to get back in shape.

  • Every programmer shall have a fast internet connection: Sharing a 2Mbit line with 60 other people isn't what I would call fast.

  • Every programmer shall have quiet working conditions: Impossible with the people I share my office with :-)

One thing is missing from my point of view; Each developer should have access to a whiteboard. Discussing architectures/code/problems on a large whiteboard where persons can erase/add pieces is a lot more productive than scribbling on a piece of paper.


Visual Studio 2005 Team System for Database Professionals CTP

Finally a tool from Microsoft that gives better control over database development. Visual Studio 2005 Team Edition for Database Professionals addresses common problems with database development today:

    • The new Visual Studio Database Project allows you to import your database schema and place it under source control. When the time comes to deploy schema changes the new project system allows you to quickly build update scripts and then provides a mechanism to deploy them to the database of your choice

    • Rename Refactoring allows you to easily rename any object in your database and be assured that all references to that object will be renamed to correspond to the change

    • A New T-SQL editor allows you to be more productive when writing T-SQL code from within Visual Studio including support for parallel execution of queries and viewing of execution plans

    • SchemaCompare allows you to quickly compare the schema of two databases (or your source controlled project and a database) and script updates to bring the database schemas into sync

    • DataCompare allows you to quickly compare two databases and script updates to bring the data in these databases into sync

    • The Database Unit Testing infrastructure allows you to create database unit tests using T-SQL or managed code

    • DataGenerator lets you create data generation plans that produce repeatable sets of meaningful data based upon your existing production databases that can be deployed to a database prior to running unit tests thus ensuring consistent test results

Finally! I have seen too many cases at clients where stored procedures have names like usp_whatever_1, usp_whatever_2 and usp_whatever_new because they have no idea what the change may break or a way to roll back to an older version.  I have written several ad-hoc data synchronization tools in the past so I look forwared to having a tool that not only synchronizes data but schemas as well. All of it integrated in Team Systems. What more can you ask for?

Thursday, August 24, 2006



Time flies. It has been two years since the first post on /egilh; Selecting a random record from SQL

I have not always been able to make a post a day but the statistics are not bad:

  • 1002 posts


  • 6791 comments caught by the comment spam filter

The development posts get the majority of the comments and requests for help;

Keep the comments coming and let me know if you have any tips, suggestions or questions.

P.S. There are "only" 248 posts on /egilh, the other posts are on Cool Or What?, Crap And Crapability and Coolissimo!

Tuesday, August 22, 2006


Christmas arrived early this year

It looks like the postman just came back from vacation as I got no less than 3 packages today :-)

  1. I cannot wait to see what I can make the Lego Mindstorms NXT do with Microsoft Robotics Studio

  2. Books from (I'm reading a couple of development books but I need a break once in a while :-) Harlan Coben: Gone for Good, Harlan Coben: The Final Detail, David Baldacci: Split Second, David Baldacci: Last Man Standing 

  3. I bought some of the things I will sell in the Coolissimo store on cafepress as I wanted to check the quality and get some "Don't break balls" mouse pads for my colleagues.

Monday, August 21, 2006


A DIY bicycle kit for a large dog

Sydney is getting bigger and stronger each. He's more than 70 cm to the shoulder blades and getting close to 40 kg. No fat, all muscles and energy. Plenty of energy.

I used to bike holding his chain in my hand on the handlebar but that was getting impossible.  He is still (one big) puppy so he has zero impulse control. When he sees something he likes he stops dead in his tracks and you can image how that feels when he his attached to the handlebars of a bike. An accident waiting to happen in other words.

I found the Springer on the internet and I have been looking for local animal shops that carry it, or something similar, but I didn't have any luck. Until I went to Norway on vacation this summer. Stopping for a lunch break I found the Walky Dog in a shopping centre. I was ready to buy it when I noticed that it was made in Italy. The car was already more than full so I decided to buy it when I came back to Italy. Or so I thought…

Coming back to work in Milano in August is great. The city is practically empty and there is -no- traffic. A paradise in other words, unless you want to buy something. The Walky Dog web site would accept orders but they, like the rest of Italy, were closed so I would get it in September sometime.

In the end I did the only thing I could think of; I went to a local hardware store and bought the necesarry ingredients to build my own:

  • 1 m piece of round wood: 3 euro
  • 2 pack of  collars for 1 inch tubes: 2.20 euro
  • 4 pack of eye screws: 1.75 euro
  • 2 meter elastic cord: 3.10 euro
    (+ one old old hook for the colar…)

Enough material to build several DIY Springers. Which was just as good as it took me several attempts to get it right.

I should have known better; never use a Version 1.0 product. It basically broke the moment Sydney started pulling for real (after 10 meters). The thin collar and screw never stood a chance. Back to the hardware store to buy a heavy duty version of the tube collar. But Service Pack 1 met a tragic end as well. I had used 60 cm of the wood which was way too long. It broke the first time I hit the brakes:

Service Pack 2 introduced several changes:

  • Shorter stick (from 60 cm to 25cm)
  • Strengthened the critical area of the stick with iron wire

It lasted a lot longer. Until we met the first dog when the thick screw was bent. It looks better than the first screw but it was clear it wouldn't last many trips:

Service Pack 3 strengthened the screw. I cut it as short as possible but it was still a bit too long as it bent under stress.

The final XP Version:

  • Improved security (I strengthened the screw with a couple of nuts)
  • Improved the user interface by hiding the ugly metal wire with some blue tape :-)

Here is Sydney inspecting the final version:

I am sure the "professional" devices are better but the DIY version works for me. The rope fits over the seat of the bike and I can easily take it off and unscrew the stick to take Sydney for a walk. I had fun building it and even more fun biking with Sydney as it is a lot safer:

  • Keeping Sydney's chain on my hand the bike would move when he slowed down or sped up. The stick is attached to the frame of the bike so he ends up pulling me instead of throwing me off the bike if he runs or stops.
  • Sydney would try to run in front of the bike if he saw something interesting on the wrong side of the road. With the stick he cannot. The rope is so short that he can only get even, but not in front of, the front wheel.
  • I can keep my eyes on traffic instead of trying to watch traffic, sydney and things that could distract Sydney at the same time

Saturday, August 19, 2006


How to prevent files from being opened automatically in Internet Explorer

A reader asked me how to force Internet Explorer to display the file download dialog. The how to force the download dialog box to appear post explains how to do it on the server side but the reader wanted to change the behavior of Internet Explorer.

Adobe Acrobat is one program that opens its files inside Internet Explorer by default and I don't like it either. It is a frequent cause of crashes in Internet Explorer and the PDFs ends up in the temp directory. Some programs, like Adobe Acrobat, turn on this behavior by default, other times the user clicks the "Always ask before opening this type of file" check box by mistake.

These are the steps to change the behavior of Internet Explorer so it always opens the File download dialog (on Windows 2003):

  • Double-click My Computer.

  • On the Tools menu, click Folder Options.

  • On the File Types tab, click the appropriate file type in the Registered File Types box.  (PDF for example)

  • Click Advanced.

  • Click to select the Confirm Open After Download check box. 

  • Click OK, and then click Close.

More details and instructions for other versions of Windows in this Knowledge Base article

Friday, August 18, 2006


Free Microsoft XNA Game Studio Express

Microsoft has announced XNA Game Studio Express. A free set of tools based on the XNA platform to enable anyone to easily create games for both Windows and the Xbox 360 console. The free Express version lets you create commercial games for the Windows platform but you have to wait for the Professional edition next spring to create commercial titles for the Xbox 360.

It is not entirely free to develop for the Xbox 360 though. You must buy a XNA Creator's Club subscription ($99 for a year, $49 for 4 months) on Xbox Live Marketplace to develop, debug and/or play games developed for the Xbox 360.

The XNA FAQ has more information on which features are available in the upcoming beta.

Friday, August 11, 2006


Spending the summer in Milano with your kids?

The city of Milano has created a rich program for kids that spend August/September in town. There are activities every day and my kids had a ball when they went earlier this week to some activities organized at Castello Sforzesco

More information on the E…state con noi site (Italian only).

Thursday, August 10, 2006


Microsoft buys Winternals and SysInternals. Mark and Bryce join Microsoft.

Microsoft bought Winternals and SysInternals and hired both Mark Russinovich and Bryce Cogswell while I was on vacation. It is good news for the future of Windows as Mark will be working on the core of the Windows platform:

I’m joining Microsoft as a technical fellow in the Platform and Services Division, which is the division that includes the Core Operating Systems Division, Windows Client and Windows Live, and Windows Server and Tools. I’ll therefore be working on challenging projects that span the entire Windows product line and directly influence subsequent generations of the most important operating system on the planet. From security to virtualization to performance to a more manageable application model, there’s no end of interesting areas to explore and innovate.

I was worried about the future of the fantastic SysInternals tools but it looks like they can continue to work on them:

I’m pleased to report that Microsoft’s number one priority is not only keeping the tools freely available, but preserving the Sysinternals community including the newsletter, the forums, and my blog. While we’re still brainstorming how to make this successful in the long term, I’m pleased to announce the first step in the transition, which is the introduction of a new Sysinternals EULA, that I believe is even more permissive than the EULA in place before the Microsoft acquisition, since it allows for wider use of Sysinternals utilities within a company.

Good luck to Mark and Bryce on their adventure in Microsoft.

Wednesday, August 9, 2006


Summer vacation 2006

The only bad thing about it; it is over :-(

I came back this weekend after 3 weeks camping around Europe. Total relax and "back to basics" with no work, blogs, e-mail, TV, mobile coverage or electricity. Had lovely weather until the end of the vacation which is great. Coming back to a "fresh" Milano is just fantastic as it can be boiling at this time of year sometimes.

Most of the first week was spent camping on the way up through Europe on the way to Røros. The first major stop was Euro Disney. It was a  fairytale like most Disney cartoons. Very well kept and organized. We also stopped in Hunderfossen to spend a day with my cousin which has kids that are the same age as mine. It has a Norwegian theme and it is a smaller than Euro Disney but we had plenty of fun anyway.

Most of the vacation was spent in the Røros area and in my mums cabin in Hessdalen. Røros is a nice small town and was the scene for (at least) one of the Pippi movies. The cabin in Hessdalen is a typical Norwegian cabin and left a lasting impression on the kids:

  • it is in the middle of nowhere:

    • in summer you have 15 min walking uphill to get there

    • in winter you have 5 km by cross country skis to get there

  • no water, electricity or plumbing. You wash yourself and brush the teeth in the stream running close by.

  • they got fishing rods for their birthdays and both of them got fishes (small trouts) on their first fishing trip...

On the way down to Italy we stopped in one of the many great campings in Denmark; Billund FDM camping. It is just fantastic for kids and highly recommended. It is the only camping I have ever seen with a family toilet; a large shower that lets you have a shower with the kids, toilets for grownups and kids, sinks for grownups and kids. Legoland itself was even better. Smaller than Euro Disney but more suited for families with kids;

  • each attraction with potential queues has a play area with Lego. The kids play while the parents stay in the queue. When it's their turn they can take a shortcut to join the parents.

  • there are dedicated pic-nic areas

I came THIS close to buying the Lego NXT for playing with Microsoft Robotics but in the end I did not buy it. The store in Legoland sold it for Danish retail price of 2.499DK (~330 euro) but the suggested retail price for Italy is ~250 euro so I decided to wait a bit more.

Sorry, but I did not manage to blog anything in July due to my work on mobile services for the Football world cup and my vacation. Things will be hectic for another few days but my blog activity should increase again during the autumn. I have a couple of cool tools (with source) in the pipeline that I will release soon.