Home » 2012 » April

Monthly Archives: April 2012

Just Observe

software-development-2-logo

One of the most common instincts of a developer when starting on a new team is to look at the way the application has been designed and find ways that it can be done differently. Most often ‘differently’ means that a pattern used in a previous project will be favoured and while I think it’s good to make use of ...

Read More »

Using IDisposable to write cleaner code

csharp-logo

Just before I start I should mention here that this is not a new idea and there is a good chance that you have already seen and used it. This is a very simple trick that helps simplify the code that requires scoping logic and prevents unnecessary mess and complication: So I thought I’d share it here just in case ...

Read More »

Reclaiming the ‘501 Developer’ manifesto

agile-logo

I’ve recently found myself in a bit of conflict over how I feel about this post outlining a 501 developer manifesto, aimed at those who choose to avoid making work run their life by stopping their professional life at 501 sharp. The term isn’t new, it’s been used by Scott Hanselman to describe developers who’s enthusiasm turns off at 5:01pm. ...

Read More »

Getting the public static readonly strings and public const strings (and their values) from a class

csharp-logo

Quite a few projects have one or more classes with with a bunch of public const stringor public static readonly string values. Use const when things are really constant (like registry configuration keys), use static readonly when – upon change – I do not want to recompile dependent assemblies. Many people recommend static readonly over const. Having members in stead ...

Read More »

Predicting the Mobile Future

software-development-2-logo

Many people have been asking me about my predictions for the future as far as the mobile platforms go. I thought I would take a moment to write up a blog post detailing out what I think we will see in the next couple of years for mobile phones and tablets. Windows 8 changes everything Or at least it has ...

Read More »

Beware of big Task Parallel Library Operations

csharp-logo

Take a look at the following code: class Program { static void Main() { var list = Enumerable.Range(0, 10 * 1000).ToList(); var task = ProcessList(list, 0); Console.WriteLine(task.Result); } private static Task<int> ProcessList(List<int> list, int pos, int acc = 0) { if (pos >= list.Count) { var tcs = new TaskCompletionSource<int>(); tcs.TrySetResult(acc); return tcs.Task; } return Task.Factory.StartNew(() => list[pos] + acc) ...

Read More »

Effectiveness of Teams

agile-logo

Agile places an emphasis on the importance of the team. The team make the decisions: what do we work on today, how do we tackle our constraints, even who should be in the group. But yet some research seems to suggest that individuals are more effective than teams. For example in “59 seconds” Richard Wiseman questions the effectiveness of brainstorming ...

Read More »

Simple MVVM Toolkit versus MVVM Light Toolkit

mvvm-logo

DISCLAIMER: This comparison was performed around a year ago. Since then the MVVM Light Toolkit has been updated, so this article might not accurately reflect its features. Now that I’ve released Simple MVVM Toolkit version 2, people are starting to ask how it stacks up against some of the other MVVM Toolkits out there. (MVVM, which stands for Model-View-ViewModel, is ...

Read More »

BDD to the rescue

software-development-2-logo

BDD can help you in more than one way. First and foremost it removes the ambiguity from the requirements; but taking it a step further could give you a lot of significant benefits. Programmers are not best at communicating. It is even beautifully argued that “Sometimes, The Better You Program, The Worse You Communicate“. My favorite programmers’ joke A woman ...

Read More »

Performance oriented .NET XML and JSON serialization

json-logo

Microsoft .NET framework provides multiple out-of-the-box data serializers for data transformations. The most famous one used since .NET 1.0 version is XmlSerializer, while one that has got more famous since .NET 3.0 framework is DataContractSerializer. But they are not the only two serializers the framework offers. So in this essay, let’s see the different serializers .NET framework offers and how ...

Read More »