Browse by Tags

All Tags » Software Development Guidance » Design/Coding Guidance (RSS)

IDisposable and Class Hierarchies

In my previous post , I showed how the Dispose Pattern is effectively obsolete. But, there’s one area that I didn’t really cover. What do you do when you want to create a class that implements IDisposable , doesn’t implement the Dispose...

The Dispose Pattern as an anti-pattern

When .NET first came out, the framework only had abstractions for what seemed like a handful of Windows features. Developers were required to write their own abstractions around the Windows features that did not have abstractions. Working with these features...

Leave predicting to meteorologists and fortune-tellers

There’s a couple of good axioms about software design: You Can’t Future-Proof Solutions and the Ivory Tower Architect You Can’t Future-Proof Solutions basically details the fact that you can’t predict the future.  You can’t possibly come up with...

Thread synchronization of non-atomic invariants in .NET 4.5

Now that we’ve seen how a singular x86-x64 focus might affect how we can synchronize atomic invariants , let’s look at non-atomic invariants. While an atomic invariant really doesn’t need much in the way of guarding , non-atomic invariants often do. ...

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...

If You’re Using “#if DEBUG”, You’re Doing it Wrong

I was going through some legacy code the other day, refactoring it all over the place and I ran into many blocks of code wrapped in “#if DEBUG”.  Of course, after a bit of refactoring in a RELEASE configuration these blocks of code were quickly out...

Criteria for Success

I was having a  conversation with a client recently and the topic of “11th hour” came up.  He seemed to think it wasn’t possible to deliver a software project without some sort of “11th hour” panic.  I disagreed I disagree because I’ve...

Mapping to Your Database is a Private Affair

Your mapping to your database is generally coupled to the design of the data and the mapping provider's ability to implement a relational or non-relational model.  This means your ORM influences the design of your mapped classes and/or the design...

Deep Dive on Closure Pitfalls

I've blogged about closures in C# and their pitfalls before. I keep seeing problems with closures--more now that lambdas expressions and statements ("lambdas") are becoming more widespread--even with experienced developers. So, I'd thought...

The Difference between an Anti-Pattern and a Code Smell

I think the term “Anti-Pattern” is being over used. There’s various definitions for Anti-Pattern like “obvious but wrong, solutions to recurring problems” and “common approaches to solving recurring problems that prove...

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...