<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title>Tom MacWright</title>
  
  <link href="http://macwright.org/" />
  <updated>2013-05-09T06:17:58-07:00</updated>
  <id>http://macwright.org/</id>
  <author>
    <name>Tom MacWright</name>
    <email>tom@macwright.org</email>
  </author>
  
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/tommacwright/odWX" /><feedburner:info uri="tommacwright/odwx" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/tommacwright/odWX" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Ftommacwright%2FodWX" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><entry>
    <title>Recently</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/YDsOXawLfSM/recently.html" />
    <updated>2013-05-09T00:00:00-07:00</updated>
    <id>http://macwright.org/2013/05/09/recently</id>
    <content type="html">&lt;p&gt;&lt;a href="https://secure.flickr.com/photos/tmcw/8722367144/"&gt;&lt;img src="https://farm8.staticflickr.com/7287/8722367144_c483ff61f5_b.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Consumption&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://archive.org/details/bitsavers_applemacThlectedPapersFeb80_5957467"&gt;The Macintosh Project Selected Papers&lt;/a&gt; &amp;ndash; this was the best read this month.
The dialog between Jobs, Woz, and Raskin is incredible, and their ideas &amp;ndash;
whether it&amp;rsquo;s more important to be cheap or powerful, how to de-nerd computing,
even &lt;em&gt;how the value of computers relates to their place on the network&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;blockquote&gt;&lt;p&gt;We don&amp;rsquo;t think of the telephone company primarily as a manufacturer of the
  little $40 things with dials or pushbuttons that we have in our homes and
  on our desks. The implications of this proposal, at one extreme, is that
  Apple will be seen, in the future, not so much as a builder of hardware,
  but as a purveyor of a service that interpenetrates the telephone network,
  and provides information.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&amp;lsquo;The Apple Computer Network&amp;rsquo;, Jeff Raskin, 11 Sept 1979&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pomax.github.io/bezierinfo/"&gt;Bezier Curves &amp;ndash; A Primer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://techland.time.com/2013/04/02/an-interview-with-computing-pioneer-alan-kay/"&gt;An Interview With Alan Kay&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wikileaks.org/Transcript-Meeting-Assange-Schmidt"&gt;Transcript of Secret Meeting between Julian Assange and Google CEO Eric Schmidt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bost.ocks.org/mike/selection/"&gt;How Selections Work&lt;/a&gt; by Mike Bostock&lt;/li&gt;
&lt;li&gt;Listening: &lt;a href="http://wayyes.com/album/tog-pebbles"&gt;Way Yes &amp;ndash; Tog Pebbles&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Elsewhere&lt;/h2&gt;

&lt;p&gt;I gave &lt;a href="http://macwright.org/presentations/dccode/#0"&gt;the first presentation about the DC Code project&lt;/a&gt; at
&lt;a href="http://transparencycamp.org/"&gt;Transparency Camp&lt;/a&gt;, to a room of people way
more knowledgeable about legislation and open data than myself. In a session
at the &amp;lsquo;unconference&amp;rsquo;, I wrote &lt;a href="http://dccode.org/simple/"&gt;dccode.org/simple&lt;/a&gt;,
a no-css, no-javascript version of the code, which is another experiment
in accessibility and simplicity. It&amp;rsquo;s &lt;a href="https://github.com/openlawdc/simple/blob/gh-pages/generate.js"&gt;generated by a tiny node.js script&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We &lt;a href="http://mapbox.com/blog/mapbox-js-with-leaflet/"&gt;re-released mapbox.js based on Leaflet&lt;/a&gt;,
&lt;a href="http://mapbox.com/tour/"&gt;redesign the MapBox tour&lt;/a&gt;, and pulled together some
important architectural changes that&amp;rsquo;ll make it easier to move faster.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://farm8.staticflickr.com/7387/8717953720_1bd3704f82_c.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://mapbox.com/blog/new-map-editor-launches-openstreetmap/"&gt;iD is now the default editor on OpenStreetMap&lt;/a&gt;
and it&amp;rsquo;s working pretty well. Lots of challenges left, and some of the more
&amp;lsquo;fun&amp;rsquo; performance optimizations are ahead of us. We &lt;a href="http://mapbox.com/osmdev/"&gt;blogged its development on /osmdev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://macwright.org/lodebuilder/'&gt;&lt;img src='https://farm8.staticflickr.com/7331/8722257135_c4efb30f03_c.jpg' class='white-on-white' /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wrote &lt;a href="http://macwright.org/lodebuilder/"&gt;lodebuilder&lt;/a&gt;, an online tool
to make a particular kind of loading background that I first used in iD
and seems to be quite applicable elsewhere. (&lt;a href="https://en.wikipedia.org/wiki/Lode_Runner_2"&gt;name inspiration&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I immediately used it for my &lt;a href="http://mistakes.io/"&gt;mistakes.io&lt;/a&gt; project,
which added the ability to save anonymous &lt;a href="https://gist.github.com/"&gt;Gists&lt;/a&gt;
with Cmd-S.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://debugbrowser.com/'&gt;&lt;img class='white-on-white' src='https://farm8.staticflickr.com/7457/8722296335_8ef8c0c3a9_b.jpg' /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I polished up and gave a domain name to one of my simplest and most straightforward
projects, now &lt;a href="http://debugbrowser.com/"&gt;called debugbrowser.com. It simply documents opening developer extensions in all browsers&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/YDsOXawLfSM" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/05/09/recently.html</feedburner:origLink></entry>
  
  <entry>
    <title>A Sunday &amp; An Open DC Code</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/Dk24bb_z6Hs/dc-code-hackathon.html" />
    <updated>2013-04-16T00:00:00-07:00</updated>
    <id>http://macwright.org/2013/04/16/dc-code-hackathon</id>
    <content type="html">&lt;p class='addendum'&gt;
&lt;em&gt;prefix&lt;/em&gt;: This is a follow-up to &lt;a href='http://macwright.org/2013/04/04/the-open-code.html'&gt;The Open Code&lt;/a&gt;,
which came after a series of posts including &lt;a href='http://macwright.org/2013/02/22/access-ownership.html'&gt;access vs ownership&lt;/a&gt;,
&lt;a href='http://macwright.org/2013/02/20/you-cannot-have-the-code.html'&gt;you cannot have the code&lt;/a&gt;,
&lt;a href='http://macwright.org/2013/02/14/the-law-is-public-domain.html'&gt;public domain&lt;/a&gt;, and more.
&lt;a href='http://sunlightfoundation.com/blog/2013/04/15/what-happens-when-you-open-the-dc-code/'&gt;Eric Mill also wrote
about this hackathon over at the Sunlight Foundation&lt;/a&gt;.
&lt;/p&gt;


&lt;p&gt;&lt;a href="http://www.flickr.com/photos/tmcw/8650784032/"&gt;&lt;img src="http://farm9.staticflickr.com/8115/8650784032_9fa1294e84_b.jpg" alt="DC Code Hackathon" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This weekend I hosted a meeting at the MapBox offices to hack on the
&lt;a href="http://macwright.org/2013/02/14/the-law-is-public-domain.html"&gt;newly released, open and downloadable version&lt;/a&gt; of
the DC Code. The DC Code is all of the &lt;a href="http://localhost:4000/2013/02/11/the-code-written.html"&gt;codified laws in DC&lt;/a&gt;, and this is the
first time that so-called &amp;lsquo;tech types&amp;rsquo; had the opportunity to actually
grab it, look inside, and see what we can do.&lt;/p&gt;

&lt;p&gt;In the past, I&amp;rsquo;ve been opposed to hackathons, not only because the
term summons Red Bull, pizza, and premature optimization, but that they
lay bare the problems of the so-called &amp;lsquo;&lt;a href="http://www.communitywiki.org/DoOcracy"&gt;do-ocracy&lt;/a&gt;&amp;rsquo; &amp;ndash;
that contributing is always an equation of ability, communication, and access,
and one that doesn&amp;rsquo;t always work.&lt;/p&gt;

&lt;p&gt;We ran &lt;a href="https://github.com/openlawdc"&gt;/openlawdc&lt;/a&gt; as an open organization on &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;.
&lt;a href="https://github.com/openlawdc/openlawdc.github.com/issues/1"&gt;I hand out access&lt;/a&gt; to anyone
who asks, and everyone is an owner.
This means anyone can contribute to anything in that
space, and people can create new repositories for any reason.
We started with &lt;a href="http://piratepad.net/ep/pad/view/ro.PxBhfsFjx-S/latest"&gt;a big codepad that everyone had access to&lt;/a&gt;
and was pre-populated with tasks, questions, and links. Tasks for non-technical
users are incredibly important. &lt;a href="http://en.wikipedia.org/wiki/Carl_Malamud"&gt;Carl Malamud&lt;/a&gt;,
who was instrumental in &lt;a href="http://boingboing.net/2013/03/27/municipal-codes-of-dc-free-fo.html"&gt;raising public awareness&lt;/a&gt;
of this issue and is a leader in understanding how to make closed open,
donated bagels, lox, and more, which was delivered by &lt;a href="http://radar.oreilly.com/alexh"&gt;Alex Howard&lt;/a&gt;,
who also provided important publicity. Also a massive thanks to
&lt;a href="http://www.huffingtonpost.com/2013/04/09/dc-code-hackathon_n_3039271.html"&gt;Ari Greenwood, who wrote about this event&lt;/a&gt;
in Huff Post DC Around Town.&lt;/p&gt;

&lt;p&gt;The Council handled this incredibly well: &lt;a href="https://twitter.com/vdavez"&gt;V. David Zvenyach&lt;/a&gt;
of the &lt;a href="http://www.dccouncil.washington.dc.us/offices/office-of-the-general-counsel"&gt;Office of the General Counsel&lt;/a&gt;
attended, introduced the council&amp;rsquo;s input, and was absolutely key in explaining
both &lt;a href="https://github.com/openlawdc/browser/issues/45"&gt;technical, narrow issues&lt;/a&gt;
and much larger ones &amp;ndash; he even
&lt;a href="https://github.com/openlawdc/statutes-at-large"&gt;created a new repository to explain one of the largest challenges facing the council&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8245/8649685723_ccd8f7005e_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;As a result, &lt;strong&gt;we got a lot done&lt;/strong&gt;: &lt;a href="https://github.com/openlawdc/browser/commits/gh-pages"&gt;tens of commits&lt;/a&gt; and
&lt;a href="https://github.com/openlawdc/browser/contributors"&gt;four new contributors&lt;/a&gt; to the
&lt;a href="https://github.com/openlawdc/browser"&gt;browser&lt;/a&gt; project,
a new &lt;a href="https://github.com/openlawdc/home-rule-act"&gt;home-rule-act&lt;/a&gt; project
with &lt;a href="https://github.com/openlawdc/home-rule-act/graphs/contributors"&gt;three contributors&lt;/a&gt; including
&lt;a href="http://occams.info/"&gt;Josh Tauberer&lt;/a&gt; and &lt;a href="http://www.cs.princeton.edu/~harlanyu/"&gt;Harlan Yu&lt;/a&gt;,
a &lt;a href="https://github.com/statedecoded/legal-dictionary"&gt;legal-dictionary&lt;/a&gt; spinoff
of State Decoded by &lt;a href="http://waldo.jaquith.org/"&gt;Waldo Jaquith&lt;/a&gt;, and
a &lt;a href="https://github.com/krues8dr/statedecoded/tree/dccode"&gt;DC Code importer branch of State Decoded&lt;/a&gt;
by &lt;a href="http://krues8dr.com/"&gt;Bill Hunt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Basically, as the saying goes: &lt;a href="http://en.wikipedia.org/wiki/Rough_consensus"&gt;rough consensus and running code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href='http://dccode.org/browser/'&gt;
&lt;img src='http://farm9.staticflickr.com/8123/8656300064_812d9d9dca_b.jpg' class='white-on-white' /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/openlawdc/browser"&gt;code browser project&lt;/a&gt; that I started
to test my parser grew a lot, and shows real potential as an option. But
I&amp;rsquo;m mainly excited for the code getting into &lt;a href="http://www.statedecoded.com/"&gt;The State Decoded&lt;/a&gt; and
about the growth of small, targeted code like Eric Mill&amp;rsquo;s &lt;a href="https://github.com/unitedstates/citation"&gt;citation&lt;/a&gt;
project, which detects and links legal citations like &lt;code&gt;§ 1101-1103&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Up Next&lt;/h3&gt;

&lt;p&gt;Besides &amp;lsquo;lots of code&amp;rsquo; I think there&amp;rsquo;s some more interesting stuff to note here
and to think of as the future.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;ve really wanted to push past the kneejerk reactions
of the computer-native to the law and instead make a focus on understanding the
system, eccentricities and all. I think that&amp;rsquo;s happening, and in a really good
way: the things we started working on on Sunday are pragmatic, usable tools
that make specific progress in the law possible. For instance, referencing
older laws isn&amp;rsquo;t just a problem for lawyers, it&amp;rsquo;s a timesuck for lawmakers.
And simple functionalities like printing out longer sections of the Code
are impossible on &lt;a href="http://www.lexisnexis.com/hottopics/dccode/"&gt;LexisNexis&amp;rsquo;s new portal&lt;/a&gt;
but eminently doable on &lt;a href="http://dccode.org/browser/"&gt;browser&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And even with these tools as a simple alternative to commerical portals, we&amp;rsquo;re
making it abundantly clear: open data lets people make the change they want.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/Dk24bb_z6Hs" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/04/16/dc-code-hackathon.html</feedburner:origLink></entry>
  
  <entry>
    <title>The Open Code</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/ZcgKdvd05Go/the-open-code.html" />
    <updated>2013-04-04T00:00:00-07:00</updated>
    <id>http://macwright.org/2013/04/04/the-open-code</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;tl;dr: thanks to good people, we now have an unencumbered digital copy of dc&amp;rsquo;s laws.
let&amp;rsquo;s &lt;a href="http://dccode-eorg.eventbrite.com/"&gt;meet april 14th in washington, dc to realize the massive potential of this&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8124/8620236456_8c9f5c58df_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;I couldn&amp;rsquo;t be happier to write that the project to bring DC&amp;rsquo;s laws into
the digital era and put them in everyone&amp;rsquo;s hands made a big breakthrough:
today you can &lt;a href="http://dccouncil.us/UnofficialDCCode"&gt;download an unofficial copy of the
Code (current through December 11, 2012) from the DC Council&amp;rsquo;s website&lt;/a&gt;.
Not only that, but the licensing for this copy is officially &lt;a href="http://creativecommons.org/choose/zero/"&gt;CC0&lt;/a&gt;,
a &lt;a href="http://creativecommons.org/"&gt;Creative Commons&lt;/a&gt; license that aims to be
a globally-effective &lt;a href="http://macwright.org/2013/02/14/the-law-is-public-domain.html"&gt;Public Domain&lt;/a&gt;
designation.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8250/8619155565_4063e20890_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;A lot of people made this possible: &lt;a href="http://dccouncil.us/offices/office-of-the-general-counsel"&gt;Ben Bryant&lt;/a&gt;
was extremely understanding through more than 50 emails over more than
four months, &lt;a href="http://en.wikipedia.org/wiki/Carl_Malamud"&gt;Carl Malamud&lt;/a&gt; made the
brilliant move of &lt;a href="http://boingboing.net/2013/03/27/municipal-codes-of-dc-free-fo.html"&gt;digitizing and distributing the code&lt;/a&gt;,
declaring DC&amp;rsquo;s copyright invalid. &lt;a href="http://occams.info/"&gt;Josh Tauberer&lt;/a&gt; made
the vital contact with &lt;a href="https://twitter.com/vdavez"&gt;V David Zvenyach&lt;/a&gt;, who
together cleaned files delivered by &lt;a href="http://www.westlaw.com/"&gt;WestLaw&lt;/a&gt; &lt;a href="http://archive.org/details/DcContractWithWestFor2012"&gt;in accordance to
H.11.1 of the contract&lt;/a&gt;.
And many journalists took the time to understand the issue, speak clearly,
and make this a reality.&lt;/p&gt;

&lt;p&gt;A massive thanks to everyone involved.&lt;/p&gt;

&lt;p&gt;There are a few things that this isn&amp;rsquo;t: it isn&amp;rsquo;t the official copy of the
code, and lawyers would be ill-advised to cite it alone. It isn&amp;rsquo;t up-to-date &amp;ndash;
the council &lt;a href="http://macwright.org/2013/02/11/the-code-written.html"&gt;is fast-moving&lt;/a&gt; and
this is just a snapshot. In time we&amp;rsquo;ll fix these problems too.&lt;/p&gt;

&lt;p&gt;And so the floodgates are open &amp;ndash; now that we have the raw data, so many applications
of this information are possible.
&lt;a href="http://dccode-eorg.eventbrite.com/"&gt;I propose we meet April 14th in Washington, DC to realize the massive potential of this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What else is there to build? A great smartphone interface. Topic-specific
bookmarks. Text analysis. Great, instant search. Mirrored archives to everywhere.
Printable copies for DIY and for print-on-demand services. And lots more.&lt;/p&gt;

&lt;p&gt;We&amp;rsquo;re not waiting till then to start though: &lt;a href="https://github.com/openlawdc/dc-decoded"&gt;dc-decoded&lt;/a&gt; is a
project I started today to finish the long-awaited task of bringing DC&amp;rsquo;s laws
into &lt;a href="http://www.statedecoded.com/"&gt;The State Decoded&lt;/a&gt;. The &lt;a href="https://github.com/openlawdc"&gt;openlawdc organization on GitHub&lt;/a&gt;
is dedicated to working on these problems, and it&amp;rsquo;s &lt;strong&gt;open&lt;/strong&gt;:
&lt;a href="https://github.com/openlawdc/openlawdc.github.com/issues/1"&gt;you can and should get access if you want to contribute&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/ZcgKdvd05Go" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/04/04/the-open-code.html</feedburner:origLink></entry>
  
  <entry>
    <title>Recently</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/T_QgKrp7PcY/recently.html" />
    <updated>2013-04-01T00:00:00-07:00</updated>
    <id>http://macwright.org/2013/04/01/recently</id>
    <content type="html">&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8391/8595946170_609b0d1cb4_c.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;This month I made &lt;a href="https://github.com/tmcw/ration"&gt;ration&lt;/a&gt;, which rations
items in intervals. &lt;a href="https://github.com/tmcw/gpstile"&gt;GPSTile&lt;/a&gt; does
&lt;a href="http://macwright.org/gpstile/#14/38.9000/-76.9900"&gt;pretty OSM GPS tiles&lt;/a&gt;.
&lt;a href="https://github.com/osmlab/osm-auth"&gt;osm-auth&lt;/a&gt; auths osm, &lt;a href="https://github.com/osmlab/osm-live-map"&gt;osm-live-map&lt;/a&gt;
is a &lt;a href="http://osmlab.github.com/osm-live-map/"&gt;live map of osm&lt;/a&gt;. &lt;a href="https://github.com/osmlab/osm-stream"&gt;osm-stream&lt;/a&gt;
provides it with streaming data. &lt;a href="http://macwright.org/100-lines-or-less-js/leafmap/"&gt;an ironic entry&lt;/a&gt; to
the &lt;a href="https://github.com/tmcw/100-lines-or-less-js/blob/gh-pages/leafmap/js/basemaptour.js#L1-L13"&gt;100 lines or less contest&lt;/a&gt;
to use &lt;a href="http://www.esri.com/"&gt;Esri&lt;/a&gt;&amp;rsquo;s &amp;lsquo;trade secret&amp;rsquo; Javascript API. A
&lt;a href="http://osmlab.github.com/editor-imagery-index/"&gt;nice browser for OSM tracing imagery&lt;/a&gt;.
&lt;a href="https://github.com/tmcw/basicrequest"&gt;basicrequest&lt;/a&gt; does super-simple ajax.
&lt;a href="https://github.com/tmcw/leaflet-pip"&gt;leaflet-pip&lt;/a&gt; does points in polygons
in &lt;a href="http://leafletjs.com/"&gt;Leaflet&lt;/a&gt;. I&amp;rsquo;ve been using
&lt;a href="https://github.com/substack/node-browserify"&gt;browserify&lt;/a&gt; a lot, and it&amp;rsquo;s
making tiny modular Javascript components like those in &lt;a href="https://github.com/osmlab"&gt;osmlab&lt;/a&gt;
possible.&lt;/p&gt;

&lt;h2&gt;The Code&lt;/h2&gt;

&lt;p&gt;&lt;img src='http://macwright.org/graphics/dc.gif' width='100%' /&gt;&lt;/p&gt;

&lt;p&gt;This was a big, big month for the DC Code, thanks to &lt;a href="http://en.wikipedia.org/wiki/Carl_Malamud"&gt;Carl Malamud&lt;/a&gt;,
who did the heavy lifting, scanning, &lt;a href="http://en.wikipedia.org/wiki/Optical_character_recognition"&gt;OCR&lt;/a&gt;ing,
ordering, and so on to get
the code from paper to PDF and even a bit to text. There&amp;rsquo;s so much more to
do, but having real and available files for these pages that have occupying
so much of my mind for months feels like the start of something.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8112/8599406999_77a695b225_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;There are &lt;a href="http://www.flickr.com/photos/tmcw/sets/72157633110745699/"&gt;more photos on Flickr&lt;/a&gt;,
a &lt;a href="https://vimeo.com/62936439"&gt;unboxing on Vimeo&lt;/a&gt;, and, of course,
&lt;a href="https://law.resource.org/pub/us/code/dc/"&gt;the PDF-format code as a bulk download on Public.Resource.org&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Elsewhere&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://greatergreaterwashington.org/post/18132/dcs-laws-arent-yours/"&gt;DC&amp;rsquo;s Laws Aren&amp;rsquo;t Yours&lt;/a&gt; on Greater Greater Washington&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lists.openstreetmap.org/pipermail/dev/2013-March/026693.html"&gt;Quietly Announcing osmlab&lt;/a&gt; on talk@openstreetmap&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Soon&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://openvisconf.com/"&gt;Presenting at OpenVisConf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wiki.openstreetmap.org/wiki/Chicago_Hack_Weekend_April_2013"&gt;Hacking at Chicago Hack Weekend&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://foss4g-na.org/preliminary-program/"&gt;Presenting at FOSS4G NA&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Listening&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://avalunamusic.com/"&gt;Ava Luna&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Doseone"&gt;Doseone&lt;/a&gt;,
darkhalo, &lt;a href="http://theyoungrapids.bandcamp.com/"&gt;Young Rapids' Day Light Savings&lt;/a&gt;,
&lt;a href="http://www.youtube.com/watch?v=nZC-OwnkL38"&gt;Snowden&amp;rsquo;s The Beat Comes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8230/8592319741_b9210803ec_z.jpg" alt="Artist Progression" /&gt;&lt;/p&gt;

&lt;h2&gt;Reading&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://vruba.tumblr.com/post/45256059128/wealth-risk-and-stuff"&gt;Wealth, Risk, and Stuff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Quaternion"&gt;Quaternion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.cloudflare.com/the-ddos-that-almost-broke-the-internet"&gt;The DDOS That Almost Broke the Internet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Thinking&lt;/h2&gt;

&lt;blockquote&gt;&lt;p&gt;when you don&amp;rsquo;t create things, you become defined by your tastes rather than ability. your tastes only narrow &amp;amp; exclude people. so create. &amp;ndash; _why&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;this is the quote of the last two years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One of the most satisfying experiences in this industry of making
&lt;a href="http://macwright.org/2012/06/13/programming.html"&gt;short lived things&lt;/a&gt; is
when you make an idea that lives beyond the first implementation.&lt;/strong&gt;
Like books written in dead languages and read in living ones, or a
million similar versions of the same clever design for bike lights.
There are a few instances of this I really like &amp;ndash; how certain &amp;lsquo;recent inventions&amp;rsquo;
like &lt;a href="http://mike.teczno.com/notes/atkinson.html"&gt;Atkinson dithering&lt;/a&gt; or
&lt;a href="https://en.wikipedia.org/wiki/Perlin_noise"&gt;Perlin noise&lt;/a&gt; can seem like
fundamental algorithms despite being quite young.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clean APIs aren&amp;rsquo;t easy, easy APIs aren&amp;rsquo;t clean.&lt;/strong&gt; The clearest example
I can see here is syntax sugar: methods only a line or two long that give
a concept a name. A &lt;a href="https://github.com/mapbox/markers.js"&gt;markers API&lt;/a&gt;
that provides a single &lt;code&gt;.features()&lt;/code&gt; call
has the same power as one with &lt;code&gt;clearMarkers()&lt;/code&gt;, &lt;code&gt;addMarker()&lt;/code&gt;, &lt;code&gt;removeMarker()&lt;/code&gt;,
and so on &amp;ndash; but connecting the one-line-of-course-code dot not only
enables naïve developers who don&amp;rsquo;t know Javascript (there are many), but it
also plays into a desire to have a single method-per-thought-concept.
Those in the know understand that there are a handful of core concepts
and you can have a complete system with a tiny API &amp;ndash; but the concepts that
APIs need to worry about are the ones users think are atomic, not those that
are atomic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is easy is what is familiar.&lt;/strong&gt; Familiarity is the most underrated
usability factor. And what&amp;rsquo;s familiar is what is learned early.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always demonstrate the potential of abstracted ideas.&lt;/strong&gt; While it&amp;rsquo;s very
useful in programming terms to write code that does on this perfectly and
is completely tested and extremely useful for some certain case, a lot of
people &lt;em&gt;don&amp;rsquo;t know what that case is&lt;/em&gt;. Show them &amp;ndash; demonstrate the
&amp;lsquo;art of the possible&amp;rsquo; by creating an example for absolutely every thing
you make. Sometimes I think we&amp;rsquo;ve done this right &amp;ndash; the &lt;a href="http://mapbox.com/mapbox.js/examples/"&gt;mapbox.js examples&lt;/a&gt;
just grow and grow, and &lt;a href="http://bl.ocks.org/mbostock"&gt;Mike Bostock&amp;rsquo;s little experiments&lt;/a&gt;
are the raw ingredients of most &lt;a href="http://d3js.org/"&gt;d3js&lt;/a&gt; hacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The thing about big libraries and frameworks&lt;/strong&gt; is that the availability
of an &amp;lsquo;app for that&amp;rsquo; or a &amp;lsquo;method for that&amp;rsquo; soon becomes a dictate
that &amp;lsquo;if there&amp;rsquo;s a method for that
in that library, you must use it&amp;rsquo;. Case in point should be &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;,
which introduced an honestly web-changing selector engine and &lt;a href="http://bit.ly/Ye2Stv"&gt;monadic&lt;/a&gt;
API, coupled with a lackluster and not-recommend &lt;a href="http://api.jquery.com/each/"&gt;&lt;code&gt;$.each&lt;/code&gt; method&lt;/a&gt;.
But a lot of jQuery programmers used it for selectors and felt guilty using
&lt;code&gt;for()&lt;/code&gt; loops when there was a &amp;lsquo;library way&amp;rsquo; of doing them, so went the &lt;code&gt;$.each&lt;/code&gt; route.
&lt;em&gt;Use the library when it&amp;rsquo;s better, not just because it&amp;rsquo;s available.&lt;/em&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/T_QgKrp7PcY" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/04/01/recently.html</feedburner:origLink></entry>
  
  <entry>
    <title>Math for Pictures</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/AGgAtjACo58/math-for-pictures.html" />
    <updated>2013-03-05T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/03/05/math-for-pictures</id>
    <content type="html">&lt;p&gt;&lt;img src="http://farm1.staticflickr.com/16/21820420_3afd71f654_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s the small subset of math that I use for the vast majority of visualizations &amp;ndash;
ideally it&amp;rsquo;s a good introduction to those who want to make pretty things
with &lt;a href="http://d3js.org/"&gt;d3js&lt;/a&gt;, canvas, or other tools.&lt;/p&gt;

&lt;p&gt;In essence, I&amp;rsquo;ll try to explain four parts of Javascript&amp;rsquo;s built-in &lt;code&gt;Math&lt;/code&gt;
object:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Math.cos(a)&lt;/code&gt;, which we use to get x positions from angles&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Math.sin(a)&lt;/code&gt;, which we use to get y positions from angles&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Math.atan2(y, x)&lt;/code&gt;, which turns x, y positions back into angles&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Math.PI&lt;/code&gt;, which we use to convert radians to degrees and back, and use
for the angles in a circle&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Of course, each of these parts is usable for much, much more &amp;ndash; but let&amp;rsquo;s start here.&lt;/p&gt;

&lt;h2&gt;Radians&lt;/h2&gt;

&lt;p&gt;As a preface, let&amp;rsquo;s get confortable with the &lt;em&gt;units&lt;/em&gt; that these functions
take: &lt;a href="http://en.wikipedia.org/wiki/Radian"&gt;radians&lt;/a&gt;. The degree angles in a circle
go from 0° to 360°. In the land of radians, that&amp;rsquo;s
0 radians to 2π radians. So, halfway around is π and 90° is π/2.&lt;/p&gt;

&lt;p&gt;Core Math functions use radians exclusively. For code that bridges the gap
and accepts degrees as input, you&amp;rsquo;ll usually see a chunk like this,
that defines &lt;code&gt;D2R&lt;/code&gt; and &lt;code&gt;R2D&lt;/code&gt;, which convert radians &lt;code&gt;R&lt;/code&gt; to degrees &lt;code&gt;D&lt;/code&gt; and back again.&lt;/p&gt;

&lt;iframe width='640' height='350' class='white-on-white' src='http://mistakes.io/#5069332'&gt; &lt;/iframe&gt;


&lt;h2&gt;Math.sin &amp;amp; Math.cos&lt;/h2&gt;

&lt;p&gt;Before diving in to &lt;code&gt;Math.sin()&lt;/code&gt; and &lt;code&gt;Math.cos()&lt;/code&gt;, let&amp;rsquo;s think quickly about
what they are.&lt;sup&gt;&lt;a href="#2"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;iframe width='640' height='170' class='white-on-white' src='http://mistakes.io/#5069307'&gt; &lt;/iframe&gt;


&lt;p&gt;&lt;code&gt;Math.sin()&lt;/code&gt; and &lt;code&gt;Math.cos()&lt;/code&gt; are &lt;em&gt;functions&lt;/em&gt; that take one numeric argument
and return a numeric value. While you can give them any number and they&amp;rsquo;ll
give a value, the values repeat every &lt;code&gt;2 * Math.PI&lt;/code&gt;, because that&amp;rsquo;s their
&lt;a href="http://en.wikipedia.org/wiki/Wavelength"&gt;wavelength&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Sine, Cosine, and Unit Circles&lt;/h2&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8525/8530467688_46698099ae_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Many visualizations are composed of circles, circle fitting, or &amp;lsquo;radial&amp;rsquo; layouts.
For instance, &lt;a href="http://bl.ocks.org/tmcw/raw/4678085/"&gt;this geometry daily redo&lt;/a&gt;,
as &lt;a href="http://bl.ocks.org/tmcw/raw/4689139/"&gt;well as this one&lt;/a&gt;, and
&lt;a href="http://bl.ocks.org/tmcw/4949593"&gt;this one&lt;/a&gt;, and &lt;a href="http://bl.ocks.org/tmcw/4945177"&gt;this one&lt;/a&gt; &amp;ndash;
all circle-based.&lt;/p&gt;

&lt;p&gt;To just draw circles, SVG has a &lt;a href="http://www.w3.org/TR/SVG/shapes.html#CircleElement"&gt;circle element&lt;/a&gt;.
But it&amp;rsquo;s more important to reason about them &amp;ndash; to know that, at a certain
angle, where is a point on a circle.&lt;/p&gt;

&lt;p&gt;This is where &lt;code&gt;Math.sin()&lt;/code&gt; and &lt;code&gt;Math.cos()&lt;/code&gt; jump in.&lt;sup&gt;&lt;a href="#1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The fundamental circle you can draw with the functions is a &lt;strong&gt;unit circle&lt;/strong&gt;:
a circle with a radius of 1. (and thus a diameter of 2) Once you make a unit
circle, it&amp;rsquo;s easy to scale it up or down.&lt;/p&gt;

&lt;p&gt;In terms of a unit circle, using &lt;code&gt;Math.sin()&lt;/code&gt; and &lt;code&gt;Math.cos()&lt;/code&gt; is simple:
the sine function generates &lt;code&gt;y&lt;/code&gt; coordinates, and cosine generates &lt;code&gt;x&lt;/code&gt;
coordinates.&lt;/p&gt;

&lt;iframe width='640' height='300' class='white-on-white' src='http://mistakes.io/#5087852'&gt; &lt;/iframe&gt;


&lt;p&gt;We call it a &lt;em&gt;unit circle&lt;/em&gt; because the distance from the center to
each point is 1.&lt;/p&gt;

&lt;p&gt;Both functions take as an argument an angle in radians,
and return a number which you can interpret as a distance from the center
of the circle. The center of the circle, for a unit circle, is at
the coordinate &lt;code&gt;0, 0&lt;/code&gt;, and so it radiates outwards to 1 and -1 in x and y
dimensions.&lt;/p&gt;

&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/tmcw/mWhzt/embedded/" allowfullscreen="allowfullscreen" frameborder="0"&gt; &lt;/iframe&gt;


&lt;p&gt;One of the classic tricks with sine, cosine, and so on is the pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sine: opposite / hypotenuse&lt;/li&gt;
&lt;li&gt;cosine: adjacent / hypotenuse&lt;/li&gt;
&lt;li&gt;tangent: adjacent / adjacent&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These make a lot of sense in this context if you think of a triangle radiating
out of a unit circle, and since the hypotenuse is always equal to 1,
sine and cosine simply provide the values of opposite and adjacent sides.&lt;/p&gt;

&lt;iframe width='640' height='320' src='http://bl.ocks.org/tmcw/raw/5090599/'&gt; &lt;/iframe&gt;


&lt;h2&gt;Radial Shapes from Circles&lt;/h2&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8104/8530470952_6a02dcf5dc_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;With this basic knowledge, you can draw other
kinds of shapes as well.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s an equilateral triangle, drawn by choosing three angles &amp;ndash; 0°, 120°, and 240°,
from a unit circle. Besides just being an easy way to compute this, you
also know that this triangle will be inscribed in a circle made from
the same formula.&lt;/p&gt;

&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/tmcw/eNapM/1/embedded/" allowfullscreen="allowfullscreen" frameborder="0"&gt; &lt;/iframe&gt;


&lt;p&gt;Here&amp;rsquo;s a square, made the exact same way, which you can also guarantee is
inscribed in a circle of radius 90.&lt;/p&gt;

&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/tmcw/rRetG/embedded/" allowfullscreen="allowfullscreen" frameborder="0"&gt; &lt;/iframe&gt;


&lt;p&gt;So: in this narrow usage of trigonometry, sine and cosine are used to go
from angles into coordinates. How do you go back?&lt;/p&gt;

&lt;h2&gt;atan2 and Angles&lt;/h2&gt;

&lt;p&gt;Let&amp;rsquo;s do the opposite: going from coordinates to angles. Doing this is useful
for a number of reasons &amp;ndash; like if you have a &amp;lsquo;dial&amp;rsquo; control in which the
user can drag a circular UI element, and you want to know what angle they&amp;rsquo;re
currently dragging it to. Or if you have existing data and you want to do
something that requires working with the angles from a → b → c, like
&lt;a href="http://macwright.org/2011/07/28/mapping-runs.html"&gt;my running map&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sine, cosine, and tangent have inverse versions: &lt;a href="http://en.wikipedia.org/wiki/Inverse_trigonometric_functions"&gt;arcsine, arctan, and arccos&lt;/a&gt; &amp;ndash;
but they&amp;rsquo;re not that convenient. Why? Because, while an angle going into
sine and cosine will give you a point in x &amp;amp; y, giving arcsine a y coordinate
and arccos an x coordinate is not enough, because there&amp;rsquo;s no one-to-one
mapping &amp;ndash; the point x=0 could be at the the top of the sphere or at the bottom,
and arccos doesn&amp;rsquo;t know.&lt;/p&gt;

&lt;p&gt;In school, you would learn how to figure out what quadrant the point is in,
and use a different little equation for each. Luckily there&amp;rsquo;s some
&lt;strong&gt;new math&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Atan2"&gt;atan2&lt;/a&gt; is awesome: it takes a coordinate
and gives you the angle to it, and handles the quadrant problem internally.
The only catch is that atan2 takes arguments in an atypical &lt;code&gt;y, x&lt;/code&gt; order.&lt;/p&gt;

&lt;iframe width='640' height='300' class='white-on-white' src='http://mistakes.io/#5087892'&gt; &lt;/iframe&gt;


&lt;p&gt;Here&amp;rsquo;s an example of looping this around &amp;ndash; this uses &lt;code&gt;Math.atan2&lt;/code&gt; to find the
angle from a point a picture to the mouse position, and then draws a line
at that angle using &lt;code&gt;Math.cos&lt;/code&gt; and &lt;code&gt;Math.sin&lt;/code&gt;:&lt;/p&gt;

&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/tmcw/EaZPu/embedded/" allowfullscreen="allowfullscreen" frameborder="0"&gt; &lt;/iframe&gt;


&lt;p&gt;atan2 is the goldmine that &lt;a href="http://macwright.org/2011/07/28/mapping-runs.html"&gt;made my running map&lt;/a&gt; possible
and sparked this renewed fascination with math.&lt;/p&gt;

&lt;h2&gt;Further Reading&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://natureofcode.com/"&gt;Nature of Code&lt;/a&gt; is a great exploration of
other realms of math. &lt;a href="http://worrydream.com/#!/KillMath"&gt;Bret Victor&amp;rsquo;s Kill Math&lt;/a&gt;
is essential. &lt;a href="http://oakroadsystems.com/twt/"&gt;Trig without Tears&lt;/a&gt; is great.&lt;/p&gt;

&lt;p&gt;The examples in this article are powered by &lt;a href="http://bl.ocks.org/"&gt;bl.ocks.org&lt;/a&gt;,
&lt;a href="http://jsfiddle.net/"&gt;jsfiddle&lt;/a&gt;, and my project &lt;a href="http://mistakes.io/"&gt;mistakes.io&lt;/a&gt;.
You might also find &lt;a href="http://tributary.io/"&gt;tributary.io&lt;/a&gt; useful for prototyping.
The lead illustration was done in &lt;a href="http://www.contextfreeart.org/"&gt;Context Free&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a name='1'&gt;1.&lt;/a&gt; &lt;a href='https://gist.github.com/tmcw/5057199'&gt;Sine and Cosine in other languages&lt;/a&gt;
&lt;li&gt;&lt;a name='2'&gt;2.&lt;/a&gt; &lt;a href='https://gist.github.com/tmcw/5069385'&gt;Want to know the really core implementation of sine and cosine? Here it is in V8&lt;/a&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/AGgAtjACo58" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/03/05/math-for-pictures.html</feedburner:origLink></entry>
  
  <entry>
    <title>Recently</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/L8iOKO94En4/recently.html" />
    <updated>2013-03-03T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/03/03/recently</id>
    <content type="html">&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8087/8478523725_45c772ba9b_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;February was a busy month. My mind was split between &lt;a href="http://macwright.org/2013/02/05/mistakes.html"&gt;new projects&lt;/a&gt;,
&lt;a href="http://macwright.org/2013/02/20/you-cannot-have-the-code.html"&gt;dc&lt;/a&gt;,
&lt;a href="https://github.com/mapbox/mapbox.js"&gt;refueling a big project&lt;/a&gt;, and
&lt;a href="https://github.com/systemed/iD"&gt;working on a big one&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Listening&lt;/h2&gt;

&lt;iframe width="400" height="100" style="position: relative; display: block; width: 400px; height: 100px;" src="http://bandcamp.com/EmbeddedPlayer/v=2/track=3893947126/size=venti/bgcol=FFFFFF/linkcol=4285BB/" allowtransparency="true" frameborder="0"&gt;&lt;a href="http://bukeandgase.bandcamp.com/track/metazoa-2"&gt;Metazoa by Buke and Gase&lt;/a&gt;&lt;/iframe&gt;


&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pitchfork.com/news/49750-watch-buke-and-gases-eerie-general-dome-video/"&gt;Buke and Gase &amp;ndash; General Dome&lt;/a&gt; &amp;ndash;
&amp;lsquo;Hard Times&amp;rsquo; was the song of the month.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://atomsforpeace.info/"&gt;Atoms for Peace &amp;ndash; AMOK&lt;/a&gt; &amp;ndash; Thom Yorke hijinks
and Flea minus RHCP. Quality album.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yolatengo.com/"&gt;Yo La Tengo &amp;ndash; Fade&lt;/a&gt; &amp;ndash; plus seeing them in-concert
at the &lt;a href="http://www.930.com/"&gt;9:30 Club&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://thaoandthegetdownstaydown.com/"&gt;Thao &amp;amp; The Get Down Stay Down &amp;ndash; We the Common&lt;/a&gt; and
&lt;a href="http://www.vibe.com/article/new-music-emancipator-dusk-dawn-full-album-stream"&gt;Emancipator&amp;rsquo;s Dusk to Dawn&lt;/a&gt; &amp;ndash;
both by fellow &lt;a href="http://www.wm.edu/"&gt;William &amp;amp; Mary&lt;/a&gt; grads.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Plus reviewing four tracks to follow-up &lt;a href="http://analogedition.bigcartel.com/product/teen-mom-i-mean-tom-i-ep-12"&gt;Teen Mom&amp;rsquo;s album, Mean Tom&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Watching&lt;/h2&gt;

&lt;div class='shutter-300'&gt;
&lt;img src='http://farm9.staticflickr.com/8091/8496966134_e50e91edd3_b.jpg' /&gt;
&lt;/div&gt;


&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8094/8505799982_04aed0b723_b.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://supermechanical.com/'&gt;got a twine&lt;/a&gt; and
a &lt;a href='https://www.leapmotion.com/'&gt;leap&lt;/a&gt; and I need to learn more&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.tpbafk.tv/"&gt;Away From Keyboard&lt;/a&gt; is fantastic. I expected it to be
a bit over the top or poorly produced, but it&amp;rsquo;s really a quality piece of film
and journalism.&lt;/p&gt;

&lt;h2&gt;Reading&lt;/h2&gt;

&lt;p&gt;Quite a bit. I posted about the DC Code&amp;rsquo;s &lt;a href="http://macwright.org/2013/02/11/the-code-written.html"&gt;compilation&lt;/a&gt;,
&lt;a href="http://macwright.org/2013/02/13/the-code-compiled.html"&gt;process&lt;/a&gt;, &lt;a href="http://macwright.org/2013/02/14/the-law-is-public-domain.html"&gt;copyright status&lt;/a&gt;,
&lt;a href="http://macwright.org/2013/02/20/you-cannot-have-the-code.html"&gt;propriety&lt;/a&gt;,
and &lt;a href="http://macwright.org/2013/02/22/access-ownership.html"&gt;access&lt;/a&gt;, so there&amp;rsquo;s
been a lot to learn.&lt;/p&gt;

&lt;p&gt;A few highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.law.cornell.edu/voxpop/2011/07/15/tear-down-this-paywall/"&gt;Tear Down this (Pay)Wall&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Clickwrap"&gt;Clickwrap&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Browse_wrap"&gt;Browse wrap&lt;/a&gt; &amp;ndash;
two of the important elements of the problems with the DC Code&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sup.org/book.cgi?id=4495"&gt;No Law&lt;/a&gt; &amp;ndash; a great text about copyright law&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/ProCD_v._Zeidenberg"&gt;ProCD vs. Zeidenberg&lt;/a&gt; &amp;ndash; a court case establishing
the validity of click-wrap and its ability to override copyright&lt;/li&gt;
&lt;li&gt;&lt;a href="http://fairuse.stanford.edu/Copyright_and_Fair_Use_Overview/chapter9/9-c.html"&gt;Summaries of Fair Use Cases&lt;/a&gt; &amp;ndash;
since fair use is per-case, this gives good examples of how those cases have gone.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.lindsredding.com/2012/03/11/a-overdue-lesson-in-perspective/"&gt;A Short Lesson in Perspective&lt;/a&gt; &amp;ndash;
depressing and valid&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.lrb.co.uk/v35/n03/rebecca-solnit/diary"&gt;Google Invades&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://joeblu.net/post/1330454926/peter-thiels-infantile-culture"&gt;Peter Thiel&amp;rsquo;s Infantile Culture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.americanthinker.com/2013/02/fix_the_law_to_fix_america.html"&gt;Fix the Law to Fix America&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Elsewhere&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://macwright.org/presentations/dcjq/"&gt;Presented on d3.js at the DC jQuery Meetup&lt;/a&gt;. First
presentation using &lt;a href="http://tributary.io/"&gt;tributary.io&lt;/a&gt; and
&lt;a href="http://macwright.org/mistakes/"&gt;mistakes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Copyedited and illustrated a blog post series by &lt;a href="https://twitter.com/jfire"&gt;John Firebaugh&lt;/a&gt;: &lt;a href="http://mapbox.com/osmdev/2013/02/26/id-architecture-part-1/"&gt;1&lt;/a&gt;,
&lt;a href="http://mapbox.com/osmdev/2013/02/27/id-architecture-part-2/"&gt;2&lt;/a&gt;,
&lt;a href="http://mapbox.com/osmdev/2013/02/28/id-architecture-part-3/"&gt;3&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/L8iOKO94En4" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/03/03/recently.html</feedburner:origLink></entry>
  
  <entry>
    <title>The Code: Access vs. Ownership</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/CiSjMDAAvho/access-ownership.html" />
    <updated>2013-02-22T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/02/22/access-ownership</id>
    <content type="html">&lt;p&gt;My previous article about &lt;a href="http://macwright.org/2013/02/20/you-cannot-have-the-code.html"&gt;the inaccessibility of complete copies of the DC Code&lt;/a&gt;
was read and commented on pretty widely. I hope that it was a useful introduction
to an important issue, but it&amp;rsquo;s evident that some of it needs more explicit explanation.&lt;/p&gt;

&lt;p&gt;The first is the difference between &lt;em&gt;access and ownership&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Quite a few people posted a link to
&lt;a href="http://government.westlaw.com/linkedslice/default.asp?RS=GVT1.0&amp;amp;VR=2.0&amp;amp;SP=dcc-1000&amp;amp;Action=Welcome"&gt;Westlaw&amp;rsquo;s portal that gives you access to the law&lt;/a&gt;,
and asked &amp;ndash; if you can get the law here, what&amp;rsquo;s the problem?&lt;/p&gt;

&lt;p&gt;The problem is that you can&amp;rsquo;t have a &lt;strong&gt;a complete, digital, public-domain copy&lt;/strong&gt;, despite
&lt;a href="http://localhost:4000/2013/02/14/the-law-is-public-domain.html"&gt;the code being technically and legally public domain&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The West portal is neither copyright-free or nor copyable, and West
has gone to great lengths to guarantee those things.&lt;/p&gt;

&lt;p&gt;Since the portal has &lt;a href="http://legalsolutions.thomsonreuters.com/law-products/about/legal-notices/copyright"&gt;West&amp;rsquo;s copyright&lt;/a&gt;
embedded and a &lt;a href="http://legalsolutions.thomsonreuters.com/law-products/about/legal-notices/terms-of-use"&gt;Terms of Service&lt;/a&gt;
that restricts automated copying, there is no other
complete, online copy of the code. This means that
we&amp;rsquo;re reliant on West as &lt;a href="http://localhost:4000/2013/02/13/the-code-compiled.html"&gt;the sole provider of the code &lt;em&gt;and&lt;/em&gt; the portal&lt;/a&gt;.
So it&amp;rsquo;s both a single point of failure, and a single source with no competitors.
The inadequacy of the portal, like its inability to be linked to, or
to allow anonymous browsing, isn&amp;rsquo;t avoidable: it&amp;rsquo;s the only option, by design.&lt;/p&gt;

&lt;div class='shutter-300'&gt;
&lt;img src='http://farm5.staticflickr.com/4087/4998618592_f36e829b57_o.jpg' width='640' /&gt;
&lt;/div&gt;


&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://www.flickr.com/photos/usnationalarchives/4998618592/'&gt;the constitution&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;This is the &lt;a href="http://en.wikipedia.org/wiki/United_States_Constitution"&gt;US Constitution&lt;/a&gt;.
The original version is in the &lt;a href="http://en.wikipedia.org/wiki/National_Archives_and_Records_Administration"&gt;National Archives&lt;/a&gt;
and is &lt;em&gt;very important&lt;/em&gt;. If someone spilled ink on it, or accidentally burned
it, everyone would be angry. But we would not lose the content
of the constitution.&lt;/p&gt;

&lt;p&gt;This is because there are many copies. And how can there be copies? Because
of the public domain, and simple, unfettered access to the text.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s a &lt;a href="http://constitutionbooklet.com/"&gt;printable constitution&lt;/a&gt;. Here&amp;rsquo;s
a &lt;a href="http://shop.heritage.org/pocket-constitution1106.html"&gt;$1 pocket constitution&lt;/a&gt;.
And &lt;a href="http://www.flickr.com/search/?ss=2&amp;amp;w=commons&amp;amp;q=constitution&amp;amp;m=text"&gt;copyleft images on Flickr&lt;/a&gt;,
and &lt;a href="http://en.wikipedia.org/wiki/File:Constitution_of_the_United_States,_page_1.jpg"&gt;public domain images on WikiMedia&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='http://farm9.staticflickr.com/8235/8496023458_b4c8740517_b.jpg' class='white-on-white' /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://constitutionbooklet.com/'&gt;constitutionbooklet.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;You can &lt;a href="http://www.usconstitution.net/const.pdf"&gt;download the constitution as a PDF&lt;/a&gt;,
or as a Word file, or as a database.
You can also do interesting things with it &amp;ndash; text analysis, art pieces,
and so on &amp;ndash; you can also just store it away, just in case you need it or you
expect the original to eventually yellow and crinkle.&lt;/p&gt;

&lt;p&gt;It is fair to say that the &lt;em&gt;ownership&lt;/em&gt; of the Constitution is yours.&lt;/p&gt;

&lt;p&gt;Compare this to a copyrighted work. A streaming television show is available
to millions of people, but, barring illegal activity, there are no privately-held
copies. It is like a text behind glass &amp;ndash; you can view it, but the owner
can take it away whenever they want. There&amp;rsquo;s a fundamental and practical difference:
you can play an Elvis record even if the recording company and the artist is long
gone, but if Spotify goes offline tomorrow, your &amp;lsquo;streaming collection&amp;rsquo; is no longer.
Copies matter.&lt;/p&gt;

&lt;p&gt;On the surface this may seem like a detail or something that only
programmers really want. But it&amp;rsquo;s quite important.&lt;/p&gt;

&lt;p&gt;This ownership of a complete, legally-free text is the difference between
the DC Code being available widely and it being extremely restricted. A widely
available code could be distributed in free pamphlets, in smartphone applications
for citizens and in every police car&amp;rsquo;s laptop. It could be analyzed for
changes so that citizens can subscribe to passages and know if they need
to adjust to new bike laws, gun laws, or restrictions on how they manage
their business. Or it can be included in a country-wide system for open codes
like &lt;a href="http://www.statedecoded.com/"&gt;The State Decoded&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Without that, it&amp;rsquo;s available in a single, sub-par portal and
hardcover books and CDs that you can&amp;rsquo;t legally copy.&lt;/p&gt;

&lt;p&gt;Beyond the present day, the ability to copy the text is the difference
between being able to archive versions in forward-looking systems like
&lt;a href="http://www.archive.org/"&gt;Archive.org&lt;/a&gt;. It&amp;rsquo;s the difference between the council being able to build
an in-house system for backup versus being dependent on a contractor
with uncertain backup plans and future stability.&lt;/p&gt;

&lt;p&gt;So: the code in the public domain, like the Constitution. But it is managed
more like a copyrighted work, because we cannot get complete, digital copies of it.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/CiSjMDAAvho" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/02/22/access-ownership.html</feedburner:origLink></entry>
  
  <entry>
    <title>You Cannot Have the DC Code</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/U4_DaukGBGw/you-cannot-have-the-code.html" />
    <updated>2013-02-20T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/02/20/you-cannot-have-the-code</id>
    <content type="html">&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8108/8489366246_68dce8f0c8_o.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://legalsolutions.thomsonreuters.com/law-products/Statutes/District-of-Columbia-Official-Code/p/100000736'&gt;printed&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class='addendum'&gt;
&lt;em&gt;addendum&lt;/em&gt;: The problem is &lt;em&gt;acquiring a public domain digital copy of the code&lt;/em&gt;, not
about accessing the code: it's &lt;a title='Westlaw portal' href='http://government.westlaw.com/linkedslice/default.asp?RS=GVT1.0&amp;VR=2.0&amp;SP=dcc-1000&amp;Action=Welcome'&gt;accessible online&lt;/a&gt;.
Read &lt;a href='http://macwright.org/2013/02/22/access-ownership.html'&gt;access vs ownership, a followup, for more information&lt;/a&gt;
&lt;/p&gt;


&lt;p&gt;You cannot have a digital copy of the DC Code. You cannot have a public domain
version of the code, despite it being legally &lt;a href="http://macwright.org/2013/02/14/the-law-is-public-domain.html"&gt;public domain&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Code is the &amp;lsquo;compiled law&amp;rsquo; of the District of Columbia: gun laws,
bike laws, election rules, and most everything else.&lt;/p&gt;

&lt;p&gt;The DC Government does not have a digital copy of the DC Code that
it can give you, even if you ask nicely. It does not have a copy for
itself, beside hardcover books and copyrighted CDs that it can&amp;rsquo;t legally copy or crack.
There&amp;rsquo;s no clear backup plan if a contractor’s lights go off or server
farm goes down &amp;ndash; while a contract requires them to have backups,
there&amp;rsquo;s no guarantee.&lt;/p&gt;

&lt;div class='shutter-300'&gt;
&lt;img src='http://farm3.staticflickr.com/2534/4197805073_182b4f990a_b.jpg' /&gt;
&lt;/div&gt;


&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://www.flickr.com/photos/ajashton/4197805073/in/photostream'&gt;cc-by-na AJ Ashton&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The DC government can&amp;rsquo;t make a pocket copy of the code, or a smartphone app
to better inform policemen, because it doesn&amp;rsquo;t have a copyright-free copy.
Open source developers can&amp;rsquo;t make better data portals for the code because
they don&amp;rsquo;t either.&lt;/p&gt;

&lt;p&gt;The refrain from open-government advocates is that one should &amp;lsquo;ask for a copy&amp;rsquo;.&lt;/p&gt;

&lt;p&gt;You cannot. There is no-one to ask who can give you one and who wants to. The government
only has copyright-infected copies, and the contractor has no reason to
endanger their information monopoly.&lt;/p&gt;

&lt;p&gt;To preclude misunderstandings: this is &lt;strong&gt;not a failure of the Council&lt;/strong&gt; itself.
It has nothing to do with the drama around councilmembers or the DC government&amp;rsquo;s problems.&lt;/p&gt;

&lt;p&gt;The Council &lt;a href="http://macwright.org/2013/02/11/the-code-written.html"&gt;composes and publishes its bills&lt;/a&gt;
and makes every effort at transparency: this is a failure of the last step,
in which the bill is &lt;a href="http://macwright.org/2013/02/13/the-code-compiled.html"&gt;compiled and de-facto owned by a private contractor&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is &lt;em&gt;not a question of hacking or technology.&lt;/em&gt; Writing a scraper for
the portal is an afternoon project, but is illegal, and can be construed
as a felony by the federal government.&lt;/p&gt;

&lt;p&gt;&lt;img src='http://farm9.staticflickr.com/8510/8489382392_65b9b677fb_b.jpg' class='white-on-white' /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;clause from the &lt;a href='http://archive.org/details/DcContractWithWestFor2012'&gt;2012 Contract with West&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;This is a failure of the public/private contracting system and the
&lt;em&gt;government&amp;rsquo;s ability to write strong and precise contracts that
are geared for the internet era&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This is a failure of &lt;a href="http://www.westlaw.com/"&gt;Westlaw&lt;/a&gt; and
&lt;a href="http://www.lexisnexis.com/"&gt;LexisNexis&lt;/a&gt;. It&amp;rsquo;s possibly a reiteration of a
&lt;a href="http://en.wikisource.org/wiki/West_Publishing_Co._v._Mead_Data_Central,_Inc."&gt;well-known court case&lt;/a&gt;
focused on their previous attempt to do the same thing:
monetize what should be a basic unit of democracy.&lt;/p&gt;

&lt;p&gt;Next up: how this is possible, what it means, and how we can fix it.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/U4_DaukGBGw" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/02/20/you-cannot-have-the-code.html</feedburner:origLink></entry>
  
  <entry>
    <title>Literate Jenks Natural Breaks and How The Idea Of Code is Lost</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/ypUPI6iCRPY/literate-jenks.html" />
    <updated>2013-02-18T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/02/18/literate-jenks</id>
    <content type="html">&lt;p&gt;Consider Jenks Natural Breaks Optimization.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://bl.ocks.org/tmcw/4969184"&gt;&lt;img src="http://farm9.staticflickr.com/8390/8483803012_1d8f5033c9_h.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://bl.ocks.org/tmcw/4969184'&gt;try an interactive version of this&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s a way to cut up data values into discrete categories. For instance,
a choropleth map of poverty rates is cut into nine buckets which each
have a different &lt;a href="http://colorbrewer2.org/"&gt;color&lt;/a&gt;. Different scales are
useful for different kinds of data &amp;ndash; you might use a linear scale, log scale,
quantile, or so on.&lt;/p&gt;

&lt;p&gt;Jenks is an algorithm designed specifically for this
case that tries to maximize the similarity of numbers in groups while
maximizing the distance between the groups. It tends to look good and
be easily understood, so it&amp;rsquo;s popular. It&amp;rsquo;s in ArcGIS, QGIS, and lots of
other tools for maps and statistics. It&amp;rsquo;s in university lectures and textbooks.&lt;/p&gt;

&lt;h2&gt;Mystery Ports of Ports&lt;/h2&gt;

&lt;p&gt;There&amp;rsquo;s a standard algorithm we use for Jenks, with existing ports in
&lt;a href="https://github.com/simogeo/geostats"&gt;in Javascript&lt;/a&gt;,
&lt;a href="https://gist.github.com/drewda/1299198"&gt;Python&lt;/a&gt;,
and &lt;a href="https://stat.ethz.ch/pipermail/r-sig-geo/2006-March/000811.html"&gt;in Java and Fortran&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Notice anything about these linked scripts?&lt;/p&gt;

&lt;p&gt;Every implementation I could find of Jenks is &lt;strong&gt;a port from Fortran IV&lt;/strong&gt;,
with the same terrible variable names, no comments, and absolutely no evidence that
the porting author knew absolutely anything about &lt;strong&gt;what the code was doing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='http://farm9.staticflickr.com/8520/8484141228_5d14487c78_b.jpg' class='white-on-white' /&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s be clear: the algorithms we use for Jenks are directly ported from an algorithm
that accepted punch cards, documented in a paper composed and published
on a typewriter.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s not clear who renamed the matrices (originally &lt;code&gt;OP&lt;/code&gt; and &lt;code&gt;LC&lt;/code&gt;) to &lt;code&gt;mat1&lt;/code&gt; and &lt;code&gt;mat2&lt;/code&gt;,
but that naming stuck and sucks.
The Javascript ports don&amp;rsquo;t just taste like Fortran, but Python too &amp;ndash; zeros
are initialized as &lt;code&gt;0.0&lt;/code&gt; as if the language had an integer type, and have
about half comma-free style.&lt;/p&gt;

&lt;p&gt;And this is not quibbling about style:
&lt;a href="http://en.wikipedia.org/wiki/Jenks_natural_breaks_optimization"&gt;the Wikipedia article about Jenks natural breaks&lt;/a&gt;
describes an algorithm entirely unlike these ones. There&amp;rsquo;s no mention
of dynamic-programming matrices, and there&amp;rsquo;s no hint in the implementations
of something like the &amp;lsquo;sum of deviations between classes.&amp;rsquo; Of course, there
are no comments in any of the ports, so it&amp;rsquo;s hard to tell.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The lack of interest, the disdain for history is what makes computing not-quite-a-field. &amp;ndash; &lt;a href="http://www.drdobbs.com/architecture-and-design/interview-with-alan-kay/240003442"&gt;Alan Kay&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;But on the other hand, how could they know?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8381/8482577349_809d767117_o.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://via.me/-9hyi8hu'&gt;Bill Morris&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;George F. Jenks proposed jenks natural breaks in his 1977 article entitled
&amp;lsquo;Optimal Data Classification for Choropleth Maps&amp;rsquo;.&lt;/p&gt;

&lt;p&gt;This article isn&amp;rsquo;t available online, or in print. As far as I can tell,
it has never been digitized. It&amp;rsquo;s ostensibly still owned by the &lt;a href="http://www.geog.ku.edu/"&gt;University of Kansas Geography Department&lt;/a&gt;,
so the copy that &lt;a href="http://www.geosprocket.com/"&gt;Bill Morris&lt;/a&gt; was kind enough
to scan and share I can&amp;rsquo;t safely post. Even if the university doesn&amp;rsquo;t assert
copyright, because Professor Jenks passed in 1996, it&amp;rsquo;ll be copyrighted in his name until 2072.&lt;/p&gt;

&lt;p&gt;Bother your senator today about copyright term limits.&lt;/p&gt;

&lt;p&gt;And so we have history in the oddest terms. The idea is lost but the Fortran
code is resurrected in a new language every few years, along with a link
to the last link to the unreachable text.&lt;/p&gt;

&lt;h2&gt;Jenks in simple-statistics&lt;/h2&gt;

&lt;p&gt;I spent a day reading the original text and decoding as much as possible
of the code&amp;rsquo;s intention, so that I could write a &amp;lsquo;literate&amp;rsquo; implementation.
My definition of literate is highly descriptive variable names, detailed and narrative
comments, and straightforward code with no hijinks.&lt;/p&gt;

&lt;p&gt;So: yes, this isn&amp;rsquo;t the first implementation of Jenks in Javascript. And it
took me several times longer to do things this way than to just get the code
working.&lt;/p&gt;

&lt;p&gt;But the sad and foreboding state of this algorithm&amp;rsquo;s existing implementations
said that to think critically about this code, its result, and possibilities
for improvement, we need at least one version that&amp;rsquo;s clear about what
it&amp;rsquo;s doing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tmcw/simple-statistics"&gt;simple-statistics&lt;/a&gt;, my &lt;a href="http://macwright.org/2012/06/26/simple-statistics.html"&gt;library for literate, beginner-friendly statistics&lt;/a&gt;,
now has a &lt;a href="http://macwright.org/simple-statistics/docs/simple_statistics.html#section-116"&gt;literate implementation&lt;/a&gt; of
Jenks natural breaks. In the process of understanding the implementation,
I found that the matrix system is a sort of &lt;a href="http://en.wikipedia.org/wiki/Dynamic_programming"&gt;dynamic programming&lt;/a&gt;
that cleverly solves all breaks from &lt;code&gt;1-k&lt;/code&gt; when you request &lt;code&gt;k&lt;/code&gt; breaks.
Thus my implementation breaks it into two parts &amp;ndash; creating the matrices
and pulling a solution out of them.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s in Javascript. A lot of smart geospatial code has been in Python
or C++, with only a recent trend toward JS. I don&amp;rsquo;t see this as mattering
much, since it&amp;rsquo;s a basic mathematical algorithm &amp;ndash; not exactly a chance
to use language features. But Javascript is fast, as in, &lt;a href="https://code.google.com/p/v8/"&gt;the V8 engine&lt;/a&gt; is fast.
In basic benchmarks, it&amp;rsquo;s &lt;a href="https://gist.github.com/llimllib/4974446"&gt;12x faster than a Python implementation&lt;/a&gt;.
As &lt;a href="https://twitter.com/llimllib/status/303337147321155584"&gt;Bill Mill points out&lt;/a&gt;, &lt;a href="http://pypy.org/"&gt;PyPy&lt;/a&gt;
is on par with Javascript and there are a &lt;a href="https://twitter.com/llimllib/status/303316590190006273"&gt;few other tweaks&lt;/a&gt;
that improve performance, but it&amp;rsquo;s interesting that CPython is so slow
at computationally-heavy, repetitive work.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Try out Jenks in &lt;a href="https://github.com/tmcw/simple-statistics"&gt;simple-statistics&lt;/a&gt;.
If the assortment of &lt;a href="https://github.com/tmcw/simple-statistics/blob/master/API.md"&gt;other algorithms included&lt;/a&gt;
make you feel like you should create a new &amp;lsquo;micro library&amp;rsquo;, you can
also &lt;a href="https://gist.github.com/tmcw/4977508"&gt;just use the jenks implementation as a standalone&lt;/a&gt;.
Please don&amp;rsquo;t delete the comments: if you need compression, use &lt;a href="https://github.com/mishoo/UglifyJS"&gt;uglify-js&lt;/a&gt;
as a separate step.&lt;/p&gt;

&lt;p&gt;And so here&amp;rsquo;s a literate implementation of Jenks natural breaks in Javascript.
If you can, please help to improve it by making the implementation more
explanatory.&lt;/p&gt;

&lt;p&gt;If you&amp;rsquo;re an academic, take this as a cautionary lesson to
promote the free distribution of your work &amp;ndash; if not now, for the future.
If you&amp;rsquo;re a coder, consider whether the abstraction of software can
be misused to mask ignorance of basic principles.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/ypUPI6iCRPY" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/02/18/literate-jenks.html</feedburner:origLink></entry>
  
  <entry>
    <title>State Law is Public Domain. What's Public Domain?</title>
    <link href="http://feedproxy.google.com/~r/tommacwright/odWX/~3/63qDDIMWmBU/the-law-is-public-domain.html" />
    <updated>2013-02-14T00:00:00-08:00</updated>
    <id>http://macwright.org/2013/02/14/the-law-is-public-domain</id>
    <content type="html">&lt;div class='shutter-300'&gt;&lt;img src='http://farm8.staticflickr.com/7215/6896196638_c2a9c1b866_b.jpg' /&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Last time we &lt;a href="http://macwright.org/2013/02/13/the-code-compiled.html"&gt;talked about how the law is compiled in Washington, DC&lt;/a&gt;,
by a combination of district employees drafting bills which are &amp;lsquo;changesets&amp;rsquo;
to the law, which are applied to the law by contractors. The end result is
that the district itself does not hold a complete, copyright-free digital
copy of the law &amp;ndash; it is only held by the company they pay. Let&amp;rsquo;s discuss
why this is a problem: is the law free in the first place, and what does
free mean?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Federal and state laws are in the public domain: they cannot be copyrighted.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Copyright"&gt;Copyright&lt;/a&gt; is a legal concept of exclusive rights:
a copyright owner can decide to sell copies or licenses of &amp;lsquo;the work&amp;rsquo;,
like music, text, or art. They can also let others use the work and declare how they
want to be credited.&lt;/p&gt;

&lt;p&gt;They can also &lt;a href="http://en.wikipedia.org/wiki/Copyleft"&gt;use a copyleft license&lt;/a&gt; to
free the work to some degree &amp;ndash; they still own the copyright but allow others
to copy it as if it isn&amp;rsquo;t copywritten. Familiar forms of copyleft are
&lt;a href="http://creativecommons.org/"&gt;Creative Commons&lt;/a&gt; licenses and open source
licenses like the GPL and BSD licenses.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm8.staticflickr.com/7148/6811314675_00e36bc244_b.jpg" alt="Mona Lisas" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://www.flickr.com/photos/25110059@N06/6811314675/'&gt;The Mona Lisa(s)&lt;/a&gt; are &lt;a href='http://en.wikipedia.org/wiki/File:Mona_Lisa.jpg'&gt;Public Domain&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Public_domain"&gt;Public domain&lt;/a&gt; is &lt;strong&gt;lack of copyright&lt;/strong&gt;:
there are no intellectual property rights for public domain works. That means
you can sell copies of the Mona Lisa or Hamlet or operate a site like
&lt;a href="http://www.gutenberg.org/"&gt;Project Gutenberg&lt;/a&gt; that gives away free public domain books.
Public domain is a stronger form of freedom than copyleft. The copyright
holder does not cede or license specific rights by their own volition: there
is no copyright holder.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Edicts of government, such as judicial opinions, administrative rulings,
legislative enactments, public ordinances, and similar official legal
documents are not copyrightable for reasons of public policy.
This applies to such works whether they are Federal, State, or local as
well as to those of foreign governments.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;span class='image-credit'&gt;&lt;a href='http://www.copyrightcompendium.com/#206'&gt;Compendium II: Copyright Office Practices 206.01&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;State laws &lt;a href="http://en.wikipedia.org/wiki/Copyright_law_of_the_United_States#Federal_and_state_laws_are_not_copyrighted"&gt;cannot be copyrighted&lt;/a&gt;,
because the US Government intelligently realizes that it&amp;rsquo;s important
that citizens can access them freely, and copyright usually restricts distribution.&lt;/p&gt;

&lt;p&gt;For instance, I can technically sell you a copy of Florida&amp;rsquo;s laws and make a
profit off of it. And you can make a copy of that copy, and, in turn,
make a profit off of that. And your friend can buy a copy, use it as a texture
in their art piece, without asking anyone&amp;rsquo;s permission or giving anyone credit.&lt;/p&gt;

&lt;p&gt;This is separate from the idea that &amp;lsquo;government works&amp;rsquo; are public domain, which
both excludes the District of Columbia (and Puerto Rico), and can be circumvented
by using contractors to do work. &amp;lsquo;Works prepared by an officer or employee of the u.s. Government as part of that person&amp;rsquo;s official duties&amp;rsquo;
does not apply to employees of a company contracted to do a ground survey or
study for the government: they can copyright their work.&lt;/p&gt;

&lt;p&gt;Image: &lt;a href="http://www.flickr.com/photos/uscapitol/6896196638/"&gt;Law Library in Old Supreme Court (public domain image)&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/tommacwright/odWX/~4/63qDDIMWmBU" height="1" width="1"/&gt;</content>
    <author>
      <name>Tom MacWright</name>
      <uri>http://macwright.org/about/</uri>
    </author>
  <feedburner:origLink>http://macwright.org/2013/02/14/the-law-is-public-domain.html</feedburner:origLink></entry>
  
</feed>
