Browsed by
Month: September 2009

Fail Fast principle

Fail Fast principle

Recently I received a NullReference-Exception when I called another method from a foreign component. Fortunately I had the source code of this component and I found the following code: [code language=”csharp”] public class AgeValidator { public Dictionary Config { get; set; } public bool Validate(int nAge) { int nMinAge = FindValue(“MinAge”); return nAge > nMinAge; } private int FindValue(string strParameter) { int nValue = -1; if(this.Config.ContainsKey(strParameter)) nValue = this.Config[strParameter]; return nValue; } } [/code] There are several problems with this…

Read More Read More

To be a model

To be a model

Currently I study for a MAS-IT. Last semester came a photograph and asked if he could take some pictures. So I thought nothing of it and I continued discussing with my colleagues about a topic. Today I saw on the page of the Berner Fachhochschule, Technik und Informatik two images with me: And here: That’s funny. Normally I describe models, but now I’m the model.