Failure is inevitable


The importance of testing

Grad school just started back for me today, so this is going to be a short post.  Hopefully I'll still be able to do three (hopefully high-quality) posts a week once things stabilize. I ran into an issue today where one of the systems that I maintain at my day job had been rendered completely unusable by a series of code changes that had been committed over the last month.  The particular system in question is mostly a web forms app, so it's a bit difficult to unit test and therefore has very low test coverage.  Because of that, it falls to the developer making changes to thoro... [More]

How to run a software development company (INTO THE GROUND) - Part 3

I am really, really glad it is Friday.  It's been one of those really, really (not) awesome weeks.  Anyway, here's how you, too, can successfully take your software development ship and crash it into an iceberg, killing everyone on board!  In a change of pace, I'm going to start putting a "why you shouldn't do this" section at the end that explains things with a bit less sarcasm. Never. Fire. Anyone. Firing.  Even the word sounds bad.  As you pilot your software development company to guaranteed fortunes the likes of which haven't been seen since the dotco... [More]

Using LINQ to elegantly initialize arrays

**CORRECTED 8/26/08: Apparently my initial code did not work correctly.  This appears to be a widespread mistake, as I found about a dozen other people doing the exact thing I was doing with reference types.  Corrected code and the non-working example are below.** I am tired of writing array initialization code that looks like this: 1: TermVector[] vectors = new TermVector[6]; 2: for (int i = 0; i < vectors.Length; i++) 3: { 4: vectors[i] = new TermVector(); 5: } I couldn't believe that there wasn't a better way to... [More]

Easy testing via ActiveRecord and SQLite

As I've mentioned, I'm a big fan of ActiveRecord.  I like having all of my data-access related code stored in exactly one place.  There's no separate mapping file to maintain, and if I'm really lazy, I can even let ActiveRecord generate the schema for me (yeah, that doesn't really work once you have to worry about migrating databases between schema versions, but there's probably a way around that).  Testing code that depends on my ActiveRecord object model can be complicated.  The tests require that the underlying database be in a known, co... [More]

Using LINQ with ActiveRecord

One of the new projects at my day job is using ActiveRecord for data access.  I'm a huge fan of ActiveRecord (and of all things Castle), but I like the fact that LINQ makes it very easy to do ad-hoc queries with a compile-time safety net.  Unfortunately, ActiveRecord does not support LINQ out of the box.  Luckily though, ActiveRecord is built on top of NHibernate, and LINQ support is available via NHibernate Contrib, at least if you aren't afraid to venture into the source.  If you follow the steps below, you can build your own LINQ provider for ActiveRecord and get the syn... [More]

White spaces could shake up broadband access...

Opening up white spaces for broadband Internet access could drastically shake up the telco's comfy stranglehold on US consumers.  Google has thrown their weight behind the idea today with the launch of  I like what they've done for a couple of reasons.  They are very up front about why they support the technology (it potentially means more money for them), and their site does a good job of explaining the issue in simple terms. As someone who is stuck on a mountain and can only get 1.7Mb DSL, I wholeheartedly support the opening of the white spaces.  I... [More]

How to run a software development company (INTO THE GROUND) &ndash; Part 2

It’s Friday, so it’s time for part two of the on-going series of how NOT to run a successful software development company. Don’t pay your workers Times get tough.  Maybe a contract didn’t get paid on time.  Maybe someone made a gianormous accounting error (to the tune of $20,000).  Hell, maybe you needed a new LCD TV for your bathroom.  In any case, the coffers are dry.  But don’t fret!  You don’t have to actually pay your workers!  Dedicated personnel don’t do their jobs for the money, so they won’t even care.  And everyone has at least four or five o... [More]

Using Windows Live Writer on Windows XP x64

It looks like Microsoft, in their infinite wisdom, has decided that the Windows Live suite of tools shouldn’t install on Windows XP x64.  Apparently we don’t need to do things like manage our blogs or something.  Fortunately, there is a way around this: just install the technical preview release. Brought to you by Windows Live Writer, running on Windows XP x64.

Top 5 Usability Lows of Mac

Smashing Magazine had a post yesterday called Top 10 Usability Highs of Mac OS. The article makes some great, valid points: Apple has a lot of things right in Mac OS.  They also have gotten a lot of things right with the Mac hardware.  However, they also got a lot really wrong.  As someone who has owned a Mac for about three weeks, I feel perfectly justified in criticizing Mac OS,  so here's my own Top 5 list (it's only 5 because I'm in a hurry and don't feel like writing a lot today): 1. Lack of Intuitiveness. Yeah.  Epic FAIL here.  Despite what Juul Coolen... [More]

Comments FTW!

Can you tell me what this const represents? 1: private const int MINIMUM_WORD_OCCURRENCES_TO_INCLUDE_DEFAULT = 1; What about if I include this helpful comment? 1: /// <summary>The Default Minimum Word Occurrences To Include</summary> 2: private const int MINIMUM_WORD_OCCURRENCES_TO_INCLUDE_DEFAULT = 1; The point, kids, is that comments should provide some insight into the variable (or method, or block of code, whatever).  This comment would have been just as useful had it been replaced with "I LIEK PERPLE!"... [More]