February, 2009

Validation and Domain Driven Design

I read an interesting blog post today from Justin Etheredge talking about how Validation should be handled in the context of a system using Domain Driven Design principles.

StyleCop for ReSharper

styleCopForResharper.png

Now this qualifies as a great idea – integrating the code layout enforcement of StyleCop with the dynamic at-your-fingertips goodness of ReSharper: StyleCop for ReSharper 

Definitely something to download and try out, especially since they’ve got automatic fixes for many of the rule violations.

Strange Win.Forms behaviour

Here’s a strange piece of behaviour – a puzzle (with a solution) for you.

Imagine that you’re working with Win.Forms, constructing a resizable layout using a TableLayoutForm as the host.

Is that an Ad?

Am I going crazy? Is that an Advert at the top of my site?

Well, yes, it is - but one in a good cause. Legislation is about to go-live here in New Zealand that will force ISPs to disconnect users (whether personal or business) if anyone makes an accusation of copyright infringment. No proof required, no court case, no verification of facts, no redress for false accusations - in otherwords, Guilty unless proved innocent.

Unit testing with LINQ

At tonight's meeting of the Wellington .NET User group we had two presentations – one on Linq Syntax from Owen Evans, and one on avoiding Cross Site Scripting attacks from Kirk Jackson. Both presentations were informative and interesting, and I learnt a few new things from each.

Owen’s Linq presentation reminded me of a couple of Linq goodies that I wrote recently – so I thought I’d share.

Commenting Fixed

CAPTCHA submission for comments is now fixed, thanks to John and Saleh for bringing the problem to my attention.

Listening time

Shorter than some, longer than many, my 1 hour commute to and from work each day used to be down time. Over the last three or four years, I’ve found that podcasts are a good way to fill the time.

Scott Hanselman has just posted Hanselman's Super Karate Death Car List of .NET and Software Podcasts and suggested that others do the same … here’s what occupies my commute.

Struct Weirdness

Over on StackOverflow, saw an interesting question that taught me something new about C# 3.0.

Be A Better Developer

Leon Bambrick has an interesting post 8 ways to be a better programmer in 6 minutes. Even if you don’t agree with Leon’s tips, they’re interesting, and thought provoking.

In the same spirit, here’s some more tips for you … though some of these might take more than 6 minutes to do.

Using Lambdas as Event Handlers

Of all the new features in C# 3.0, Lambda expressions have to be one of my favourites.

One non-obvious way that they can be used is as event handlers, in just the way that anonymous delegates could be.

Upgrades that (mostly) Work

Recently, I upgrade the version of Drupal that I use for this site – a process that went completely smoothly, to my relief. (Yes, I tried out the upgrade on a test system that mirrored production first, but I always get nervous when tinkering with a production system, even if it’s a tested process).

Tonight, I upgraded Windows Live Writer from the beta version I’ve been using for a few months to the release version now available from Live.com.

Drupal APIs

Over the past couple of weeks, I've started working on understanding Drupal theming.

My first goal was to change the presentation used for downloading attachments on both this site and on another that I maintain. Each site required different changes, and in fact runs a different Drupal version (sigh!).

I'm going to blog later on how the process evolved, but some initial observations are worth making.