January, 2009

Swiss SRP

Over on Los Techies, Gabriel Schenker has an excellent post (Real Swiss don't need SRP) showing the Single Responsibility Principle in action - refactoring some existing code from muddled mess to SRP fineness.

Readonly vs. Disabled

Leon Brambrick has a recent post talking about how people make readonly fields less readable.

He’s right – but he’s missed something too.

New Year, New Look

With the arrival of a New Year, I thought it was time to update the look of the site a little. After a couple of weeks effort and tweaking, you can now see the result - hope you like it!

The importance of Attitude

I’m finding that attitude and intent make an important contribution to the code I write.

For example, though I currently use NUnit as my testing framework, and Rhino.Mocks for mocking, I’m not always using these to write tests or mocks.

Confused? Let me explain.

Going to Oslo

I’ve started looking into Oslo, the new model driven architecture from Microsoft.

In many ways, Oslo looks promising – finally, a way to move to a higher level of abstraction. If they do this right, they really could achieve their goal of improving developer productivity 10x.

What I’ve seen so far does raise some interesting questions though …

On NNPPs

Jay Fields has a recent post “The Cost of Net Negative Producing Programmers”, in which he laments the high impact of NNPPs and the lack of any industry structure that encourages them to leave the field.

I find it reasonably depressing to find that, in many ways, I agree with his argument.

Worse, I’d go so far as to suggest that a similar problem exists in other parts of the ICT industry.

Some examples from my own experience …

Margin Guides in Visual Studio

To set a margin guide in Visual Studio requires a minor Registry Hack (*)

First, use RegEdit to go to the key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor.

RegEdit Screenshot
RegEdit Screenshot

Next, create a new string value "Guides" with value "RGB(128,128,128) 99" (sans quotes). This creates a gray guideline just after the 99th column.

Change RBGB(r,g,b) to change the colour of the guide; you can create multiple guides by separating them with commas at the end.

(*) Usual warnings apply - stuff up your Registry and your machine is hosed. Take precautions.

Single Reponsibility Principle

I have a draft post explaining the Single Responsibility Principle that I've been working on for the last couple of months. I've just never been able to find a simple way to explain it that's not open to misinterpretation.

I'm going to have to junk that post completely, because it's now obsolete.

Check out this explanation, put together by Brent Brown and posted by Jarod Ferguson:

srp1.jpg

Brilliant!