Refactoring Invasion Percolation
This post originally appeared on the Software Carpentry website.
Today's episode (the ninth in the lecture about designing an invasion percolation program) was supposed to be about testing, but wound up being about refactoring instead—which probably won't surprise anyone who's done any significant amount of programming. We'd be grateful for feedback on how easy or hard it is to follow along as the program is rearranged.
- Introduction
- The Grid
- Aliasing
- Randomness
- Finding Neighbors
- Resolving Ties
- Assembling the Program
- Bugs
- Refactoring