Coding and Dismantling Stuff

Don't thank me, it's what I do.

About the author

Russell is a .Net developer based in Lancashire in the UK.  His day job is as a C# developer for the UK's largest online white-goods retailer, DRL Limited.

His weekend job entails alternately demolishing and constructing various bits of his home, much to the distress of his fiance Kelly, 16-month-old daughter Amelie, and menagerie of pets.

TextBox

  1. Fix dodgy keywords Google is scraping from my blog
  2. Complete migration of NHaml from Google Code to GitHub
  3. ReTelnet Mock Telnet Server à la Jetty
  4. Learn to use Git
  5. Complete beta release FHEMDotNet
  6. Publish FHEMDotNet on Google Code
  7. Learn NancyFX library
  8. Pull RussPAll/NHaml into NHaml/NHaml
  9. Open Source Blackberry Twitter app
  10. Other stuff

Adventures With NancyFx - NHaml ViewEngine Integration Part I

It's been a long time coming, but at last NHaml4 (the downright awesome .Net port of the equally awesome Haml view engine) is getting mature enough to start putting to use. Before I officially release NHaml4 onto the world, I want to make sure that the new engine's flexible enough for general use, so I'm looking at integration with both MVC.Net and (my favorite of the open source web platforms) NancyFx as "must haves" before the release.

NancyFx was actually the platform that initially sparked my interest in NHaml, I never seem to stop hearing praise for its codebase, so let's see how easy this integration's going to be.

More...


Permalink | Comments (1)

Liverpool Sea Odyssey - Low Tech Win

A first for me, a non-techie blog post! But boy-oh-boy, if anything warranted a mention on my blog post over the last couple months this has got to be it.

After a few months stuck in work, problems with home renovations, health problems in the family, and a fair bit of all round stress, I've just had the most awe inspiring and thought provoking weekend I can remember, spending a weekend in Liverpool in the company of Royal De Luxe's Giant Sea Odyssey.

For those of you unfamiliar with Royal De Luxe (I'm pretty sure that's actually a burger from Pulp Fiction?), they're a street theatre group based in Nantes, France, who count amongst their cast a 9ft tall dog, a 30ft tall girl and a 50ft tall deep sea diver. These three characters are basically giant marionette-style puppets, controlled by cranes, a pretty coplicated looking system of weights and pulleys, and the remaining 100-or-so members of the group.

More...


Categories: Family
Permalink | Comments (0)

Migrating a Blogger Blog to Wordpress - A Gotcha for UK users!

Hi all,

I've just spent an evening delving into the wonders of Blogger.com and Wordpress, helping someone migrate their blog from the former to the latter. The process should be straightforward enough, sadly it most definitely was not! In summary, there are two parts to this -  first getting the Blogger data into Wordpress, then getting each page on the old Blogger site to automatically redirect to the correct corresponding page on the new Wordpress site.

In this post, I've already got Wordpress version 3.3.1 installed and ready to go.

More...


Permalink | Comments (0)

How To Test Your MVC3 Model Validation and Controller Logic

Hi all,

Today, I've come across some code that's testing an MVC controller to ensure that the controller responds correctly if the model passed in is invalid. This sounds a good plan - except that you need to be mindful that your controller doesn't validate your model! Your view model is validated by a separate class, the ModelBinder, that fires up just before your controller is executed. This ModelBinder is built into the MVC engine, you can bet that it's been tested a zillion times by a zillion other devs, so you definitely don't want to find some way to test this ModelBinder directly.

So what to do? Let's take a look at the original test, exactly what code we've written, and so what we want to test.

More...


Permalink | Comments (0)

Unit Testing Good Patterns #4 - Know When Not to Test

This week's been aaaallll about automated testing for me. On Monday, I attended Preston Codejo, looking at unit testing in Ruby. I was there as a Ruby novice, there were a couple of TDD novices, so some great discussion around the merits of TDD. My working week has been spent sneaking SpecFlow and acceptance testing into a new project at work, and yesterday I spent a few hours watching one of Uncle Bob's Clean Coders videos with some colleagues. As usual, my DRL posse had some really interesting thoughts around it - more discussion around the merits of testing followed.

And then there's a bit of discussion on Twitter about TDD not being the silver bullet some would tout it, I speak very highly of TDD as a practice. Some would describe me as a bit of a zealot, so in the interest of balance, I want to make a confession.

More...


Permalink | Comments (0)

NHaml - Lessons From Adopting an OSS Project

Hi all,

Some weeks ago now, I blogged that I've adopted the open source NHaml project over at GitHub, I'm now an administrator. I also mentioned that I was looking to get an initial release out sometime in December. Since then I've been beavering away at the thing, we're now most of the way through December, it feels like it's time for a status update.

In this post, I'll be talking a little about the project as I picked it up, lessons learned in my first baby steps adopting an established OSS proect, the decision to go with a (almost) rewrite, TDD and why I feel this is important stuff, and a few other odds and ends.

Incidentally, I in no way whatsoever mean to sound like I'm having a dig at previous contributors to the project, the stuff I'm putting into the project now owes massively to these earlier contributors, I'm trying to evolve as many of their existing ideas as I can. 

More...


Permalink | Comments (0)

An Enterprise MVC .Net Project Template - Part 1 of Many

Hi all,

That time's come again - another project's come along (actually an oooollld project from 6 years back has come around again), and I'm about to fire up Windows Explorer and Visual Studio ready to start dev.

I've done this dozens of times over the last couple of years, but I still remember back in the early days struggling to get to grips with where to put what, where to put my DLLs, my unit tests, etc. So I thought some folks might benefit if I jot down some notes as I go along. This post will detail exactly how I get started with a new Visual Studio project, in this case looking at an MVC project, and all of the things I do before I start cutting code.

By the way, this is the same project structure I use for most of my enterprise level work. I'm going to document this for Subversion users, as I still feel like they're in the majority (and I still suck at Git), so Git or Mercurial users will possibly want to ignore me when I talk about branches and trunks!

More...


Categories: Architecture
Permalink | Comments (0)

An Announcement - I've Adopted NHaml!

Hi all,

A really quick blog post, to make a quick (and for me very, very happy) announcement - I've been given the opportunity to adopt the currently dormant NHaml project, a .Net port of the popular Haml Ruby markup language.

This is the first opportunity I've had to work on an established open-source project such as this, and while what's been built is impressive stuff, there's clearly a lot of work to catch up with the current Ruby implementation! Fortunately I've got a good clear initial target to aim for, thanks to the hugely useful Haml Spec project.

More...


Permalink | Comments (3)

What The Heck's a 'Front End Dev'?

I had an interesting chat with a few colleagues of mine yesterday, and it was on the subject of the "front end dev". The two colleagues in question were a designer, and a good all-round developer, each with 10 years experience in their respective fields. So they've been through the mill.

The subject of JQuery came up, and after a little rumination on things, we kinda agreed that what the web needs, is a new specialism, the front-end developer. So were we right? If you're a dev, is now the time to go for that niche and specialise, if you're a designer, are you going to have to get used to your finely crafted CSS getting butchered by some nightmarish hybrid creature, neither a designer or a fully fledged dev? (A were-dev?)

More...


Categories: Software Industry
Permalink | Comments (0)

Editing JPEG Photos Without Recompressing - Part 2

Hot on the heels of Editing JPEG Photos Without Recompressing - Part 2, I've had a few days to ponder, and I'm back with more thoughts on editing JPEGs without recompression, and maybe with a conclusion. Where we left off, we'd determined that the JPEG compression steps that we'd need to deal with, in decoding order, are:

  1. Huffman decoding
  2. Run-Length Encoding
  3. Zig-Zag scan
  4. Quantisation
  5. DCT transform

We're aiming to do as little of the above as possible, so to affect the image compression as little as possible (if at all).

More...


Permalink | Comments (0)