this space intentionally left blank

March 8, 2008

Filed under: gaming»software»excel

I'm Not the Only One

...doing inappropriate rapid application development in Excel: Excel as 3D engine via Rock Paper Shotgun. He exposes the guts of the matrix calculations in the spreadsheet itself, then uses the cells of another as "pixels" for display (an idea that I'm sure most people who've zoomed out on a spreadsheet have thought about). It's all very tongue in cheek, with lots of references to resizable pictures and the engine's "advanced" capabilities. But behind the joke, there is something that I've always found fascinating about working within VBA.

When I was in my first or second year of college, I remember reading about LISP for the first time, back when I thought I might be a programmer for a living. LISP programs are made up entirely of lists inside of other lists, and there's no distinction between program commands and data--you can, quite easily, generate a list of new program instructions and then run them, making LISP very useful for AI research.

The idea that the program could actually write itself just struck me as really cool and thought-provoking. I never learned how to actually program in LISP, mind you (all those parentheses make my eyes cross), but conceptually I thought it was a neat experiment. As I've been learning a bit more about Javascript lately, I get a little bit of the same vibe--not that it can rewrite its own code (although I guess it could), but the idea that a page in a web-browser can dynamically rewrite itself based on user input is, in an admittedly incredibly dorky way, kind of magic.

What I like about working in Excel or other Office macros is that they can use the document in the same kind of way. If you're working in Excel, you don't need a file system, because you've got the spreadsheet sitting there to hold your data. Using cells for variable storage lets you use the same kinds of tricks that programmers in C might play with memory pointers--but you can see the memory updated right in front of you, stop execution, and dig through the current state of things. In the piece above, if I'm seeing things right, the programmer's even using the math capabilities of the spreadsheet itself, so that the program relies on the recalculated values of individual cells.

I guess I still think that's pretty cool, that a spreadsheet with a few extra lines of code can run its own contents, blurring the lines between a human-readable document and a program.

Future - Present - Past