torsdag 3 november 2016

Watch me learn Go, part 9: Implementing Next

In this video I implement the Next function that I wrote tests for. I have a hunch that I've introduced some non-idiomatic Go code. For example, I added some error handling, but I'm afraid I don't know what to do with the error. Where I come from (Java land) we just throw the errors up the call stack.

Get the code at https://github.com/nllptr/conway


Watch me learn Go, part 8: Testing Next

Next will be the function that takes the current state of the world and generates the next version of it. In this video I write some tests. If you take a look at the code, you'll see that I added some more test cases. Just because it's so darn fun.

The code is available at https://github.com/nllptr/conway


Watch me learn Go, part 7: Even prettier tests

Some more refactoring ahead! Lesson learned; It's hard to know everything ahead of time. It's OK to refactor if it makes things prettier (easier to maintain).

The code is available at https://github.com/nllptr/conway


onsdag 2 november 2016

Watch me learn Go, part 6: Implementing neighbors

Now it's finally time to implement the actual function that counts neighbors.

The code is available at https://github.com/nllptr/conway


Watch me learn Go, part 5: Prettier test cases

In this video I just make stuff prettier.

The code is available at https://github.com/nllptr/conway



Watch me learn Go, part 4: Testing neighbors

Time to write another test! I told you there would be more of that. In the game of life we need some way to count a cell's neighbors, that that is the test we're putting in place today.

The code is available at https://github.com/nllptr/conway


tisdag 1 november 2016

Watch me learn Go, part 3: Writing the first test

This is the first episode with some real code. However, I just write a simple test, and since the video turned out WAY too long, it's totally ok to skip this  one and move on to the next. Trust me, there will be more tests written.

So what am I going to code? Turns out it's Conway's "Game of Life".

You can find the code at https://github.com/nllptr/conway