Disclaimer: this post may be something that only a serious internets/javascript/web dev nerd can appreciate. Starting in the early days of software development, the ‘demo’ has been a way for a developer to show of his/her skills within a limited file size. In the summer of 2010, a javascript 1kb demo challenge was held to showcase the mad skills of participating developers, with a focus on using HTML 5′s canvas. If you’re slightly unfamiliar with technology, 1kb of file size is really small, like 1,024 characters small. In a word document, that would be the equivalent of a couple paragraphs.
Some of the demos created by participating developers are crazy impressive for being such small sizes. There are a lot of hacks and tricks that you can use to reduce the volume of code, including but not limited to compression with tools like Google Closure Compiler, creating one-character aliases for frequently used properties, defining multiple variables in one statement, and doing really naughty things like leaving semi-colons off of the last statement in every block. Each little bit(or byte) that you can shave off adds up to a lot in the end. For a really great walk-through of the first js1k challenge’s winning demo, see Marijn Haverbeke’s work.
The first JS1k challenge was a big hit with the development community, so a second competition was held during the holiday season, with a Christmas theme. I entered a little snowflake-maker demo – simple, but weirdly addicting. Click around on the white ‘paper’ wedge to draw shapes. Click on your starting point (noted with the little gray dot) to close a shape. Make as many cutout shapes as you want, and then click the button to make your flake! My original source code is below the screenshot (once compressed, the code is <1k).
Source Code: (Click to expand)


Hi Cara! I love this! I am so impressed. I played with the snowflake maker on my phone & it was way fun! Congrats on such a lovely entry.