Category Archives: Software Development

Visual Studio Javascript AMD Unit Testing

Unit Testing AMD-Style Javascript In Visual Studio

I’m currently working on a new MVC 5 client/server project. This project is an SPA (single-page application), which means the amount of Javascript client code easily dominates the amount of C# server code. In order to keep all that Javascript manageable, I’ve been writing AMD-style (asynchronous module definition) Javascript for use with Require.js. Unfortunately, unit testing AMD-style Javascript in Visual Studio doesn’t get nearly as much attention as does unit testing C# code. But the growing body of javascript code with absolutely zero test coverage was beginning to concern me. I decided it was time to address the situation.
Continue reading

Alter Table in Microsoft SQL Server Express

How to Alter a Table in Microsoft SQL Server Express

SQL Server Express is the free edition of Microsoft’s excellent database server. Understandably, Microsoft chose to cripple the free version to create some differentiation between product tiers.

There’s one cripple, however, that makes no sense to me. Microsoft chose to disallow the use of ALTER TABLE statements. But why block these statements when the workaround is so simple…
Continue reading

Solving a Robot Turtles maze

Learning to Code F# with Robot Turtles

Robot Turtles is a game designed to teach programming fundamentals to young children. I purchased a copy through the Kickstarter launch and have been playing it since with my four-year old son. He loves the game and quickly unlocked all the levels up to “Play 3.”

At the same time, I’ve been intending to learn F# for a while…
Continue reading

TarHeader

SharpZipLib Tar Header Checksum is Invalid

I had to write some code recently that opens a .tar.bz2 file, modifies the contents, and then repackages back into a .tar.bz2. The fun and games ended when I discovered this obscure showstopper: ICSharpCode.SharpZipLib.Tar.TarException: Header checksum is invalid.

The following is an account of how I got here and my thought process while solving the problem.
Continue reading

puzzle pieces

Refactoring C# Data Access Code

Don’t Repeat Yourself is a well-known Computer Science adage. Sometimes, however, it’s too convenient to just repeat some code now and deal with it later. But eventually that practice will cost you. Maintaining multiple copies of code becomes a nightmare when a bug needs to be fixed or new features need to be added. It’s especially bad when many people are working on the code and don’t realize other copies exist elsewhere. Ugh.
Continue reading

lightroom-develop-module-no-mouse-wheel

Hacking Adobe Lightroom to Add Mouse Wheel Support

I fell in love with Photography a few years ago. Shortly after that I found that Canon’s suite of tools (primarily Digital Photo Professional) was absolutely terrible for editing and managing photos.

I briefly used (and loved) Picasa for it’s organization capabilities (geo-, keyword- and face-tagging en masse). But Picasa–at the time, anyways–was very weak on editing capabilities. A friend recommended Lightroom 3 and I haven’t looked back since (I’m now on v4.4).

Lightroom isn’t perfect, however. It has a few usability issues. One of my pet peeves is that Lightroom for Windows doesn’t support the mouse wheel. I’ll reflexively scroll down… but nothing happens. This drive me crazy.
Continue reading