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

introducing-Robot-Turtles-to-a-two-year-old

Introducing Robot Turtles to a Two-Year Old

Robot Turtles is a great board game that aims to teach early programming skills to young children.

I participated in the Kickstarter launch back in September knowing that my youngest son would be too young to play for some time.

I didn’t think he was ready developmentally. So when it was time to play Robot Turtles with my older son, I would frame it as something my younger son could play when he turned three. And he was okay with that.

But now he’s almost three (at the end of this month). I gave him the option to play with us tonight and he was very excited to join in.

I am documenting my onboarding strategy and results in the hopes that it helps someone else introduce the game to their little one.
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

Getty Free Images Attribution Still Susceptible to Circumvention

PetaPixel recently posted an article about a flaw in Getty’s new free image embed control.

The presented method was based on resizing the frame height so that the attribution would fall outside the client area of the iframe. Getty quickly addressed the issue by scaling the image width relative to the height.

However, there is a more effective way to circumvent attribution; a way that Getty has no control over — short of revoking your access to the image or sending a C&D letter.

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