Brainfish Eat Fishbrain

Learn something new in a weekend

· Tycho

DALL·E 2022-12-17 12.48.04 - learning something in one weekend.png

This is a compilation of materials to study and practice new skills in around one weekend. Most materials are technical, as those are the things that interest me mainly.

So if are lacking ideas of side projects for the weekend and want to feel inspired, pick one of these from the list and start hacking!

Raytracing in one weekend

Raytracing in one weekend is a book that get’s you to creata a brute-force path raytracker in a weekend. You require knowledge of C++ for the original book, but there is also a Rust version of all the examples. It is pretty easy to get through; raytracing isn’t very complex once you know the basics.

There are 2 follow up books which add on the knowlege of the first book and are also more or less the same format and speed of learning.

Having some Linear Algebra knowledge does really help actually understanding what’s going on, but you create fairly complex renderings without knowing any of it using this book and the follow-up books.

Get the books here: https://raytracing.github.io Here is the Rust code: https://github.com/fralken/ray-tracing-in-one-weekend

Game physics in one weekend

Inspired by Raytracing in one weekend, this book teaches you game physics programming in C++. Contrary to the raytracing book, this book is not free and can only be downloaded in the Kindle store, which I consider a disadvantage, but a workable one.

Get the books here: https://gamephysicsweekend.github.io/

Crafting interpreters

A hobby of mine is implementing interpreters, and I did so many times. I am mostly facinated by very small and simple ones that still can be used to write real programs, like https://gist.github.com/tluyben/16ee2645c4c8aed813005d51488d5c6a, which is more like ‘Learn in 15 minutes’ instead of a weekend.

However, going beyond toy implementations, there are good resources to learn from how to do this yourself. And the fun thing is, you can practice with different programming languages to write programming languages and write programming languages in them. Recursively.

Crafting interpreters is two books in one, the first uses Java to create a simple interpreter for a language and the second uses C to create a VM (and thus compiler) for the same language.

For me one weekend was enough to work through the first part (the interpreter written in Java), while the second part (the VM in C) took me like 4 weekends.

Get the book: https://craftinginterpreters.com

Writing An Interpreter In Go

These books are very similar to the Crafting Interpreters book, but the implementations of the interpreter with and without VM (and compiler) are done in Go.

I haven’t tried these yet, but will fairly soon; they look good albeit very similar to Crafting interpreters.

Get the books: https://interpreterbook.com/

Common Lisp: A Gentle Introduction

I like Lisp/Scheme(-like) languages and this book has many great exercises, going from easy to hard. Many of them are very interesting for existing programmers, however, you don’t need any experience to start out. Even if you will never touch Lisp ever again, these exercises broaden the mind and get you deeper insights that are transferable to other languages while learning (probably) better practices than starting out with more mainstream language tutorials.

The one weekend aspect, for me, was doing 1 chapter per weekend. You might be able to go faster or slower, but by the end it gets harder.

Get the book here: https://www.cs.cmu.edu/~dst/LispBook/book.pdf

Structure and Interpretation of Computer Programs

This is a book which gives you, if you complete it, deep knowledge about how programming and programs really work (and so, keep you ahead of our AI overlords for a bit!). It is not an easy book but a chapter per weekend should work for most.

The original book centers around the Scheme programming language, which is like Lisp, and I would recommend following that one first. But there is also a modern Python version (also linked below), and there are many people who completed all exercises in the original book in different other languages. Many are not complete because the writers gave up, so I didn’t link any and left it to the reader to work on this for their favorite language (that’s another 4-5 weekends after doing the original in Scheme!).

Download the book: https://web.mit.edu/6.001/6.037/sicp.pdf For Python: http://composingprograms.com

Other resources

If this is not quite enough for you, here are some more resources that might help learning things fast: