chemistry, Coding, Electricity, JavaScript, Notes on everyday life, Simon makes gamez, Simon's Own Code

Test Tube Games

Simon has had hours of fun with Test Tube Games, a science games portal featuring interactive explanations and dynamic puzzles on Chemistry and Physics. He has created two simulations based on the games he played. The first one is an electromagnetic field simulator:

This project was inspired by the game/explanation “The Electric Shocktopus” on TestTubeGames.com

Code: https://editor.p5js.org/simontiger/sketches/nIwYhXLdj

Press “1” for positive charge, “2” for negative charge, “R” to run. Press “3” and “4” to create magnetic fields/ press “0” to erase them. Press Shift+1 and Shift+2 for “lazy particles”.

Simon’s other TestTubeGames-inspired project is called “Floating Astronaut”:

This project was inspired by the game/explanation “Why Do Astronauts Float?

Code: https://editor.p5js.org/simontiger/sketches/obGZyfVze

Haven’t figured out a way to put the astronaut inside the rocket yet though.

One more science game is definitely a hit at our home, “Bond Breaker” (on chemical bonds). At a certain point, it gets so hard you start feeling like a secret agent on a mission.

Simon playing “Bond Breaker”
Coding, Contributing, Group, JavaScript, Murderous Maths, Server Side Programming, Simon makes gamez, Simon's Own Code

Tchisla Clone

Simon is working on a clone of Tchisla, an absorbing number puzzle app from the (Russian!!) creators of Euclidea. The aim is to represent numbers as arithmetical expressions using only one of the digits from 1 to 9 and the shortest way possible. (For example 96 = 99 – √9 or 96 = 4 * 4! or 96 = 2 * 2 * (22 + 2) are all valid representations of 96).

It’s true what the makers say: “You suddenly discover that you know a lot of numbers and their properties: factorials, squares, cubes, prime numbers, roots and others. Tchisla imperceptibly helps you to improve your calculating skills.”

Simon doesn’t like the fact that you can currently only find Tchisla as an app while he wants to screenshare with his friends in a browser, so he has decided to develop his own version. So far he has completed these steps in Glitch:

The next step is to actually enable joining the lobby!
Coding, Computer Science, Crafty, Logic, Python, Simon's Own Code

A Small Program that Doubles Itself

I wrote a small program that copies itself. When the program doubles itself it executes itself twice. The code that doubles itself is now doubled. The second time you run it you will get 8 times its original copy. The following time it’s going to double 8 copies of itself 8 times. Afterwards it doubles 2048 copies of itself 2048 times — that I can’t run because it would overwhelm the universe 5 times!

Coding, Computer Science, Engineering, Logic, Math and Computer Science Everywhere, Python

Simon’s Halting Problem Gist

You can easily turn every statement into a program. If the program stops, or “halts”, then the statement is true, and if it never stops, or “loops”, the statement is false.

Like, for example, the following program corresponds to the statement: “There’s at least one even number that cannot be expressed as the sum of two primes” (this is the negation of the so-called “Goldbach Conjecture”):

So, if we can figure out if any program will halt or not halt, we can prove everything! Can we do that, though?

Read more on Simon’s GitHub

Coding, Contributing, JavaScript, Milestones, Server Side Programming, Simon's Own Code

Question Bot

Simon has built a question bot that will collect questions on The Coding Train Discord so that Daniel Shiffman can answer them during the following live session.

This is something Simon worked on for days and he was thrilled to be able to present a working bot to Daniel. The only issue that remains unresolved is whether the mods should control the bot via a secret password or should a more advanced security system be developed. Daniel has decided to take a long break from live streaming, so the whole project probably won’t be revived until the streams resume. In any case, as Simon has put it, “I know, it’s messy, but it works. And that’s what’s important to me”.

Simon has also created several other bots (and built a separate Discord playground where other people can test their bots as well). He has been doing quite a lot of server side programming lately.

The code is on GitHub: https://github.com/simon-tiger/Question-Bot

The website is on Heroku: http://questionbot-discord.herokuapp.com/

Simon’s “question-answering round” Discord bot is a clone of CJ (Coding Garden)’s VOX system.

Coding, Community Projects, Contributing, Curent Events, Experiments, Geography, JavaScript, Milestones, Murderous Maths, Notes on everyday life, Philosophy, Simon makes gamez, Simon teaching, Simon's Own Code, Simon's sketch book, Social Studies, Thoughts about the world

How Can Math Help Resolve Racial Segregation?

This is Simon’s contribution to #blacklivesmatter

How Can Math Help Resolve Racial Segregation? This video and coding project is based on Segregation Solitaire by Thomas Schelling, an American mathematician and economist who was awarded the 2005 Nobel Memorial Prize in Economic Sciences for “having enhanced our understanding of conflict and cooperation through game-theory analysis.”

I don’t like the name ‘Segregation Solitaire’, so I call it Schelling’s Game. This is also inspired by the famous Parable of the Polygons playable essay on the shape of society by Vi Hart and Nicky Case: https://ncase.me/polygons/

Simon binge reads Nicky Case’s essays and has made several remixes of their projects, all the more timely, considering today’s context.

Simon’s interactive version: https://editor.p5js.org/simontiger/present/mWwl1GsTe

Simon’s code: https://editor.p5js.org/simontiger/sketches/mWwl1GsTe

Coding, Geometry Joys, Murderous Maths, Physics, Python, Simon teaching, Simon's Own Code, Simon's sketch book

Physics Engine using Verlet Integration

Simon created a physics engine in Python with Turtle. He used Verlet integration (French pronunciation: ​[vɛʁˈlɛ]), a numerical method for integrating Newton’s equations of motion in calculating trajectories of particles in molecular dynamics simulations and computer graphics.

see Simon’s interactive sketch in Geogebra at https://www.geogebra.org/m/neuxj63g

Verlet Integration is a way to implement a physics engine without having to care about velocity.

Instead of storing the velocity, you store the previous position, and you calculate the velocity on the fly. Then if you add that velocity to the current position, you get the new position. But then you also have to add on the acceleration, because acceleration changes velocity.

Coding, Good Reads, history, JavaScript, Milestones, Notes on everyday life, Set the beautiful mind free, Simon teaching, Simon's Own Code, Social Studies, Thoughts about the world

Simon’s remix of one of Nicky Case’s playable essays

If you’re interested in why #covid-19 tracing apps are important and the most privacy-friendly way to implement them, please read this interactive essay by Nicky Case and play with the colorful simulations of all our possible futures. For Simon, this has been the entrance into the Nicky Case @ncasenmare universe (first recommended by 3Blue1Brown). Simon has been gulping down the playable essays on human networks and the spread of complex ideas, self-synchronization in nature, the shape of society and several other burning themes (like coming out and anxiety) and watching Nicky Case’s talks, like this one. Nicky is a self-made indie artist, programmer and writer making very edgy, very 21st century multimedia products that are both profound in content and have an engaging/interactive interface. It’s as if reading an informative piece is turned into a game. And that’s exactly what Nicky stands for: learning through play and messing about. Maybe that’s why Simon has embraced his works so eagerly, Nicky has proven to be one of those perfect matches for our self-directed learning style.

Simon has made a remix of Nicky’s Evolution of Trust, an iterated prisoner’s dilemma: https://editor.p5js.org/simontiger/present/oOurTdGWT

Simon’s code: https://editor.p5js.org/simontiger/sketches/oOurTdGWT

Coding, Geometry Joys, Group, JavaScript, Milestones, Murderous Maths, Simon's sketch book

Dissecting Polygons

Every polygon can be triangulated into exactly n-2 triangles. So you’ve got the triangulation theorem and the totally opposite theorem in the math universe, Girard’s theorem (the formula for the era of a spherical triangle). I’m going to attempt to put these two together to prove Euler’s polyhedral formula (also known as Euler’s characteristic) V – E + F = 2.

A week later Simon and a friend of his from Germany worked together for several hours, writing a program to cut polygons. It’s still unfinished but is already fun to play with: https://editor.p5js.org/simontiger/sketches/YxNUp5rdJ

Coding, Group, JavaScript, Milestones, Notes on everyday life, Server Side Programming, Simon's Own Code, Uncategorized

Simon made a discord bot

Last Tuesday, May 19, was somewhat a historic day as Simon created his first Discord bot (actually, two bots: one that does polls and count-downs and another programmable one that sends messages). In order to make the bots work, Simon first made a new server called a “bot playground”.

A screenshot of our desktop terminal where Simon ran the code using Node. “I ask the bot to put Beep boop. Boop beep? when it’s ready, just so I know when it’s ready.”
Simon wrote the actual bot code in JS, giving each bot an .env file “where I store all my secret stuff” and “a package.json file to keep track of all the dependencies like libraries”.
Simon’s bot doing the countdown and then saying Happy New Year! followed by Just kidding.

Simon and a friend also practiced in hacking each other:

And finally, he found himself in the centre of a great prank: everyone in his group of friends who wasn’t called Simon changed their names to something containing Simon and all the Simons in the group became Gregs: