Hacker News new | ask | show | jobs
by kristianp 581 days ago
The Ray Tracer Challenge by Jamis Buck. It uses Cucumber tests to specify the behaviour of the code, without giving you the code. Not a single weekend project. I've been doing it in C++ to learn about the modern language, but any language can be used.
2 comments

Got halfway through in 2022, implemented it with Crystal (being into ruby, it was the natural choice)

Great book - I only abandoned it halfway because my first child was born :)

Crystal sounds like a good choice, performance without being too hard to learn. I have been thinking about changing language because its been so slow-going. Without chatgpt it would have been nigh-impossible to solve a segfault in a destructor caused by a missing & in a parameter causing a shallow copy.
I wish more books did this. Mostly they just spoonfeed code. It kind of ruins any interaction you can have with the book.