MSDN Online Magazine: Another Great Free Resource

I’ve been a subscriber to the printed version of MSDN magazine for a number of years, and lately I’ve been wondering if I should continue, as most (if not all) of the content is available online here at msdnmag. The printed version usually arrives sooner, but by the time I get to it in my reading pile, the online version is already out! Maybe they should give it away to MCSD’s!

September’s issue has a wide range of articles including guidance for building smart clients, enterprise library custom application blocks and integrating Virtual Earth into your applications. There are also links to past issue articles such as preventing SQL injection attacks, crucial security tips for developers and a selection of performance related information.

Architecting Modern Desktop Apps in .NET

MSDN and Microsoft.com are full of great learning resources, but it’s not always obvious what’s available. Here’s a great series of webcasts Architecting Modern Desktop Apps in .NET by Dr. Joe Hummel (recorded third quarter 2005), describing the design and development of smart client applications.

There is also a series on Modern Software Development Using C#: Develop in .NET (with a equivalent series for VB.NET) at the same URL.

You will need to sign in to MS Passport to download these webcasts (and the 2005 offline player) and go through what seems like a ridulous number of clicks to download a single webcast (Microsoft: when are you going to make this processs easier, say download a complete series???). Who said the road to continuous improvement was supposed to be easy!

Always Use SCOPE_IDENTITY() in Stored Procedures

Now I’m sure most developers and DBAs are aware of this, but I mention it because it crops up every once in a while in production code. There are 3 ways to retrieve the last generated identity value for table: @@IDENTITY, IDENT_CURRENT(‘tablename’) and SCOPE_IDENTITY().

If you want to make sure that retrieved identity value is correct, use only SCOPE_IDENTITY().
In fact, it’s worth doing a search for the other 2 possibilities across all your projects’ stored procedures just to be sure.

From Books Online:

  • SCOPE_IDENTITY() returns the last identity value generated for any table in the current session and the current scope.
  • IDENT_CURRENT(‘tablename) returns the last identity value generated for a specific table in any session and any scope.
  • @@IDENTITY returns the last identity value generated for any table in the current session, across all scopes.

Power Toys for Visual Studio

I came across the Power Toys for Visual Studio site at Rob Caron’s blog

Power Toys for Visual Studio are small tools that provide aid to developer
pain-points or assist in diagnosing development-related issues. In addition to
providing support, the power toys are released as Microsoft Shared Source to
provide sample code to real-world solutions and allow for
collaborative-development.

It contains information about the various power toys under development, such as the Best Practice Analyzer for ASP.NET and the MSBuild Extras – Toolkit for .NET 1.1 “MSBee” and developer tools such as IronPython.

There’s an Announcements RSS feed you can subscribe to here to keep up date on what’s new.

Debugging XSLT with Visual Studio 2005

I probably missed the fact that this new feature existed in Visual Studio 2005 due to not doing much XSLT lately. I was re-reading an article by Nick Weinholt which made reference to this feature. Several third party tools have had this ability since VS2003, so it is a welcome addition to Visual Studio 2005’s feature set.

If you are learning XSLT, then this can be a valuable tool for stepping through transforms and getting a feel for how they work.

To show just how old this information is I’m linking to a MSDN article An Introduction to the XML Tools in Visual Studio 2005 from July 2004!

Simply open the XSLT file with VS2005, set a breakpoint(s) as you would with .NET code, go to XML->Debug XSLT and you will prompted for a XML input file. Browse to your XML document to be transformed and away you go.

MapReduce

I’ve been familiar with the concept of MapReduce for some time (a less generic form of MapReduce formed the basis of a paper I wrote circa 1988, ‘Sorting with near-linear speedup on tightly-coupled multi-processors”), although I’ve never used a functional programming language in anger. I’ve just finished reading an excellent research paper by Jeffrey Dean and Sanjay Ghemawat (both at Google) titled “Simplified Data Processing on Large Clusters”. MapReduce is a programming paradigm and an associated implementation for processing large datasets. The key point being that “Programs written in this functional style are automatically parallelized and executed on a large cluster of commodity machines.”

This is a very accessible paper regardless of your computing background. Well worth reading, if only to get a glimpse of how the Google distributed indexing engine performs its work.

Why do you Blog?

A few of my colleagues, have asked me if anyone reads my blog and why do I bother.
I have to admit it’s mostly for selfish reasons! It’s a great way of keeping track of topics that interest me or subjects I’ve researched, in a single location, and in the process perhaps help someone else. If you find something useful here please feel free to leave a comment or email me. I’ve recently signed up to Technorati and FeedBurner to try to track usage (if you had previously used my direct blogger feed in your aggregator, please swap over to feedburner).

Wise Words

Since I’m on the subject of great quotes, I came across this one some time ago. I think it contains advice that we should all take to heart:

Any society that would give up a little liberty to gain a little security will
deserve neither and lose both.

Have a guess who said this? I bet you’re thinking it was some modern radical? It was non-other than that great and diverse American, Benjamin Franklin (1706 – 1790).

Maybe we should display this on gigantic bill boards instead of promoting the ‘war’ on ‘terror’. He also said:

If you would not be forgotten, as soon as you are dead and rotten,
either write things worth reading, or do things worth the writing.

Erasmus

Certain quotes seem to resonate in the mind. One of my favorite is from a man who was born in the 15th century, but whom I feel would not be too out of place in the world as we know it today:

In the land of the blind, the one-eyed man is king.
[In regione caecorum rex est luscus]

DesideriusErasmus, Adagia (III, IV, 96)
Dutch author, philosopher, & scholar (1466 – 1536)

Desiderius Erasmus was a spiritual man, but loathed the corruption inherent in the organised religion of the time. Erasmus stands as the supreme type of cultivated common sense applied to human affairs.

He is the author of a surprising number of well known quotes that have endured through 500 years of history:

Prevention is better than cure.

He who allows oppression shares the crime.

And rather surprisingly!:

Women, can’t live with them, can’t live without them.