Archives

Archives / 2009 / October
  • A First Pass at PotterKata

    Tonight at Hudson Software Craftsmanship, I paired with another group member and worked on the PotterKata for the first time.  I’d seen NotMyself write about it a few days ago, which prompted me to suggest it for the group to work on (summary of the meeting here). Briefly, this kata is a fairly real-world exercise in that it has to do with business rules for a shopping cart that are non-linear.  In this case, the rules are: One copy of any of the five books costs 8 EUR. If, however, you buy two different books from the series, you get a 5% discount on those two books. If you buy 3 different books, you get a 10% discount. With 4 different books, you get a 20% discount. If you … more

  • Which Visual Studio 2010 is Team Suite?

    The new VS 2010 has a new lineup of versions which you can find described on the Visual Studio 2010 Products page.  Some things to note: Ultimate is the new Suite The “Data Dude” SKU is now fully incorporated in the Premium and Ultimate versions Premium and Ultimate come with a production license for Expression Studio 3, as well as Visio and Project 2010. All versions now come with some Windows Azure pieces for dev/test use All versions ship with Team Foundation Server (which now supports running on the client as a lightweight alternative to a full server-side install), providing version control, build automation, bug tracking, and continuous automation out of the box … more

  • How to Install Windows 7 from USB Drive

    I decided to reinstall Win7 on one of my laptops because it was acting up – turns out that’s not helping and I think at this point it’s a hardware problem (either memory or hard drive – I’m going to try memory next).  In the course of troubleshooting the problem, I decided to rule out a bad installer DVD for Windows 7 (the installer was failing, saying it couldn’t access certain required files).  So I created a USB installer for Windows 7 x64.  And since I’ve been meaning to install Win7 on my Dell mini10 for a while (which has no CD/DVD reader), I also created a separate USB installer for it for Win7 32-bit x86. I found this post to be helpful, but it has some problems in … more

  • Avoid Entrenched Dependencies

    Last year I wrote about Avoiding Dependencies and described some Insidious Dependencies (with help from many commenters) that many developers might not immediately recognize as dependencies.  It occurred to me today that I should point out that dependencies themselves are not intrinsically bad design – all software has dependencies.  The important distinction here that I think is a best practice is that one should make efforts to avoid entrenched dependencies on things that are likely to change. As an example, I write most of my software using Microsoft .NET.  I’m inherently taking a dependency on the CLR.  If at some point the customer’s needs dictate that I need to … more

  • Find String in Files with Given Extension Using PowerShell

    This week I found myself wanting to search within files of a given extension for a particular substring.  I often find myself missing UNIX’s grep tool.  In any event, I tried using the default Windows Vista file search dialog, but found that if I wanted to search for “connection” or “database” within all files ending with “.cs” or “.config” I was unable to do so.  I’m guessing there actually *is* a way to do this from the GUI, but after spending a couple of minutes either searching all files for the text “.cs” or else searching for files named “connection” I opted to just do it from the command line using PowerShell. PowerShell is just freaking amazing.  Seriously.  … more

  • Don’t Repeat Yourself

    (this is a submission I made to the upcoming 97 Things Every Programmer Should Know book) Of all the principles of programming, Don't Repeat Yourself (DRY) is perhaps one of the most fundamental. The principle was formulated by Andy Hunt and Dave Thomas in The Pragmatic Programmer, and underlies many other well-known software development best practices and design patterns. The developer who learns to recognize duplication, and understands how to eliminate it through appropriate practice and proper abstraction, can produce much cleaner code than one who continuously infects the application with unnecessary repetition. Duplication is waste Every line of code that goes into an application must … more

  • N Tier Design Lessons Learned Part 1

    Eight years ago this month I gave my first presentation at a conference.  It was DevConnections’ Fall 2001 show, and it was held in Scottsdale, Arizona at the Princess Resort.  The show was delayed a couple of weeks from its originally scheduled dates, and took place Sep 30 to Oct 3rd, as a result of the events of 11 September 2001.  I still vividly remember the alarm with which my seatmate on the flight over (an older lady) observed that they had given us all plastic knives with our meals.  I reassured her, “It’s OK, we all have them.” As a result of the times and the rescheduling, the resort was a ghost town and the conference attendance was, shall we say, … more

  • Principles, Patterns, and Practices of Mediocre Programming

    This is my first pass at a list of anti-principles, anti-patterns, and anti-practices that make up mediocre programming.  I’m hoping to refine this list and update this listing based on community feedback, so please leave a comment or contact me to let me know what I’ve missed, and I’ll gladly credit you with a name and a link if you’d like.   Principles Fast Beats Right (FBR) – It’s more important to get something done that probably works, or that works right now even if it will be hard to change later, than to spend time ensuring that it is correct or is well designed.  This is classic “cowboy coder” or “duct tape … more

  • Why not Classic (Legacy) ASP?

    Yesterday I got the following email, which I thought raised some good points that I thought were worth addressing here in my blog in addition to the reply I sent directly. Hi Steve, I've been following your blog (as well as Rob C. and Scott H.) as I look into dipping my toes into MVC. I just read you "How I Got Started in Software Development" and your description of the joys of lightweight ASP development really hit home. So I have a perfect question for you. I've been in the MIS/IS/IT/ICT field for, well, as long as it's taken me to collect all those acronyms. I've been doing lightweight webapp development since the late 90s, starting first in CDML, then … more