tag:quandyfactory.com,2020-11-3:/2020113 2020-11-3T12:00:00Z Quandy Factory Newsfeed - All Quandy Factory is the personal website of Ryan McGreal in Hamilton, Ontario, Canada.. http://quandyfactory.com/projects/244/vowels_to_oob 2021-03-10T12:00:00Z Vowels to Oob <p><textarea id="oob_text" name="oob_text" placeholder="Enter your text here" style="width: 100%; height: 4em !important"></textarea> <input id="vowel_to_oob_convert" style="width: 100%: height: 2em; line-height: 2em; font-size: 1.5em;" type="submit" value="Convert"/></p> <p><div id="oob_output"></p> Ryan McGreal 2 http://quandyfactory.com/projects/243/alternating_caps_generator 2021-03-05T12:00:00Z AlTeRnAtInG CaPs gEnErAtOr <p><textarea style="width: 100%; height: 4em !important" id="ac_text" name="ac_text" placeholder="Enter your text here"></textarea> <input style="width: 100%: height: 2em; line-height: 2em; font-size: 1.5em;" id="ac_convert" type="submit" value="Convert"/></p> <div id="ac_output"> </div> Ryan McGreal 2 http://quandyfactory.com/site/13/about 2021-03-05T12: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>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 ̶W̶e̶b̶f̶a̶c̶t̶i̶o̶n̶ <a href="http://opalstack.com?affiliate=hammertime">Opalstack</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="https://uwsgi-docs.readthedocs.io/en/latest/">uwsgi</a> server module, which replaces the older 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="https://mariadb.org/">MariaDB</a> database, which is a free-and-open source fork of <a href="http://dev.mysql.com/">MySQL</a>, and the database connection is made using 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/projects/241/hamilton_covid-19_outbreaks 2021-01-30T12:00:00Z Hamilton COVID-19 Outbreaks <p>I created a <a href="/covid/outbreaks?active_only=1">Hamilton COVID-19 Outbreaks page</a> to track active outbreaks and plot them on a map. Updated daily. </p> Ryan McGreal 2 http://quandyfactory.com/projects/240/ontario_covid-19_data 2021-01-30T12:00:00Z Ontario COVID-19 Data <p>The <a href="/covid">COVID-19 page</a> tracks daily test results from Ontario Public Health since the start of the pandemic, with various charts and related data tables. The information is also available in various open data formats. </p> Ryan McGreal 2 http://quandyfactory.com/projects/2/pyhtmledit 2020-05-27T12:00:00Z PyHtmlEdit <p>You can download pyhtmledit from its <a href="http://github.com/quandyfactory/PyHtmlEdit/tree/master">Github repository</a>. </p> <p class="image"> <img src="/static/images/pyhtmledit_editor_window.png" alt="PyHtmlEdit screenshot" title="PyHtmlEdit screenshot"><br> PyHtmlEdit screenshot </p> <ul> <li>Current Version: 3.1 (released 2020-05-27)</li> </ul> <p>Note: PyHtmlEdit has been completely updated as of Version 3. It now runs on Python 3.x, not Python 2.x, as the latter is obsolete and is no longer being supported.</p> <p>PyHtmlEdit 3 also runs using the Tkinter GUI library, which is built into Python installations, instead of the wxPython library, which turned out to be more hassle than it was worth.</p> <p>You also need to have the python-markdown2 and html2text libraries installed.</p> <p>The features include:</p> <ul> <li>Convert between Markdown and HTML.</li> <li>Search, Replace Next and Replace All.</li> <li>Undo and Redo.</li> <li>A Clean function that removes MS Word special characters.</li> <li>HTML element formatting, including converting a tab-delimited list to an html <code>table</code>.</li> <li>Lowercase, Proper Case and Uppercase functions.</li> </ul> <p>This software is released under the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public Licence, Version 2</a>.</p> Ryan McGreal 2 http://quandyfactory.com/blog/229/some_handy_running_calculations 2019-11-08T12:00:00Z Some Handy Running Calculations <p>I've recently <a href="https://www.strava.com/athletes/47143600">signed up with Strava</a> after almost a decade using <a href="https://runkeeper.com/user/RyanMcGreal/profile">Runkeeper</a>, and I've also recently resumed a regular weekly running program after a very sketchy few months of barely getting any runs in. I decided that with Around the Bay 2020 just five months away, it would be a good idea to start tracking my runs in terms of an ATB training program, naming each run in terms of which week of training it falls in, and which consecutive run it is during that week. So the first run of the first week would be 1-1, and the third run of the second week would be 2-3, and so on.</p> <p>Strava gives you some pretty good information in its running analysis, but I'm also interested in increasing my cadence toward 180 steps per minute, since this seems to be the most fruitful opportunity to increase my cruising speed. Strava does not calculate steps (one point for Runkeeper), but my Fitbit does, and I can use that value in combination with distance and time to calculate cadence and stride length.</p> <p>This is a bit tedious to do manually, so I have created a form where you input your steps, distance and time (in hours, minutes and seconds) and it calculates the rest for you.</p> <script type="text/javascript"> function calculate_running() { var steps = parseInt($('#calc_steps').val()); logit('steps = ' + steps); var distance = parseFloat($('#calc_distance').val()); logit('distance = ' + distance); var distance_metres = distance * 1000; logit('distance_metres = ' + distance_metres); var hours = parseInt($('#calc_hours').val()); logit('hours = ' + hours); var minutes = parseInt($('#calc_minutes').val()); logit('minutes = ' + minutes); var seconds = parseInt($('#calc_seconds').val()); logit('seconds = ' + seconds); var time_hours = hours + minutes/60 + seconds/60/60; logit('time_hours = ' + time_hours); var time_minutes = hours*60 + minutes + seconds/60; logit('time_minutes = ' + time_minutes); var speed = distance/time_hours; logit('speed = ' + speed); var pace = time_minutes / distance; logit('pace = ' + pace); var pace_minutes = Math.floor(pace); logit('pace_minutes = ' + pace_minutes); var pace_seconds = Math.round((pace - pace_minutes)* 60) logit('pace_seconds = ' + pace_seconds); var pace_text = pace_minutes.toString() + ':' + padit(pace_seconds, 2); logit('pace_text = ' + pace_text); var cadence = Math.round(steps / time_minutes); logit('cadence = ' + cadence); var stride_length = (distance_metres / steps).toFixed(2); logit('stride_length = ' + stride_length); var statement = commas(steps).toString() + ' steps for a cadence of ' + cadence.toString() + ' steps/min and a stride length of ' + stride_length.toString() + ' m/step with a speed of ' + speed.toFixed(2) + ' km/h and a pace of ' + pace_text + ' min/km.'; logit('statement = ' + statement); $('#output_distance_m').html(distance_metres); $('#output_time_hours').html(time_hours.toFixed(2)); $('#output_time_minutes').html(time_minutes.toFixed(2)); $('#output_speed').html(speed.toFixed(2)); $('#output_pace').html(pace_text); $('#output_cadence').html(cadence); $('#output_stride_length').html(stride_length); $('#output_statement').html(statement); } function logit(val) { return false; } function padit(val, size) { var s = '00000000' + val; return s.substr(s.length-size); } function commas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } </script> <form> <table style="width: 400px"> <tr><th>Steps</th><td><input name="calc_steps" id="calc_steps" value="8331"></td></tr> <tr><th>Distance (km)</th><td><input name="calc_distance" id="calc_distance" value="9.5"></td></tr> <tr><th>Hours</th><td><input name="calc_hours" id="calc_hours" value="0"></td></tr> <tr><th>Minutes</th><td><input name="calc_minutes" id="calc_minutes" value="52"></td></tr> <tr><th>Seconds</th><td><input name="calc_seconds" id="calc_seconds" value="40"></td></tr> <tr><td colspan="2" style="text-align: center !important"><input type="button" name="calculate" id="calculate" value="Calculate" onclick="calculate_running(); return false" style="width: 90%; height: 2em"></td></tr> <tr><td colspan="2" style="font-weight: bold; text-align: centre !important">Calculations</td><tr> <tr><th>Dist (m)</th><td id="output_distance_m"></td></tr> <tr><th>Time (hours)</td><td id="output_time_hours"></td></tr> <tr><th>Time (mins)</th><td id="output_time_minutes"></td></tr> <tr><th>Speed (km/h)</th><td id="output_speed"></td></tr> <tr><th>Pace (min/km)</th><td id="output_pace"></td></tr> <tr><th>Cadence (steps/min)</th><td id="output_cadence"></td></tr> <tr><th>Stride Length (m)</th><td id="output_stride_length"></td></tr> <tr><td colspan="2" id="output_statement"></td></tr> </table> </form> Ryan McGreal 2 http://quandyfactory.com/blog/211/five+_years_of_running_and_fitness_part_three:_around_the_bay_again 2019-02-01T12:00:00Z Five+ Years of Running and Fitness, Part Three: Around the Bay Again <p><em>I've been trying to write up my five-year summary for several months now, and the analysis seems to keep getting bigger faster than I can finish it. So in an attempt to break the impasse, I'm publishing this review in several parts rather than all at once. This is Part Three of a series that will review of the experiences, challenges, insights, frustrations and successes of the past year.</em></p> <h3>Training for ATB 2018</h3> <p>Last year was my fourth year running the 30 km Around the Bay Road Race, and like my third time, my training was a bit spotty. I missed several training long runs, and in fact I never actually managed to complete a full 30-km training run. The longest runs I did were around 28 km. </p> <p>One particular training run was a disaster. On February 25, 2018, I got to around the halfway point in a 24 km long run and everything went to hell. My calves got sore, my knee tightened up, I got stitches in my side, and my energy just completely tanked. </p> <p>I repeatedly had to stop running and just walk for a while. I slowly shambled home feeling sick to my stomach. When I got home, I was violently ill and then slept for 14 hours. Turns out I was coming down with a rotten bug. </p> <p>Luckily, most of my long runs went better than this one.</p> <h3>Weight-Lifting</h3> <p>However, I have found over the couple of years that I've been able to achieve better running performance with less actual running. I believe a significant factor has been my regular weight-lifting sessions at the fitness centre. </p> <p>The research is clear: weight-lifting improves muscle strength, balance and posture, and makes for faster, stronger running with fewer injuries. I have had great success <a href="/blog/210/five_years_of_running_and_fitness_part_two_sitters_knee_and_hiit">mitigating my knee problem</a> with three days a week of weight-lifting. </p> <p>Look, I'm not a powerlifter hardbody getting ripped or swole or anything like that. I'm just trying to focus on developing and maintaining a more stable core, a stronger lower back, more functional day-to-day strength and a smoother, more efficient running form.</p> <p class="image"> <img src="/static/images/ryan_mcgreal_gym_2018_12_14.jpg" alt="Photo on December 14, 2018" title="Photo on December 14, 2018"><br> Photo on December 14, 2018</p> <h3>Race Day</h3> <p>My goal for ATB 2018 was to finish the race in less than two hours and 50 minutes, my finishing time from 2017. Anything beyond that would be gravy.</p> <p class="image"> <img src="/static/images/atb_2018_starting_line.jpg" alt="Around the Bay 2018 Starting Line" title="Around the Bay 2018 Starting Line"><br> Around the Bay 2018 Starting Line</p> <p>I decided to run without audible updates from my run tracking app and just go by feel, and I seemed to be making good time. Around the halfway mark I managed to catch up to the 2:45 Pace Bunny, so I just tracked him for the rest of the race. </p> <p>For the first ten kilometres, I followed a breathing pattern of inhale four steps, exhale four steps. Every fourth set, I would inhale for five in order to switch the start of the cycle to my opposite foot. (This may seem silly, but as <a href="https://www.runnersworld.com/training/a20822091/running-on-air-breathing-technique/">running coach Budd Coates points out</a>, the evidence suggests that always inhaling from the same foot can lead to imbalance injuries.) Going up hills - the overpasses on Burlington Street/Nikola Tesla Parkway - I shifted to an inhale-for-three, exhale-for-three pattern to get more oxygen.</p> <p>For the second ten kilometres, when my muscles were starting to get a bit tired and needed more oxygen, I switched to an inhale-for-four, exhale-for-three pattern to try and maintain a brisk pace. I kept my speed above 11 km/h but I was starting to feel like I wouldn't be able to maintain it for too much longer without digging into my capital reserves.</p> <p>Sure enough, my pace started to flag during the last ten kilometres, the most difficult part of the course along North Shore Boulevard in Burlington. It contains three famously punishing hills: the long climb up to LaSalle Park, the slightly smaller hill just west of LaSalle Park, and the brutal Valley Inn Road hill coming up from Grindstone Creek. </p> <p class="image"> <img src="/static/images/chart_atb_2018_elevation_change.png" alt="Chart: Around the Bay 2018 Elevation Changes (Image Source: Runkeeper)" title="Chart: Around the Bay 2018 Elevation Changes (Image Source: Runkeeper)"><br> Chart: Around the Bay 2018 Elevation Changes (Image Source: Runkeeper)</p> <p>I was really digging deep by this point but I was determined to keep up with the Pace Bunny, so I bore down to an inhale-for-two, exhale-for-two breathing pattern up the hills, and tried to get back to an inhale-for-four, exhale-for-three pattern coming down off them. </p> <p>By the last few kilometres - all downhill, thankfully, I was feeling gassed. For the kilometre after Valley Inn, my average speed fell to 10.4 km/h. Thankfully, the Pace Bunny was relentlessly upbeat and encouraging, and his optimism was infectious. We were still in good shape to finish in 2:45, despite running the next couple of kilometres in the high tens.</p> <p>As always, I was buoyed and borne along by the encouragement of the thousands of friendly strangers who lined the course, plus beloved family members and friends who were on hand to cheer me on. </p> <h3>Strong Finish</h3> <p>Around kilometre 29, a friend of mine ran out onto the course to pace me for a couple of minutes. He is an extraordinary runner, joyful and absurdly fast, and he gave me some excellent advice: "relax your body, open up your stride and pass ten or twenty people before the finish line." </p> <p>Sure enough, that last kilometre I averaged 11.15 km/h and swept into the finish line feeling strong and confident.</p> <p>In a chart of my average speed for each kilometre of the race, you can see it improve steadily for the first ten km, peter off over the second ten km, and then get increasingly erratic over the last ten km before finishing strong.</p> <p class="image"> <img src="/static/images/chart_atb_speed_per_kilometre_2018.png" alt="Chart: ATB 2018 Speed Per Kilometre" title="Chart: ATB 2018 Speed Per Kilometre"><br> Chart: ATB 2018 Speed Per Kilometre</p> <p>My finishing <em>gun time</em> (from when the race started until I crossed the finish line) was 2:46:33 and my <em>chip time</em> (from when I crossed the starting line until I crossed the finish line) was 2:44:29. That's a new personal record for me, well below my target time, and it shaved more than five minutes off my previous record last year.</p> <table> <caption>Around the Bay Race Results, 2015-2018</caption> <thead> <tr> <th></th> <th>2015</th> <th>2016</th> <th>2017</th> <th>2018</th> </tr> </thead> <tbody> <tr> <td>Bib</td> <td>1237</td> <td>228</td> <td>4296</td> <td>3730</td> </tr> <tr> <td>Guntime</td> <td>3:22:19</td> <td>2:54:45</td> <td>2:53:30</td> <td>2:46:33</td> </tr> <tr> <td>Chiptime</td> <td>3:17:11</td> <td>2:52:32</td> <td>2:50:03</td> <td>2:44:29</td> </tr> <tr> <td>Overall Place</td> <td>4325/5755</td> <td>2254/5259</td> <td>1836/4244</td> <td>1404/3921</td> </tr> <tr> <td>Overall Percentile</td> <td>75%</td> <td>43%</td> <td>43%</td> <td>36%</td> </tr> <tr> <td>Gender Place (M)</td> <td>2534/3053</td> <td>1509/2669</td> <td>1247/2224</td> <td>1032/2193</td> </tr> <tr> <td>Gender Percentile</td> <td>83%</td> <td>57%</td> <td>56%</td> <td>47%</td> </tr> <tr> <td>Age Place (M40-44)</td> <td> 414/495</td> <td>267/443</td> <td>201/327</td> <td>169/341</td> </tr> <tr> <td>Age Percentile</td> <td>84%</td> <td>60%</td> <td>61%</td> <td>50%</td> </tr> </tbody> </table> <p class="image"> <img src="/static/images/chart_atb_completion_time_by_year_2015-2018.png" alt="Chart: ATB Completion Time by Year, 2015-2018" title="Chart: ATB Completion Time by Year, 2015-2018"><br> Chart: ATB Completion Time by Year, 2015-2018</p> <h3>ATB 2019</h3> <p>I've signed up for the ATB 2019 30 km race and started my dedicated training long runs in the beginning of January. I'm determined to get in at least a couple of 30 km training runs this time, and so far my weekend long runs are in the 21-23 km range. </p> <p>I'm aiming for a 24 km long run this weekend, 25.5 km on February 10, 27 km on February 17, 28.5 km on February 24, then a couple of 30 km runs on March 3 and 10, with two weeks of tapering on March 17 and 24 and the race itself on March 31.</p> <p>On January 14, 2019 I bought a new pair of shoes. As always, I went with Mizuno Wave Riders, general-purpose neutral workhorse trainers that feel like they were custom-made specifically for my feet.</p> <p class="image"> <img src="/static/images/new_shoes_2019_01_14.jpg" alt="New Shoes, January 14, 2019" title="New Shoes, January 14, 2019"><br> New Shoes, January 14, 2019</p> <p>My only quibble with these shoes is that they don't seem to be quite as durable as previous versions of the shoe. I generally retire my shoes from running after 800 km and turn them into walking shoes, but the shoes that this pair replaced are already starting to tear in the mesh fabric around the toe box.</p> <h3>Winter Running</h3> <p>The past couple of winters I have became a bit wimpy about running outside in bad weather. This might have something to do with finally having access to dreadmills at the gym. But this week, with the polar vortex hanging over North America and temperatures dropping down to -25 Celsius, I've been spending more time on <a href="/blog/210/five_years_of_running_and_fitness_part_two_sitters_knee_and_hiit">High Intensity Interval Training</a> indoors rather than long, painful runs outside.</p> <p>That said, here's my general guide for figuring out how to dress based on the temperature:</p> <table> <caption>Running Clothes by Temperature</caption> <thead> <tr> <th>Temp (Celsius)</th> <th>Top</th> <th>Bottom</th> <th>Extra</th> </tr> </thead> <tbody> <tr> <td>Above 12</td> <td>t-shirt</td> <td>shorts</td> <td></td> </tr> <tr> <td>8 to 12</td> <td>long sleeve shirt</td> <td>shorts</td> <td></td> </tr> <tr> <td>3 to 8</td> <td>t-shirt and long sleeve shirt</td> <td>shorts</td> <td></td> </tr> <tr> <td>-1 to 3</td> <td>hoodie and long sleeve shirt</td> <td>shorts</td> <td>gloves</td> </tr> <tr> <td>-4 to -1</td> <td>winter shell and long sleeve shirt</td> <td>shorts</td> <td>gloves and hat</td> </tr> <tr> <td>Below -4</td> <td>winter shell and long sleeve shirt</td> <td>leggings</td> <td>gloves, hat, scarf</td> </tr> </tbody> </table> <p>The hardest part is pushing myself out the door. The first five minutes are chilly, then I warm up between five and ten minutes and if I've dressed properly, I feel comfortable the rest of the run. </p> <p>There are other ways to tweak my temperature. If I'm getting too warm, I can pull down the zipper on my coat, take off my hat and/or gloves, roll up my sleeves, and ease off the pace to produce less body heat. If I'm a bit too cold, I can put my had and glove back on, pull my zipper back up, and run harder to produce more body heat. </p> <p>There's something really fun about getting to the end of a hard run on a really cold day, because steam pours off my body. As my friend Adrian put it a few years ago, "I feel like a wizard!"</p> Ryan McGreal 2 http://quandyfactory.com/blog/210/five+_years_of_running_and_fitness_part_two:_sitters_knee_and_hiit 2019-01-31T12:00:00Z Five+ Years of Running and Fitness, Part Two: Sitter's Knee and HIIT <p><em>I've been trying to write up my five-year summary for several months now, and the analysis seems to keep getting bigger faster than I can finish it. So in an attempt to break the impasse, I'm publishing this review in several parts rather than all at once. This is Part Two of a series that will review of the experiences, challenges, insights, frustrations and successes of the past year.</em></p> <h3>Knee Trouble</h3> <p>Before I started running, I had trouble with my right knee. It would click painfully on stairs and I couldn't squat deeply. After I started running, I actually found that the problems mostly went away. It would still click on stairs, but not painfully. </p> <p>In some ways, my knee became the canary in the coal mine: for example, it would start grumbling once my shoes passed around 800 kilometres of use or when I was running with poor form, for example when I got tired.</p> <p>I started having more trouble with it during my training for <a href="/blog/183/my_first_marathon_or_a_supposedly_fun_thing_i_wont_do_again_until_ive_had_time_to_forget_how_gruelling_it_was">my first marathon</a> when my weekly distances crept past 60 kilometres. Fortunately, I've been able to get the situation under control and now rarely experience any pain.</p> <h3>Sitter's Knee</h3> <p>So-called runner's knee - the medical name is <em>patellofemoral pain syndrome</em> or PFPS - is something of a blanket term for inflammation and pain where the kneecap sits on the thigh bone. </p> <p>While conventional wisdom assumes it's caused by running (hence the nickname), the fact is that running merely triggers the symptoms - especially after significantly ramping up distance and/or intensity to which body is not accustomed. </p> <p>The underlying cause is usually bad running form due to poor musculoskeletal fitness - specifically, tight hamstrings, weak glutes and quadriceps, and poor core strength leading to instability. Without a network of strong, well-functioning muscles throughout the kinetic chain, the knee tends to collapse inward during impact, leading to poor tracking of the kneecap and irritation of the cartilage that holds it in place.</p> <p>These underlying muscular factors, in turn, are primarily caused by extended sitting, which leaves the hamstrings too tight and the quadriceps too weak to support good running form. (This is just one of the many reasons <a href="https://www.washingtonpost.com/apps/g/page/national/the-health-hazards-of-sitting/750/">extended sitting is extremely bad for your health</a>.) </p> <p>This condition should really be called <em>sitter's knee</em>, not runner's knee!</p> <p>Before I started running, I spent a decade and a half sitting all day at work (I'm a software programmer). In late 2014, after attending a health conference and learning more about the dangers of sitting, I transitioned to a standing desk. It took a month to get used to it and tweak the ergonomics, but I never looked back. Now I work upright rather than sitting, and in addition I try to keep moving as much as possible while I work.</p> <p>When I analyzed my running form during and after my marathon training, I noticed that when I strike the ground with my right foot, my right hip would dip a bit, causing my right knee to buckle slightly inward. That, in turn, caused my kneecap to move off-track, causing irritation and soreness.</p> <h3>Core Strength Needed</h3> <p>It seemed to me that I would get some real benefit from focusing on strengthening my core, glutes and thigh muscles to improve the tracking of my knee.</p> <p>In June of 2017, I took the logical next step and joined a fitness centre: <a href="https://mcmasterinnovationpark.ca/fitness-facility">McMaster Innovation Park Fitness Facility</a>, managed by the wonderful fitness trainer Maureen Graszat. I generally work out three times a week, focusing on fundamental movements and core strength: bicep curls, bent rows, squats, deadlifts, bench presses, shoulder presses, bench flyes, lunges, planks and so on.</p> <p>As I've gradually gotten stronger, I have found that my knee no longer troubles me. In addition, my running economy and form have steadily improved: I find I can run farther and faster with less perceived effort.</p> <h3>High-Intensity Interval Training</h3> <p>As my knee has gotten stronger and more reliable, another change I've made to my running program is that once or twice a week I do a half-hour of high-intensity interval training (HIIT) on the dreadmill at the fitness centre. </p> <p>HIIT involves ramping up to a level of aerobic intensity that repeatedly raises your heart rate up to 80-90 percent of your maximum heart rate (calculated as 220 minus your age) for a short time, then lowers the intensity for a short break before going back to the higher intensity. </p> <p>My maximum heart rate is 220 - 45 = 185, so my HIIT target heart rate is in the 150 to 167 beats per minute range (80-90 percent of 185).</p> <p>Here's a recent run in which I warmed up at around 11.25 km/h (7 mph), then alternated between bouts of 60 seconds at 14.5 km/h (9 mph) and 90 seconds at 12.5 km/h. You can see the oscillation in my heart rate in this chart from Fitbit:</p> <p class="image"> <img src="/static/images/fitbit_heart_rate_hiit.jpg" alt="Chart: heart rate during 30 minute HIIT on the dreadmill" title="Chart: heart rate during 30 minute HIIT on the dreadmill"><br> Chart: heart rate during 30 minute HIIT on the dreadmill</p> <p>An important measure of fitness is something called VO2 Max: it's the maximum rate at which your muscles can utilize oxygen while exercising. While the ultimate peak potential for your VO2 Max is determined by genetics, your performance within that potential range at any given point is largely a function of your fitness training, and HIIT is a highly effective way of increasing your fitness. </p> <p>This stuff really matters: a higher VO2 Max predicts a lower risk of cardiovascular disease, all-risk mortality and specific mortality for certain types of cancer. And of course, a lower VO2 Max predicts a higher risk of all these things. </p> <p>A higher VO2 Max also means running feels easier at any given pace, so there's a practical near-term benefit as well. </p> <p>Fitbit calculates something that it calls a Cardio Fitness Level, which is a rough proxy for VO2 max. According to my profile, I have a Cardio Fitness Level of 46, which the app describes as "Very Good for men your age". </p> <p>Still, knowing that there is an "Excellent" level beyond where I am today makes me feel a competitive drive to improve, hence my willingness to embrace HIIT.</p> Ryan McGreal 2 http://quandyfactory.com/blog/209/five+_years_of_running_and_fitness_part_one:_the_sleep_factor 2019-01-30T12:00:00Z Five+ Years of Running and Fitness, Part One: The Sleep Factor <p><em>I've been trying to write up my five-year summary for several months now, and the analysis seems to keep getting bigger faster than I can finish it. So in an attempt to break the impasse, I'm publishing this review in several parts rather than all at once. This is Part One of a series that will review of the experiences, challenges, insights, frustrations and successes of the past year.</em></p> <p>On July 27, 2013, I went for a run. A short, slow, shambling, on-and-off run punctuated by bouts of walking, to be sure - just 2.71 km at an average speed of 7.78 km/h - but a run nonetheless. It was the inauspicious start to a habit that has continued for more than five and a half years over 881 runs (as of this writing) spanning more than 10,200 kilometres and burning about a million calories.</p> <p>Since I started running, I lost 80 pounds (and then gained 15), took up weight-lifting, dramatically changed my diet and transformed my daily approach to physical activity. The reason I have been successful at making these changes is that I didn't try to do them all at once. Instead, I've made a long series of small, incremental changes that have added up over time.</p> <h3>New Fitness Tracker</h3> <p>From the beginning of my fitness journey, a central component has been the collection and tracking of key measurables. That started with <a href="/running">tracking runs</a> in mid-2013 and expanded to <a href="/stepcounts">daily stepcounts</a> after <a href="/blog/161/a_year_of_walking">I received a pedometer</a> in late 2014. </p> <p>Sadly, my pedometer - a free gift in the swag bag I received at a health conference - finally took that long walk into the sunset late last year. Happily, Santa was good to me and I received a Fitbit Charge 3 for Christmas - and the data has been a bonanza. </p> <p>In addition to tracking daily steps, the Fitbit also tracks my heart rate, automatically logs physical activities and even monitors my sleep stages.</p> <h3>Sleep Tracking</h3> <p>For the first time, I am able to quantify just how poorly I am sleeping - and it's alarming. The best evidence is that we should be getting seven to nine hours of sleep a night and that sleep deprivation, even minor, has a whole host of frightening health implications. To quote a <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5449130/">2017 paper</a> by Medic et al. published in <em>Nature and Science of Sleep</em>:</p> <blockquote> <p>Sleep disruption is associated with increased activity of the sympathetic nervous system and hypothalamic-pituitary-adrenal axis, metabolic effects, changes in circadian rhythms, and proinflammatory responses. In otherwise healthy adults, short-term consequences of sleep disruption include increased stress responsivity, somatic pain, reduced quality of life, emotional distress and mood disorders, and cognitive, memory, and performance deficits. ... Long-term consequences of sleep disruption in otherwise healthy individuals include hypertension, dyslipidemia, cardiovascular disease, weight-related issues, metabolic syndrome, type 2 diabetes mellitus, and colorectal cancer. All-cause mortality is also increased in men with sleep disturbances.</p> </blockquote> <p>Regular adequate sleep is one of the foundations of good health, along with a nutritious diet, regular physical activity and socioeconomic inclusion and stability. Insufficient sleep sabotages all of the benefits of the other determinants of health.</p> <p>How am I doing? Not great. </p> <p>Between December 26 and January 30, I have averaged just seven hours of sleep, which is at the very bottom edge of what is considered adequate. </p> <p>But seven hours is my <em>average</em>, which means I'm getting less than that around half the time. Of the 36 nights I've tracked so far, I have gotten more than seven hours on just 18 nights and less than seven the other 20. I have only gotten the recommended eight hours on four nights, or 11.11 percent of the total. </p> <p class="image"> <img src="/static/images/chart_hours_of_sleep.png" alt="Chart: Hours of Sleep, 2019-12-26 - 2019-01-30" title="Chart: Hours of Sleep, 2019-12-26 - 2019-01-30"><br> Chart: Hours of Sleep, 2019-12-26 - 2019-01-30</p> <h3>Squeezed Three Ways</h3> <p>My good night's sleep is being squeezed in three ways:</p> <ul> <li><p>First of all, my workday starts as 6:00 AM, so I need to wake up around 4:45-5:00 AM. That's unpleasantly early, and after all these years I've never really gotten fully accustomed to it. </p></li> <li><p>Second, at the other end of the day, I'm going to bed too late - usually not until 8:30 or 9:00 PM or even later. This is challenging because I want to spend as much time as I can with my family and that shared time doesn't usually start until we sit down for dinner at around 6:00 PM. </p></li> <li><p>Finally, as my sleep tracker has demonstrated, I'm taking a long time to fall asleep and then waking up several times during the night. </p></li> </ul> <p>Here's a fairly representative snapshot that shows all three constraints: on January 18, 2019, I slept a total of seven hours and 12 minutes, once you subtract the 23 times I woke up during the night, for a total of an hour and three minutes.</p> <p class="image"> <img src="/static/images/chart_sleep_cycles_2019_01_18.png" alt="Chart: Sleep Stages on January 18, 2019" title="Chart: Sleep Stages on January 18, 2019"><br> Chart: Sleep Stages on January 18, 2019</p> <p>I strongly suspect that my poor sleeping habits remain a significant drag on my health and a major suspect in the challenge I've had losing that last ten pounds and taking my fitness to the next level.</p> <p>So one of my major goals this year is to develop and maintain better sleep habits. I look forward to writing more about that in a subsequent post.</p> Ryan McGreal 2