BlogEngine.NET ships with an extension that automatically highlights source code in blog posts. All that is required is that the source code block is surrounded with [code:lang][/code] tags. The extension will markup the code with CSS classes and the default theme includes a default color scheme for... [More]
Answer to Fredrik Normén on Defensive programming and Design by Contract on a routine level. "Design by Contract is about creating a contract between the client and the supplier. The idea of the Design by Contract theory is to associate a specification with every software elements. This specificati... [More]
Abstract Refactoring Test coverage Proceeding with a solution there is no way of chang Abstract Refactoring Test coverage Proceeding with a solution there is no way of changing the implementation of the GregorianCalendar class to get the correct behavior so we have to go ... [More]
Abstract Refactoring Our task at hand is to get as much coverage as possible when it comes to error Abstract Refactoring Our task at hand is to get as much coverage as possible when it comes to errors in the implementation. The ideal coverage is one where all dates are tested. The problem is that ... [More]
AbstractSo, now we make up another test. Looking at the calendar we see that new years eave 2001 sho AbstractSo, now we make up another test. Looking at the calendar we see that new years eave 2001 should also belong to the first week of 2002 according to ISO 8601. We write the test much like the pr... [More]
The implementation of weeks according to ISO 8601 (used e.g. in Sweden) is faulty in .NET Framework. The implementation of weeks according to ISO 8601 (used e.g. in Sweden) is faulty in .NET Framework. In particular the GregorianCalendar and CultureInfo classes are faulty when it comes to ISO 8601.S... [More]
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.