Tracing The Late Ray

Work has been crazy the past few weeks, so I apologize for not writing this earlier. I've had a version of this text ready to go almost two weeks ago, but life conspired against me posting it. So here I am, on a Thursday almost two weeks late, writing about my "Weekend Project".

I started reading the book, and everything went fine until I hit Chapter 2 (yes, that two). He throws a bunch of math at you and my mind just sort of tunes out if there's too many formulas. There's probably some math-related school trauma I haven't dealt with. I got through it eventually, making notes and adding post-its along the way. That was Saturday.

Sunday was when where the real fun began as I read Chapter 3. I found the code snippets easy to follow (even if I don't quite get why there's only snippets and not the full code in a book with "from the ground up" in the title). I read the whole chapter, and then wanted to get back and implement the thing myself. I downloaded the complete code from the website to have pointers for everything and then hit my first snag: He uses wxWidgets as the frontend, which only sort of works on macOS. Oh boy. Three chapters in and I was already in trouble. I had three choices:

  1. Develop on Linux (Or Windows, but seriously. No.)
  2. Make the code run on macOS.
  3. Write a new frontend.

I didn't want to set up a Linux environment, because I was busy enough following all the math. The second option, rewriting code from a book, is a dangerous endeavor in my experience; you create way more trouble for yourself, because the two codebases look too similar to distinguish them at a glance, which leads to unnecessary errors. So I picked the third option: Write a new frontend. I've done a few games in SFML over the last few months, so that seemed like the natural place to go. It offers similar capabilities and I know how to work it. The code is up on github. I didn't get to do the exercises, though. I'm aiming to get them done by Sunday.

But I'm not telling you which Sunday...