tag:quandyfactory.com,2015-3-17:/2015317 2015-3-17T12:00:00Z Quandy Factory Newsfeed - All Quandy Factory is the personal website of Ryan McGreal in Hamilton, Ontario, Canada.. http://quandyfactory.com/essays/72/hamilton_next:_good_ideas_come_from_urban_focus 2015-03-23T12:00:00Z HAMILTON NEXT: Good ideas come from urban focus <p>Hamilton is a city, not a bedroom community - a real destination for commuters and an important engine of economic development. Seventy per cent of Hamiltonians work in Hamilton, not Toronto or Mississauga. Another 38,000 people commute into the city from a region spanning Niagara, Haldimand-Norfolk and Halton.</p> <p>A recent study by the Centre for Community Study found that 23,400 people work in the downtown core, earning salaries well above the city and provincial averages. Downtown is already the city's single biggest employment cluster and still has plenty of room to grow.</p> <p>While our decision makers pin their hopes on "shovel-ready" suburban greenfields, everything we have learned from the study of economic development points to downtown as the place we need to focus for a more prosperous future.</p> <p>Steven Johnson, author of Where Good Ideas Come From, explains that innovation emerges from a dense network of connections that provides a context for invention. He describes how new ideas are cobbled together using available parts and concludes, "Chance favours the connected mind."</p> <p>The environment Johnson is describing is an urban environment. Put simply, cities are the places where people cross paths and exchange ideas, and where "half-formed hunches" can combine into innovations that produce wealth.</p> <p>When we live and work in urban, mixed-use environments, two important things happen: the per-person cost of public infrastructure goes down, while the rate of innovation speeds up.</p> <p>It's a two-for-one productivity boost, and it's due to the distinctly urban economies of density, scale and association.</p> <p>Density brings destinations together, reducing travel costs and making activities more affordable. Scale gives us bigger markets so the fixed cost of production goes down per unit of output. Density and scale bring people into frequent contact, and that association gives us the networks of "connected minds" that result in an innovation boom.</p> <p>For these reasons, Hamilton must make urban revitalization its number one growth priority. The alternative of continued suburban development doesn't generate enough revenue to pay for the infrastructure that is needed to service it.</p> <p>Each new subdivision actually increases the city's net liabilities. And as the urban boundary expands, more distant suburbs are even more expensive to service.</p> <p>Council just voted to increase development charges by 2013, but the city will still charge only 60 per cent of what it is allowed to collect - even 100 per cent would not actually cover the full cost of development.</p> <p>We have been running this pyramid scheme for decades, paying for yesterday's expansion with tomorrow's. As a result, our existing infrastructure idles while we spend money we don't have to build more infrastructure that can't pay for itself.</p> <p>Our regulatory system reinforces this focus on sprawl at the expense of urban investment. The Zoning By-Law encourages low density, single-use development while actively obstructing adaptive reuse and intensification.</p> <p>Even a modest infill project can face hundreds of thousands of dollars in fees for building permits, setback variances, cash-in-lieu-of-parkland (that can only be used to build new parks in the suburbs), mandatory parking requirements, zoning variances for any use not explicitly listed in the zoning for that building, and development charges - even though the infrastructure the building will use is already built.</p> <p>The new Official Plan fixes some of these issues, but it will be mired in Ontario Municipal Board appeals for years. Meanwhile, the city continues to suffocate slowly under the current rules.</p> <p>We can move faster with an investment-friendly secondary plan (particularly along our east-west B-Line corridor) that establishes a dense urban form primed for mixed use. City staff are already working with businesses downtown on an intensification study that will address the major barriers to reinvestment.</p> <p>We must also commit to building the proposed east-west light rail transit line. The evidence is clear: LRT anchors new private investment and intensifies land use, increasing tax assessments and infrastructure productivity. It attracts residents and signals a city's long-term commitment to the area, which gives developers the confidence to invest.</p> <p>City staff have prepared a detailed inventory of development opportunities along the LRT corridor and the potential is staggering. If Hamilton's LRT performs similarly to other cities, we could see a billion dollars in new investments and tens of millions a year in new tax assessments.</p> <p>The province has said if it approves LRT, it will cover 100 per cent of the direct capital cost. The city will have to contribute some money - the amount is still being negotiated - but the cost of not building LRT is a steady erosion in our finances as the city's unfunded infrastructure liabilities get worse and worse.</p> <p>An urban focus doesn't mean an end to our suburbs. Rather, it means we need an economic engine that generates enough wealth to pay for those suburbs. As Indianapolis Mayor Bill Hudnut famously said, "You can't be a suburb of nothing."</p> <p><em>This essay was published in the Hamilton Spectator on <a href="http://www.thespec.com/opinion/columns/article/565673--hamilton-next-good-ideas-come-from-urban-focus">Wednesday, July 20, 2011</a>.</em></p> Ryan McGreal 2 http://quandyfactory.com/blog/65/designing_a_restful_web_application 2014-12-23T12:00:00Z Designing a RESTful Web Application <h3>Introduction</h3> <p>I'm working on a couple of projects that involve building a web service, and I decided early on that because of our business constraints - having to communicate with a variety of different systems of varying levels of sophistication - it made sense to keep the web service as simple and accessible as possible.</p> <p>That pointed me toward designing a RESTful web service that transmits data in a simple format over straight HTTP. After all, just about any programming language imaginable can make an HTTP request. I also decided to go with JSON for the data format, in part because I've been <a href="/blog/50/couchdb_working_notes">experimenting lately with CouchDB</a> and appreciate both the simplicity and flexibility of JSON and the fact that you can find a JSON parser for any language.</p> <p>This blog entry is my attempt to get all the concepts of RESTful web service design straight. There's a good chance that some of this information is wrong; and if you notice something, please <a href="mailto:ryan@quandyfactory.com">let me know about it</a>. I'll investigate your argument and update the essay as applicable.</p> <p>With that in mind, here we go.</p> <h3>Representational State Transfer</h3> <p>Representational State Transfer, or REST, is a model for designing networked software systems based around clients and servers. In a RESTful system, a client makes a <strong>request</strong> for a <strong>resource</strong> on a server, and the server issues a <strong>response</strong> that includes a representation of the resource.</p> <p>The concept was formalized in 2000 by Roy Fielding, one of the architects of Hypertext Transfer Protocol (HTTP), about more which below, in his doctoral dissertation. It is not surprising, then, that REST and HTTP mesh very smoothly.</p> <p>A RESTful client-server system is <strong>stateless</strong>, meaning each request against the server contains all the information the server needs to process it; and <strong>cacheable</strong>, in that the server can specify whether and for how long resource representations can be cached either locally on the client or on intermediate servers between the client and the server.</p> <h3>Hypertext Transfer Protocol</h3> <p>Hypertext Transfer Protocol (HTTP) is a stateless protocol based on a client requesting a resource across a network and the server providing a response. As such, an HTTP transaction entails a <strong>request</strong> and a <strong>response</strong>. The request goes from the client to the server, and the response goes from the server back to the client.</p> <h4>HTTP Requests</h4> <p>An HTTP request has three parts:</p> <ol> <li><p>The <strong>request</strong> line, which includes the HTTP method (or "verb"), the uniform resource identifier (URI), and the HTTP version. E.g.</p> <p><code>GET /article/1/ HTTP/1.1</code></p></li> <li><p>One or more optional <a href="http://en.wikipedia.org/wiki/List_of_HTTP_headers">HTTP headers</a>, which are key/value pairs that characterize the data being requested and/or provided.</p></li> <li><p>An optional <strong>message body</strong>, which is data being sent from the client to the server as part of the request.</p></li> </ol> <h4>HTTP Responses</h4> <p>An HTTP response also has three parts:</p> <ol> <li><p>The <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">HTTP status code</a>, indicating the status of the requested URI, e.g.</p> <p><code>HTTP/1.1 200 OK</code></p></li> <li><p>One or more optional <strong>HTTP headers</strong>, which are key/value pairs that characterize the data being provided.</p></li> <li><p>An optional <strong>message body</strong>, which is the data being returned to the client in response to the request.</p></li> </ol> <h3>Resources</h3> <p>HTTP deals in <strong>resources</strong>. Each URI points to a resource on the server. Think of URIs as nouns, not verbs, with one URI for each resource. </p> <p>For example, if you want to add the ability to create an article, it might be tempting to create a URI called <code>/create_article</code>. This is wrong, because it conflates the object (the resource) and the action (creation). Instead, it makes more sense to have a resource called <code>/article</code> and a <strong>method</strong> that lets you create articles.</p> <h3>HTTP Methods</h3> <p>HTTP defines several methods, or "verbs", to execute on a resource: <code>HEAD</code>, <code>GET</code>, <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, <code>TRACE</code>, <code>OPTIONS</code>, <code>CONNECT</code>, and <code>PATCH</code>. However, the following four are most commonly used in web services:</p> <h4>GET Method</h4> <p>To retrieve a resource, issue an HTTP <strong>GET</strong> request. GET requests are <em>idempotent</em> (see below), which means making a GET request multiple times does not cause any change in the resource that is requested. </p> <p>GET requests do not include a message body, but GET responses usually do.</p> <h4>POST Method</h4> <p>To submit data to be processed, issue an HTTP <strong>POST</strong> request. POST requests require a message body, i.e. the data to be processed. </p> <p>For example, if there is a resource called <code>/article</code> and you want to add a new article, issue a POST request to <code>/article</code> with the content. The server will create a new <em>subsidiary</em> URI under <code>/article</code> - for example, <code>/article/9001</code> - and assign that URI to the content you sent with your POST request.</p> <p>Important note: POST requests are <em>not</em> idempotent (see below), meaning multiple POST requests will create multiple resources with unique identifiers.</p> <h4>PUT Method</h4> <p>To place content at an existing resource, issue an HTTP <strong>PUT</strong> request. For example, if there is a URI <code>/article/9001</code> and you want to replace the content served at that URI, issue a PUT request to that URI with the new content.</p> <p>Important note: PUT requests <em>are</em> idempotent, i.e. issuing 1 or 5 or 50 identical PUT requests will have the same effect on the resource. <strong>PUT</strong> requests must include a message body (the resource to be placed at the URL). </p> <h4>DELETE Method</h4> <p>To remove a resource (and remove its accompanying URI), issue an HTTP <strong>DELETE</strong> request. DELETE requests should be idempotent, i.e. issuing 1 or 5 or 50 identical DELETE requests will delete exactly one resource. DELETE requests do not require a message body.</p> <h4>Idempotence</h4> <p>This funny-looking word is crucial to designing an effective web service. A request is <strong>idempotent</strong> if issuing it more than once does not change the resource state beyond issuing it just once. Read that again if you have to.</p> <p>For example, a DELETE request is idempotent if the first request deletes a resource at a URI, and the second request does nothing because the resource at that URI is already deleted. </p> <p>For another example, a PUT request is idempotent if the first request updates a resource at a URI, and the second request updates the same resource in the same way at the same URI.</p> <p>A request is <em>not</em> idempotent if issuing it more than once <em>does</em> change the resource. For example, a POST request to add a comment to a document is not idempotent, if issuing the POST request twice adds the comment twice (so that the document contains two identical comments with separate URLs). </p> <h4>PUT vs. POST</h4> <p>My original understanding of HTTP methods was that you would use PUT to create a resource and POST to update it. This seems in keeping with common sense, but it breaks down when you apply the all-important filter of idempotence.</p> <p>An interesting discussion on Stack Overflow <a href="http://stackoverflow.com/questions/630453/put-vs-post-in-rest">tackles this issue</a>, but what convinced me to change my mental model was this observation:</p> <blockquote> <p>POST creates a child resource, so POST to <code>/items</code> creates a resources that lives under the <code>/items</code> resource. Eg. <code>/items/1</code>.</p> <p>PUT is for creating or updating something with a known URL. </p> </blockquote> <p>This collision between the inclination to regard PUT as creating and POST as updating is a significant source of confusion about how to well-design a RESTful system, and deserves more attention.</p> <p>Furthermore, it's tempting to assume that the HTTP verbs line up precisely with the SQL CRUD verbs, but while they're superficially similar, they're not identical. Treating them as such leads to this kind of gotcha. </p> <p>It's important to keep the logic of HTTP methods separate from the logic of SQL queries, and to develop specialized appropriate logic between the two domains that ensures the data processing on the server produces responses that satisfy the requirements of the HTTP methods (particularly in respect to idempotence).</p> <h3>Conceiving the Web Service: A Resource/Method Table</h3> <p>At a conceptual level, a RESTful web service API is a matrix of resources and methods that exposes the functionality of the service to third party applications. Below is an example of what that matrix might look like. </p> <p>Again, note well that actions are not mapped to URIs. A resource is an <em>object</em>, a <em>noun</em>, and the action inheres to the HTTP Verb, not to the URI. As a result, the same resource URI can serve different responses (corresponding with different actions) depending on the HTTP Verb.</p> <table> <caption>REST Resource/Action Matrix</caption> <thead> <tr> <th colspan="4">Request</th> <th rowspan="2">Server Action</th> <th rowspan="2">Response</th> <th rowspan="2">Idempotent</th> </tr> <tr> <th>Resource</th> <th>Parameters</th> <th>Method</th> <th>Data</th> </tr> </thead> <tbody> </tr> <tr> <td>/article</td> <td></td> <td>POST</td> <td>article details</td> <td>creates a new article</td> <td>returns confirmation and id</td> <td class="red">No</td> </tr> <tr> <td>/article</td> <td>/id</td> <td>GET</td> <td></td> <td>gets article details</td> <td>returns article details</td> <td class="green">Yes</td> </tr> <tr> <td>/article</td> <td>/id</td> <td>PUT</td> <td>new article details</td> <td>updates article details</td> <td>returns confirmation and updated article details</td> <td class="green">Yes</td> </tr> <tr> <td>/article</td> <td>/id</td> <td>DELETE</td> <td></td> <td>deletes an article </td> <td>returns confirmation of deleted article</td> <td class="green">Yes</td> </tr> </tbody> </table> <p>This is the RESTful way to organize a web service: URIs are objects and HTTP Verbs are actions performed on those objects.</p> <h3>HTTP Response Data Formats</h3> <p>Every web server is also a RESTful web service, accepting GET and POST requests to particular resources, and then performing actions and serving data in response.</p> <p>A conventional web server delivers its data in HTML format (<code>text/html</code>), with related Javascript (<code>text/javascript</code>), CSS (<code>text/css</code>) and image files. HTML is an excellent format for marking up textual data for human use, but it has very limited expressive power for structuring data beyond simple documents.</p> <p>The most common formats used to transmit structured data across HTTP are <strong>XML</strong> and <strong>JSON</strong>, with an honourable mention for <strong>YAML</strong>.</p> <h4>XML</h4> <p><a href="http://www.w3.org/XML/">XML</a>, or eXtensible Markup Language, is a markup (i.e. tag) based syntax based on SGML for formatting structured, text-based data. XML is a format in which to create domain specific markup languages that define particular data structures. </p> <p>For example, <a href="http://en.wikipedia.org/wiki/RSS">RSS</a> and <a href="http://en.wikipedia.org/wiki/Atom_%28standard%29">Atom</a> are XML language standards defined to structure documents published to websites so that the documents can be 'syndicated' to feed readers and third party sites for display.</p> <p>Likewise, the default underlying structure of Microsoft Office documents since Office 2007 is an XML language called <a href="http://en.wikipedia.org/wiki/Office_Open_XML">OOXML</a>.</p> <p>XML structures data by defining elements, properties, data types and allowable nesting rules in an XML schema called a <a href="http://en.wikipedia.org/wiki/Document_Type_Definition">Document Type Definition</a>, or DTD. </p> <p>A given XML document specifies which DTD schema should define its structure with a <a href="http://en.wikipedia.org/wiki/Document_Type_Declaration">Document Type Declaration</a>, or DOCTYPE.</p> <p>A given XML document can reference multiple DTDs by using namespaces.</p> <p>Here is a sample XML file containing contact information about a person, taken from <a href="http://en.wikipedia.org/wiki/JSON">Wikipedia</a>.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Person&gt; &lt;firstName&gt;John&lt;/firstName&gt; &lt;lastName&gt;Smith&lt;/lastName&gt; &lt;age&gt;25&lt;/age&gt; &lt;address&gt; &lt;streetAddress&gt;21 2nd Street&lt;/streetAddress&gt; &lt;city&gt;New York&lt;/city&gt; &lt;state&gt;NY&lt;/state&gt; &lt;postalCode&gt;10021&lt;/postalCode&gt; &lt;/address&gt; &lt;phoneNumber type="home"&gt;212 555-1234&lt;/phoneNumber&gt; &lt;phoneNumber type="fax"&gt;646 555-4567&lt;/phoneNumber&gt; &lt;/Person&gt; </code></pre> <p>XML must be: </p> <ul> <li><p><strong>Well-formed</strong> - elements are properly nested, tags are properly closed and match case, special characters are escaped, and Unicode characters are encoded; and </p></li> <li><p><strong>Valid</strong> - its elements and attributes match the rules defined in the DTD.</p></li> </ul> <p>An XML Language called XSLT can be used to map XML documents into other markup languages, e.g. HTML.</p> <p>XML is in wide use in applications that transfer structured data over the internet.</p> <h4>JSON</h4> <p><a href="http://json.org/">JSON</a>, or "JavaScript Object Notation", is a lightweight data format introduced in 2001 by Douglas Crockford.</p> <p>Pronounced "Jason", JSON is based on JavaScript object literal notation, a syntax for creating objects in JavaScript by literally describing their properties and methods. Here is the JSON equivalent to the XML code in the previous section.</p> <pre><code>{ "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021" }, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] } </code></pre> <p>While the XML above contained 367 characters (not including indentation), the equivalent JSON contains only 272 characters - only three-quarters as large.</p> <p>JSON supports <strong>lists</strong> (ordered sets of values) and <strong>dictionaries</strong> (unordered collections of key/value pairs) with arbitrary nesting and various data types: <strong>number</strong>, <strong>string</strong>, <strong>boolean</strong>, <strong>list<em>, *</em>object</strong> and <strong>null</strong>. </p> <p>Like XML, JSON is also in wide use in applications that transfer structured data over the internet.</p> <p>A major advantage over XML is that the syntax is much simpler and less verbose, which makes it lighter across networks as well as more human-readable.</p> <p>Mature JSON parsers are available for a wide range of programming languages in addition to JavaScript. Python, for example, <a href="http://docs.python.org/library/json.html">includes a json parser</a> as part of its standard library (as of version 2.6; earlier versions can use the third-party <a href="http://pypi.python.org/pypi/simplejson/">simplejson</a> library). </p> <p>A decent JSON parser converts an object back and forth between the programming language's native data types and their JSON equivalents. That way, an application can receive a JSON object, convert it into a native object, process it natively, and then convert the final result back to JSON to be dispatched elsewhere.</p> <h4>YAML</h4> <p><a href="http://www.yaml.org/">YAML</a>, pronounced to rhyme with "camel", is a recursive acronym meaning "YAML Ain't Markup Language". Whereas JSON is a more minimal data format than XML, YAML takes minimalism to an extreme, eschewing quotation marks, brackets and curly braces altogether in favour of significant indentation and line breaks.</p> <p>The YAML equivalent to the XML and JSON contact examples above would be:</p> <pre><code>firstName: John lastName: Smith age: 25 address: streetAddress: 21 2nd Street city: New York state: NY postalCode: 10021 phoneNumber: - type: home number: 212 555-1234 - type: fax number: 646 555-4567 </code></pre> <p>That works out to just 239 characters - including the significant white space.</p> <h3>REST Best Practices</h3> <p>A RESTful web API ought to be <em>discoverable</em> by its users. One crucial way to do that is by making sure that each resource in your API includes URLs to subsidiary URLs.</p> <p>Here is an example, using JSON:</p> <pre><code>{ "articles": [ { "title": "My First Baguette", "description": "After a month of reading about how to make baguettes, I finally took the plunge today.", "date_published": "2011-07-11", "url": "http://quandyfactory.com/blog/81/my_first_baguette" }, { "title": "Tenn. Passes Controversial Lawnmower Theft Bill", "description": "The lawnmowing industry has successfully lobbied the Tennessee State Government to pass a groundbreaking law making it a criminal offence to loan your lawnmower to a neighbour.", "date_published": "2011-06-02", "url": "http://quandyfactory.com/blog/78/tenn_passes_controversial_lawnmower_theft_bill" } ] } </code></pre> <p>When you do this, you make it easy for API users to discover your API structure and functionality without having to keep referring to obscure documentation.</p> <hr /> <p><em>Special thanks to <a href="http://socialtech.ca/ade">Adrian Duyzer</a> for reading a draft of this essay and setting me straight on the respective roles of PUT and POST.</em></p> Ryan McGreal 2 http://quandyfactory.com/blog/142/hamilton_ward_councillor_election_ward_councillor_summary 2014-10-29T12:00:00Z Hamilton Ward Councillor Election Ward Councillor Summary <p>I calculated eligible voters by dividing the votes cast by the percent turnout in the City of Hamilton's <a href="http://vote2014.hamilton.ca/results/">unofficial election results</a> page, so they should be approximately correct but might be off slightly due to the precision of the percent turnout number the City provided.</p> <table> <caption>Ward Councillor Election, % Votes Cast and % Eligible Voters</caption> <thead> <tr> <th>Ward</th> <th>Votes Cast</th> <th>% Turnout</th> <th>Eligible Voters <span style="color:darkred">*</span></th> <th>Winner</th> <th>Votes for Winner</th> <th>% of Votes Cast for Winner</th> <th>% of Eligible Voters for Winner</th> </tr> </thead> <tfoot> <tr> <td colspan="8" style="font-style:italic">Results are unofficial until approved by Hamilton City Clerk. Source: <a href="http://vote2014.hamilton.ca/results/">http://vote2014.hamilton.ca/results/</a><br><span style="color:darkred">*</span> Approximate; calculated by diving votes cast from City results by % Turnout from City results.<br><span style="color:darkred">**</span> Actual total eligible voters as stated on the results page. </td> <tbody> <tr> <td>Ward 1</td> <td>8,870</td> <td>40.74%</td> <td>21,772</td> <td>Aidan Johnson</td> <td>3,030</td> <td>34.16%</td> <td>13.92%</td> </tr> <tr> <td>Ward 2</td> <td>6,389</td> <td>29.04%</td> <td>22,001</td> <td>Jason Farr</td> <td>4,078</td> <td>63.83%</td> <td>18.54%</td> </tr> <tr> <td>Ward 3</td> <td>7,113</td> <td>29.59%</td> <td>24,039</td> <td>Matthew Green</td> <td>2,852</td> <td>40.10%</td> <td>11.86%</td> </tr> <tr> <td>Ward 4</td> <td>6,956</td> <td>29.87%</td> <td>23,288</td> <td>Sam Merulla</td> <td>5,654</td> <td>81.28%</td> <td>24.28%</td> </tr> <tr> <td>Ward 5</td> <td>8,723</td> <td>33.64%</td> <td>25,930</td> <td>Chad Collins</td> <td>6,138</td> <td>70.37%</td> <td>23.67%</td> </tr> <tr> <td>Ward 6</td> <td>9,883</td> <td>35.15%</td> <td>28,117</td> <td>Tom Jackson</td> <td>7,886</td> <td>79.79%</td> <td>28.05%</td> </tr> <tr> <td>Ward 7</td> <td>13,068</td> <td>31.75%</td> <td>41,159</td> <td>Scott Duvall</td> <td>9,956</td> <td>76.19%</td> <td>24.19%</td> </tr> <tr> <td>Ward 8</td> <td>12,554</td> <td>36.29%</td> <td>34,594</td> <td>Terry Whitehead</td> <td>9,364</td> <td>74.59%</td> <td>27.07%</td> </tr> <tr> <td>Ward 9</td> <td>6,826</td> <td>34.20%</td> <td>19,959</td> <td>Doug Conley</td> <td>1,750</td> <td>25.64%</td> <td>8.77%</td> </tr> <tr> <td>Ward 10</td> <td>7,145</td> <td>37.40%</td> <td>19,104</td> <td>Maria Pearson</td> <td>4,090</td> <td>57.24%</td> <td>21.41%</td> </tr> <tr> <td>Ward 11</td> <td>9,562</td> <td>33.61%</td> <td>28,450</td> <td>Brenda Johnson</td> <td>7,873</td> <td>82.34%</td> <td>27.67%</td> </tr> <tr> <td>Ward 12</td> <td>9,445</td> <td>35.90%</td> <td>26,309</td> <td>Lloyd Ferguson</td> <td>7,313</td> <td>77.43%</td> <td>27.80%</td> </tr> <tr> <td>Ward 13</td> <td>8,258</td> <td>43.79%</td> <td>18,858</td> <td>Arlene Vanderbeek</td> <td>3,468</td> <td>42.00%</td> <td>18.39%</td> </tr> <tr> <td>Ward 14</td> <td>4,119</td> <td>33.41%</td> <td>12,329</td> <td>Rob Pasuta</td> <td>3,451</td> <td>83.78%</td> <td>27.99%</td> </tr> <tr> <td>Ward 15</td> <td>5,639</td> <td>27.88%</td> <td>20,226</td> <td>Judi Partridge</td> <td>3,879</td> <td>68.79%</td> <td>19.18%</td> </tr> <tr> <td>Mayor</td> <td>124,550</td> <td>34.02%</td> <td>366,124 <span style="color:darkred">**</span></td> <td>Fred Eisenberger</td> <td>49,020</td> <td>39.36%</td> <td>13.39%</td> </tr> </tbody> </table> Ryan McGreal 2 http://quandyfactory.com/blog/135/a_year_of_running 2014-07-28T12:00:00Z A Year of Running <h3>Introduction</h3> <p>A year ago, I was an obese 39-year-old on the threshold of middle age. I could no longer freeload on good genes or youth to keep me free of cardiovascular disease, diabetes, asthma and the other chronic diseases that accompany excess weight and poor fitness. </p> <p>My lower back hurt, my knees hurt, and I would get winded climbing a few flights of stairs (and my right knee would click on every step).</p> <p>I was reasonably active - several kilometres of daily walking, plus regular bike rides - but years of enjoying food a little too much and gaining a few pounds a year had accumulated into a significant problem. I needed something more intense than my daily walking and biking commutes.</p> <p class="image"> <img src="https://pbs.twimg.com/media/Bph8OKwCEAEhxJi.jpg" alt="West Hamilton Rail Trail" title="West Hamilton Rail Trail"><br> West Hamilton Rail Trail</p> <h3>Born To Run</h3> <p>I had read the book <em>Born To Run</em> by <a href="http://www.chrismcdougall.com/">Christopher McDougall</a> and was inspired to take up the practice again, more than two decades after I had run as a teenager. </p> <p>I was intrigued by his hypotheses about endurance running and curious about his theories on running shoes and midfoot strikes, which were in sharp contrast with the long-stride-and-heel-strike I had practised as a teenager. </p> <p>The running injuries McDougall wrote about - the reason he started exploring his thesis in the first place - reminded me of the reason I stopped running: heels, knees and hips so painful I gave up before I turned 18.</p> <p>Perhaps more importantly, I was inspired by the joy, elation and peacefulness that ran through the book. The idea of running as a blissful activity rather than a painful grind resonated strongly.</p> <p>But it's hard to create new habits. It's hard to find time for an additional activity in an already overstuffed daily schedule. I knew that if I was going to succeed at this, I couldn't just hope for the best - I needed to make time for running, to build it into the structure of my day.</p> <p>An opening appeared when my younger son started middle school. He no longer needed me to meet him after school and walk home with him, so I could start taking an hour for lunch instead of a half-hour. That hour became my running time.</p> <p class="image"> <img src="https://pbs.twimg.com/media/Bqf8ghOCQAA_2Td.jpg" alt="Running on the Escarpment Trail, Hamilton" title="Running on the Escarpment Trail, Hamilton"><br> Running on the Escarpment Trail, Hamilton</p> <h3>Getting Help</h3> <p>I also needed someone to help me get started on the right foot, so to speak. I had tried to start running a few times over the previous couple of years, and quickly gave up every time because I didn't know what I was doing. </p> <p>It seems ludicrous to think anyone needs someone to teach them how to run. After all, we start running as toddlers. But years upon years of bad habits, poor fitness, inelegant form and straight-up insecurity get in the way.</p> <p>My wife signed me up for a six-week learn to run workshop with trainer Dave Harrison of Coach House Fitness, an exemplary coach and straight-up awesome guy whose philosophy of running matched what McDougall espouses in <em>Born To Run</em>.</p> <p>Of all the things I learned during that course (I <a href="/blog/133/some_unexpected_benefits_of_running">wrote a little bit about it</a> last November), the one thing that keeps returning to me was Dave's admonition to <em>relax your face</em> when running. A scrunched-up face leads to a tense neck, tense shoulders, stiff arms, balled fists and all-around misery.</p> <p>A relaxed face, on the other hand, brings relaxation all the way down: loose shoulders, relaxed arms, an easy gait and a joyful experience. I see it on the faces of runners I encounter on the trails: the blissed-out look that proves a hard endurance activity can also be a tranquil meditation.</p> <p>I don't mean the so-called "runner's high" release of beta-endorphins and endocannabinoids, either. I've experienced that particular burst of euphoria late in the occasional hard run, but the entire experience is joyful. But I'm getting ahead of myself.</p> <p class="image"> <img src="https://pbs.twimg.com/media/Bsb0r5yCYAAIlzb.jpg" alt="Running on the Spring Creek Trail, Dundas Valley Conservation Area" title="Running on the Spring Creek Trail, Dundas Valley Conservation Area"><br> Running on the Spring Creek Trail, Dundas Valley Conservation Area</p> <h3>Starting Out</h3> <p>I took my first run on July 27, 2013, and it was a humiliating reality-check. I ran 2.7 km - by which I mean I alternated between running (slowly) and walking - in around 21 minutes.</p> <p>All of my early runs were like this, for the simple reason that I couldn't run more than a short distance before I was too winded to continue. Here's a chart (from <a href="http://runkeeper.com">RunKeeper</a>) of an early run. You can see my speed go up and down like a sine wave.</p> <p class="image"> <img src="/static/images/runkeeper_early_run.png" alt="RunKeeper chart: elevation and speed, July 31, 2013" title="RunKeeper chart: elevation and speed, July 31, 2013"><br> RunKeeper chart: elevation and speed, July 31, 2013</p> <p>I ran two or three times a week, giving my sad middle-aged body at least day or two between runs to recover. I generally followed the <a href="http://www.runnersworld.com/running-tips/10-percent-rule">Ten Percent Rule</a> and built up my distance slowly while at the same time increasing the ratio of time I spent running relative to walking.</p> <p>I knew that I had to keep the chain going. The first time I gave myself an excuse not to run, it would get progressively easier and easier to beg off doing it until I would eventually just give up again. </p> <h3>Progress and Setbacks</h3> <p>That determination not to break the chain is a big part of why I didn't fail this time. After each run, all I had to muster was enough drive to start the next one so it never felt overwhelming.</p> <p>I still remember the profound feeling the first time I ran the entire distance. It happened nearly a month after my first run. I kept waiting to get too out of breath to keep running but it didn't happen. I got to the end of the run and celebrated an important milestone.</p> <p>Soon after, I reached 5 km for the first time. Things seemed to zoom along from that point. I passed 8 km in October and felt that 10 km wasn't far off. </p> <p>Then, in late November, a problem that had dogged me intermittently since early September bit down hard: medial tibial stress syndrome, the dreaded <em>shin splints</em>. </p> <p>Shin splints are inflammation of the connective tissues along the shinbone, and they're common among new runners who increase the intensity of their exercise too quickly. They hurt like hell and make running almost impossible. </p> <p>On Dave's advice, I cut my distance back to 5.5 km per run. I started icing my shins after every run and several other times a day, incorporated a number of strengthening exercises (like calf raises on a stair), and tried not to be too disappointed that I had lost so much ground.</p> <p>My shins got much better over the next couple of months. Eventually I stopped icing my shins throughout the day, but I still ice them faithfully after a run as a wonderful-feeling preventive measure.</p> <p>By mid-January I was back up to 8 km a run again, and my pace was slowly but steadily getting better. From an 8-minute kilometre (7.5 km/h) in August, I was up to around 6:45/km (9.5 km/h). Still slow, but a significant personal improvement.</p> <p class="image"> <img src="https://pbs.twimg.com/media/BrOaCVGCMAARdIc.jpg" alt="Deer on the trail" title="Deer on the trail"><br> Deer on the trail</p> <h3>Winter</h3> <p>I ran outside right through the winter - and a bloody brutal winter it was, too. I still remember my run on January 13: It was so cold out that I ran almost 7 km and never even broke a sweat.</p> <p>The trails were often impassible with ice, so I switched to running on the streets: out along Cumberland to Gage Park and back along Main; or down Wellington to the Waterfront and back up along James North.</p> <p>A forward-leaning foot-strike really helped with the ice. My centre of gravity was always under my feet and half the time I was almost tip-toeing along treacherous paths. The slippery, uneven terrain really strengthened my stabilizing muscles.</p> <p>That said, my feet got wet and I did a lot of sliding around - and my feet did a lot of sliding around inside my wet shoes. I got some nasty blisters that almost sidelined me at one point. I bandaged my blisters, switched my socks from cotton to doubled-up synthetics, tightened my laces a bit and kept at it.</p> <p>There's something indescribably cool about standing outside in the bitter cold after a run, steam pouring not just out of your mouth but also off your exposed skin. As one friend put it, "I feel like a wizard!"</p> <p class="image"> <img src="https://pbs.twimg.com/media/BdT9UYrIQAEt4lP.jpg" alt="Icy winter streets" title="Icy winter streets"><br> Icy winter streets</p> <h3>Long Runs</h3> <p>Heading into February, Dave recommended that I should make one run a week a "long run" - a slower, more long-distance run to build strength and endurance and, of particular appeal to me, burn more fat.</p> <p>So I started doing a long run on Saturdays. It took a while to find a routine that didn't eat into my family time, but I eventually settled on a run starting between 6:00 and 6:30 AM (I normally get up at 4:45 for work, so this is sleeping in).</p> <p>I noticed that my pace on my shorter weekday runs smoothed out and got faster after I started doing long runs. Because I only have an hour for lunch, the distance I can cover is a function of how fast I run. By around mid-March I was running over 9 km for each weekday run and 12 km on my Saturday run.</p> <p>By April I was running a a pace of around six minutes per km (10 km/h) and my weekday runs were up to around 9.5 km distance.</p> <p>In mid-April I made a big jump in long-run distance from 12 to 15 km. It violates the Ten Percent Rule but I felt ready and the long runs really started to feel great. </p> <p>I also experienced my first <em>bonk</em>: that moment when your glycogen stores run out and you start to feel like crap. That was the last time I went out on an empty stomach. Now I have a big glass of water and some fruit (or leftover salad from Friday night's dinner) before starting.</p> <p>I look forward to my long run all week. It's quiet, cool and peaceful in the morning. There's no rush to get back to the office, so I can take my time and just enjoy the trail. </p> <p>I enjoy the lush greenery and admire the local wildlife. If I feel like it, I stop and eat wild mulberries or blackberries on the way.</p> <p class="image"> <img src="https://pbs.twimg.com/media/BrOaT1qCMAAjsMp.jpg" alt="Mulberries for breakfast" title="Mulberries for breakfast"><br> Mulberries for breakfast</p> <h3>Summer Running</h3> <p>Then summer came and I started running in hot weather. Last summer was brutally hot but my distances in August and September were so short - and my pace so slow - that heat and humidity weren't really limiting factors.</p> <p>This summer has been much milder overall, but hot and humid is hot and humid. </p> <p>The first run I did on a humid day this summer left me feeling weak and nauseated. Another runner who was passing me slowed down to see if I was okay and suggested that I start bringing water with me. </p> <p>Even with water (and a sports drink on my long runs) my pace suffered, but I slowly acclimatized to the summer conditions and my pace drifted back down to around 6:00/km (10 km/h).</p> <p>I should note that I haven't specifically focused on improving my pace. I'm not interested in winning any medals, and I don't want to push too hard and seriously injure something. Nevertheless, my pace has tended to improve over time through the simple act of getting progressively fitter and pushing a bit on each run.</p> <p>I always feel a nice sense of accomplishment when I complete a run at an average speed faster than 10 km/h.</p> <p class="image"> <img src="https://pbs.twimg.com/media/BpSrMe-CQAAVzA6.jpg" alt="Dappled shade on the Escarpment Trail" title="Dappled shade on the Escarpment Trail"><br> Dappled shade on the Escarpment Trail</p> <h3>Today and Tomorrow</h3> <p>So here we are, a year after I took that first humbling half-shamble. In the past year, I have:</p> <ul> <li>Run a total distance of 1,325 km;</li> <li>Burned 155,468 calories;</li> <li>Dropped 50 lbs and four pant sizes;</li> <li>Increased my long run distance to 22+ km;</li> <li>Increased my weekly total distance to around 41 km; and</li> <li>Improved my average pace from 8:15/km to around 6:00/km.</li> </ul> <p>Here is a snapshot chart of every run I've gone on in the past year, tracking my distance and pace:</p> <p class="image"> <img src="/static/images/running_one_year.png" alt="Distance and Pace, July 27, 2013 to July 27, 2014" title="Distance and Pace, July 27, 2013 to July 27, 2014"><br> Distance and Pace, July 27, 2013 to July 27, 2014</p> <p>The <a href="/running">live chart</a> is updated regularly.</p> <p>You can see the overall upward trend in distance and downward trend in pace over the long haul. </p> <p>You can also note the drop in distance in late November when I got shin splints, the introduction of long runs in mid-February (where the distance line starts to zig-zag), and the increasing volatility in my pace once the weather got hot. </p> <p>I find it has really helped to see the larger context of my running history, especially after a particularly slow effort. It has been a bit of a juggling act to alternate between focusing on the immediate next step while still keeping an eye on the bigger picture.</p> <p>A year on, I enormously enjoy the many benefits of running - both the ones I expected and the ones <a href="/blog/133/some_unexpected_benefits_of_running">I didn't expect</a>. I can no longer quite remember how I was able to function day-to-day before I started running. </p> <p>My deepest regret is that I didn't start sooner - I missed out on years of this!</p> <p>If you are considering taking up running, I would suggest the following:</p> <ul> <li><p><strong>Get a trainer:</strong> Find someone whose running philosophy feels comfortable to you and give yourself a good start. I highly recommend Dave Harrison of Coach House Fitness if you're in the vicinity of southwest Hamilton.</p></li> <li><p><strong>Take it slow:</strong> Your body is amazingly adaptive but it responds best to gradual change. If you try to rush things, your connective tissues will object furiously.</p></li> <li><p><strong>It's not supposed to hurt:</strong> sore, achy muscles are a normal part of exercising, but you should not be in actual pain during or after your run. Treat pain with rest and ice, and listen to your body.</p></li> <li><p><strong>Allow yourself to be inept:</strong> Don't be embarrassed to suck at running when you start out. More experienced runners will blow past you on the trail, but remember that they started out the exact same way you did and they got where they are by not giving up. </p></li> <li><p><strong>Small changes add up:</strong> When I started out a year ago, I would have thought you were nuts if you said I'd be running over 40 km a week a year later. </p></li> <li><p><strong>Do your warmups and cooldowns:</strong> I start every run with an <a href="https://www.youtube.com/watch?v=Eit3pGym2Dg">ABC drill</a> and end every run with a cooling walk, calf raises and stretches, followed by ice on my shins. </p></li> <li><p><strong>Remember to enjoy yourself:</strong> Running is supposed to feel <em>good</em>. Think about it as a reward, not a punishment. Allow yourself to feel embodied and connected through running. You are tapping into a profoundly human legacy that goes back millions of years, so don't be surprised to experience a sense of wonder and even reverence.</p></li> </ul> <p>So far, I haven't run with specific goals in mind - other than the obvious one, which is to keep at it. That said, I've got my eye on next year's <a href="http://www.aroundthebayroadrace.com/">Around The Bay Road Race</a>, a 30 km run <a href="https://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=114954809910133418529.00045a7921454be2ed2ca&ll=43.280955,-79.821167&spn=0.167959,0.215263&z=12&dg=feature">around Hamilton Harbour</a>. </p> <p>Around The Bay is the oldest road race in North America and a proud Hamilton tradition, and it would be a huge honour for me to participate.</p> Ryan McGreal 2 http://quandyfactory.com/blog/133/some_unexpected_benefits_of_running 2013-11-27T12:00:00Z Some Unexpected Benefits of Running <p>Four months ago, increasingly conscious of the steadily thickening layer of fat around my middle and roused into action by the imminent arrival of my 40th birthday, I started running. I wanted to lose some weight, get into better shape, and improve my cardiovascular fitness, and running seemed like a great way to do it.</p> <p class="image"> <img src="https://pbs.twimg.com/media/BWtx3PUCAAALf1W.jpg" alt="Escarpment Trail, Hamilton" title="Escarpment Trail, Hamilton"><br> Escarpment Trail, Hamilton </p> <h3>Born to Run</h3> <p>I was inspired by Christopher McDougall's fantastic book <em>Born to Run</em>, which made a lot of sense in its hypothesis of humans as highly optimized persistence hunters who literally ran for survival. </p> <p>Even more important was McDougall's transformative experience switching from a heel-striking gait to a forefoot/midfoot strike, which he credits with all but eliminating the injuries and chronic pains that had plagued him for years.</p> <p>This resonated with me because I ran a lot as a child and again as a teenager, but stopped in both cases because of persistent pain in my heels and knees. Like most people who grew up during the 1970s running revival, I ran with a long stride and a heel-strike - a gait that is made possible through the thick padding and cushioning of modern running shoes.</p> <p>McDougall's thesis is that this gait is unnatural, and that shoes designed to protect our feet, legs and hips from the pounding of running actually allow more damage to occur. He says we should be running the way we run when barefoot - on the balls and toes of our feet, not on the heels.</p> <h3>Learning to Run</h3> <p>After thinking for a long time that I should really do something with this information, I finally signed up for a six-week Learn to Run course with an excellent running coach - the talented, knowledgeable and all-around awesome Dave Harrison, whose philosophy of running was very similar to what McDougall espoused in his book.</p> <p>Over six Wednesday evenings, I learned: proper running form; the Ten Percent Rule; warming up; stretching; exercising my core; strengthening my ankles, knees and hips; running up and down hills; running on trails; how to dress to avoid chafing; and how to sooth sore shins. </p> <p>I learned that you shouldn't grimace when you're running, because scrunching up your face causes the rest of your body to scrunch up too. I learned that "No Pain, No Gain" is nonsense - running is supposed to feel good, not painful.</p> <h3>Benefits</h3> <p>So far, it's working: I'm slowly losing weight, getting into better shape and improving my cardiovascular fitness. What has surprised me, however, has been the collection of unexpected additional benefits I've noticed from running.</p> <h4>Improved Mood</h4> <p>Of course I've heard that exercise is good for reducing stress, but I experienced it firsthand over the past four months. No matter how anxious or stressed I'm feeling, going for a run calms me right down and allows me to enjoy some perspective on whatever situation is causing me anxiety. Generally, my mood has been better - I'm happier, less prone to losing my cool and more resilient to shocks and aggravations.</p> <h4>Meditation</h4> <p>Somewhat related, I've been pleased with the sheer serenity I get from running. I spend most of my time all up in my head, and running is a wonderful way to get out of my head and into my body. It's a form of meditation: instead of thinking about all the crap weighing on me, I think about breathing out, breathing in, foot stepping down, foot going up, and the myriad connected rhythms of forward motion. I don't always manage to slip into a groove where everything seems to be working in synchronization, but when I do it's a truly amazing experience.</p> <h4>Better Balance</h4> <p>Since I've been running, I find my general balance has improved significantly. I've never been particularly graceful, so this is a pleasant feeling. I expect it is due to a combination of strengthening my ankles, legs and hips for better stability, becoming more conscious of my centre of gravity, and even losing weight. (And likewise with flexibility - I'm getting more bendy.)</p> <h4>Back Pain</h4> <p>I've had intermittent lower and middle back pain since I hurt my back lifting an old, heavy appliance up a flight of stairs when I was 18. It would come and go based on how well I was maintaining my posture, whether I slouched in a chair for long periods, whether I slept on my stomach and how long I spent in bed (over eight hours and I'd pay the price). Since I've been running, my back has been entirely pain-free. This is likely due to a combination of weight loss, core strengthening and improved attention to blalance and posture.</p> <h4>Less Eating</h4> <p>This was perhaps the most surprising. A major impetus for starting to run was my realization that attempts to lose weight by eating less were highly unlikely to be successful, and I had better focus on the accounts payable side of my body's metabolic ledger. I assumed that when I started running I would eat <em>more</em>, because I would be more hungry. In fact the opposite has happened: I have less appetite in general, and after going for a run I'm specifically motivated not to snack, since I know how much work I have to do to burn off those extra calories.</p> <h4>Improved Productivity</h4> <p>I'm not as surprised about this, but I find a lunchtime run really unlocks my ability to solve problems and get things done in the afternoon. For years, my go-to method for solving a particularly nettling coding problem has been to put it out of my head and go for a brisk walk, and that's even more true of an hour-long run.</p> Ryan McGreal 2 http://quandyfactory.com/site/24/home 2013-08-22T12:00:00Z Home <p style="float: right; margin-left: 5px;"><img style="border: 1px solid black;" src="http://raisethehammer.org/static/images/ryan_mcgreal_sm.jpg" alt="Ryan McGreal" title="Ryan McGreal"></p> <p>This is the personal website of Ryan McGreal in Hamilton, Ontario, Canada. </p> <p>I live with my family and work as a programmer and writer. I am the editor of <a href="http://raisethehammer.org">Raise the Hammer</a> and volunteer with <a href="http://hamiltonlightrail.ca/" target="_blank">Hamilton Light Rail</a>, a citizen group dedicated to bringing light rail transit to Hamilton. </p> <p>Several of my <a href="/essays/">essays</a> have been published in the <cite>Hamilton Spectator</cite>.</p> <p>This website serves mainly as a handy repository of <a href="/essays/">published essays</a>, <a href="/projects/">active projects</a>, <a href="/blog/">random musings</a> and <a href="/links/">links</a> that I work on on or use frequently. It's also an online playground where I can try out new ideas.</p> <p>For a much more detailed introduction to the site and its subject matter, check out the <a href="/about/">About</a> page.</p> <p>Otherwise, feel free to contact me via email: <a href="mailto:ryan@quandyfactory.com">ryan@quandyfactory.com</a>.</p> Ryan McGreal 2 http://quandyfactory.com/blog/131/stand_your_ground_or_last_man_standing 2013-07-31T12:00:00Z Stand Your Ground or Last Man Standing <p>The death of Trayvon Martin at the hands of George Zimmerman, and the latter's subsequent acquittal on the charge of second degree murder, demonstrates forcefully why <em>Stand Your Ground</em> laws have no place in a civil, law-based society.</p> <p>The <a href="http://videos.mediaite.com/audio/Raw-Audio-911-Call-George-Zimme">audio recording</a> of Zimmerman's 911 call is instructive. You can also <a href="http://www.documentcloud.org/documents/326700-full-transcript-zimmerman.html">read a transcript</a>.</p> <p>Zimmerman, a self-styled neighbourhood watch patrol, phoned in to report "a real suspicious guy" who "looks like he's up to no good" because Martin was walking calmly in the rain looking at houses as he passed them. </p> <p>Zimmerman complained, "These assholes, they always get away."</p> <p>You can hear the sound of movement and Zimmerman sounds out of breath. The dispatcher asked, "Are you following him?" </p> <p>Zimmerman replied, "Yeah."</p> <p>The dispatcher said, "Okay, we don't need you to do that."</p> <p>The dispatcher then tried to get Zimmerman to return to his car and wait for the police. Instead, Zimmerman asked for the police to call him when they arrived so he could meet them.</p> <p>Zimmerman continued to pursue Martin despite being directed not to by the dispatcher. That pursuit led to a confrontation, and that confrontation led to Zimmerman shooting Martin point-blank in the chest and killing him. </p> <p>There is some uncertainty over whether Martin attacked Zimmerman during the confrontation, but it is clear that the confrontation took place because Zimmerman took it upon himself to protect his neighbourhood from Martin.</p> <p>Keep this in mind: <em>Martin was doing nothing wrong</em> when Zimmerman confronted him. He was unarmed and walking lawfully toward his own place of residence with a pack of Skittles in his pocket after a trip to the convenience store. </p> <p>If you were walking alone at night and an angry, suspicious stranger pursued you, how would you react?</p> <p>The idea behind Florida's <em>Stand Your Ground</em> law is that a citizen has the right to use force, including deadly force, in the defence of self and property from danger. Specifically, it maintains that an individual does not have any responsibility to try and avoid a confrontation or retreat from danger in any location where the individual is legally allowed to be present.</p> <p>The reason Zimmerman was not convicted is that <em>Stand Your Ground</em> covers his shooting as self-defence, even though Martin was not trespassing on Zimmerman's property and it was Zimmerman who pursued and confronted Martin. Thanks to <em>Stand Your Ground</em>, Zimmerman's jury was instructed that he had no duty to retreat from conflict, so any uncertainty over who attacked first was enough to provide a reasonable doubt and acquit him.</p> <p>Zimmerman's supporters defend Zimmerman's right to DIY vigilanteeism and violence in patrolling his gated community. Strangely, those same people seem silent on the question of whether Martin <em>also</em> had a right to "stand his ground" when a stranger pursued and confronted him after deciding he was a threat.</p> <p>What if the exchange had unfolded differently? What if Martin had killed Zimmerman instead of the other way around? Would Martin be the one acquitted of second degree murder thanks to Florida's <em>Stand Your Ground</em> law, since he had a right to defend himself from this stranger who made him feel threatened?</p> <p>In a situation where there are two people who mutually feel threatened by each other, <em>Stand Your Ground</em> creates a situation in which personal security becomes a <a href="http://en.wikipedia.org/wiki/Positional_good">positional good</a> that can accrue only to the stronger party in the exchange, at the expense of the weaker party. </p> <p>In other words, <em>Stand Your Ground</em> replaces the rule of law with the primitive concept of <em>might makes right</em> that the rule of law was supposed to replace. It squanders the positive sum game that a level legal playing field provides and returns us to a state in which mutual distrust spirals into needless violence.</p> Ryan McGreal 2 http://quandyfactory.com/projects/74/solitaire 2013-05-08T12:00:00Z Solitaire <p>This is a version of solitaire I hacked up using HTML, CSS, javascript with <a href="http://jquery.com">jQuery</a>, <a href="http://jqueryui.com/">jQUery-UI</a> draggable, the <a href="https://github.com/DanielRapp/Noisy">Noisy</a> jQuery plugin, and only one small image. It's pretty nasty, but I wanted to get a feel for the draggable jquery-UI functionality. </p> <p><strong>Demo</strong>: <a href="http://quandyfactory.com/static/solitaire/solitaire.html">http://quandyfactory.com/static/solitaire/solitaire.html</a></p> <p><strong>Source</strong>: <a href="https://github.com/quandyfactory/Solitaire">https://github.com/quandyfactory/Solitaire</a></p> <p><strong>Update</strong>: You can play this game live, courtesy of PythonAnywhere:</p> <ul> <li><a href="https://www.pythonanywhere.com/gists/459573/rps.py/ipython2/">https://www.pythonanywhere.com/gists/459573/rps.py/ipython2/</a></li> </ul> Ryan McGreal 2 http://quandyfactory.com/blog/118/why_bloomberg_is_wrong_about_terrorism_response 2013-04-23T12:00:00Z Why Bloomberg is Wrong About Terrorism Response <p>There's quite a bit to like about New York City Mayor Mike Bloomberg, especially if you like walking, cycling and living in a lively city. But at the same time, Bloomberg's inclination to technocratic paternalism has a dark side that surfaces from time to time. </p> <p>In the wake of the Boston Marathon bombings, <a href="http://politicker.com/2013/04/bloomberg-says-post-boston-interpretation-of-the-constitution-will-have-to-change/">Bloomberg warned</a> that the country's "interpretation of the Constitution" will "have to change".</p> <blockquote> <p>"Look, we live in a very dangerous world. We know there are people who want to take away our freedoms. New Yorkers probably know that as much if not more than anybody else after the terrible tragedy of 9/11," he said.</p> <p>"We have to understand that in the world going forward, we're going to have more cameras and that kind of stuff. That's good in some sense, but it's different from what we are used to," he said.</p> </blockquote> <p>There's a glaring problem with Bloomberg's assessment of both the problem and the solution: the world is no more dangerous today than it was when the US Constitution was written. </p> <p>In fact, by every conceivable measure - including violence of all kinds - it is vastly <em>less</em> dangerous today than just about any time in history.</p> <p>More to the point, most of the danger we do face today does not come from terrorists. Terrorists are not as interested in taking lives as they are in capturing the public attention - more specifically, the public's <em>panicky</em> attention. </p> <p>Humans are notoriously subject to a cognitive bias called the <a href="http://en.wikipedia.org/wiki/Availability_heuristic">availability heuristic</a>, by which we evaluate how likely or common something is by how easily we can call examples of it to memory.</p> <p>Terrorism plays on this cognitive bias because terrorist attacks are extremely dramatic and high-profile, and thus imprint themselves strongly on our memory. </p> <p>When the news media, politicians and commentators pile on by focusing disproportionately on such events, they can trigger an <a href="http://en.wikipedia.org/wiki/Availability_cascade">availability cascade</a> - a self-reinforcing cycle in which more focus on an event motivates people to think more about it, which in turn leads people to focus more on it.</p> <p>Reactions like Bloomberg's, in which he argues that Americans need to reinterpret their Constitution to accept a loss of rights in the face of the threat of terrorism, are precisely the wrong way to approach the matter.</p> <p>There are a few <a href="https://chronicle.com/article/Era-in-Ideas-Terrorism/128490">important facts about terrorism</a> that should put our fear in context:</p> <ul> <li><p>Muslim-American terrorism has been <a href="http://tcths.sanford.duke.edu/documents/Kurzman_Muslim-American_Terrorism_final2013.pdf">in steady decline</a> for the past decade. The risk is getting smaller, not bigger.</p></li> <li><p>More generally, terrorist organizations tend to collapse over time, through various combinations of frustration, attrition and overreach.</p></li> <li><p>Terrorists themselves tend to be inept, amateurish and incompetent.</p></li> <li><p>The preferred methods of terrorism - like homemade IEDs built from pressure cookers - tend to be highly ineffective at killing people.</p></li> </ul> <p>On the same day that three people were killed in the Boston Marathon bombings, approximately 40 Americans country-wide were murdered for various non-terrorist reasons. </p> <p>Also on the same day, approximately 140 Americans died via guns (this includes suicides, which make up two-thirds of the total, and accidental deaths).</p> <p>We can keep going. On an average day in the United States, approximately 85 people are killed in automobile accidents, 16 people are killed in falls, 14 people are killed from accidental poisoning, and ten people are killed in home fires.</p> <p>My point is that the fear that we feel about terrorism is vastly disproportionate to the risk that we will experience it - especially compared to the kinds of things we rarely think about but really should worry about.</p> <p>Bruce Schneier <a href="https://www.schneier.com/blog/archives/2005/05/should_terroris_1.html">put it best</a> in a 2005 essay when he wrote:</p> <blockquote> <p>If a risk is in the news, then it's probably not worth worrying about. When something is no longer reported -- automobile deaths, domestic violence -- when it's so common that it's not news, then you should start worrying.</p> </blockquote> <p>By no means do I mean to dismiss or demean or make light of the trauma, injury and death experienced by the people who experienced the Boston Marathon terror attack. </p> <p>However, it will only compound the tragedy if we allow such an event to transform our civilization from one that esteems liberty, autonomy and privacy into one that sacrifices those things for needless and counterproductive expedience.</p> <p>The appropriate way to respond to terrorism is the same as it has always been: through effective, targeted law enforcement measures that build on <a href="http://www.thestar.com/opinion/commentary/2013/04/25/muslims_hold_key_to_fighting_terror.html">good community relationships</a> and do not violate the civil liberties of innocent citizens.</p> Ryan McGreal 2 http://quandyfactory.com/blog/94/adria_richards_and_the_allocation_of_outrage 2013-03-28T12:00:00Z Adria Richards and the Allocation of Outrage <p>One of the most glaring observations in light of the Adria Richards fiasco has been the allocation of outrage by the tech community:</p> <p class="centered"> <img src="http://i.imgur.com/9Jg2brL.png" alt="Allocation of Outrage" title="Allocation of Outrage" style="max-width: 100%"> </p> <p>The so-called "discussion" about whether Richards did the right thing when she tweeted a photo of two Python Conference attendees telling sexual jokes in violation of the event's Code of Conduct hasn't been much of a debate. </p> <p>Rather, it has been a general piling-on with a generous helping of condescension and chauvinism. There has been only a smattering of disagreement and it has been summarily dismissed with a combination of the most perfunctory hand-waving and sheer shouting-down.</p> <p>Meanwhile, the avalanche of rape threats, death threats, insults, intimidation, mockery and so on get by with, at best, a passing and semi-apologetic mention: <em>Of course death threats are wrong, but...</em></p> <p>Worse, the tech community immediately and decisively latched onto a convenient portrait of Richards as an underhanded, incompetent, cowardly, race-baiting, gender-baiting fraud with a manipulative agenda to aggrandize herself at the expense of everyone around her. This, despite almost none of the participants to this condemnation knowing anything about her. </p> <p>It was a classic <a href="https://en.wikipedia.org/wiki/Availability_cascade">availability cascade</a>, with each iteration of outraged commentary boiling the portrait into a cruder and uglier pastiche. </p> <p>No amount of counter-evidence could make a dent in this depiction - the very same depiction, incidentally, that is immediately <a href="http://www.buzzfeed.com/courtneystanton/a-woman-walks-into-a-tech-conference">slapped onto every woman</a> who dares to speak up about gender issues in the tech industry:</p> <blockquote> <p>A woman in the tech community identified people violating the stated Code of Conduct of the group. She was summarily run out of the community. Oh, wait, that wasn't just this week, that was <a href="https://lists.ubuntu.com/archives/ubuntu-women/2007-March/000727.html">six years ago</a>.</p> <p>A woman in the tech community takes her blog offline and stops speaking publicly after receiving death threats for a month. That was also <a href="http://web.archive.org/web/20070503012914/http://headrush.typepad.com/whathappened.html">six years ago</a>.</p> <p>A man attending a festival for the tech community harassed and attempted sexual assault on multiple women in attendance. That was <a href="http://geekfeminism.wikia.com/wiki/Sexual_assault_at_Southeast_LinuxFest">three years ago</a>.</p> <p>A man attending a high-profile invite-only tech event groped and harassed multiple women in attendance. That was also <a href="http://geekfeminism.wikia.com/wiki/Groping_at_FOO_Camp">three years ago</a>.</p> <p>A very high-profile man in the tech community is arrested for multiple counts of sexual assault. The tech community assumes loudly and repeatedly that the women reporting the assaults are lying. Again, this was <a href="http://tigerbeatdown.com/2010/12/15/mooreandme-on-dude-progressives-rape-apologism-and-the-little-guy/">three years ago</a>.</p> <p>A woman representing her employer at a large tech event was physically assaulted by a man attending the event. That was <a href="http://geekfeminism.wikia.com/wiki/Assault_at_OSCON">two years ago</a>.</p> <p>A sponsored hackathon lists "friendly (female) event staff" delivering beer to participants as a "great perk" of participating. That was <a href="http://thenextweb.com/us/2012/03/20/sqoot-loses-sponsors-following-misogynistic-description-of-their-api-jam-event/">last year</a>.</p> <p>A prominent man in the tech community was hired by a large computer manufacturer to be its master of ceremonies at a customer summit, where he said things like, "Men have invented everything worthwhile. All we can thank women for is the rolling pin." That was also <a href="http://web.archive.org/web/20120705070446/http://news.cnet.com/8301-31322_3-57431869-256/why-we-need-to-keep-talking-about-women-in-tech/">last year</a>.</p> <p>A woman who produces online feminist educational content ran a Kickstarter campaign to examine tropes about women in video games. In response, avid gamers sent her rape and death threats, vandalized her Wikipedia page, and created a game that allowed the player to "beat up" the woman's image. Again, this was only <a href="http://www.feministfrequency.com/2012/07/image-based-harassment-and-visual-misogyny/">last year</a>.</p> </blockquote> <p>Everyone circulated and referred to a <a href="http://amandablumwords.wordpress.com/2013/03/21/3/">post by Amanda Blum</a> that started with the statement, "I don't like Adria Richards," called her a "bully" and suggested that her action was part of a pattern of creating drama about gender issues to drive traffic to <a href="http://butyoureagirl.com">her blog</a>. </p> <p>The same people mostly ignored Gayle Laakmann McDowell's <a href="http://www.technologywoman.com/2013/03/24/digging-beneath-the-surface-that-amanda-blum-article-on-adria-richards-is-not-what-it-seems/">detailed review of the instances Blum cited</a> that cast them in a far more reasonable and less sinister light. But that detailed analysis got little play because it didn't fit into the convenient caricature.</p> <p>Also ignored was an <a href="http://www.dogsandshoes.com/2013/03/adria.html">article</a> by Sarah Milstein in which she called Richards a "model speaker, seeking and taking feedback on her presentation, showing flexibility in the logistics around her talks, and on one occasion, giving a high-pressure talk as she was still recovering from a bout of food poisoning".</p> <p>No matter how you try to parse it, it's unambiguously clear that our community whipped itself into an apoplectic firestorm of outrage when a woman complained about behaviour in a conference that violated the conference's code of conduct, but at best shrugged and at worst said she deserved it when that very firestorm of outrage overflowed into a forward panic of the most vile, vitriolic and disgusting abuse, insults, threats and mockery against her.</p> <p>That says something most disturbing about our community, and the collective unwillingness even to <em>acknowledge</em> it, let alone come to terms with it, should be all the evidence we need that this industry's blind spot on gender issues is as pervasive as ever.</p> Ryan McGreal 2