It seems that Google is developing a graphical programming language called Blockly, inspired by Scratch but web-based, with the ability to compile down to JavaScript, Dart, or Python (or raw XML, so you can process it further). I can’t say I’m all that excited about the language itself—nothing new there, just the same old tired imperative programming—but it sure is fun! Give it a try—can you solve the maze? How big of a program do you need?

- algorithm algorithms approximation arithmetic art Babylonian beauty binary binomial coefficients birthday book review bracelets carnival Carnival of Mathematics change chess chess board combinatorics complex consecutive cookies counting decadic decimal derivatives diagrams divisibility divisors education equivalence expansion factorization fibonacci floor foundations fractal game games graph groups Haskell history hyperbinary idempotent integers interactive irrational Ivan Niven Lagrange lehmer lucas MaBloWriMo Mersenne number numbers permutations pi prime primes problem programming proof puzzle random rectangles repunit review sequence squares subgroups symmetry test triangular video visualization
### Blogroll

### Fun

### Reference

### Categories

- algebra (43)
- arithmetic (59)
- books (25)
- calculus (6)
- challenges (47)
- combinatorics (8)
- complex numbers (5)
- computation (54)
- convergence (9)
- counting (28)
- famous numbers (62)
- fibonacci (14)
- fractals (12)
- games (17)
- geometry (29)
- golden ratio (8)
- group theory (3)
- humor (6)
- induction (7)
- infinity (17)
- iteration (39)
- links (71)
- logic (6)
- meta (37)
- modular arithmetic (34)
- number theory (71)
- open problems (11)
- paradox (1)
- pascal's triangle (8)
- pattern (54)
- people (19)
- pictures (28)
- posts without words (3)
- primes (47)
- probability (5)
- programming (17)
- proof (47)
- puzzles (10)
- recursion (8)
- review (17)
- sequences (26)
- solutions (25)
- teaching (9)
- trig (3)
- Uncategorized (2)
- video (18)

### Archives

- November 2015 (29)
- August 2015 (3)
- June 2015 (2)
- April 2015 (1)
- May 2014 (1)
- December 2013 (1)
- October 2013 (1)
- July 2013 (1)
- June 2013 (1)
- May 2013 (1)
- April 2013 (3)
- March 2013 (3)
- February 2013 (2)
- January 2013 (5)
- December 2012 (3)
- November 2012 (4)
- October 2012 (5)
- September 2012 (1)
- August 2012 (4)
- July 2012 (1)
- June 2012 (6)
- May 2012 (2)
- April 2012 (3)
- March 2012 (1)
- February 2012 (4)
- January 2012 (5)
- December 2011 (1)
- November 2011 (7)
- October 2011 (4)
- September 2011 (6)
- July 2011 (2)
- June 2011 (4)
- May 2011 (5)
- April 2011 (2)
- March 2011 (4)
- February 2011 (1)
- January 2011 (1)
- December 2010 (1)
- November 2010 (4)
- October 2010 (2)
- September 2010 (1)
- August 2010 (1)
- July 2010 (1)
- June 2010 (2)
- May 2010 (3)
- April 2010 (1)
- February 2010 (6)
- January 2010 (3)
- December 2009 (8)
- November 2009 (7)
- October 2009 (3)
- September 2009 (3)
- August 2009 (1)
- June 2009 (4)
- May 2009 (5)
- April 2009 (4)
- March 2009 (2)
- February 2009 (1)
- January 2009 (7)
- December 2008 (1)
- October 2008 (2)
- September 2008 (7)
- August 2008 (1)
- July 2008 (1)
- June 2008 (1)
- April 2008 (5)
- February 2008 (4)
- January 2008 (4)
- December 2007 (3)
- November 2007 (12)
- October 2007 (2)
- September 2007 (4)
- August 2007 (3)
- July 2007 (1)
- June 2007 (3)
- May 2007 (1)
- April 2007 (4)
- March 2007 (3)
- February 2007 (7)
- January 2007 (1)
- December 2006 (2)
- October 2006 (2)
- September 2006 (6)
- July 2006 (4)
- June 2006 (2)
- May 2006 (6)
- April 2006 (3)
- March 2006 (6)

### Meta

Here’s my first solution:

This solution will only work for the given maze and takes advantage of the fact that this maze has a very repetitive path to the end, but it has the advantage of being pretty clear. My second solution is a bit more complicated:

This solution implements a “left-hand rule.” That is, any time you can turn left, do so, otherwise just follow the path. This has the advantage of being more general, in that any maze without loops can be solved by the algorithm. On the other hand, it is slower, and, as noted above, loops can cause problems.

It seems that I can’t embed images. The solutions are

I did it with six instructions. Fun!

I recommend trying out your maze solvers with the more complicated puzzle here:

http://www.gasolin.idv.tw/public/blockly/demos/maze/index.html

Also, I modified Blockly a bit to turn it into an animated drawing program with a very simple set of instructions. Check out my description of how well using it went with kindergarteners here:

http://davidwees.com/content/kindergarteners-programming

I really like Blockly and am looking forward to extending it slightly, and maybe eventually finding a way for code that people create to be saved and shared (rather than having to take a screen-shot!).

Oi! The LOGO-esque setup is great. Unfortunately, I cannot reproduce my maze solver in your environment, as it lacks a an “If…Then…Else” structure.

The first link isn’t to something I created, I found it through the Blockly Google group. I have plans to extend the Drawing environment but I have put it on hiatus for now as I have more important things to complete.

There is a similar webbased graphical programming tool called Visogram (http://www.visogram.com) that might be interesting for you. In contrast to Blockly it is dataflow-oriented – you connect inputs and outputs of modules. Additionally you can create user interfaces to visualize things easily. Those interfaces are purely based on web standards and run on any devices that comes with a web browser.