March 2004 - Posts

About the VS2005 Setup
30 March 04 09:48 AM | despos | 6 comment(s)

I've found the following info extremely useful and want just to bounce it to the audience of this blog. Just in case, you--like me--are stuck with the lack of a DVD burner and can't wait to see the wonders of Whidbey in action.

Prerequisite: You've got the DVD ISO image of the VS2005 Community Drop. It's a 2.7 GB download from the MSDN subscribers download center. (It took about 20 hours on my ADSL at an average download rate of 50KB/sec)

Default Action: Burn a DVD, if you can, and you're OK.

Alternative Action: Get DAEMON-TOOLS and install it. It's a really small download (<500KB) and lets you mount an ISO image as a local drive. Works like a champ.

UPDATE: Just a couple of quick but important additional reminders.

  • When you finish the setup, normally MSDN isn't installed. Restart the regular VS setup (not the MSDN setup) to complete and have doc in place.
  • ASP.NET is prohibited to run. Go to the Web Service extensions of IIS and allow it. Otherwise, you'll get 404 constantly
Law to swim between apples and oranges
29 March 04 09:50 AM | despos | 2 comment(s)

Admittedly, this is a bit off topic for a techy guy.

In commenting my latest post, the Antitrust mentioned a new cool three-letter acronym--LAW. What's that? Is it really Linux Against Windows? <g>

Another (sensational) event occurred this weekend to make me thinking of law again. Quoting from NDTV.com:

Ian Thorpe disqualified at Olympic trials
Ian Thorpe will be unable to defend his Olympic 400 metres freestyle title in Athens in August after the world record holder was disqualified from the event at the Australian selection trials on Saturday.


I have two contrasting feelings about that (and similar stories happened in the past for famous US champions). Feeling #1 is that I admire this sense of law and rules. Feeling #2 is that all this is ridiculous. To use the words of Thorpe's strongest rival Pieter van den Hoogenband:

I find that so childish. It is laughable that he can't defend his title. He has done so much for Australian swimming and for Australia itself. It shows a lack of respect to treat him like this.

Guess what's my feeling #2? I totally subscribe to this point of view. Ruling out an absolute champion after a bad performance is acceptable to me--law is law; ruling out after an accident sounds like a dull application of law.

In general (and by saying so I'm probably confusing apples, oranges, and even kiwis), I believe that law must be understood and interpreted. Then, only then, applied. Computers need certain rules and never go beyond the logic you hard code. Humans should mount another type of software. Possibly and hopefully smarter... 

In the news today: "Microsoft to remove CALC from Windows"
26 March 04 04:11 PM | despos | 13 comment(s)

I was a teenager and, for a time, crazy of a particular song. Once, I caught myself thinking that if I were the author of the song I wouldn't have permitted some people to get a long-playing of it. (No CDs yet--I'm not that young <g>) 

What people? Guys I didn't get along with and girls who didn't like me for example.

I would have liked the author of that song to sell the LP in various versions: with my favorite song and without it. And maybe one with a recorded message in lieu of the song stating "You are not permitted to enjoy the pleasure that this song transmits."

Likewise, some people want MS to sell Windows with WMP; some not. Today is WMP; tomorrow it can be Calculator, or Paint, as in this nice story from Christian Nagel. And if the model works, why not the whole .NET thing?

 

Time, stamps, and the ASP.NET 2.0 Compilation Model
10 March 04 04:40 AM | despos | 4 comment(s)

It is widely known today that the ASP.NET runtime detects changes to the source ASPX files and invalidates the corresponding assemblies. This is written everywhere in the literature. Other, more advanced sources, arrive to the point of hinting at how this is accomplished: using the file notification mechanism that is built into Windows since Windows 95. In the .NET Framework, it is named FileSystemWatcher.

Have you ever realized that this information is incomplete?

The file system watcher is set up when the Web application is started, and a new instance of the HttpRuntime object is created in a new AppDomain. As long as the application is up and running, the file watcher monitors the source ASPX for a  given page.

If the information above was the only thing to know (and do, if you want to emulate the feature), then if you stop the application, modify the ASPX, and resume, no changes should be detected because no watcher is running when you modify the page.

What's the missing link?

In the ASP.NET temporary folder (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files) each visited ASPX page has an associated XML file. For example, default.aspx has a file like this:

default.xml.[hash code].xml

That XML file contains the name of the dynamically created page assembly, the type to load from the assembly, the list of dependencies for the page (the ASPX, linked DLLs, master pages in ASP.NET 2.0). In addition, this XML file has a hash attribute. I don't know exactly what info is hashed there and how. But I'm pretty sure that it contains the timestamps of all dependent files at the very least.

When the application starts up, and the page is invoked, if such XML file for the page exists the HTTP runtime reads the stored timestamp for the ASPX source file and if it doesn't match the current timestamp (i.e., the file was modified) the assembly is recreated and--conclusive and decisive proof--the XML file is updated!

OK. But what's the point?

I tried to implement a similar mechanism for a custom type of file and I realized that the FileSystemWatcher class can't guarantee that changes are detected if you operate them offline. Obvious, once you know it.

The great news is that the new compilation model in Whidbey will make this sort of (necessary) things much much easier.

It Shadows. What?
10 March 04 04:04 AM | despos | 16 comment(s)

OK with this post I publicly admit that perhaps I'm not that strong with subtle and fine features of OOP. Let's take the Shadows keyword in VB.NET (or the new modifier in C#).

Can anybody provide a real-world example of their usefulness?

I went through some of the MSDN examples full of hope. Disregarded. You know those brilliant examples where you have class A; then class B that derives from A; C from B; D from C. Etc etc.

Any help?

A poor soul in a dark shadow

Strong .NET Skills Wanted in the UK
01 March 04 04:40 PM | despos | with no comments

I have been contacted by a headhunter looking to fill some senior .NET architect /consultant jobs in the UK. Interested? Email me at dinoesp@hotmail.com

In New Jersey Next Week
01 March 04 10:31 AM | despos | 11 comment(s)

I'll teach a class in New Jersey next week. Around Newark. I know this is a short notice but if there's a .NET Users Group in the area interested in a night talk, feel free to contact me.

More Posts