Monthly Archives: September 2010

A DSL For Handling Zero, One, Many

All this talk about refactoring to clean up code and monads to create pipelines has put me on a code composition kick… I wrote this code today: 1: private AddAssetResult HandleAssetFamily(SortContainer container, SystemAsset systemAsset) 2: { 3: AddAssetResult result = … Continue reading 

Posted in .NET, C#, DSL | 7 Comments

Monads in C#: Which Part Is The Monad?

In my previous post on refactoring some code, several people responded in the comments and via twitter that I should look at the Maybe<T> monad as an option. Now, I have to be honest… the potty-humor-teenager in me wants to … Continue reading 

Posted in .NET, C#, Monads, Principles and Patterns | 15 Comments

A Refactoring: Explicit Modeling And Reducing Duplication

A coworker showed me a method that had a series of guard clauses at the top and a series of sequential steps that had to be processed after that. All of the guard clauses and sequential steps were executed the … Continue reading 

Posted in .NET, C#, Principles and Patterns, Refactoring | 9 Comments

Domain Models, Dependencies And Fighting Anemia

For a long time now, I’ve been in the camp that says you shouldn’t have domain entities take dependencies… but at this point I’m having a hard time remembering why. I’m sure I could dig up my old notes and … Continue reading 

Posted in Analysis and Design, C#, Design Patterns, Domain Driven Design, Principles and Patterns | 21 Comments

Intuition And Complexity

I just ran into a situation where I had to describe an easy, but not intuitive process to a coworker. The net result of the conversation is that I realized I would much rather have software or process that it … Continue reading 

Posted in Analysis and Design, Craftsmanship, User Experience | 6 Comments

Moderating Comments, and Apologies

If anyone’s been reading my blog for the last few days, you’ve probably seen the giant comment trail left on my Design and Testability post. After a lot of discussion the LosTechies community and with a few other friends, I’ve … Continue reading 

Posted in Uncategorized | 45 Comments

A Few Thoughts On IoC, An Idea For A different Type Of Container, And A Lot Of Questions

With all the comments on my previous post, there actually is a lot of great insight to be had. I’ve picked up on a few underlying themes and several of the commenters were able to cut through the cruft of … Continue reading 

Posted in .NET, C#, Compact Framework, Pragmatism, Productivity, Quality | 28 Comments

Design And Testability

In the line of business applications that I build, it’s considered good practice to use a test-first approach; Test-Driven Development, Behavior-Driven Development, or whatever you want to call it. Write a test, verify that it fails for the right reasons, … Continue reading 

Posted in .NET, Behavior Driven Development, C#, Community, Pragmatism, Principles and Patterns, RSpec, Ruby, Telerik, Tools and Vendors, Unit Testing | 38 Comments

Knowing when to ask

It doesn’t matter how much experience you have, what your title is, or whether you are considered a leader in the team / project / company. If you don’t know yourself and when you need to ask questions, you’re going … Continue reading 

Posted in Coaching, Management, Pragmatism, Principles and Patterns | 2 Comments