Tip of the day: Double question mark – Mikael Söderström

This tip on using the double-quotation marks in C# helped me a bit today when it came to integrating new code for an ASP.Net web application with legacy data access code that I was unsure about the quality of. The data access code that I was referencing  may or may not have null value checking, and there was no time because of an impending deadline to do code-review or quality control revision on it, but by using the ‘??’ check on values returned by it and some constant parameter values hydrated by web.config appSetting values II was able to implement default behaviour in my code for objects which did not get what was expected from the data access layer.

Of course this is just a band aid. The solution really lies in cleaning up that misbehaving code and defining standard contracts for behaviour between tiers that all the software team agrees to and which consistent code reviewing will reveal deviations from at earlier stages before integration, and perhaps the whole team becomes better developers because of it since we’re discipling ourselves on good practices for writing quality code.

Nitpick on Spark View Engine’s Drupal powered website

The getting started guide and the website themselves are part of a default-themed Drupal site, and as such trying to do a simple thing like log in using my Gmail address as my OpenId login encountered that particular Drupal bug. Luckily I host this blog at WordPress, and WordPress can be used as an OpenId trusted authenticaton provider too.

These bugs are so totally fixable, having them there still doesn’t help to give credit to the great idea behind Spark View Engine which is to “allow the html to dominate the flow and the code to fit seamlessly”.