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.

  1. Introduction
  2. The Grid
  3. Aliasing
  4. Randomness
  5. Finding Neighbors
  6. Resolving Ties
  7. Assembling the Program
  8. Bugs
  9. Refactoring

Dialogue & Discussion

Comments must follow our Code of Conduct.

Edit this page on Github