Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Microsoft Fakes (formerly Moles)

Problem: You are writing unit tests that involve a dependency on a 3rd party concrete class. Unfortunately there are no interfaces, nor are the methods/properties defined as virtual. Solution: Microsoft Fakes (formerly Moles) Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with stubs or shims. These are small pieces of code that are under the control of your tests. By isolating your code for testing, you know that if the test fails, the cause is there and not somewhere else. Stubs and shims also let you test your code even if other parts of your application are… Read More »Microsoft Fakes (formerly Moles)

Idiotic Interview Questions

Interviews questions always seem to be a topic that comes up frequently at a developer peer group I attend and while at work.  In a recent .NET Rocks! podcast, they touched on this topic and brought up the Fizz Buzz Test.  We have all been in interviews where we are given some ridiculous programming question, that is “intended” to show the interviewer your problem solving skills.  Or maybe (I think likely) they ask these questions because they are the stock questions, and everyone asks them.  It’s like asking someone for their strengths and weaknesses.  Do you really think people aren’t… Read More »Idiotic Interview Questions