tag:quandyfactory.com,2016-6-15:/2016615 2016-6-15T12:00:00Z Quandy Factory Newsfeed - All Quandy Factory is the personal website of Ryan McGreal in Hamilton, Ontario, Canada.. http://quandyfactory.com/site/24/home 2016-05-11T12:00:00Z Home <p style="float: right; margin-left: 5px;"><img style="border: 1px solid black;" src="/static/images/ryan_mcgreal_headshot_2016_05_11_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/site/13/about 2016-05-11T12:00:00Z About <h3>Introduction</h3> <p>My name is Ryan McGreal, and I live in Hamilton, Ontario, Canada with my family. I work as a web programmer, consultant, writer, editor and troublemaker, though it's mostly the programming that pays the bills. </p> <h4>Raise the Hammer</h4> <p>My principal activity that <em>doesn't</em> pay the bills is my role as editor of <a href="http://raisethehammer.org">Raise the Hammer</a>, an online magazine dedicated to sustainable urban revitalization in Hamilton. </p> <h4>Hamilton Light Rail</h4> <p>I am also a proud founding member of <a href="http://hamiltonlightrail.ca">Hamilton Light Rail</a>, a community group dedicated to bringing light rail transit to Hamilton.</p> <h4>Published Essays</h4> <p>I have written several essays on urban issues that have been published in the <em>Hamilton Spectator</em> and elsewhere over the past five years.</p> <h4>Contact</h4> <p>You can reach me via email at <a href="mailto:ryan@quandyfactory.com">ryan@quandyfactory.com</a> or on twitter <a href="https://twitter.com/RyanMcGreal">@RyanMcGreal</a>.</p> <h3>This Site</h3> <p>This is my personal website, repository of essays and projects, and playground for new ideas. </p> <p><em>Quandy</em> is a portmanteau of "Quick and Dirty", which can be a useful method of approaching problems. "Quick and dirty" has the benefit of being, well, quick, as well as flexible for those cases when initial requirements end up changing (i.e. just about every nontrivial project). </p> <p>It suggests an iterative approach, on the reasoning that it's easier to build something simple and then make it better than it is to try and spring a fully-formed application from your forehead. </p> <p>As John Gall famously stated: </p> <blockquote> <p>A complex system that works is invariably found to have evolved from a simple system that worked. The inverse proposition also appears to be true: A complex system designed from scratch never works and cannot be made to work.</p> </blockquote> <h3>Eye Quandy</h3> <h4>Quandy Logo</h4> <p>The red Quandy logo in the top left corner is courtesy of <strong>Trevor Shaw</strong>, a great local graphics designer and the creative director of <a href="http://www.getjuice.ca/">Juice Creative</a>.</p> <h4>Footer Image</h4> <p>The awesome cityscape panorama in the footer was taken by the talented photographer and amateur urbanist <strong>Aaron Segaert</strong>, and is used with permission.</p> <h3>Interests</h3> <p>In recent years I have been particularly interested in: the nature of city economies and urban development; the role of public participation and community engagement in creating and sustaining a healthy society; and ways to increase the openness, transparency and responsiveness of organizational governance and policy making.</p> <h4>Conceptual Overlap</h4> <p>I admit that my ideas about openness in government and policy making reflect my experience using and developing software: an open, information-sharing approach with peer review results in better results than a closed, proprietary approach based on blind trust.</p> <h4>Jack of All Trades</h4> <p>My interests take me all over the place, figuratively, from land use patterns and transportation modes to the global energy situation, geopolitics, social policy, economics and political economy, democratic structures and traditions, broad-based community organizing, local politics and current affairs, architecture, city life, ecology, sustainability, cognitive psychology, and more.</p> <p>I don't claim expertise in any of these areas, but I am committed to studying the experts and following empirical best practices in these domains. </p> <h4>Benefit from Shared Expertise</h4> <p>The great thing about living in an open, knowledge-based culture is that you can benefit from the expertise of others. Once you establish the credibility of expertise, you can use it as a kind of knowledge <a href="http://en.wikipedia.org/wiki/Application_programming_interface">API</a> that allows you to take advantage of the expertise without necessarily knowing everything about the internals.</p> <p>If not for this ability for non-experts to access expertise, there would be no way for the benefits of that expertise to disseminate into the broader society and inform our policy decisions.</p> <h3>Programming</h3> <p>I enjoy programming and have benefited immensely from the vast, rich ecosystem of free and open source software available to programmers today (see "Technical Notes", below).</p> <h4>Great Time for OK Coders</h4> <p>I know enough about great programmers and their remarkable contributions to understand that I am not a great programmer. Nevertheless, the rich ecosystem of programming languages, libraries, frameworks and tools means even a duffer like me can be creative and productive - and that's a <a href="http://c2.com/cgi-bin/wiki?GoodThing">Good Thing</a>.</p> <h4>Productive Modern Languages</h4> <p>One of the great things about modern programming languages is how highly expressive they are. You can create working code very efficiently, with a minimum of boilerplate. </p> <p>That means it's easy to develop simple tools that do exactly what you want them to do and no more - and to do them quickly.</p> <h4>Shared Open Source Software</h4> <p>Recently I have begun releasing a few such handy tools under a free software / open source licence. You can find my shared resources hosted on <a href="http://github.com/quandyfactory">GitHub</a>. </p> <p>The code isn't beautiful, but I'm <a href="http://code.google.com/events/io/sessions/MythGeniusProgrammer.html">no genius</a>.</p> <h3>Website Development</h3> <p>I do a bit of freelance web application development. Feel free to contact me via email at <a href="mailto:ryan@quandyfactory.com">ryan@quandyfactory.com</a> to inquire about services and rates.</p> <h3>Technical Notes</h3> <p>There's no particularly good reason why I didn't simply use WordPress or Drupal or some other off-the-shelf blogging software for this site; except that I enjoy building things (also, PHP makes the baby Jesus cry). </p> <p>Anyway, it's not like I built the site from scratch.</p> <ul> <li><p>It runs on <a href="http://nginx.org/en/">nginx</a> and <a href="http://www.apache.org/">Apache</a> on a <a href="http://www.centos.org/">CentOS</a> <a href="http://www.linux.org/">Linux</a> machine hosted by the awesome admins at <a href="http://webfaction.com?affiliate=hammertime">WebFaction</a>. </p></li> <li><p>It is written in the <a href="http://python.org">Python programming language</a> and uses the lightweight <a href="http://webpy.org">web.py</a> application development framework. </p></li> <li><p>Web.py talks to Apache via the <a href="http://code.google.com/p/modwsgi/">mod_wsgi</a> server module, which implements the standard <a href="http://www.wsgi.org/wsgi/">Web Services Gateway Interface (WSGI)</a> specification for Python applications to communicate with web servers.</p></li> <li><p>The site stores its documents in a <a href="http://dev.mysql.com/">MySQL</a> database, to which it connects via the ingenious <a href="http://www.sqlalchemy.org/">SQLAlchemy</a> database toolkit and object-relational mapper (ORM).</p></li> <li><p>Documents are saved in <a href="http://daringfireball.net/projects/markdown/">Markdown</a> syntax and converted to HTML for display using the <a href="http://code.google.com/p/python-markdown2/">python-markdown2</a> library (which is itself a re-implementation of the original <a href="http://www.freewisdom.org/projects/python-markdown/">python-markdown</a> library).</p></li> <li><p>It also uses <a href="/projects/5/quandy">Quandy</a>, a library of handy classes and functions that I use frequently in writing web code. </p></li> </ul> <p>In other words, I'm sitting here on the shoulders of giants - and the view is grand!</p> Ryan McGreal 2 http://quandyfactory.com/blog/167/what_you_need_to_know_to_start_running 2016-04-06T12:00:00Z What You Need to Know to Start Running <p>A staggeringly large amount of information is available to runners and would-be runners today - possibly too much, given the potential to feel overwhelmed by it all. There is information you need to get started, and there is information you don't need until you encounter specific issues, and it's not always clear which is which.</p> <p>So without any claim whatsoever to expertise - I'm just a middle-aged duffer who started running two and a half years ago and has had to learn lots of things along the way - here's my take on what you need to get started running.</p> <h3>Equipment</h3> <p>There is an embarrassment of apparel, gear, equipment and assorted accoutrements available for running, but when you're just getting started you can safely ignore most of it. Given the short distances and low speeds you'll be running for at least the first two or three months, it really doesn't matter what clothes you wear. Regular clothes will be just fine at the beginning. </p> <p>(Later, when you've gotten established and are running longer distances, you can go to the running store and start your collection of synthetic, stretchy, moisture-wicking, water bottle-holding, fluorescent-glowing, heart rate-monitoring running stuff.)</p> <h4>Running Shoes</h4> <p><strong>On day one, the only equipment you really need is a good pair of running shoes.</strong> </p> <p>Here's the secret of how to pick a good pair of running shoes: go to a running shoe store and try on a variety of different pairs of shoes from various brands and types. Choose the pair that feels the most comfortable. <em>That's all there is to it.</em></p> <h4>Select for Comfort</h4> <p>The salesperson might try to do a gait analysis and tell you that you should be wearing this or that particular type of shoe (arch support! stability! motion control!), but <a href="http://well.blogs.nytimes.com/2015/08/05/choosing-the-right-running-shoes/">the evidence indicates</a> that comfort, not some set of technical criteria, should be the deciding factor.</p> <blockquote> <p>Perhaps most unexpected, running shoes designed to somehow "fix" someone's running form turned out often to be ineffective and even counter-productive. In a series of studies, when military recruits were assigned running shoes meant to control their particular level of pronation, those soldiers were as likely, or even more so, to sustain running-related injuries than soldiers given shoes at random. [...]</p> <p>What matters, the researchers conclude in their review, is comfort. In one study from 2001 (overseen by Dr. Nigg), researchers asked soldiers to try six shoe inserts, which varied in terms of cushioning, arch height, heel shape, thickness and other variables. The soldiers were asked to pick the one insert that felt the most comfortable to them and wear that insert inside their shoes during their subsequent military training. A separate group of soldiers wore standard footwear as controls.</p> <p>After four months, the soldiers wearing the shoes fitted with inserts that felt comfortable to them had a much lower incidence of injury than those wearing standard shoes.</p> <p>This finding makes scientific and common sense, Dr. Nigg said. Our bodies are actually "very good judges" of how each of us should move and run, he said. When we ignore or fight our bodies' natural movement pattern, he said, such as by trying to control pronation, the risk of injury rises.</p> </blockquote> <p>So don't overthink it and don't let someone pressure you into a particular type of shoe that doesn't feel comfortable.</p> <h3>Understand How Adaptation Works</h3> <p>Your body is capable of astonishing physical accomplishments, but it takes time and patience. It really helps to understand how your body gets from here to there. </p> <h4>Stress Response</h4> <p>When you begin a new program of exercise like running, what you are really doing is subjecting your various body systems to <em>physical stress</em>. </p> <p>That stress damages your muscles, connective tissues, bones and so on. Your body responds, not surprisingly, with the biological <em>stress response</em>: your hypothalamus signals your pituitary gland, which dispatches chemical messengers throughout your body. </p> <p>The result is increased heart rate, faster breathing, glucose released into bloodstream, elevated levels of cortisol and other stress markers, increased blood flow to stressed body systems, and so on.</p> <h4>Stronger, More Resilient</h4> <p>When your body repairs the damage of moderate exercise, the repaired body systems are left slightly stronger and more resilient than before they were exposed to stress. This is called <em>adaptation</em> - your body responds to moderate stress by adapting to it. </p> <p>Over a period of weeks and months, the following adaptive changes will progressively take place:</p> <ul> <li>Your lungs learn to draw in more air and to exchange oxygen and carbon dioxide more effectively.</li> <li>Your heart becomes stronger and more efficient at pumping blood.</li> <li>Your cardiovascular system gets better at delivering oxygen and nutrients to your muscles and dissipating heat through your skin.</li> <li>Your muscles learn to create more energy and provide more power for longer periods.</li> <li>Your tendons, ligaments, joints, fascia and other connective tissues learn to absorb and release energy more effectively.</li> <li>Your bones become stronger and more resilient.</li> </ul> <p>(Along the way, your body generally becomes more effective at responding to other stressors, an ancillary benefit that can really improve your quality of life when things go wrong.)</p> <h4>Moderation and Recovery</h4> <p>The key here is that the stress must be <em>moderate</em>. Too little stress and your body is not motivated to undergo adaptation. Too much stress and you get a more serious injury that requires several days, weeks or even months to heal. </p> <p><strong>You want a level of stress that your body can recover from in a day or two.</strong></p> <p>As a corollary to this, your <em>recovery time</em> is every bit as essential to increasing fitness as your exercise. </p> <blockquote> <p>Fitness = exercise + recovery</p> </blockquote> <p>If you skip the recovery time, your body just breaks down instead of building up.</p> <h4>Muscle vs. Connective Tissue</h4> <p>The other important thing to understand here is that some body systems adapt more quickly than others. Your respiratory and circulatory systems and muscles adapt very quickly - within a few weeks, you'll be amazed at how much farther you can go before getting out of breath - but your bones and connective tissues take a lot longer to adapt. </p> <p>All of the most common running injuries - shin splints, tendonitis, fasciitis, IT band syndrome, runner's knee, stress fractures (yikes!) - are injuries of connective tissues or bones that result from doing too much too soon instead of giving these slow-changing systems enough time to adapt. </p> <p>The good news is that these injuries are more or less preventable.</p> <h3>Ten Percent Rule</h3> <p>If Running has a Golden Rule, it's the Ten Percent Rule: <strong>never increase your total week-over-week distance by more than a <em>maximum</em> of ten percent</strong>. This is a universal, rock-solid principle of safe running proven by decades of research and experience. Ignore it at your peril!</p> <p>After a few weeks of progress, you <em>will</em> feel like you can go farther faster, because your heart, lungs and muscles are telling you they're up for it. This is a recipe for injury when your tendons, ligaments, fascia and bones can't keep up with the pace of change.</p> <p>Not only do those systems take longer to adapt, but if you do get injured, they also take longer - a <em>lot</em> longer - to recover. In this case, an ounce of prevention really is worth a pound of cure. Follow the Ten Percent Rule and avoid getting sidelined for weeks or even months.</p> <h4>Example Running Program</h4> <p>Here's how a running program that follows the Ten Percent Rule might look:</p> <ul> <li>Week 1: 3 runs at 2.5 km (7.5 km total distance)</li> <li>Week 2: 3 runs at 2.75 km (8.25 km total distance)</li> <li>Week 3: 3 runs at 3.0 km (9 km total distance)</li> <li>Week 4: 3 runs at 3.33 km (10 km total distance)</li> <li>Week 5: 3 runs at 3.66 km (11 km total distance)</li> <li>Week 6: 3 runs at 4.0 km (12 km total distance)</li> <li>Week 7: 3 runs at 4.4 km (13.2 km total distance)</li> <li>Week 8: 3 runs at 4.8 km (14.4 km total distance)</li> <li>Week 9: 3 runs at 5.2 km (15.6 km total distance)</li> </ul> <p>When you start out, don't expect to be able to run the whole distance. In fact, if you are new to running, I recommend against running the whole way even if you feel that you can. </p> <p>Instead, start with a brisk walk to warm up, then run for, say 30-60 seconds, followed by 30-60 seconds of walking. Alternate walking and running for the full distance so that your body gets the benefit of micro-rest between bouts of running.</p> <h4>Rest Days</h4> <p><strong>Avoid running on successive days.</strong> Instead, make sure to give your body a day off between runs. On your rest day, go for a nice walk instead - the motion helps reduce stiffness and soreness. </p> <p>In general, walking is almost magical in its ability to heal your body and make you feel better. Walking is the most fundamental human movement and it's probably not overstating the case to call it the foundation for all of the higher-intensity exercises that build strength and endurance. </p> <p>Never underestimate the physical, mental and emotional value of a good walk.</p> <h4>Ten Percent is a Maximum</h4> <p>And remember: the Ten Percent Rule is a <em>maximum</em> weekly increase. If your shins flare up, or you feel an unpleasant twinge in your heel or an ache in your knee or anything else other than the general muscle soreness that can be expected with a new physical activity, back off right away. </p> <p>Apply ice to the affected area, rest, stretch, give yourself an extra day off before the next run, reduce your distance and speed and reassess whether it still hurts.</p> <p>If you are running properly and your body is adapting well, <em>you will not feel pain</em> other than muscle soreness. The saying, "No Pain, No Gain" is dangerous nonsense. If you do feel pain, it means something is wrong! Listen to your body.</p> <h3>Exercise</h3> <p>While we're on the subject of injury prevention, it is not enough to just run. If you don't also do other exercises to support your running, your body will become unbalanced and you will get hurt. </p> <h4>General Strength</h4> <p>Here is a basic set of exercises you should do to keep your body balanced and fit and avoid injury:</p> <ul> <li><strong>Calf raises</strong> - indispensable for strengthening your calves and avoiding tendinitis</li> <li><strong>Squats</strong> - strengthen your glutes and thigh muscles and posture to maintain stability when running</li> <li><strong>Lunges</strong> - strength and flexibility through your legs and hips</li> <li><strong>Mountain Climbers</strong> - strengthen quads and calves, improve flexibility, increase core stability</li> <li><strong>Planks</strong> - a strong core makes for better posture and more stable running form</li> <li><strong>Push-ups</strong> - strong core and good form encourages more efficient arm swing</li> <li><strong>Static calf and hamstring stretches</strong> - do these after a run, not before</li> </ul> <h4>Focus on the Feet</h4> <p>There are also several great exercises that specifically strengthen the feet:</p> <ul> <li>Lay a towel on the floor and grab it with your toes, pulling it toward you.</li> <li>Place some marbles on the floor. Pick them up with your toes and place them in a bowl.</li> <li>If you're sitting around, take the opportunity to rotate your feet clockwise and counter-clockwise and wave them back and forth like windshield wipers.</li> </ul> <p>Here's a great exercise that only takes a minute, so try to do it every day: </p> <ul> <li>Stand on one foot and lift the other leg so that your thigh is horizontal to the floor. Balance for 30 seconds, then switch feet. (As you get better at it, try waving your arms around to try and throw yourself off-balance.)</li> </ul> <p>This exercise strengthens the stabilizing muscles in your feet and ankles and reduces your risk of injuries on uneven ground.</p> <h4>Cross-Training</h4> <p>I also strongly recommend that you incorporate some cross-training with another cardio exercise that works different muscle groups and is lower impact than running: cycling, swimming, rowing, stair climbing, etc. </p> <p>Doing this will reduce any development imbalances you have. It also provides a built-in way to maintain cardio fitness if you do get injured, so that you don't become discouraged and give up.</p> <h4>Get in Shape to Run</h4> <p>You may be groaning right now. I certainly did when I was advised to do these things by my running coach. <em>Ugh, I just want to run!</em> </p> <p>A couple of years ago, a friend told me: "I don't run to get in shape, I get in shape to run." I didn't understand this statement at the time, but I have come to understand it after dealing with a succession of foot injuries that resulted from a combination of violating the Ten Percent Rule and not doing enough ancillary strength exercises. </p> <p>The exercises you need to do to recover from the various -itises happen to be the same exercises you need to do to prevent them in the first place. Don't wait until you've already gotten injured to start doing them!</p> Ryan McGreal 2 http://quandyfactory.com/blog/161/a_year_of_walking 2016-01-20T12:00:00Z A Year of Walking <p>One year ago, at a health conference in Toronto, I received a pedometer as part of my attendee swag bag. Curious about how much I walked in a day, I strapped it onto my belt and decided to start tracking my daily step counts. </p> <h3>The Pedometer</h3> <p>The pedometer is a Piezo SC-StepRX model, which advertises a "medical grade piezoelectric mechanism" and seems like a pretty solid product. I haven't particularly done a lot of research to see how it measures up to other models, but at least one <a href="http://www.biomedcentral.com/1471-2458/14/519">published academic study</a> concludes, "This study demonstrates that the SC-StepRx pedometer is a valid tool for the measurement of moderate and vigorous physical activity in children and youth."</p> <p>One handy feature is that it keeps track of the past 34 days, so if you forget to record a day's results, you can always go back. I also like the fact that it clips on your belt and has an additional safety strap with an alligator clip, which has saved me from losing it on more than one occasion.</p> <p>It certainly seems to be quite accurate. I've taken walks where I counted my steps and when I compared the stepcounter, it was within a few steps of what I counted. </p> <p>At the same time, it doesn't seem inclined to register stray movements as steps. It appears to need up-and-down <em>and</em> back-and-forth movement to count a step. I don't drive much, but in any case the pedometer doesn't seem to register bumps in the road while driving, so I don't earn "phantom" points during the times I'm jostling around on Hamilton's streets.</p> <p>Very, very occasionally, it seems to get hung up and stops counting steps, but that has only happened a few times.</p> <h3>Why I Started</h3> <p>As for why I decided to start using it, aside from the obvious reason that I had nothing to lose by wearing a pedometer I had received for free, I'm a strong believer that if you want to manage something, you need to measure it. The mere act of tracking a given measurement tends to draw your attention to it and motivate you to take action to move the results.</p> <p>So I started wearing it every day and tracking how much I walked. At first, my stepcounts weren't all that impressive. Other than days when I went for a run, I was averaging less than 10,000 steps a day - sometimes <em>far</em> less.</p> <p>Then I injured my foot on November 11 and had to stop running altogether for a few weeks. I was walking slowly and deliberately to avoid limping, and I was managing just 6-7,000 steps a day. <a href="https://youtu.be/_rjmV-Rh130?t=15">Mediocre!</a></p> <p>Since I wasn't running (or running much, even when I started again), I committed myself to walking more. Having a daily recording of how I was doing allowed me to try out techniques for increasing my amount of walking and noting which ones worked well.</p> <p>I made a point of walking to work every day. That's a two-kilometre trip, so walking to work and back is 4,000 or so steps right off the top. Previously, I would tend to ride my bike to work because it meant I could sleep in an extra ten minutes.</p> <h3>Standing Desk</h3> <p>I also had a stand-up desk and hadn't really been making very effective use of it. I decided to set it permanently in standing mode and commit to being upright the entire day. This produced several changes, most of them positive.</p> <ul> <li><p>At first, I would be tired and sore at the end of the day. My legs and the small of my back would ache, and I felt exhausted. However, I had fully acclimatized to standing within a month.</p> </li> <li><p>Because I was already standing, I became more inclined to walk away from my desk, whether to get a drink of water, meet with a colleague, or walk around the block to clear my head.</p> </li> <li><p>I started taking the stairs. It's 94 stairs from the ground floor to my office, and when I first started taking the stairs I'd be fairly out of breath by the time I finished. It gradually became easier, and I've had to seek out taller staircases, like the various Escarpment Stairs in Hamilton, to wind me.</p> </li> <li><p>I could practice the <a href="http://www.huffingtonpost.com/2014/06/04/100-up-running_n_5406664.html">100-Up Drill</a>, which really helped both my injury recovery and my running form. I even taped a line in front of my desk so I could make sure I was landing in the right spot.</p> </li> <li><p>I often wear noise-cancelling headphones so I can concentrate. I've found that electronic music is great for focusing on writing code, but an ancillary benefit is that I find myself moving to the rhythm and dancing in place, which may prevent some of the problems that go with standing for long periods. </p> </li> <li><p>I also noticed that when my grooving became vigorous and incorporated steps and hip movement, my pedometer would register some of the movement as stepping. Since I was upright and moving actively, I decided to allow it to contribute toward my daily total.</p> </li> </ul> <p>One possible negative is that standing all day with plantar fasciitis may have delayed my recovery. However, over the longer term I have become so comfortable with a standing (and walking, and dancing, and so on) that I actually can't imagine sitting again. I don't know how I did it for so long, slouching for hours, taking shallow breaths with my spine curved and my chest sunken.</p> <h3>Upward Trend</h3> <p>As I introduced more and more of these activities into my routine, my daily stepcounts started trending upward, also boosted by my recovering running distance. Even when I was still running short distances, I tried to pad the workout by adding walking before and after the run.</p> <p>Early this year I also started incorporating bike rides into my routine, and I noticed that an hour of hard cycling would register as around 7,000 steps on my pedometer. It seems to register the pedaling action of my legs and hips as steps, which seems fair to count. In addition, 7,000 is around the same number of steps as an hour of brisk walking, so I decided to include these in the total as well.</p> <p>I've also become progressively more inclined to walk for as many errands as possible. Whereas I might have hopped on my bike or a <a href="https://hamilton.socialbicycles.com/">Hamilton Bike Share</a> to go to the grocery store after work, I started walking the full distance instead, adding a few kilometres to my daily commute.</p> <p>I also became a lot more willing to make trips instead of avoiding them. Even for something as simple as taking the food waste out to the green bin, I'll make three or four trips with various plates and bowls rather than dumping everything onto one plate in order to get out of extra walking. </p> <p>It became a game: the goal of increasing my stepcount for the day came to overrule my <em>default work-avoidance setting</em>. When getting ready to go to bed at night, if I was close to my target for the day I would literally walk around the room racking up steps until I hit the goal.</p> <h3>Steady Increase</h3> <p>Over the past twelve months, my average daily stepcount has steadily increased from less than 10,000 to more than 20,000. Here's a chart of every daily total with a linear trendline for the past year:</p> <p class="image"> <img src="//i.imgur.com/zX75bHo.png" alt="Steps per day with trendline, 2014-10-23 - 2015-10-22" title="Steps per day with trendline, 2014-10-23 - 2015-10-22"><br> Steps per day with trendline, 2014-10-23 - 2015-10-22</p> <p>A graph of weekly totals shows the same general upward trend through the expected variation from week to week. (Note: the two very low weeks around 2014-52 are an artifact of the weekly grouping function in the database I used, as it groups December 28-31 as a week and January 1-3 as a new week.)</p> <p class="image"> <img src="//i.imgur.com/fycQtkI.png" alt="Steps per week" title="Steps per week"><br> Steps per week</p> <p>For the past several weeks I seem to have plateaued around 170,000 steps a week, and to be honest that seems like a pretty reasonable peak. As the weather gets colder it might even decline slightly, especially as my weekly cycling distance goes down. </p> <p>On the other hand, I am signed up for the 30 km <a href="http://bayrace.com/">Around The Bay Road Race</a> next April and plan to continue running steadily longer distances through the winter. I also plan to continue commuting on foot and going for brisk walks on days when it's too lousy out to cycle.</p> <h3>One Year On</h3> <p>The pedometer, now a year old, still seems to be holding up nicely despite some visible wear and tear. I had the battery replaced in October, not because the old one died but because we were leaving <a href="https://raisethehammer.org/article/2707/bicycle-friendly_paris_refuses_to_stand_still">to go to Paris</a> for a week and I became paranoid that the battery would die when we were there. Paris is an exceptionally walkable city and I wanted to know just how much walking we actually did there.</p> <p>So over exactly a year of tracking how much I walk, I have taken a total of 6,142,895 steps for a year-long average of 16,830 steps a day. That total includes walking, running, vigorous dancing, aerobic exercise and cycling and, duh, I haven't been taking it to the paint store and attaching it to the paint can shaker.</p> <p class="image"> <img src="//i.imgur.com/GJspd5Y.jpg" alt="Pedometer count for October 16, 2015" title="Pedometer count for October 16, 2015"><br> Pedometer count for October 16, 2015</p> <p>Here's to another year of putting one foot in front of the other!</p> Ryan McGreal 2 http://quandyfactory.com/blog/155/a_second_year_of_running_plus_some_not-running_and_other_stuff 2015-07-30T12:00:00Z A Second Year of Running, Plus Some Not-Running and Other Stuff <h3>Introduction</h3> <p>A year ago today, I posted my first article <a href="/blog/135/a_year_of_running">reviewing a year of running</a>. I had a fantastic year and accordingly the article had a celebratory tone. I was going faster and farther week over week and had been doing so almost continuously for the entire year, notwithstanding a short early setback when I had shin splints.</p> <p>I was pushing the limits pretty hard on both distance and speed, chasing continued week-over-week increases along both axes. In January of 2014 I was running around 20 km a week. By April I was up to 35 km a week, and by June I was up to 40. That increased throughout the summer and by October I was doing 48-50 km a week.</p> <p>Likewise, I started 2014 with a running speed between 8.5 and 9.4 km/h (or a pace between 6:35 and 6:23 minutes per km), but by the time I wrote the article I was regularly exceeding 10 km/h (6:00 min/km) for my shorter runs and 9.5 km/h for my Saturday long runs, which were generally in the 25-28 km range.</p> <p>As the saying goes, pride goeth before a fall. </p> <p>Not only was I increasing my running load too quickly, but also I was neglecting all the ancillary exercises that you need to do in order to run well. I was warming up with my A-B-Cs before a run and doing some stretches after, but that was pretty much it. </p> <p>I was also neglecting to replace my shoes in a timely manner and was running on a pair of Mizuno Wave Riders that had more than a thousand kilometres of wear on them.</p> <h3>Injury Strikes</h3> <p class="initial">I finally pushed it too far on November 11, 2014, when I hit an average speed of 11:03 km/h (5:26 min/km) over 10 km - a personal speed record for me. I felt a funny sensation in my right heel during the run but thought nothing of it. </p> <p>When I woke up on Wednesday, November 12, my heel was killing me. </p> <p>My heel felt a bit better on Thursday but it still hurt, so I put off my scheduled run and picked up the new pair of shoes that I should have bought at least a month earlier. </p> <p class="image"> <img src="/static/images/old_running_shoe_vs_new_running_shoe.jpg" alt="Old shoe and new shoe" title="Old shoe and new shoe"><br> Old shoe and new shoe</p> <p>On Friday, my heel felt better so I heedlessly dove right back to a 10 km run. By the end of it, my heel was screaming again. On Saturday morning, I could barely walk.</p> <p>I had the dreaded <em>plantar fasciitis</em> - an inflammation of the plantar fascia, which is a thick band of connective tissue that stretches across the bottom of your foot from your calcaneous (heel bone) to your metatarsals (the bones between your toes and the ball of your foot).</p> <p>The plantar fascia acts as the bowstring to your foot's arch, tensing and absorbing energy when you step down and releasing that energy when you lift up.</p> <p>Plantar fasciitis is a condition in which you feel sharp pain in your heel due to an injury to the plantar fascia: trauma, inflammation, tearing or degeneration (or some combination).</p> <p>You use your plantar fascia all the time whenever you're standing, walking or running (when you're running, it absorbs up to 7 times your body weight during pushoff), so it's a challenge to treat once it gets injured.</p> <p>It is extremely frustrating to deal with, but like most running injuries it is entirely treatable. It is important to note here that the array of exercises and stretches you do to treat PF are suspiciously similar to the array of exercises and stretches you do to <em>prevent</em> PF. Hint hint.</p> <h3>Starting Recovery</h3> <p class="initial">I had to stop running altogether for around two and a half weeks and focus on walking slowly and smoothly without a limp. (Every day you spend hobbling extends your recovery time and increases the risk of subsequent injuries.) This was a surprisingly infantilizing experience - <em>I have to learn how to walk again!?</em> - but my walking form changed and has been smoother ever since.</p> <p>I also got started on a regimen of stretching and strengthening exercises that targeted the entire running system from my feet up through my calves, knees, thighs, hips and butt. </p> <p>I took a comprehensive approach to the injury, applying Advil, Tylenol, Voltaren, ice packs, frozen water bottle rolls, golf ball rolls, towel scrunches, massages, dynamic foot stretches, static foot stretches, 'windshield wipers', achilles stretches, calf raises, calf stretches, squats, lunges, hip hikes, one-foot balance, quad stretches, hamstring stretches, iliotibial stretches, leg lifts - you name it.</p> <p>While I wasn't running (or wasn't running much), I replaced some of the cardio I was missing with bike rides - which became challenging as the weather turned nasty - and long, brisk walks. I also started to incorporate some more resistance exercise, including pushups, planks and resistance band reps. </p> <p>On December 3, 2014, I did my first run in almost three weeks, and it was a sad affair. I went just 3.5 km, alternating walking and running, at an average speed of 7.58 km/h. It was like I was just starting from scratch again!</p> <p>However, I was determined to get back to speed as quickly as possible. Earlier in the year, I had signed up for the <a href="http://bayrace.com/">Around The Bay Road Race</a>, a challenging 30 km run that was to take place on March 29, 2015. That meant I had less than four months to get better!</p> <p class="image"> <img src="//i.imgur.com/qrnxByN.png" alt="Around The bay Road Race route map" title="Around The bay Road Race route map"><br> Around The bay Road Race route map</p> <p>My recovery seemed to be going well. My heel wasn't bothering me and my speed and distance jumped back up quickly - too quickly. A week later I was running 5 km at a speed of 9.5-10 km/h, but my right foot really started to hurt during my run on December 15. </p> <p>Just as my plantar fasciitis was receding, tendonitis came roaring in to take over. Bam - I was out of action for another two-plus weeks and had to start my recovery all over again.</p> <p>My next run was on December 30, and it was a paltry 3.5 km walk-jog at a stately average speed of 6.96 km/h. Now I had only three months to get ready for Around the Bay! If I was going to have any change to make it to the race, I basically had to split the difference between giving my foot enough recovery time to heal properly and also increasing my distance fast enough to reach 30 km.</p> <p>After two weeks of increasing my distance from 3.5 km to 6 km, I resumed my Saturday long run - with the "long" being entirely relative. But I learned at least one lesson from my first attempt at recovery: I optimized for increasing my distance but kept my speed down below 9 km/h. I also took a walk break every five minutes so as not to overtax my feet.</p> <p>The trails I usually enjoy were iced over so I started running along the route of the Bay Race.</p> <p class="image"> <img src="http://raisethehammer.org/static/images/escarpment_trail_in_winter.jpg" alt="Escarpment Trail in winter" title="Escarpment Trail in winter"><br> Escarpment Trail in winter</p> <p>The hardest part of the Bay Race is the stretch along North Shore Boulevard in Burlington, from the 18 km to 27 km mark. It's picturesque but includes some brutal hills, and hills are particularly hard on injured feet.</p> <p>For my Saturday long runs, I ran out along York and North Shore - running the hardest part of the Bay Race in reverse - as far as I could manage and then turned around and returned going forward along the direction of the route. </p> <p>By January 31, my long run reached 10 km - the average distance of my short run a few months earlier, but a lot slower at 8.8 km/h. Interestingly, the very first time I had cracked 10 km distance was almost exactly a year earlier, on February 8, 2014. at a speed of 8.48 km/h.</p> <p class="image"> <img src="http://raisethehammer.org/static/images/multi_modal_jigsaw_at_high_level_bridge.jpg" alt="York Boulevard High Level Bridge and stairs to Waterfront Trail" title="York Boulevard High Level Bridge and stairs to Waterfront Trail"><br> York Boulevard High Level Bridge and stairs to Waterfront Trail</p> <h3>More Problems</h3> <p class="initial">Meanwhile, my left foot started giving me trouble in mid-January. What it needed was for me to dial back the distance but there was no way I could do that and be ready for Around The Bay, and I had already determined that I was going to do everything in my power to try and make it.</p> <p>I ended up spending the next two months trying to compromise between running more to train for the Bay Race and running less to let my feet heal. Needless to say, I didn't really achieve either goal. My feet continued to grumble and twinge as I pushed them harder than they wanted to go, but I decided I'd rather half-ass the Bay Race than quit altogether.</p> <p>At the start of February I bought a new pair of shoes - I had been both walking and running on my old shoes, so they had accumulated a lot of mileage. I also picked up a night splint, which keeps your foot bent up in a long stretch during the night and really helps with plantar fascia. I highly recommend it.</p> <p class="image"> <img src="//i.imgur.com/yyoykKd.jpg" alt="New shoes: Mizuno Wave Rider 18" title="New shoes: Mizuno Wave Rider 18"><br> New shoes: Mizuno Wave Rider 18</p> <p>By mid- to late-February my weekday runs were up to 9 km and my Saturday runs were up to 15 km. I was experimenting fairly heavily with my form, playing around with more midfoot and more forefoot landings, adjusting my cadence up and down, trying to find a form that was easiest on my feet. I also discovered the 100-Up Drill, which is a fantastic way of practicing consistent good form.</p> <p>For my February 28 long run, I did a very slow 19 km and really got to experience some of the hills on North Shore, in addition to a particularly gruelling hill on Spring Gardens Road. That hill ended up not being in the Bay Race, so practicing on it was an added bonus.</p> <p>In the first week of March, I slightly sprained my left ankle while walking briskly to a meeting in sloppy weather. It was just one thing after another! For my next few runs, I slathered on some Voltaren, kept my feet really stiff and took short strides to minimize the load on my ankles.</p> <p>For my March 7 long run, I did 21 km at a slow 8.46 km/h and made it as far as the big hill near LaSalle Park. My left ankle was slightly swollen but I pre-emptively slathered some Voltaren on it and tried to keep my weight off it for the rest of the day, doing lots of stretches. As my physiatrist likes to say, "Motion is lotion."</p> <p>By mid-March the weather was getting better and I started incorporating more and longer bike rides, which was good timing because my ankle was too sore to run on until March 12, when I did a slow 6 km with my ankle complaining the entire time. </p> <p>I felt stuck in a quagmire of cascading injuries. This was my lowest point - I just didn't see how I would be able to complete the Bay Race a little over two weeks later! </p> <p>Then, amazingly and unaccountably, I woke up on March 14 with my foot feeling fine. I have no idea what changed in those two days, but whatever was going on with my foot receded to the point that I could baby it through a long run.</p> <p>I joined another aspiring Bay Race participant and we ran together, enjoying a great conversation. The pace was very slow - 8.45 km/h - but we covered more than 25 km and I barely noticed my feet. After the run, I spent the rest of the day moving - walking casually, doing lots of stretches - and felt okay on the next day. </p> <p>That was to be my longest post-injury, pre-race run. The following Saturday, March 21, I did a 19 km taper run, once again in the company of my fellow Bay Racer, and our conversation kept me buoyed and distracted from kvetching about my foot.</p> <p>I tapered down the week before the big day with an 8k on Monday and a 6.5k on Thursday, both focused entirely on locking down my form. After much experimenting, I had settled on a light-landing midfoot strike with a short, relatively fast stride, while keeping my back straight and my head up.</p> <h3>Around The Bay Road Race</h3> <p class="initial">Finally, the big day arrived. I really wasn't ready for it but as Donald Rumsfeld reminds us, you go into a running race with the body you have, not the body you wish you had. I found a 3:15 Pace Bunny and fell in behind him, which was really helpful because it's easy to come out of the gate way too hot when you're surrounded by so much enthusiasm.</p> <p class="image"> <img src="//i.imgur.com/iZPRzZm.png" alt="My Around The Bay route map (from Runkeeper)" title="My Around The Bay route map (from Runkeeper)"><br> My Around The Bay route map (from Runkeeper)</p> <p>The run itself was filled with delights. It was incredibly buoying to be surrounded by cheering spectators, calling out encouragement and banging drums and holding up inspirational (and occasionally hilarious) signs. One pair of kids standing under the Skyway Bridge held up a sign that read, "Hurry Up Mom, We're Hungry For Lunch!"</p> <p>My chip time, <a href="https://www.sportstats.ca/display-results.xhtml?raceid=25227&status=results&lastname=mcgreal">according to Sportstats</a>, was 3:17:10. That's pretty much exactly where I hoped to end up, all things considered. Given the number of times over the past four months that I seriously doubted whether I would even make it, I was rather delighted with the outcome.</p> <p class="image"> <img src="/static/images/ryan_at_round_the_bay_23_km.png" alt="Me at around kilometre 23 (image credit: Bruce Taylor)" title="Me at around kilometre 23 (image credit: Bruce Taylor)"><br> Me at around kilometre 23 (image credit: Bruce Taylor)</p> <p>My two goals for this run were a) to finish it and b) to finish it with a time between 3:15 and 3:30. I'm delighted to have met both goals! I started out strong and maintained a steady pace until the last 9-10 km or so, when I started to get intermittent cramps in my right calf. </p> <p>The research suggests that cramps are caused when really fatigued muscles flex and then don't respond to the nerve signal to unclench (and not the common belief that it's due to an electrolyte deficiency, for which there is no evidence). </p> <p>Given my lack of physical readiness for the 30k run, that explanation makes perfect sense for me. My hardest pre-race training run was 25 km two Saturdays previously, and I did that at a very slow 8.45 km/h. </p> <p>Reading about cramping after the run, I learned that the best thing to do when it starts happening is to stop and do some static stretches to force the muscle to relax.</p> <p>My final result was unimpressive by the standard of ATB participants - I was in the bottom 40th percentile - but it represented a real personal accomplishment for me after my long winter of discontented feet. It also meant, as one friend pointed out, that I set the bar nice and low so I can easily beat it when I do the run again next year.</p> <p>I took a couple of days off after the Bay Race, and then enjoyed a short-but-fast 5.8 km recovery run on April 1. I quickly bounced back and by April 18 I was doing a 21 km Saturday long run again. Unfortunately, my physiology was still not finished screwing with my plans.</p> <h3>Yet Another Foot Injury</h3> <p class="initial">On May 7, during a 12 km run up the Radial Trail, I did something to my left mid-foot and it blossomed with big, sharp pain. I had to stop running altogether and walk down the hill. (Thankfully there was a <a href="https://hamilton.socialbicycles.com/">Hamilton Bike Share</a> station at the Chedoke Golf Course parking lot so I could rent a bike and ride the rest of the way home.)</p> <p class="image"> <img src="http://raisethehammer.org/static/images/radial_trail_footbridge_over_highway_403.jpg" alt="Radial Trail footbridge over Highway 403" title="Radial Trail footbridge over Highway 403"><br> Radial Trail footbridge over Highway 403</p> <p>Based on the symptoms, I had either a severe midfoot sprain or a fractured metatarsal. I didn't bother going for an x-ray or bone scan to confirm which was the case, since both are treated more or less the same way.</p> <p>So a little over a month after the Bay Race and almost exactly six months after I first got plantar fasciitis in my right heel, I was back to square one <em>yet again</em>. Arrgh.</p> <p>By this time the weather was lovely and cycling didn't seem to bother my foot, so I really ramped up my weekly biking kilometres and re-started the regimen of rest, ice, compression, elevation, Advil, stretches, massages and so on.</p> <p>I took some very long (for me) bike rides, including a 54 km ride to Caledonia and back and a 65 km ride to the edge of Brantford and back. I started doing a 40-50 km long ride every Saturday morning, in addition to two or three 20 km lunchtime rides during the week.</p> <p class="image"> <img src="//i.imgur.com/PdLH7Gr.jpg" alt="Self-portrait, Hamilton to Brantford Rail Trail" title="Self-portrait, Hamilton to Brantford Rail Trail"><br> Self-portrait, Hamilton to Brantford Rail Trail</p> <p>When I resumed running again on May 23, it was once again a very short distance (2.67 km) and a very slow pace (8.0 km/h). But unlike the previous times I had re-started running, this time I was really determined to ramp up very slowly and gradually. </p> <p>I no longer had a big race to train for and I was getting in lots of cardio from cycling, so I finally felt I had a full licence to take the time to heal properly. </p> <p class="image"> <img src="http://raisethehammer.org/static/images/fearless_deer_on_radial_trail.jpg" alt="Fearless deer on Radial Trail" title="Fearless deer on Radial Trail"><br> Fearless deer on Radial Trail</p> <p>So far, my distance has been increasing almost as slowly as it did when I first started running. The first four runs were all less than 4 km total distance. The next week I was running just over 4 km. The third week I was running around 4.3 km. The fourth week I was running around 4.5 km. </p> <p>By the end of the fifth week I was running 5 km. By the end of the sixth week I was up to 5.5 km, and the seventh week got me up to 5.8 km.</p> <p>In early July, extra-conscious of wear and tear on my shoes, I bought another new pair and relegated the old ones for walking.</p> <p class="image"> <img src="//i.imgur.com/WUrNxAC.jpg" alt="Old soles (left) and new soles" title="Old soles (left) and new soles"><br> Old soles (left) and new soles</p> <p>As of this week, I'm finally back up to 10 km distance with a speed a little better than 10 km/h. That is with five minutes of running and 30 seconds of walking.</p> <p>Another way I snuck extra cardio into my short runs was to precede my lunchtime runs with a brisk walk. At first, I'd walk 4 km and then run 4 km, but gradually the walking portion has gotten shorter as the running portion has gotten longer.</p> <p>Amazingly, my brisk walking pace today is faster than my running pace was when I started running two years ago. For the first few weeks in the summer of 2013, my running speed was in the 7.16-7.74 km/h range. Now my brisk walk is in the 7.8 km/h range.</p> <h3>Lessons Learned</h3> <p class="initial">The first and most important lesson I have learned is that if I want to run, <strong>I have to do more than just run</strong>. Prior to my injury, my exercise program was highly unbalanced: it was basically just running! Surprisingly (to no one but me), it turns out that's not sustainable. As a friend of mine put it: "I don't run to get in shape, I get in shape to run." I think I understand that now.</p> <p>The next lesson is that <strong>recovery from an injury comes slowly and gradually</strong>, so you have to be patient - but it does come. It took me three injury-based interruptions from running to finally accept this and give my body the time it needs to heal.</p> <p>The third lesson I learned is that <strong>running is not the only enjoyable exercise</strong>. I love brisk walks, stints on the Escarpment Stairs and bike rides - especially relatively longer distance bike rides over a couple of hours. </p> <p>I have even come to enjoy pushups (sort of) - at least, I enjoy the feeling of being stronger than I was when I first started doing them and could literally only do a few at a time.</p> <p>Another lesson is that <strong>I really, really love my city</strong>. Over the past few months I have taken bike rides to Ancaster, Dundas, Jerseyville, Brantford, Waterdown, Stoney Creek, Binbrook and points all across the upper and lower city. I have discovered parts of the city I never really knew about, found some fantastic routes and seen some incredible natural and architectural beauty.</p> <p class="image"> <img src="http://raisethehammer.org/static/images/wooden_footbridge_over_sydenham_creek.jpg" alt="Wooden footbridge over Sydenham Creek" title="Wooden footbridge over Sydenham Creek"><br> Wooden footbridge over Sydenham Creek</p> <p class="image"> <img src="http://raisethehammer.org/static/images/trail_signs_near_albion_falls.jpg" alt="Trail signs near Albion Falls" title="Trail signs near Albion Falls"><br> Trail signs near Albion Falls</p> <p>It saddens me to think that there are people who never see and experience their own community other than through the windshield of a car.</p> <p>My biggest fear, after the dread that I would never be able to run again, was that I would lose the progress I had made and start to regain all the weight I had lost. It was that fear, as much as my desire to build my strength and prevent a relapse, which motivated me to take the goal of a broad fitness program more seriously.</p> <p>In many ways, I am in much better shape now than I was last November when I first got injured. </p> <p>My aerobic capacity is better, for one thing. When running, I always breathe in rhythm with my footstrike cadence, and I used to follow the pattern <em>inhale for three steps, exhale for three steps</em> or <em>inhale for three steps, exhale for two steps</em>. When I was feeling tired or on a steep hill, I would drop to <em>inhale for two steps, exhale for two steps</em>. That breathing pattern gave me enough air to run between 9.5 km/h and 11 km/h, depending on the distance.</p> <p>Now, my breathing pattern is <em>inhale for four steps, exhale for four steps</em> or <em>inhale for four steps, exhale for three steps</em>. (I tend to do three repetitions of the first pattern followed by one repetition of the second pattern, so that I don't always start inhaling on the same footstrike.) That gets me an average speed of 10 km/h to 10.8 km/h - including taking into account a short walk break every five minutes.</p> <p>We don't have a scale and I haven't weighed myself in some time, but my clothes continue to get looser and I have had to punch several more holes in my belt to keep my pants up. I estimate that I am 65-70 lbs down from my highest weight.</p> <p>My body isn't quite where I want it to be, but it is quite a lot closer to where I want it than it is to where it was two years ago.</p> <p>Another important lesson this experience of running has really reinforced is that <strong>if you want to change something, you need to measure it</strong>. </p> <p>Last October I was given a pedometer and so I started wearing it and <a href="/stepcounts">recording my daily step totals</a>. Over the past nine months, my daily average number of steps has increased from less than 10,000 to over 20,000. Over the entire period, I have taken a total of over <em>four million</em> steps.</p> <p class="image"> <img src="//i.imgur.com/xVwU3Kv.jpg" alt="Stepcounts since October 2014 with linear trendline" title="Stepcounts since October 2014 with linear trendline"><br> Stepcounts since October 2014 with linear trendline</p> <p>This spring I also started <a href="/biking">recording my longer bike rides</a> (I don't bother to record short rides of just a few kilometres to run errands), and of course I am still <a href="/running">recording my runs</a>. </p> <p class="image"> <img src="//i.imgur.com/JF8TgkL.png" alt="Running distance (blue bars) and pace (red line) since July 27, 2013" title="Running distance (blue bars) and pace (red line) since July 27, 2013"><br> Running distance (blue bars) and pace (red line) since July 27, 2013</p> <p>A few other running metrics for the past year:</p> <ul> <li>Total distance: 1,463 km</li> <li>Total calories burned: 149,437</li> </ul> <p>Ironically, these are pretty similar to my totals for my first year of running:</p> <ul> <li>Total distance: 1,325 km</li> <li>Total calories burned: 155,468</li> </ul> <p>It's interesting that the total distance is slightly longer but the total calories burned is slightly lower. That's because losing weight means I'm not doing as much work to run a given distance at a given speed.</p> <p>There is at least one more lesson worth mentioning. Running has changed my life in innumerable ways. It has given me improved fitness and coordination, better health, improved mood and improved mental discipline, of course, and these are all wonderful outcomes.</p> <p>But perhaps even more importantly, it has also powerfully reminded me that life is a work in progress - that we are not trapped by the status quo and that <strong>change and growth are possible</strong>. </p> <p>That lesson, learned deeply and viscerally in my own body, is finding profound application in all areas of life.</p> Ryan McGreal 2 http://quandyfactory.com/projects/150/tracking_movement 2015-06-14T12:00:00Z Tracking Movement <p>I've been tracking my daily/weekly running and stepcounts. You can see the results here:</p> <ul> <li><p><a href="/running">Running</a></p></li> <li><p><a href="/biking">Biking</a></p></li> <li><p><a href="/stepcounts">Stepcounts</a></p></li> </ul> Ryan McGreal 2 http://quandyfactory.com/projects/151/recipes 2015-04-17T12:00:00Z Recipes <p>I've got a new section on the site for recipes I often use. You can find it here:</p> <ul> <li><a href="/recipes">Recipes</a></li> </ul> Ryan McGreal 2 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 /articles/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>/articles</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>/articles</code> and you want to add a new article, issue a POST request to <code>/articles</code> with the content. The server will create a new <em>subsidiary</em> URI under <code>/articles</code> - for example, <code>/articles/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>/articles/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>/articles</td> <td></td> <td>GET</td> <td></td> <td>makes a list of articles</td> <td>returns a list of articles</td> <td class="green">Yes</td> </tr> <tr> <td>/articles</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>/articles</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>/articles</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>/articles</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