GoodReads – what I’ve read recently

Inspired by my colleaque’s post about best books on web development, I decided to share my list of books about software development on general. I found a good web site for sharing books and reviews, GoodReads. I’ve shared the most interesting books from past few years. Books vary from programming to designing, from project management to team leading, from methodologies to practises. As I believe, that over-specialization kills productivity, I like to have a broad understanding to the craft.

Here’s my list:

Visual Studio 2010 editions

Now that Visual Studio 2010 beta 2 is out, some new information about the packaging of the product is also revealed. Gone is the old jumble of nearly dozen different flavors. Now everything comes in three different products: Visual Studio Professional, Visual Studio Premium and Visual Studio Ultimate. Read the rest of this entry »

Day one at Scanagile

Here are some highlights from the first day in Scan-Agile conference.

Read the rest of this entry »

Agile assists, Scrum saves, testing turns profit – or do they?

AKVA club of HETKY organized a seminar about agile, scrum and testing. It was a two-day cruise from Helsinki to Stockholm and back and there were many speakers from different backgrounds. There was a common (though unplanned) theme – doing agile is not easy. Read the rest of this entry »

What customers expect from their IT-partner?

A while ago I attended an evening organized by Tietotoviikko. They had a few presentations and an ending panel discussion having members from both client and supplier side and also a researcher.
The topics of discussion were IT-suppliers ability to keep their promises, customers’ expectations towards their suppliers and what makes real partnership.
Read the rest of this entry »

Multi-competence required today

Today’s software development is more challenging than ever. Yes, in some part it’s a lot easier with higher generation tools compared to assembly languages, but I claim that requirements have raised even faster than the abstraction level in tooling. Read the rest of this entry »

WordPress MU in action

I previously had three different WordPress installations, and it got a maintenance headache (although upgrades are relatively easy on current WP) and I din’t like fact that I had three different accounts, had to install plugins thrice etc.
Luckily, there’s an edition of WP that allows me to have multiple blog instances on one installation, namely WordPress µ. I already had a MU up and running (in /mu/-directory), so let’s go importing the pages, posts and comments from old WP’s. And it was… well…almost easy. Read the rest of this entry »

Linq to SQL is not dead meat

My old WP got hacked, and this post got deleted. Basically, all I said can be founf from Jouni’s post.

Azure is cheap, Google is cheaper – or is it?

This post also got deleted. Basically, it was an announcement that there already numerous comparison between different cloud vendors and their prices, like here and here.

Mysterious experiences in the world of reflection using TypeDescriptor

In the process of implementing server-side validation for an ASP.NET MVC project using great xVal library, I found an interesting..err.. dare I say bug in the .NET framework. I used xVal and dataannotations on Linq2SQL objects, pretty much following the guidance here. Of course, I wanted the error messages localized and luckily, the ValidationAttributes have properties called ErrorMessageResourceName and ErrorMessageResourceType so it shouldn’t be a problem.

Following eXtreme Programming principles, I wanted first to have it work doing the simplest possible solution. Just add a plain required attribute and test. Voilá, it works! Great, so let’s add the localization in place. I added the attribute properties and suddenly the validation didn’t work anymore. Why is that? After close examination with debugger and Reflector I found that:

  • According to reflector the attributes are there and their properties are correctly set
  • According to VS debuggerTypeDescriptor.GetProperties(myModelObject).Cast().ToList()[0].Attributes doesn’t contain the RequiredAttribute!

That’s interesting. No exceptions were raised, no error messages were given. The attribute was plain missing and thus validation didn’t work.

OK, let’s try it another way. Inspect the object using ordinary reflection methods using the following code:

foreach (var pi in instance.GetType().GetProperties())
 Console.WriteLine(“Propertyname: {0}\r\n “, pi.Name);
 foreach (var a in pi.GetCustomAttributes(true))
  Console.WriteLine(” “ + a.GetType().ToString());

This code raised runtime exception “Unhandled Exception: System.Reflection.CustomAttributeFormatException: ‘ErrorMessageResourceName’ property specified was not found.” Whaaat!? I just checked that it is there. Reading the stacktrace more closely, I found ystem.InvalidOperationException: The resource type ‘MetadataTest.ModelValidationResource’ does not have a publicly visible static property named ‘XXX’.

Ok, so the resource should be public? Indeed, resources are generated as internal by default. Luckily the resource editor allows me to set the access modifier as public. Let’s retest. Now the new code goes through correctly. How about the code using TypeDescriptor? Now it works too! So, a few things to remember when using localized model validation

  • Remember to set resources as public
  • Do not trust TypeDescriptor as it silently sucks all exceptions and errors

I guess I need to ask Microsoft whether this is by design. Basically this kind of errors should never be ignored.