Category Archives: coding

How to make static legacy code testable

I had the opportunity to work in a team developing and improving a large legacy application. The project had some unit tests already but there was a long way to go in terms of increasing the test coverage. Many internal … Continue reading

Posted in coding, mocking, unittesting | 1 Comment

String.Split() Kwik-e

While I was cleaning up some legacy code I found an overly complex usage of String.Split() in several places: var sentence = "Hello World!"; var words = sentence.Split(new char[] { ‘ ‘ }); If you take a look at the … Continue reading

Posted in C#, coding, Kwik-e | 1 Comment

Linq Kwik-e

Really often I use the Linq extension methods to formulate a query to reduce a set of data to a single value. Most of the time I refer to the First() method for this use case. var fabse = myList.Where(p … Continue reading

Posted in C#, coding, Kwik-e, Linq | Leave a comment