Category: C#

Task From A Code Test

Earlier this week I took a coding test and the first task in the test was interesting and alittle fun to complete. At the start you are given a text file with integers (one per line) that are used as an input into another process. This process has been failing because of problems with the […]

READ MORE

Registering Types With the SimpleIoC Container

I’ve been kicking the tires on the Command Query Seperation principle/pattern lately. I’ve been using the CQS-Sample as a starting point. So far, the approach to breaking things down into Commands and Queries is pretty slick and much easier to unit test. The interfaces are used for dependency injection with an IoC container like SimpleIoC (which comes with MVVMLight). […]

READ MORE

Simplifying Switches Using Dictionaries

Have you ever had to write a long series of if/then statements or a giant switch statement that extends for a page or two of your code? Want an easy way to increase the readability of your code, increase it’s maintainability index, and decrease it’s cyclomatic complexity? Let’s see an example problem and then a […]

READ MORE