Live Stream #15. Chapter 6 of Living Code: Particle Systems

Simon’s latest Live Stream about Chapter 6 of his “Living Code” Course (particle systems!), loosely based on Daniel Shiffman’s Nature of Code. “I’m also going to live stream a surprise maths video”, – at the beginning of the stream Simon devoted some time to the magic hexagon problem.


Simon and Daniel Shiffman

Today is one of the most beautiful days in Simon’s life: NYU Associate Professor and the creator of Coding Train Daniel Shiffman has been Simon’s guarding angel, role model and source of all the knowledge Simon has accumulated so far (in programming, math, community ethics and English), and today Simon got to meet him for the first time in real life!

Daniel Shiffman posted:

Muredo in JavaScript

Simon programmed this game a couple of weeks ago but I have waited to publish the video as I hoped he would finish it and get in on GitHub. Unfortunately he got stuck and didn’t return to the project since then, this why I’m now publishing an unfinished game. The unfinished code is on Simon’s GitHub:

Link to the current version of the game (try playing it online):

Simon writes: “The game board is ready, you can move the game pieces on to the board and roll the die. As the next step, I want to have a feature of highlighting the correct tile – how can I do that?

I also don’t have the following things yet: the multiplying feature, choosing one of multiple options and the winning condition.”

I love Simon’s color choice and the whole interface. Originally, it’s a Japanese game and I think he has made it look very much like spring in Japan.

The objective of the game is to fill in the little square making a 3×3 grid. A player throws the dice and puts one game piece on the corresponding place on the board. When she throws again, she can multiply the value on the die by the value of the place where she has her game piece (or game pieces) if the product of the hat multiplication sum can be found among the nine numbers on the 3×3 grid. If not, the player either puts another game piece on the board, to fill the value of the last throw, or misses a turn.

Mental Logs Trick

Simon learned this trick from a Numberphile video. He made mental log sticks himself. He first programmed the nets in JavaScript and printed them out, then filled in the grids by hand. I helped him cut the grids out and glue them together. In the video, Simon uses the trick to quickly calculate the sum of four four-digit numbers and explains how he did it. If anyone wants to make these, here is a picture of the nets/grids:

Simon’s Decision Tree Library

Simon has just created a decision tree library, called “Decision”, that is helpful in building decision trees/forests (Machine Learning). He has also tried performing unit tests for the first time, and passed several of them! Once Simon’s library is in GitHub he also plans to link it to the testing hub CircleCI so that no merging can happen without passing tests. In this video, Simon explains what a decision tree is, shows his library and his test decision trees.

Simon’s library on GitHub (with a huge Readme that Simon wrote himself):

Simon’s library on CircleCI:

Simon’s unit tests:

Screen Shot 2018-02-20 at 16.59.12

Snakes and Ladders in p5.js

Simon built this Snakes and Ladders game on January 27 based on Daniel Shiffman’s live stream (from January 26), adding some extra features of his own. The game is online at





Link to Daniel Shiffman’s live streams: