{math pun}...because it's generally considered a requirement.http://chrislusto.com/2016-06-09T10:44:00-04:00Chris LustoGit Pushhttp://chrislusto.com/git-push/2016-06-09T10:44:00-04:002016-06-09T14:52:36-04:00Chris Lusto<h1 id="git-push-">~ Git Push ~</h1>
<p>Lots of people seem to be disagreeing with things I said in <a href="http://chrislusto.com/lessons-for-other-people/">my last post</a>. That’s to be expected; I’m wrong a lot. But some of the disagreement appears to be with things I didn’t actually say. Or said poorly and intended in a different way. <a href="https://twitter.com/MrHonner">Patrick Honner</a>, as is his way, summed it up nicely:</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/Lustomatical">@Lustomatical</a> Generally speaking, reaction to your piece misunderstands GitHub, focuses too much on "lesson" as unit of collaboration.</p>— Patrick Honner (@MrHonner) <a href="https://twitter.com/MrHonner/status/740860198722633728">June 9, 2016</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I will take all of the blame for the part about misunderstanding GitHub. In retrospect, I definitely assumed too much familiarity with the tool. I was trying to avoid bloating an already long piece with a GitHub primer (of which there are several <a href="https://guides.github.com/activities/hello-world/">good ones</a>), and that led to some understandable confusion. A thousand apologies.</p>
<p>I will take <em>some</em> of the blame for the part about focusing too much on individual lessons. I did talk about individual lessons a bunch, and those passages seem to have stuck. But I am also going to wag my finger at <a href="https://twitter.com/ddmeyer?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Dan</a> (in a gentle and loving way) for this tweet/post:</p>
<blockquote class="twitter-tweet" data-partner="tweetdeck"><p lang="en" dir="ltr">Why Secondary Teachers Don’t Want a GitHub for Lesson Plans. Responding to <a href="https://twitter.com/Lustomatical">@lustomatical</a>'s proposal. <a href="https://t.co/DnMjUgUCdJ">https://t.co/DnMjUgUCdJ</a></p>— Dan Meyer (@ddmeyer) <a href="https://twitter.com/ddmeyer/status/740624584056004608">June 8, 2016</a></blockquote>
<p>I definitely did not call for a GitHub for lesson plans. I called for a GitHub for curriculum. And I laid out what I think is a careful line of reasoning about why those are very different beasts. Unfortunately, this turns out to be one of those situations where one word changes things in a big way. So it goes.</p>
<p>At any rate, I’m going to respond to a few general themes in the comments and try to clarify some of my remarks. I’m sure many people will still quite reasonably disagree, but hopefully with a more accurate snapshot of my brain state.</p>
<h6 id="sect-we-dont-need-another-lesson-sharingdownload-site">§ We don’t need another lesson sharing/download site.</h6>
<p>I agree with this. Mostly. A good one (whatever that might look like) could at a minimum increase the density of quality materials over the average Google search. I suspect that’s why people tend to like virtual filing cabinets — at least in theory — because it comes with some sort of built-in quality control (this person, on average, has things I like). That’s not nothing. But that’s also not at all what I’m talking about.</p>
<p>For one thing, I don’t think “lesson” is the appropriate unit of account. I used lesson examples in the original post because I think that’s the level at which teachers spend most of their authoring/adapting efforts. But I also think those efforts, to be maximally useful, have to take place within a curricular framework. In particular, I’m not suggesting a (not so) new way to cobble together your own VFC. I’m suggesting that, since teachers take ownership of their curriculum as a matter of course — very often in collaboration with colleagues — an efficient system for facilitating and managing that process is probably useful. I think that sentence is the minimal faithful reproduction of my claim. On top of that, I think a GitHub-like system could have other benefits (some below, some in the original post).</p>
<blockquote class="twitter-tweet" data-conversation="none" data-cards="hidden" data-partner="tweetdeck"><p lang="en" dir="ltr"><a href="https://twitter.com/ddmeyer">@ddmeyer</a> stuff like lesson study is so valuable, though. But lesson repository I guess feels like the worst of both worlds.</p>— Rachel (@Seestur) <a href="https://twitter.com/Seestur/status/740669110120534016">June 8, 2016</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>Many people are balking at the word “repository,” which has sort of a negative connotation in common usage that’s totally absent in the sense of something like GitHub. As in, my garage has become a repository for broken appliances, which isn’t awesome. And which also describes large portions of the internet. But a repository in this model is a living, breathing, collaborative thing. It’s my fault for not making that clearer from the get-go for people who don’t regularly use GitHub. This is not a holding tank. This is a system for integrating and tracking changes and that preserves important information typically lost to entropy.</p>
<p>But, hold on…</p>
<h6 id="sect-github-is-confusing-as-hell">§ GitHub is confusing as hell.</h6>
<p><a href="https://xkcd.com/1597/">It certainly is</a>. That the word “repository” has a highly domain-specific meaning is but the tip of the confounding iceberg that is GitHub. It’s an intentionally leaky abstraction layer over a version control system called <a href="https://git-scm.com/">Git</a>, which is itself a sieve-like abstraction over a particular data model.<sup id="fnref:primer"><a href="#fn:primer" class="footnote">1</a></sup> A quick <a href="https://git-scm.com/docs/git-rebase">peek at the documentation</a> should be enough to make your eyes bleed.</p>
<p><img src="/images/rebase.png" /></p>
<p>Rest assured, that’s just as opaque to a large group of people who use Git professionally as it is to you. Git persists,<sup id="fnref:game"><a href="#fn:game" class="footnote">2</a></sup> in spite of its basically non-existent user interface, because under the hood it’s very clever and efficient.</p>
<p>There’s a thriving cottage industry making tools that sit on top of Git to make it easier to use, with varying degrees of success. I think GitHub actually does a pretty good job. In my mind, the relevant features are:</p>
<ol>
<li>Discussion lives in the same place as source material, even inline if you want.</li>
<li>Great support for documentation, including wikis.</li>
<li>It’s trivial to compare differences across versions.</li>
<li>Tracking for issues, goals, and milestones.</li>
<li>Ease of integration with <a href="https://slack.com/">other tools</a>.</li>
<li>Total transparency in terms of who is doing and has done what, and when.</li>
<li>A complete history of every state of the project. Time travel, basically.</li>
<li>Parallel development that doesn’t involve stepping on everybody’s toes.</li>
</ol>
<p><br />
None of the confusing stuff about Git or GitHub actually matters in this discussion, because I’m not advocating for the use of GitHub. But a system that implements something like that set of features <em>supra</em> (and, since somebody would have to build this thing, whatever else we might want!) would be pretty useful.</p>
<p>Then again…</p>
<h6 id="sect-lessonsstudentsteachers-arent-software">§ Lessons/students/teachers aren’t software.</h6>
<p>Nope! But, again, I’m not necessarily in favor of GitHub as the ultimate solution. More importantly, I don’t think disanalogies between curriculum and software are particularly germane. GitHub is a platform that’s good for managing changes in large, complex, (primarily) text-based projects involving a bunch of collaborators. That it’s mostly used for software is a historical accident. Yes, it is incredibly well suited to the idiosyncrasies of software (by virtue of said historical accident), but it strikes me as a huge missed opportunity not to think about how a similar system <em>could</em> be suited to the idiosyncrasies of curriculum.</p>
<p>Okay, but even then…</p>
<h6 id="sect-other-peoples-stuff-doesnt-work-for-memy-kids">§ Other people’s stuff doesn’t work for me/my kids.</h6>
<p>First of all, I mention in the original piece that modifying stuff is just what teachers do as a part of their everyday practice. But this seems like an argument <em>in favor</em> of a system that lets you modify materials in a coherent, sustainable way.</p>
<p>It’s possible I’m misreading this argument, and people actually mean that they write all their own materials from scratch. I’m inductively skeptical about that, but I’m sure there are superproductive freaks out there who could totally pull it off. If you don’t collaborate on a curriculum, then I can understand why you’d find a collaborative curriculum tool unhelpful. I don’t think that’s a common situation, and I absolutely can’t see how that’s a generalizable solution.</p>
<p>Anyway, irrelevant because…</p>
<h6 id="sect-this-isnt-actually-a-solution-to-any-existing-problem">§ This isn’t actually a solution to any existing problem.</h6>
<blockquote class="twitter-tweet" data-partner="tweetdeck"><p lang="en" dir="ltr"><a href="https://twitter.com/mpershan">@mpershan</a> <a href="https://twitter.com/ddmeyer">@ddmeyer</a> <a href="https://twitter.com/Lustomatical">@lustomatical</a> In tech, we used to call this "a solution in search of a problem."</p>— CheesemonkeySF (@cheesemonkeysf) <a href="https://twitter.com/cheesemonkeysf/status/740648935383916544">June 8, 2016</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>That’s fair. Certainly not all the problems I find problematic are universal, or even widely applicable. But I wish I would’ve had something better last year as the algebra team collaborated on planning and materials with our ad hoc, multi-platform, system with a bunch of almost-right tools. That was a big impetus for the last section of the piece. If that’s not a problem for you, I agree this wouldn’t be a solution for you. And that’s okay; just ignore it. But I also can’t imagine I’m unique in wanting something more.</p>
<p>However…</p>
<h6 id="sect-isnt-this-just-a-way-for-publishers-to-exploit-labor">§ Isn’t this just a way for publishers to exploit labor?</h6>
<blockquote class="twitter-tweet" data-conversation="none" data-cards="hidden" data-partner="tweetdeck"><p lang="en" dir="ltr"><a href="https://twitter.com/Lustomatical">@Lustomatical</a> <a href="https://twitter.com/abusch38">@abusch38</a> Yeah. Question remains, tho. The value in either system mostly accrues to publishers. What's the incentive for T's?</p>— Dan Meyer (@ddmeyer) <a href="https://twitter.com/ddmeyer/status/740910121472004096">June 9, 2016</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>Well, almost certainly yes and no. Every human interaction provides an opportunity for somebody to exploit somebody else. Setting up systems that actually <em>facilitate</em> that opportunity is — I’ll go out on a limb here — a Bad Thing. Publishers certainly have incentives to crowd-source unpaid work, but I think there are incentives distributed along the path from publisher to individual teacher.</p>
<p>First of all, upstream changes aren’t mandatory. Nobody is going to force teachers to do any work for anyone other than themselves. And not even that, really: you don’t have to do <em>anything</em> different if all you want is to receive a curriculum like the good ol’ days. But an good upstream change will then make its way downstream to other users. So yes, an individual teacher might do some work that benefits the publisher, but also benefits the entire user base. Maybe more to the point for most, it would just be easier to contribute changes that benefit your local community — however you might define it. The incentives for community contribution are roughly the same as they’d be anywhere, and there’s evidence those incentives <a href="http://function-of-time.blogspot.com/2013/06/rock-stars-and-gift-culture.html">matter to people</a>.</p>
<p>There are also folks in between who handle curriculum coordination at various levels of school hierarchies, but since I’ve never been in any of those positions, I’ll just gently speculate that some consistency and transparency about who’s actually using and doing what might be helpful.</p>
<h6 id="sect-this-sounds-like-a-lot-of-work">§ This sounds like a lot of work.</h6>
<p>This is a good objection, but one that’s highly dependent on specific implementation details that I haven’t even begun to wrap my head around.</p>
<p>In one sense, it’s trivially zero percent more work. Just fork your curriculum, never touch a thing, and life goes one. Or make/modify all the stuff you want, never bother to propose or accept changes for or from anyone else, and life goes on. You don’t have to play the larger game that’s made possible by the tool in order to use other good features of the tool. GitHub admits a lot of different styles and workflows, and I think part of its success is due to its robustness across a range of use cases. Something <em>like</em> that, geared specifically toward curriculum, seems to me worth exploring.</p>
<p>But if the participatory nature of this thing intrigues you, the costs<sup id="fnref:broad"><a href="#fn:broad" class="footnote">3</a></sup> of implementation matter a great deal. I suspect there’s a way to spread those costs over the system (for instance curriculum folks at the school/district level likely need to absorb a significant portion) that doesn’t make it untenable for individual teachers. If that turns out to be false, then this was a fun thought experiment and we should go think about something else.</p>
<p>Speaking of which…</p>
<h6 id="sect-haha-i-used-to-think-that-too">§ Haha, I used to think that, too.</h6>
<p>The argument I found most compelling came from <a href="https://twitter.com/holden">Mike Caulfield</a> on Twitter, who has <a href="https://hapgood.us/2014/03/05/current-design-of-the-federated-classroom-wiki-as-of-today/">actually implemented something like this before</a>, and then <a href="https://hapgood.us/2016/06/02/prism-a-proposal-for-a-choral-approach-to-oer/">significantly walked it back</a>. I’ll let him speak for himself.</p>
<h6 id="sect-final-thoughts">§ Final Thoughts</h6>
<p>I hope that cleared some things up. If nothing else, it helped me hone my own thinking a bit, which is always good. I said in the original post that I think this suggestion is wrong in some specific and important ways, but probably right in general. I still think that’s true, but I don’t want to downplay the fact that the specific ways it’s wrong might be so great that the general rightness is irrelevant.</p>
<p>Here’s something I’m more confident in: we’re going to have to figure out our relationship to publishers and each other as high-quality, fully formed open curricula become available. There are <a href="https://twitter.com/bowenkerins">some</a> very <a href="https://twitter.com/k8nowak">smart</a> people hard <a href="https://twitter.com/Mythagon">at work</a> on this <a href="https://twitter.com/calcdave">problem</a>.</p>
<p>It’s coming. What do we want to do with it?</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:primer">
<p>This is the kind of sentence I was trying to avoid in the original piece. <a href="#fnref:primer" class="reversefootnote">↩</a></p>
</li>
<li id="fn:game">
<p>It’s <a href="https://subversion.apache.org/">not</a> the <a href="https://www.mercurial-scm.org/">only</a> game in town, by the way. <a href="#fnref:game" class="reversefootnote">↩</a></p>
</li>
<li id="fn:broad">
<p>…interpreted in the broadest possible way. <a href="#fnref:broad" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>
Lessons for Other Peoplehttp://chrislusto.com/lessons-for-other-people/2016-06-07T14:56:00-04:002016-06-07T15:10:50-04:00Chris Lusto<h1 id="lessons-for-other-people-">~ Lessons for Other People ~</h1>
<h6 id="sect-launch">§ Launch</h6>
<p>For just about three years I wrote <a href="http://mathalicious.com/">math lessons</a> that I wasn’t sure I’d ever teach. It’s a strange exercise, writing lessons for other people. The big experience we think of as INSTRUCTION reduces, at the tactical level, to a series of conversations among a particular group of human beings in various states of mathematical maturity. Trying to facilitate those conversations without immediate access to the relevant humans is hard.<sup>[<a href="https://xkcd.com/285/">citation needed</a>]</sup> It made me uncomfortable, in the best and worst ways, personally and professionally. It also provided me an interesting view of the curricular landscape. After a humiliating number of failed attempts to catalog my time in deep and frustrating contemplation of what curriculum is and how it actually functions, here are some things that I currently think. I think.</p>
<h6 id="sect-creep-and-retreat">§ Creep and Retreat</h6>
<p>There’s a phenomenon in consumer economics known as <a href="https://en.wikipedia.org/wiki/Feature_creep"><em>feature creep</em></a>: the tendency for products to accumulate new features beyond the point of usefulness, desirability, and sometimes sanity. Your remote control is probably an instructive example. I count 61 buttons on mine, excluding those with multiple degrees-of-freedom or combinations involving the <code>SHIFT</code> key. I’m not certain how many I actually use, but considerably fewer than that. For sure.</p>
<p>I own this monstrosity because there’s often a significant gap between what we actually want or need a product to do and what we require of a product in order for it to entice us in the marketplace. If you ask professional DVD remote engineer to design a DVD remote, there’s a good chance you’ll end up with something nuts. A professional DVD remote engineer must satisfy not only your actual consumer needs, but also your <em>perceived</em> consumer needs — needs that are sometimes created right there on the spot for the sole purpose of being immediately satisfied.<sup id="fnref:murrica"><a href="#fn:murrica" class="footnote">1</a></sup> And so you end up with a contraption that lets you watch your movies backwards at three-quarter speed with Esperanto subtitles rotated 90° clockwise. Because the professional DVD remote engineer knows, from experience, that given the choice between <em>that</em> contraption and one that only lets you watch your movies backwards at three-quarter speed with Esperanto subtitles in <em>unrotated</em> text,<sup id="fnref:sucker"><a href="#fn:sucker" class="footnote">2</a></sup> you’ll pick the first one nine times out of ten. Especially if they’re right next to each other on store shelves. Which, of course, they are.</p>
<p>If, on the other hand, you ask an average user to design his or her own personal DVD remote, you’ll likely end up with buttons that (exhaustively) play, pause, stop, rewind, fast-forward, skip chapters, and eject. You’ll end up with (only) those buttons because they cover 99% of use cases for a normal human being who wants to watch a DVD on planet Earth.</p>
<p>The things we want to use and the things we want to buy are often very different. Of course what we want to <em>buy</em> wins out — almost by definition — and so we’re stuck with products that are easy to desire but hard to wield. Like a hoarder who’s convinced that someone, someday, will desperately require that terrarium full of bottle caps, we end up buried under the ghosts of hypothetical need.<sup id="fnref:cat"><a href="#fn:cat" class="footnote">3</a></sup></p>
<p>Curricular materials are consumer products. They suffer from the same gap and are subject to the same pressure. Except the curriculum situation is even worse, because the pressure can operate in opposing directions. For some consumers, features creep in the ordinary way: they see materials with more scaffolding, more steps, more structure, and think they’re getting a bargain. The apparent bang/buck ratio gets high enough that the bucks seem justified. As a result, you get lessons or activities that feel increasingly stifling, claustrophobic, overdetermined. Hands are tipped too early. The author or teacher is doing work that might be better left to the student.</p>
<p>But for a certain subset of consumers, many of those same features scan as bugs. When these folks evaluate materials, their internal voices whisper things like <a href="http://blog.mrmeyer.com/2009/asilomar-4-be-less-helpful/"><em>Be less helpful</em></a>. They want activities that students can shape to their own thinking. They want lesson structures to emerge organically rather than come fully formed, hard-coded by the creator. They want to offer a simple prompt and watch the class <a href="http://mathforum.org/workshops/universal/documents/notice_wonder_intro.pdf">notice and wonder</a> its way to discovery. They want…less. But then teachers end up working in a potentially uncomfortable space with very little in the way of lumbar support. The specter of amorphous time looms large. Planning for ill-defined possibilities gets hard quickly. Let’s call this phenomenon <em>feature retreat</em>.</p>
<p>The important point is this: in either case features are being pushed in the wrong direction, or at least too far in one of those directions. Assuming there’s some optimal level of structure/scaffolding/buttressing, creep and retreat both urge users toward products they’ll find problematic in the wild, and authors find themselves struggling to toe an impossibly thin line between adequate support and adequate flexibility. All while trying to make “adequate” seem marketable.</p>
<p>Here’s the fundamental — and potentially unresolvable — problem of curriculum design: it might be impossible to right-size the feature list for math lessons on anything approaching a universal scale. The best that authors can hope for is to provide a structure that’s easily adaptable by an individual teacher as she feels around for her own personal feature list in real time. In today’s technological climate, this problem has some interesting consequences for both teachers and authors.</p>
<h6 id="sect-the-cult-of-customization">§ The Cult of Customization</h6>
<p>I said “the best” back there as if it were well defined, but even in such a narrow sense that’s pretty obviously dumb. Sell sheets for curricular materials are longer than one sentence precisely because they claim to solve a bunch of pedagodical problems simultaneously. If a product aspires to serious consideration, it has to do more than rescue individual teachers from having to create all their own stuff<sup id="fnref:stuff"><a href="#fn:stuff" class="footnote">4</a></sup> — regardless of how much opportunity there is for arbitrary customization or how easy that opportunity is to realize. The rise of customization has increased the tension between creators and consumers of curriculum in a way that threatens the very notion of “curriculum” in the first place. Maybe that’s a good thing, maybe not. It’s complicated.</p>
<p>For intance, one thing you’re ostensibly paying for when you invest in curriculum is some kind of unifying vision. That vision could be methodological (<a href="https://www.kendallhunt.com/discoveringmathematics/">the <em>Discovering Mathematics</em> series</a>), schematic (<a href="https://connectedmath.msu.edu/">the Connected Mathematics Project</a>), philosophical (<a href="http://cpm.org/">College Preparatory Mathematics</a>)<sup id="fnref:rebranding"><a href="#fn:rebranding" class="footnote">5</a></sup> — all kinds of adjectives — but it’s part of what makes a curriculum more than a collection of items.<sup id="fnref:ml"><a href="#fn:ml" class="footnote">6</a></sup> An intentional, high-level view of some region of the mathematical landscape is what gives us hope and/or confidence that our students can come to appreciate the same vantage. It might actually be <em>the</em> thing you’re paying for.</p>
<p>So at this point I’m in the common and somewhat awkward position of having said two reasonable and mutually exclusive things: (1) It’s desirable for teachers to have some level of practical influence over their materials, and (2) It’s important for those materials to faithfully represent the principles that form their foundation. Teachers aren’t going to be particularly satisfied without (1); authors aren’t going to be particularly effective without (2). Like I said, complicated.</p>
<p>It comes down to control. Creators have a lot of it — for obvious reasons — and until relatively recently they had a lot more. The move toward open resources, along with the technologies and networks that have led to their proliferation, means that teachers can increasingly exercise control in curation and adaptation.</p>
<p>For many teachers, curriculum now functions more like a playlist than an album: assemble some greatest hits, arrange them in a pleasing order, and hit play. No junk. No filler. In a world where <a href="http://www.theguardian.com/commentisfree/2014/jul/30/album-is-dead-long-live-playlists">the studio album is dead</a> and the raw material for compilation is so abundant, this seems like a self-evidently reasonable strategy.</p>
<p>Of course abundance is a major part of the problem with this emergent freedom. A quick<sup id="fnref:quick"><a href="#fn:quick" class="footnote">7</a></sup> Google search for “math lessons” turns up 96 million results — <a href="https://www.apple.com/pr/library/2013/02/06iTunes-Store-Sets-New-Record-with-25-Billion-Songs-Sold.html">almost four times the number of songs in the iTunes store</a>. That’s an awful lot of noise to scan for your particular signal. And, even if you manage to find it, the process of compilation <a href="https://www.youtube.com/watch?v=IzQwbRdh5Ts">is a very subtle art</a>. It’s incredibly hard to organize something lucid and meaningful from a collection of disparate minds and voices. To do it right is probably not any easier or less time-consuming than starting from scratch, which most teachers would agree is a deal-breaker.</p>
<p>Curriculum developers function as a pressure valve for teachers who already have <a href="http://mathforum.org/blogs/max/if-instruction-matters-so-much-why-dont-teachers-get-time-to-plan-it/">too many other things to worry about</a>. They not only create the discrete units of consumption (which enterprise, based on the numbers cited above, teachers are plenty willing to reclaim a sizable chunk of), but also handle the crucial and unsexy job of assembling them into a coherent whole. To put a finer point on it: given the considerable<sup id="fnref:lightly"><a href="#fn:lightly" class="footnote">8</a></sup> non-curricular demands teachers face, they just aren’t equipped to perform what would amount to a second full-time job. At least not as well as someone — more likely a team of someones — doing it as a first full-time job.</p>
<p>Instead, or additionally, teachers can roughly accept an extant curriculum but adapt it at the level of the individual lesson or task. That’s not really theoretical; it’s simply what teachers do every single day. Few teachers, in few cases, decide that some piece of curricular magic is unimprovable for a particular classroom situation. It’s just that now the tools for making, organizing, and sharing those edits are the best they’ve ever been and continue to improve rapidly.<sup id="fnref:pearson"><a href="#fn:pearson" class="footnote">9</a></sup></p>
<p>But there’s only so much changing of individual pieces you can do before you start to affect things on a macro level. You quickly run into a <a href="https://en.wikipedia.org/wiki/Ship_of_Theseus">Ship of Theseus</a> problem, at which point what curriculum are you really using? Or — if you’re a developer — what are you even selling?</p>
<p>In any case, the idea of authorial vision is fundamentally at odds with consumer adaptation. So here we are in this situation where authors can’t (a) write materials with optimal support, or (b) offer too much opportunity for customization without sacrificing the unifying thread that makes for a coherent user/student experience. It’s fun to speculate about what’s going to give, but it’s seeming more and more that something has to.</p>
<h6 id="sect-the-barthes-ultimatum">§ The Barthes Ultimatum</h6>
<p>One obvious solution to the difficulties surrounding authorship is simply to kill off the author.<sup id="fnref:violence"><a href="#fn:violence" class="footnote">10</a></sup> Or at least the idea of an author as not only the originator of content, but as its perpetual source of authority.<sup id="fnref:authority"><a href="#fn:authority" class="footnote">11</a></sup> A good piece of content is strong enough to stand on its own, thank you very much, and the details of who created it or why or how are largely incidental to its inherent goodness. Essentially, content is a <em>sola scriptura</em> kind of deal.</p>
<p>Ignoring for a moment that pieces of content do not a curriculum make, having lessons run around on their own in the wild comes with its own set of issues. Take, for instance, perpetual <a href="https://twitter.com/search?q=%23mtbos">#MTBoS</a> darling “Barbie Bungee.”<sup id="fnref:italics"><a href="#fn:italics" class="footnote">12</a></sup> In a recent study wherein I thought for a minute about the most blogged-over lessons in history, it’s definitely in the top five. If you’re interested, you can easily find <a href="https://www.google.com/search?q=barbie+bungee&oq=barbie+bungee&aqs=chrome.0.69i59j69i61j69i60.2449j0j1&sourceid=chrome&es_sm=119&ie=UTF-8">a whole bunch</a> of community implementations to help you prepare. But here again the paradox of choice rears its head. Which one is right for you? And an often more pressing concern: where should you turn for support?</p>
<p>Smaller, shall we say <em>boutique</em>, lessons are less overwhelming. Like maybe Matt Vaudrey’s lovable “<a href="http://mrvaudrey.com/tag/mullet-ratio/">Mullet Ratio</a>.” Having a more or less canonical version is really nice, and part of its lovability — at least for me — is knowing that it’s Matt’s. But if you’re looking for someone or something to turn to in a moment of pedagogical need, you’re pretty much stuck hoping Matt is free. Or doing a bunch more Googling.</p>
<p>It would be great if we could find a way to combine centralized support with community contribution for open curricular resources.</p>
<h6 id="sect-mathub">§ MatHub</h6>
<p>I’m about to make a suggestion that’s wrong in specific and important ways, but probably right in general. We need <a href="https://github.com/">GitHub</a> for math curriculum.</p>
<p>To say that the community repository model has done wonders for open source software is a massive understatement. To what extent that success translates to curriculum I’m obviously unsure, but I have randomly-ordered reasons to suspect it’s appreciable:</p>
<ol>
<li><strong>Centralized support with decentralized control.</strong> Materials have a canonical home and form, but it’s trivially easy to create and adapt local forks. You can make your own stuff without starting from scratch, or assemble your own stuff without having to build a framework.</li>
<li><strong>Modifications are automatically integrated.</strong> Changes at the local level aren’t just tacked or collected in a secondary place. And they don’t need to be tracked or disseminated.<sup id="fnref:tracked"><a href="#fn:tracked" class="footnote">13</a></sup> The moment modifications are made, they’re fully integrated into a new product and are immediately available across users.</li>
<li><strong>Ease of rolling back failed experiments.</strong> You’re never locked into something that sucks, so experimentation is essentially zero-risk. If version B turns out to be terrible, rolling back to version A takes about five seconds.</li>
<li><strong>Simple system for managing differentiation.</strong> We’re talking about a steroidal version control system here, so it’s not surprising that the managing multiple versions is a big win. Create a parallel branch for students who need modified assessment materials, or one with some minor modifications for 3rd-period. Importantly, <em>you</em> get to decide what level of granularity makes sense.</li>
<li><strong>Both downstream and upstream improvements.</strong> If you like something that’s changed in the main repository, just pull it into your fork (or, if you don’t, don’t) instantly. But if you make some local changes that might benefit the overall project, you can <em>also</em> submit them upstream for inclusion in the canonical version. With the current setup (even among OER), that’s approximately 100% impossible.</li>
<li><strong>Discussion and decision points persist.</strong> Since everything is always a work in progress, there’s no incentive or expectation for contributors to hide their rough-draft efforts. Discussions, disagreements, and justifications about important (or un-) decisions are just part of the package: always there, transparently awaiting your inspection whenever you wonder, “What the hell were they thinking?”</li>
<li><strong>Low barriers to entry.</strong> Anyone can participate in creation or curation of materials, or at least be well informed about what’s going on, without any kind of privileged status in the curricular universe.</li>
<li><strong>At worst, it’s at least as good as the status quo.</strong> The system makes all these great things <em>possible</em>, but it doesn’t make them <em>mandatory</em>. Not only are modifications locally low-risk, the apparatus is itself globally low-risk. You can just accept an extant curriculum as-is (in which case you’re in roughly the same position you’ve always been in), or you can ride the bleeding edge. Or you can settle somewhere in between.</li>
</ol>
<p>Most crucially (so I’ll break it out of the bulleted list), collaboration is built into the DNA. I said “you” a lot in that list, but only because English lacks a distinct plural second-person pronoun. “You” could be your algebra team, or your math department, or your district curriculum folks, or…you. The whole point of community curriculum repositories would be for a group of education professionals using their collective expertise to take ownership of curriculum in a sustainable way.</p>
<p>There are certainly many important obstacles to a system like this. Somebody still needs to create quality, coherent, base curricula to start from (and decide which kinds). Those people need particular expertise and availability beyond that of the average classroom teacher. They need incentives. Repositories need to be actively and expertly maintained. Key personnel still need to fill key rolls, lest we end up with another <a href="https://www.teacherspayteachers.com/">worksheet boneyard</a> or ironically named <a href="http://betterlesson.com/">BetterLesson</a>. Burnout in this arena <a href="https://news.ycombinator.com/item?id=8712035">is real</a>, so maybe let’s not heap that on top of people in a profession with a five-year half-life as it is. And none of this will solve the problem of companies trying to make a dollar <a href="https://github.com/expressjs/express/issues/2844">on the backs of hardworking open-source creators and maintainers</a>.</p>
<p>The implementation details are, shall we say, unresolved.</p>
<p>But here are some things that <em>aren’t</em> obstacles: the technological infrastructure for massively distributed, real-time collaborative systems; <a href="https://www.illustrativemathematics.org/">resources</a> and <a href="https://teacher.desmos.com/">platforms</a> for building <a href="http://mathalicious.com/">rich content</a>; or a <a href="https://twitter.com/search?q=%23mtbos&src=typd">large and connected community of thoughtful professionals</a>. With those things in place (and always improving), I have a hard time imagining barriers that are insurmountable — to whatever future. I’m so curious about what that’s going to look like.</p>
<hr />
<!-- Footnotes -->
<div class="footnotes">
<ol>
<li id="fn:murrica">
<p>‘Murrica. <a href="#fnref:murrica" class="reversefootnote">↩</a></p>
</li>
<li id="fn:sucker">
<p>Like a <a href="https://translate.google.com/#eo/en/naivulo"><em>naivulo</em></a>. <a href="#fnref:sucker" class="reversefootnote">↩</a></p>
</li>
<li id="fn:cat">
<p>And typically at least one dead cat. <a href="#fnref:cat" class="reversefootnote">↩</a></p>
</li>
<li id="fn:stuff">
<p>Although that’s a pretty important selling point for everyone involved in this transaction. <a href="#fnref:stuff" class="reversefootnote">↩</a></p>
</li>
<li id="fn:rebranding">
<p>Which seems to have undergone a <a href="https://en.wikipedia.org/wiki/3M">3M-like abbreviation rebranding</a>, but still. <a href="#fnref:rebranding" class="reversefootnote">↩</a></p>
</li>
<li id="fn:ml">
<p>Because we always intended our lesson library to be supplemental, the vision at Mathalicious took a less holistic form. It was<sup id="fnref:past"><a href="#fn:past" class="footnote">14</a></sup> certainly philosophical (i.e., a supremely important reason for studying mathematics is that it equips you to better engage in meaningful thought and discourse about the world), but mostly it was a narrative vision at the level of the individual lesson. We were at least as much a storytelling company as a curriculum company; we just happened to be telling stories made possible — or at least more deeply satisfying — by a hefty dose of 6 - 12 math. <a href="#fnref:ml" class="reversefootnote">↩</a></p>
</li>
<li id="fn:quick">
<p>≈340 ms <a href="#fnref:quick" class="reversefootnote">↩</a></p>
</li>
<li id="fn:lightly">
<p>To put it rather lightly. <a href="#fnref:lightly" class="reversefootnote">↩</a></p>
</li>
<li id="fn:pearson">
<p>Even when curriculum companies try to make things <a href="https://twitter.com/Lustomatical/status/659751397609644032">infuriatingly difficult</a>. <a href="#fnref:pearson" class="reversefootnote">↩</a></p>
</li>
<li id="fn:violence">
<p>Sometimes violence <a href="https://en.wikipedia.org/wiki/World_War_II">does indeed solve problems</a>. <a href="#fnref:violence" class="reversefootnote">↩</a></p>
</li>
<li id="fn:authority">
<p>Relevant here is <a href="http://wilson.med.harvard.edu/nb204/AuthorityAndAmericanUsage.pdf">D.F. Wallace on B.A. Garner</a> and authority vs. Authority. <a href="#fnref:authority" class="reversefootnote">↩</a></p>
</li>
<li id="fn:italics">
<p>The major style guides are silent on whether lesson titles should be quoted or italicized. They seem to me closer to poems or short stories than novels. <a href="#fnref:italics" class="reversefootnote">↩</a></p>
</li>
<li id="fn:tracked">
<p><code>Slope_Intercept_Form_Lusto_version4(FINAL)(FINAL FINAL)(ACTUALLY FINAL).docx</code> <a href="#fnref:tracked" class="reversefootnote">↩</a></p>
</li>
<li id="fn:past">
<p>I’m going to talk about Mathalicious in the past tense even though it is — at the time of writing — still a very present-tense sort of thing, only because I’m probably no longer qualified to speak to its current philosophical state. <a href="#fnref:past" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>
The Journey and the Strangerhttp://chrislusto.com/the-journey-and-the-stranger/2015-12-05T11:23:00-05:002016-06-07T15:14:03-04:00Chris Lusto<h1 id="the-journey-and-the-stranger-">~ The Journey and the Stranger ~</h1>
<h6 id="sect-an-unusual-classroom">§ An unusual classroom</h6>
<p>Marty is hunched over a protractor, squinting hard at the angles on his paper and muttering to himself. Ben takes notice and fires off a smartass remark I don’t quite catch from the rickety desk where I’m checking their work. When Ben turns his back, Marty overhands a half-empty water bottle at him but misjudges — all that squinting, maybe — and leaves it a foot short. Off to my right, Zach is filming the exchange, managing somehow to mug from <em>behind</em> the camera. I look up at them and shake my head.</p>
<p>Welcome to my “classroom.” Today my Marines and I are lobbing artillery shells into the black hole at the center of Camp Pendleton responsible for soaking up all the light and heat that used to be, in its very recent past, steel and Composition B.</p>
<p>We’re riding the tail of a three-day exercise and look it, each of us at a slightly different point in an accelerating nicotine cycle. When the radio mercifully interrupts with new targeting info, everybody hops up. Or hops in. Population density is a constant concern in our makeshift Fire Direction Center — really just a canopy wedged between two humvees — so we spend a lot of time at its open edges. Facing out, if possible. We’re preparing to do this again someday soon, somewhere real.</p>
<h6 id="sect-both-sides-of-a-story">§ Both sides of a story</h6>
<p>Tolstoy said that all great stories are either about a man going on a journey or a stranger coming to town. But those two narratives are perfectly symmetrical, distinguishable only by point of view. For a military veteran, that makes the high school classroom an interesting place to work. I have no choice but to signify both: to my students, the journey; to my colleagues, the stranger.</p>
<p>When adults learn that I was a Marine officer before becoming a teacher, the first thing that happens is I have to answer a series of polite questions about how disorienting the transition must have been. The obvious implication being that those two identities seem so wildly disparate as to be incompatible. And when I say — as I always do — that it’s really not so different, it takes a beat for people to realize I’m not trying to be funny.</p>
<p>Of course there are some superficial differences. The night before Zach shot that video I gave a class out under the stars, assisted by a pair of headlights. Afterward I started back toward my sleeping bag and, in a state of cervine blindness, tumbled promptly into an ammunition pit. That sort of hazard is less common these days.</p>
<p>But, fundamentally, my job is the same. Military leadership and teaching are more about human relationships than anything else. The details of setting and purpose and dress code are almost incidental. If other teachers have difficulty relating to my experience, it’s only because when we contemplate our counterfactual life stories it’s the details that give our fantasies purchase. And the particulars of military life — especially in the context of two simultaneous and protracted wars — are unimaginable to most. That I could move so readily from that world to this one must be unsettling. I imply an uncomfortable closeness with the unknown.</p>
<p>Students, for their part, tend mainly to be astonished that I would ditch a job that not only allowed but actually <em>required</em> me to explode things, all so I could spend my days talking about algebra. They still see the military world as alien, but auspiciously so. After all, for someone at the beginning of a journey the unknown isn’t discomfiting; it’s aspirational. It’s the whole point.</p>
<p>A couple years ago I showed Zach’s video to my classes on Veterans Day. It was a big hit. The kids got to see what I looked like at 23. Joking around. Being serious. Happy. Exhausted. Helping people with their work. In other words, they got to see <em>me</em> — pretty much the same guy they shared a room with every day.</p>
<p>But as the clip went on, they spent more and more time focusing on my Marines — most of them not much older than high school kids themselves. They offered words of solidarity when Marty pressed both palms against his eyes, sore from 72 hours of what amounts to loud, high-stakes geometry homework. They laughed when Zach suddenly turned the camera on himself, thrilled to recognize a human impulse that predates the word <em>selfie</em>. They saw, I think, what strangers look like before we feel compelled to name them.</p>
<p>That video is ten years old now. I live a half-hour from where I grew up and teach math in the same building where I learned a good bit of it. Zach is back home in Illinois. I don’t know where Ben ended up. Marty is gone. We’re all on the far side of a journey we started a long time ago, standing at the edges of something or other. Facing out.</p>
<hr />
<p>Note: A different version of this piece originally appeared <a href="http://www.pbs.org/newshour/updates/marines-perspective-students-astonished-ditch-job-required-explode-things/">on the PBS NewsHour blog</a>.</p>
Not Quite in Defense of Number Cubeshttp://chrislusto.com/not-quite-in-defense-of-number-cubes/2015-11-16T17:47:00-05:002015-11-24T16:35:19-05:00Chris Lusto<h1 id="not-quite-in-defense-of-number-cubes-">~ Not Quite in Defense of Number Cubes ~</h1>
<h6 id="sect-what-the-hell-is-a-number-cube">§ What the hell is a number cube?</h6>
<p>I don’t think about number cubes very often, but when I do I get angry. I can usually manage a few relatively peaceful months, and then something like this happens:</p>
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">why do these high school probability questions keep calling a 6 sided dice a "number cube". That's dumb.</p>— Rhett Allain (@rjallain) <a href="https://twitter.com/rjallain/status/656258746633572352">October 20, 2015</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>And Rhett’s right: that’s dumb. We should all get up in arms about how dumb it is. Which we do. Anecdotally, there are two main reasons people get upset. The most common response, from People Who Know These Sorts of Things, is that the word “die” is too closely associated with gambling for curriculum companies to utter it in public — which is both ridiculous and believable. The other major complaint, from People Who Like Language, is that we already have a perfectly serviceable word for this item, so there’s no need to introduce a superfluous noun phrase that sounds jargony and lame.</p>
<p>But if I turn down the volume on my cynicism for a minute, I can think of at least two reasons why “number cube” isn’t the absolute worst.</p>
<h6 id="sect-number-polyhedron">§ Number Polyhedron</h6>
<p>Number cubes are geometrically well defined in a way that dice aren’t. Any <a href="https://en.wikipedia.org/wiki/Platonic_solid">Platonic solid</a> makes a good die, so if you want to talk about the cubic variety,<sup id="fnref:hs"><a href="#fn:hs" class="footnote">1</a></sup> that requires some qualification. “Six-sided die” is probably your best bet, which is even clunkier than “number cube.”<sup id="fnref:clunkier"><a href="#fn:clunkier" class="footnote">2</a></sup> “Cubic die” should work, but that’s not in common usage either — and doesn’t strike me as a major improvement. If we’d rather not modify “die,” our other option is to modify “cube.” Since we’re talking about a cube with numbers on it, “number cube” is actually pretty straightforward.</p>
<p>Look, I still don’t love it. I’m just saying that, if we want to <a href="http://www.corestandards.org/Math/Practice/#CCSS.Math.Practice.MP6">SMP6</a> like responsible math educators, our two immediate avenues — limiting the scope of “die” or augmenting the nature of “cube” — are both a little awkward, and I don’t see a compelling reason to hate “number cube” more than “cubic die.” Certainly not to the lopsided extent that people <em>really</em> seem to hate “number cube.” </p>
<h6 id="sect-what-the-hell-is-an-inning">§ What the hell is an inning?</h6>
<p>Here in the U.S. of A. we tend to use a lot of games as examples when we talk about probability.<sup id="fnref:usa"><a href="#fn:usa" class="footnote">3</a></sup> That makes sense: it’s a setting where most people have likely had some kind of tangible experience with a subject that’s <a href="https://en.wikipedia.org/wiki/Monty_Hall_problem">notoriously counterintuitive</a>. Of course experience is a highly subjective thing, which can mean trouble.</p>
<p>In college I took a probability course that included four students from China. Our first exam had a multi-part question about a hypothetical double-header between the Mets and Yankees. The minute our poor professor finished handing out the papers, he turned to see many frantic waving hands from the Chinese delegation. <em>What is an at-bat? How and why does one become out in an inning? So the pitcher throws the ball, but then sometimes it isn’t a ball? When does the two-headed person enter the game?</em></p>
<p>By the end of the pre-test clarifying questions, we had covered a significant portion of the major league rule book<sup id="fnref:fly"><a href="#fn:fly" class="footnote">4</a></sup> and eaten up thirty minutes of exam time. All so we could (finally) get on with the business of calculating the probabilities of some compound events.</p>
<p>I’m <a href="http://blog.chrislusto.com/?p=792">a fan of context</a> in math tasks, but there’s always the possibility for it to alienate a (potentially large) subset of students. If context improves a problem to the extent that it justifies its own risk, it offers a net gain. Since the notion of “die” is sensitive to experience — I can imagine a student (correctly) arguing that the probability of rolling a pair of threes is 1/400 — and already highly artificial, I see no real harm in replacing it with a slightly more neutral artificiality. The risk of die confusion, though small, doesn’t have much of an upside. Why not do away with it?</p>
<p>So yes, number cubes are still dumb, but we can probably ease up a bit. We have more pressing concerns. Somewhere there’s a two-headed shortstop running amok.</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:hs">
<p>Which, if we’re committed to complaining about high school curriculum, is basically what we’re dealing with. <a href="#fnref:hs" class="reversefootnote">↩</a></p>
</li>
<li id="fn:clunkier">
<p>Both orthographically and syllabically. <a href="#fnref:clunkier" class="reversefootnote">↩</a></p>
</li>
<li id="fn:usa">
<p>That’s possibly true in lots of countries, but this is the only place I’ve ever learned or taught math. <a href="#fnref:usa" class="reversefootnote">↩</a></p>
</li>
<li id="fn:fly">
<p>Fortunately, the infield fly rule wasn’t in effect at any point during the test. <a href="#fnref:fly" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>
Working with Expressionshttp://chrislusto.com/desmos/working-with-expressions/2015-10-17T21:54:00-04:002015-11-24T16:35:19-05:00Chris Lusto<h1 id="working-with-expressions-">~ Working with Expressions ~</h1>
<p>In this post we’ll start programmatically manipulating the calculator a bit. Basically, we’ll take what you already know about using the calculator and translate that into code.</p>
<p>Before we go any further, I should say that the fine folks at Desmos have written some excellent <a href="https://www.desmos.com/api/v0.5/docs/index.html">API documentation</a> — complete with examples — which you should consult liberally. Turns out they know a lot about programming and stuff.</p>
<p>This post assumes that you already know how to get up and running with the Desmos API. If that’s not the case, I’ve got you covered <a href="http://chrislusto.com/desmos/desmos-for-absolute-beginners/">over here</a>.</p>
<p>If you want to see a live example of just one (mostly useless) thing that’s possible, here’s a <a href="http://bl.ocks.org/ctlusto/ee07fe718230cd4f71f4">color-shifting timer</a> based on updating Desmos expressions.</p>
<h6 id="sect-the-basic-unit-of-desmosing">§ The Basic Unit of Desmosing</h6>
<p>When you work with the calculator, most of what you do is interact with the expressions list. This thing:</p>
<p><img src="/images/expressions.png" /></p>
<p>The expression is really the atom of the Desmos universe. It might be a paramter,<sup id="fnref:slider"><a href="#fn:slider" class="footnote">1</a></sup> a function definition, a table, or what a mathematician might properly call an “expression.” For reference, here’s a <a href="https://www.desmos.com/api/v0.5/docs/index.html#document-expressions">list of expression types</a>, but the best way to see what expressions do/are is to play around with the calculator.</p>
<p>In the web app, you manipulate expressions directly by typing or dragging them around. We can do the same sorts of things via the API as well.</p>
<h6 id="sect-creating-expressions">§ Creating Expressions</h6>
<p>Desmos exposes a single method to both create new expressions and update existing ones: <code>.setExpression()</code>, which takes an object that describes the expression’s target state.</p>
<p>(<em>Note</em>: For all of the following code snippets, assume we’ve already created a reference to a calculator instance called <code>calc</code>. Because I am both unimaginative and lazy, that’s what I usually use.)</p>
<p>Every expression needs a unique identifier in order for the calculator to keep track of it, so every expression state must contain an <code>id</code> property:</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'slope'</span>
<span class="c1">// other stuff will go here</span>
<span class="p">});</span>
</code></pre>
<p>That’s not very useful on its own; it just creates a blank expression. We probably want it to contain some information, so let’s make that happen. Desmos uses <a href="https://en.wikipedia.org/wiki/LaTeX">LaTeX</a> for expressions, so the object you pass into <code>.setExpression()</code> should have a <code>latex</code> property<sup id="fnref:latex"><a href="#fn:latex" class="footnote">2</a></sup> that describes the mathy situation you’d like to exist.<sup id="fnref:gotcha"><a href="#fn:gotcha" class="footnote">3</a></sup> For instance, if you want to create a paramater called <code>m</code> and set its value to 4, you can do this:</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'slope'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'m = 4'</span>
<span class="p">});</span>
</code></pre>
<p>If you run that little snippet of code, you’ll see a new slider that controls a parameter called <code>m</code> with a value of 4. Nice, right?</p>
<p>Of course you can reference expressions from within other expressions. For example, if you want to create a line whose slope is determined by the value of our <code>m</code> parameter, you can do something like this:</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = mx'</span>
<span class="p">});</span>
</code></pre>
<h6 id="sect-a-brief-aside">§ A Brief Aside</h6>
<p>If you know from the outset that you want to create a line with a variable slope, then you know right away that you’ll need two expressions. It’s a little annoying to have to call <code>.setExpression()</code> twice in a row, so Desmos has helpfully exposed a convenience method called <code>.setExpressions()</code> (note the plural) that accepts an <em>array</em> of expression states. These two bits of code are equivalent:</p>
<pre><code class="highlight javascript"><span class="c1">// This is kind of an annoying thing to have to do</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'slope'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'m = 4'</span>
<span class="p">});</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = mx'</span>
<span class="p">});</span>
<span class="c1">// This is much less annoying</span>
<span class="c1">// Not really annoying at all, actually</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpressions</span><span class="p">([</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'slope'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'m = 4'</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = mx'</span>
<span class="p">}</span>
<span class="p">]);</span>
</code></pre>
<p>In fact, Desmos is so helpful and convenient that you don’t even need to set expressions in the right order. As in the web app, every expression is available to every other expression, so you can ignore dependency order within <code>.setExpressions()</code>:</p>
<pre><code class="highlight javascript"><span class="c1">// This will also work just fine, even though 'line' depends on 'slope'</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpressions</span><span class="p">([</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = mx'</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'slope'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'m = 4'</span>
<span class="p">}</span>
<span class="p">]);</span>
</code></pre>
<h6 id="sect-let-there-be-color-and-stuff">§ Let there be Color and Stuff</h6>
<p>There are a few other expression properties you can control. They’re discussed in detail in the documentation and some are demonstrated in the <a href="http://bl.ocks.org/ctlusto/ee07fe718230cd4f71f4">live example</a> mentioned at the end of this post. Just be aware that you can also set<sup id="fnref:relevance"><a href="#fn:relevance" class="footnote">4</a></sup> an expression’s color, slider bounds, visibility, parametric domain, and type.<sup id="fnref:type"><a href="#fn:type" class="footnote">5</a></sup></p>
<p>But, for funsies, this will graph a hidden line that’s a horrible shade of yellowish when shown:</p>
<pre><code class="highlight javascript"><span class="c1">// A line that is somehow both invisible and hideous</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'ugly_line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = 2x + 4'</span><span class="p">,</span>
<span class="na">hidden</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="na">color</span><span class="p">:</span> <span class="s1">'#dedda9'</span>
<span class="p">});</span>
</code></pre>
<h6 id="sect-updating-expressions">§ Updating Expressions</h6>
<p>I mentioned earlier that <code>.setExpression()</code> both creates and updates expressions. Which task it performs depends on the <code>id</code> property of the argument. If an expression with that <code>id</code> already exists, any other listed properties get set to their new values; otherwise a new expression is created.</p>
<pre><code class="highlight javascript"><span class="c1">// Here's a much nicer blue line...still hidden though</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'blue_line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = 3x - 4'</span><span class="p">,</span>
<span class="na">color</span><span class="p">:</span> <span class="nx">Desmos</span><span class="p">.</span><span class="nx">Colors</span><span class="p">.</span><span class="nx">BLUE</span><span class="p">,</span>
<span class="na">hidden</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">});</span>
<span class="c1">// This will only update our blue line's visibility</span>
<span class="c1">// The color and latex properties remain the same</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'blue_line'</span><span class="p">,</span>
<span class="na">hidden</span><span class="p">:</span> <span class="kc">false</span>
<span class="p">});</span>
</code></pre>
<h6 id="sect-removing-expressions">§ Removing Expressions</h6>
<p>Once an expression has outlived its usefulness, you can simply remove it. At least on the web app you have to look your expression in the face while you click the little gray X and send it into oblivion, but not here. Here you just need to tell <code>.removeExpression()</code> which <code>id</code> you’d like to nix:</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">removeExpression</span><span class="p">({</span><span class="na">id</span><span class="p">:</span> <span class="s1">'ugly_line'</span><span class="p">});</span>
</code></pre>
<p>And if you want to go on an expression killing spree, <code>.removeExpressions()</code> lets you knock off a bunch at once.</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">removeExpressions</span><span class="p">([{</span><span class="na">id</span><span class="p">:</span> <span class="s1">'line'</span><span class="p">},</span> <span class="p">{</span><span class="na">id</span><span class="p">:</span> <span class="s1">'blue_line'</span><span class="p">}]);</span>
</code></pre>
<h6 id="sect-latex-gotchas">§ LaTex Gotchas</h6>
<p>Using LaTeX within JavaScript is actually kind of a pain.<sup id="fnref:opinion"><a href="#fn:opinion" class="footnote">6</a></sup> The good news is you can get away without a lot of LaTeX knowledge with Desmos because (a) they only support a subset of commands/symbols,<sup id="fnref:mathquill"><a href="#fn:mathquill" class="footnote">7</a></sup> and (b) they provide a thin layer of abstraction over raw LaTeX that often lets you type something pretty close to regular mathematical notation. The bad news is the abstraction is <a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html">a little leaky</a>, which requires you to understand just a bit about the way LaTeX is handled by the API.</p>
<p>Dealing with “less than or equal to” is a good example. If you type the sequence <code>r<=4</code> into an expression in the web app, the calculator recognizes the <code><=</code> and autocorrects it for you so it looks pretty:</p>
<p><img src="/images/leq1.png" /></p>
<p>But if you do this:</p>
<pre><code class="highlight javascript"><span class="c1">// This works but is ugly</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'circle'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'r<=4'</span>
<span class="p">});</span>
</code></pre>
<p>…you end up with this:</p>
<p><img src="/images/leq2.png" /></p>
<p>The API is still smart enough to parse that string into the thing that you want, so your polar circle gets graphed with no problem, but now the expressions list looks gross. In more complicated cases, you might even end up with an error — like when you want to introduce domain restrictions. If you type the sequence <code>y=x{x<4}</code> into the expressions list, you end up with this:</p>
<p><img src="/images/domain1.png" /></p>
<p>But if you try this:</p>
<pre><code class="highlight javascript"><span class="c1">// This doesn't work at all</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'restricted_line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y=x{x<4}'</span>
<span class="p">});</span>
</code></pre>
<p>…you break the internet.</p>
<p><img src="/images/domain2.png" /></p>
<p>That’s because curly braces have semantic meaning as grouping symbols within the LaTeX grammar, so they don’t get parsed as literal characters by the API. If you want them to show up, you need to tell the API that you’re opening up a delimiter using the <code>\left</code> command, and then introduce the delimiter with the <code>\{</code> symbol. Then you need to do the same thing at the end of your domain restriction with <code>\right</code> and <code>\}</code>.</p>
<p>Except things are a little worse than that. The backslash character has semantic meaning in LaTeX (it says, “Hey, here comes a command or symbol!”), but it <em>also</em> has semantic meaning in JavaScript (it says, “Hey, here comes a special character inside this string!”). So here’s our situation: JavaScript sees the backslash and ignores it as a literal character, but we <em>need</em> that literal character so that the LaTeX parser can see and subsequently ignore the literal backslash and insert the correct symbol. To reiterate: using LaTeX within JavaScript is actually kind of a pain.</p>
<p>The solution in this case is to <em>double</em>-escape <code>left</code>, <code>{</code>, <code>right</code>, and <code>}</code> in the string value assigned to the <code>latex</code> property of the expression state:</p>
<pre><code class="highlight javascript"><span class="c1">// Finally works the way we want</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'restricted_line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y=x\\left\\{x<4\\right\\}'</span>
<span class="p">});</span>
</code></pre>
<p>So, the correct way to set the expressions for the two examples in this section would look like this (with a little space for the poor humans who have to read these sorts of things):</p>
<pre><code class="highlight javascript"><span class="c1">// If you like piña coladas...</span>
<span class="c1">/// ...come with me and escape</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpressions</span><span class="p">([</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'circle'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'r \\leq 4'</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'restricted_line'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = x \\left \\{ x < 4 \\right \\}'</span>
<span class="p">}</span>
<span class="p">]);</span>
</code></pre>
<p>And we’ll end up with exactly what we wanted in the first place:</p>
<p><img src="/images/correct_latex.png" /></p>
<p>If you want to know what those (unescaped) curly braces <em>are</em> good for, one common use case in Desmos would be to create variables with complicated subscripts:</p>
<pre><code class="highlight javascript"><span class="nx">calc</span><span class="p">.</span><span class="nx">setExpressions</span><span class="p">([</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'awesome_parameter'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'p_{awesome} = 1'</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'cool_parameter'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'p_{cool} = 2'</span>
<span class="p">}</span>
<span class="p">]);</span>
</code></pre>
<p>…which results in:</p>
<p><img src="/images/parameters.png" /></p>
<p>I said before that Desmos provides a little bit of abstraction over raw LaTeX. For instance, the LaTeX command for the sine function is <code>\sin</code>, but Desmos doesn’t actually require you to use it; it simply recognizes that three-character combination and takes care of the LaTeXifying for you:</p>
<pre><code class="highlight javascript"><span class="c1">// This works, even though you'd expect to have to use \sin or '\\sin'</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'sine'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'y = sin x'</span>
<span class="p">});</span>
</code></pre>
<p>Figuring out when you do or don’t have to use LaTeX commands by double-escaping characters is a nontrivial exercise.<sup id="fnref:reader"><a href="#fn:reader" class="footnote">8</a></sup> It’ll involve a lot of trial and (mostly) error and broken expressions. But there <em>is</em> a way to peek at the answer key when you’re working on something particularly complicated that makes you want to punch your laptop in its retina display.</p>
<p>On the web app, Desmos exposes a global reference to the main calculator object, called <code>Calc</code>, that you can poke at from the console. And there’s a method called <code>.getState()</code> — the subject of some future writing — that allows you to inspect the properties of expression objects. So just head over to the web app and type whatever hideous thing you want into the the first spot in the expressions list of a brand new calculator:</p>
<p><img src="/images/complicated_expression.png" /></p>
<p>Then type <code>Calc.getState();</code> in the console (note the capitalization). You’ll see the returned object, which you can click to expand and view its properties. Keep clicking into <code>expressions[list][0]</code>, where you’ll see the <code>latex</code> property as a big ugly string:</p>
<p><img src="/images/state.png" /></p>
<p>Now just replace all those single backslashes with double-backslashes and you’re good to go:</p>
<pre><code class="highlight javascript"><span class="c1">// This works beautifully</span>
<span class="c1">// ...well, it works</span>
<span class="nx">calc</span><span class="p">.</span><span class="nx">setExpression</span><span class="p">({</span>
<span class="na">id</span><span class="p">:</span> <span class="s1">'binomial_sum'</span><span class="p">,</span>
<span class="na">latex</span><span class="p">:</span> <span class="s1">'\\sum_{n=0}^5\\operatorname{nCr}\\left(5,\\ n\\right)'</span>
<span class="p">});</span>
</code></pre>
<p>This is a little bit of overkill. You don’t, for instance, strictly need that <code>operatorname</code> stuff since <code>nCr</code> is one of those special combinations — like <code>sin</code> — that Desmos supports in its bare form, but at least this method removes some of the guesswork when you’re having trouble.</p>
<h6 id="sect-live-example">§ Live Example</h6>
<p>I coded up <a href="http://bl.ocks.org/ctlusto/ee07fe718230cd4f71f4">a little example</a> that demonstrates creating and updating expressions to make a color-shifting timer. It uses an external library to handle the colors and animation timing, but the point is just to show that you can set up expressions to respond to all kinds of external input. We’ll explore a lot more ways to work with expressions as this series continues to grow.</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:slider">
<p>( = slider ) <a href="#fnref:slider" class="reversefootnote">↩</a></p>
</li>
<li id="fn:latex">
<p>At least when you <em>create</em> the expression. You may not necessarily want to change the LaTeX on a future update (e.g. if you’re just changing a color or something), in which case you can omit it. <a href="#fnref:latex" class="reversefootnote">↩</a></p>
</li>
<li id="fn:gotcha">
<p>There are some important gotchas, especially if you’re not particularly familiar with LaTeX, but in many simple cases you’re just replicating exactly what you’d type into the expressions list manually. More on this in a bit. <a href="#fnref:gotcha" class="reversefootnote">↩</a></p>
</li>
<li id="fn:relevance">
<p>Though not all properties are relevant to every expression. It would be meaningless to, e.g., set the <code>color</code> of a slider or the <code>sliderBounds</code> of a line. <a href="#fnref:relevance" class="reversefootnote">↩</a></p>
</li>
<li id="fn:type">
<p>Meaning, roughly, table or non-table (default). More on tables in a future post. <a href="#fnref:type" class="reversefootnote">↩</a></p>
</li>
<li id="fn:opinion">
<p>Apologies for the editorial content, but things <a href="http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html">like this</a> give me a case of <a href="https://www.brainpickings.org/2012/09/04/words-david-foster-wallace-mom-invented/">the howling fantods</a>. <a href="#fnref:opinion" class="reversefootnote">↩</a></p>
</li>
<li id="fn:mathquill">
<p>Via a very cool library called <a href="https://github.com/mathquill/mathquill">Mathquill</a>, about which more in a future post. <a href="#fnref:mathquill" class="reversefootnote">↩</a></p>
</li>
<li id="fn:reader">
<p>If this were a math textbook, “an exercise left to the reader.” <a href="#fnref:reader" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>
Loopshttp://chrislusto.com/loops/2015-10-04T20:10:00-04:002015-10-06T22:17:31-04:00Chris Lusto<h1 id="loops-">~ Loops ~</h1>
<p>Last week <a href="http://blog.mrmeyer.com/2015/our-fall-contest-this-is-not-a-math-book/">Dan Meyer announced a contest</a> built around a loopy task from <a href="https://twitter.com/annaweltman">Anna Weltman</a> in her new non-math math book, <a href="http://new.myubam.com/p/5003/this-is-not-a-math-book"><em>This is not a Math Book</em></a>.</p>
<p>I turned the task into an <a href="http://dev.chrislusto.com/loops/">interactive walkthrough and loop laboratory</a>, which you’re cordially invited to use as a demonstration for your students in conjunction with Anna’s book (Dan excerpted a few pages <a href="http://blog.mrmeyer.com/wp-content/uploads/instructionpage.pdf">here</a> and <a href="http://blog.mrmeyer.com/wp-content/uploads/instructionpage.pdf">here</a>). Or, of course, if you just want to get nerd-sniped into messing around with loops for a little while.</p>
<p>Below I included a couple of problem sets I think would make for interesting extensions.</p>
<p><img src="/images/loopy.png" /></p>
<h6 id="sect-faces-and-vertices-and-edges-oh-my">§ Faces and Vertices and Edges (Oh, my!)</h6>
<ol>
<li>
<p>(1) We saw that sometimes a loop only intersects itself at individual points (like the 2-3-4), while other times a loop will retrace a portion of itself (like the 3-5-2). Let’s call loops that retrace themselves <em>clingy</em>. Under what circumstances will a loop be clingy?</p>
</li>
<li>
<p>(2) A loop divides the plane into a bunch of regions that are walled off from the rest of the plane. Let’s call those regions <em>cells</em>. How many cells does the 2-1-4 loop have? (Hint: Don’t forget the big, huge, giant cell that’s outside the whole loop.)</p>
</li>
<li>
<p>(3) Each time a loop intersects itself at a point, it forms a little cross. How many crosses does the 2-1-4 loop have?</p>
</li>
<li>
<p>(4) If you start at a cross and trace your way along the loop, eventually you’ll either end up at another cross, or back at the same cross from a new direction. That portion of the loop between two crosses (or between a cross and itself) is called a <em>blip</em>. How many blips does the 2-1-4 loop have?</p>
</li>
<li>
<p>(5) Make a whole bunch of non-clingy loops. Can you find a relationship among the number of cells, crosses, and blips that a loop has?</p>
</li>
<li>
<p>(6) Find yourself a cube. How many faces does it have? How many vertices? How many edges?</p>
</li>
<li>
<p>(7) Find yourself a tetrahedron (admittedly a little bit harder). How many faces, vertices, and edges does it have?</p>
</li>
<li>
<p>(8) Get your hands on a bunch of convex polyhedra. (Unless you have some really nerdy math friends, you’re probably going to have to <a href="http://www.amazon.com/Wood-Platonic-Solids/dp/B00I88065A/ref=sr_1_2?ie=UTF8&qid=1444006810&sr=8-2&keywords=wooden+polyhedra">hit up the internet</a> for this one). Can you find a relationship among the number of faces, vertices, and edges each one has?</p>
</li>
<li>
<p>(9) Convince yourself that this connection between loop-de-loops and convex polyhedra isn’t an accident.</p>
</li>
</ol>
<h6 id="sect-loops-gone-wild">§ Loops Gone Wild</h6>
<ol>
<li>
<p>(1) We looked at some loops with three lengths (3-loops), a loop with four lengths (a 4-loop), and a loop with five lengths (a 5-loop). The 3-loops all returned to their starting point, so let’s call them <em>tame</em>. (The 5-loop was also tame.) But the 4-loop spun off to infinity. Let’s call loops like that <em>wild</em>. Are there any wild 3-loops? Prove there aren’t or find a counterexample.</p>
</li>
<li>
<p>(2) Are there any tame 4-loops? If so, are there any that a snooty mathematician wouldn’t call <em>trivial</em>? Why or why not?</p>
</li>
<li>
<p>(3) For what <em>n</em> are <em>n</em>-loops guaranteed to be tame? Guaranteed to be wild? Neither necessarily tame nor necessarily wild?</p>
</li>
<li>
<p>(4) Let’s say that, instead of always changing direction in a counterclockwise way, at each step you pick a random direction (up, down, left, or right) in which to draw your line. Let’s call this new kind of loop a <em>drunken</em> loop. Are drunken 3-loops more likely to be wild then their sober counterparts? Are drunken 4-loops more likely to be tame?</p>
</li>
<li>
<p>(5) Remarkably (to me, at least), any drunken 1-loop (like 1-1-1-… or 9-…) is tame. Prove that there are no wild drunken 1-loops.</p>
</li>
<li>
<p>(6) Instead of restricting our loops to a 2D grid, let’s have them live in a 3D lattice. Now a drunken loop can head off, at each step, in one of 6 random directions in 3-space. Are all drunken 1-loops still tame? If not, what’s the probability a drunken 1-loop will be tame?</p>
</li>
<li>
<p>(7) As <em>n</em> increases, what happens to the probabilty that a drunken 1-loop is tame in <em>R<sup>n</sup></em>? Come up with a formula for that probability in terms of <em>n</em>.</p>
</li>
</ol>