Last night I went to a Code Dojo at Leeds Sharp (the coding user group I have started going to). A Code Dojo is a programming challenge that people work on usually in pairs.

The challenge that we worked on was to code a solution to the puzzle game Sudoku. The code we worked with can be found on github.

I don’t know much about Sudoku but the game goes like this. 2000px-Sudoku-by-L2G-20050714.svgYou start with a 9×9 grid, and the idea is to fill in all the missing numbers.

Each Row can only use each digit 1 to 9 once, each column can only use each digit 1 to 9 once and each subgrid (3×3) can only use each digit once.

I worked with Richard one of the Leeds Sharp organisers, we started by trying to loop through each empty cell and insert values in a brute force attack, but this approach didn’t get us very far (literally as the application crashed!)

The approach that we needed to use was to loop through calculating possible values.

It was only when I sat down at this dojo did I realise how much I still have to learn, but while talking with Richard about different approaches and different coding structures I started to learn.

This post has already been read 3135 times!

Simon Foster on GithubSimon Foster on LinkedinSimon Foster on Twitter
Simon Foster
Web Developer
I have worked in SysAdmin and IT Management but now work as a Web Developer. I love everything IT related and I am trying to learn as much as I can especially about DevOps. Why not follow me on twitter?