Showing posts from June 1, 2014

Zig, Zag, Zog

Here's just a bit of play before I head to Basketball. I call it zig, zag, zog because there are 3 chunks to the code. Usually, I have a standard zig-zag pattern alternating between to 2 chunks of code. But there are three loops: one if made of zig and zag, another is made from zig and zog, and the final is made of zag and zog. Not too deep but still nice with my new SVG output.
This picture of the code shows a as zig, b as zag, and c as zog. It's pretty clear that a calls b which calls a making a zig-zag loop; and similarly that b calls c which calls b making the zag-zog loop. But the zig-zog loop takes a bit of though--in the code for b since it calls both an a and a c. But essentially c results in a cbcbcb loop with that last b also calling an a so the first c essentially calls an a. Similarly a essentially calls an c thus resulting in the zig-zog loop. There's a bit of twisting calling going on.