TagClean Code

Book review: Code Simplicity by Max Kanat-Alexander


Target audience: developers Urs’ comment: A short, simple book about what makes software complex, how to prevent that and therefore keep software simple. This book contains rules and facts about software regarding code simplicity. The problem of the book is that either you probably know most of its content or you think that it doesn’t work anyway (I got this impression while reading through the reviews on Amazon). Anyway, I think it is worth the time and helps to reflect on...

Clean Code Cheat Sheet (V 2.4)


I updated my clean code cheat sheet. This time there are just minor changes: Principles: mind-sized components Class Design: do stuff or know others, but not both Maintainability killers: tangles Refactoring patterns: refactor before adding functionality, small refactorings removed duplication regarding one test asserts one thing TDD principles: Test domain specific languages fixed a bug in the ATDD/TDD cycle (run all acceptance tests) If you miss something or think that there is something just...

Effective teams: Always releasable


This is the fifth post in a series about what makes a team effective. Effective means, the team does the right thing to reach its goal. Your code prevents doing the right thing I often see teams that want to do the right thing but can’t. Their software won’t let them. This is caused by lots of loose ends in the source code. Everything is begun but nothing is finished. There are simply too many open tasks. Or there is a lot of technical debt present. Before the team can do what it...

Clean Code Cheat Sheet


There is an updated version at It took me about one and a half year to update my cheat sheet about clean code and TDD. But now, it’s here. The cheat sheet has grown quite a bit and now contains principles, patterns, smells and guidelines for clean code class and package design TDD – Test Driven Development ATDD – Acceptance Test Driven Development Continuous Integration I had to re-layout the sheets because maintenance became a nightmare (yes, very ironic). Download: Clean...

How to find misplaced or misnamed unit tests with NDepend


In my current project, we do a lot of refactoring to keep the source code as simple and understandable as possible. This involves a lot of renaming of classes and moving classes between namespaces to structure the code in a better understandable way (here is explained how we structure our code). Sometimes, this results in unit tests not renamed or moved along with the production classes they test.
Therefore, I wrote some NDepend queries that show us these misplaced or misnamed test classes.

Structure your code by feature


cross-post from bbv blog
When software projects grow both in age and size the developers often struggle with the structure of the code. It gets more and more difficult to find the class you have to change for a new requirement. In this post, I’ll show you how we organize our code and how we derive our structure directly from the requirements.

Why I like NDepend to untangle Dependencies in my Code


Some time ago, Patrick Smacchia (NDepend lead developer) offered me a NDepend Pro license to play around. NDepend is a tool providing a lot of features. The feature that impressed me from the very start is visualizing dependencies. Not just dependencies from classes to classes, or assemblies to assemblies; no from everything to everything. Like for example all assemblies that use somewhere the method Foo of class Bar. It works for assemblies, namespaces, types, methods and fields. But, what’s...

Clean Code: Nesting


This is the start of a series of posts about Clean Code. I’m going to pick some topics from my cheat sheets about Clean Code and Clean Test Driven Development and explain them in more details.
Today’s topic is
Nested code should be more specific or handle less probable scenarios than unnested code.

Clean Code and Clean TDD Cheat Sheets


Updated: new version here! I have compiled two cheat sheets about clean code (the ones mentioned in my post about Code Quality!). The first covers clean code – code that is easy readable and keeps changeable. The second is about Test Driven Development. Both cheat sheets list principles, patterns, practices and smells. You can download them here – Clean Code Cheat Sheet V1.3, Clean TDD Cheat Sheet V1.2. Take a look! I’d like to read your feedback in the comments section… (just an...

Speaking at BASTA! in Mainz (Germany) on September 21st 2010


I’m going to speak about code quality (see my short version of the presentation) at the conference BASTA! BASTA! is mainly focused on .NET technology and gives you the opportunity to see and speak with a wide range of technology experts. If you have any feedback of what you are missing in my short presentation, please write a comment here or on the post with the presentation. The short version takes about 30 minutes and my speak at BASTA! is scheduled for 1 hour and 15 minutes.  I will...

Recent Posts