Give Your Old Code Some New Love

If you’re not careful, entropy creeps its way into your code base. You take a shortcut or code something in a way that you know is sloppy and you say to yourself “I’ll come back to that later”, but later you’re faced with new feature requests or some other Imminent Disaster(tm) and you don’t go back and clean up the mess you made earlier. This is only natural in a code base and when the messes are few and far between, it is tolerable.

However, at some point the messes accumulate and you need to do something about it because the mess is preventing you from making forward progress in a reasonable manner. Entire books have been written about this situation such as “Working Effectively With Legacy Code” by Michael Feathers (see my review), “Refactoring: Improving the Design of Existing Code” by Martin Fowler and “Refactoring to Patterns” by Joshua Kerievsky. One could even consider “Domain-Driven Design: Tackling Complexity in the Heart of Software” by Eric Evans to be a book full of advice about how to avoid the accumulation of entropy in your code base. Still, sometimes you find yourself with too much entropy in your code base and it’s time to do something about it.

In this post, we’ll take a look at an open source project with a code base that is over 30 years old and has accumulated some “cruft” along the way. We’ll discuss various strategies for coping with the cruft and how to get rid of it in as safe a manner as possible. After all, we don’t want to introduce bugs while we clean up cruft.

Read the rest of this entry »

Adding Static Analysis to Your C++ GitHub Repository

Static analysis can be extremely useful for monitoring the quality of your code base. These tools analyze your source code and check for certain kinds of mistakes that can be detected purely based on how the code is written. In this post, I’ll show you how you can add two free static analysis tools to a free continuous integration build for your C++ github repository.

Read the rest of this entry »

Utah Fall Code Camp 2011

The Utah Fall Code Camp 2011 is coming up and I’ve proposed a number of talks and volunteered to present some that didn’t yet have speakers. If any of these sessions sound interesting to you, please visit the Utah Code Camp web site and vote for them.

  • Open Source Development Track: Recursive Descent Parsers with Boost.Spirit
  • Microsoft Development Track: Powering Managed Applications with the GPU and SlimDX
  • Architecture Track: High Performance C++, or How to Make Friends With the Cache

The following talks already existed but had no speaker yet, so I volunteered to give them:

  • Mobile Development Track: Push Notifications and Tiles for Windows Phone
  • Mobile Development Track: Game Development for the Windows Phone 7.5

Read the rest of this entry »

Iterated Dynamics Moved From SourceForge To CodePlex

No SourceForgeOver the past few years, I’ve become increasingly disappointed with SourceForge for my open source projects. It used to be the first place I would suggest for hosting open source projects; now I would never recommend it. As a result, I’ve moved Iterated Dynamics to CodePlex.

Read the rest of this entry »

FractInt for Windows (beta 5)

Download FractInt for Windows Beta 5

The legacy code I’ve been working on lately is FractInt.  FractInt’s most recent release is a source base that compiles in three ways: DOS (FRACTINT), Win16 (WinFract) and lunix/X11 (xfractint).  The DOS code has gone about as far as any DOS program should go, and then some.  The Win16 and X11 code has lagged behind the DOS code in some areas, mostly because people didn’t want to translate the 16-bit x86 assembly code for other environments.

Read the rest of this entry »