Influential Software Development Blogs

Like many developers, I read several blogs every day. Not quite as many as I’d like, and certainly not as many as Robert Scoble, who by his own account reads 1000. This seems a tad high to me, as it works out to be 16+ hours a day if you spend just 1 minute at each blog (8.3 hours if you spend just 30 seconds reading each one).

Here are the ones I think have influenced me more than others (although it was a hard task to reduce this list from around seventy to just six). I’m sure many of you read these already:

Kathy Sierra: Kathy’s blog is insightful, entertaining and big on content and ideas. She is one of the visionarys behind O’Reilly’s Head First series of books. The focus is designing great software by creating passionate users. How do we do that? By writing software that really helps the user at each step of a task. The difference between good software and great software is the way it makes users feel. Empower them to be great and do a great job! Recently, she has stopped blogging, but I’m sure she will start again…

Scott Hanselman: Scott and his army of Hanselman clones(!) have covered just about every topic under the sun. Does he ever sleep? He covers pretty much everything including design, development and architecture. I’ve had more than one epiphany at Scott’s blog. His Hanselminutes webcasts are great. Go and grok him!

Jeff Atwood: Jeff has an easy, very enjoyable writing style. Jeff covers a diverse range of topics. Always food for thought and excellent, balanced observations. He never ceases to amaze with his originality and breadth of subject matter.

Scott Guthrie: For ASP.NET you can’t pass this blog by. Superb! Scott’s PDC presentations never fail to entertain and get his points across. His Tip/Tricks section is required reading for all ASP.NET developers. Scott is a program manager for so many areas of .NET, you be forgiven for assuming he’s also been cloned!

ArcCast hosted by Ron Jacobs, has a large number of podcasts and webcasts available, with an architectural flavour but also covers other topics such as usability. Great resource! I met Ron when we were lucky enough to have him present here in Perth, and he’s an amazing guy.

Joel Spolsky: not as active as it once was, but Joel’s archive is worth reading. Try reading his Unicode article…The first time I read it, I felt so dumb!… I have several of his collections of essays on software development in hard copy, but most of the material is free to read on his site.

These six blogs cover many of the important areas that developers are required to be familiar with. Who do you read?

C# Code Snippet: Ensure Filename is Unique

OK, this is not exactly going to be the most complicated C# code snippet you will ever see. I’ve often wondered why the .NET Framework does not include similar functionality to Explorer when copying and pasting files (if it does and I’ve somehow missed it, please post a comment and let me know!). I’ve often needed the simple logic of ensuring that saving a file to a specified folder does not clash with one of the same name. There are basically two ways of doing this: (1) simply modify the filename to include a string representation of a GUID (via Guid.NewGuid().ToString()), or (2) or modify the filename to prepend something like “Copy (?) of “ checking until the name is unique. Here is a minimalist implementation of the second:

/// 
/// See main overload.
/// 
/// a fully pathed filename
/// a unique fully pathed filename
public static string EnsureUniqueFilename(string fullFilePathname)
{
    string destFolder = Path.GetDirectoryName(fullFilePathname);
 
    if (String.IsNullOrEmpty(destFolder))
        throw new ArgumentException("You must pass a fully pathed filename");
 
    return EnsureUniqueFilename(fullFilePathname, destFolder);
}
 
/// 
/// Return a unique filename of the form, 'Copy of (?) OriginalFilename.ext'
/// NOTE: Does not adhere to the full semantics of the file explorer copy logic.
///       which creates first copy named as 'Copy of OriginalFilename.ext'
///       Nor does it rename any files. It simply returns a filename which is unique
///       It does not take into account multiple threads attempting to make use 
///       of the same filename.
/// 
/// a fully pathed filename
/// a destination folder
/// a unique fully pathed filename
public static string EnsureUniqueFilename(string fullFilePathname, string destFolder)
{
    string filename = Path.GetFileName(fullFilePathname);
    string renamedFile = Path.Combine(destFolder, Path.GetFileName(fullFilePathname));
 
    // Check if a file with same name exists in folder and try a modified name if neccessary...
    int intCopy = 0;
    while (File.Exists(renamedFile))
    {
        intCopy++;
        renamedFile = Path.Combine(destFolder, "Copy (" + intCopy.ToString() + ") of " + filename);
    }
 
    return renamedFile;
}

Photoshop Tutorials

Mastering PhotoShop seems to take a lifetime. Not that I would put myself in that esteemed camp. I came across a few surprisingly easy but effective tutorials at the Photoshop Café here and here.

If you are a keen photographer, it’s hard to pass up this gem of a book The Photoshop CS Book for Digital Photographers by Scott Kelby. If you can find a better hands-on book, buy it and please let me know what it is! Here’s just one very simple tip of many more involved examples from the book: to display your work press ‘f’, ‘f’ and then ‘Tab’. The first ‘f’ centers your work; the second hides the menu bar and displays a black background. ‘Tab’ hides the toolbars, Options bar and palettes. Just press ‘f’ and ‘Tab’ to return to normal working mode.

Code Snippets

Nick followed up on my C# snippet post with a nice piece about using code snippets in Visual Studio 2005 and using a snippet editor to create and share your own code snippets. His post reminded me that I had forgotten to mention that to use that snippet you will need to add a “using System.Data.SqlClient;” and System.Data to your references.

Nick mentioned the VB.NET version of the code snippets editor; you can download Snippy, a Visual Studio C# Snippet Editor from GotDotNet (soon to disappear; come on Microsoft, I’m sure it wouldn’t break the bank to keep this running. I ask myself if Google would close down a similar site…) [BTW, Brian Madsen one of our other Perth MVP’s loves VB.NET with a passion. He is going to kill me for saying that :)… ]

I was also going to recommended having a look at the gotcodesnippets.com site but the second C# snippet I looked at was flawed: don’t use the singleton that is posted there. It’s not thread safe. Use this one instead: C# Singleton Best Practice. The gotcodesnippets site could be improved by having some sort of comment or peer review voting system (similar to regexlib, for example), otherwise it is in danger of spreading incorrect information. I suppose this is always the danger with such open sites. I’m sure there are many useful snippets there; just don’t go using them without checking first. One nice feature is that the site is RSS enabled so you can be notified of new code snippet uploads.

Free Developer E-Learning

One of the developer resources that I’ve mentioned a few times on my blog are the free e-learning courses Microsoft provide. There are several currently available: