Dan Byström’s Bwain

Blog without an interesting name

Archive for July, 2007

The åäö Ghost Strikes… AGAIN!

Posted by Dan Byström on July 25, 2007

Just when I thought we were out of the dark ages… something hit me right out of the blue.

During the summer something strange has happened, which I suspect happened because of some Microsoft security update. That is at least more probable than an ill-willing gnome in my machine fiddling with some bits. But you never know.

What has happened is that the

System.Windows.Forms.Application.ExecutablePath

property all of a sudden returns an incorrect result if the path contains a “non-ASCII” character like our swedish charaters åäö!!!

Replacing it with a

System.Reflection.Assembly.GetExecutingAssembly().Location

fixes the problem.

Demonstration:

  1. Fire up a new windows forms project and add “MessageBox.Show( Application.ExecutablePath );” to the default form’s constructor.
  2. Compile and place the exe in a folder called “c:\Our Application”.
  3. Run and you get “C:\Our Application\WindowsApplication1.exe”.
  4. Now rename the folder to “c:\Vår Applikation”.
  5. Run and you get “C:\V�r Applikation\WindowsApplication1.exe”. Where the “�” character is #65533.

The scary thing is that this behavior just changed over night.

Advertisements

Posted in .NET, Uncategorized | Leave a Comment »

Construction

Posted by Dan Byström on July 3, 2007

Currently our new house is being built.

I must admit I wasn’t prepared for the vast amount of decisions we had to do. Kitchen stuff, bathroom stuff, tiles, tapestries, electrical work, colors, doors, flooring, …

How are we supposed to know exactly what we want before actually having lived in the house first in order to get a feeling for what will work and what should be changed?

When I complained about this to a friend he told me that there’s actually a name for my annoyance: Big Design Up Front!!!

All these years we software developers have been told that we have so much to learn from the building industry. All of a sudden I’m not sure that’s true at all.

Maybe we should teach the building industry some agile practices? 🙂

Posted in Uncategorized | Leave a Comment »