March 2005 - Posts

"Unrecoverable Build Error" In VS.NET 2003 Setup Project

Last week I received the above error while trying to build a project that had been built many times in the past. The error text reads “Unrecoverable Build Error”, your project does not get built, and that's all the information you can expect to get.

The Microsoft Support Site saved my life on this one: http://support.microsoft.com/kb/329214/EN-US/

All I needed to do was to re-register Mergemod.dll. I am blogging this because I don't know what may have caused this problem, therefore, it may happen again.

(Belated) Review of Melbourne SQL Server SIG for March 2005

March's Melbourne SQL Server SIG was presented by Greg Linwood, on “Performance Tuning Methodology - SQL Server 2000/2005” (event details can be seen here). The topic was obviously pretty relevant because the room was packed. The slides from Greg's presentation are available from http://www.sqlserver.org.au/resources/ViewResource.aspx?resourceId=33.

Greg started by defining “methodology” as a repeatable process, and explained that “performance tuning” had a different meaning for DBAs and developers - he mentioned that DBAs are concerned that the server runs well, while developers are interested in their procedures running fast (since I'm a developer, I see nothing wrong with this!)

Greg then went through some of the “tools of the trade”. I can honestly say I'd never seen some of the stuff he did: Profiler traces via script using functions like ::fn_trace_getinfo, and checking how much of SQL Server's buffer pool is used for data vs. compiled stored procedures, were two things in particular that I haven't come across in my travels.

Greg led the session well and clearly knew his stuff when it came to tuning SQL Server performance. Apart from touching on the tools useful for performance tuning, he also spoke about the ideas behind benchmarking and acting on feedback from users, which was really helpful to me. After he finished speaking he opened the floor up for a Q&A session with two SQL Server gurus* Geoff and David, who acted as the panel of experts and fielded questions. In hearing a couple of questions that had been submitted via e-mail, I was amazed at what people go through to meet business requirements and the way the experts handle shortcomings in the product, as demonstrated by Geoff and David's answers.

Well done Greg for a thorough description of the top tools to use. I spoke to Greg and he'd given his session at the Canberra SIG earlier in the week, so I reckon it's a topic near and dear to the hearts of people that work with SQL Server. And it was good to see so many people at the Melbourne event (I was on the door doing a bad job handing out name tags).

* In Australia, our word for “guru” is “bloody legend”

OT: The 5 Stages of Debugging

Leonid points to a great dev wall chart, “The 5 Stages of Debugging” (well, at least it's hanging on my wall).

He he.

Local Blogging

Will mentions that he's starting to seek out local (Australian) content in his blog reading. I have experienced this too, and I'm coming to realise that there's a) a great number of Aussie bloggers, and b) some of them are in IT, and most know their stuff.

When I first started reading blogs in June of 2003, I looked mainly at the “big guns” of blogging, whether I was interested in what they had to say or not. On those blogs, the quality is often very, very high, but the relevance to me can be quite low (in terms of both locality and technology choice...for instance, I'm not really going to appreciate a blog dedicated to Microsoft ISA Server, as I've never touched it, nor am I likely to).

Nearly two years later, I can afford to be a bit pickier about my content, and not feel bad if I'm not reading the biggest bloggers. Mostly the good stuff gets re-linked all over the blogs I do read. And if something really great slips through, and I need information about it later, there's always Google!

One other advantage of going local is local off-topic stuff, like Wilson Afonso of Random Developments showing pics of a new Nicolas Cage movie being shot in Melbourne, or Mick Stanic of SplaTT's Weblog talking about coffee, or David Kean liking Nullable Types in C# (well that's on topic for some, but I do VB.NET, not C#). And I've never met any of these guys either.

Go Aussie!

"The Long Tail"

I'm not much of a marketing guy, but I read an article from Wired called “The Long Tail” (thanks Tariq for the link), and it blew me away. Basically the article examines the popular conception that 80% of sales dollars are generated by 20% of products. I've worked in retail, and this is a tried-and-true rule. But the article goes on to explain that some retailers (e.g. Amazon, NetFlix) are catering to the other 80% of products (the “long tail“-end of the market), that aren't in so high demand, and finding a lot more than just 20% dollar sales.

Some quotes to give you an impression of the article:

“...Wal-Mart must sell at least 100,000 copies of a CD to cover its retail overhead and make a sufficient profit; less than 1 percent of CDs do that kind of volume...“

“...The average Barnes & Noble carries 130,000 titles. Yet more than half of Amazon's book sales come from outside its top 130,000 titles...“

“...Hit-driven economics is a creation of an age without enough room to carry everything for everybody. Not enough shelf space for all the CDs, DVDs, and games produced. Not enough screens to show all the available movies. Not enough channels to broadcast all the TV programs, not enough radio waves to play all the music created, and not enough hours in the day to squeeze everything out through either of those sets of slots...“

Worth a read.

The Wired article also discusses what the price of online music should be (towards the bottom of the article). Very interesting.

One of the reasons I really enjoyed the article is because previously I've bagged local (to Melbourne/Victoria/Australia) video and book stores as they do not cater for online shopping - they've got no inventory online, and they have close to the same prices as I would pay in a “real“, physical shop. I have to back down from that opinion somewhat as there are Australian bookstores with inventory online (like Dymocks). I'm still sulking because there's nothing even remotely comparable to Amazon down under.

Using Amazon, I can track down any product, and buy it cheaper than I could over here, even accounting for shipping and the exchange rate.

On a side note, I do actually expect to pay a premium price when I shop in a shopping centre and buy items at full price - there's rent, sales staff, running costs, limited space, etc. Supply and demand also dictates that prices are generally going to be cheaper in the US (population, 300 million plus) than in Australia (population, 21 million or so), especially for items that are made for the US market, or in the US itself. I am starting to look forward to a time when I can get films, music and e-books delivered electronically as a download (no packaging, no manual, no space taken up), which should cost a lot less.

"Before Playing Games" Script

I'm not much of a gamer, but I am partial to the occasional Pirates! or Patrician II.

Before playing those games, I run a Windows batch file that turns off un-needed services and applications so my computer is in top gaming shape. Ideally I'd love to shut down anti-virus checkers, my firewall software, desktop search engines, etc. - all the stuff that runs in the background using CPU cycles or RAM - but the reality is that I need most of those functions of my computer to keep running.

I have seen tips (for example, here and there) showing how to use NET STOP to stop unnecessary services. There's even a complete tool for the job called FSAutoStart (I haven't tried it though).

I use NET STOP (as detailed in the links above) from a batch file, and another batch file and a REG file to stop my screensaver. My disclaimer is, “It works on my machine!“ (Windows 2003 Server). Here's the batch file to stop the screensaver (I call it “screen saver off.bat“):

REG DELETE "HKCU\Control Panel\Desktop" /v SCRNSAVE.EXE /f
REG IMPORT "screen saver off.reg"

It calls a REG file “screen saver off.reg”:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ScreenSaveActive"="0"

Of course, don't go running these files unless you understand the consequences! The first file removes a key in the registry called “SCRNSAVE.EXE“ that points to the current screensaver (usually an SCR file), and the REG file sets the screen saver to “None”. Doing one of these steps alone is not enough.

The problem is that once I have executed “screen saver off.bat”, I need to go into my Display properties and turn the screen saver back on the next time the computer starts. Well, not really...there is a script to do the reverse (I have called it “screen saver on.bat”):

REG IMPORT "screen saver on.reg"

This file calls “screen saver on.reg”:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"="C:\\PROGRA~1\\Webshots\\webshots.scr"

The “screen saver on.bat“ batch file simply imports the second file, which sets the screen saver to be active, and also adds a key to tell Windows which SCR file to run (in my case, Webshots). I believe you have to use the MS-DOS name for the SCRNSAVE.EXE key.

Apart from that, all screensaver settings are kept (like amount of time before starting). To put my computer back to normal after running “screen saver off.bat“, I have put a shortcut to “screen saver on.bat“ in my Startup folder. In a small way, I have found these simple scripts helpful to get my PC ready for gaming.

OT: Organising Transport to Code Camp Oz

I sent the following e-mail to Corneliu, who's organising transport for Code Camp Oz:

Hi Corneliu,

I'm looking for a place in a car bound for Code Camp Oz. I'm coming from Melbourne and can arrange to meet the potential lift anywhere in Melbourne's suburbs. I travel light, have a reasonable singing voice, am fairly amiable and (of course!) will contribute petrol money.

Thanks in advance,

Thomas Williams

I figure the more people I can ask, the better. If you can & want to help, please get in touch with me through my Contact page.