Tuesday, August 31, 2004

Is this 1984 again?


Thursday, August 26, 2004

Note to self: The designer can't access the app.config file

So when your class can't be loaded in the designer because of a seemingly obscure error, typically it's because some code is being executed in the constructor or in the initialization process. In my most recent case, I got an "Invalid URI" caused by some deep-down nested object call to get the URI of a webservice from the app.config file. But, of course since this was at design time, the actual application that was executing was devenv.exe, and silly me - I didn't have the same app key in the devenv.exe.config file, so my utility function returned an empty string.

The short term solution was to check which app was running and not set the URI if in devenv.exe, but the better, long term fix will be to implement Lazy Initialization as described by Martin Fowler in P of EAA: Lazy Load

Tuesday, August 24, 2004

Replacing typed dataset column names with untyped names

After moving a webreference from one project to another, I could no longer refer to the name of a column in the dataset by specifying myDS.MyTable.FooBarColumn.ColumnName Instead I had to resort to the less desirable (but still valid) "FooBar"

Now how do you make that change throughout a project without getting CTS in the process? Simple - use VS.NET's extended replace with regular expressions: Find what: (<:a+\.)+{:a+}Column\.ColumnName
Replace with: "\1"

Gmail Notifier

Via ISerializable: Google releases the Gmail Notifier.

Cool. Installed

Friday, August 20, 2004

More insanity at the airports

Sen. Ted Kennedy was flagged by the No-Fly List and stopped and questioned 5 times in DC and Boston "and at least one other airport" back in March. Apparently "Kennedy was stopped because the name "T. Kennedy" has been used as an alias by someone on the list of terrorist suspects. "

Couple of points:

  • Why is the system so idiotic as to flag anyone whose name matches an initial and a last name? If 'J. Smith' was on the watch list, would every John, Jim, Jack, Jill, Jude, and Jane Smith in the US have trouble flying?"
  • Why is Kennedy making noise about this now, 5 months later?


Practice your parallel parking

Via Eric Gunnerson: Parallel Park Game - Time yourself parallel parking - Flash Game

Is this 1999 again?

Wired News: Google Stock's Wacky Debut: "An estimated 950 to 1,050 of Google's nearly 2,300 employees are paper millionaires, according to an analysis done by, which tracks employee compensation."


Thursday, August 19, 2004

Hurricane Charley Pictures

Via Sharp as a Marble I came across some amazing pictures showing the extensive damage caused by Charlie...

Wednesday, August 18, 2004

Saving TiVo

Business 2.0 has an interesting article about how Strangeberry might be Saving TiVo.
I don't know - from this chart I'd say TiVo is doing quite well as is:

Of course, as the owner of 2 TiVo boxes myself, I am biased. But before getting the second box, I tried Comcast's DVR. I don't have time to list all the issues it had; I am trying hard to forget them. The DVR lasted for a whole month before my wife begged me to get rid of it and get a second TiVo. I was happy to oblige.

NPR : Oil Price Jump Not All Good for OPEC

Interesting report on NPR's Morning Edition this morning: Oil Price Jump Not All Good for OPEC

Once again, the effect of inflation is not directly mentioned, but at least someone points out the weak dollar and that "a $28 barrel no longer buys what it used to", and encouragingly, US gas consumption is down from the same month last year.

Monday, August 16, 2004

Brief GhostDoc v. 1.0.2 review

Roland Weigelt has an excellent little add-in to VS.NET, called GhostDoc. It recently won 1st price in Roy's add in contest, and it was well deserved. I downloaded it last week and tried it out on our current project, and I can see that it has great potential but falls short in a few areas. I mentioned that on Roland's blog, and he asked me for further feedback which I provided by email - but thought I'd also share here:

Mostly the method names that GhostDoc has trouble resolving are “bad” names that I had chosen. This is to be expected - it's a simple parser, not HAL - and in some cases GD actually helped point these instances out to me. But it also has problems with common composite-action styled method names like DataBind – “Datas the bind. “ wasn’t exactly what I was looking for (“Databind” works fine of course).

Where it really falls short is when I use prefixes to separate and organize methods – for example I have a common web service that exposes web methods from multiple business rule classes – in this case I use the original class name as the prefix followed by an underscore – e.g. Company_SearchParent. For this GD returns “Company_s the search parent.”

What I’d like to see is some way to set filters for (regular) expressions that GD should match, as well as filters that it should NOT match. Along with the excellent filters you have already included, that should make it capable of handling most anything (in English at least). That way I could say – exclude prefixes that end in _ so in the above example GD would just see SearchParent, which it handles quite nicely: “Searches the parent.”

Actually, come to think of it, I believe GD needs to have some special setting for underscores to handle the default names of event handlers: for example, my listDetail control has an InitializeLayout event; so VS.Net generates the method name listDetail_InitializeLayout. The expected summary of this method would be “Initializes the layout of the listDetail.” But GD generates “Lists the detail_ initialize layout.”. If GD was set to by default treat anything preceding an underscore as the indirect object of an action, that would solve both this situation and that above – I would get “Searches the parent of the Company” which is exactly what I’m doing. But some kind of regex filters would still be great…

Additionally, there needs to be user changeable settings for common terms: the term ID is one I’d like to keep as ID; i. d. looks strange to me. Similarly, an event handler’s EventArgs parameter, which VS.NET by default names e, ought to be trapped and expanded on (of course here you run into potential conflicts with Exceptions, which some people also give the name e – but that is why I use exc for Exceptions…).

Overall, this is a great tool, but I think these changes would make it even better.

Thursday, August 12, 2004

Rant: Oil and Gas Prices....

All the current hooplah about the "record high" oil prices and the corresponding gas prices has me a trifle annoyed. Nobody ever seems to bother mentioning the terms "inflation" or "present value".

For example, I can't remember hearing anything about how motorists in the US really paid more than they do now for gas through most of the 80s or how, adjusted for inflation, the real record high for oil was set at $60 per barrel, back in 1981. ExxonMobil actually had an interesting publication on this, back in 2000.

Personally I am in favor of high oil prices, and as sick as I am hearing about it, I believe it is vital that the public starts getting concerned, and therby modulate its consumption... The higher the oil prce, the more viable alternative forms of energy become.

Labels: ,

ASP.NET Forums Debate on Code Generation vs. O/R Mappers

A few days late, I noticed Eric's blog entry about the great Code Generation vs. O/R Mapper debate going on in the ASP.NET Forums.

BrandonC was nice enough to give my Stored Procedure Wrapper CodeSmith template a plug. He incorrectly implies that this template also generates your stored procedures - you need my CRUD Procedures template to do that.

There. Enough self-promotion for today. Of course hardly anyone actually reads this blog, so I'm in no danger of turning into Chris Sells, yet.

Labels: ,


While reading ITavisen, a Norwegian IT news outlet that mainly seems to translate stories from English, I came across welcome "news": DHTML Lemmings.

This is even better than crazy golf...

Updated StoredProceduresDescription CodeSmith Template

I updated my StoredProceduresDescription CodeSmith template that Eric has included in the CodeSmith samples. The changelog since the version included in the program download is as follows:

Mar 15 '04 by Oskar Austegard
- Fixed bug in parameter regular expression that stopped looking for parameter comments when it encountered the snippet 'as' even in a comment. Also refactored the RegEx strings themselves to be more readable
Aug 11 '04 by Oskar Austegard
- Fixed bug that failed to escape single-quotes (') in comment strings.
- Fixed bug that failed to create drop statements for Descriptions containing only empty strings:
Replaced check for !Description.Equals(String.Empty) with ExtendedProperties["MS_Description"] != null

Get it here

Labels: ,

Monday, August 09, 2004

JetBrains Omea first impressions

So JetBrains alerted me that their new product, Omea, is now available for download. At first glance it looks very similar to Lookout and X1, though it adds some more features like searching News, RSS feeds and IM stores.

Maybe if I didn't already have Lookout, then I would see a personal use for Omea. For right now I'm unconvinced. But then again, I wasn't bowled over at first abour ReSharper either, and then became so enthusiastic that I ended up with a free license...

Labels: ,

Friday, August 06, 2004

Sorting Methods in ASP.NET Web Service Test Page

I got tired of trying to locate a specific method on my web service test page, so I did a google search and as usual found the same question, but no complete answer. Jan Tielen pointed me to DefaultWsdlHelpGenerator.aspx, which is the file that is used for testing, but after that I was on my own.

Long story short, here's how to solve the problem:

  1. Open the DefaultWsdlHelpGenerator.aspx file - on my computer it is at C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\DefaultWsdlHelpGenerator.aspx - in your favorite editor. You may want to create a backup first.
  2. Locate the Page_Load event handler. If this file hasn't been edited before (and you're running .NET 1.1) this should start on line 1243
  3. Scroll down to line 1285, which should look like this:
    Hashtable methodsTable = new Hashtable();
  4. Comment out this line and replace it with the following:
    SortedList methodsTable = new SortedList();
  5. Save and refresh your web service test page.
Now why doesn't it come like this in the first place?

Thursday, August 05, 2004


Trade anything, really

"The price is set by TradeSports members who decide the fair (or market) value for the contract. A price of 0 (or close to 0) would indicate a contract/event that is NOT going to occur (according to our members). A price of 100 or close to 100, would indicate that the event IS going to occur."
"E.g. If you bought 100 “Bush to win in ’04” contracts at 57 (57 being $5.70) you would be investing $570 (100 times $5.7) to win $430 (ie. 100 times $10-$5.70)"

If this takes off, it could become an important prognosis tool, as people would be rewarded for predicting the correct outcome. This is pretty much what the Pentagon wanted to do in their Policy Analysis Market, which of course got killed as soon as two ignorant blowhards got wind of it.

Beatles + Metallica = Satire

If you like satirical music knock-offs, then Beatallica is a band/site not to be missed. Not exactly what I'd want to listen to all day, but good for a chuckle. Blackened the USSR, Got to Get You Trapped Under Ice and Hey Dude set the tone nicely.

Wednesday, August 04, 2004

Designers and Abstract Classes

Just ran into this today: Designers and Abstract Classes.

This sucks. I had a nice abstract class implementing an interface to force child forms to implement the interface - now I can't to that in any elegant fashion. Do I implement the interface on the base class and provide empty virtual method implementations, thereby ensuring that the interface is followed - but not that a true implementation is completed - or do I just hope that the child controls will implement the interface?

Sweet phone...

I want this: Siemens SK65.

Tuesday, August 03, 2004

The trouble with "targeted" news outlets

Apparently 3 Palestinians were killed in Rafah today. Question is - how? And by whom?

The Arab side: Aljazeera.Net - Three dead, many injured in Rafah onslaught
The Other side: - Three Palestinians killed in Gaza blast

When every story can be spun 2 ways and people only get their news outlets that pander to their specific beliefs, what purpose do those news outlets serve?

Labels: ,

Sunday, August 01, 2004

Now THIS I'll gladly see...

...unlike 'Fahrenheit' which I very reluctantly paid money for and thereby subsidized another propaganda movie from Moore. (I should have done what a friend of ours did - buy a ticket for Spiderman 2 and then go see Fahrenheit - hopefully Kerry will win this fall so that Moore's ammunition goes away.)

Where was I? Oh - yeah, the movie I'll enjoy seeing: TEAM AMERICA by the creators of Southpark. It looks promising.

Labels: ,