September 2008 Blog Posts

Colin's Unscientific Metric To Determine When Tools Are Working Adequately

When the tools I use are having issues I tend to check incessantly for updates. Sometimes multiple times an hour (generally while waiting on said tools). When they're working well this drops to every couple of days, if I remember. Currently checking every few days. Things are good in the tool world right now. Which means it's time for a new shiny, buggy productivity enhancer...

posted @ Friday, September 26, 2008 7:14 PM | Feedback (0)

Taking Responsibility

A large part of writing software is the management of resources. In a garbage collected environment a great deal of the management of memory is handled by infrastructure. This can lead to issues when developers fail to account for unmanaged elements and the restrictions of the garbage collector. Ultimately this is a question of responsibility. When a software element creates a resource then it has a responsibility to handle cleanup of this resource. In the majority of cases it is appropriate to let the garbage collector handle this cleanup. The subset of resources that require explicit action to be...

posted @ Wednesday, September 24, 2008 10:22 PM | Feedback (1)

Good news on the .NET 3.5 SP1 front

Scott Hanselman discusses how they're going to push it to Windows Updates and covers how they'll fix the issues. All this is of course contingent on them actually fixing the issues, but announcing a plan to do so is a good start.

posted @ Wednesday, September 24, 2008 7:15 PM | Feedback (0)

Upgrading MSTest projects from VS 2005 to VS 2008 - Problems with Expected Exceptions

When updating a solution from Visual Studio 2005 to Visual Studio 2008 I encountered a rather weird problem with test projects. The tests would all pass as expected except for those that specified an expected exception using ExpectedExceptionAttribute. The resolution turns out to be fairly simple. In upgrading the project the conversion wizard does not change the version of the test assembly that the project references. It's left referencing 8.0.0.0 instead of the correct 9.0.0.0. Everything still compiles and the test runner will correctly identify test classes and methods. It just won't recognise the ExpectedExceptionAttribute. Deleting the reference to...

posted @ Tuesday, September 16, 2008 9:24 PM | Feedback (0)

On not overreaching and the need to do something well

Recently a couple of different flawed software products (both games, but that's not central to my point) have made me think about why we as users will accept some flawed software products but not others. Ultimately I believe this comes down to a question of overall utility (in a game context, is it more fun than, say, staring at a wall). This means for software that there needs to be something the software does well for us to look past the flaws. On the one hand consider Mass Effect. The XBox 360 version I have has numerous flaws, including...

posted @ Thursday, September 11, 2008 9:32 PM | Feedback (0)

Pushing the boundaries of Science

I'm a big fan of science. I'm under no delusion that I personally am a scientist, but I applaud those of you who are. That said... this is cool. But is it science? Surely not until it can manage whales.

posted @ Thursday, September 11, 2008 8:21 PM | Feedback (0)

Small Code Improvements Part 1: Variable naming

The name you give something conveys information about how you think about it. A properly chosen name makes the intended use of an item obvious without having to examine the context of its use. A poorly chosen name conveys no information or (worse) is misleading. Variable names are an area where bad names proliferate with mad and depressing abandon. These names are amongst the most often created and also tend to be amongst the most badly selected. The following are some of the problems I've seen with variable names: Hungarian Notationised Hungarian Notation is thankfully...

posted @ Thursday, September 11, 2008 8:13 PM | Feedback (0)

Small Code Improvements Part 0

Having not blogged in some time, I've decided to start a series of posts discussing small improvements developers can make when writing code. These are things that take little time to do (especially with decent tooling) but cumulatively have a large effect on the quality of the code. The kind of improvements I'll be discussing are things that developers can add to new code, but more significantly are changes that may be made to existing code as it is altered. The general approach is to leave each code file in a better state than the one you found it...

posted @ Thursday, September 11, 2008 6:58 PM | Feedback (0)