Recent projects

Some stuff I’ve been working on lately (apart from work projects or games):

I created a new plugin for Media Browser Server, meant to force the creation or updating of local metadata files for items in the media library. This plugin is pretty raw and currently only available as source code on GitHub, but it provides the functionality I needed to keep an update of Media Browser from early in the year from blowing up parts of my library. I don’t know if I want to try and get this functionality added to Media Browser itself or just kept as a plugin, but it’s good to have the ability to schedule a recurring task to ensure that metadata files are kept up to date in case the MB devs decide to make more changes to how folders are structured.

I also set up a repository on GitHub for one-off tools that I write to help me out here and there. Currently there’s only a single project in the repository, a console-based file system monitor, but I expect that I’ll also be pushing up LINQPad scripts, helpful batch files, MSBuild projects, and other hacks and utilities I put together and don’t want to lose. The tool currently in the repo, DirectoryMonitor, supports watching multiple different paths, and can filter based on filename wildcards (for example, just files matching *.xml in each path). This one might be worthy of expanding more fully, as well.

Finally, I needed to bring back NUnit output support for 2.0 so we could use the latter at work with Bamboo. This was mostly just pulling up an older, 1.9 era file, and updating it, but now we’re able to run tests automatically as part of our CI build process at work. I actually blogged about that on the Northcloud website, detailing the steps needed to get this working by using a trick of how MSBuild prepares and runs Visual Studio solutions. For 2.0 RC4, the NuGet packages for test runners are changing, so I’ll need to update my article some time this week.

There’s a couple things coming down the pipe, as well:

I’ve been on-again off-again writing a blog post for months now, detailing a toy encryption algorithm I put together for fun. Or more correctly, one that I’m still putting together alongside the article. It’s something that I expect that a half-decent cryptologist could crack in a couple of hours with nothing but pencil and paper, but it’s been an interesting learning experience so far.

I’m also writing another blog post for the Northcloud website, about my experiences with software technical design and the SOLID principles. I’m not sure when it’ll be finished, but it should be published by the end of the Month.

Last but not least, I’m starting the tech design for a new version of MoodTracker, built as a Windows universal app. My big problem with this, though, is that universal apps don’t have access to SQLCE, meaning that existing users will not be able to simply upgrade if they want to keep their existing data. This problem is a bit of a pain in the ass, but can probably be solved by releasing an intermediate update for the existing app on Windows Phone 8.x to migrate the database to SQLite, and then release the actual MoodTracker 2.0 some time later so that most or all users don’t suffer any data loss.

One last thing: I just found out about a great little package from Microsoft that pools MemoryStreams. This’ll certainly help me out with one of my current work projects, since it uses a lot of memory streams with different lifetimes. Microsoft.IO.RecyclableMemoryStream is definitely going to be put to use here.


An alternate US-International keyboard layout

The default US-International keyboard layout for Windows isn’t exactly my cup of tea. Primarily there are issues, in my mind, with regard to composing keys, but in addition to that there are other characters I’d like to have available in a US-International layout. I put together this particular layout a few years ago, but it’s mostly just languished, occasionally shared with friends or other developers through email or sometimes Dropbox.

Anyway, I’ve done a rebuild, and provided the layout as an installer package or 7-Zip archive for anyone interested. The keyboard layout source file is now also available on BitBucket, in case anyone wants to make their own further changes.

Read more »


Using TinyIoC with Common Service Locator

For a recent project at work, I had the opportunity to use TinyIoC, a single-file IoC container implementation, for a command line program used for quality assurance testing of images. The QA testing itself was in a separate assembly, written for an earlier, WPF application that used MvvmLight and SimpleIoC. The thing is, the assembly which actually did the work was written with service location and dependency injection in mind. I didn’t want to have to add MvvmLight to the command line app just to get SimpleIoC, so I added TinyIoC via NuGet instead, in hopes that I could just use that.

The thing is, that work assembly was relying on Common Service Locator (i.e. Microsoft.Practices.ServiceLocation) to get services both from itself and provided by the assemblies that used it. And TinyIoC doesn’t come with an adapter for Common Service Locator. Fortunately, writing up an adapter isn’t that difficult; you merely need to supply a class implementing IServiceLocator and have that class map the interface’s calls to methods on your container. The following Gist provides an adapter implementation for TinyIoC:

There’s not much else to it but this. Of course, to actually put it to use, you’ll need some code to let CSL know to use TinyIoCServiceLocator – and, of course, register your services with the container:

Voila, TinyIoC and Common Service Locator, hand in hand for your next application.


50,000 words, no waiting

2013-Participant-Facebook-ProfileI am a glutton for punishment. As my co-workers and I go into maximum overdrive for November, I am once again making an attempt at NaNoWriMo! My 2007 attempt, Trollfane, wasn’t completed (and didn’t even reach 10,000 words), in 2008 real life interfered in bad ways, and for 2009-2012 I just never got around to it at all. But it’s 2013, I’m back, and this time it’s personal going to be different.

Unfortunately I’m still working on my plot. Oops.

Read more »


I don’t know when to tell myself to stop.

Author H. L. Mencken Reading at His DeskWith all the stuff going on right now (new job, ongoing projects, Toastmasters, etc.) I’ve decided that I’m going to give NaNoWriMo a shot again this year. I had tried this once before, back in 2007, but I didn’t even make it to ten thousand words (never mind the 50K goal that NaNoWriMo pushes). Well, here we go again, and hopefully this time I’ll do a much better job of preparing. Read more »