I think a more reasonable goal for this in particular might be to write an article for every day instead of writing one every day. I'm writing this a day late. Looking back on yesterday its reasonable I didn't get it written. I'm a bit of a night owl, so once I got done coding at around 1am I was ready for bed.
Something I've had in my mind for a while is wanting to experiment with TUIs. I wrote a little game of life simulator in go and had a great deal of fun working on it. A month or two ago I watched the Tetris movie, which was very good, and immediately wanted to take a stab at writing my own TUI for Tetris.
Yesterday (since I'm writing this a day late) I got some of the basics done. I'm
able to print the shape of the Tetris "bucket", and was able to print a single
Tetris piece. It became apparent very quickly the way I was rendering the TUI in
GoL was not going to work for Tetris. In GoL the "game state" is every cell.
Each cell on the screen is its own state and is effected by the cells next to
it. This makes simulating pretty straight forward; you have a grid [][]uint8
(uint8 to store different colors) and buffer [][]uint8 where grid is the
previous state that was just printed, and buffer which is what should be printed
next based on grid. With Tetris there is much more state to objects on the
screen than just if the grid cell is on or off. I have some ideas of how to
implement this and I'm excited to start experimenting with it. Something about
writing code that you can visually see the results of is just so rewarding.
I also started on a puzzle yesterday. I think puzzles are generally underrated. There is a feeling of deep meditation one gets when focused in on a puzzle. Its almost similar to coding, where everything melts away while your looking for the next piece, figuring out what goes where. The main difference however is the amount of cognitive load you need. Puzzles are almost mindless. You can listen to music in the background, hold a conversation, etc. Those things feel different though when your mind is distracted by a puzzle. Conversations feel more deep since there is an expectation your not going to be moving for a bit. Music sounds better. I forgot how much I enjoyed these as a kid.
