July 2005 - Posts

Patching Software I Write

Recently I've been bitten by having to deploy minor upgrades of a .NET application I developed, by uninstalling and reinstalling on the client's PC.

This is bad for two reasons:

  1. For the next minor change I am going to have to build a setup project, make sure it works, and package it into an MSI file
  2. I had to physically go to the client's machines and fiddle around with install/uninstall

My aim is to have a system that I don't have to get involved in as much. I wonder what you guys & gals, my readers, use for deploying and (more importantly) patching your .NET applications?

I posted this same question to the AUS-DOTNET mailing list and have had some replies, one pointing me to Wix and another to RTPATCH (still looking into both of these).

Personally I've taken the path of least resistance and used Visual Studio setup projects. Unfortunately it's also the path of least configurability and the installers that are produced are just "good enough" e.g. great for clean, fresh installations but as far as I can see don't have any concept of a "patch". I also have an old, old version of Wise that's probably as good/bad, but in different ways, that I'm unwilling to use just yet (it also doesn't support the notion of "patching").

The AppUpdater is good, but not great, in that our users are not given permission to write to the "Program Files" folder which means that normal users can't run the AppUpdater. Also we don't have a proper web server to check the update locations on.

That's all the caveats I can think of...how do others deal with this issue?

PDF from DOC, DOC from Wiki (or the long way to Documentation)

I love documentation about as much as the next person, or perhaps a litle bit less. I choose to use a wiki (the always-improving Flexwiki) for my documentation because I can easily edit it and also integrate it into my apps via a "help" pane and the wiki's "print" view. I do sacrifice some nice formatting (I've been using Word for years and know how to get the document looking just right), though, and my boss insists on documentation in Word or PDF format for saving to a file share.

So the route I take to get a PDF is:

  • Open the wiki page's "print" page URL in Word.
  • Adjust formatting minimally, and save as a Word document (*.DOC) on my local PC (not back into the wiki).
  • Make sure the graphics are embedded into the Word document, not IMG links, by clicking on each image and pressing CTRL+SHIFT+F9.
  • Convert the Word document to PDF (I use CIB PDF Plug-In for Word XP, free for non-commercial use, found via The Tensor).
  • Smirk in satisfaction (this step is optional - you might prefer a victory dance).

I can't believe how a simple thing like converting a wiki entry - essentially a web page - to PDF could be so troublesome. While some wikis have PDF export built-in (e.g. tikiwiki), I think an export to at least RTF is worth implementing to help those with more "traditional" documentation needs.

July SQL User Group Melbourne: Metadata in SQL Server 2000/2005 with Kalen Delaney

Tuesday's Melbourne SQL User Group meeting was packed full of people to hear Kalen Delaney speak about metadata in SQL Server 2000 and the upcoming SQL Server 2005 (the release formerly known as "Yukon"). I hadn't been to a monthly group for 3 months so it was good to get back into it and I admit I was expecting big things from Kalen, expecially knowing she's the author of "Inside SQL Server 2000", which is still recommended as one of the better books on SQL Server 2000 (even 5 years after the book was released).

Kalen didn't disappoint with her knowledge and ability to explain the inner working of SQL Server. There was a hitch getting the latest beta of SQL Server 2005 to work though, so we had to be satisfied with theory rather than practice when it came to the "new bits". I still found Kalen's thorough coverage of all the ways you could get at metadata - "data about data" - really interesting and I learnt a few things too (during the session I had a strange thought - since SQL Server stores its metadata in tables, which are themselves described by metadata, where does the recursive nightmare stop?)

I use metadata (unwittingly) in different ways - recently I played around with allowing a user to script a whole database and had to mess with several metadata-type functions e.g. my attempt to document sp_msobjectprivs. I probably utilise metadata more than I know, for instance when Visual Studio discovers the return structure from a stored procedure when creating a Reporting Services report or a strongly-typed DataSet.

Kalen went on to discuss accessing metadata through system stored procedures, system functions, property functions, information schema views and system tables (thankfully, she said that SQL Server 2005 combines most of these methods into a common, understandable "sys" schema and catalog views where there is very little duplication). Another advantage of the upcoming SQL Server release was row-level security on metadata access: users will only be able to see what they've been given access to. She had an interesting demonstration that showed some "system tables" in SQL Server 2000 aren't really tables, and we can find this out by checking the used space:

select * from sysfiles
exec sp_spaceused 'sysfiles'

In summary then, Tuesday's meeting was great. It's good that we can get such a high-quality speaker as Kalen, who was easy to understand even though her "master" database, which I think of more like "marstar", became "masster", and her "data" came out like "day-tah" ;-)

Looking forward to next month...

Passed 070-306, first stop on my way to MCSD

Hooray! I passed my first MS exam, “070-306: Developing and Implementing Windows-Based Applications with Visual Basic.NET and Visual Studio.NET”, last Thursday. I'm not sure what I'm allowed/not allowed to reveal as each exam has an NDA (Non-Disclosure Agreement), but one thing that threw me at first was that the exam had less questions than I expected, which meant I could get less wrong! The exam is part of my quest to become an MCSD, which I have written previously about here.

I just got sent an e-mail congratulating me on becoming an MCP, another inviting me to take a certification survey about the exam from Microsoft and lastly a questionnaire from Pearson VUE also on the exam-taking experience.

I'm allowing myself a few weeks break, then on to the next exam…