<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>The Slack Pad</title>
    <description>Random thoughts about various things. Neglected blog of James Phillips.
</description>
    <link>http://www.slackpad.com/</link>
    <atom:link href="http://www.slackpad.com/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Wed, 13 Dec 2017 02:40:35 +0000</pubDate>
    <lastBuildDate>Wed, 13 Dec 2017 02:40:35 +0000</lastBuildDate>
    <generator>Jekyll v3.6.2</generator>
    
      <item>
        <title>Seriously, a todo list?</title>
        <description>&lt;h2 id=&quot;origin-story&quot;&gt;Origin Story&lt;/h2&gt;

&lt;p&gt;A while ago a friend set me up for lunch with a person he had met at a mixer. This guy was looking for a developer to partner with to help him build out a small web app. I was a little skeptical because I didn’t know him, and I was even more skeptical as he started pitching me on a todo list app. Surely the world didn’t need another one of these! He was super sincere and passionate, though, so I decided to hear him out.&lt;/p&gt;

&lt;p&gt;He had put a lot of thought into why there are so many todo list apps and came to the conclusion that people start excited about them but since it’s another place you need to look every day they kind of fall out of mind and stop using them. He and his wife had been hacking their Google Calendar as a todo list, adding simple &lt;code class=&quot;highlighter-rouge&quot;&gt;[ ]&lt;/code&gt; check boxes to regular calendar events, and manually dragging them forward if they didn’t get done. My wife does this too, minus the check boxes, so it seemed familiar. I pointed out that Google Calendar already has a built in todo list, but we spent a few minutes playing with it and realized how bad it was (and it’s another place you need to look). His idea for the app was basically something that would move todo events forward if you didn’t mark them off.&lt;/p&gt;

&lt;p&gt;I was interested enough to shake hands and partner up; it seemed like a fun side project.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;tl;dr: if you are curious and want to see the final product, check out &lt;a href=&quot;https://hashtagtodo.appspot.com/&quot;&gt;HashtagTodo&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;h2 id=&quot;building-the-app&quot;&gt;Building the App&lt;/h2&gt;

&lt;p&gt;The basic strategy was to have users authenticate with their Google Account and grant our app offline access to their calendar via OAuth. Whenever they create new calendar events, we’d look for &lt;code class=&quot;highlighter-rouge&quot;&gt;#todo&lt;/code&gt; in the event title, and if we see that, add a &lt;code class=&quot;highlighter-rouge&quot;&gt;[ ]&lt;/code&gt; check box. At midnight for whatever time zone the calendar is in, we’d push any overdue events forward. Users literally type an &lt;code class=&quot;highlighter-rouge&quot;&gt;[ x ]&lt;/code&gt; to check off an event, which is a little cheesy, but if they already live inside their Google Calendar and have it on all their devices, then it’s pretty simple and works everywhere. No app to install and no extra place to check!&lt;/p&gt;

&lt;p&gt;I chose Google App Engine and Python/Flask since I had experience with those and they seemed like a good fit for something integrating with Google Calendar. Surprisingly, I found Google’s native support for OAuth poorly documented and a little tricky to integrate into my Flask app, so I opted for &lt;a href=&quot;https://github.com/peterhudec/authomatic&quot;&gt;Authomatic&lt;/a&gt; which was super easy to use. There’s a magical &lt;code class=&quot;highlighter-rouge&quot;&gt;WerkzeugAdapter&lt;/code&gt; that you can pass your request and response objects into and it will do the OAuth dance for you. If we ever decide to support other calendar providers this will be a good layer to have. Other notable Python libraries are &lt;a href=&quot;http://pytz.sourceforge.net/&quot;&gt;pytz&lt;/a&gt; for dealing with time zones and &lt;a href=&quot;http://crsmithdev.com/arrow/&quot;&gt;Arrow&lt;/a&gt; for humanizing times for our summary lists (eg. “due in 2 days”).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update 2015-09-09 - it looks like Google has released a &lt;a href=&quot;http://oauth2client.readthedocs.org/en/latest/source/oauth2client.flask_util.html&quot;&gt;Flask-compatible OAuth client library&lt;/a&gt;. I’m going to give that a shot.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We talk to the Google Calendar API using Google’s &lt;a href=&quot;https://developers.google.com/api-client-library/python/&quot;&gt;api-client-library&lt;/a&gt; which works super well, but is also super generic. It parses a definition file that’s fetched from Google to build all the request and response objects. This is slick in that a single dependency can make a Python client for any Google API, but the code itself if pretty obtuse. At times I was left wishing there was code specific to the Google Calendar API that I could reference to learn a little more about different request options, such as what format they expect, since Google’s documentation is a little light in some places. It wasn’t a huge problem, but we did have to resort to some experimentation.&lt;/p&gt;

&lt;p&gt;When a user signs up, we scan their list of calendars and then register for push notifications. The push notifications basically say “something on this calendar changed” so we need to scan over their events looking for todos to process. It’s a little unfortunate that we can’t get push notifications for individual events that we care about, so we spend most of our time scanning over calendars for changes that aren’t relevant to our app. This is especially true for users with a lot of business churn on their work calendars.&lt;/p&gt;

&lt;p&gt;Rolling events forward is done using the Google App Engine cron facility, where we set up jobs that run a few minutes after each hour and look for calendars that have just crossed midnight. We then look for uncompleted todo events and push them forward to the next day. You can make a todo at a particular time during the day so you get a reminder, such as putting some things on your lunch break. When we roll them forward we will make them all-day events on the next day, so they show up at the top of the calendar. Another cool thing is you can make recurring todos and they will get check boxes added as they come into the week ahead, and then will start moving forward if they become overdue. A lot of users use these for monthly things they need to do, like remember to pay someone.&lt;/p&gt;

&lt;h2 id=&quot;hashtagtodo&quot;&gt;HashtagTodo&lt;/h2&gt;

&lt;p&gt;We’ve got a small but growing set of users, and some people are totally managing their life with this simple app. My wife and I often drop a &lt;code class=&quot;highlighter-rouge&quot;&gt;#todo&lt;/code&gt; on each other’s calendars, and I use it for all things that I absolutely must not lose track of.&lt;/p&gt;

&lt;p&gt;We hope this app is useful to people and that it continues to be discovered by folks who live by their Google Calendars. Check it out - &lt;a href=&quot;https://hashtagtodo.appspot.com/&quot;&gt;HashtagTodo&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Fri, 14 Aug 2015 00:00:00 +0000</pubDate>
        <link>http://www.slackpad.com/startups/hashtagtodo/programming/2015/08/14/seriously-a-todo-list.html</link>
        <guid isPermaLink="true">http://www.slackpad.com/startups/hashtagtodo/programming/2015/08/14/seriously-a-todo-list.html</guid>
        
        
        <category>startups</category>
        
        <category>hashtagtodo</category>
        
        <category>programming</category>
        
      </item>
    
      <item>
        <title>Off Road Near Highway 395: Buttermilk Country</title>
        <description>&lt;p&gt;The Buttermilk Country drive starts West of Bishop and does a large loop around Grouse Mountain. This was my first tour (#23 from &lt;a href=&quot;http://www.amazon.com/dp/B004RV4GI0/ref=as_sl_pd_tf_lc?tag=slackpadcom-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=B004RV4GI0&amp;amp;adid=1KF5KT3HTVRHK26XXSNN&quot;&gt;Sierra Nevada Byways&lt;/a&gt;) and took just under three hours to complete. Overall the trail was pretty easy, though towards the end there was a very small stream to cross and a few branches that scraped the sides of the truck a bit. The weather was quite gloomy but the views of the Sierras were stunning and there were some interesting features along the way.&lt;/p&gt;

&lt;iframe src=&quot;https://www.google.com/maps/d/u/0/embed?mid=zCZZxrWa0lZk.kJ9q5GM-0_OE&quot; width=&quot;640&quot; height=&quot;480&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;a href=&quot;/assets/iheart395/maps/buttermilk_country.kml&quot;&gt;Download a kml file with a detailed GPS track of the trip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see from my GPS track that I got wayward near the start of the trail and had to backtrack. There were quite a few spurs so navigating this trail was confusing at times. Having to go through a chained livestock gate should have been a clue that I wasn’t headed the right way. There was a similar excursion later on where I ended up completely off the trail and headed up the base of a steep hill. Be careful if you head up that spur as the road was muddy and slippery, and it was difficult to turn around.&lt;/p&gt;

&lt;p&gt;The East-to-West leg at the beginning of the trail was interesting because of the odd rock formations and view of the flats to the north.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/iheart395/img/dino-rock.jpg&quot; alt=&quot;Giant dinosaur rock&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This first leg of the trail was pretty scrubby and the gentle curve obscured the large mountains that I was treated to once I rounded Grouse Mountain and began to head South.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/iheart395/img/butter-view-south.jpg&quot; alt=&quot;View heading South&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The picture here doesn’t do the view justice but there were some amazing vistas back along this leg. At the bottom of the South leg, the trail descended into a stand of trees with a small stream to cross, and then climbed up a steep slope. There was obvious fire damage here (as I would see many times again on this trip), but some poppy plants were moving in and making the view beautiful again.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/iheart395/img/butter-view-north.jpg&quot; alt=&quot;View looking North down the hill&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Continuing on, the trail again descended and rejoined the road I came in on, leading me back to Bishop. There are other trails in this area, but this was the only one I took. After this drive I headed up to Mammoth to camp for the night and explored many more trails to the North up 395.&lt;/p&gt;
</description>
        <pubDate>Fri, 13 Jul 2012 00:00:00 +0000</pubDate>
        <link>http://www.slackpad.com/travel/california/offroad/iheart395/2012/07/13/buttermilk-country.html</link>
        <guid isPermaLink="true">http://www.slackpad.com/travel/california/offroad/iheart395/2012/07/13/buttermilk-country.html</guid>
        
        
        <category>travel</category>
        
        <category>california</category>
        
        <category>offroad</category>
        
        <category>iheart395</category>
        
      </item>
    
  </channel>
</rss>
