# Chromium Fractal plated Heisenbugs, Mandelbugs and Schrödinbugs

In my recent experiments with Coffescript and Canvas I've come across a Mandelbug in Google Chrome. This post won't go into too much detail about the Mandelbug I myself experienced. Instead, it's more a general outline of what these "bugs" are and what limitations they may eventually place on technological advances as a whole.

## Sierpinski Triangle What?

The Sierpinski Triangle is an aesthetically pleasing fractal that can be constructed quite simply even with pen and paper. Start with a triangle and then drawn an upside down triangle inside of it. Repeat this for each of the triangles that have just been created. For more details, I'd encourage you to look elsewhere.

For the programmers out there, this sort of structure is quite easily created recursively. The initial method I employed is spectacularly simple -- don't even draw the triangle. Instead, just place a dot at each of the vertices of the triangle and do this for each of the "sub-triangles" created. With enough dots the Sierpinski triangle emerges. This is where the Mandelbug popped up in Google Chrome.

## Heisenbugs, Mandelbugs and Schrödinbugs?

Most people think of computer programs as deterministic machines -- they do exactly what you tell them to do and won't do anything unexpected. With enough investigation any bug can be prevented by working out the exact conditions that cause it. As computers are deterministic, the same input will result in the same output every time.

Mandelbugs are caused when computers exhibit chaotic or non-deterministic behaviour. These bugs are caused by true non-determinism sneaking in to programs or as the computer's interactions are so complex that it appears non-deterministic to a human.

Below is an example of a Mandelbug seen during the creation of a Sierpinski triangle in Google Chrome. The expected result is on the left -- the completed triangle itself. On the right is what Google Chrome produces -- variations of incomplete triangles. Every time the browser is refreshed, a different proportion of the triangle is complete. The code used to generate it performs the exact same steps each time, so should always produce the same result. This is seen in other browsers such as Firefox.