tic toe tac, galois fields, data structures [day 26]
It might be cool to check out, if I can make something that unifies the three words in the title, but today, as usual, I worked on those topics independently.
I finished my tic tac toe in Scala and presented it to the critique group. My hope was to get some good remarks out of this, because everybody understands what is going on, so we could go into details. Not sure if what we discussed was bikeshedding then, but I don’t think so. We mostly talked about my design decisions, it seems like most of them were “accepted” by the group.
The most “controversial” part was the computation of the result. There was a cool idea about how to compute the winner in a way that looks like constant time to me, i.e. as soon as the move is made a small number of fixed updates can compute the result. Another nice suggestion was to try and extend the design to allow both “connect four” and “tic tac toe”, just to see what they have in common and how to encapsulate that in it’s own module.
I found out that this game is a very popular programming exercise, as Elias and Xianny also programmed their own version just this week. And it seems many Recursers programmed a tic tac toe for their RC application. Interesting, as it’s such a seemingly “boring” game. I think the boring-ness makes it a very good exercise.
After the frustrating CTF this weekend, I tried to get something out of it today. I wanted to understand what was necessary to solve the “easiest” crypto challenge. I got a very good introduction by Adam to the notation of Finite Fields, how they become Rings and how these can be Galois Fields. I think I understand now the notation and how these mathematical structures are “looking like” from the outside. The next step would be to understand why these things are important for Cryptography. I found an article on that, but did not yet work through it.
In the afternoon I worked with Nasreen on identifying certain sentences in a graph. We figured out that this can be solved by some form of Breadth First or Depth First Search. On the way, we hit all kinds of interesting topics, such as how to use ipython to guide you through the Python API or the question when to use sets and when to use lists as data structures in Python. The last open question we had: How to write nice tests for the things we got done?