Code Archaeology

Define: Archaeology

A discipline involving the study of the human past through its material remains.

This is probably not an uncommon scenario:

  • You have an outdated project (or project plan)
  • You have some source code (may be in different branches in your source control)
  • You have some old emails about what various people needed
  • For some reason (low priority, budget, time), things were never done
  • You have a list of players who have left the project / company / industry / country

Your task, is to resurrect the project and make it work (again):

I was looking for a word to describe this special branch of Computer Science discipline.  And I think I've found it. 

Archaeology.

In my words, a study of the remains of ideas that were left in the system, and trying to reconstruct the past to work out a picture for the present and the future.

System.Runtime.InteropServices.COMException when opening a visual studio web project

I'm in the middle of installing everything to get my new laptop (still not working right) , and came across a problem where I couldn't open a particular web project in the solution.

"System.Runtime.InteropServices.COMException"

First thing I did was opening the project file in notepad and grab the project type guid:

{349c5851-65df-11da-9384-00065b846f21} - Ah ha!  Web Application Project

There's a few things you need to open this project on Vista:

1. You'll need IIS with IE6 Metabase and IIS 6 configuration compatibility

image

2. Run VS.NET as administrator

3. Find out the project's

Alternatively, you can install VS.NET 2008 SP1 and the messages will be a bit more friendlier.

image

 

jliu

Sharing a little gem - ASP.NET Javascript String.format

When you are working with ASP.NET 2.0, Microsoft injects quite a bit of Javascript framework stuff.  Most ASP.NET developers don't dive into these libraries and thus never know the gems that Microsoft has added in their Javascript framework.

I'm just going to share a little gem today, Microsoft has implemented a full version of the String.format in Javascript - in the same style as the .NET counterpart.

So in Javascript, you can do:

 

String.format( "{0:d}", new Date() );

or

String.format( "{0:c}", 100 );

Do watch out these values are localized to your current culture - whether it's [en] or [en-us] or [en-au], these are set in your browser's settings.

Have fun!

jliu

HTML map and area tags not working for FireFox

Here was an interesting problem, what was wrong with the following code, which works fine in IE but not in FireFox

<map id="mymap">
<area ... />
<area ... />
</map>

<img usemap="#mymap" ...>


It appears that FireFox doesn't understand the id attribute and the name attribute is required.  According to W3C recommendations, http://www.w3.org/TR/REC-html40/struct/objects.html#adef-usemap the usemap attribute should match the name attribute of the map tag.

Try this instead:

<map id="mymap" name="mymap">