Browse by Tags

All Tags » .NET Development » Software Development (RSS)

Dependency Injection

Dependency Injection (DI) is a form of Inversion of Control where the instances that one class need are instantiated outside of the class an “injected” into it.  The most common injection is constructor injection.  This is called inversion of...

Automated Testing Isn’t Just for Business Logic

I had a conversation with Kelly Sommers the other day that was partially a short support group session on the annoying tendencies of development teams to completely lose focus on the architecture and design principles of a system and let the code base...

The Rat-hole of Object-oriented Mapping

Mark Seemann recently had a great post that, as most of his posts seem to do, challenges the average reader to re-think their reality a bit. The post is titled “Is Layering Worth the Mapping”. In the post Mark essentially details some of the...

Avoid the volatile Modifier

[Update: 25-Jan-12 5:45 pm; fixed typo] I was reminded recently of the misconceptions of the volatile modifier in C#, and I’d thought I’d pass along the recommendations of other’s that is tantamount to “avoid the volatile modifier”...

“Explicit” Tests with Resharper

NUnit introduced a feature called Explicit Tests (a long time ago, I believe) that basically mean a test is considered tagged as Ignore unless the test name is explicitly given to the NUnit runner. This is useful if you have tests that you don’t want...

Unbind a Visual Studio 2010 Solution from Source Code Control

I was working with a solution that I got from someone else the other day.  When I loaded it up, Visual Studio 2010 informed me that it could not connect to a TFS server at some URL and will open the solution in offline mode (or something to that...

Fluent Builders, Part 1

I’ve seen some conversations about fluent builders as of late, and I’d thought I’d post some information about fluent builders, the principles behind them, the problems they address, and how to implement them. Fluent Builder is a combination of the builder...

Testing Strategies Involving Async Functions

Some things to keep in mind when writing units tests for code that use async methods: You're not trying to test the framework's "awaitability" and you're not trying to test framework methods that are "awaitable". You want...

Visual Studio 2010, Enhance your Jedi Skillz

I’ve blogged about becoming a Jedi in Visual Studio 2008 before . Being a Jedi in Visual Studio means you focus more on adding value to the software you’re working with and less on the process of the IDE you’re doing your work in. Visual...

Using the dynamic Keyword in C# to Improve Object-Orientation

With polymorphism, object-oriented languages allow "...different data types to be handled using a uniform interface". Ad-hoc polymorphism is when you declare multiple methods of the same name but differ by the type of an argument. For example...

Modify VS 2010 Template to Reference System.Configuration

Almost every project I create in Visual Studio, I invariably have to add System.Configuration to the references for that project.  As soon as I want to do much with app.config, I need to use something in System.Configuration.  Well, rather than...

Evolving code over time

Given economics, time constraints, resource limitations, etc.; you can't write all the functionality for a given solution for a single release. Even if you weren't limited by these constraints, you're likely to get changing requirements as...

DevTeach 2009 Vancouver

The schedule for DevTeach 2009 Vancouver has been announced ( http://www.devteach.com/ ). There’s lots of great software development sessions from some of the leaders in our industry. If you’re planning on improving yourself, this is the conference...

A Upcoming Pandemic of Domain Anaemia

There's a well-known anti-pattern called the anaemic domain model[1][2]. This anti-pattern basically says domain entities, chronically, have little or no behaviour (remember, object-oriented design is about attributes and behaviour). It should be...

Pass-through Constructors

Pass-through constructors is a term I use to describe parameterized constructors that have none of their own logic and simply pass parameters to the base class. For example: public class BaseClass { private String text; public BaseClass( String text)...

Becoming a Visual Studio Jedi Part 1

Becoming a Visual Studio 2008 (and often Visual Studio 2005) Jedi In much the same grain as James' Resharper Jedi posts, I'm beginning a series of posts on becoming a Visual Studio Jedi. It involves getting the most out of Visual Studio off-the...

Trials and Tribulations of DataGridView, Column Selections, and Sorting

I had to implement some custom sorting in a DataGridView recently. Essentially, the stakeholders wanted full column selection (like Excel) while still having the ability to sort the data based on a particular column. This particular DataGridView is data...

DataGridViewColumn.Frozen

DataGridViewColumn.Frozen is documented as "When a column is frozen, all the columns to its left (or to its right in right-to-left languages) are frozen as well." Which is nice until you think of the consequences. The consequences being that...

ITSWITCH #1: Answer

Last post I detailed some code that may or may not have something wrong in it.  If you thought InitializeOne and IntializeTwo are semantically identical (e.g. they differ only by performance), you'd be wrong. If you simply ran the code, you'd...

ITSWITCH: #1

A short pop quiz on design/coding in C#...
More Posts Next page »