Francesco Pasa

Sudoku: Refactoring

In the previous post, I implemented a sudoku solver. Unfortunately, it does not work yet. Let’s fix it! Debugging the solver in the current state of the code is hard. The test fails because the expected solution is not equal to the actual solution returned, but since I have no way of visualizing the Grid it’s hard to say what the difference is. ...

Sudoku: Recursive Algorithm

The code I wrote in the last post would use some refactoring. However, the tests are working, and I feel like I would be spending my time refactoring stuff that already works instead of trying to tackle the actual problem of solving a sudoku. ...

Sudoku: The Solver Interface

The other day, in the first post of the series, I started writing a sudoku solver with TDD. In particular, I wrote a simple Grid class to encapsulate the game’s state. I think it’s now time that we start writing a solver for the puzzle. ...

Writing a sudoku Solver with TDD

I’m going to imitate Ron Jeffries. In his series of posts, Ron tried writing a sudoku solver using TDD (Test Driven Development) to see if the methodology works and what would happen. He eventually quit the project without completing it. ...