Friday, September 12, 2014

MakerSquare Day 12: "Think in trees" (3/4)

At least, that's what our afternoon instructor said. I think he mostly meant that we should "think in trees" as it relates to the DOM--the document object model--which is representation of HTML, where everything is a node and all the nodes are connected in a family-tree-like structure. It's helpful to think in trees so you remember what's a parent node and what's a child node, which is helpful when you style things in CSS* or get things with jQuery**.

But I prefer to take him in the more philosophical sense of "think in trees"; as in, think in improving incrementally, like a tree growing. Or think in a tree's branches, so that all your ideas can spin off into other ideas. (Or, if you're using git, think in branches so that you always have some earlier version to go back to.) Or think in trees because sometimes--always and inevitably--you'll have to prune back your code to improve it.

Which is what I spent a fair amount of the morning doing. Today we started the third part of our Songify project, involving multiple tables in a database. It wasn't easy, particularly because the first change that I made involved me going back and changing a bunch of my old code. Which makes it a weird morning: not very productive in terms of code, but very educational in terms of re-viewing my code.

Today wasn't all sitting through: I did play two games of ping pong and did a lunch-time yoga. I'd be in really OK shape by the end of this program if I wasn't constantly eating.

* Cascading Style Sheets: a way to apply lots of formatting and structure to HTML.
** jQuery: a Javascript library specifically for working with online materials.

No comments:

Post a Comment