Status update December 2019
During the slowest month of the year I worked little on Cute Chess and cryptopals.
One of the areas I would like to see improved in Cute Chess is logging. The current logging system is bit of a mess:
- there’s no way to see log messages in the GUI unless you run it from the command line
- the logs are not structured and lack context; it’s not for example possible to limit the output of logging to a certain subsystem
- log levels (debug, warning, error, critical) have not been documented and their use is not consistent
I tried to see whether I could come up with prototype for the first issue. The pull request adds a logging view to the main window and routes the standard Qt debug messages to it. It still lacks context of messages, cannot do filtering and misses some early messages during the program initialization.
Qt Logging Framework by Kai Köhne was an excellent resource for coming up with the prototype.
For the past year or so I’ve been working on the cryptopals crypto challenges. It’s a series of cryptographic programming tasks or challenges that start from very easy but increase in complexity as it progresses. I’ve found the tasks to be a good way to learn new programming languages. For a new programming language I usually finish the first set.
For learning Go with cryptopals, I decided to go further than just plowing through the challenges in set 1: I wanted to learn how to structure Go code, how make it easily testable and easily runnable. Ideally, each task would be their own binary and the different tasks with same features would share the same underlying code that is unit tested.
There are several recommendations for Go project structure, for example golang-standards/project-layout. Initially I used that as a template but quickly realized that it resulted in overthinking the problem. The Github comments in the project have also raised similar issues. My current code structure is more simplified and fits better for the project in question. I also abandoned the idea that parts of the code could be a library that people could reference in their own projects.
That’s all I have for this month. See you next year!