Congratulations!

[Valid Atom 1.0] This is a valid Atom 1.0 feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: https://joshdick.net/writing.xml

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <feed xmlns="http://www.w3.org/2005/Atom">
  3.  <title>Josh Dick » Writing</title>
  4.  <subtitle>Thoughts on technology and more from Josh Dick.</subtitle>
  5.  <link rel="self" type="application/atom+xml" href="https://joshdick.net/writing.xml" />
  6.  <link rel="alternate" type="text/html" href="https://joshdick.net/" />
  7.  <id>https://joshdick.net/</id>
  8.  <updated>2024-03-19T04:25:30-04:00</updated>
  9.  <author>
  10.    <name>Josh Dick</name>
  11.    <uri>https://joshdick.net/</uri>
  12.  </author>
  13.  <rights>© 2005-2024, Josh Dick</rights>
  14.  <entry>
  15.    <title>Tabclip: A Web Browser Extension</title>
  16.    <link rel="alternate" type="text/html" href="https://joshdick.net/2018/05/19/tabclip_a_web_browser_extension" />
  17.    <id>tag:joshdick.net,2018:/2018/05/19/tabclip_a_web_browser_extension.html</id>
  18.    <published>2018-05-19T00:00:00Z</published>
  19.    <updated>2018-05-19T00:00:00Z</updated>
  20.    <author>
  21.      <name>Josh Dick</name>
  22.      <uri>https://joshdick.net</uri>
  23.    </author>
  24.    <content type="html" xml:lang="en">
  25.        <![CDATA[<blockquote>Copy browser tabs to (and create browser tabs from) your clipboard.</blockquote><p>A few days ago, I released a new web browser extension for Mozilla Firefox and Google Chrome/Vivaldi called <a href="https://joshdick.github.io/tabclip">tabclip</a> that allows you to copy browser tabs to (or create them from) your clipboard.</p>
  26. <p><img src="/post_assets/2018/05/tabclip_screenshot.png" alt="Tabclip Screenshot"></p>
  27. <p>The &ldquo;Copy&rdquo; button (and associated options) copy tab URLs to your clipboard.</p>
  28. <p>The &ldquo;Paste&rdquo; button attempts to find all URLs that appear in your clipboard, then opens each URL in a new browser tab.</p>
  29. <p>That&rsquo;s it!</p>
  30. <p>Tabclip is heavily inspired by Vincent Paré&rsquo;s <a href="https://chrome.google.com/webstore/detail/copy-all-urls/djdmadneanknadilpjiknlnanaolmbfk">&ldquo;Copy All Urls&rdquo; Chrome extension</a>. I created tabclip because I wanted a similar extension that looked and worked the same in both Chrome and Firefox. Tabclip was written from scratch and shares no code with the &ldquo;Copy All Urls&rdquo; Chrome extension.</p>
  31. <p>You can get tabclip for Firefox <a href="https://addons.mozilla.org/en-US/firefox/addon/tabclip/">here</a> and for Chrome/Vivaldi <a href="https://chrome.google.com/webstore/detail/tabclip/kdmfphcdeckocjmkmkgffgehadjhmkmc">here</a>. Tabclip&rsquo;s source code is available at <a href="https://github.com/joshdick/tabclip">its GitHub page</a>.</p>
  32. ]]>
  33.    </content>
  34.  </entry><entry>
  35.    <title>My Git Prompt for Zsh, Revisited</title>
  36.    <link rel="alternate" type="text/html" href="https://joshdick.net/2017/06/08/my_git_prompt_for_zsh_revisited" />
  37.    <id>tag:joshdick.net,2017:/2017/06/08/my_git_prompt_for_zsh_revisited.html</id>
  38.    <published>2017-06-08T00:00:00Z</published>
  39.    <updated>2017-06-08T00:00:00Z</updated>
  40.    <author>
  41.      <name>Josh Dick</name>
  42.      <uri>https://joshdick.net</uri>
  43.    </author>
  44.    <content type="html" xml:lang="en">
  45.        <![CDATA[<blockquote>An elegant, bird&rsquo;s-eye view of your Git repositories.</blockquote><blockquote>
  46. <p><em>This post is a follow-up to my <a href="/2012/12/30/my_git_prompt_for_zsh.html">previous post</a> about the original version of my <code>zsh</code> Git prompt, which showed Git information on the right-hand side using <code>zsh</code>&rsquo;s <code>RPS1</code> prompt.</em></p>
  47. <p><em><strong>Update on May 30, 2018:</strong> Updated the Git prompt code to be slightly cleaner.</em></p>
  48. </blockquote>
  49. <p>I like seeing useful information about <a href="https://git-scm.com">Git</a> repositories at a glance on the command line, and after using my <a href="/2012/12/30/my_git_prompt_for_zsh.html">previous Git prompt for <code>zsh</code></a> for about 4½ years, I decided it was time for some cosmetic tweaks and code cleanup.</p>
  50. <p>This prompt is functionally the same as the previous one, but has been moved from the right hand side to the left-hand side, and includes different symbols for showing the &ldquo;commits ahead/behind&rdquo; counts.</p>
  51. <p>Like the previous prompt, this prompt:</p>
  52. <ul>
  53. <li>Only appears if your current directory is a Git repository.</li>
  54. <li>Shows number of commits ahead and behind upstream, as applicable.</li>
  55. <li>Shows if a merge is currently taking place.</li>
  56. <li>Shows a &ldquo;traffic light&rdquo; representation of <code>git status</code>:
  57. <ul>
  58. <li>Red (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are untracked changes.</li>
  59. <li>Yellow (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are unstaged changes.</li>
  60. <li>Green (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are staged changes.</li>
  61. </ul>
  62. </li>
  63. </ul>
  64. <p>Here&rsquo;s a contrived example that demonstrates how the prompt works (click on it for a larger version):</p>
  65. <p><!-- raw HTML omitted --><img src="/post_assets/2017/06/git_zsh_prompt.png" alt="Git Prompt for zsh"><!-- raw HTML omitted --></p>
  66. <p>While creating this updated version of my Git prompt, I looked into implementing it using <code>zsh</code>&rsquo;s built-in <a href="http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information"><code>vcs-info</code> mechanism</a>, but attempting to use it only made the code more complicated and cumbersome, so I decided against it.</p>
  67. <p>I use this prompt in combination with the excellent <a href="https://github.com/sickill/git-dude"><code>sickill/git-dude</code> Git commit notifier</a>, which automatically keeps repositories of your choosing up to date, and which will periodically trigger appropriate &ldquo;commits behind&rdquo; counts in the prompt when working with those repositories. This solution works great for my needs, but if you&rsquo;d prefer a <code>zsh</code> Git prompt that can keep repositories up to date on its own, check out <a href="https://github.com/sindresorhus/pure"><code>sindresorhus/pure</code></a>.</p>
  68. <p>Here&rsquo;s the code for the prompt, as of this writing. (If I make any changes to the code in the future, the most up-to-date version will always be available <a href="https://github.com/joshdick/dotfiles/blob/master/zshrc.symlink">in my <code>.zshrc</code></a>.)</p>
  69. <p>You can paste this code directly into your <code>.zshrc</code>, or save it in its own file and source that file in your <code>.zshrc</code>.</p>
  70. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-zsh" data-lang="zsh"><span style="display:flex;"><span>setopt prompt_subst
  71. </span></span><span style="display:flex;"><span>autoload -U colors <span style="color:#f92672">&amp;&amp;</span> colors <span style="color:#75715e"># Enable colors in prompt</span>
  72. </span></span><span style="display:flex;"><span>
  73. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Echoes a username/host string when connected over SSH (empty otherwise)</span>
  74. </span></span><span style="display:flex;"><span>ssh_info<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  75. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">[[</span> <span style="color:#e6db74">&#34;</span>$SSH_CONNECTION<span style="color:#e6db74">&#34;</span> !<span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;&#39;</span> <span style="color:#f92672">]]</span> <span style="color:#f92672">&amp;&amp;</span> echo <span style="color:#e6db74">&#39;%(!.%{$fg[red]%}.%{$fg[yellow]%})%n%{$reset_color%}@%{$fg[green]%}%m%{$reset_color%}:&#39;</span> <span style="color:#f92672">||</span> echo <span style="color:#e6db74">&#39;&#39;</span>
  76. </span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
  77. </span></span><span style="display:flex;"><span>
  78. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Echoes information about Git repository status when inside a Git repository</span>
  79. </span></span><span style="display:flex;"><span>git_info<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  80. </span></span><span style="display:flex;"><span>
  81. </span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Exit if not inside a Git repository</span>
  82. </span></span><span style="display:flex;"><span>  ! git rev-parse --is-inside-work-tree &gt; /dev/null 2&gt;&amp;<span style="color:#ae81ff">1</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#66d9ef">return</span>
  83. </span></span><span style="display:flex;"><span>
  84. </span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Git branch/tag, or name-rev if on detached head</span>
  85. </span></span><span style="display:flex;"><span>  local GIT_LOCATION<span style="color:#f92672">=</span><span style="color:#e6db74">${</span><span style="color:#66d9ef">$(</span>git symbolic-ref -q HEAD <span style="color:#f92672">||</span> git name-rev --name-only --no-undefined --always HEAD<span style="color:#66d9ef">)</span>#(refs/heads/|tags/)<span style="color:#e6db74">}</span>
  86. </span></span><span style="display:flex;"><span>
  87. </span></span><span style="display:flex;"><span>  local AHEAD<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[red]%}⇡NUM%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  88. </span></span><span style="display:flex;"><span>  local BEHIND<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[cyan]%}⇣NUM%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  89. </span></span><span style="display:flex;"><span>  local MERGING<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[magenta]%}⚡︎%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  90. </span></span><span style="display:flex;"><span>  local UNTRACKED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[red]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  91. </span></span><span style="display:flex;"><span>  local MODIFIED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[yellow]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  92. </span></span><span style="display:flex;"><span>  local STAGED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[green]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  93. </span></span><span style="display:flex;"><span>
  94. </span></span><span style="display:flex;"><span>  local -a DIVERGENCES
  95. </span></span><span style="display:flex;"><span>  local -a FLAGS
  96. </span></span><span style="display:flex;"><span>
  97. </span></span><span style="display:flex;"><span>  local NUM_AHEAD<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git log --oneline @<span style="color:#f92672">{</span>u<span style="color:#f92672">}</span>.. 2&gt; /dev/null | wc -l | tr -d <span style="color:#e6db74">&#39; &#39;</span><span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  98. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$NUM_AHEAD<span style="color:#e6db74">&#34;</span> -gt <span style="color:#ae81ff">0</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
  99. </span></span><span style="display:flex;"><span>    DIVERGENCES<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>AHEAD//NUM/$NUM_AHEAD<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  100. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  101. </span></span><span style="display:flex;"><span>
  102. </span></span><span style="display:flex;"><span>  local NUM_BEHIND<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git log --oneline ..@<span style="color:#f92672">{</span>u<span style="color:#f92672">}</span> 2&gt; /dev/null | wc -l | tr -d <span style="color:#e6db74">&#39; &#39;</span><span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  103. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$NUM_BEHIND<span style="color:#e6db74">&#34;</span> -gt <span style="color:#ae81ff">0</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
  104. </span></span><span style="display:flex;"><span>    DIVERGENCES<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>BEHIND//NUM/$NUM_BEHIND<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  105. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  106. </span></span><span style="display:flex;"><span>
  107. </span></span><span style="display:flex;"><span>  local GIT_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git rev-parse --git-dir 2&gt; /dev/null<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  108. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -n $GIT_DIR <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> test -r $GIT_DIR/MERGE_HEAD; <span style="color:#66d9ef">then</span>
  109. </span></span><span style="display:flex;"><span>    FLAGS<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span>$MERGING<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  110. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  111. </span></span><span style="display:flex;"><span>
  112. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[[</span> -n <span style="color:#66d9ef">$(</span>git ls-files --other --exclude-standard 2&gt; /dev/null<span style="color:#66d9ef">)</span> <span style="color:#f92672">]]</span>; <span style="color:#66d9ef">then</span>
  113. </span></span><span style="display:flex;"><span>    FLAGS<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span>$UNTRACKED<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  114. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  115. </span></span><span style="display:flex;"><span>
  116. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> ! git diff --quiet 2&gt; /dev/null; <span style="color:#66d9ef">then</span>
  117. </span></span><span style="display:flex;"><span>    FLAGS<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span>$MODIFIED<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  118. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  119. </span></span><span style="display:flex;"><span>
  120. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> ! git diff --cached --quiet 2&gt; /dev/null; <span style="color:#66d9ef">then</span>
  121. </span></span><span style="display:flex;"><span>    FLAGS<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span>$STAGED<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  122. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  123. </span></span><span style="display:flex;"><span>
  124. </span></span><span style="display:flex;"><span>  local -a GIT_INFO
  125. </span></span><span style="display:flex;"><span>  GIT_INFO<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;\033[38;5;15m±&#34;</span> <span style="color:#f92672">)</span>
  126. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> -n <span style="color:#e6db74">&#34;</span>$GIT_STATUS<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> GIT_INFO<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span>$GIT_STATUS<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  127. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">[[</span> <span style="color:#e6db74">${#</span>DIVERGENCES[@]<span style="color:#e6db74">}</span> -ne <span style="color:#ae81ff">0</span> <span style="color:#f92672">]]</span> <span style="color:#f92672">&amp;&amp;</span> GIT_INFO<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>(j::)DIVERGENCES<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  128. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">[[</span> <span style="color:#e6db74">${#</span>FLAGS[@]<span style="color:#e6db74">}</span> -ne <span style="color:#ae81ff">0</span> <span style="color:#f92672">]]</span> <span style="color:#f92672">&amp;&amp;</span> GIT_INFO<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>(j::)FLAGS<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#f92672">)</span>
  129. </span></span><span style="display:flex;"><span>  GIT_INFO<span style="color:#f92672">+=(</span> <span style="color:#e6db74">&#34;\033[38;5;15m</span>$GIT_LOCATION<span style="color:#e6db74">%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span> <span style="color:#f92672">)</span>
  130. </span></span><span style="display:flex;"><span>  echo <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>(j: :)GIT_INFO<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
  131. </span></span><span style="display:flex;"><span>
  132. </span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
  133. </span></span><span style="display:flex;"><span>
  134. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Use ❯ as the non-root prompt character; # for root</span>
  135. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Change the prompt character color if the last command had a nonzero exit code</span>
  136. </span></span><span style="display:flex;"><span>PS1<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;
  137. </span></span></span><span style="display:flex;"><span><span style="color:#e6db74">$(ssh_info)%{$fg[magenta]%}%~%u $(git_info)
  138. </span></span></span><span style="display:flex;"><span><span style="color:#e6db74">%(?.%{$fg[blue]%}.%{$fg[red]%})%(!.#.❯)%{$reset_color%} &#39;</span>
  139. </span></span></code></pre></div><p>As with the <a href="/2012/12/30/my_git_prompt_for_zsh.html">original</a> version of this prompt, I hope this prompt is as useful and as big of a time saver for you as it is for me, and I&rsquo;d love to hear your thoughts about it!</p>
  140. ]]>
  141.    </content>
  142.  </entry><entry>
  143.    <title>Controlling Whitespace and Empty Lines in Jekyll</title>
  144.    <link rel="alternate" type="text/html" href="https://joshdick.net/2017/05/29/controlling_whitespace_and_empty_lines_in_jekyll" />
  145.    <id>tag:joshdick.net,2017:/2017/05/29/controlling_whitespace_and_empty_lines_in_jekyll.html</id>
  146.    <published>2017-05-29T00:00:00Z</published>
  147.    <updated>2017-05-29T00:00:00Z</updated>
  148.    <author>
  149.      <name>Josh Dick</name>
  150.      <uri>https://joshdick.net</uri>
  151.    </author>
  152.    <content type="html" xml:lang="en">
  153.        <![CDATA[<blockquote>Jekyll-generated code can be pretty, too.</blockquote><blockquote>
  154. <p><strong>NOTE: This post will be obsolete soon.</strong></p>
  155. <p><a href="https://shopify.github.io/liquid/basics/whitespace/">Proper whitespace control</a> was <a href="https://github.com/Shopify/liquid-c/pull/30">added</a> to Liquid 4. Liquid 4 has now been <a href="https://github.com/jekyll/jekyll/pull/4362">added to Jekyll</a>, though it&rsquo;s not part of an official Jekyll release (yet.)</p>
  156. <p>This post applies to Jekyll 3.4.3 and earlier, which use earlier versions of Liquid.</p>
  157. <p><em>May 29, 2017</em></p>
  158. </blockquote>
  159. <h2 id="the-problem">The Problem</h2>
  160. <p>This blog is powered by the <a href="https://jekyllrb.com/">Jekyll</a> static site generator, which internally uses <a href="https://shopify.github.io/liquid/">Liquid Markup</a> for templating.</p>
  161. <p>I noticed that Jekyll-generated output contains unwanted empty lines when there are corresponding Liquid template lines in the source code that wouldn&rsquo;t otherwise produce visible output.</p>
  162. <p>This example from <a href="https://shopify.github.io/liquid/basics/whitespace/">Liquid&rsquo;s whitespace control documentation</a> illustrates the problem:</p>
  163. <p><strong>Liquid Input</strong></p>
  164. <pre tabindex="0"><code class="language-liquid" data-lang="liquid">{% assign username = &#34;John G. Chalmers-Smith&#34; %}
  165. {% if username and username.size &gt; 10 %}
  166.  Wow, {{ username }}, you have a long name!
  167. {% else %}
  168.  Hello there!
  169. {% endif %}
  170. </code></pre><p><strong>Generated Output</strong></p>
  171. <pre tabindex="0"><code>
  172.  
  173. Wow, John G. Chalmers-Smith, you have a long name!
  174. </code></pre><p>The empty lines are undesirable since they are unnecessary and they make the generated output uglier.</p>
  175. <h2 id="the-solution">The Solution</h2>
  176. <p>Here&rsquo;s my solution for removing empty lines from Jekyll-generated code.</p>
  177. <ol>
  178. <li>Add the following Jekyll plugin by creating a file named <code>_plugins/regex_filter.rb</code> with the following contents:</li>
  179. </ol>
  180. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ruby" data-lang="ruby"><span style="display:flex;"><span><span style="color:#75715e"># https://stackoverflow.com/a/25802375/278810</span>
  181. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">module</span> Jekyll
  182. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">module</span> RegexFilter
  183. </span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">replace_regex</span>(input, reg_str, repl_str)
  184. </span></span><span style="display:flex;"><span>      re <span style="color:#f92672">=</span> <span style="color:#66d9ef">Regexp</span><span style="color:#f92672">.</span>new reg_str
  185. </span></span><span style="display:flex;"><span>
  186. </span></span><span style="display:flex;"><span>      <span style="color:#75715e"># This will be returned</span>
  187. </span></span><span style="display:flex;"><span>      input<span style="color:#f92672">.</span>gsub re, repl_str
  188. </span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">end</span>
  189. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">end</span>
  190. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">end</span>
  191. </span></span><span style="display:flex;"><span>
  192. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">Liquid</span><span style="color:#f92672">::</span><span style="color:#66d9ef">Template</span><span style="color:#f92672">.</span>register_filter(<span style="color:#66d9ef">Jekyll</span><span style="color:#f92672">::</span><span style="color:#66d9ef">RegexFilter</span>)
  193. </span></span></code></pre></div><ol start="2">
  194. <li>Use the following pattern in your Liquid templates:</li>
  195. </ol>
  196. <pre tabindex="0"><code class="language-liquid" data-lang="liquid">{% capture output %}
  197. Content starts here
  198. Here are lines with more content
  199. {% if false %}This generates a blank line that will be stripped from the output{% endif %}
  200. Content ends here
  201. {% endcapture %}{{ output | replace_regex: &#39;^\s*$\n&#39;, &#39;&#39;}}
  202. </code></pre><ol start="3">
  203. <li>That&rsquo;s it!</li>
  204. </ol>
  205. <p>The idea is that a block of template-generated output is captured within the template itself, then fed to a custom Liquid filter (the Jekyll plugin) that removes all empty lines using a regular expression.</p>
  206. <p>The <code>{% raw %}{% endcapture %}{% endraw %}</code> and <code>{% raw %}{% output %}{% endraw %}</code> Liquid tags appear on the same line to prevent an empty line from appearing at the top of the generated output.</p>
  207. <p>You can chain multiple invocations of the <code>replace_regex</code> filter together if you want to perform multiple distinct whitespace transformations.</p>
  208. <p>This is a simple idea, but I think it helps make Jekyll-generated code more pleasant to look at.</p>
  209. ]]>
  210.    </content>
  211.  </entry><entry>
  212.    <title>Understanding iOS Universal Links</title>
  213.    <link rel="alternate" type="text/html" href="https://joshdick.net/2017/01/08/understanding_ios_universal_links" />
  214.    <id>tag:joshdick.net,2017:/2017/01/08/understanding_ios_universal_links.html</id>
  215.    <published>2017-01-08T00:00:00Z</published>
  216.    <updated>2017-01-08T00:00:00Z</updated>
  217.    <author>
  218.      <name>Josh Dick</name>
  219.      <uri>https://joshdick.net</uri>
  220.    </author>
  221.    <content type="html" xml:lang="en">
  222.        <![CDATA[<blockquote>When &ldquo;Open In App&rdquo; stubbornly refuses to keep its promise.</blockquote><p><a href="https://developer.apple.com/ios/universal-links/">Universal Links</a> first appeared in iOS 9. According to Apple&rsquo;s <a href="https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html">Supporting Universal Links</a> document:</p>
  223. <blockquote>
  224. <p>When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn&rsquo;t installed, tapping a link to your website opens your website in Safari.</p>
  225. </blockquote>
  226. <p>This is a great idea in principle, since one URL can serve two purposes without needing to use custom URL schemes, but Universal links were not working as advertised for me and I figured out why. If you are having problems getting Universal links to behave as expected, I hope this article can help.</p>
  227. <h2 id="the-problem">The Problem</h2>
  228. <h3 id="open-in-app-opens-an-apps-app-store-page-instead-of-the-app">&ldquo;Open In App&rdquo; Opens an app&rsquo;s App Store page instead of the app</h3>
  229. <p>I use <a href="http://imgur.com">imgur</a> and have its associated app installed on my phone, but I noticed that the &ldquo;Open In App&rdquo; buttons that appear on its mobile site (highlighted below) all loaded the App Store page for the imgur app instead of loading the content inside the imgur app as the buttons claimed they would.</p>
  230. <p><img src="/post_assets/2017/01/imgur_open_in_app_buttons.png" alt="imgur&rsquo;s &ldquo;Open in App&rdquo; buttons"></p>
  231. <p><img src="/post_assets/2017/01/imgur_app_store_page.png" alt="imgur&rsquo;s App Store page"></p>
  232. <p>I figured there was some glitch with the buttons that was mistakenly redirecting me to the App Store. Imgur&rsquo;s App Store page showed the &ldquo;Open&rdquo; button that normally appears when you look at an App Store page for an installed app, so for a while it never occurred to me to press the button since I figured it would just open the app to its default state, just like it does when manually viewing its App Store page by searching for it in the App Store.</p>
  233. <p>I was wrong.</p>
  234. <p>It turns out that <strong>tapping the Open button on an app&rsquo;s App Store page after being redirected to it by tapping a Universal Link will open the linked content in-app, rather than the default/front page of the app.</strong></p>
  235. <p>There is no visual indication that App Store page &ldquo;Open&rdquo; buttons have different behaviors when being redirected from a Universal Link versus browsing the App Store manually, even though this is clearly the case.</p>
  236. <p>Regardless, I expected &ldquo;Open In App&rdquo; to actually load the linked content in-app and not to add an extra step of loading an app&rsquo;s App Store page.</p>
  237. <h2 id="the-realization">The Realization</h2>
  238. <p>After doing some Internet digging, bullet point 4 of <a href="http://stackoverflow.com/a/32751734/278810">this StackOverflow answer</a> shed some light on the situation.</p>
  239. <p>First, some terminology: I will refer to a Universal Link as <strong>enabled</strong> if tapping it causes content to load in-app, and <strong>disabled</strong> if tapping it causes content to load in a web page or causes an App Store page to open.</p>
  240. <p>It turns out that different URL paths under a single domain name can be independently set to have their corresponding Universal Link behavior be enabled/disabled depending on how the developer configured them (see the &ldquo;Creating and Uploading the Association File&rdquo; section of Apple&rsquo;s <a href="https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html">Supporting Universal Links</a> document), and that <strong>the per-Universal Link setting stays in effect until it is changed again</strong>.</p>
  241. <p>This means that the instructions below may need to be repeated multiple times for a single site.</p>
  242. <p>Another factor that adds to the confusion is that there is no way to tell whether a given Universal Link is enabled/disabled other than tapping it to see what its behavior currently is.</p>
  243. <h2 id="the-solution">The Solution</h2>
  244. <h3 id="enabling-a-universal-link">Enabling a Universal Link</h3>
  245. <p>If tapping a Universal Link currently opens a web or App Store page as described above but you want the link to cause content to load in-app, that means the Universal Link is currently disabled. Here&rsquo;s how to enable it:</p>
  246. <ol>
  247. <li>
  248. <p>Try pulling down/scrolling up on the web site when the page view is already scrolled all the way to the top to reveal an <code>Open in the [App Name] App</code> banner as pictured below:</p>
  249. <p><img src="/post_assets/2017/01/imgur_open_in_app_banner.png" alt="imgur&rsquo;s App Store page"></p>
  250. <p>Tapping the banner will enable the Universal Link and cause the content to load in-app.</p>
  251. </li>
  252. <li>
  253. <p>If no banner appears as shown above, tap and hold on the Universal Link until a dialog with buttons appears. If you scroll through the buttons, one should say <code>Open in &quot;[App Name]&quot;</code> as pictured below:</p>
  254. <p><img src="/post_assets/2017/01/imgur_open_in_app_button.png" alt="imgur&rsquo;s App Store page"></p>
  255. <p>Tapping the <code>Open in &quot;[App Name]&quot;</code> button will enable the Universal Link and cause the content to load in-app.</p>
  256. </li>
  257. </ol>
  258. <p>Once the Universal Link is enabled (content loads in-app), it will <strong>always load in-app in the future</strong> unless you [re]disable the Universal Link as described below.</p>
  259. <p>Note that when tapping a disabled Universal Link causes a redirection to an app&rsquo;s App Store page, tapping the &ldquo;Open&rdquo; button on that page <strong>will cause content to load in-app that one time, and will not enable that Universal Link for future use as described above.</strong></p>
  260. <h3 id="disabling-a-universal-link">Disabling a Universal Link</h3>
  261. <p>If tapping a Universal Link currently causes content content to load in-app but you want the link to open a web (or App Store) page, that means the Universal Link is currently enabled. Here&rsquo;s how to disable it:</p>
  262. <p>When content has loaded in-app after tapping a Universal Link, you should see some text at the very top-right of the screen in the iOS status bar with the domain name of the page whose Universal Link redirected you to that app, as pictured below:</p>
  263. <p><img src="/post_assets/2017/01/imgur_status_bar_link.png" alt="imgur&rsquo;s App Store page"></p>
  264. <p>Tapping that text will cause the content to open in  a web (or App Store) page and will disable the Universal Link that opened the app.</p>
  265. <p>Once the Universal Link is disabled (content doesn&rsquo;t load in-app), content will <strong>never load in-app in the future</strong> unless you [re]enable the Universal Link as described above.</p>
  266. <p>If you want to view content from an enabled Universal Link on the web after its content loads in-app just one time/without disabling the Universal Link entirely, <strong>don&rsquo;t tap the Status Bar text</strong>; instead, just switch back to your web browser.</p>
  267. <h3 id="a-note-on-app-store-page-redirection">A Note on App Store Page Redirection</h3>
  268. <p>The behavior of disabled Universal Links causing redirections to an App Store page instead of loading content in a web page appears to be web site-specific.</p>
  269. <p>In the case of my imgur example, the App Store redirection seems to be functionality that imgur explicitly implemented to try to steer users towards using their app instead of their web site, since tapping a disabled Universal Link on imgur&rsquo;s web site does appear to load another page on the web site for a split second before redirecting to imgur&rsquo;s App Store page. In other words, the Universal Link correctly opens imgur&rsquo;s web site as expected, which itself then redirects to imgur&rsquo;s App Store page (where the &ldquo;Open&rdquo; button would cause the content to load in-app one time as described above.) It&rsquo;s possible that other sites would load web content in a web page as expected when tapping a disabled Universal Link, rather than redirecting users to an App Store page as is the case for imgur.</p>
  270. <h2 id="conclusion">Conclusion</h2>
  271. <p>The mechanisms built in to iOS for enabling and disabling Universal Links are difficult to understand, and the fact that settings are sticky/permanent and can independently vary across given Universal Links under a single domain is not made apparent whatsoever by the UIs iOS provides around this feature.</p>
  272. <p>This confusion is compounded when developers implement behavior that causes web sites to open App Store pages when tapping disabled Universal Links (as imgur seems to have done), causing content not to open in a web view as expected, despite the fact that the Universal Link is disabled.</p>
  273. <p>&ldquo;Open in App&rdquo; links behaving differently than I expected was a large source of frustration for me when browsing the web on iOS. Given how confusing this issue was to understand, solve, and then write about, I hope this article was helpful.</p>
  274. ]]>
  275.    </content>
  276.  </entry><entry>
  277.    <title>An Event Apart Boston 2015</title>
  278.    <link rel="alternate" type="text/html" href="https://joshdick.net/2015/06/28/an_event_apart_boston_2015" />
  279.    <id>tag:joshdick.net,2015:/2015/06/28/an_event_apart_boston_2015.html</id>
  280.    <published>2015-06-28T00:00:00Z</published>
  281.    <updated>2015-06-28T00:00:00Z</updated>
  282.    <author>
  283.      <name>Josh Dick</name>
  284.      <uri>https://joshdick.net</uri>
  285.    </author>
  286.    <content type="html" xml:lang="en">
  287.        <![CDATA[<blockquote>My notes from An Event Apart, &ldquo;the design conference for people who make websites&rdquo;.</blockquote><p><img src="/post_assets/2015/06/aea_boston_2015_bacon_cupcake.jpg" alt="Bacon Cupcake"></p>
  288. <h1 id="introduction">Introduction</h1>
  289. <p>I had the privilege of attending An Event Apart, &ldquo;the design conference for people who make websites&rdquo;, for the fourth time. My notes from <a href="http://aneventapart.com/event/boston-2015">An Event Apart Boston 2015</a> follow this introduction. The notes are grouped by talk, in the order that each talk happened at the conference.</p>
  290. <p>If you&rsquo;re interested, my notes from An Event Apart Boston <a href="/2012/08/19/an_event_apart_boston_2012.html">2014</a> are also available.</p>
  291. <h1 id="day-1-5112015">Day 1: 5/11/2015</h1>
  292. <h2 id="jeffrey-zeldman---the-fault-dear-brutus-or-career-advice-from-a-cranky-old-man-zeldmancomhttpwwwzeldmancom-bull-zeldmanhttpstwittercomzeldman">Jeffrey Zeldman - The Fault, Dear Brutus (or: Career Advice From a Cranky Old Man) (<a href="http://www.zeldman.com">zeldman.com</a> • <a href="https://twitter.com/zeldman">@zeldman</a>)</h2>
  293. <ul>
  294. <li>&ldquo;When I get stuck in a rut, I decorate it.&rdquo;</li>
  295. <li>Work never sells itself. You need a strategy to sell.</li>
  296. <li>&ldquo;Every client wants something nobody&rsquo;s done before that has worked at least three times for other people.&rdquo;</li>
  297. <li>In big companies, politics trumps work.</li>
  298. <li>Attitude trumps work in most companies. Being indignant is not a good career move; attitude is everything.</li>
  299. <li>First impressions are forever.</li>
  300. <li>You are what stands between you and success: &ldquo;We have met the enemy and he is us.&rdquo; -Pogo</li>
  301. <li>Dare to speak. Unlock your inner voice! (Blogging, <a href="https://www.dribbble.com/">Dribbble</a>, <a href="https://www.behance.net/">Behance</a>, <a href="https://github.com">GitHub</a>, <a href="http://codepen.io/">Codepen</a>, etc&hellip;) Blogs and side projects can show how you think and what you do, even if your regular work can&rsquo;t (or you&rsquo;re not allowed to share your regular work.)</li>
  302. <li>&ldquo;When you pick a typeface, your design is halfway done.&rdquo;</li>
  303. <li>Don&rsquo;t wait for someone to hand you your dream job or project &ndash; make your own.</li>
  304. </ul>
  305. <hr>
  306. <h2 id="jon-hicks---icon-design-process-zeldmancomhttphicksdesigncouk-bull-hicksdesignhttpstwittercomhicksdesign">Jon Hicks - Icon Design Process (<a href="http://hicksdesign.co.uk">zeldman.com</a> • <a href="https://twitter.com/hicksdesign">@hicksdesign</a>)</h2>
  307. <ul>
  308. <li>Never use color alone to signify meaning.</li>
  309. <li>Why make your own icons instead of using a royalty-free icon set?
  310. <ul>
  311. <li>Not the right size</li>
  312. <li>Not the right style</li>
  313. <li>Too many &lsquo;spare&rsquo; icons</li>
  314. <li>Not the right icons (for a specialized application, like GitHub)</li>
  315. </ul>
  316. </li>
  317. <li>There are two main types of icons: iconic and symbolic. Iconic icons resemble real things; symbolic icons don&rsquo;t (their meaning is learned.)</li>
  318. <li>Iconic icons are easier/faster to recognize than symbolic icons.</li>
  319. <li>Embrace conventions! Don&rsquo;t use a welcome mat icon to represent &ldquo;home&rdquo;.</li>
  320. <li><a href="https://thenounproject.com/">The Noun Project</a></li>
  321. <li>Research local knowledge: A piggy bank, a thumbs up, and an owl have different meanings for different cultures.</li>
  322. <li>It&rsquo;s possible to be <em>too</em> simple: Icons for a padlock, a shopping bag, and a 10-ton weight can look more or less identical in the absence of context (text labels) or extra visual details.</li>
  323. <li>Whatever you use, decide:
  324. <ul>
  325. <li>Size(s)</li>
  326. <li>Style</li>
  327. <li>Final Export Format (SVG)</li>
  328. </ul>
  329. </li>
  330. <li>Work on all icons together; use a grid to size/align/balance all icons.</li>
  331. <li>Antialiasing can get in the way sometimes; an odd-number-sized grid can help with this.</li>
  332. <li>Optimize SVG files with <a href="https://github.com/svg/svgo">svgo</a></li>
  333. <li>Icon fonts vs. SVG:
  334. <ul>
  335. <li>Why use icon fonts?
  336. <ul>
  337. <li>Scalable
</li>
  338. <li>Small files</li>
  339. <li>Easily styled with CSS No sprites</li>
  340. <li>Supported in IE4+!</li>
  341. </ul>
  342. </li>
  343. <li>Why not?
  344. <ul>
  345. <li>Fiddly process</li>
  346. <li>No meaning</li>
  347. <li>Only monochrome</li>
  348. <li>No font = no joy</li>
  349. <li>Rendering Inconsistencies</li>
  350. <li>No meaning?</li>
  351. </ul>
  352. </li>
  353. </ul>
  354. </li>
  355. <li><a href="http://www.grumpicon.com/">Grumpicon</a>: Generate cross-browser iconsets from SVG, with appropriate fallbacks.</li>
  356. <li>SVG elements can reference each other, which allows a single SVG path to be reused and thus drawn with different CSS styles/sizes/etc. without duplicating the path.</li>
  357. </ul>
  358. <hr>
  359. <h2 id="sarah-parmenter---designing-for-social-behavior-sazzycoukhttpwwwsazzycouk-bull-sazzyhttpstwittercomsazzy">Sarah Parmenter - Designing for Social Behavior (<a href="http://www.sazzy.co.uk/">sazzy.co.uk</a> • <a href="https://twitter.com/sazzy">@sazzy</a>)</h2>
  360. <ul>
  361. <li>&ldquo;Whenever I hear the phrase &lsquo;Social Media&rsquo;, I think &lsquo;Social Medi<!-- raw HTML omitted -->blah<!-- raw HTML omitted -->&rsquo; instead.&rdquo;</li>
  362. <li>Social media is a tool to make <em>something</em> happen.</li>
  363. <li>An effective social media campaign is based on the psychology of social behaviors, <em>not</em> current technology. &ndash;<a href="http://mprcenter.org/blog/2013/01/how-obama-won-the-social-media-battle-in-the-2012-presidential-campaign/">Media Psychology Research Center</a></li>
  364. <li>The basic social ecosystem (your persona and tone of voice) includes 4 channels:
  365. <ul>
  366. <li>Publishing channels</li>
  367. <li>Aspirational/inspirational</li>
  368. <li>Support channels</li>
  369. <li>Follow up channels</li>
  370. </ul>
  371. </li>
  372. <li>To survive, a [social] mobile app must have razor-sharp focus on doing just one thing.</li>
  373. <li>With Facebook advertising, <strong>you</strong> are the product: You need to pay to access the followers that you&rsquo;ve worked to build up.</li>
  374. <li>What people use &ldquo;liking&rdquo; for:
  375. <ul>
  376. <li>Acknowledging that someone has seen/read something without explicitly leaving a comment</li>
  377. <li>Using as a &ldquo;read&rdquo; flag, like e-mail</li>
  378. </ul>
  379. </li>
  380. <li>Why do people comment on a photo that already has 129,000 previous comments? Tribe behavior. It&rsquo;s like shouting at a sports event. #aeabos &ndash;<a href="https://twitter.com/zeldman/status/597795278561869825">@zeldman</a></li>
  381. <li>Tribe mentality is a key ingredient to both online and offline design.</li>
  382. <li>Give anyone long enough, and they&rsquo;ll work out how to game the system.</li>
  383. <li>Social media calls for authenticity: it cannot be faked.</li>
  384. <li>The lightbulb moment: Don&rsquo;t do the safe/expected thing, be prepared to have difficult conversations. If you can&rsquo;t, it will limit your ability to do good work.</li>
  385. </ul>
  386. <hr>
  387. <h2 id="josh-clark---magical-ux-and-the-internet-of-things-globalmoxiecomhttpglobalmoxiecom-bull-globalmoxiehttpstwittercomglobalmoxie">Josh Clark - Magical UX and the Internet of Things (<a href="http://globalmoxie.com">globalmoxie.com</a> • <a href="https://twitter.com/globalmoxie">@globalmoxie</a>)</h2>
  388. <h3 id="act-i-magic--technology">Act I: Magic &amp; Technology</h3>
  389. <ul>
  390. <li>&ldquo;Any sufficiently advanced technology is indistinguishable from magic.&rdquo; &ndash;Arthur C. Clarke</li>
  391. <li>&ldquo;One goal: The computer disappears into the environment.&rdquo; &ndash;Alan Kay</li>
  392. <li>The phone is the first Internet of Things device for everyone (sensors + smarts + connectivity.)</li>
  393. <li>Mobile phones bring computing power to immobile objects.</li>
  394. <li>Embed smartphone brains in anything. Example: Nappy Notifier: Get a push notification when your baby&rsquo;s diaper is wet.</li>
  395. <li>&ldquo;We have centuries of experiencing imagining what objects could do for us if they were just&hellip;smarter.&rdquo;</li>
  396. <li><a href="http://bt.tn">bt.tn</a> and <a href="http://flic.io">flic.io</a> connect to <a href="https://ifttt.com/">ifttt</a> and <a href="https://zapier.com/">Zapier</a></li>
  397. </ul>
  398. <h3 id="act-ii-physical-meets-digital">Act II: Physical Meets Digital</h3>
  399. <ul>
  400. <li>Physical interaction with a digital API.</li>
  401. <li>The world is the interface&hellip;like it always has been!</li>
  402. <li>The world is a data source. Example: Snapshot by Progressive Insurance/<a href="https://www.automatic.com/">Automatic</a> use cars&rsquo; OBD-II ports to collect data.</li>
  403. <li>The world is reactive &ndash; intentional interfaces that extend our will. Example: <a href="http://www.military.com/video/logistics-and-supplies/army-equipment/sandtable-as-fun-as-sanbox/3849414398001/">Ares Sand Table</a></li>
  404. <li>The world is a big canvas.</li>
  405. <li>What if we stop focusing on wearables, and instead think about &ldquo;thereables&rdquo;, adding intelligence to objects that are already in the world? Why isn&rsquo;t your bed a sleep tracker, instead of something like a FitBit?</li>
  406. <li>The world has depth and mass. Physical objects can act together and be aware of each other across a digital space. Example: <a href="http://tangible.media.mit.edu/project/thaw/">MIT Thaw</a></li>
  407. <li>This is not a challenge of technology. It&rsquo;s a challenge of imagination.</li>
  408. </ul>
  409. <h3 id="act-iii-magic-imagined">Act III: Magic, Imagined</h3>
  410. <ul>
  411. <li>Google Glass asked, &ldquo;What can we do with technology on your face?&rdquo; It should have asked, &ldquo;What if this thing was magic?&rdquo;</li>
  412. <li>Design for the thing&rsquo;s essential thingness. Make things more like they are (and make ourselves more human), not just more technically impressive.</li>
  413. <li>Bank on illusion. Embrace misdirection. Example: Samsung&rsquo;s electric cooktop has flame-like LEDs since that gels with a user&rsquo;s mental model of a hot stove.</li>
  414. <li><a href="https://www.myvessyl.com/">Vessyl</a> has amazing technology but <a href="http://thecolbertreport.cc.com/videos/9nzwjt/vessyl-digital-cup">doesn&rsquo;t actually add value</a>.</li>
  415. <li>Don&rsquo;t just add data; add insight. Can you imagine if every object in your house was giving you <a href="http://omershapira.com/blog/2014/09/its-raining-again/">constant status updates</a>?</li>
  416. <li>Expose as little technology as possible.</li>
  417. <li>Be a little bit ridiculous. Examples: <a href="https://www.youtube.com/watch?v=y2ocATykfNo">Sharknado + Philips Hue</a> and ThinkGeek&rsquo;s <a href="https://www.youtube.com/watch?v=hUpukubcUjk">Mega Stomp Battle</a>.</li>
  418. <li>&ldquo;The future of technology has always looked like a pretty toy to people comfortable with the past.&rdquo; &ndash;Benedict Evans</li>
  419. <li>People fear that magic always goes wrong: &ldquo;How smart does your bed have to be before you are afraid to go to sleep at night?&rdquo; &ndash;Rich Gold</li>
  420. <li>Build systems that are smart enough to know they&rsquo;re not smart enough.</li>
  421. <li>Make technology invisible and humane.</li>
  422. <li>It&rsquo;s not &ldquo;Can we?&rdquo;, it&rsquo;s &ldquo;How will we?&rdquo;</li>
  423. <li>The &ldquo;Internet of Things&rdquo; is not about the thing. The technology should amplify our humanity.</li>
  424. </ul>
  425. <hr>
  426. <h2 id="mat-marquis---smaller-faster-web-sites-matmarquiscomhttpwwwmatmarquiscom-bull-wiltohttpstwittercomwilto">Mat Marquis - Smaller, Faster Web Sites (<a href="http://www.matmarquis.com">matmarquis.com</a> • <a href="https://twitter.com/wilto">@wilto</a>)</h2>
  427. <ul>
  428. <li>Users just want to keep their coffee off the floor, they don&rsquo;t care about the table.</li>
  429. <li>When we value convenience over craft, we&rsquo;re designing a web for ourselves, not for users.</li>
  430. <li>We&rsquo;re building the IKEA web: easy to build, but uncomfortable to use.</li>
  431. <li>20% of US users depend on smartphones almost exclusively for the Internet.</li>
  432. <li>Average page weight is 1944 KB &ndash; mostly images.</li>
  433. <li>The right image size(s) for the right device: Serve responsive images with the <code>srcset</code> attribute and the <code>&lt;picture&gt;</code> element.</li>
  434. <li>Use <a href="https://scottjehl.github.io/picturefill/">picturefill</a> for legacy browsers that don&rsquo;t support the <code>&lt;picture&gt;</code> element.</li>
  435. <li>SVG is widely supported, but still doesn&rsquo;t work on Android &ndash; a huge number of Android devices still ship with 2.3 today!</li>
  436. <li>&ldquo;It seems every year one of us accidentally discovers another game-changing thing that SVG has been able to do since 1987.&rdquo; &ndash;@ScottJehl</li>
  437. <li>~14 KB included in initial TCP/IP connection, so critical CSS should be at the top of the page.
  438. <ul>
  439. <li><a href="http://npmjs.com/package/grunt-criticalcss">http://npmjs.com/package/grunt-criticalcss</a></li>
  440. <li><a href="https://github.com/filamentgroup/loadcss">https://github.com/filamentgroup/loadcss</a>
  441. <ul>
  442. <li>Can also use this to defer loading of webfonts.</li>
  443. </ul>
  444. </li>
  445. <li>Set a performance budget! Validate it with Grunt: <a href="https://www.npmjs.com/package/grunt-perfbudget">https://www.npmjs.com/package/grunt-perfbudget</a></li>
  446. </ul>
  447. </li>
  448. </ul>
  449. <hr>
  450. <h2 id="ethan-marcotte---laziness-in-the-time-of-responsive-design-ethanmarcottecomhttpethanmarcottecom-bull-beephttpstwittercombeep">Ethan Marcotte - Laziness in the Time of Responsive Design (<a href="http://ethanmarcotte.com">ethanmarcotte.com</a> • <a href="https://twitter.com/beep">@beep</a>)</h2>
  451. <ul>
  452. <li>Categories like &ldquo;tablet&rdquo; and &ldquo;mobile&rdquo; are so broad as to be completely unhelpful as they pertain to our work.</li>
  453. <li>&ldquo;My anxiety doesn&rsquo;t come from thinking about the future, but from wanting to control it.&rdquo; &ndash;Hugh Prather</li>
  454. <li>Stop trying to perfectly control rendering on every device and platform.</li>
  455. <li>Avoid describing ideal layouts in markup; it gives you more flexibility in the long run.</li>
  456. <li>&ldquo;Instead of solutions for problems, [systems] for solutions: for no problem is there an absolute solution. There is always a group of solutions, one of which is the best under certain conditions.&rdquo; &ndash;Karl Gerstner</li>
  457. <li>Making it fit is the baseline. How can we make it feel at home?</li>
  458. <li>Start designing from a network of small layout systems and scale up from there.</li>
  459. <li>Responsive navigation:
  460. <ul>
  461. <li>Off-canvas</li>
  462. <li>Off-canvas navigation triggered by &rsquo;the hamburger&rsquo; (&amp;#9776; → ☰) hasn&rsquo;t been as successful as most of us think.</li>
  463. <li>The hamburger&rsquo;s function is not always self-evident.</li>
  464. <li>We don&rsquo;t always need to have the default expectation that navigation should be concealed on mobile.</li>
  465. <li>We&rsquo;re shoving our mess under the bed that is the off-canvas hamburger navigation menu on mobile.</li>
  466. <li>A lot of the needless complexity we foist on our responsive navs comes from thinking about them as desktop-first.</li>
  467. </ul>
  468. </li>
  469. <li>We should look for opportunities to be just a little lazy &ndash; maybe it&rsquo;s about a conservation of effort.</li>
  470. <li>Design the transaction, not the interface.</li>
  471. <li>A well-crafted responsive design is device-agnostic.
  472. <ul>
  473. <li>&ldquo;There&rsquo;s more to devices than the size of their screens. A device-agnostic approach also takes into account infinite combinations of screen resolution, input method, browser capability, and connection speed.&rdquo; &ndash;Trent Walton</li>
  474. <li>&ldquo;Like cars designed to perform in extreme heat or on icy roads, websites should be built to face the reality of the web&rsquo;s inherent variability.&rdquo; &ndash;Trent Walton</li>
  475. </ul>
  476. </li>
  477. </ul>
  478. <hr>
  479. <h1 id="day-2-5122015">Day 2: 5/12/2015</h1>
  480. <h2 id="eric-meyer---designing-for-crisis-meyerwebcomhttpmeyerwebcom-bull-meyerwebhttpstwittercommeyerweb">Eric Meyer - Designing for Crisis (<a href="http://meyerweb.com">meyerweb.com</a> • <a href="https://twitter.com/meyerweb">@meyerweb</a>)</h2>
  481. <ul>
  482. <li>&ldquo;You don&rsquo;t get to decide what your users will want to do on mobile. They do.&rdquo; &ndash;Karen McGrane</li>
  483. <li>Add another persona to your list: the user in crisis, who can barely think straight. (Example: Confusing, cluttered hospital web site.)</li>
  484. <li>Empathy is a core design skill.</li>
  485. <li>When <strong>usability testing</strong> a design for people in crisis, add <strong>confusion/annoyances</strong> to the page to suck up mental resources, to make sure the design still works. (Blurred text, shaky page, transposing text, etc.)</li>
  486. </ul>
  487. <hr>
  488. <h2 id="rachel-andrew---css-grid-layout-rachelandrewcoukhttprachelandrewcouk-bull-rachelandrewhttpstwittercomrachelandrew">Rachel Andrew - CSS Grid Layout (<a href="http://rachelandrew.co.uk">rachelandrew.co.uk</a> • <a href="https://twitter.com/rachelandrew">@rachelandrew</a>)</h2>
  489. <ul>
  490. <li>Seeing Flexbox as the silver bullet for layout issues is likely to lead us down another path of layout hacks.</li>
  491. <li>Flexbox is designed for things that can be represented as a single, unbroken line, not grids.</li>
  492. <li>CSS Grid Layout to the rescue: <a href="http://gridbyexample.com/">http://gridbyexample.com/</a></li>
  493. <li>CSS Grid Layout is useful as a prototyping tool even though browsers aren&rsquo;t [yet] ready to use it in production.</li>
  494. <li><a href="http://getbootstrap.com/">Bootstrap</a> and similar frameworks rely on describing the layout in the markup.</li>
  495. <li>With CSS Grid Layout, we describe the layout in the CSS and can redefine that description at any breakpoint.</li>
  496. <li>We can even use CSS Grid Layout to recreate a Bootstrap-style 12-column grid, without needing to describe the grid in the markup.</li>
  497. <li>CSS Grid Layout allows cells to be spanned vertically, eliminating the need for nested grids.</li>
  498. </ul>
  499. <hr>
  500. <h2 id="brad-frost---atomic-design-bradfrostcomhttpbradfrostcom-bull-brad_frosthttpstwittercombrad_frost">Brad Frost - Atomic Design (<a href="http://bradfrost.com">bradfrost.com</a> • <a href="https://twitter.com/brad_frost">@brad_frost</a>)</h2>
  501. <ul>
  502. <li>We&rsquo;re not designing pages, we&rsquo;re designing systems of components. &ndash;Stephen Hay</li>
  503. <li>Potential pitfalls with web frameworks:
  504. <ul>
  505. <li>One-size-fits-all</li>
  506. <li>Lookalike issues</li>
  507. <li>Might not do everything you need</li>
  508. <li>Compatibility with existing sites</li>
  509. <li>Subscribe to someone else&rsquo;s structure, naming, and style</li>
  510. </ul>
  511. </li>
  512. <li>☛ Atomic design = creating pattern library/style guide <strong>first</strong>, instead of cherrypicking patterns <strong>after</strong> design. @brad_frost #aeabos &ndash;<a href="https://twitter.com/zeldman/status/598151798331994112">@zeldman</a></li>
  513. <li>Responsive deliverables should look a lot like fully-functioning Twitter Bootstrap-style systems custom tailored for your clients&rsquo; needs. -Dave Rupert</li>
  514. <li>Benefits of front-end style guides:
  515. <ul>
  516. <li>Promotes consistency and cohesion</li>
  517. <li>Easier to test</li>
  518. <li>Better workflow</li>
  519. <li>Creates a shared vocabulary</li>
  520. <li>Useful reference</li>
  521. <li>Future-friendly foundation</li>
  522. </ul>
  523. </li>
  524. <li>Getting started with style guides:
  525. <ul>
  526. <li><a href="http://brettjankord.com/projects/style-guide-boilerplate/">http://brettjankord.com/projects/style-guide-boilerplate/</a></li>
  527. <li><a href="http://barebones.paulrobertlloyd.com/">http://barebones.paulrobertlloyd.com/</a></li>
  528. <li><a href="http://patternprimer.adactio.com/">http://patternprimer.adactio.com/</a></li>
  529. <li><a href="http://styleguides.io/">http://styleguides.io/</a></li>
  530. </ul>
  531. </li>
  532. <li>Example style guides:
  533. <ul>
  534. <li><a href="http://style.codeforamerica.org/">http://style.codeforamerica.org/</a></li>
  535. <li><a href="http://ux.mailchimp.com/patterns/">http://ux.mailchimp.com/patterns/</a></li>
  536. <li><a href="http://www.yelp.com/styleguide">http://www.yelp.com/styleguide</a></li>
  537. <li><a href="http://www.starbucks.com/static/reference/styleguide/">http://www.starbucks.com/static/reference/styleguide/</a></li>
  538. </ul>
  539. </li>
  540. <li>Atomic design tool: <a href="http://patternlab.io/">http://patternlab.io/</a></li>
  541. <li>Frontend development is part of the design process.</li>
  542. <li>Collaboration and communication trump deliverables.</li>
  543. </ul>
  544. <hr>
  545. <h2 id="derek-featherstone---content-in-context-is-king-simplyaccessiblecomhttpsimplyaccessiblecom-bull-featherhttpstwittercomfeather">Derek Featherstone - Content in Context is King (<a href="http://simplyaccessible.com">simplyaccessible.com</a> • <a href="https://twitter.com/feather">@feather</a>)</h2>
  546. <ul>
  547. <li>Great experiences are heavily based on context.</li>
  548. <li>Context is often seen as &ldquo;the device someone is using&rdquo;, but context is actually:
  549. <ul>
  550. <li>Time</li>
  551. <li>Location</li>
  552. <li>Proximity</li>
  553. <li>Device</li>
  554. <li>State of mind</li>
  555. <li>Capabilities</li>
  556. <li>Activity</li>
  557. <li>Interests</li>
  558. <li>Interaction</li>
  559. </ul>
  560. </li>
  561. <li>Content priority changes with respect to time. Example: Showing a conference schedule front and center on its web page while the conference is actually occurring.</li>
  562. <li>Programmatically change content priority over time. This applies to almost any industry.</li>
  563. <li>Content priority changes with respect to location. Example: For a college web site, show directions to the college if you&rsquo;re not present on campus, or an internal campus map if you are.</li>
  564. <li>Content display also changes with respect to location. Example: Date picker starting on Sunday if you&rsquo;re in the US, Monday everywhere else.</li>
  565. <li>Content changes with respect to proximity.</li>
  566. <li>All saved context must be resettable.</li>
  567. </ul>
  568. <hr>
  569. <h2 id="kate-kiefer-lee---touchy-subjects-creating-content-for-sensitive-situations-katekieferleecomhttpkatekieferleecom-bull-katekieferhttpstwittercomkatekiefer">Kate Kiefer Lee - Touchy Subjects: Creating Content for Sensitive Situations (<a href="http://katekieferlee.com/">katekieferlee.com</a> • <a href="https://twitter.com/katekiefer">@katekiefer</a>)</h2>
  570. <ul>
  571. <li>Sensitive topics and industries:
  572. <ul>
  573. <li>health and medicine</li>
  574. <li>money and banking</li>
  575. <li>private information</li>
  576. <li>fundraising</li>
  577. <li>religion</li>
  578. <li>politics</li>
  579. </ul>
  580. </li>
  581. <li>Urgent messages:
  582. <ul>
  583. <li>error messages security notifications</li>
  584. <li>warnings and compliance alerts</li>
  585. <li>rejection notices</li>
  586. <li>apologies</li>
  587. </ul>
  588. </li>
  589. <li>Less urgent messages:
  590. <ul>
  591. <li>help docs</li>
  592. <li>customer service emails contact pages</li>
  593. <li>forms</li>
  594. <li>unsubscribe pages</li>
  595. <li>legal policies</li>
  596. </ul>
  597. </li>
  598. <li>Principles:
  599. <ul>
  600. <li>Be clear</li>
  601. <li>Get to the point</li>
  602. <li>Stay calm</li>
  603. <li>Be serious</li>
  604. <li>Accept responsibility</li>
  605. <li>Be nice</li>
  606. </ul>
  607. </li>
  608. <li>&ldquo;It is insight into human nature that is key to the communicator&rsquo;s skill. For whereas the writer is concerned with what he puts into his writings, the communicator is concerned with what the reader gets out of it.&rdquo; &ndash;William Bernbach</li>
  609. <li>&ldquo;A good teacher I know, Jenifer Auger, has a simple but effective technique for the writing classroom. When her students have blah voiceless writing, she makes them speak the following words to her before reading their text: &lsquo;Listen to me, I have something to tell you.&rsquo;&rdquo; &ndash;Peter Elbow</li>
  610. <li>Read it out loud!</li>
  611. <li>Know when saying nothing is best: &ldquo;Brands are not people. Customers are not close friends. And boundaries need to be maintained.&rdquo;</li>
  612. <li>Pick the right tone to match the reader&rsquo;s feelings based on the content type.</li>
  613. <li>&ldquo;New Yorker: &ldquo;We screwed up.&rdquo; Airline: &ldquo;We apologize for any inconvenience this may have caused.&rdquo; Which apology is more effective? #aeabos&rdquo; &ndash;<a href="https://twitter.com/zeldman/status/598214820492648448">@zeldman</a></li>
  614. <li>Legal documents can use plain language, as long as the tone is appropriate.</li>
  615. <li>Prepare for the worst ahead of time: Create templates that can be used for responding to unexpected situations, keeping in mind:
  616. <ul>
  617. <li>Possible content types (email, tweet, blog post, etc.)</li>
  618. <li>Apologize up front if necessary say what happens next</li>
  619. <li>Who the message will be from who needs to sign off</li>
  620. <li>Laws and other requirements</li>
  621. </ul>
  622. </li>
  623. <li>We don&rsquo;t want our users to say, &ldquo;Great content!&rdquo; Instead: &ldquo;I got what I needed; it wasn&rsquo;t that hard; and I&rsquo;m better off now.&rdquo;</li>
  624. <li><a href="http://voiceandtone.com/">http://voiceandtone.com/</a></li>
  625. </ul>
  626. <hr>
  627. <h2 id="chris-coyier---the-wonderful-world-of-svg-chriscoyiernethttpchriscoyiernet-bull-chriscoyierhttptwittercomchriscoyier">Chris Coyier - The Wonderful World of SVG (<a href="http://chriscoyier.net">chriscoyier.net</a> • <a href="http://twitter.com/chriscoyier">@chriscoyier</a>)</h2>
  628. <ul>
  629. <li>SVG is widely supported by browsers today, and is still not used nearly enough.</li>
  630. <li>There are only a handful of basic shapes.</li>
  631. <li>For simple graphics, SVG file size is smaller and the quality is higher (best of both worlds), but there is a practical complexity limit.</li>
  632. <li>Practically any vector art can be converted to SVG.</li>
  633. <li>You can use an SVG file as the value of the <code>src</code> attribute in an <code>&lt;img /&gt;</code> tag, inline in the HTML, or referenced with <code>url()</code> in CSS.</li>
  634. <li>Why use SVG?
  635. <ul>
  636. <li>Resolution independent</li>
  637. <li>Use as a system</li>
  638. <li>Design possibilities</li>
  639. </ul>
  640. </li>
  641. <li>Why send pixel data when you can send geometry? Math is more efficient, let your powerful computer draw the thing.</li>
  642. <li>SVG is pretty efficient by itself, but can still be heavily optimized.
  643. <ul>
  644. <li>Server-side <code>gzip</code> works very well since SVG has lots of repetitive strings.</li>
  645. <li><a href="https://github.com/svg/svgo">svgo optimizer</a></li>
  646. </ul>
  647. </li>
  648. <li>SVG icons
  649. <ul>
  650. <li>An SVG icon system ensures that all icons are served via a single HTTP request, and makes icons easy to use.</li>
  651. <li><a href="https://icomoon.io/">https://icomoon.io/</a></li>
  652. <li>Why use SVG icons?
  653. <ol>
  654. <li>Vector!
Typically sharper than icon fonts because of non-text anti-aliasing.</li>
  655. <li>Easy multi-color! More CSS control than any other method.</li>
  656. <li>Animate!
Easy to apply transitions and animations.</li>
  657. <li>Script away!
Everything is in the DOM.</li>
  658. <li>Better accessibility!
Fool-proof, once you set it up well.</li>
  659. <li>Better semantics!
<code>&lt;svg&gt;</code> = &ldquo;image&rdquo; / <code>&lt;span&gt;</code> = &ldquo;nothing&rdquo;</li>
  660. <li>Ease of use! Easy to manage individual icons, instant build processes.</li>
  661. </ol>
  662. </li>
  663. </ul>
  664. </li>
  665. <li>SVG can be animated with both CSS and JavaScript.</li>
  666. <li>JavaScript libraries for working with SVG (all have slightly different capabilities, approaches, and focuses):
  667. <ul>
  668. <li><a href="http://snapsvg.io">Snap.svg</a> - jQuery for SVG - kinda like newer Raphaël</li>
  669. <li><a href="http://greensock.com">Greensock(GSAP)</a> - does some cool normalization stuff too</li>
  670. <li><a href="http://julian.com/research/velocity">Velocity.js</a></li>
  671. <li><a href="http://svgjs.com">SVG.js</a></li>
  672. <li><a href="http://d3js.org">D3</a>
- data powerhouse</li>
  673. </ul>
  674. </li>
  675. <li>SVG is pretty great at charting. It doesn&rsquo;t have charting-specific features, but it has features that lend themselves well to charting.
  676. <ul>
  677. <li><a href="http://www.amcharts.com/">amCharts</a></li>
  678. <li><a href="https://gionkunz.github.io/chartist-js/">Chartist.js</a></li>
  679. </ul>
  680. </li>
  681. <li>Clipping and masking</li>
  682. <li>Huge list of information about SVG: <a href="http://css-tricks.com/mega-list-svg-information/">http://css-tricks.com/mega-list-svg-information/</a></li>
  683. </ul>
  684. <hr>
  685. <h1 id="conclusion">Conclusion</h1>
  686. <p>To me, the concept of responsive web design means first and foremost that web sites should be able to adapt themselves for optimal viewing across any type of device. Implementing responsive designs is made easy through the use of <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries">CSS media queries</a>, which have been supported in all major web browsers for some time now.</p>
  687. <p>Web standards and browsers have obviously not stopped evolving, which brings me to my key takeaway from this conference: the continuous evolution of browser technology is pushing the envelope of what responsive design means. We are starting to have the tools to be able to show users the information or content they desire <em>in the appropriate context</em>, and a user&rsquo;s particular device is only one of many aspects of their context (see my notes from Derek Featherstone&rsquo;s talk for examples.)</p>
  688. <p>As always, technology itself doesn&rsquo;t automatically lead to good design, but gives us the means to achieve it. Newer and better technology, when leveraged correctly, can lead to better design.</p>
  689. <p>Of course, An Event Apart Boston&rsquo;s traditional, renowned bacon cupcakes also help.</p>
  690. ]]>
  691.    </content>
  692.  </entry><entry>
  693.    <title>Send Browser Tabs from iOS to Mac with Workflow, Hazel and Dropbox</title>
  694.    <link rel="alternate" type="text/html" href="https://joshdick.net/2015/01/18/send_browser_tabs_from_ios_to_mac_with_workflow_hazel_and_dropbox" />
  695.    <id>tag:joshdick.net,2015:/2015/01/18/send_browser_tabs_from_ios_to_mac_with_workflow_hazel_and_dropbox.html</id>
  696.    <published>2015-01-18T00:00:00Z</published>
  697.    <updated>2015-01-18T00:00:00Z</updated>
  698.    <author>
  699.      <name>Josh Dick</name>
  700.      <uri>https://joshdick.net</uri>
  701.    </author>
  702.    <content type="html" xml:lang="en">
  703.        <![CDATA[<blockquote>A somewhat complex solution to a simple problem.</blockquote><h2 id="introduction">Introduction</h2>
  704. <p>I&rsquo;ve always wanted to be able to send a tab from an iOS web browser to a Mac web browser. Despite the existence of browser features like Safari&rsquo;s <a href="http://support.apple.com/en-us/HT202530">iCloud Tabs</a> and Google Chrome&rsquo;s <a href="https://support.google.com/chrome/answer/2591582?hl=en">Tab Syncing</a>, or even services like <a href="http://instaper.com">Instapaper</a> or <a href="http://getpocket.com">Pocket</a>, I wanted a way to &ldquo;send and forget&rdquo; a browser tab from an iOS device to a Mac for future reference, then close the tab on my iOS device without giving it another thought.</p>
  705. <p>When <a href="http://workflow.is">Workflow</a> for iOS launched in December 2014, I knew that I could use it to implement this idea.</p>
  706. <p>The system described below should work with any iOS browser that uses the standard iOS share sheet, as well as any Mac browser on the receiving end. I&rsquo;ve tested this system with different combinations of Chrome and Safari on both sides, and it works great in all cases.</p>
  707. <p>I will not go into step-by-step detail for configuring <a href="http://workflow.is">Workflow</a> or <a href="http://www.noodlesoft.com/hazel.php">Hazel</a>, so if you&rsquo;re new to either of them, you should download them and experiment with them before continuing.</p>
  708. <h2 id="how-it-works">How It Works</h2>
  709. <p>This is how the system works from end to end, which should give you some context before you start configuring things:</p>
  710. <ul>
  711. <li>On iOS, a Workflow Action Extension that accepts URLs is invoked through the browser&rsquo;s share sheet.</li>
  712. <li>The workflow prompts for a Mac to send the tab to, and then saves the URL in a text file, located in a Dropbox folder corresponding to the chosen Mac.</li>
  713. <li>A Hazel rule on the chosen Mac continuously monitors that same Dropbox folder for changes.</li>
  714. <li>If a new file is detected in the folder, the rule reads its contents (the URL), and opens that URL in your Mac browser of choice.</li>
  715. <li>The rule then deletes the file since it is no longer needed.</li>
  716. </ul>
  717. <h2 id="prerequisites">Prerequisites</h2>
  718. <ul>
  719. <li><a href="http://workflow.is">Workflow</a> must be installed on all iOS devices you want to send tabs from.</li>
  720. <li><a href="http://dropbox.com">Dropbox</a> and <a href="http://www.noodlesoft.com/hazel.php">Hazel</a> must be installed on all Macs that will receive sent tabs.</li>
  721. </ul>
  722. <h2 id="configure-dropbox">Configure Dropbox</h2>
  723. <p>Make a list of all Macs you want to be able to send tabs to. My Macs are named after characters from the television show <a href="https://en.wikipedia.org/wiki/Archer_(TV_series)">Archer</a>, so my list looks like this:</p>
  724. <ul>
  725. <li>archer</li>
  726. <li>cheryl</li>
  727. <li>malory</li>
  728. </ul>
  729. <p>If you aren&rsquo;t weird enough to name your computers, your list might include things like &ldquo;MacBook Pro&rdquo; and &ldquo;iMac&rdquo;.</p>
  730. <p>Create a new folder anywhere in your Dropbox called &ldquo;Send Tab&rdquo; or anything else that works for you, and then create subfolders inside it for each Mac on your list.</p>
  731. <p>My directory structure looks like this:</p>
  732. <pre><code>$ tree ~/Dropbox/App\ Databases/Workflow/Send\ Tab
  733. /Users/Josh/Dropbox/App Databases/Workflow/Send Tab
  734. ├── archer
  735. ├── cheryl
  736. └── malory
  737.  
  738. 3 directories, 0 files
  739. </code></pre>
  740. <h2 id="configure-hazel-on-your-macs">Configure Hazel on your Macs</h2>
  741. <p>The Hazel rule shown below should be configured for each Mac on your list.</p>
  742. <p>On each Mac, the rule should be configured to monitor the corresponding Dropbox subfolder that you created for that Mac.</p>
  743. <p>You can change <code>&quot;Google Chrome&quot;</code> to any browser you want, and you can opt to use different browsers on different Macs if you wish. Make sure that the browser you choose is inside your Mac&rsquo;s <code>/Applications</code> folder, that you type the browser&rsquo;s name exactly as it appears there, and that the browser&rsquo;s name is quoted, as shown.</p>
  744. <p><img src="/post_assets/2015/01/hazel_rule.png" alt="Hazel rule configuration"></p>
  745. <p>For your copying-and-pasting convenience, here&rsquo;s the script that is embedded in the Hazel rule:</p>
  746. <pre><code>url=`cat &quot;$1&quot;`
  747. open -a &quot;Google Chrome.app&quot; &quot;$url&quot;
  748. rm -f &quot;$1&quot;
  749. </code></pre>
  750. <h2 id="configure-workflow-on-your-ios-devices">Configure Workflow on your iOS Devices</h2>
  751. <p>The Workflow workflow (not a typo!) shown below should be configured on each iOS device you want to send tabs from.</p>
  752. <p>This workflow is an Action Extension workflow that is configured to accept URLs.</p>
  753. <p><strong>For convenience, you can <a href="https://workflow.is/workflows/e2f27bab7b784ba9b9ff1afc835767c3">install the workflow by visiting this link on your iOS device</a> instead of reconstructing it manually.</strong></p>
  754. <p>If you&rsquo;re curious, here&rsquo;s what the workflow looks like:</p>
  755. <p><img src="/post_assets/2015/01/workflow.png" alt="Hazel rule configuration"></p>
  756. <p>You&rsquo;ll need to customize the list of Macs, as well as the &ldquo;Destination Path&rdquo; in the &ldquo;Save to Dropbox&rdquo; action.</p>
  757. <p>A key point is that the Destination Path ends with a variable that corresponds to the selected Mac. For reference, my Destination Path looks like this, although it doesn&rsquo;t all fit on the screen in the Workflow app: <code>App Databases/Workflow/Send Tab/&lt;computer&gt;</code>. <strong>This means that the Macs in the workflow&rsquo;s list need to match their corresponding subfolder names in Dropbox.</strong></p>
  758. <h2 id="the-finish-line">The Finish Line</h2>
  759. <p>Now that you&rsquo;ve finished configuring Hazel and Workflow, you should be able to send browser tabs from your iOS device(s) to your Mac(s), like this:</p>
  760. <!-- raw HTML omitted -->
  761. <h2 id="closing-thoughts">Closing Thoughts</h2>
  762. <p>As of this writing, Hazel and Dropbox <a href="http://www.noodlesoft.com/forums/viewtopic.php?f=4&amp;t=4044">don&rsquo;t always work together on OS X Yosemite</a>. If Workflow is adding files to your Dropbox but the Hazel rule never triggers on its own/only works when run manually, try this workaround I that discovered through experimentation: Create a folder somewhere outside Dropbox on your Mac, configure the Hazel rule to watch it. Then, symlink that folder into your Dropbox folder, in a location that it will appear as that Mac&rsquo;s &ldquo;send tab&rdquo; subfolder (to match the iOS workflow.)</p>
  763. <p>Here&rsquo;s an example of how to set up the workaround:</p>
  764. <pre><code>$ ln -s ~/path/to/the/real/folder/cheryl ~/Dropbox/App\ Databases/Workflow/Send\ Tab/cheryl
  765. </code></pre>
  766. <p>Allowing Hazel to watch the non-Dropbox folder allows Hazel&rsquo;s automatic rule triggering to work, while still allowing Dropbox syncing to work via the symbolic link.</p>
  767. <p>If you&rsquo;re obsessed with sending tabs between devices like me, you might enjoy these two relevant free utilities:</p>
  768. <ul>
  769. <li><a href="https://github.com/josh-/CloudyTabs/">CloudyTabs</a>, which is a Mac menu bar application that simply lists iCloud tabs across all devices. It&rsquo;s useful if you like using Safari on your iOS devices and a different browser on the Mac.</li>
  770. <li><a href="https://chrome.google.com/webstore/detail/chrome2chromev2/fdhfobojnimoedpefghekjhckolommed">Chrome2ChromeV2</a>, which allows you to send tabs between Google Chrome sessions on any computer, as long as you&rsquo;ve signed into Chrome with a Google account on the desired computers.</li>
  771. </ul>
  772. <p><em><strong>Updated on January 28, 2015:</strong> Updated the Hazel rule embedded script and associated screenshot to use and be compatible with bash — which is the default for most users — instead of zsh.</em></p>
  773. ]]>
  774.    </content>
  775.  </entry><entry>
  776.    <title>An Event Apart Boston 2014</title>
  777.    <link rel="alternate" type="text/html" href="https://joshdick.net/2014/05/02/an_event_apart_boston_2014" />
  778.    <id>tag:joshdick.net,2014:/2014/05/02/an_event_apart_boston_2014.html</id>
  779.    <published>2014-05-02T00:00:00Z</published>
  780.    <updated>2014-05-02T00:00:00Z</updated>
  781.    <author>
  782.      <name>Josh Dick</name>
  783.      <uri>https://joshdick.net</uri>
  784.    </author>
  785.    <content type="html" xml:lang="en">
  786.        <![CDATA[<blockquote>My notes from An Event Apart, &ldquo;the design conference for people who make websites&rdquo;.</blockquote><p><img src="/post_assets/2014/05/aea_boston_2014_swag.jpg" alt="An Event Apart SWAG"></p>
  787. <h1 id="introduction">Introduction</h1>
  788. <p>I had the privilege to once again attend An Event Apart, &ldquo;the design conference for people who make websites.&rdquo; My notes from <a href="http://aneventapart.com/event/boston-2014">An Event Apart Boston 2014</a> follow this introduction. The notes are grouped by talk, in the order that each talk happened at the conference.</p>
  789. <p>During his talk at the conference, <a href="http://scottberkun.com/">Scott Berkun</a> mentioned his concept of <a href="http://scottberkun.com/2014/min-max-note-taking/">Min/Max Note Taking</a>. This got me thinking about my approach to conference note taking (and publishing). During the conference, I try to capture as many interesting or useful points in my notes as I can, in real time. This method of note taking certainly doesn&rsquo;t work for everyone, but I find that it helps reinforce the speakers&rsquo; ideas in my head.</p>
  790. <p>Notes in summary or &ldquo;handful of bullets&rdquo; format would certainly be easier to consume than the wall of text that appears below, but the notion of trying to summarize others&rsquo; ideas for consumption doesn&rsquo;t sit right with me. Summarizing could filter out information or ideas that someone could find useful, or even worse, could accidentally skew the information. To that end, I decided stick with the &ldquo;wall of text&rdquo; approach to publishing my notes that I&rsquo;ve <a href="/2012/08/19/an_event_apart_boston_2012.html">used</a>. Before publishing my notes here, I extensively edit them for clarity and typos, but I don&rsquo;t make any attempt to summarize them or make them otherwise more digestible.</p>
  791. <p>If you&rsquo;re interested, my notes from An Event Apart Boston <a href="/2012/08/19/an_event_apart_boston_2012.html">2013</a> are also available.</p>
  792. <h1 id="day-1-42814">Day 1: 4/28/14</h1>
  793. <h2 id="jeffrey-zeldman---understanding-web-design-zeldmancomhttpwwwzeldmancom-bull-zeldmanhttpstwittercomzeldman">Jeffrey Zeldman - Understanding Web Design (<a href="http://www.zeldman.com">zeldman.com</a> • <a href="https://twitter.com/zeldman">@zeldman</a>)</h2>
  794. <ul>
  795. <li><strong>The mystery of web design:</strong> Those that can&rsquo;t value your work can&rsquo;t support you in creating your best work.</li>
  796. <li>Nobody outside our industry knows what we do; it&rsquo;s hard to explain in non-technical terms.</li>
  797. <li>In a team setting, it&rsquo;s hard enough to achieve great design even when a team is familiar with design.</li>
  798. <li>Understanding a client&rsquo;s business can be more important to a client than your technical expertise.</li>
  799. <li>Doing a personal project helps you break out of the work you&rsquo;re doing at your job, and if it&rsquo;s public, helps make people aware of you.</li>
  800. <li>Outside the industry, are there any well-known organizations that advocate for good design?
  801. <ul>
  802. <li>The <a href="http://www.webbyawards.com/">Webby Awards</a> are good at getting media attention and putting on a great show, but don&rsquo;t necessarily for exhibit good web or interaction design. They get the old media to pay attention to the Internet.</li>
  803. <li>The <a href="https://thenetawards.com/">net Awards</a> actually judge design merits, but your boss and client won&rsquo;t know about them.</li>
  804. <li>&ldquo;Nobody understands the W3C besides the W3C.&rdquo; The W3C speaks for themselves, not us.</li>
  805. <li>Companies speak to us but not for us; Apple wants you to love your iPhone, not HTML.</li>
  806. </ul>
  807. </li>
  808. <li>Regarding Facebook&rsquo;s HTML5 vs native app debacle, Facebook approached mobile as a <strong>technology</strong> problem, when it was really a <strong>design</strong> problem. Anything extraneous to Facebook&rsquo;s core functionality (e.g. sharing pictures with friends) doesn&rsquo;t belong in Facebook on mobile <em>or</em> on the desktop.</li>
  809. <li>HTML5 vs. native is the wrong question. Instead of emulating the desktop experience on mobile, replicate what users love about the experience.</li>
  810. <li>Companies harvest data to serve their advertisers instead of their customers.</li>
  811. <li>You&rsquo;re paid to meet business goals, not to make elegant technical achievements that shouldn&rsquo;t have been attempted in the first place.</li>
  812. <li>Web design isn&rsquo;t about technology. It&rsquo;s about people.
  813. <ul>
  814. <li>We don&rsquo;t design for browsers; we design for people to ensure that they have a good experience.</li>
  815. <li>We don&rsquo;t use progressive enhancement or make a page accessible for gold stars; we design experiences for people.</li>
  816. </ul>
  817. </li>
  818. <li>To criticize something you don&rsquo;t understand because it doesn&rsquo;t behave as something you do understand is wrong (for example: &ldquo;Web design is shoddy because it hasn&rsquo;t produced a work as influential as Milton Glaser&rsquo;s Bob Dylan poster.&rdquo;) There&rsquo;s no Mona Lisa of television.</li>
  819. <li>Web design is not book design, it is not poster design, it is not illustration, and the highest achievements of those disciplines are not what web design aims for.</li>
  820. <li>Web design is like architecture or type design. After an architect&rsquo;s design is done, they relinquish control to the builders and the people who use the building.</li>
  821. <li>Web design is the creation of digital environments that facilitate and encourage human activity; reflect or adapt to individual voices and content; and change gracefully over time while always retaining their identity.</li>
  822. <li>Great web design:
  823. <ul>
  824. <li>makes interaction easy.</li>
  825. <li>guides you subtly to your heart&rsquo;s desire; design is never passive, even if it looks that way.</li>
  826. <li>can be invisible or in your face.</li>
  827. <li>delights.</li>
  828. <li>is not innovative for the sake of innovation.</li>
  829. </ul>
  830. </li>
  831. <li>At work:
  832. <ul>
  833. <li>Represent your profession.</li>
  834. <li>Don&rsquo;t wait to be asked to do your job.</li>
  835. <li>Arrive early and often.</li>
  836. <li>Push your way in. <em>Volunteer.</em></li>
  837. <li>Achieve the right things for the wrong reasons. (For example, The Cold War led to the space race and the moon landing.)</li>
  838. <li>Your boss will never care about the web for the same reasons you do. Your job is to find the reasons they&rsquo;ll care about.</li>
  839. </ul>
  840. </li>
  841. <li>We are all evangelists; we need evangelists more than we need superstars.</li>
  842. </ul>
  843. <hr>
  844. <h2 id="sarah-parmenter---designing-using-data-sazzycoukhttpwwwsazzycouk-bull-sazzyhttpstwittercomsazzy">Sarah Parmenter - Designing Using Data (<a href="http://www.sazzy.co.uk/">sazzy.co.uk</a> • <a href="https://twitter.com/sazzy">@sazzy</a>)</h2>
  845. <ul>
  846. <li>&ldquo;Design is no longer the killer differentiator.&rdquo; -John Maeda</li>
  847. <li>Instincts are experiments. Data is proof.</li>
  848. <li>&ldquo;&hellip;become an expert to facilitate the most productive conversation you can have.&rdquo; -Kevin Hoffman, An Event Apart 2014</li>
  849. <li>&ldquo;Many designers who are skilled technicians, craftsmen, or researchers have struggled to survive in the messy environment required to solve today&rsquo;s complex problems. They may play a valuable role, but they are destined to live in the downstream world of design execution.&rdquo; -Tim Brown, IDEO</li>
  850. <li>Compared to learning a new tool, designing using data has a much bigger impact over a much shorter time.</li>
  851. <li>Being able to design with data is what will keep us valuable.</li>
  852. <li>It&rsquo;s easy to think of data/content as not part of our job.</li>
  853. <li>&ldquo;Research is formalized curiosity. It is poking and prodding with a purpose.&rdquo; -Zora Neale Hurston</li>
  854. <li>&ldquo;No one has an excuse to make an uninformed decision anymore.&rdquo; -Federico Holgado, Mailchimp</li>
  855. <li>&ldquo;Being a good designer is no longer enough. We need designers that can tell you WHY they design something a certain way.&rdquo;</li>
  856. <li>&ldquo;&hellip;designers go from decorators to problem solvers.&rdquo; -Aaron Walter, Mailchimp</li>
  857. <li>&ldquo;(If) a strategy can&rsquo;t predict outcomes, our strategy is broken.&rdquo; -Jared Spool, An Event Apart 2014</li>
  858. <li><strong>Vanity metrics</strong> are pieces of data on which you cannot act and exist purely for ego-stroking:
  859. <ul>
  860. <li>hits</li>
  861. <li>total signups</li>
  862. <li>page views</li>
  863. <li>number of visits</li>
  864. <li>unique visitors</li>
  865. <li>likes</li>
  866. </ul>
  867. </li>
  868. <li>A metric needs to tell you something tangible to act on.</li>
  869. <li>&ldquo;Making your numbers go up (any numbers&ndash;your BMI, your blood sugar, your customer service ratings) is pointless if the numbers aren&rsquo;t related to why you went to work this morning.&rdquo; -Seth Godin</li>
  870. <li>Track people and their habits.</li>
  871. <li>These are tools that can be used responsibly to do just that: <a href="http://www.minimalytics.com/">Minimaltyics</a>, <a href="https://www.kissmetrics.com/">KISSmetrics</a>, <a href="https://www.gosquared.com/">GoSquared</a>, <a href="http://get.gaug.es/">gaug.es</a>, <a href="https://mixpanel.com/">Mixpanel</a>, <a href="https://chartbeat.com/">Chartbeat</a>, <a href="http://www.truesocialmetrics.com/">TrueSocialMetrics</a>, <a href="http://www.crazyegg.com/">crazyegg</a></li>
  872. <li><a href="http://www.browserstack.com/">BrowserStack</a> for cross-browser testing</li>
  873. <li><a href="https://www.optimizely.com/">Optimizely</a> for A/B testing</li>
  874. <li>Seth Godin&rsquo;s &ldquo;purple cow&rdquo; business is a business that does something that bucks the trend of what a related business would be.</li>
  875. <li>&ldquo;Experiment led design may happen outside of normal work.&rdquo; -Kevin Hoffman</li>
  876. <li>People like honesty; they see through sales patter. Don&rsquo;t be afraid to share your failures.</li>
  877. <li>Referrer loyalty: Those who arrive at your site from a referrer are likely to arrive at your site from the same referrer in the future.</li>
  878. <li><a href="http://www.theblushbar.co.uk/">Blushbar</a>:
  879. <ul>
  880. <li>Used social metrics to optimize social reach.</li>
  881. <li>Realized they needed an iPhone app because people didn&rsquo;t know how to bookmark the appointment booking web page.</li>
  882. <li>It&rsquo;s the small things that make you stand out from the crowd. (For example, Blushbar gave out umbrellas in case of rain.)</li>
  883. <li>Changing &ldquo;book appointment&rdquo; to &ldquo;book YOUR appointment&rdquo; resulted in a 200% increase.</li>
  884. </ul>
  885. </li>
  886. <li>For <a href="https://highrisehq.com/">Highrise</a>, &ldquo;see plans and pricing&rdquo; was a more effective web call to action than &ldquo;start your 30-day free trial&rdquo;.</li>
  887. <li>Good visual media creates a more positive perception of the value of the product or service you&rsquo;re selling.
  888. <ul>
  889. <li>But, content comes first!</li>
  890. <li>Use &ldquo;real-world&rdquo; imagery instead of professionally created imagery; too much polish can look like stock imagery. (Made the difference between 0 clicks vs 521 clicks in two Facebook campaigns with the exact same title and wording.)</li>
  891. </ul>
  892. </li>
  893. <li>Web-savvy people have a higher tolerance for bad design.</li>
  894. <li>If you can&rsquo;t communicate your findings in the words of your boss/clients, you&rsquo;ve failed to help them find value from those findings.</li>
  895. <li>&ldquo;A mind is like a parachute. It doesn&rsquo;t work if it is not open.&rdquo; -Frank Zappa</li>
  896. </ul>
  897. <p>I should point out that Sarah&rsquo;s &ldquo;Designing with Data&rdquo; presentation used data from her business, <a href="http://www.theblushbar.co.uk/">Blushbar</a>, to make its points. <a href="https://twitter.com/joshdi/status/460800073367314432">I was impressed</a> that she used the presentation itself to practice what she preached.</p>
  898. <hr>
  899. <h2 id="dan-mall---responsive-design-is-still-hardeasy-be-afraiddont-worry-danielmallcomhttpdanielmallcom-bull-danielmallhttpstwittercomdanielmall">Dan Mall - Responsive Design is Still Hard/Easy! Be Afraid/Don&rsquo;t Worry! (<a href="http://danielmall.com/">danielmall.com</a> • <a href="https://twitter.com/danielmall">@danielmall</a>)</h2>
  900. <p>Dan outlined a &ldquo;modern web design process, in four easy payments.&rdquo;</p>
  901. <ol>
  902. <li>Plan (research and hypothesize)</li>
  903. <li>Inventory
  904. <ul>
  905. <li><strong>Content inventory:</strong> A simple content strategy for <del>dummies</del> designers is to add/edit/remove components as necessary to fit the content.</li>
  906. <li><strong>Performance inventory:</strong> Calculate your performance budget before designing, since it can help focus your design (number of images, JS libraries, etc.)</li>
  907. <li><strong>Pattern inventory:</strong>
  908. <ul>
  909. <li>Atoms (HTML tags)</li>
  910. <li>Molecules (collections of atoms, for example &ldquo;Image with Caption&rdquo;)</li>
  911. <li>Organisms (collections of molecules, for example &ldquo;Article Body&rdquo; or &ldquo;Carousel&rdquo;)</li>
  912. <li>See <a href="http://demo.patternlab.io/">demo.patternlab.io</a> for an example of a pattern inventory.</li>
  913. </ul>
  914. </li>
  915. <li><strong>Visual inventory:</strong>
  916. <ul>
  917. <li>If you want to get a better understanding of something, asking a question is infinitely more useful than making a statement.&quot; -Jason Santa Maria, <a href="http://goo.gl/mNqvrs">The Pastry Box</a></li>
  918. <li>&ldquo;Is showing their app on a laptop on the homepage the best way to sell it to prospective customers?&rdquo;</li>
  919. <li>&ldquo;Can their brand pull off a minimalist design approach?&rdquo;</li>
  920. <li>&ldquo;Should their copy be more playful?&rdquo; Would a playful design with kitschy illustrations make you grin as you explore the site?</li>
  921. <li>Rather than wasting time creating comps, splice the customer&rsquo;s logo into an existing design. This allows the customer to see themselves in a certain light without putting lots of effort into comps. Would a design for CNN be appropriate if its logo was simply spliced into a different, existing site?</li>
  922. </ul>
  923. </li>
  924. </ul>
  925. </li>
  926. <li>Sketch — explore ideas roughly and quickly.
  927. <ul>
  928. <li><a href="http://responsivedesignworkflow.com/">Content reference wireframes</a></li>
  929. <li><strong>Linear design:</strong> List out all of the components of the page (header, grids, footer, etc.) and just block them out as gray boxes. This allows you to see which components should have more space devoted to them relative to other components.</li>
  930. <li>It&rsquo;s easy to make boxes responsive but harder to make a web site cohesively responsive.</li>
  931. <li><strong>Element collages:</strong> Turn powerful phrases into visual hooks.
  932. <ul>
  933. <li>&ldquo;Obviously this isn&rsquo;t a website, but I see how it could be one.&rdquo; -The perfect client&rsquo;s reaction to an element collage</li>
  934. <li>Make an element collage horizontal so a client doesn&rsquo;t mistake it for a web site comp.</li>
  935. <li>&ldquo;Element collages are like giving your client a peek at all those hidden layers.&rdquo; -Paul Lloyd</li>
  936. </ul>
  937. </li>
  938. <li>Prototyping, with problem and solution statements: &ldquo;This prototype does one thing and one thing only.&rdquo; The first prototype should be something any developer can do; prototypes should get iteratively more complex and fleshed out.</li>
  939. </ul>
  940. </li>
  941. <li>Assemble
  942. <ul>
  943. <li>&ldquo;Assembling the site should take the least time on the project. The real work is research, sketching, prototyping.&rdquo;</li>
  944. <li>Responsive web design should act as a catalyst for:
  945. <ul>
  946. <li>Availability of content</li>
  947. <li>Performance</li>
  948. <li>Accessibility</li>
  949. <li>Organizational change</li>
  950. <li>Progressive enhancement</li>
  951. <li>Workflow</li>
  952. <li>Business benefits</li>
  953. </ul>
  954. </li>
  955. </ul>
  956. </li>
  957. </ol>
  958. <hr>
  959. <h2 id="luke-wroblewski---screen-time-lukewcomhttpwwwlukewcom-bull-lukewhttpstwittercomlukew">Luke Wroblewski - Screen Time (<a href="http://www.lukew.com/">lukew.com</a> • <a href="https://twitter.com/lukew">@lukew</a>)</h2>
  960. <h3 id="know-your-screen">Know Your Screen</h3>
  961. <ul>
  962. <li>In 2013, enough LCD screens were sold to dedicate 0.5 square feet of LCD to every human on earth.</li>
  963. <li>In a world of glass, online time is screen time.</li>
  964. </ul>
  965. <h3 id="output">Output</h3>
  966. <ul>
  967. <li>When creating web content, use:
  968. <ul>
  969. <li>Image resources represented as vectors rather than as raster pixels whenever possible.</li>
  970. <li>CSS and web type whenever possible.</li>
  971. <li>SVG and icon fonts whenever applicable.</li>
  972. <li><a href="https://github.com/scottjehl/picturefill">Picturefill</a> (for now) if you need to use raster graphics.</li>
  973. </ul>
  974. </li>
  975. <li>Increase font sizes on screens that are wide enough but not tall enough <a href="http://trentwalton.com/2012/01/11/vertical-media-queries-wide-sites/">for it to make sense</a>.</li>
  976. <li>For widescreen layouts:
  977. <ul>
  978. <li>Tighten up the layout by vertically compressing whitespace.</li>
  979. <li>Move calls to action closer to the top.</li>
  980. </ul>
  981. </li>
  982. <li>For portrait layouts:
  983. <ul>
  984. <li>Rebalance widescreen layouts by minimizing menus and maximizing content.</li>
  985. <li>Menus can be repositioned off-canvas or at a different portion of the screen (even the bottom; repositioning towards the bottom works better than to the sides.)</li>
  986. </ul>
  987. </li>
  988. <li>Output trends:
  989. <ul>
  990. <li>High resolution is <strong>the</strong> resolution.</li>
  991. <li>Widescreen is <strong>the</strong> aspect ratio (16:9 or even 19:10).</li>
  992. <li>Media queries know about more than width alone; pay attention to variable heights as well!</li>
  993. </ul>
  994. </li>
  995. </ul>
  996. <h3 id="input">Input</h3>
  997. <ul>
  998. <li>Not all devices correctly report whether they are touch capable, so support <strong>all</strong> inputs (<strong>both</strong> touch and click-based input.)</li>
  999. <li>You can include &ldquo;hidden features&rdquo; for each set of inputs. For example, double tapping an image in a touch interface and mouse-wheel scrolling in a click interface could both perform the same &ldquo;zoom&rdquo; action.</li>
  1000. <li>Communicate what&rsquo;s possible.</li>
  1001. <li>Screen size is a poor proxy for detecting input type, but it&rsquo;s what we&rsquo;ve got&hellip;for now.</li>
  1002. </ul>
  1003. <h3 id="posture">Posture</h3>
  1004. <ul>
  1005. <li><strong>Posture</strong> is how we combine input and output.</li>
  1006. <li>Physical screen size and viewing distance determine the final perceived size of objects (in real-world units like inches, not in pixels!)</li>
  1007. <li>Objects should be sized approximately 1/2 inch per foot of viewing distance. (Example: the box art in all of Netflix&rsquo;s UIs across different devices of increasing size.)</li>
  1008. <li>A full HD resolution TV can have the same resolution as a phone (1920px × 1080px), even though one is viewed ten feet away while the other is viewed one foot away.</li>
  1009. <li>Design to human scale and environments, not to screen width.</li>
  1010. </ul>
  1011. <hr>
  1012. <h2 id="kristina-halvorson---contentcommunication-braintrafficcomhttpbraintrafficcom-bull-halvorsonhttpstwittercomhalvorson">Kristina Halvorson - Content/Communication (<a href="http://braintraffic.com/">braintraffic.com</a> • <a href="https://twitter.com/halvorson">@halvorson</a>)</h2>
  1013. <h3 id="principles">Principles</h3>
  1014. <p>A <strong>principle</strong> internally motivates us to do things that seem good and right.
  1015. A <strong>rule</strong> externally compels you to do things <em>someone else has deemed</em> good and right.</p>
  1016. <h3 id="content-principles">Content Principles</h3>
  1017. <ul>
  1018. <li>Principles unite us in our day-to-day-work.</li>
  1019. <li>This content is not for us.</li>
  1020. <li>&ldquo;Responsive&rdquo; does not equal &ldquo;reactive&rdquo;.</li>
  1021. <li>The story informs the format.</li>
  1022. <li>Numbers aren&rsquo;t everything.</li>
  1023. </ul>
  1024. <h3 id="strategy">Strategy</h3>
  1025. <ul>
  1026. <li>A good strategy provides you with context and constraints, and doesn&rsquo;t allow you do do anything/make excuses for anything: &ldquo;We will share user-facing, task-based content that makes our customers feel smart and safe, both personally and professionally.&rdquo;</li>
  1027. <li>Strategy keeps us accountable.</li>
  1028. <li>Strategy helps web teams ask better questions about content at the beginning of a project.</li>
  1029. <li>A <strong>content strategy</strong> consists of <strong>content components</strong> (substance and structure) and <strong>people components</strong> (workflow and governance).</li>
  1030. </ul>
  1031. <h3 id="process">Process</h3>
  1032. <ul>
  1033. <li>Do not make process your god.</li>
  1034. <li>&ldquo;Different methods work or fail because of people, not because they are universally good or bad.&rdquo; -Pawel Brodzinski, <em>Agile Bullshit</em></li>
  1035. <li>Artifacts (fonts, etc) are tools, not outcomes.</li>
  1036. <li>Good process helps us move together.</li>
  1037. </ul>
  1038. <h3 id="roles">Roles</h3>
  1039. <ul>
  1040. <li>Roles give us a place.</li>
  1041. <li>The RACI Model:
  1042. <ul>
  1043. <li><strong>R</strong> - Who is <strong>responsible</strong> for completing a task?</li>
  1044. <li><strong>A</strong> - Who is <strong>accountable</strong> for the work&rsquo;s success?</li>
  1045. <li><strong>C</strong> - Who must be <strong>consulted</strong> before work can be signed-off on?</li>
  1046. <li><strong>I</strong> - Who must be kept <strong>informed</strong> along the way?</li>
  1047. </ul>
  1048. </li>
  1049. <li>For every project, every time:
  1050. <ol>
  1051. <li>At some point, invite All the People</li>
  1052. <li>Make sure everyone&rsquo;s aligned on terminology (e.g. <em>audit</em> vs. <em>inventory</em>, <em>wireframe</em> vs. <em>prototype</em>)</li>
  1053. <li>Identify timing issues, agendas, overlapping responsibilities</li>
  1054. </ol>
  1055. </li>
  1056. </ul>
  1057. <h3 id="perceptions">Perceptions</h3>
  1058. <ul>
  1059. <li>Perceptions give way to perspective.</li>
  1060. <li>&ldquo;In content strategy, our master skills must include translating and negotiating, so we can facilitate communication between disparate disciplines and help them to communicate.&rdquo; -Rachel Lovinger, <em>Tinker, Tailor, Content Strategist</em></li>
  1061. </ul>
  1062. <h3 id="conclusion">Conclusion</h3>
  1063. <ul>
  1064. <li>We are perpetually catching up.</li>
  1065. <li>Our work is <del>personal</del> <em>together</em>.</li>
  1066. <li>&ldquo;This multi-device web design increases stress exponentially.&rdquo; -Trent Walton, <em>.net Magazine</em></li>
  1067. <li>&ldquo;A study of over 350 people in 6 business units at a financial services company found that the greatest predictor of a team&rsquo;s achievement was how the members felt about one another.&rdquo; -Shawn Achor, <em>The Happiness Advantage</em></li>
  1068. </ul>
  1069. <hr>
  1070. <h2 id="jared-spool---ux-strategy-means-business-uiecomhttpwwwuiecom-bull-jaredspoolhttpstwittercomjaredspool">Jared Spool - UX Strategy Means Business (<a href="http://www.uie.com/">uie.com</a> • <a href="https://twitter.com/jaredspool">@jaredspool</a>)</h2>
  1071. <h3 id="design-and-business">Design and Business</h3>
  1072. <ul>
  1073. <li>Design is the rendering of intent.</li>
  1074. <li>Every design has content, and every design has&hellip; &hellip;a design.</li>
  1075. <li>Great content and great design both exist, but we tend to treat them as separate entities. We believe they overlap with great UX, but in truth they are inseparable: great content + great design = great UX.</li>
  1076. <li>We use <em>strategy</em> to achieve a desired outcome, but UX strategy can&rsquo;t predict outcomes.</li>
  1077. <li>Regarding Apple&rsquo;s iOS 6 Maps fiasco: Apple acquired 3 mapping companies and used 10 data sources; Google used 1,300 data sources and had 1,000 people × 10 years of correcting map errors. Apple didn&rsquo;t do the wrong things, Google had done it better 10 years earlier. We were comparing 10-year-old vs. 1-year-old process and strategy.</li>
  1078. <li>Amazon&rsquo;s cash float model:
  1079. <ul>
  1080. <li>Amazon doesn&rsquo;t focus on profit for most of the things they sell, because they can sell everything at cost and still make money.</li>
  1081. <li>Amazon turns inventory every 20 days while Best Buy turns inventory every 74 days.</li>
  1082. <li>Standard retail payment terms are 45 days.</li>
  1083. <li>Best Buy has a cash debt before distributors are paid; Amazon has a cash float.</li>
  1084. </ul>
  1085. </li>
  1086. <li>Great business models are explicitly designed.</li>
  1087. <li>How business is done in Silicon Valley: <a href="http://www.southparkstudios.com/clips/151040/the-underpants-business">South Park&rsquo;s &ldquo;Underpants Gnomes&rdquo; model</a> (1. Steal underpants; 2. ???; 3. Profit)</li>
  1088. <li>Business strategic priorities:
  1089. <ul>
  1090. <li>Increase revenue</li>
  1091. <li>Decrease costs</li>
  1092. <li>Increase new business</li>
  1093. <li>Increase existing business</li>
  1094. <li>Increase shareholder value</li>
  1095. </ul>
  1096. </li>
  1097. <li>Can apply those strategic priorities to any business (examples: Zappos&rsquo; pioneering self-return policy, universities, government, etc.)</li>
  1098. <li>Framing work in these terms helps communicate it to the people who are responsible for the health of the organization.</li>
  1099. </ul>
  1100. <h3 id="types-of-business-models">Types of Business Models</h3>
  1101. <ul>
  1102. <li><strong>Advertising</strong> is a business model failure (For example: look at how <a href="http://dictionary.reference.com/browse/clutter?s=t">cluttered dictionary.com is</a>.)
  1103. <ul>
  1104. <li>Everything that isn&rsquo;t content on a page is there to disrupt the user from the experience they intended to have.</li>
  1105. <li>It&rsquo;s intentional and it disrupts the user.</li>
  1106. <li>Advertisers don&rsquo;t care about the user; they care about selling stuff.</li>
  1107. <li>Advertising disrupt&rsquo;s the users&rsquo; experience supposedly to benefit the advertiser.</li>
  1108. <li>Internet advertising statistics:
  1109. <ul>
  1110. <li>A typical internet user sees 1,707 ads in a year. (Comscore)</li>
  1111. <li>An average ad is clicked 0.1% of the times it is shown. (Doubleclick)</li>
  1112. <li>A 468px × 60px banner is clicked 0.04% of the times it is shown. (Doubleclick)</li>
  1113. <li>Users can&rsquo;t see 31% of ads. (Comscore)</li>
  1114. <li>Users click on 50% of mobile ads by accident. (Goldspot Media)</li>
  1115. <li>You are 475.29 times more likely to survive a plane crash than to click on a banner ad in your lifetime. (Solve Media)</li>
  1116. </ul>
  1117. </li>
  1118. <li>Regarding <a href="https://www.youtube.com/watch?v=I03UmJbK0lA">K-Mart&rsquo;s &ldquo;ship my pants&rdquo; ad</a>: &ldquo;I&rsquo;ve watched this ad a thousand times. I love this ad; I will never shop at K-Mart.&rdquo;</li>
  1119. <li>When you don&rsquo;t <em>pay</em> for the product, you <em>are</em> the product.</li>
  1120. <li><a href="http://www.walgreens.com/">walgreens.com</a>: 3.8% of the screen real estate is dedicated to the top 5 most accessed elements on the page, which account for 60% of traffic. The rest of the page is crammed with marketing stuff users don&rsquo;t care about.</li>
  1121. <li>Internet advertising that could actually work relies on <em>seducible moments</em>, when an ad  delivers the right content at the right time.</li>
  1122. <li>Figuring out what products go with what content is prohibitively difficult and expensive, but it works because it is purposely built into the experience.</li>
  1123. <li>Advertising should be the business model choice of last resort.</li>
  1124. </ul>
  1125. </li>
  1126. <li>Metered paywalls
  1127. <ul>
  1128. <li><a href="http://www.nytimes.com/">nytimes.com</a>: Only users who return to the site multiple times are shown the paywall (limited to 10 articles for free.)</li>
  1129. <li>NY Times made more money from the metered paywall than from advertising. This plays into the business strategic priorities.</li>
  1130. <li>Metered paywalls demand excellent content.</li>
  1131. </ul>
  1132. </li>
  1133. <li>Supporting product sales
  1134. <ul>
  1135. <li><a href="http://www.ifixit.com/">iFixit</a> shares information about repairing electronic devices, and sells the specialized tools needed to do so.</li>
  1136. <li><a href="https://www.etsy.com/">Etsy</a> sells instructions to make products as well as the products themselves.</li>
  1137. </ul>
  1138. </li>
  1139. <li>Alternative Channel Revenue
  1140. <ul>
  1141. <li><a href="http://www.radiolab.org/">Radiolab</a> makes more money from their live shows than from pledge drives.</li>
  1142. <li><a href="http://www.mythbusterstour.com/">Mythbusters On Tour</a> makes more money than television advertising.</li>
  1143. </ul>
  1144. </li>
  1145. <li>Content Distribution (examples: Amazon Kindle, Apple iTunes)</li>
  1146. </ul>
  1147. <h3 id="conclusion-1">Conclusion</h3>
  1148. <ul>
  1149. <li>Business model recap:
  1150. <ul>
  1151. <li>Metered paywalls</li>
  1152. <li>Repurposed content</li>
  1153. <li>Supporting product sales</li>
  1154. <li>In-app purchase</li>
  1155. <li>Alternative channel revenue</li>
  1156. <li>Content distribution</li>
  1157. <li>Advertising (but don&rsquo;t do it!)</li>
  1158. </ul>
  1159. </li>
  1160. <li>Content has actual monetary value!
  1161. <ul>
  1162. <li><a href="http://significantobjects.com/">SignificantObjects</a> turned thrift-store chotchkies objects of value by attaching stories to them.</li>
  1163. <li><a href="https://www.crutchfield.com/">Crutchfield</a> writes their own copy for items in their online store, while Walmart&rsquo;s site relies on generic information provided by vendors. In user testing, users spent 237% of their budget at Crutchfield, but only spent 89% of their budget at Walmart.</li>
  1164. </ul>
  1165. </li>
  1166. <li>The best UX strategists create delight by working in the intersection of business and design.</li>
  1167. <li>We can design intentional business models.</li>
  1168. <li>The 5 business strategic priorities are a tool for mapping our design intent into business objectives, and to map business objectives into design intention.</li>
  1169. <li>We need to study business models like we study technological techniques.</li>
  1170. </ul>
  1171. <hr>
  1172. <h1 id="day-2-42914">Day 2: 4/29/14</h1>
  1173. <h2 id="jeremy-keith---the-long-web-adactiocomhttpadactiocom-bull-adactiohttpstwittercomadactio">Jeremy Keith - The Long Web (<a href="http://adactio.com/">adactio.com</a> • <a href="https://twitter.com/adactio">@adactio</a>)</h2>
  1174. <ul>
  1175. <li>Mobile first? URL first. Design your URLs before you design anything that&rsquo;s going to appear on the screen.</li>
  1176. <li>URLs are the one universal syntax of the web. They should be readable, guessable, and hackable.</li>
  1177. <li>Content first, navigation second.</li>
  1178. <li>It&rsquo;s OK to use unsupported attributes/elements in HTML since browsers typically ignore things they don&rsquo;t understand and degrade gracefully.</li>
  1179. <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist"><code>&lt;datalist&gt;</code> element</a> are the bastard love child of the <code>&lt;input&gt;</code> and <code>&lt;select&gt;</code> elements.</li>
  1180. <li>Any text in a <code>&lt;datalist&gt;</code> can also be used as a placeholder with a &ldquo;for example&rdquo; or &ldquo;e.g.&rdquo; prefix.</li>
  1181. <li><strong>Progressive enhancement</strong> doesn&rsquo;t mean designing for the lowest common denominator; rather it means <strong>starting</strong> from the lowest common denominator.
  1182. <ul>
  1183. <li>&ldquo;I like an escalator, because an escalator can never break. It can only become stairs. You&rsquo;ll never see an &lsquo;Escalator Out of Order&rsquo; sign, only &lsquo;Escalator Temporarily Stairs. Sorry for the convenience.&rsquo;&rdquo; -Mitch Hedberg</li>
  1184. <li>&ldquo;Javascript is the electricity of the web.&rdquo; It should be &ldquo;subservient to the existing structure.&rdquo;</li>
  1185. <li>In other words, a site should be enhanced by JavaScript but not necessarily require it.</li>
  1186. <li>&ldquo;Until the page has finished loading, every user is a non-JavaScript user.&rdquo; -Jake Archibald</li>
  1187. <li>Progressive enhancement is more about technology failing than technology not being supported. (For example: <code>&lt;a href=&quot;javascript:void(0)&quot;&gt;Download&lt;/a&gt;</code> broke the ability to download Google Chrome when the download page&rsquo;s JavaScript stopped loading.)</li>
  1188. </ul>
  1189. </li>
  1190. <li>Don&rsquo;t rely on 3rd-party APIs for your core business since they could go away without notice.</li>
  1191. <li>Use conditional loading for any nonessential third-party content (for example, social widgets; write links in the HTML that will be shown while the page loads, then after the page is done loading, allow widgets to load and replace the links.)</li>
  1192. <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#Attributes"><code>rel</code> attribute</a> can be used to make <a href="https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching">prefretching</a> <strong>suggestions</strong> to the browser to optimize performance.</li>
  1193. <li>The best way to be future friendly is to be backwards compatible.</li>
  1194. </ul>
  1195. <hr>
  1196. <h2 id="paul-irish---responsive-design-performance-budget-paulirishcomhttppaulirishcom-bull-paul_irishhttpstwittercompaul_irish">Paul Irish - Responsive Design Performance Budget (<a href="http://paulirish.com/">paulirish.com</a> • <a href="https://twitter.com/paul_irish">@paul_irish</a>)</h2>
  1197. <ul>
  1198. <li>71% of people expect websites to load as fast (or faster) on their phone than on a computer.</li>
  1199. <li>The #1 thing you can do for your site for mobile devices is to make it faster.</li>
  1200. <li>Worry about speed way before worrying about reformatting sites to fit small screens. (Double-tap and pinch zooming are workarounds for desktop layouts, but there are no workarounds for a slow site.)</li>
  1201. <li><strong><a href="https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/metrics/speed-index">Speed Index</a>:</strong> A metric that precisely measures a user&rsquo;s experienced page load time in milliseconds.</li>
  1202. <li>Total page bytes, number of requests, and bytes of JavaScript are not reliable indicators of actual page load times.</li>
  1203. <li>For <strong>fast pages</strong>, what is the <strong>right number of requests</strong> and <strong>optimal page size</strong>?</li>
  1204. <li>&ldquo;Measuring performance by the KB is like measuring effectiveness of your diet by the pound. Measuring performance by number of requests is like measuring your diet by number of things you ate - in both cases, who cares about what you actually ate, right?&rdquo; -<a href="https://github.com/html5rocks/www.html5rocks.com/issues/856#issuecomment-31957933">Ilya Grigorik</a></li>
  1205. <li>Not all <strong>requests</strong> are made equal; where are they initiated? What part of the UX do they block?</li>
  1206. <li>Not all <strong>bytes</strong> are made equal; the first 14kb are extremely important. Different <code>content-type</code>s can have different performance impact(s) for the page.</li>
  1207. <li>&ldquo;Bloat&rdquo; isn&rsquo;t a great word to describe performance issues, it can refer to transfer size, code complexity, or dead code.</li>
  1208. <li>Components of an HTTP request:
  1209. <ul>
  1210. <li>DNS lookup</li>
  1211. <li>New TCP connection (handshake roundtrip)</li>
  1212. <li>HTTP request requires minimum of one round trip to the server — <em>plus server processing time</em>.</li>
  1213. </ul>
  1214. </li>
  1215. <li>Bandwidth + Latency ≈ Performance.
  1216. <ul>
  1217. <li>Bandwidth: Amount of data transferred over the network per unit time (e.g. 5 mb/s)</li>
  1218. <li>Latency: Delay in the network to transfer a packet (e.g. round trip time)</li>
  1219. </ul>
  1220. </li>
  1221. <li>Last-mile latency (cable/DSL) is slow, and it&rsquo;s even worse for mobile (see <a href="https://www.youtube.com/watch?v=_fNp37zFn9Q">&ldquo;Living with Lag&rdquo;</a>).</li>
  1222. <li>Video streaming is bandwidth limited; web browsing is latency limited.</li>
  1223. <li>Optimizing transport (TCP) performance:
  1224. <ul>
  1225. <li>TCP is optimized for long-lived connections and bulk data transfers.</li>
  1226. <li>Most of the <strong>HTTP data flows consist of small, bursty data transfers</strong>, but network round trip time is the limiting factor in TCP throughput and performance in most cases.</li>
  1227. <li>Consequently, <strong>latency is the performance bottleneck for HTTP</strong> and most of the web.</li>
  1228. <li><strong>Latency</strong> defines the speed at which the page loads; <strong>mobile&rsquo;s growth</strong> means average latency is growing.</li>
  1229. <li>Latency&rsquo;s influence means <strong>optimizing for request count</strong>.</li>
  1230. </ul>
  1231. </li>
  1232. <li>Optimizing for the critical path
  1233. <ul>
  1234. <li>When a JavaScript file is referenced in the <code>&lt;head&gt;</code> of the document, the browser can&rsquo;t process the rest of the page until it has finished processing that file.</li>
  1235. <li>Eliminate render-blocking JavaScript (especially in <code>&lt;head&gt;</code>). Load all JavaScript asynchronously.</li>
  1236. <li><strong>Critical CSS:</strong> The CSS used to render the content &ldquo;above the fold&rdquo;.</li>
  1237. <li>Minimize render-blocking CSS.</li>
  1238. <li>Deliver the goods — serve critical content in the initial HTML, then progressively enhance.</li>
  1239. <li>No redirects (they just add round trip time).</li>
  1240. <li>Use gzip.</li>
  1241. </ul>
  1242. </li>
  1243. <li>Tools that can help: <a href="http://www.webpagetest.org/">WebPagetest</a> / <a href="https://developers.google.com/speed/pagespeed/insights/">Google PageSpeed Insights</a> / <a href="https://developers.google.com/speed/pagespeed/module">Pagespeed Module (apache/nginx)</a> / <a href="http://speedcurve.com">speedcurve</a></li>
  1244. <li>Visualize your performance wins! Use visuals and data to make your case for improving performance.</li>
  1245. <li>Your count of high-latency users is going to increase. Prepare for it.</li>
  1246. <li>Aggressive but good performance goals:
  1247. <ul>
  1248. <li>Deliver a fast mobile web page load (show above-the-fold content in under 1 second (Speed Index under 1000). Serve critical-path content, including CSS, as part of the first 14kb of the first server response.</li>
  1249. <li>Delight your users.</li>
  1250. </ul>
  1251. </li>
  1252. </ul>
  1253. <hr>
  1254. <h2 id="lea-verou---the-chroma-zone-engineering-color-on-the-web-leaveroumehttpleaveroume-bull-leaverouhttpstwittercomleaverou">Lea Verou - The Chroma Zone: Engineering Color on the Web (<a href="http://lea.verou.me/">lea.verou.me</a> • <a href="https://twitter.com/LeaVerou">@LeaVerou</a>)</h2>
  1255. <h3 id="screens-pixels-and-subpixels">Screens, Pixels, and Subpixels</h3>
  1256. <ul>
  1257. <li>White pixels are actually composed of RGB subpixels, using additive color.</li>
  1258. <li>Different screens have different subpixel geometries.</li>
  1259. <li>Text is rendered with subpixel antialiasing; you can play with it using <a href="http://people.mozilla.org/~jdaggett/tests/subpixelexplorer.html">Subpixel Explorer</a>.</li>
  1260. <li>Browsers allow you to explicitly disable antialiasing through CSS selectors (but don&rsquo;t do it, since it makes fonts look terrible; it could be useful for icon fonts.)</li>
  1261. <li>3 colors × 8-bit subpixels = 2^8 × 3 = 3 bytes per pixel in uncompressed images.</li>
  1262. </ul>
  1263. <h3 id="colors-in-html-32">Colors in HTML 3.2</h3>
  1264. <ul>
  1265. <li><code>#rrggbb</code> hex syntax
  1266. <ul>
  1267. <li>Using hex syntax as a mental model for color is difficult, try playing <a href="http://leaverou.github.io/whathecolor">whatthecolor</a>.</li>
  1268. </ul>
  1269. </li>
  1270. <li>Useless color names that were based on the <a href="https://en.wikipedia.org/wiki/List_of_software_palettes#Microsoft_Windows_default_16-color_palette">Microsoft Windows default 16-color palette</a></li>
  1271. </ul>
  1272. <h3 id="colors-in-css-1---21">Colors in CSS 1 - 2.1</h3>
  1273. <ul>
  1274. <li><code>rgb()</code> syntax</li>
  1275. <li><code>#rgb</code> shortened hex syntax</li>
  1276. <li>&ldquo;orange&rdquo; color name (<a href="http://www.w3.org/TR/CSS2/syndata.html#value-def-color">seriously</a>)</li>
  1277. </ul>
  1278. <h3 id="css-color-level-3httpwwww3orgtrcss3-color"><a href="http://www.w3.org/TR/css3-color/">CSS Color Level 3</a></h3>
  1279. <ul>
  1280. <li>A color space has <strong>perceptual uniformity</strong> when the perceptual similarity of two colors is measured by the distance between them.</li>
  1281. <li>RGB and RGB-derived color spaces <strong>are not</strong> perceptually uniform.</li>
  1282. <li>Everyone says &ldquo;CSS3&rdquo; even though it doesn&rsquo;t exist (only the modules are versioned).</li>
  1283. <li>HSL colors are slightly more intuitive than RGB colors.
  1284. <ul>
  1285. <li><strong>Saturation:</strong> Closeness to gray.</li>
  1286. <li><strong>Lightness:</strong> Closeness to white or black (but the model treats pure blue and pure yellow as having the same lightness, even though yellow always appears lighter to us; HSL is not perceptually uniform since it&rsquo;s derived from RGB.)</li>
  1287. </ul>
  1288. </li>
  1289. <li>The <code>hue-rotate</code> filter is useful for colorizing images when applied on top of a <code>sepia</code> filter.</li>
  1290. <li>The <code>multiply</code> blending mode tends to makes colors darker. (For example, red[255,0,0] × blue[0,0,255] = black[0,0,0,].)</li>
  1291. <li>Lightness != luminance, can&rsquo;t rely on it to judge whether white or black text would appear better on top of a color.
  1292. <ul>
  1293. <li>Play with contrast ratios at <a href="http://leaverou.github.io/contrast-ratio">http://leaverou.github.io/contrast-ratio</a>.</li>
  1294. </ul>
  1295. </li>
  1296. <li>CSS4 introduces relative luminance to better match human perception, but it&rsquo;s not perfect; it slightly fails for orange, but will always fail &ldquo;better&rdquo; than lightness (HSL).</li>
  1297. <li>When dealing with transparency, there&rsquo;s no such thing as a transparent pixel; transparency is calculated using <a href="http://en.wikipedia.org/wiki/Alpha_blending">alpha blending</a>.</li>
  1298. <li>Using the <code>transparent</code> keyword is a shorthand for transparent <strong>black</strong>, so <code>linear-gradient(90deg, white, transparent)</code> will actually fade from gray instead of pure white. Use <code>hsla()</code> transparent white instead (<code>linear-gradient(90deg, white, hsla(0,0%,100%,0))</code>).</li>
  1299. <li>CSS Color Level 3 included some racist color names: <code>indianred</code>, <code>navajowhite</code>, and <code>peru</code></li>
  1300. <li>CSS Color Level 3 also included a color named <code>darkgray</code> which is actually lighter than <code>gray</code>, due to backwards compatibility (<code>gray</code> is halfway between white and black in RGB.)</li>
  1301. <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentColor_keyword"><code>currentcolor</code> keyword</a> is the first variable we ever got in CSS.</li>
  1302. </ul>
  1303. <h3 id="the-future-css-color-module-level-4httpdevw3orgcsswgcss-color-4">The Future: <a href="http://dev.w3.org/csswg/css-color-4/">CSS Color Module Level 4</a></h3>
  1304. <ul>
  1305. <li><code>gray(%, alpha)</code> function</li>
  1306. <li><code>#rgba</code> and <code>#rrggbbaa</code></li>
  1307. <li><a href="https://en.wikipedia.org/wiki/HWB_color_model">HWB (hue, whiteness, blackness) color model</a> (NOT the same as HSB).</li>
  1308. <li><a href="http://dev.w3.org/csswg/css-color-4/#modifying-colors"><code>color()</code> function and adjusters</a></li>
  1309. <li>Named hues and <code>&lt;angle&gt;</code> in <code>hsl()</code></li>
  1310. <li><code>rgb()</code> and <code>hsl()</code> will accept alpha values</li>
  1311. <li><a href="http://www.myth.io">myth.io</a> is a relatively new CSS preprocessor that acts as a &ldquo;CSS polyfill&rdquo;, allowing the use of some of these future features today.</li>
  1312. </ul>
  1313. <h3 id="cmyk-vs-rgb">CMYK vs. RGB</h3>
  1314. <ul>
  1315. <li>CMY &ldquo;works&rdquo; mathematically but not in the real world, that&rsquo;s why CMYK is used for print.</li>
  1316. <li>sRGB has a slightly larger color gamut than CMYK (LAB &gt; Adobe RGB &gt; sRGB &gt; CMYK)</li>
  1317. <li>There&rsquo;s no simple way to convert between RGB and CMYK.</li>
  1318. </ul>
  1319. <hr>
  1320. <h2 id="josh-clark---mind-the-gap-designing-in-the-space-between-devices-globalmoxiecomhttpglobalmoxiecom-bull-globalmoxiehttpstwittercomglobalmoxie">Josh Clark - Mind the Gap: Designing in the Space Between Devices (<a href="http://globalmoxie.com">globalmoxie.com</a> • <a href="https://twitter.com/globalmoxie">@globalmoxie</a>)</h2>
  1321. <h3 id="physical-gap">Physical Gap</h3>
  1322. <ul>
  1323. <li>We&rsquo;ve lost the ability to transfer information between two physically collocated devices; we&rsquo;re in a multi-device world individually. (An old example: Palm Pilot beaming.)</li>
  1324. <li>Designers haven&rsquo;t provided an elegant strategy to cross the physical gap; right now all we have is remote control, self-email or SMS, and content syncing.</li>
  1325. </ul>
  1326. <h3 id="behavior-gap">Behavior Gap</h3>
  1327. <ul>
  1328. <li>How can we make physical interactions for exchanging data between devices?</li>
  1329. <li><strong>Sequenced:</strong> Move from one device to the other, e.g. desktop to mobile.</li>
  1330. <li><strong>Simultaneous:</strong> Live peer-to-peer interaction (for example, <a href="http://g.co/racer">Racer</a>).</li>
  1331. <li>It&rsquo;s not enough to share content across devices. Share action.</li>
  1332. <li>Sync verbs, not just nouns.</li>
  1333. <li>Current technologies: WebSockets, WebRTC, Bluetooth LE, Web Audio API, Infrared</li>
  1334. <li><strong>Danger:</strong> Screens encumber and constrain. Design for people, not screens. The best things in life happen outside of screens. It&rsquo;s our obligation to bend technology to our lives, not vice versa.</li>
  1335. </ul>
  1336. <h3 id="physical-interaction">Physical Interaction</h3>
  1337. <ul>
  1338. <li>Do we need screens at all? (For example, <a href="http://www.drumpants.com/">Drumpants</a> doesn&rsquo;t.)</li>
  1339. <li>Drumpants uses human → device interaction, how do we bring that to device → device interaction?</li>
  1340. <li>The <a href="http://www.misfitwearables.com/">Misfit Shine</a> fitness tracker syncs to your phone by placing it directly on the screen.
  1341. <ul>
  1342. <li>It turns out this is because the Shine is made of metal which significantly weakens its Bluetooth signal, so the Shine needs to be physically close to the phone to sync.</li>
  1343. <li>Embracing a constraint can lead to the best designs.</li>
  1344. </ul>
  1345. </li>
  1346. <li>If you physically tap your phone on your computer, nothing happens. Or does it? (See Happy Together&rsquo;s <a href="http://vimeo.com/86287024">demo video</a> and <a href="http://github.com/houseoflegend/happytogether">code</a>.)</li>
  1347. <li>This is not a challenge of technology; it&rsquo;s a challenge of imagination.</li>
  1348. <li>There is magic in the gaps between devices. (See the <a href="https://www.youtube.com/watch?v=eYveEdhTgBs">Grab Magic demo video</a>.)</li>
  1349. <li>Magic tends to decay; it is self-deprecating, we get used to it, and it&rsquo;s a moving target.</li>
  1350. <li>Never ever ever ever try to out-mouse the mouse.
  1351. <ul>
  1352. <li>For example, using the <a href="https://www.leapmotion.com/">LeapMotion</a> as a mouse is a much worse experience than just using a mouse.</li>
  1353. <li>However, the LeapMotion can be used to add digital magic to physical objects. (Example: pointing at floors in a physical model of a building highlights different floor plans with lights.)</li>
  1354. </ul>
  1355. </li>
  1356. <li><strong>Mundane computing:</strong> Making mundane tasks easier. (But perhaps you can go too far, given the example of the <a href="https://www.quirky.com/shop/619">Egg Minder</a>.)</li>
  1357. <li>Anything that can be connected will be connected; everyday objects will become digital gadgets.</li>
  1358. <li>Physical things have digital avatars.</li>
  1359. <li>Software makes hardware scale.
  1360. <ul>
  1361. <li><a href="https://www.youtube.com/watch?v=8EshrR-xk2E">Teddy Ruxpin</a> looks creepy today, and relied on canned audio tapes. <a href="http://www.toymail.co/">Toymail</a> is a modern technical successor that allows for social interaction.</li>
  1362. <li><a href="http://lgusblog.com/product-news/lg-homechat-makes-easy-communicate-smart-appliances/">LG HomeChat</a>: Text your appliances!</li>
  1363. </ul>
  1364. </li>
  1365. <li><strong>Danger:</strong> Connected devices won&rsquo;t always say nice things. Anything that can be hacked will be hacked. (Cam you imagine an appliance botnet? Or an instant poltergeist?)
  1366. <ul>
  1367. <li><a href="http://www.bbc.com/news/technology-23575249">BBC article</a>: &ldquo;A luxury toilet controlled by a smartphone app is vulnerable to attack, according to security experts.&rdquo;</li>
  1368. </ul>
  1369. </li>
  1370. <li>Software is ideology, embedded with values.</li>
  1371. </ul>
  1372. <h3 id="imagination">Imagination</h3>
  1373. <ul>
  1374. <li>Plan for gadget hopping</li>
  1375. <li>Share action</li>
  1376. <li>Peer-to-peer sharing</li>
  1377. <li>Offscreen interactions</li>
  1378. <li>Design for sensors</li>
  1379. <li>Avatars for objects</li>
  1380. </ul>
  1381. <hr>
  1382. <h2 id="bruce-lawson---web-can-the-web-win-the-war-against-native-without-losing-its-soul-brucelawsoncoukhttpwwwbrucelawsoncouk-bull-brucelhttpstwittercombrucel">Bruce Lawson - Web+: Can the Web Win the War Against Native Without Losing its Soul? (<a href="http://www.brucelawson.co.uk/">brucelawson.co.uk</a> • <a href="https://twitter.com/brucel">@brucel</a>)</h2>
  1383. <ul>
  1384. <li>Why the web-vs-native gap? 86% of time is spent in apps rather than the mobile web.</li>
  1385. <li>Forget AppCache, <a href="https://github.com/slightlyoff/ServiceWorker">Service Workers</a> are the new hotness.
  1386. <ul>
  1387. <li>Invoked even when offline, can enable apps that are &ldquo;offline by default&rdquo;.</li>
  1388. <li>Normal resource loading is the fallback behavior.</li>
  1389. <li>Forces you to have URLs.</li>
  1390. <li>Service Workers + IndexedDB = Power.</li>
  1391. </ul>
  1392. </li>
  1393. <li>High-level or low-level?
  1394. <ul>
  1395. <li>&ldquo;&hellip;when we try to produce high-level APIs, they tend to suck for various reasons, and therefore that we should produce lower-level primitives atop which people can build nicer things&rdquo; -<a href="http://lists.w3.org/Archives/Public/www-tag/2013Feb/0022.html">Robin Berjon</a> (W3C, HTML Editor)</li>
  1396. <li>&ldquo;&hellip;browser vendors should provide new low-level capabilities that expose the possibilities of the underlying platform as closely as possible. They should also seed the discussion of high-level APIs through JavaScript implementations of new features&rdquo; -The <a href="http://extensiblewebmanifesto.org/">Extensible Web Manifesto</a></li>
  1397. </ul>
  1398. </li>
  1399. <li><a href="http://lists.w3.org/Archives/Public/public-html-admin/2013Feb/0153.html">BBC</a>: &ldquo;since the launch of iPlayer the amount of platforms with incompatible distribution infrastructure, video formats and security technologies has rapidly increased. This level of growth in the complexity of delivery is unsustainable&rdquo;
  1400. <ul>
  1401. <li>Perfect argument to promote web over native, hence DRM for the web is a necessary evil.</li>
  1402. <li>Allow the battle for DRM to win the war for the web (over native).</li>
  1403. </ul>
  1404. </li>
  1405. <li>People prefer the familiar; users trust known resources.</li>
  1406. <li>Bookmarks in mobile browsers are used sparingly, instead mobile users &ldquo;bookmark&rdquo; by downloading the native app.</li>
  1407. <li>What&rsquo;s the difference between &ldquo;bookmarking&rdquo; a page and &ldquo;installing&rdquo; it? Making it visible outside the browser.</li>
  1408. <li>Native apps feel native to the device/platform, web apps don&rsquo;t. Android and iOS are gradually developing different conventions for interaction, and a native app responds the way its user expects.</li>
  1409. <li><a href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html">W3C Resource Priorities spec</a> — <code>&lt;img lazyload /&gt;</code></li>
  1410. <li>On mobile, hardware-accelerated scrolling gets knocked back down to software/the CPU if the browser has to listen for scroll events.</li>
  1411. <li>For the web to get a leg up on native, we need univerally installable webapps.
  1412. <ul>
  1413. <li>No versioning, no installing, instantaneous updates à la Google Chrome</li>
  1414. <li>&ldquo;I don&rsquo;t care which [standard] we end up using, I only care that we all end up using the same one.&rdquo;</li>
  1415. <li><a href="http://smus.com/installable-webapps">Installable Webapps: Extend the Sandbox</a></li>
  1416. </ul>
  1417. </li>
  1418. <li>Using plain HTML for the initial page load will always be faster than JavaScript solutions.
  1419. <ul>
  1420. <li>There are tools like <a href="https://prerender.io/">prerender.io</a>, but do you really want to go down that path?</li>
  1421. </ul>
  1422. </li>
  1423. <li>Don&rsquo;t make webapps that emulate all of the failures of native apps.</li>
  1424. </ul>
  1425. <hr>
  1426. <h1 id="scott-berkun---how-to-champion-ideas-back-at-work-scottberkuncomhttpwwwscottberkuncom-bull-berkunhttpstwittercomberkun">Scott Berkun - How to Champion Ideas (Back at Work) (<a href="http://www.scottberkun.com/">scottberkun.com</a> • <a href="https://twitter.com/berkun">@berkun</a>)</h1>
  1427. <ul>
  1428. <li>The real designer is the person with the power to make decisions.</li>
  1429. <li>There are more designers now who have founded a company than ever before in history.</li>
  1430. <li>Staying connected helps you champion ideas.</li>
  1431. <li>When an event is over, your chance to network and connect ends.</li>
  1432. <li><strong>Halfmeet:</strong> A person who you almost started a friendship with at an event. (You can guess what a <em>halfhook</em> is.)</li>
  1433. <li>5 non-slimy networking tricks:
  1434. <ul>
  1435. <li>Ask everyone you like for a business card</li>
  1436. <li>Saying thank you starts a conversation</li>
  1437. <li>Post your notes from sessions during the event — attracts people to you</li>
  1438. <li>Be active on Twitter to find outgoing people</li>
  1439. <li>If you use LinkedIn, write something personal</li>
  1440. </ul>
  1441. </li>
  1442. <li>Speakers love people who ask them thoughtful questions about their presentation.</li>
  1443. <li>Keep the fire burning — start a UX happy hour! Monthly booze is magical.</li>
  1444. <li>When trying to champion something, don&rsquo;t be an easy target. Don&rsquo;t shoot yourself or get shot.</li>
  1445. <li>Events are abstractions, but your life is <strong>specific</strong>.</li>
  1446. <li><a href="http://scottberkun.com/2014/min-max-note-taking/">Min/max note taking</a>:
  1447. <ul>
  1448. <li>You won&rsquo;t remember much in a week</li>
  1449. <li>You won&rsquo;t return to the slides</li>
  1450. <li>You need to capture reflections <strong>TODAY</strong></li>
  1451. <li>5 bullets per talk</li>
  1452. <li>Note links and references</li>
  1453. <li>Post a summary on your blog (or tweet it)</li>
  1454. <li>Post it at work / share with your boss</li>
  1455. </ul>
  1456. </li>
  1457. <li>Championing something requires a great deal of persuasion and charm; it&rsquo;s not what you say, it&rsquo;s what people hear.
  1458. <ul>
  1459. <li>Charm is designed and depends on context: &ldquo;Here&rsquo;s something you should be doing&rdquo; vs. &ldquo;Here&rsquo;s something that will help solve your problem&rdquo;.</li>
  1460. <li>Use language that matters to your audience.</li>
  1461. </ul>
  1462. </li>
  1463. <li>Progress is change; leaders like status quo and resist changes; therefore leaders resist progress. Powerful people want to protect their power.</li>
  1464. <li>Champions of ideas have really good networks.</li>
  1465. <li><a href="http://scottberkun.com/2014/how-to-convince-your-boss-to-try-new-things/">How to convince your boss to try new things</a>:
  1466. <ul>
  1467. <li>Be awesome at your job</li>
  1468. <li>Get support from an influential coworker</li>
  1469. <li>Plan a trial, including how to evaluate</li>
  1470. <li>Pitch it</li>
  1471. <li>Do it awesomely</li>
  1472. <li>Repeat</li>
  1473. </ul>
  1474. </li>
  1475. </ul>
  1476. <hr>
  1477. <h1 id="conclusion-2">Conclusion</h1>
  1478. <p>Here are my takeaways from the conference:</p>
  1479. <ul>
  1480. <li>We design for people, not browsers. Worry about experience before worrying about technology decisions; don&rsquo;t miss the forest for the trees.</li>
  1481. <li>We need to go back to basics to improve performance, especially on mobile. Serve static, critical-path content as quickly as possible, then progressively enhance after the page is done loading.</li>
  1482. <li>Make an effort to effectively communicate about design in ways your coworkers and superiors  will understand and benefit from, so everyone wins.</li>
  1483. </ul>
  1484. <p>Finally, I have to mention that I was delighted to see that <a href="/2013/06/25/an_event_apart_boston_2013.html">last year&rsquo;s bacon cupcakes</a> made a welcome reappearance this year:</p>
  1485. <p><img src="/post_assets/2014/05/aea_boston_2014_bacon_cupcake.jpg" alt="Bacon Cupcake"></p>
  1486. <p>As always, An Event Apart was well-organized, informative, and served as a terrific inspirational recharge.</p>
  1487. ]]>
  1488.    </content>
  1489.  </entry><entry>
  1490.    <title>Configuring SSH and SCP/SFTP on DSM 5.0 for Synology DiskStations</title>
  1491.    <link rel="alternate" type="text/html" href="https://joshdick.net/2014/04/12/configuring_ssh_and_scp_sftp_on_dsm_5.0_for_synology_diskstations" />
  1492.    <id>tag:joshdick.net,2014:/2014/04/12/configuring_ssh_and_scp_sftp_on_dsm_5.0_for_synology_diskstations.html</id>
  1493.    <published>2014-04-12T00:00:00Z</published>
  1494.    <updated>2014-04-12T00:00:00Z</updated>
  1495.    <author>
  1496.      <name>Josh Dick</name>
  1497.      <uri>https://joshdick.net</uri>
  1498.    </author>
  1499.    <content type="html" xml:lang="en">
  1500.        <![CDATA[<blockquote>Because geeky toys never work quite right out of the box.</blockquote><h2 id="introduction">Introduction</h2>
  1501. <p>After a few years of waffling back and forth over whether I really needed a NAS, I finally decided to buy one. After doing some research, the option that seemed best for my needs was the <a href="http://www.synology.com/en-global/products/overview/DS214+">Synology DS214+</a>. Synology DiskStation NASes run a Linux-based operating system called Synology DiskStation Manager (DSM). Through sheer dumb luck, I happened to purchase the NAS exactly one month after the release of a new major version of the software, DSM 5.0. The NAS was a breeze to set up, including the including the installation of the two <a href="http://www.wdc.com/en/products/products.aspx?id=810">3 terabyte Western Digital Red hard drives</a> I bought for it.</p>
  1502. <p>In general, the NAS&rsquo;s hardware and software are both great quality, but I ran into some issues after trying to interact with the NAS via SCP/SFTP. This article explains how to get SCP/SFTP working properly in DSM 5.0, exclusively using the stock software. This article assumes a basic knowledge of Linux and the DSM web interface, and thus has a corresponding level of detail. As far as I know, this information should apply to any Synology NAS running DSM 5.0, and was tested with DSM 5.0-4458 Update 2.</p>
  1503. <h2 id="enabling-services">Enabling Services</h2>
  1504. <p>DSM 5.0 includes two independent groups of service settings for SSH and SCP/SFTP.</p>
  1505. <p>Enable the SSH service by checking the Control Panel → &ldquo;Terminal &amp; SNMP&rdquo; menu → &ldquo;Terminal&rdquo; tab → &ldquo;Enable SSH service&rdquo; checkbox.</p>
  1506. <p>Enable the SFTP service (not to be confused with FTPS!) by checking the Control Panel → &ldquo;File Services&rdquo; menu → &ldquo;FTP&rdquo; tab → &ldquo;SFTP&rdquo; group → &ldquo;Enable SFTP service&rdquo; checkbox.</p>
  1507. <h2 id="enabling-ssh-users">Enabling SSH Users</h2>
  1508. <p>At this point, you should be able to successfully SSH to your NAS when authenticating as <code>root</code> or <code>admin</code>. Both users will have the password you chose for <code>admin</code> during setup. By default, those are the only two users that will be able to log in via SSH.</p>
  1509. <p>If you&rsquo;d like to enable SSH for other users, SSH in as root, and edit the file <code>/etc/passwd</code> with vi. Each user has a corresponding line in this file, and a user&rsquo;s shell setting appears at the end of a given line, after the last colon. Any user that has the the default shell setting <code>/sbin/nologin</code> won&rsquo;t be able to log in via SSH. To enable SSH for a given user, change their shell setting to match the shell setting for the root and admin users, which should be <code>/bin/sh</code>. Be careful when editing the <code>/etc/passwd</code> file; for our purposes here, you should only change the shell setting that appears after the last colon on a given line.</p>
  1510. <h2 id="enabling-the-user-home-service">Enabling the User Home Service</h2>
  1511. <p>Upon SSHing in as any user besides <code>root</code>, you might see a warning message (this example is for the &ldquo;admin&rdquo; user):</p>
  1512. <pre><code>Could not chdir to home directory /var/services/homes/admin: No such file or directory
  1513. </code></pre>
  1514. <p>This warning happens because home directories are controlled by DSM&rsquo;s &ldquo;user home service&rdquo;, which is disabled by default. To prevent the error, enable the user home service by checking the Control Panel → &ldquo;User&rdquo; menu → &ldquo;Advanced&rdquo; tab → &ldquo;User Home&rdquo; group → &ldquo;Enable user home service&rdquo; checkbox.</p>
  1515. <p>I recommend enabling the user home service even if you don&rsquo;t plan on using home directories, since leaving it disabled may cause some programs that rely on SCP/SFTP (<code>rsync</code>, etc) to abort with errors, regardless of which directory you&rsquo;re trying to manipulate.</p>
  1516. <p>By default, a given user&rsquo;s home directory is located at <code>/volume1/homes/username</code>.</p>
  1517. <h2 id="fixing-home-directory-permissions-for-ssh-public-key-authentication">Fixing Home Directory Permissions for SSH Public Key Authentication</h2>
  1518. <p>If you plan to use SSH public key authentication for a given user, the default permissions on user&rsquo;s home directories will prevent that. Making the permissions more restrictive (doing a <code>chmod 755</code> on a user&rsquo;s home directory as <code>root</code>) will allow SSH public key authentication to work properly. Of course, the user&rsquo;s <code>~/.ssh</code> folder and <code>~/.ssh/authorized_keys</code> file also need to have the correct permissions (<code>chmod 700</code> and <code>chmod 644</code>, respectively.)</p>
  1519. <h2 id="the-finish-line">The Finish Line</h2>
  1520. <p>After performing all of the aforementioned configuration tweaks, you should now have a painless SSH and SCP/SFTP experience with your Synology DiskStation NAS.</p>
  1521. <p>One final tip: I&rsquo;ve determined through experimentation that shared folders are served relative to the filesystem root (<code>/shared_folder</code>) when accessing the NAS via SFTP, but are served relative to the volume folder (<code>/volume1/shared_folder</code>) when using SCP. If specifying paths one way doesn&rsquo;t work, try the other way.</p>
  1522. ]]>
  1523.    </content>
  1524.  </entry><entry>
  1525.    <title>Everyday Carry</title>
  1526.    <link rel="alternate" type="text/html" href="https://joshdick.net/2014/02/01/everyday_carry" />
  1527.    <id>tag:joshdick.net,2014:/2014/02/01/everyday_carry.html</id>
  1528.    <published>2014-02-01T00:00:00Z</published>
  1529.    <updated>2014-02-01T00:00:00Z</updated>
  1530.    <author>
  1531.      <name>Josh Dick</name>
  1532.      <uri>https://joshdick.net</uri>
  1533.    </author>
  1534.    <content type="html" xml:lang="en">
  1535.        <![CDATA[<blockquote>What&rsquo;s in your pockets right now?</blockquote><p>What&rsquo;s in your pockets right now?</p>
  1536. <p>Maybe you have a bag with you, what&rsquo;s in there?</p>
  1537. <p>You may not have given too much thought to the things you carry around every day, but there is a term dedicated to the concept: &ldquo;everyday carry&rdquo;, or EDC.</p>
  1538. <p><a href="http://en.wikipedia.org/wiki/Everyday_carry">Wikipedia defines everyday carry</a> better than I ever could (selections edited):</p>
  1539. <blockquote>
  1540. <p>Everyday carry refers to a small collection of tools, equipment and supplies that are carried on a daily basis to assist in tackling situations ranging from the mundane to the disastrous.</p>
  1541. <p>The term EDC also refers to the philosophy or spirit of &ldquo;preparedness&rdquo; that goes along with the selection and carrying of these items. Implicit in the term is the sense that an EDC is an individual&rsquo;s personal selection of equipment, arrived at after deliberation, rather than a standardized kit.</p>
  1542. <p>EDC items normally fit in pockets or a small pack, and/or are attached to clothing such as a belt. Emphasis is placed on the usefulness, accessibility and reliability of these items.</p>
  1543. </blockquote>
  1544. <p>EDC is a hobby of sorts, so it shouldn&rsquo;t be surprising that there <a href="http://www.everydaycommentary.com">are</a> <a href="http://everyday-carry.com/">many</a> <a href="http://thenewartemis.com">blogs</a> and even <a href="http://edcforum.com">entire communities</a> dedicated to the concept.</p>
  1545. <p>I&rsquo;ve always loved gadgets of all kinds, and thus gave lots of thought to my EDC long before I first heard the term.</p>
  1546. <p>Before reading any further, you should know that I don&rsquo;t consider myself to be an expert in any of the topics I&rsquo;m going to mention, just someone who is enthusiastic about EDC and who has done a fair bit of research. It&rsquo;s possible that there could be inaccuracies in what I&rsquo;ve written here; if you notice any, please <a href="http://joshdick.net">tell me</a>! My hope in writing this is to get you to think about your EDC and to offer some examples and resources along the way.</p>
  1547. <h2 id="why-care-about-everyday-carry">Why Care About Everyday Carry?</h2>
  1548. <p>My mentality has a lot to do with what <a href="http://dcurt.is/the-best">Dustin Curtis refers to as &ldquo;The Best&rdquo;</a>. Here are some relevant excerpts:</p>
  1549. <blockquote>
  1550. <p>&ldquo;The best&rdquo; isn&rsquo;t necessarily a product or thing. It&rsquo;s the reward for winning the battle fought between patience, obsession, and desire. It takes an unreasonably long amount of time to find the best of something. It requires that you know everything about a product&rsquo;s market, manufacture, and design, and that you can navigate deceptive pricing and marketing. It requires that you find the best thing for <em>yourself</em>, which means you need to know what actually matters to you.</p>
  1551. <p>If you&rsquo;re an unreasonable person, trust me: the time it takes to find the best of something is completely worth it. It&rsquo;s better to have a few fantastic things designed for you than to have many untrustworthy things poorly designed to please everyone. The result—being able to blindly trust the things you own—is intensely liberating.</p>
  1552. </blockquote>
  1553. <p>From an EDC perspective, &ldquo;the best&rdquo; doesn&rsquo;t necessarily mean &ldquo;the most expensive&rdquo; or &ldquo;the flashiest&rdquo;. To me, it means that each individual item in a person&rsquo;s EDC is the ideal realization of that item <em>for that person</em>. It also means that all of the items in a person&rsquo;s EDC should cohesively complement each other as the best possible EDC <em>for that person</em>. It means that the things a person carries with them every day should <em>deserve</em> to be carried every day.</p>
  1554. <p>For example, if you carry a wallet, is your wallet really &ldquo;the best&rdquo; wallet for you? Is it a <a href="http://www.youtube.com/watch?v=yoPf98i8A0g">George Costanza wallet</a> that just needs to be cleaned out? Or maybe your wallet is bursting at the seams with plastic cards, and carrying a separate cardholder would make more sense? As another example, maybe finding your keys when you get home always ends up being an adventure in your bag, and then you end up fumbling with them in the dark? Could a better keychain and a small flashlight remove that small amount of frustration from your everyday life?</p>
  1555. <p>I am obsessed with removing frustrations like these, and that&rsquo;s why I care about finding &ldquo;the best&rdquo; EDC for myself. I try to keep my EDC as minimal as possible while still being functional. Being the gadget lover that I am, I also enjoy taking the time to put some thought and research into everything I carry.</p>
  1556. <p>All of that said, there&rsquo;s no such thing as the &ldquo;perfect EDC&rdquo;. A person&rsquo;s EDC will naturally change and evolve over time to meet their needs, always working towards &ldquo;the best&rdquo; EDC for them. What&rsquo;s more, one person&rsquo;s ideal EDC certainly isn&rsquo;t going to be ideal for everyone. If you work in an office like I do, your EDC is probably going to look very different than that of someone who, for example, works on oil rigs.</p>
  1557. <h2 id="my-everyday-carry">My Everyday Carry</h2>
  1558. <p>Seeing others&rsquo; EDC is both informative and fascinating, not only because you can draw inspiration for your own EDC, but also because it&rsquo;s interesting to see the stories that people&rsquo;s possessions tell about them.</p>
  1559. <p>To that end, I&rsquo;ll go through my own current EDC in detail and explain some of the thinking behind it. Even so, my EDC is always changing and evolving over time. While I certainly carry different things or sets of things depending on the situation (for example, I bring a laptop messenger bag to work), I consider my &ldquo;EDC proper&rdquo; to be the things I carry almost all of the time, regardless of the situation or context.</p>
  1560. <p>Without any further ado, here&rsquo;s what it looks like:</p>
  1561. <p><img src="/post_assets/2014/02/edc_overall.jpg" alt="Josh&rsquo;s EDC"></p>
  1562. <p>So, what is all that stuff?</p>
  1563. <h3 id="wallet">Wallet</h3>
  1564. <p>I&rsquo;m not a fan of money clips, so I carry a wallet. My wallet is a <a href="https://www.etsy.com/listing/165266399/the-park-sloper-senior-wallet-notebook">Park Sloper Senior from One Star Leather Goods</a>. I carry a few cards including credit/debit cards, insurance cards, and my driver&rsquo;s license. I also like carrying paper money if I happen to need it, but I avoid carrying coins. One Star Leather Goods is a one-man operation running out of Los Angeles, CA. This is what appears on <a href="https://www.etsy.com/people/onestarleathergoods">their Etsy people page</a>:</p>
  1565. <blockquote>
  1566. <p>&ldquo;Buy good things, own them for a long time.&rdquo;</p>
  1567. <p>That napkin wisdom is borrowed from the internets and it&rsquo;s message is the basis of my philosophy. Today&rsquo;s &ldquo;buy it cheap then throw it away&rdquo; consumer environment is unsustainable and largely irresponsible. Do your research, find something that suits your needs and is well made, pay a fair price for it and be rewarded by years of happy use. Support your local independent craftsman over a big box retailer and search out unique and well made items.</p>
  1568. <p>While I believe that &ldquo;the best things in life aren&rsquo;t things,&rdquo; the things that you do need should be pleasurable to use and pleasurable to look at: simple, functional, durable and beautiful. I have a somewhat obsessive desire for perfection and put a high value on items that are designed and executed to the highest standards&hellip;</p>
  1569. </blockquote>
  1570. <p>Sound familiar?</p>
  1571. <p>I love the Park Sloper Senior because it looks classy, it&rsquo;s an extremely high quality handmade piece, and it holds my cash and cards while also accommodating a notebook and pen, all without being too bulky. Its larger size makes it strictly a &ldquo;jeans back pocket&rdquo; wallet, which isn&rsquo;t for everyone, but One Star does make a <a href="https://www.etsy.com/listing/113350221/wallet-notebook-pen-the-park-sloper-hand">smaller, front-pocket-friendly</a> version of the Park Sloper. I like carrying a notebook and pen in order to use the <a href="http://www.bulletjournal.com/">Bullet Journal system</a>, which I&rsquo;ve found works well for me—better than any productivity-related iPhone app I&rsquo;ve tried. I use a <a href="http://fieldnotesbrand.com">Field Notes 48-page notebook</a> and a <a href="http://www.jetpens.com/Uni-Style-Fit-Single-Color-Slim-Pen-Body-Component-Black/pd/5153">Uni-Ball Style Fit pen</a> with a <a href="http://www.jetpens.com/Uni-Style-Fit-Ballpoint-Multi-Pen-Ink-Cartridge-0.7-mm-Black/pd/4767">0.7mm Jetstream refill</a>. Sometimes, I also carry a <a href="http://www.amazon.com/uni-ball-Jetstream-Retractable-Roller-70877/dp/B002FSZP5A/">0.7mm Uni-Ball Jetstream RT pen</a>. The Park Sloper easily accommodates the slim Style Fit (<a href="https://twitter.com/dowdyism/status/422914458147889152">thanks, Brad!</a>), but the Jetstream RT is too thick to fit into the Park Sloper. Uni-Ball&rsquo;s Jetstream series pens are cheap, write smoothly, and are <a href="http://thewirecutter.com/reviews/the-best-pen/">very highly regarded</a>. Most importantly, Jetstream ink dries quickly; as a lefty, ink doesn&rsquo;t smear all over my hand when I write.</p>
  1572. <p>Before arriving at the Park Sloper, in the past (going back a few years—I don&rsquo;t buy wallets frequently and don&rsquo;t want to have to), I&rsquo;ve also tried:</p>
  1573. <ul>
  1574. <li>An <a href="http://obstructures.org/thing/wallet-aluminum-plate/">Aluminum Plate Wallet from Obstructures</a> which was obviously extremely durable, and had a cool gimmick/novelty factor. In practice, though, it ended up being awkward to quickly access cash and cards, which is an essential feature for a wallet.</li>
  1575. <li>A <a href="http://bellroy.com/wallets/note-sleeve-wallet">Note Sleeve wallet from Belroy</a>, which was well-made and not too bulky, but whose lining eventually wore out and bled color onto some of my cards.</li>
  1576. <li>A wallet from <a href="http://www.saddlebackleather.com/Shop/Wallets">Saddleback Leather</a>, which was also very high quality, but was too bulky for my taste. It seems to me that most of their practical wallet designs have similar bulkiness problems, and their thinner designs are too minimal.</li>
  1577. <li>A <a href="http://www.all-ett.com/mens-wallets/nylon-wallet.html">nylon wallet from All-Ett</a>, which is probably the slimmest wallet you can buy, but which wore out quickly because the material was so thin.</li>
  1578. </ul>
  1579. <h3 id="watch">Watch</h3>
  1580. <p><img src="/post_assets/2014/02/edc_watch.jpg" alt="Halios Tropik SS Watch"></p>
  1581. <p>I&rsquo;ve always loved watches. With today&rsquo;s ubiquitous mobile phones, many people no longer bother wearing a watch, but I can&rsquo;t picture myself without one. I especially love mechanical watches (as in &ldquo;no electricity involved&rdquo;), although they certainly don&rsquo;t keep time as accurately as quartz watches. I think there&rsquo;s something special about keeping a tiny, intricate, dependable machine on your wrist, with you always.</p>
  1582. <p>When it comes to the outward look and design of a watch, I&rsquo;m a fan of understated simplicity. I&rsquo;ve gone through far too many watches to list here, and wear different ones depending on my mood, but here are my current three favorites:</p>
  1583. <ul>
  1584. <li>The watch in the picture is the <a href="http://halioswatches.com/tropikss/">Halios Tropik SS</a>. It&rsquo;s a very high-quality piece and a beautiful work of art.</li>
  1585. <li>My other go-to watch is the <a href="http://technewatches.biz/category.php?id_category=6">Techné GosHawk</a>, another high-quality piece that&rsquo;s more affordable than the Halios.</li>
  1586. <li>My &ldquo;beater&rdquo; watch, which I wear in situations I wouldn&rsquo;t want to expose the nicer mechanical watches to, is a <a href="http://www.amazon.com/Casio-GWM5610-1-G-Shock-Multi-Band-Digital/dp/B007RWZHXO">Casio G-Shock GWM5610-1</a>. I love the retro styling, the fact that it&rsquo;s solar powered (and hence never needs battery changes), and that it has the ability to set itself using atomic clock radio signals. The watch has been put through its paces and still looks great.</li>
  1587. </ul>
  1588. <p>If you&rsquo;re intrigued by mechanical watches but have reservations about buying one, they don&rsquo;t necessarily have to break the bank—the <a href="http://www.amazon.com/Seiko-SNK809-Automatic-Watch-Canvas/dp/B002SSUQFG/">Seiko SNK809</a> is a great entry-level automatic (self-winding) mechanical watch. If you want to learn more about the world of watches in general, this <a href="http://www.everydaycommentary.com/2013/09/a-watch-primer.html">excellent primer from Everyday Commentary</a> is a great place to start.</p>
  1589. <h3 id="tools-gadgets-and-keys">Tools, Gadgets, and Keys</h3>
  1590. <p>Tools and gadgets encompass what is probably the largest rabbit hole as far as EDC is concerned; there are an overwhelming number of EDC-related tools—and options for carrying tools—available on the market.</p>
  1591. <h4 id="pocket-danglerssuspension-clips">Pocket Danglers/Suspension Clips</h4>
  1592. <p>Gadgets known as &ldquo;pocket danglers&rdquo; or &ldquo;suspension clips&rdquo; are popular among EDC enthusiasts. These gadgets provide a way of attaching tools/keys/other gadgets to them, and hang from a pocket or belt loop. The idea behind them is that they &ldquo;suspend&rdquo; attached items in the middle of a pocket in order to prevent those items from awkwardly bunching up at the bottom of a pocket. Suspension clips and pocket danglers often double as tools themselves.</p>
  1593. <p>I currently use a <a href="http://ttpockettools.blogspot.com/p/pocket-tools.html">TT PocketTTools 69 Dangler Tool</a>, which doubles as a bottle opener and cap twist assist. Although I don&rsquo;t use the twist assist, it&rsquo;s handy to always have a bottle opener on my belt loop. I love that the dangler is designed in such a way that its use as a bottle opener isn&rsquo;t obstructed by the items attached to it. I&rsquo;ve tried a few other danglers/suspension clips in the past:</p>
  1594. <ul>
  1595. <li>The <a href="http://shop.corterleather.com/products/bottlehook">Corter Leather Bottle Hook</a>, another bottle-opening belt loop keychain. I really like the Bottle Hook, but the 69 dangler  does a better job of evenly spreading out attached items inside a pocket. The Bottle Hook is also larger than the 69 dangler, which causes attached items to sit comparatively lower in a pocket.</li>
  1596. <li>The <a href="http://www.gamblemade.com/">Gamble Made GearPull Dangler</a>, which I <a href="https://www.kickstarter.com/projects/872996112/the-gearpull-a-revolutionary-dangler">backed on Kickstarter</a> on a whim since it looked interesting. Like the 69 Dangler, the GearPull does a decent job of evenly spreading out attached items inside a pocket. Unlike the 69 Dangler, I was constantly afraid that the GearPull would fall off my pants. Its clip mechanism has a large gap that causes it to sit uncomfortably loosely on a pocket (or at least on my pocket.)</li>
  1597. <li>The <a href="http://www.tecaccessories.com/P-7-Suspension-Clip">TEC Accessories P-7 Suspension Clip</a>. This clip has the most minimal design of the ones I&rsquo;ve listed. At $12 as of this writing, I think the clip is expensive for what it is. It didn&rsquo;t hold up well for me in the long term; the steel gradually bent until it had the same looseness problem as the GearPull.</li>
  1598. </ul>
  1599. <p>My tools and gadgets are attached to the 69 dangler using a combination of common split rings and <a href="http://www.tecaccessories.com/15-mm-Pico-Gate-Clip-Stainless-Steel">TEC Accessories 15 mm Pico Gate Clips</a>. All of the attached tools can be easily removed from the dangler without fiddling with split rings. The tiny gate clips perfectly fit into the dangler&rsquo;s holes and are used to attach tools that don&rsquo;t provide their own detaching/quick release mechanism. All other tools are directly attached to the dangler with split rings.</p>
  1600. <h4 id="tools-on-the-69-dangler">Tools On the 69 Dangler</h4>
  1601. <p><img src="/post_assets/2014/02/edc_tools.jpg" alt="Josh&rsquo;s EDC Tools"></p>
  1602. <p>From top to bottom, these are the items attached to the 69 dangler:</p>
  1603. <ul>
  1604. <li><a href="http://www.leatherman.com/20.html">Leatherman Micra Multi-Tool</a>. The Micra includes a whole bunch of tools but I primarily use its knife and scissors.</li>
  1605. <li><a href="http://darksucks.com/store_BetaQR.html">Prometheus Lights Beta-QR in Electroless Nickel</a>. For the money, I believe this is the best keychain flashlight on the market right now. It&rsquo;s   very high quality and durable, looks great, has decent light output, uses a <a href="http://en.wikipedia.org/wiki/High_CRI_LED_Lighting">high-CRI emitter</a>, and is powered by a standard AAA battery. It also has an ingeniously simple quick-release mechanism.</li>
  1606. <li><a href="http://www.countycomm.com/splitpea.htm">County Comm &ldquo;Split Pea&rdquo; Peanut Lighter</a>. This lighter is essentially a tiny Zippo; it uses lighter fluid rather than butane. It is comprised of two halves that screw together with an O-ring between them, ensuring that lighter fluid doesn&rsquo;t leak or evaporate. I don&rsquo;t smoke, but I carry the lighter because it&rsquo;s cheap, tiny, interesting, and could be useful in a pinch.</li>
  1607. <li><a href="http://www.niteize.com/product/DoohicKey-Multi-Tool.asp">Nite Ize DoohicKey One-Piece Multitool</a>. Its ruler and bottle opener might be redundant among the other tools, but it works great for light prying tasks and for opening boxes. I like its slim profile and the fact that it has its own integrated spring clip. Since it costs about $5, buying one is a no-brainer.</li>
  1608. <li><a href="http://www.lacie.com/us/products/product.htm?id=10617">LaCie Porsche Design USB Key</a>. I&rsquo;ve  used, abused, and destroyed more flash drives over the years than I can count. Before this flash drive, I carried the <a href="http://www.kingston.com/us/usb/personal_business#dtse9h">Kingston Data Traveler SE9</a>. Both flash drives are slim, reasonably priced, and have metal enclosures that can generally survive being knocked around with the other tools on the dangler. Although it&rsquo;s not the fastest flash drive on the market, the LaCie unit is USB 3.0 while the Kingston is USB 2.0. Also, the Kingston&rsquo;s USB circuit board is simply glued in to its metal enclosure, and the glue eventually failed for me, yielding an empty metal skeleton along with a bare circuit board. I haven&rsquo;t had any issues with the LaCie so far.</li>
  1609. </ul>
  1610. <h3 id="miscellaneous">Miscellaneous</h3>
  1611. <p>There are a few other things I carry that don&rsquo;t need much elaboration:</p>
  1612. <ul>
  1613. <li><a href="http://www.burtsbees.com/Beeswax-Lip-Balm/11099-00-1,default,pd.html?cgid=lipbalm&amp;start=2&amp;q=#start=2">Burt&rsquo;s Bees Beeswax Lip Balm</a>. I have perpetually dry lips year round, and the &ldquo;cool burn&rdquo; sensation of beeswax lip balm helps. I always peel the label off the Burt&rsquo;s Bees stick whenever I start using a new one; otherwise, excess adhesive around the label collects pocket lint and looks gross.</li>
  1614. <li>Two <a href="http://www.epipen.com">EpiPens</a> along with <a href="http://www.benadryl.com">Benadryl</a> tablets in a <a href="http://www.kozyepi.com">Kozyepi case</a> (not pictured). I have a nut allergy and carry these for emergency use.</li>
  1615. <li><a href="http://www.apple.com/iphone-5s/">Apple iPhone 5S</a> smartphone in a black <a href="http://store.magpul.com/product/MAG452/125">Magpul Field Case</a>. My iPhone is like a third arm for me. The Magpul case is reasonably priced, excellent quality, and fits the phone like a glove. Magpul also makes a similar, beefier case called the <a href="http://store.magpul.com/product/MAG454/125">Bump Case</a>, but I don&rsquo;t need the additional protection or bulk. I previously used <a href="http://store.apple.com/us/product/MF041LL/A/iphone-5s-case-brown">Apple&rsquo;s own leather iPhone 5S case</a> in black, and while the case was well constructed, the leather scratched very easily.</li>
  1616. <li>The <a href="http://www.misfitwearables.com">Misfit Shine</a> fitness tracker. It&rsquo;s an interesting little device. Because I only use it as a pedometer, the fact that I carry an iPhone 5S that works with <a href="http://david-smith.org/">David Smith&rsquo;s</a> excellent, free <a href="https://itunes.apple.com/us/app/pedometer++/id712286167">Pedometer++ App</a> makes the Shine somewhat redundant. The Shine&rsquo;s automatic iPhone sync also doesn&rsquo;t work reliably for me. Despite all of that, it fits in the coin pocket of my jeans and certainly isn&rsquo;t weighing me down or getting in the way, so it&rsquo;s still part of my EDC.</li>
  1617. <li>An orange <a href="http://www.monkeyknuts.com/Knut-Buster-Keychain-p/buster.htm">Monkey Knuts Knut Buster Keychain</a> with five keys. <a href="http://et-designs.com">Gadgets</a> <a href="http://tacticalkeychains.com/">for</a> <a href="http://www.cineik.com/k-addict.html">carrying</a> <a href="http://mykeyflip.com/">keys</a> <a href="http://key-disk.com/">abound</a> <a href="http://mykeysmart.com/">on</a> <a href="https://www.kickstarter.com/projects/2083673703/alpha-the-worlds-best-keychain">Kickstarter</a> <a href="http://key-disk.com/">and</a> <a href="http://www.orbitkey.com/">elsewhere</a>. I&rsquo;ve realized over time that I don&rsquo;t really need to keep keys with all the time, so I&rsquo;ve more or less ignored most key-carrying solutions. One notable exception for me is the <a href="http://bladekey.com/">BladeKey Bolt</a>, which worked great when I regularly included keys as part of my EDC. The large monkey fist knot on the Knut Buster I use now makes it easy to grab my keys when I actually do need them.</li>
  1618. </ul>
  1619. <p>&hellip;And there you have it: my EDC explained in painstaking detail. As you can see, I&rsquo;ve put a lot of thought (and over time, a pretty penny) into my EDC, and it is constantly evolving.</p>
  1620. <h2 id="other-thoughts-on-tools-and-gadgets">Other Thoughts on Tools and Gadgets</h2>
  1621. <p>There are several types/categories of tools I used to carry that have either been displaced by what I&rsquo;m carrying now, or that I discovered I can get along just fine without. There are hundreds or even thousands of tools available on the market in each of these categories, made by both production manufacturers and smaller, custom manufacturers or individuals.</p>
  1622. <p>Needless to say, researching and choosing tools in these categories can easily be overwhelming.</p>
  1623. <p>Most of these categories have Internet communities dedicated to them, which can help with research. Although I don&rsquo;t participate directly in most of the communities I&rsquo;m going to mention, I&rsquo;ve discovered them through Google and other Internet EDC research.</p>
  1624. <h3 id="flashlights">Flashlights</h3>
  1625. <p>I&rsquo;ve carried flashlights for a very long time. I use them constantly, whether it&rsquo;s for doing something outdoors at night or for being able to see better in tight spots behind computers. For a while, I liked carrying a pocket-sized clip-on flashlight as part of my EDC, but I eventually realized clip-on flashlights generally produced more light than I needed in most situations, and therefore weren&rsquo;t worth the space they occupied in my pocket.</p>
  1626. <p>Before I added the aforementioned <a href="http://darksucks.com/store_BetaQR.html">Prometheus Lights Beta-QR</a> to my EDC, I carried a <a href="http://www.velenodesigns.com/?p=168">Veleno Designs/Steve Ku Quantum D2</a>. The D2 is <strong>tiny</strong>, which is both a good and bad thing. Its small size makes it easy to carry, and it has great light output for its size. However, it uses an obscure type of rechargeable lithium ion battery (which needs to be recharged fairly often due to its size.) I ended up switching to the Beta-QR since it&rsquo;s still a manageable size and uses a standard AAA battery (NiMH rechargeable or alkaline), both of which are much more readily available and have higher capacities than the D2&rsquo;s battery, and therefore less likely to let me down when I need to rely on the light.</p>
  1627. <p>If you want to do more research on flashlights, the predominant flashlight community on the Internet is <a href="http://www.candlepowerforums.com">Candle Power Forums</a>. When researching flashlights, pay close attention to the type of batteries they use. A flashlight&rsquo;s batteries give you a general idea of its size and runtime. Additionally, some flashlights use slightly less common types of batteries such as <a href="https://www.google.com/search?q=cr123">CR123 cells</a>, which could either be acceptable or negative depending on your needs.</p>
  1628. <p>Although there are dozens of flashlight manufacturers, some popular manufacturers in no particular order are <a href="http://www.foursevens.com">4Sevens</a>, <a href="http://www.fenixlight.com">Fenix</a>, <a href="http://www.eagletac.com">EAGTAC</a>, and <a href="http://sunwayman.com">Sunwayman</a>.</p>
  1629. <h3 id="knives">Knives</h3>
  1630. <p>I don&rsquo;t carry a knife for self-defense purposes; instead I carry one simply because a knife is handy to have around. I primarily use knives for opening bubble mailer envelopes, for opening and breaking down boxes, and for cutting cable ties. In a similar vein to flashlights, I&rsquo;ve gradually minimized my knife carry over time. (Do you see a trend here?) I used to carry  a folding knife but eventually realized I generally didn&rsquo;t need a folding knife on my person at all times. In combination, the aforementioned <a href="http://www.niteize.com/product/DoohicKey-Multi-Tool.asp">Nite Ize DoohicKey</a> and <a href="http://www.leatherman.com/20.html">Leatherman Micra</a> work well for 90% of my cutting tasks. I still keep folding knives around (though not as part of my EDC) for everything else.</p>
  1631. <p>There&rsquo;s a lot to learn about knives, including types of blade steels and shapes, handle (&ldquo;scale&rdquo;) materials, locking mechanisms, and stropping and sharpening tools and techniques. As with flashlights, there are Internet knife communities such as <a href="http://www.bladeforums.com">Blade Forums</a> and <a href="http://www.knifeforums.com">Knife Forums</a> that can help with further research. Also as with flashlights, there are dozens of knife manufacturers. Some popular knife manufacturers, again in no particular order, include <a href="http://sogknives.com">SOG Knives</a>, <a href="http://www.crkt.com/">Columbia River Knife and Tool (CRKT)</a>, <a href="http://www.spyderco.com">Spyderco</a>, <a href="http://kershaw.kaiusaltd.com/">Kershaw Knives</a>, <a href="http://www.benchmade.com">Benchmade</a>, and <a href="http://www.boker.de/us/">Böker</a>.</p>
  1632. <p>Although I no longer regularly EDC a folding knife, I still have some favorites:</p>
  1633. <ul>
  1634. <li>The <a href="http://www.spyderco.com/catalog/details.php?product=766">Spyderco Techno</a> for its superior build quality, materials, and surprising carryability and ergonomics in spite of its relative thickness.</li>
  1635. <li>The <a href="http://www.sogknives.com/flash-i-straight-edge.html">SOG Knives Flash I Straight Edge</a>  for its small size, its pocket clip that carries very deeply in a pocket so it won&rsquo;t fall out or get caught on something, and its spring-assisted opening, all while being affordable at around $30.</li>
  1636. <li>The <a href="http://www.benchmade.com/products/585">Benchmade 585 BK Mini-Barrage</a>, which I impulse purchased in person from a dealer without doing any prior research, because I got it at a great price, it oozes quality, and it has a very solid-feeling axis locking mechanism.</li>
  1637. <li>The <a href="https://www.boker.de/us/pocket-knife/boker-plus/tactical-knife/01BO531.html">Böker Keycom</a>, which is probably the smallest frame-locking knife on the market today. It&rsquo;s decent quality, feels right at home on a keychain, and is very affordable at about $15. This was the last item to be removed from my EDC (I swapped it out for the <a href="http://www.leatherman.com/20.html">Leatherman Micra</a>.)</li>
  1638. <li>The <a href="http://www.spyderco.com/catalog/details.php?product=374">Spyderco Bug</a>, because it&rsquo;s both cheap and extremely small while still being useful. That said, it&rsquo;s a bit hard to open because of its size.</li>
  1639. </ul>
  1640. <h3 id="multitools">Multitools</h3>
  1641. <p>I personally categorize multitools into two distinct groups. The first group is what I would call &ldquo;conventional&rdquo; multitools such as <a href="http://www.leatherman.com">Leatherman&rsquo;s folding tools</a> or <a href="http://www.victorinox.com">Victorinox Swiss Army knives</a>. (I believe Swiss Army knives are better categorized as multitools rather than knives, but it&rsquo;s a matter of opinion.) The second group is what has come to be known as &ldquo;one-piece multitools&rdquo;, or &ldquo;OPMTs&rdquo;. OPMTs are generally milled from a single piece of metal and have no moving parts.</p>
  1642. <p>The predominant Internet multitool community is <a href="http://multitool.org">multitool.org</a>.</p>
  1643. <p>Similar to my thinking behind carrying a knife, I think multitools are simply handy to have around. Many multitools have an integrated knife which may be fine for your needs, and could eliminate the need to carry a separate, dedicated knife, which is what happened in my case.</p>
  1644. <p>I&rsquo;ve carried a few different multitools across both types, and in fact, still do: the <a href="http://www.leatherman.com/20.html">Leatherman Micra</a>, the <a href="http://www.niteize.com/product/DoohicKey-Multi-Tool.asp">Nite Ize DoohicKey</a>, and the <a href="http://ttpockettools.blogspot.com/p/pocket-tools.html">TT PocketTTools 69 Dangler Tool</a>. (I would classify the DoohicKey as an OPMT even though it&rsquo;s not technically a single piece of metal.)</p>
  1645. <p>That said, I&rsquo;ve done the least amount of experimenting in the multitool category.</p>
  1646. <p>For a while I carried a <a href="https://www.swissarmy.com/us/product/Swiss-Army-Knives/Category/Everyday/Rambler/54031">Victorinox Rambler</a> which I loved as a multitool, but which ended up getting beat up by the rest of my EDC gadgets to the point that it started bothering me. I also tried carrying a larger <a href="http://www.leatherman.com/9.html">Leatherman Sidekick</a>, which is reasonably affordable at about $30, but it ended up being too large and cumbersome for my own EDC purposes. I still keep it in the laptop bag I take with me to work. (If you like the Sidekick, you might also want to take a look at its brother, the <a href="http://www.leatherman.com/831426.html">Leatherman Wingman</a>.)</p>
  1647. <p>In terms of OPMTs, <a href="http://www.atwoodknives.com/">Atwood Knife and Tool</a> is probably the biggest name in the game. Peter Atwood makes and sells his own tools in batches on <a href="http://atwoodknives.blogspot.com">his blog</a>. They usually sell out within minutes, and are often <a href="http://www.ebay.com/sch/i.html?_odkw=atwood+tool&amp;_osacat=0&amp;_from=R40&amp;_nkw=atwood+tool&amp;_sacat=0">resold with a large premium on eBay</a>. I&rsquo;ve been lucky enough to be able to purchase a few OPMTs directly from Peter. While his tools are extremely well made, I no longer carry them as part of my EDC because I didn&rsquo;t use them often enough to justify their size and weight (and no, I still have them—I haven&rsquo;t resold them on eBay!)</p>
  1648. <p>Many other individuals make and sell OPMTs, such as the aforementioned <a href="http://ttpockettools.blogspot.com">TT PockeTTools</a>, which I understand is also a single-man operation. Various bigger companies also sell OPMTs. Leatherman <a href="http://www.leatherman.com/s/leatherman/pockettools">has its own line</a>, and Gerber sells the <a href="http://www.gerbergear.com/Essentials/Tools/Shard-Keychain-Tool_22-01769">Shard Keychain Tool</a>, which is extremely affordable at about $6.</p>
  1649. <h2 id="in-conclusion">In Conclusion&hellip;</h2>
  1650. <p>I&rsquo;ve given you a detailed tour of my EDC, and I&rsquo;ve explained the thinking behind some of my past and present EDC choices. I&rsquo;ve also pointed out some resources that you can use to do your own EDC research.</p>
  1651. <p>EDC as a hobby can certainly be interesting and fun in and of itself, but don&rsquo;t take it <em>too</em> seriously—lots of EDC experimentation can get expensive quickly! Take some time to think about what works for you and what could be made better, then experiment.</p>
  1652. <p>Ultimately, your EDC is an expression of yourself, and should augment your day-to-day life. Get out there and live it!</p>
  1653. <hr>
  1654. <p><em>2014-02-02: Added information about the Uni-Ball Style Fit pen that was accidentally omitted.</em></p>
  1655. ]]>
  1656.    </content>
  1657.  </entry><entry>
  1658.    <title>Forecast.io Weather on the Mac Desktop</title>
  1659.    <link rel="alternate" type="text/html" href="https://joshdick.net/2013/10/10/forecast.io_weather_on_the_mac_desktop" />
  1660.    <id>tag:joshdick.net,2013:/2013/10/10/forecast.io_weather_on_the_mac_desktop.html</id>
  1661.    <published>2013-10-10T00:00:00Z</published>
  1662.    <updated>2013-10-10T00:00:00Z</updated>
  1663.    <author>
  1664.      <name>Josh Dick</name>
  1665.      <uri>https://joshdick.net</uri>
  1666.    </author>
  1667.    <content type="html" xml:lang="en">
  1668.        <![CDATA[<blockquote>Because I could.</blockquote><p>When I saw that the excellent weather service <a href="http://forecast.io">forecast.io</a> released a feature called <a href="http://blog.forecast.io/forecast-embeds/">Forecast Embeds</a>, I thought it would be neat to show the widget directly on my Mac&rsquo;s desktop. I whipped up a solution that ended up looking like this:</p>
  1669. <p><img src="/post_assets/2013/10/forecast_weather_example.png" alt="forecast.io Weather Example"></p>
  1670. <p>Read on to learn how get Forecast Embeds up and running on your Mac&rsquo;s desktop.</p>
  1671. <h2 id="dependencies">Dependencies</h2>
  1672. <ul>
  1673. <li><a href="http://projects.tynsoe.org/en/geektool/">GeekTool</a>, <a href="http://mutablecode.com/apps/nerdtool.html">NerdTool</a>, or any other tool that can display an image directly on the desktop</li>
  1674. <li>The following command-line utilities, all of which are available via <a href="http://brew.sh">Homebrew</a> on OS X:
  1675. <ul>
  1676. <li><a href="http://www.paulhammond.org/webkit2png/">webkit2png</a></li>
  1677. <li><a href="http://www.imagemagick.org/script/index.php">ImageMagick</a></li>
  1678. </ul>
  1679. </li>
  1680. <li><a href="https://gist.github.com/joshdick/6919331"><code>forecast_snapshot.sh</code></a>, a simple shell script I wrote</li>
  1681. </ul>
  1682. <h2 id="how-it-works">How it Works</h2>
  1683. <ul>
  1684. <li>On a reasonably slow interval, the <code>forecast_snapshot.sh</code> script automatically takes a screenshot of the Forecast Embeds page with the latest weather data, and stores that screenshot on the filesystem. It then does some image processing on the screenshot to make it look more attractive when overlaid onto a wallpaper.</li>
  1685. <li>On a reasonably fast interval, the screenshot is automatically [re-]displayed on the desktop.</li>
  1686. </ul>
  1687. <h2 id="getting-it-going">Getting it Going</h2>
  1688. <ol>
  1689. <li>
  1690. <p>Install the dependencies listed above, and grab a copy of the <a href="https://gist.github.com/joshdick/6919331"><code>forecast_snapshot.sh</code> script</a>.</p>
  1691. </li>
  1692. <li>
  1693. <p>Edit the variables in <code>forecast_snapshot.sh</code> to your liking.</p>
  1694. <p>You&rsquo;ll need to provide the latitude/longitude for your area, which you can find using a service like <a href="http://www.latlong.net/">latlong.net</a>. There are several available options that aren&rsquo;t part of the script, but can be added to the Forecast Embeds URL in the script. See the <a href="http://blog.forecast.io/forecast-embeds/">Forecast Embeds documentation</a> for details.</p>
  1695. </li>
  1696. <li>
  1697. <p>Run <code>forecast_snapshot.sh</code> and verify that the image file <code>/tmp/weather-full.png</code> is created on your system, and contains the font/text/weather information you expect.</p>
  1698. </li>
  1699. <li>
  1700. <p>Embed the <code>/tmp/weather-full.png</code> image on your desktop using GeekTool (or your tool of choice.) I configured GeekTool to refresh the image every minute.</p>
  1701. </li>
  1702. <li>
  1703. <p>Make <code>forecast_snapshot.sh</code> automatically run on an interval (15 minutes seems reasonable). You can do this via GeekTool or <code>launchd</code>.</p>
  1704. </li>
  1705. <li>
  1706. <p>You&rsquo;re done.</p>
  1707. </li>
  1708. </ol>
  1709. <h2 id="final-thoughts">Final Thoughts</h2>
  1710. <p>Forecast Embeds are simple web pages that include animations, so the sceenshots that are taken will inevitably catch the animations mid-frame. If you prefer to keep the animations working, you can use something like <a href="http://fluidapp.com/">Fluid</a> to float the Forecast Embeds page on your desktop as its own app, but it won&rsquo;t be transparent and thus won&rsquo;t blend in with your wallpaper.</p>
  1711. ]]>
  1712.    </content>
  1713.  </entry><entry>
  1714.    <title>Making Git a Little Fuzzier</title>
  1715.    <link rel="alternate" type="text/html" href="https://joshdick.net/2013/09/02/making_git_a_little_fuzzier" />
  1716.    <id>tag:joshdick.net,2013:/2013/09/02/making_git_a_little_fuzzier.html</id>
  1717.    <published>2013-09-02T00:00:00Z</published>
  1718.    <updated>2013-09-02T00:00:00Z</updated>
  1719.    <author>
  1720.      <name>Josh Dick</name>
  1721.      <uri>https://joshdick.net</uri>
  1722.    </author>
  1723.    <content type="html" xml:lang="en">
  1724.        <![CDATA[<blockquote>A command-line wrapper for Git that does fuzzy filename matching.</blockquote><p>As I wrote in a <a href="/2012/12/30/my_git_prompt_for_zsh.html">previous post</a>, I constantly use <a href="http://git-scm.com">Git</a> on the command line. The command line is simply the fastest and easiest way for me to work with Git.</p>
  1725. <p>That said, one understandable aspect of working with Git on the command line is that file/directory paths must be explicitly specified. This means that while in the middle of typing a Git command, I often end up needing to do one or both of the following:</p>
  1726. <ul>
  1727. <li>
  1728. <p>Move a hand from the keyboard to the mouse in order to select and copy a path from the output of <code>git status</code>, then return to the keyboard to paste the path</p>
  1729. </li>
  1730. <li>
  1731. <p><code>cd</code> to a random directory (usually aggressively ramming the tab key) in order to either get <code>git status</code> to spit out a copyable path, or at least low enough into the directory tree to be able to have <code>git &lt;git command&gt; .</code> manipulate the desired path(s)</p>
  1732. </li>
  1733. </ul>
  1734. <p>While neither of these take a long time, they&rsquo;re both annoying.</p>
  1735. <p>After searching for tools to attack this problem and not finding anything that worked well for me, I decided to create <a href="http://joshdick.github.io/git-fuzzy/"><code>git-fuzzy</code></a>.</p>
  1736. <p><code>git-fuzzy</code> simply wraps normal Git commands and (for now) assumes that its last argument should be a path that should be fuzzy-completed.</p>
  1737. <p>So, instead of having to do something like:</p>
  1738. <pre><code> git add another/very/long/path/myawesomefile.ext
  1739. </code></pre>
  1740. <p><code>git-fuzzy</code> makes things pleasantly fuzzier:</p>
  1741. <pre><code> git fuzzy add awesome
  1742. </code></pre>
  1743. <p>The tool is tiny, basic and somewhat crude, but so far it gets the job done for me.</p>
  1744. <p><code>git-fuzzy</code> is <a href="http://joshdick.github.io/git-fuzzy/">available on GitHub</a> and is <a href="https://npmjs.org/package/git-fuzzy">installable via <code>npm</code></a>.</p>
  1745. <p>If you end up using <code>git-fuzzy</code>, I&rsquo;d love to hear your thoughts about it.</p>
  1746. ]]>
  1747.    </content>
  1748.  </entry><entry>
  1749.    <title>An Event Apart Boston 2013</title>
  1750.    <link rel="alternate" type="text/html" href="https://joshdick.net/2013/06/25/an_event_apart_boston_2013" />
  1751.    <id>tag:joshdick.net,2013:/2013/06/25/an_event_apart_boston_2013.html</id>
  1752.    <published>2013-06-25T00:00:00Z</published>
  1753.    <updated>2013-06-25T00:00:00Z</updated>
  1754.    <author>
  1755.      <name>Josh Dick</name>
  1756.      <uri>https://joshdick.net</uri>
  1757.    </author>
  1758.    <content type="html" xml:lang="en">
  1759.        <![CDATA[<blockquote>My notes from An Event Apart, &ldquo;the design conference for people who make websites&rdquo;.</blockquote><p><img src="/post_assets/2013/06/aea_boston_2013_swag.jpg" alt="An Event Apart SWAG"></p>
  1760. <p><a href="http://aneventapart.com">An Event Apart</a> bills itself as &ldquo;the design conference for people who make websites.&rdquo; <a href="/2012/08/19/an_event_apart_boston_2012.html">I attended last year</a>, and was very fortunate to be able to attend once again this year. Here are my notes in their entirety from <a href="http://aneventapart.com/2013/boston/">An Event Apart Boston 2013</a>. My notes are grouped by talk, in the order that each talk happened at the conference.</p>
  1761. <h1 id="day-1-62413">Day 1: 6/24/13</h1>
  1762. <h2 id="jeffrey-zeldman---the-ten-commandments-of-web-design-zeldmancomhttpwwwzeldmancom-bull-zeldmanhttpstwittercomzeldman">Jeffrey Zeldman - The Ten Commandments of Web Design (<a href="http://www.zeldman.com">zeldman.com</a> • <a href="https://twitter.com/zeldman">@zeldman</a>)</h2>
  1763. <h3 id="thou-shalt-entertain">Thou Shalt Entertain</h3>
  1764. <ul>
  1765. <li>Take the opportunity to entertain when the situation would otherwise disappoint. (Example: entertaining 404 pages. &ldquo;And why are we still calling them &lsquo;404 pages&rsquo;?&rdquo;)</li>
  1766. <li>Humanize the experience by adding little copy touches (e.g. the <a href="https://www.google.com/search?q=flickr+language+greeting">dynamic multi-lingual greeting</a> on Flickr&rsquo;s old site.)</li>
  1767. </ul>
  1768. <h3 id="test-everything-including-assumptions">Test Everything (Including Assumptions)</h3>
  1769. <ul>
  1770. <li>Test your work on as many devices as possible (for example, by using tools from Adobe, or open-source tools like <a href="http://viljamis.com/blog/2012/remote-preview/">Remote Preview</a>)</li>
  1771. <li>Challenge your own assumptions, don&rsquo;t work in isolation.</li>
  1772. </ul>
  1773. <h3 id="thou-shalt-iterate">Thou Shalt Iterate</h3>
  1774. <ul>
  1775. <li>Sometimes inspiration comes from just working a lot and being dissatisfied.</li>
  1776. <li>&ldquo;I move things around until they look right.&rdquo; —Milton Glaser</li>
  1777. </ul>
  1778. <h3 id="thou-shalt-ship">Thou Shalt Ship</h3>
  1779. <ul>
  1780. <li>If you can&rsquo;t delegate at the pixel level, you&rsquo;ll never ship.</li>
  1781. <li>NOT shipping is great for consultants.</li>
  1782. </ul>
  1783. <h3 id="engage-thy-community">Engage Thy Community</h3>
  1784. <ul>
  1785. <li>Interact with customers and humanize your company rather than just selling product.</li>
  1786. <li><a href="http://alistapart.com/blog/post/embeddable-comments-yes-please">Embeddable comments</a> drive traffic between your site and other sites while engaging the community.</li>
  1787. </ul>
  1788. <h3 id="love-thy-user-as-thyself">Love Thy User As Thyself</h3>
  1789. <ul>
  1790. <li>Just give the user what they want, where they want, without dumbing anything down.</li>
  1791. </ul>
  1792. <h3 id="remember-the-content-and-keep-it-holy">Remember The Content And Keep It Holy</h3>
  1793. <ul>
  1794. <li>Get the right content to the right user at the right time.</li>
  1795. <li>Anything in the design that detracts from that should be cut; remove every distraction you possibly can.</li>
  1796. </ul>
  1797. <h3 id="thou-shalt-make-magic">Thou Shalt Make Magic</h3>
  1798. <ul>
  1799. <li>Make magic. Don&rsquo;t try for perfection.</li>
  1800. <li>Instagram had a horrible web experience but was successful because they did one thing very well: their app.</li>
  1801. </ul>
  1802. <h3 id="thou-shalt-prioritize">Thou Shalt Prioritize</h3>
  1803. <h3 id="to-thine-own-self-be-true">To Thine Own Self Be True</h3>
  1804. <ul>
  1805. <li>Don&rsquo;t make improvements for their own sake if they&rsquo;re not really improvements.</li>
  1806. <li>Don&rsquo;t change for the sake of change, or try to be something you&rsquo;re not, have a reason for every change you make.</li>
  1807. </ul>
  1808. <h3 id="this-is-design-not-religion">This is design, not religion.</h3>
  1809. <hr>
  1810. <h2 id="jake-archibald---rendering-without-the-lumpy-bits-jakearchibaldcomhttpjakearchibaldcom-bull-jaffathecakehttpstwittercomjaffathecake">Jake Archibald - Rendering Without the Lumpy Bits (<a href="http://jakearchibald.com">jakearchibald.com</a> • <a href="https://twitter.com/jaffathecake">@jaffathecake</a>)</h2>
  1811. <ul>
  1812. <li>Graphics performance: The new developer challenge.</li>
  1813. <li>Until recently, the goal was for graphics performance to be <em>usable</em> (but not necessarily &ldquo;good&rdquo;).</li>
  1814. <li>Browsers maintain a render tree that parallels the DOM. Changes to the render tree cause reflows.
  1815. <ul>
  1816. <li>The render tree doesn&rsquo;t <em>perfectly</em> parallel the DOM; it contains pseudo elements, shadow DOM, etc.</li>
  1817. </ul>
  1818. </li>
  1819. <li>100ms total render time feels &ldquo;instant&rdquo; to a user.</li>
  1820. <li>Layout thrashing is caused by querying/reading style attributes inside a loop that also changes style attributes.</li>
  1821. <li>To prevent layout thrashing, query/read starting values outside loops.</li>
  1822. <li>Scrolling isn&rsquo;t necessarily expensive from a painting perspective; it just moves the viewport around what has already been painted.</li>
  1823. <li>Fixed background images cause expensive repaints when scrolling—avoid them! Instead, use a background image that scrolls with the content to avoid repaints. (That may change since it depends on the browser implementation.)</li>
  1824. <li>On mobile, native <code>click</code> events have a 300ms delay since the browser waits to confirm whether the user is single- or double-tapping. Can work around this by:
  1825. <ul>
  1826. <li>Using <code>touchstart</code>/<code>touchend</code> events, but that may have unintended side-effects, unintentionally triggering those events when scrolling</li>
  1827. <li>Using a fixed viewport, which causes some browsers to intelligently disable double-tap detection</li>
  1828. <li>Using the <a href="https://github.com/ftlabs/fastclick">fastclick</a> library</li>
  1829. </ul>
  1830. </li>
  1831. <li>For displays that refresh at 60 Hz, 16.67ms is the frame scheduling deadline.</li>
  1832. <li><code>setTimeout()</code> isn&rsquo;t accurate enough for animations (frame scheduling.)
  1833. <ul>
  1834. <li>Even with high frame rates, animations will appear jittery since the frames aren&rsquo;t in sync with the refresh rate.</li>
  1835. <li>Instead, use <code>requestAnimationFrame()</code>, which has great browser support.</li>
  1836. </ul>
  1837. </li>
  1838. <li>24 FPS content shown on a screen with a 60 Hz refresh rate causes 3:2 pulldown since every other frame is extended to three refreshes. (For 50 Hz refresh rate, 24 FPS video is shown at 25 FPS; it&rsquo;s played slightly faster!)</li>
  1839. <li>Software rendering caused the old <a href="http://www.mrdoob.com/lab/javascript/effects/ie6/">&ldquo;IE error effect&rdquo;</a>. Modern operating systems use hardware rendering.</li>
  1840. <li>Let the browser use hardware rendering as often as possible:
  1841. <ul>
  1842. <li>For the time being, use CSS 3D transform hacks where appropriate, but beware of the side effects, like hitting the GPU memory barrier on mobile.</li>
  1843. <li>For CSS, animate using transforms instead of <code>left</code>/<code>top</code>.</li>
  1844. <li>Animations using <code>left</code>/<code>top</code> look jittery since they snap to the pixel grid; transforms don&rsquo;t snap to the pixel grid.</li>
  1845. <li>There are no magic rules around transforms and layering.</li>
  1846. <li>Don&rsquo;t trust performance tips, test everything yourself!</li>
  1847. </ul>
  1848. </li>
  1849. <li>Things that trigger new hardware rendering layers:
  1850. <ul>
  1851. <li>3D transforms</li>
  1852. <li>Animation/transforms/opacity/filters</li>
  1853. <li>Flash/Silverlight</li>
  1854. <li>Canvas</li>
  1855. <li>Video</li>
  1856. <li>Fixed position elements (sometimes)</li>
  1857. <li>Fixed backgrounds (soon!)</li>
  1858. <li>Anything on top of a layer</li>
  1859. </ul>
  1860. </li>
  1861. </ul>
  1862. <hr>
  1863. <h2 id="kevin-m-hoffman---designing-meetings-to-work-for-design-kevinmhoffmancomhttpwwwkevinmhoffmancom-bull-kevinmhoffmanhttpstwittercomkevinmhoffman">Kevin M. Hoffman - Designing Meetings to Work for Design (<a href="http://www.kevinmhoffman.com">kevinmhoffman.com</a> • <a href="https://twitter.com/kevinmhoffman">@kevinmhoffman</a>)</h2>
  1864. <ul>
  1865. <li>How do we collaborate better?</li>
  1866. <li><a href="http://marshmallowchallenge.com/">Marshmallow Challenge</a> team-building exercise: Of all age groups, Kindergartners are best at it because they spend most of their time <strong>doing</strong> rather than <strong>thinking</strong>.</li>
  1867. <li>Don&rsquo;t be afraid to fail.</li>
  1868. <li>Rapidly iterate.</li>
  1869. <li>Don&rsquo;t plan, don&rsquo;t discuss: just build (rapid prototyping).</li>
  1870. <li>What&rsquo;s better than hearing and seeing is discussing; a good meeting is an active discussion.</li>
  1871. <li>Your ability to retain the most information is when you&rsquo;re making and managing something.</li>
  1872. <li><strong>Doing</strong> is better than <strong>seeing</strong>, which is better than <strong>hearing</strong>.</li>
  1873. <li>&ldquo;If you&rsquo;re not prepared to be wrong, you&rsquo;ll never come up with anything original.&rdquo; —Sir Ken Robinson</li>
  1874. <li>Be wrong at the right time. Allow for failure in design meetings; that&rsquo;s much better than failing after you ship!</li>
  1875. </ul>
  1876. <h3 id="4-frameworks-for-better-design-meetings">4 frameworks for better design meetings</h3>
  1877. <ol>
  1878. <li>Always diverge before you try to converge.
  1879. <ul>
  1880. <li>Start the meeting with an opportunity for the discussion to expand, then arrive at a decision at the end.</li>
  1881. </ul>
  1882. </li>
  1883. <li>OARR: Outcomes, Agenda, Rules, Roles (David Sibbett)
  1884. <ul>
  1885. <li>Employ the four roles that make meetings productive:
  1886. <ul>
  1887. <li><strong>Facilitator</strong>: Neutral, doesn&rsquo;t evaluate or contribute ideas, just manages the meeting.</li>
  1888. <li><strong>Recorder</strong>: Creates group memory, records publicly, like on a whiteboard, is silent, and follows up afterwards.</li>
  1889. <li><strong>Group member</strong>: Contributes ideas, stays positive, isn&rsquo;t defensive, checks/balances other members and the facilitator.</li>
  1890. <li><strong>Leader</strong>: Designs the meeting, selects attendees and roles, decides upon goals, <strong>and becomes a group member during the meeting</strong>.</li>
  1891. </ul>
  1892. </li>
  1893. <li>If you&rsquo;re not in charge of the meeting, the biggest way to affect it is public recording. Volunteer to do it, you&rsquo;ll help everyone in the room to be more productive and cut down on repeating themselves.</li>
  1894. <li>Distribute/take turns in each role so everyone gets an equal opportunity to contribute.</li>
  1895. <li>For small meetings, there&rsquo;s no need for all roles, but someone should still serve as a facilitator/recorder.</li>
  1896. <li>3 questions of design: What has to stay the same? What can be changed? What can be eliminated?</li>
  1897. <li>Instead of discussing, have everyone write their feedback on color-coded, groupable stickies; you end up creating user requirements/user stories just by virtue of going through that process.</li>
  1898. </ul>
  1899. </li>
  1900. <li>Visual listening (via sketching) improves discussion and adds context.
  1901. <ul>
  1902. <li>Visual memory and recall are powerful.</li>
  1903. <li>Live-sketching a meeting could be useful; if you&rsquo;re less artistically inclined, sketching your thoughts beforehand is also useful.</li>
  1904. </ul>
  1905. </li>
  1906. <li>Present and design ideas collaboratively.
  1907. <ul>
  1908. <li>Do actual work in the meeting, don&rsquo;t just talk about work.</li>
  1909. <li>Example: When presenting personas, use something familiar like television characters rather than &ldquo;generic&rdquo; personas.</li>
  1910. <li>Example: For designing responsive content strategy, label every piece of content on the page. Split the content into groups, and let teams of people rate the priority of the cards inside each group. That way you have a mix of perspectives ranking the importance of a distributed variety of content elements.</li>
  1911. <li>Example: For designing interfaces, have small cross-disciplinary groups sketch as many concepts as they can. Then have groups repeatedly combine into larger groups and iterate on the design.</li>
  1912. </ul>
  1913. </li>
  1914. </ol>
  1915. <hr>
  1916. <h2 id="luke-wroblewski---its-a-writeread-mobile-web-lukewcomhttpwwwlukewcom-bull-lukewhttpstwittercomlukew">Luke Wroblewski - It&rsquo;s a Write/Read (Mobile) Web (<a href="http://www.lukew.com">lukew.com</a> • <a href="https://twitter.com/lukew">@lukew</a>)</h2>
  1917. <ul>
  1918. <li>The 5 most popular web sites in the U.S.—Facebook, Yahoo, AIM, Google, and YouTube—are all write/read experiences; they don&rsquo;t work unless people add (write) content to them.</li>
  1919. <li>All of those sites are now moving to mobile.</li>
  1920. <li>&ldquo;The mobile moment&rdquo;: When the amount of your mobile users becomes larger than the number of your non-mobile users.</li>
  1921. <li>It&rsquo;s a myth that mobile devices aren&rsquo;t used for creating content. In 2011, 40% of tweets were created on mobile, and 3 hours of video per second were uploaded to YouTube via mobile.</li>
  1922. </ul>
  1923. <h3 id="how-do-we-design-for-mobile-creation">How do we design for mobile creation?</h3>
  1924. <h4 id="one-handed-use">One-handed Use</h4>
  1925. <ul>
  1926. <li>Test with one thumb!</li>
  1927. <li>iOS 7 will have improved gestures for single-thumb use.</li>
  1928. <li>&ldquo;What we need to do to design is to look at <strong>the extremes</strong>. The middle will take care of itself.&rdquo; —Dan Formosa</li>
  1929. <li>Think about how the keyboard can be avoided at all costs. Don&rsquo;t let the keyboard appear unless there&rsquo;s no other way.
  1930. <ul>
  1931. <li>Use smart defaults and suggestions to avoid making the user type manually.</li>
  1932. <li>Let people type manually if they really want to.</li>
  1933. </ul>
  1934. </li>
  1935. </ul>
  1936. <h4 id="visually-engaging">Visually Engaging</h4>
  1937. <ul>
  1938. <li>Images rule on mobile (and not just in social apps!)</li>
  1939. <li>Images are one of the best mediums for communication on mobile.</li>
  1940. <li>Imagery has a huge impact in commerce (eBay, hotel booking, etc.)</li>
  1941. <li>Performance is still important: We should work hard to keep things visually engaging without impacting performance.</li>
  1942. </ul>
  1943. <h4 id="focused-flows">Focused Flows</h4>
  1944. <ul>
  1945. <li>The user should have to do as little work as possible to accomplish a core task (Examples: Foursquare check-in, booking a hotel, etc.)</li>
  1946. <li>&ldquo;Creativity is people who care enough to keep thinking about something until they find the simplest way to do it.&rdquo; —Tim Cook</li>
  1947. <li>&ldquo;Booking a hotel happens in 3 taps and a swipe. This is a competitive advantage.&rdquo; —Sam Shank, CEO of HotelTonight</li>
  1948. <li>It takes big changes to go small.</li>
  1949. <li>Yelp doesn&rsquo;t allow users to write reviews from mobile since they view their users through the lens of the desktop; they&rsquo;re worried users will write reviews using &ldquo;SMS writing&rdquo;.</li>
  1950. <li>HotelTonight allows users to write reviews using photos rather than typing them out.</li>
  1951. <li>If you&rsquo;re making a lot of people uncomfortable with a big design decision, you&rsquo;re probably on the right track.</li>
  1952. </ul>
  1953. <h4 id="just-in-time-actions">Just-In-Time Actions</h4>
  1954. <ul>
  1955. <li>&ldquo;Intro tours&rdquo; aren&rsquo;t the best way to communicate how to create/make things in mobile apps. Instead, teach people in context using just-in-time education.</li>
  1956. <li>Show help or relevant actions when they&rsquo;re needed rather than bombarding the user with all possible actions at once.</li>
  1957. <li>Example: When and if you&rsquo;ve recently taken photos, the Google+ app shows recent photos for easy posting.</li>
  1958. <li>Example: When you start scrolling down in the Google+ app, the navigation bar jumps out of the way (but come back when you start scrolling back up.)</li>
  1959. </ul>
  1960. <h4 id="cross-device-usage">Cross Device Usage</h4>
  1961. <ul>
  1962. <li>Multiple devices can be used together for a cohesive input experience.</li>
  1963. <li><strong>Access</strong>: Native apps vs. mobile web apps? They&rsquo;re not necessarily opposites; use both at the same time. They can play off each other&rsquo;s strengths.</li>
  1964. <li><strong>Flow</strong>: Allows a process to travel across screens. (Example: Google Maps iOS and web apps share recently-entered data, eBay allows you to start creating a listing on one device and complete it on another.)</li>
  1965. <li><strong>Control</strong>: One device can control another. (Example: <a href="http://oneid.com">OneID</a>)</li>
  1966. <li><strong>Push</strong>: One device sending something to a different device. (Example: eBay allows users to add a photo from a mobile device when creating a listing using the desktop web site.)</li>
  1967. </ul>
  1968. <hr>
  1969. <h2 id="jason-grigsby---the-immobile-web-userfirstwebcomhttpuserfirstwebcom-bull-grigshttpstwittercomgrigs">Jason Grigsby - The Immobile Web (<a href="http://userfirstweb.com">userfirstweb.com</a> • <a href="https://twitter.com/grigs">@grigs</a>)</h2>
  1970. <ul>
  1971. <li>Televisions are the next wave in the &ldquo;device zombie apocalypse.&rdquo;</li>
  1972. <li>Televisions allow for cohesive experiences while using mobile devices. (Example: Game of Thrones shows extra info on SmartGlass.)</li>
  1973. <li>Big opportunity: An App Store on Apple TV.</li>
  1974. <li>The browsers built in to the newest televisions are actually surprisingly good; they pass HTML5/CSS3 tests.</li>
  1975. <li>The user experience of browsing the web on televisions is horrible; the biggest problem is input.</li>
  1976. <li>Two main methods of input for smart TVs: D-pads and pointers.
  1977. <ul>
  1978. <li>D-pads work very well when done properly. D-pads should not be used to control cursors.</li>
  1979. <li>Pointers work well with cursors, but precision is difficult.</li>
  1980. </ul>
  1981. </li>
  1982. <li>Gesture controls currently don&rsquo;t work very well.</li>
  1983. <li>Remote control design is still evolving (touch areas, etc.)</li>
  1984. <li>Context is irrelevant for mobile users since we can&rsquo;t know what it is, but context is becoming relevant for television.</li>
  1985. <li>Designs for 10-foot UIs should be task-oriented.</li>
  1986. <li>Hover is dead for mobile devices, but is back on TVs (for cursor input.)</li>
  1987. <li>Arbitrary <a href="http://www.w3.org/TR/css3-ui/">CSS</a> or JavaScript is still necessary to aid with input on televisions.</li>
  1988. <li>Televisions have inconsistent resolutions and overscan.</li>
  1989. <li>We need to put pressure on television browser makers to interoperate.</li>
  1990. <li>We still need to rely on device detection for the time being.</li>
  1991. <li>You can test designs on mobile devices at cell phone carrier stores, but can&rsquo;t do the same for smart TVs since none of them have remotes or a wi-fi connection at stores.</li>
  1992. <li>What are people actually expecting when they buy a smart TV?
  1993. <ul>
  1994. <li>Storage capacity and processor speed aren&rsquo;t listed as specs.</li>
  1995. <li>Do most people just want built-in Netflix?</li>
  1996. </ul>
  1997. </li>
  1998. <li>Are televisions the equivalent of cell phones before the iPhone?</li>
  1999. <li>Smart TVs suck right now, but it would be dangerous to dismiss them.</li>
  2000. <li>We can&rsquo;t predict future behavior from a current experience that sucks.</li>
  2001. </ul>
  2002. <hr>
  2003. <h2 id="ethan-marcotte---the-map--the-territory-ethanmarcottecomhttpethanmarcottecom-bull-beephttpstwittercombeep">Ethan Marcotte - The Map &amp; The Territory (<a href="http://ethanmarcotte.com">ethanmarcotte.com</a> • <a href="https://twitter.com/beep">@beep</a>)</h2>
  2004. <ul>
  2005. <li>Responsive designs use a fluid grid, flexible images, and media queries.</li>
  2006. <li>Converting a fixed grid to a fluid grid: target ÷ context = result</li>
  2007. <li>Media queries are sized to arbitrary <code>em</code> units based on readability, <em>not</em> screen/device measurements.</li>
  2008. <li>Across different resolutions (media queries), you can re-use the same navigational elements by repositioning them using absolute positioning. (Example: An element that is shown inside a submenu at small sizes can be repositioned into the main masthead at larger sizes. The basic functionality and markup don&rsquo;t change between display sizes.)</li>
  2009. <li>Average page weight was 320 KB in 2009, and 1.4 MB in 2013. Over four years, average page weight has increased 400%.</li>
  2010. <li>&ldquo;The more accurate the map, the more it resembles the territory. The most accurate map possible would be the territory, and thus would be perfectly accurate and perfectly useless.&rdquo; —Neil Gaiman, <em>American Gods</em></li>
  2011. <li>7 billion mobile subscriptions in 2013, 60% are on EDGE/CDMA.</li>
  2012. <li>Sustainability in web design:
  2013. <ul>
  2014. <li><strong>Reduce</strong>: Reducing page weight can open your site to new markets. Use the <a href="http://microjs.com">smallest possible JavaScript libraries</a>.</li>
  2015. <li><strong>Revisit</strong>: Revisit some of our old assumptions about design. The web is a new medium that needs a new aesthetic.</li>
  2016. </ul>
  2017. </li>
  2018. <li>&ldquo;&lsquo;We don&rsquo;t have any non-JavaScript users&rsquo; No, all your users are non-JS while they&rsquo;re downloading your JS&rdquo; —<a href="https://twitter.com/jaffathecake/status/207096228339658752">Jake Archibald</a></li>
  2019. <li>&ldquo;What works good is better than what looks good, because what works good lasts.&rdquo; —Ray Eames</li>
  2020. </ul>
  2021. <hr>
  2022. <h1 id="day-2-62513">Day 2: 6/25/13</h1>
  2023. <h2 id="karen-mcgrane---the-mobile-content-mandate-karenmcgranecomhttpkarenmcgranecom-bull-karenmcgranehttpstwittercomkarenmcgrane">Karen McGrane - The Mobile Content Mandate (<a href="http://karenmcgrane.com">karenmcgrane.com</a> • <a href="https://twitter.com/karenmcgrane">@karenmcgrane</a>)</h2>
  2024. <ul>
  2025. <li>&ldquo;There is no reason for any individual to have a computer in his home.&rdquo; —Ken Olsen, CEO of Digital Equipment Corporation</li>
  2026. <li>&ldquo;There is no reason anyone will need to do that on mobile.&rdquo; —Your company, probably</li>
  2027. <li>How could cheap PCs compete with minicomputers from DEC, the world&rsquo;s second largest computer company in 1988?</li>
  2028. </ul>
  2029. <h3 id="disruptive-innovation">Disruptive Innovation</h3>
  2030. <blockquote>
  2031. <p>In industry after industry&hellip;the new technologies that had brought the big, established companies to their knees weren&rsquo;t better or more advanced—they were actually worse. The new products were low-end, dumb, shoddy, and in almost every way inferior. But the new products were usually cheaper and easier to use, and so people or companies who were not rich or sophisticated enough for the old ones started buying the new ones, and there were so many more of the regular people than there were of the rich, sophisticated people that the companies making the new products prospered.</p>
  2032. </blockquote>
  2033. <p>—<a href="http://www.newyorker.com/reporting/2012/05/14/120514fa_fact_macfarquhar">The New Yorker, <em>When Giants Fail</em></a></p>
  2034. <ul>
  2035. <li>Examples:
  2036. <ul>
  2037. <li>Handcrafted, high-quality 1940s cabinet radios were replaced by cheaper, lower quality portable transistor radios.</li>
  2038. <li>Offset printers were replaced by cheap inkjet printers.</li>
  2039. <li>People predicted that digital cameras would disrupt the film industry, but nobody predicted that digital cameras would disrupt the entire camera industry (cameraphones, etc.)</li>
  2040. </ul>
  2041. </li>
  2042. <li>We&rsquo;re currently experiencing the next great wave of computing.</li>
  2043. <li>Mobile devices are becoming a personal computing device for people who have never had access to the Internet before.</li>
  2044. <li>The iPhone was originally seen as a luxury, high-end cell phone as opposed to a really cheap computer.</li>
  2045. </ul>
  2046. <h3 id="the-mobile-only-user">The Mobile-Only User</h3>
  2047. <ul>
  2048. <li>Mobile phones and smartphones <strong>are not</strong> two different segments of the market, just like there weren&rsquo;t two markets for color vs. black-and-white televisions.</li>
  2049. <li>Lots of minority groups don&rsquo;t have access to the Internet or broadband at home, but nearly everyone has a phone.</li>
  2050. <li>Lots of minority groups <strong>only</strong> (or mostly) use the Internet on mobile.</li>
  2051. <li>&ldquo;Mobile-optimized&rdquo; sites usually have a paltry subset of the content of the &ldquo;full desktop&rdquo; version. This crutch has gotten us through the last five years of mobile adoption, but <strong>this isn&rsquo;t good enough.</strong></li>
  2052. <li>We can&rsquo;t force users to pinch-and-zoom their way around desktop sites on a mobile device. (&ldquo;It&rsquo;s like reading a newspaper through a toilet paper tube.&rdquo;)</li>
  2053. <li>Mobile users are being treated as second-class citizens since web designers expect that people will use the &ldquo;real web site&rdquo; on a desktop PC.</li>
  2054. </ul>
  2055. <h3 id="content-strategy-for-mobile">Content Strategy for Mobile</h3>
  2056. <h4 id="know-your-workflow">Know Your Workflow</h4>
  2057. <ul>
  2058. <li>There shouldn&rsquo;t be separate &ldquo;mobile&rdquo; and &ldquo;web&rdquo; content teams.</li>
  2059. <li>Don&rsquo;t fork your content for mobile: You would have to maintain and update two independent but similar pieces of content.</li>
  2060. <li>Being forced to be succinct sometimes makes existing mobile web sites better and easier to read than their desktop counterparts. If the mobile site is better, why isn&rsquo;t it the site for everyone?</li>
  2061. <li>There&rsquo;s no such thing as &ldquo;how to write for mobile&rdquo;; there&rsquo;s just good writing!</li>
  2062. <li>Good content transcends platform. If you have interesting, well-written, appropriately structured content, it will easily make the link to mobile. (Example: <a href="http://www.cancer.org">American Cancer Society web site</a>.)</li>
  2063. </ul>
  2064. <h4 id="chunk-your-blobs">Chunk Your Blobs</h4>
  2065. <ul>
  2066. <li>Content shouldn&rsquo;t be specifically associated with any part of the layout of a web page.</li>
  2067. <li>Which content should be included or excluded?</li>
  2068. <li>Should longer pages be broken into shorter ones?</li>
  2069. <li>Will it work to reuse headings as links?</li>
  2070. <li>Will it work to truncate body copy for teasers? (Example: This doesn&rsquo;t work for Amazon&rsquo;s mobile site; the truncated body copy has no value since product names and specs are just repeated.</li>
  2071. <li>Responsive design won&rsquo;t fix your content problem.</li>
  2072. <li>The Daily Beast, NPR, and The Guardian truncate headlines rather than giving them proper real estate on mobile. (<a href="http://guardiantruncationteam.tumblr.com">http://guardiantruncationteam.tumblr.com</a>)</li>
  2073. <li>Either give headlines more real estate, or write shorter headlines.</li>
  2074. <li>Netflix is a great example of chunked content—it is available on hundreds of devices but they never truncate content; they show the appropriate amount of detail/content for a given platform.</li>
  2075. </ul>
  2076. <h3 id="in-conclusion">In Conclusion</h3>
  2077. <ul>
  2078. <li>Don&rsquo;t create content for a specific context.</li>
  2079. <li>You don&rsquo;t get to decide which device people use to access your content; they do.</li>
  2080. <li>Disruptive technologies eventually get good, or they redefine what good means.</li>
  2081. <li>Do mobile right, right from the start.</li>
  2082. </ul>
  2083. <hr>
  2084. <h2 id="eric-meyer---strong-layout-systems-meyerwebcomhttpmeyerwebcom-bull-meyerwebhttpstwittercommeyerweb">Eric Meyer - Strong Layout Systems (<a href="http://meyerweb.com">meyerweb.com</a> • <a href="https://twitter.com/meyerweb">@meyerweb</a>)</h2>
  2085. <ul>
  2086. <li>When it started out, CSS was an appearance system, not a layout system.</li>
  2087. <li>CSS1 had floats, but they weren&rsquo;t meant to be used for layout. <code>clear</code> is the only reason we used floats for layout, otherwise we would have stuck with tables.</li>
  2088. <li>&ldquo;<code>clear</code> was a screwdriver we used to pound in a nail since no one had given us a hammer yet.&rdquo;</li>
  2089. <li>CSS2 added positioning, which helped slightly with layout. <a href="http://wired.com">Wired.com</a> had a 3-column layout in 2002.</li>
  2090. <li>Design decisions were made in the context of the limitations of the technology.</li>
  2091. <li>We&rsquo;ve internalized the limitation that positioned/floated elements are only as tall as their content and that &ldquo;float drop&rdquo; can happen.</li>
  2092. <li>The old limitations of CSS have limited the scope of our perceived design choices/toolbox; unlearning these limitations and assumptions will become a vital skill.</li>
  2093. </ul>
  2094. <h3 id="viewport-units">Viewport Units</h3>
  2095. <ul>
  2096. <li><a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths">http://www.w3.org/TR/css3-values/#viewport-relative-lengths</a></li>
  2097. <li>Viewport units look similar to percentage units but they&rsquo;re not. Percentage elements size relative to their parent element while viewport elements size relative to the viewport.</li>
  2098. </ul>
  2099. <h3 id="flexbox">Flexbox</h3>
  2100. <ul>
  2101. <li><a href="http://www.w3.org/TR/css3-flexbox/">http://www.w3.org/TR/css3-flexbox/</a></li>
  2102. <li>Reminiscent of table layouts but much more powerful.</li>
  2103. <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content"><code>justify-content</code></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap"><code>flex-wrap</code></a> replace the need to do width/margin/wrapping calculations.</li>
  2104. <li>Allows you to mix units (two elements that are placed next to each other can have different units.) The space between them isn&rsquo;t margin or padding, it&rsquo;s just available space not yet &ldquo;eaten up&rdquo; by the flexbox algorithm.</li>
  2105. <li><code>display: flex</code> must be applied to the <strong>parent element</strong> of whatever elements you want to be flexible.</li>
  2106. <li>Flexible elements can be rearranged at will with <code>order</code>. Regardless of order, selectors (<code>:first-child</code>, <code>:last-child</code>, etc.) will still respect the DOM and ignore the flex flow.</li>
  2107. <li>There&rsquo;s nothing stopping an element that&rsquo;s flexible from also being the master context for its own flexible children.</li>
  2108. </ul>
  2109. <h3 id="grid-layout">Grid Layout</h3>
  2110. <ul>
  2111. <li><a href="http://www.w3.org/TR/css3-grid-layout/">http://www.w3.org/TR/css3-grid-layout/</a></li>
  2112. <li><a href="http://caniuse.com/#feat=css-grid">Browser support isn&rsquo;t great yet</a>, since the standard is still being [re]written.</li>
  2113. <li>Grids can be nested, and mixed and matched with flexbox.</li>
  2114. <li>Simple syntax (but simple doesn&rsquo;t necessarily mean easy!)</li>
  2115. </ul>
  2116. <h3 id="regions-and-shapes">Regions and Shapes</h3>
  2117. <ul>
  2118. <li><a href="http://www.w3.org/TR/css3-regions/">http://www.w3.org/TR/css3-regions/</a>, <a href="http://www.w3.org/TR/css-shapes-1/">http://www.w3.org/TR/css-shapes-1/</a></li>
  2119. <li>Regions separate layout from content by allowing content to flow between elements.</li>
  2120. <li><strong>Not</strong> the web as we&rsquo;re used to it, but may become the web as we&rsquo;re used to it very soon.</li>
  2121. <li>Can combine regions and shapes to mimic complex print layouts.</li>
  2122. </ul>
  2123. <hr>
  2124. <h2 id="lea-verou---deep-css-secrets-veroumehttpveroume-bull-leaverouhttpstwittercomleaverou">Lea Verou - Deep CSS Secrets (<a href="http://verou.me">verou.me</a> • <a href="https://twitter.com/LeaVerou">@LeaVerou</a>)</h2>
  2125. <p><em>Interactive slides are available at <a href="http://lea.verou.me/more-css-secrets">http://lea.verou.me/more-css-secrets</a>.</em></p>
  2126. <h3 id="background-attachment-local"><code>background-attachment: local;</code></h3>
  2127. <ul>
  2128. <li>Background scrolls with the page <strong>and</strong> with the element.</li>
  2129. <li>Can be used to implement &ldquo;more content&rdquo; indicators inside scrollable areas à la Google Reader: can be applied to elements that block the &ldquo;more content&rdquo; indicators when scrolled to the top or bottom of a scrollable area.</li>
  2130. <li>Decent browser support (except Firefox).</li>
  2131. <li><a href="http://lea.verou.me/2012/04/background-attachment-local/">http://lea.verou.me/2012/04/background-attachment-local/</a></li>
  2132. </ul>
  2133. <h3 id="fixed-width-fluid-background">Fixed Width, Fluid Background</h3>
  2134. <ul>
  2135. <li>An effect where the background resizes but the content width is fixed.</li>
  2136. <li>You don&rsquo;t need wrapper elements and inner elements with margins, just use <code>padding</code> with <code>calc</code>.</li>
  2137. <li><a href="http://caniuse.com/#feat=calc">Decent browser support for <code>calc</code></a> (except Opera).</li>
  2138. </ul>
  2139. <h3 id="lightboxes">Lightboxes</h3>
  2140. <ul>
  2141. <li>An effect where an image is displayed by expanding the width and then the height.</li>
  2142. <li>Combine independent <a href="http://www.w3.org/TR/css3-transitions/">CSS transitions</a> for height and width, and add a delay the 2nd transition.</li>
  2143. <li>Can exploit the fact that the CSS <code>transition</code> property itself does not transition.</li>
  2144. <li><a href="http://caniuse.com/#feat=css-transitions">Decent browser support for CSS transitions</a>.</li>
  2145. </ul>
  2146. <h3 id="lined-paperzebra-striping-effect">Lined Paper/Zebra Striping Effect</h3>
  2147. <ul>
  2148. <li>Create a background by tiling a linear gradient. Space the tiling using the <code>line-height</code> of the text.</li>
  2149. <li>Can also make the background lines respect padding by using the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin"><code>background-origin</code> property</a> (<code>background-origin: content-box;</code>)</li>
  2150. <li>Can also use the same principles to zebra-stripe text, without needing wrapping elements for each stripe.</li>
  2151. <li><a href="http://caniuse.com/#feat=background-img-opts">Decent browser support for <code>background-origin</code>.</a></li>
  2152. </ul>
  2153. <h3 id="diamond-outlined-images">Diamond-Outlined Images</h3>
  2154. <ul>
  2155. <li>Wrap an image with a wrapping element, rotate the wrapping element by 45 degrees, then rotate the image -45 degrees.</li>
  2156. <li>Rotation is achieved using CSS transforms.</li>
  2157. <li><a href="http://caniuse.com/#feat=transforms2d">Decent browser support for CSS transforms.</a></li>
  2158. </ul>
  2159. <h3 id="make-elements-trace-a-circular-path">Make Elements Trace a Circular Path</h3>
  2160. <ul>
  2161. <li>One solution: Make a wrapper element trace a circle using CSS animation and <code>transform-origin</code>, then counter-rotate the original element so it always faces the same direction while tracing a circular path (doesn&rsquo;t rotate in place.)</li>
  2162. <li>Optimize by reusing the same <code>@keyframes</code> for both animations, but reverse one animation with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction"><code>animation-direction</code></a>.</li>
  2163. <li>Multiple transforms layer on each other; transforms stack on top of any changes caused by the previous transforms.</li>
  2164. <li><a href="http://caniuse.com/#feat=css-animation">Decent browser support for CSS animations.</a></li>
  2165. </ul>
  2166. <h3 id="non-boxy-shadows">Non-Boxy Shadows</h3>
  2167. <ul>
  2168. <li>Use <code>filter: drop-shadow</code> instead of <code>box-shadow</code> to draw shadows behind irregularly shaped elements (like speech bubbles).</li>
  2169. <li>Can use SVG filters for browsers that don&rsquo;t support CSS filters.</li>
  2170. <li><a href="http://caniuse.com/#feat=css-filters">Poor browser support for CSS filters.</a></li>
  2171. </ul>
  2172. <h3 id="glass-pane-effect">Glass Pane Effect</h3>
  2173. <ul>
  2174. <li>Text written inside a &ldquo;glass pane&rdquo; element positioned over a background image is hard to read. How do we blur the background of the glass pane without blurring the text?</li>
  2175. <li>Add a <code>:before</code> pseudo-element to the glass pane, give it the same background image as the preexisting background image, and blur it using <code>filter: blur</code>.</li>
  2176. <li>Allows you to not need an alternate pre-blurred version of the background image.</li>
  2177. <li>Messy background positioning unfortunately still applies.</li>
  2178. <li>Degrades gracefully for browsers that don&rsquo;t support CSS filters—the image will just be transparent instead of blurred.</li>
  2179. </ul>
  2180. <h3 id="hyphens-property"><code>hyphens</code> Property</h3>
  2181. <ul>
  2182. <li><code>hyphens: auto;</code> makes justified text much more readable; eliminates ugly whitespace rivers.</li>
  2183. <li><a href="http://caniuse.com/#feat=css-hyphens">Poor browser support for the <code>hyphens</code> property.</a></li>
  2184. </ul>
  2185. <h3 id="frame-animations">Frame Animations</h3>
  2186. <ul>
  2187. <li>An effect that achieves animation by manipulating the background position of an image that contains frames.</li>
  2188. <li>Use <code>steps</code> with CSS animations to do discrete easing rather than continuous easing. This shows each frame in succession instead of continuously sliding the background image.</li>
  2189. <li><a href="http://lea.verou.me/2011/09/pure-css3-typing-animation-with-steps/">http://lea.verou.me/2011/09/pure-css3-typing-animation-with-steps/</a></li>
  2190. <li><a href="http://jsfiddle.net/simurai/CGmCe/light/">http://jsfiddle.net/simurai/CGmCe/light/</a></li>
  2191. </ul>
  2192. <hr>
  2193. <h2 id="kim-goodwin---silo-busting-with-scenarios-kimgoodwinhttpstwittercomkimgoodwin">Kim Goodwin - Silo-Busting with Scenarios (<a href="https://twitter.com/kimgoodwin">@kimgoodwin</a>)</h2>
  2194. <ul>
  2195. <li>Organizing teams by platform/geography/features limits those teams&rsquo; worldviews.</li>
  2196. <li>Example of an agile user story: &ldquo;As a user, I want to log in to access my account.&rdquo;
  2197. <ul>
  2198. <li>When has a real user said, &ldquo;Gee, I want to &rsquo;log in&rsquo;?&rdquo;</li>
  2199. </ul>
  2200. </li>
  2201. <li>We all fall victim to having siloed mindsets, even for low-level functionality.</li>
  2202. <li>A <strong>scenario</strong> is a plausible future story about a persona using the product or service from start to finish.</li>
  2203. <li>Scenarios involve and star human characters, not just roles (&ldquo;user&rdquo; or &ldquo;admin&rdquo; are just roles.) We&rsquo;re people, not roles.</li>
  2204. <li>Good process <strong>oscillates</strong> between generative (divergent) and analytical (convergent).</li>
  2205. <li>First rule of user research: Forget what you&rsquo;re building since that will make you think much too narrowly.</li>
  2206. <li>User research can clarify and expose information about the big picture and the problem you&rsquo;re trying to solve, rather than just what you&rsquo;re building.</li>
  2207. <li>Create a journey map—what frustrates the user during the entire process of achieving their own goals?</li>
  2208. <li>After that, what can we do to &ldquo;un-suckify&rdquo; the worst part(s) of the experience?</li>
  2209. <li>Just like you wouldn&rsquo;t call a good restaurant &ldquo;really edible&rdquo;, good usability isn&rsquo;t good enough—we have to go out of our way to delight users. &ldquo;Our job is to be delightfulness experts.&rdquo;</li>
  2210. <li>Add something unexpectedly good. What would a helpful human do?</li>
  2211. <li>Make it a story.</li>
  2212. <li>Once all of the information is collected, discuss and decide on priorities with stakeholders.</li>
  2213. <li>Look at your silo, informed by the bigger journey.</li>
  2214. <li>Use scenarios to guide rough storyboards: What&rsquo;s on the screen and how it&rsquo;s laid out. Don&rsquo;t stress about widgets and words.</li>
  2215. <li>Look for convergence between scenarios, but prioritize as you converge.</li>
  2216. <li>Scenarios drive site structure.</li>
  2217. <li>Polish the details.</li>
  2218. <li>Avoid UX purgatory.</li>
  2219. <li>Good experiences only happen when everyone who is responsible for part of the experience is invested in creating the whole experience.</li>
  2220. </ul>
  2221. <hr>
  2222. <h2 id="mike-monteiro---what-clients-dont-know-and-why-its-your-fault-mikemonteirocomhttpmikemonteirocom-bull-mike_ftwhttpstwittercommike_ftw">Mike Monteiro - What Clients Don&rsquo;t Know (and Why It&rsquo;s Your Fault) (<a href="http://mikemonteiro.com">mikemonteiro.com</a> • <a href="https://twitter.com/Mike_FTW">@Mike_FTW</a>)</h2>
  2223. <ul>
  2224. <li>Designers: You are in the service industry! You have clients and they need your help.</li>
  2225. <li>We get irritated by having to explain what is second nature to us.</li>
  2226. <li>To those on the outside, the process of buying design is as mysterious as making it. It&rsquo;s all magic.</li>
  2227. <li>If you&rsquo;re a designer, you&rsquo;re in the confidence game.</li>
  2228. <li>Designers need to have empathy for clients.</li>
  2229. <li>Your job isn&rsquo;t just making things, that&rsquo;s the easy part! It&rsquo;s convincing people that the shit you thought up in the shower that morning is right.</li>
  2230. <li>If it helps you do your job, it&rsquo;s part of your job.</li>
  2231. <li>Don&rsquo;t work with anyone you can&rsquo;t respect, since you won&rsquo;t be able to empathize with them.</li>
  2232. <li>Put yourself in your clients&rsquo; less stylish shoes.</li>
  2233. <li>You can&rsquo;t change how others behave, but you can change how you behave and react to a situation to meet a common goal.</li>
  2234. <li>Clients don&rsquo;t know when to get a designer involved.</li>
  2235. <li>&ldquo;&lsquo;Creative&rsquo; is a hate word. My mother raised three kids on a seamstress&rsquo;s salary—THAT&rsquo;S creative.&rdquo;</li>
  2236. <li>&ldquo;As long as you act like a disenfranchised &lsquo;creative,&rsquo; that&rsquo;s how you deserve to be treated.&rdquo;</li>
  2237. <li>Eye rolling is not a design skill.</li>
  2238. <li>Complaining is not a design skill.</li>
  2239. <li>&ldquo;They never asked me&rdquo; is not a design skill.</li>
  2240. <li>Stop waiting for an invitation to do your job—assert yourself.</li>
  2241. <li>Clients don&rsquo;t know the best way to evaluate a designer.</li>
  2242. <li>Clients don&rsquo;t know how to read your portfolio—the work <strong>does not</strong> speak for itself.</li>
  2243. <li>Retail suit store: &ldquo;Don&rsquo;t sell the suit, sell the service.&rdquo;</li>
  2244. <li>&ldquo;Sell [clients] the services you provide, using your sites as props.&rdquo;</li>
  2245. <li>Be upfront and let clients know if you&rsquo;re not the right person for the job.</li>
  2246. <li>Referrals are awesome—if you get a referral, it means you&rsquo;re not an asshole. Nobody is going to put someone they know in the hands of an asshole.</li>
  2247. <li>Every job you do is a sales pitch for the next job.</li>
  2248. <li>RFPs may be a client&rsquo;s way to tell you that they&rsquo;re scared.</li>
  2249. <li>On fighting with clients about RFPs: &ldquo;As long as we keep doing it, no one is going to stop expecting it.&rdquo;</li>
  2250. <li>Pick up the phone.</li>
  2251. <li>Learn to say <strong>no</strong>.</li>
  2252. <li>Learn to ask <strong>why</strong>.</li>
  2253. <li>Learn to say <strong>I don&rsquo;t know</strong>.</li>
  2254. <li>Clients want reassurance that they&rsquo;ll be in good hands with you, so they ask for the one thing they&rsquo;re familiar with—the outcome! &ldquo;Let&rsquo;s have them do comps!&rdquo;</li>
  2255. <li>As a designer, it&rsquo;s your job to walk them back from that conclusion and figure out the issue they&rsquo;re trying to solve.</li>
  2256. <li>&ldquo;The process you have that gets you from one point to another is only as good as your willingness to stand up for it.&rdquo;</li>
  2257. <li>&ldquo;Show the client they&rsquo;re in good hands, not by reacting to their request, but by addressing the fear behind that request.&rdquo;</li>
  2258. <li>&ldquo;Never work for someone you can&rsquo;t argue with. Show clients you&rsquo;re not going to let anyone mess up the process, even them.&rdquo;</li>
  2259. <li>Clients don&rsquo;t know why things cost what they do.</li>
  2260. <li>Design is a solution to a problem within a set of constraints.</li>
  2261. <li>&ldquo;Your budget is one of the most important constraints there is. Don&rsquo;t make it a secret, make it a data point.&rdquo;</li>
  2262. <li>Clients don&rsquo;t know what the process looks like.</li>
  2263. <li>Your process is a mystery. Clients don&rsquo;t want to think about it.</li>
  2264. <li>Clients deal with the unknown by applying their own process, which is comfortable and familiar to them.</li>
  2265. <li>Do everything in your power to be right, but never be afraid to be wrong.</li>
  2266. <li>Letting a client tell you how to do your job is stupid. &ldquo;Nature abhors a vacuum. So do clients. They will fill it.&rdquo;</li>
  2267. <li>It&rsquo;s not their job—it&rsquo;s yours!</li>
  2268. <li>Never, ever, ever throw another designer under the bus to advance your own agenda. (&ldquo;You should clap for that!&rdquo;)</li>
  2269. <li>No one is born a good client, just like no one is born a good designer.</li>
  2270. <li>A doctor wouldn&rsquo;t be able to have a conversation with you about an ailment on par with how he would converse about it with another doctor.</li>
  2271. <li>&ldquo;Please take all my clients from me.&rdquo;</li>
  2272. <li>You are a terrible mind reader.</li>
  2273. <li>&ldquo;&lsquo;Hope&rsquo; is not a design word. &lsquo;Empathy&rsquo; is.&rdquo;</li>
  2274. <li>The way to become a better designer is to help clients become better clients.</li>
  2275. <li>You are not a pixelpusher.</li>
  2276. <li>You are responsible for what you bring into the world.</li>
  2277. <li>Everything that&rsquo;s wrong with design today is your fault—and that is good news!</li>
  2278. <li>Working together with mutual respect can fix any problem you set your mind to.</li>
  2279. </ul>
  2280. <hr>
  2281. <h2 id="jared-spool---its-a-great-time-to-be-a-ux-designer-uiecomhttpuiecom-bull-jmspoolhttpstwittercomjmspool">Jared Spool - It&rsquo;s a Great Time To Be a UX Designer (<a href="http://uie.com">uie.com</a> • <a href="https://twitter.com/jmspool">@jmspool</a>)</h2>
  2282. <ul>
  2283. <li>Design is the rendering of intent.</li>
  2284. <li>Intention falls on a scale that spans from imitation to innovation (and corresponding expense, risk, and value.)</li>
  2285. <li>Business wins when it is intentionally innovative, and when it values designers.</li>
  2286. <li>Example: Airbnb ousted Craigslist for vacation rentals, which itself ousted newspaper classified ads.</li>
  2287. <li>Design is no longer about the visual; it&rsquo;s about the business.</li>
  2288. <li>Great business models are intentionally designed. (Example: Apple&rsquo;s end-to-end manufacturing, distribution, and sales.)</li>
  2289. <li>&ldquo;The largest room in the world is the room for improvement.&rdquo;</li>
  2290. <li>On Apple: &ldquo;How cool would it be to have &lsquo;Genius&rsquo; on your business card? That would totally change Thanksgiving.&rdquo;</li>
  2291. <li>Innovation is not adding new invention; innovation is adding new value.</li>
  2292. <li>Experiences can be mapped, measured, and designed. What do we intend?</li>
  2293. <li>Experience design: The rendering of intent within the gaps. (Example: <a href="http://www.gehealthcare.com/promo/advseries/adventure_series.html">GE Adventure Series</a>)</li>
  2294. <li>Old Chinese proverb: Be careful what you ask for, lest it become so.</li>
  2295. <li>The best designers are good at storytelling, critiquing, sketching, presenting, and facilitating.</li>
  2296. <li>Specialists have more expertise in one area over others, generalists have equal expertise in most areas. Compartmentalists have expertise in a single area.</li>
  2297. <li>Teams need generalists more than specialists. Compartmentalists are the least valuable—being a compartmentalist is a career-limiting decision.</li>
  2298. <li>Experience designer: also known as a unicorn. (People don&rsquo;t believe they exist.)</li>
  2299. <li>How do you make a unicorn?
  2300. <ol>
  2301. <li>Train yourself</li>
  2302. <li>Practice your skills</li>
  2303. <li>Deconstruct as many designs as you can</li>
  2304. <li>Seek out feedback (and listen to it)</li>
  2305. <li>Teach others (you learn something when you teach something)</li>
  2306. </ol>
  2307. </li>
  2308. <li>The unicorn is design&rsquo;s most important innovation.</li>
  2309. </ul>
  2310. <hr>
  2311. <h1 id="conclusion">Conclusion</h1>
  2312. <p>Interestingly, my takeaways are almost identical to last year&rsquo;s (mobile, mobile, mobile!):</p>
  2313. <ul>
  2314. <li>Design a single experience that works well on mobile <strong>and</strong> on the desktop (mobile-first, responsive.)</li>
  2315. <li>Let mobile be the measuring stick for your content—if you don&rsquo;t need it on mobile, do you need it at all?</li>
  2316. <li>Since mobile and desktop should be a single experience, they should have complete content and feature parity.</li>
  2317. <li>Performance (speed and data usage) is important, especially on mobile.</li>
  2318. </ul>
  2319. <p>As a bonus, I also concluded that bacon cupcakes actually exist, and are in fact delicious:</p>
  2320. <p><img src="/post_assets/2013/06/aea_boston_2013_bacon_cupcake.jpg" alt="Bacon Cupcake"></p>
  2321. <p>Just like last year, An Event Apart was extremely well-organized, informative and inspirational, and I&rsquo;m very glad that I was able to attend!</p>
  2322. ]]>
  2323.    </content>
  2324.  </entry><entry>
  2325.    <title>Sleep Displays with Alfred v2</title>
  2326.    <link rel="alternate" type="text/html" href="https://joshdick.net/2013/02/27/sleep_displays_with_alfred_v2" />
  2327.    <id>tag:joshdick.net,2013:/2013/02/27/sleep_displays_with_alfred_v2.html</id>
  2328.    <published>2013-02-27T00:00:00Z</published>
  2329.    <updated>2013-02-27T00:00:00Z</updated>
  2330.    <author>
  2331.      <name>Josh Dick</name>
  2332.      <uri>https://joshdick.net</uri>
  2333.    </author>
  2334.    <content type="html" xml:lang="en">
  2335.        <![CDATA[<blockquote>Because my keyboard doesn&rsquo;t have an eject key.</blockquote><h2 id="introduction">Introduction</h2>
  2336. <p>I can&rsquo;t use a Mac for more than a few minutes without somehow interacting with <a href="http://www.alfredapp.com">Alfred</a>. I use an excellent Alfred extension by <a href="http://blog.wwwjfy.net/">Tony Wang</a> called <a href="http://blog.wwwjfy.net/2011/11/01/alfred-extensions-sleep-display/">Sleep Display</a>. When triggered via a hotkey, the extension powers off all connected displays without actually suspending/sleeping the computer. While it&rsquo;s true that simultaneously pressing Control+Shift+Eject also accomplishes the same thing, the extension is useful for those whose keyboards don&rsquo;t have an eject key.</p>
  2337. <p>The first public beta of the next version of Alfred, Alfred v2, <a href="http://blog.alfredapp.com/2013/01/12/first-alfred-v2-beta-now-available-for-mega-supporters/">became available</a> a few weeks ago. Since v2 has done away with extensions and has replaced them with a feature called &ldquo;Workflows&rdquo;, Tony&rsquo;s extension isn&rsquo;t compatible with v2. Further, v2 doesn&rsquo;t natively support shutting off displays as a built-in &ldquo;System Command&rdquo; when building Workflows (yet!).</p>
  2338. <p>To fill the gap, I decided to create a v2 Workflow called &ldquo;Sleep Displays&rdquo;. (Yes, I added an &ldquo;s&rdquo; to the the name of Tony&rsquo;s original extension. Yes, I&rsquo;m creative.)</p>
  2339. <h2 id="how-it-works">How It Works</h2>
  2340. <p>The Workflow contains a binary program, directly lifted from Tony&rsquo;s extension, that was built using the following code found <a href="http://stackoverflow.com/a/4865708/278810">at Stack Overflow</a>:</p>
  2341. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;CoreFoundation/CoreFoundation.h&gt;</span><span style="color:#75715e">
  2342. </span></span></span><span style="display:flex;"><span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;IOKit/IOKitLib.h&gt;</span><span style="color:#75715e">
  2343. </span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
  2344. </span></span><span style="display:flex;"><span><span style="color:#75715e">/* Returns 0 on success and 1 on failure. */</span>
  2345. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">int</span> <span style="color:#a6e22e">display_sleep</span>(<span style="color:#66d9ef">void</span>)
  2346. </span></span><span style="display:flex;"><span>{
  2347. </span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">io_registry_entry_t</span> reg <span style="color:#f92672">=</span> <span style="color:#a6e22e">IORegistryEntryFromPath</span>(kIOMasterPortDefault, <span style="color:#e6db74">&#34;IOService:/IOResources/IODisplayWrangler&#34;</span>);
  2348. </span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> (reg) {
  2349. </span></span><span style="display:flex;"><span>                <span style="color:#a6e22e">IORegistryEntrySetCFProperty</span>(reg, <span style="color:#a6e22e">CFSTR</span>(<span style="color:#e6db74">&#34;IORequestIdle&#34;</span>), kCFBooleanTrue);
  2350. </span></span><span style="display:flex;"><span>                <span style="color:#a6e22e">IOObjectRelease</span>(reg);
  2351. </span></span><span style="display:flex;"><span>        } <span style="color:#66d9ef">else</span> {
  2352. </span></span><span style="display:flex;"><span>                <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">1</span>;
  2353. </span></span><span style="display:flex;"><span>        }
  2354. </span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">0</span>;
  2355. </span></span><span style="display:flex;"><span>}
  2356. </span></span></code></pre></div><p>According to the Stack Overflow answer, the code can be compiled on Mac with <code>gcc</code> using the flags <code>-framework CoreFoundation -framework IOKIT</code>.</p>
  2357. <h2 id="can-i-download-it-already">Can I Download It Already?</h2>
  2358. <p>You sure can. <a href="/post_assets/2013/02/Sleep%20Displays.alfredworkflow">Grab it right here.</a></p>
  2359. <h2 id="thats-all-folks">That&rsquo;s All, Folks</h2>
  2360. <p>Lacking the ability to sleep displays via a hotkey was the last thing preventing me from using Alfred v2 full time. Now I can do that with v2, and so can you.</p>
  2361. ]]>
  2362.    </content>
  2363.  </entry><entry>
  2364.    <title>My Git Prompt for Zsh</title>
  2365.    <link rel="alternate" type="text/html" href="https://joshdick.net/2012/12/30/my_git_prompt_for_zsh" />
  2366.    <id>tag:joshdick.net,2012:/2012/12/30/my_git_prompt_for_zsh.html</id>
  2367.    <published>2012-12-30T00:00:00Z</published>
  2368.    <updated>2012-12-30T00:00:00Z</updated>
  2369.    <author>
  2370.      <name>Josh Dick</name>
  2371.      <uri>https://joshdick.net</uri>
  2372.    </author>
  2373.    <content type="html" xml:lang="en">
  2374.        <![CDATA[<blockquote>Because <!-- raw HTML omitted -->git status<!-- raw HTML omitted --> isn&rsquo;t nearly as fun.</blockquote><blockquote>
  2375. <p><em><strong>Update on June 8, 2017:</strong> After using this Git prompt for about 4½ years, I&rsquo;ve made <a href="/2017/06/08/my_git_prompt_for_zsh_revisited.html">some minor tweaks</a> to it.</em></p>
  2376. <p><em><strong>Update on January 8, 2013:</strong> The Git prompt code was missing some initialization options that were local to my <code>zsh</code> configuration file (<code>.zshrc</code>). I&rsquo;ve updated the code to include the necessary options.</em></p>
  2377. </blockquote>
  2378. <p>It has become rare for me to use a computer for longer than a few hours without using <a href="http://gitscm.org">Git</a>.</p>
  2379. <p>Although <a href="http://www.sourcetreeapp.com">many</a> <a href="http://gitx.org">great</a> <a href="http://www.git-tower.com">tools</a> are available for graphically interacting with Git, I use Git almost exclusively on the command line, since that&rsquo;s how and where I first <a href="http://git-scm.com/book">learned to use Git</a>. (I believe it would be beneficial for anyone trying to learn Git to learn on the command line; doing so exposes Git&rsquo;s methodology in a <a href="http://nfarina.com/post/9868516270/git-is-simpler">fundamental way</a> that promotes understanding, but that&rsquo;s a topic for another post.)</p>
  2380. <p>Any time I find an opportunity to offset development workflow friction from myself to the computer, I jump on it. In that vein, in order to save time and <a href="http://www.eetimes.com/electronics-blogs/pop-blog/4374110/Most-engineers-are-lazy-and-that-s-often-a-good-thing">be lazier</a> when working with Git, I&rsquo;ve pieced together a helpful <a href="http://en.wikipedia.org/wiki/Shell_(computing)">shell</a> prompt that conveys lots of information about a Git repository at a glance. The prompt works with <a href="http://www.zsh.org"><code>zsh</code></a>, my shell of choice.</p>
  2381. <p>There are many examples of custom &ldquo;SCM-enabled&rdquo; shell prompts across the Internet, but I figured it was worth sharing mine here. The prompt&rsquo;s code is adapted from <a href="https://gist.github.com/1712320">this GitHub Gist</a>, but incorporates features from other examples I&rsquo;ve come across, namely:</p>
  2382. <ul>
  2383. <li>Only appears if your current directory is a Git repository.</li>
  2384. <li>Shows number of commits ahead and behind upstream, as applicable.</li>
  2385. <li>Shows if a merge is currently taking place.</li>
  2386. <li>Shows a &ldquo;traffic light&rdquo; representation of <code>git status</code>:
  2387. <ul>
  2388. <li>Red (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are untracked changes.</li>
  2389. <li>Yellow (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are unstaged changes.</li>
  2390. <li>Green (<!-- raw HTML omitted -->●<!-- raw HTML omitted -->) means there are staged changes.</li>
  2391. </ul>
  2392. </li>
  2393. </ul>
  2394. <p>Here&rsquo;s a contrived example that showcases the prompt (click on it for a larger version):</p>
  2395. <p><!-- raw HTML omitted --><img src="/post_assets/2012/12/git_zsh_prompt.png" alt="Git Prompt for Zsh"><!-- raw HTML omitted --></p>
  2396. <p>Here&rsquo;s the code for the prompt, as of this writing. (If I make any changes to the code in the future, the most up-to-date version will always be available <a href="https://gist.github.com/4415470">as a GitHub Gist</a>.) You can paste this code directly into your <code>.zshrc</code>, or save it in its own file and source that file in your <code>.zshrc</code>.</p>
  2397. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-zsh" data-lang="zsh"><span style="display:flex;"><span><span style="color:#75715e"># Adapted from code found at &lt;https://gist.github.com/1712320&gt;.</span>
  2398. </span></span><span style="display:flex;"><span>
  2399. </span></span><span style="display:flex;"><span>setopt prompt_subst
  2400. </span></span><span style="display:flex;"><span>autoload -U colors <span style="color:#f92672">&amp;&amp;</span> colors <span style="color:#75715e"># Enable colors in prompt</span>
  2401. </span></span><span style="display:flex;"><span>
  2402. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Modify the colors and symbols in these variables as desired.</span>
  2403. </span></span><span style="display:flex;"><span>GIT_PROMPT_SYMBOL<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[blue]%}±&#34;</span>
  2404. </span></span><span style="display:flex;"><span>GIT_PROMPT_PREFIX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[green]%}[%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2405. </span></span><span style="display:flex;"><span>GIT_PROMPT_SUFFIX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[green]%}]%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2406. </span></span><span style="display:flex;"><span>GIT_PROMPT_AHEAD<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[red]%}ANUM%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2407. </span></span><span style="display:flex;"><span>GIT_PROMPT_BEHIND<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg<span style="color:#e6db74">[cyan]%}BNUM%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2408. </span></span><span style="display:flex;"><span>GIT_PROMPT_MERGING<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg_bold<span style="color:#e6db74">[magenta]%}⚡︎%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2409. </span></span><span style="display:flex;"><span>GIT_PROMPT_UNTRACKED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg_bold<span style="color:#e6db74">[red]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2410. </span></span><span style="display:flex;"><span>GIT_PROMPT_MODIFIED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg_bold<span style="color:#e6db74">[yellow]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2411. </span></span><span style="display:flex;"><span>GIT_PROMPT_STAGED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;%{</span>$fg_bold<span style="color:#e6db74">[green]%}●%{</span>$reset_color<span style="color:#e6db74">%}&#34;</span>
  2412. </span></span><span style="display:flex;"><span>
  2413. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Show Git branch/tag, or name-rev if on detached head</span>
  2414. </span></span><span style="display:flex;"><span>parse_git_branch<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  2415. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">(</span>git symbolic-ref -q HEAD <span style="color:#f92672">||</span> git name-rev --name-only --no-undefined --always HEAD<span style="color:#f92672">)</span> 2&gt; /dev/null
  2416. </span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
  2417. </span></span><span style="display:flex;"><span>
  2418. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Show different symbols as appropriate for various Git repository states</span>
  2419. </span></span><span style="display:flex;"><span>parse_git_state<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  2420. </span></span><span style="display:flex;"><span>
  2421. </span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Compose this value via multiple conditional appends.</span>
  2422. </span></span><span style="display:flex;"><span>  local GIT_STATE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
  2423. </span></span><span style="display:flex;"><span>
  2424. </span></span><span style="display:flex;"><span>  local NUM_AHEAD<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git log --oneline @<span style="color:#f92672">{</span>u<span style="color:#f92672">}</span>.. 2&gt; /dev/null | wc -l | tr -d <span style="color:#e6db74">&#39; &#39;</span><span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  2425. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$NUM_AHEAD<span style="color:#e6db74">&#34;</span> -gt <span style="color:#ae81ff">0</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
  2426. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE<span style="color:#e6db74">${</span>GIT_PROMPT_AHEAD//NUM/$NUM_AHEAD<span style="color:#e6db74">}</span>
  2427. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2428. </span></span><span style="display:flex;"><span>
  2429. </span></span><span style="display:flex;"><span>  local NUM_BEHIND<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git log --oneline ..@<span style="color:#f92672">{</span>u<span style="color:#f92672">}</span> 2&gt; /dev/null | wc -l | tr -d <span style="color:#e6db74">&#39; &#39;</span><span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  2430. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$NUM_BEHIND<span style="color:#e6db74">&#34;</span> -gt <span style="color:#ae81ff">0</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
  2431. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE<span style="color:#e6db74">${</span>GIT_PROMPT_BEHIND//NUM/$NUM_BEHIND<span style="color:#e6db74">}</span>
  2432. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2433. </span></span><span style="display:flex;"><span>
  2434. </span></span><span style="display:flex;"><span>  local GIT_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>git rev-parse --git-dir 2&gt; /dev/null<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  2435. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> -n $GIT_DIR <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> test -r $GIT_DIR/MERGE_HEAD; <span style="color:#66d9ef">then</span>
  2436. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE$GIT_PROMPT_MERGING
  2437. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2438. </span></span><span style="display:flex;"><span>
  2439. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[[</span> -n <span style="color:#66d9ef">$(</span>git ls-files --other --exclude-standard 2&gt; /dev/null<span style="color:#66d9ef">)</span> <span style="color:#f92672">]]</span>; <span style="color:#66d9ef">then</span>
  2440. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE$GIT_PROMPT_UNTRACKED
  2441. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2442. </span></span><span style="display:flex;"><span>
  2443. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> ! git diff --quiet 2&gt; /dev/null; <span style="color:#66d9ef">then</span>
  2444. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE$GIT_PROMPT_MODIFIED
  2445. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2446. </span></span><span style="display:flex;"><span>
  2447. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> ! git diff --cached --quiet 2&gt; /dev/null; <span style="color:#66d9ef">then</span>
  2448. </span></span><span style="display:flex;"><span>    GIT_STATE<span style="color:#f92672">=</span>$GIT_STATE$GIT_PROMPT_STAGED
  2449. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2450. </span></span><span style="display:flex;"><span>
  2451. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> <span style="color:#f92672">[[</span> -n $GIT_STATE <span style="color:#f92672">]]</span>; <span style="color:#66d9ef">then</span>
  2452. </span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;</span>$GIT_PROMPT_PREFIX$GIT_STATE$GIT_PROMPT_SUFFIX<span style="color:#e6db74">&#34;</span>
  2453. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2454. </span></span><span style="display:flex;"><span>
  2455. </span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
  2456. </span></span><span style="display:flex;"><span>
  2457. </span></span><span style="display:flex;"><span><span style="color:#75715e"># If inside a Git repository, print its branch and state</span>
  2458. </span></span><span style="display:flex;"><span>git_prompt_string<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  2459. </span></span><span style="display:flex;"><span>  local git_where<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>parse_git_branch<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
  2460. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">[</span> -n <span style="color:#e6db74">&#34;</span>$git_where<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> echo <span style="color:#e6db74">&#34;</span>$GIT_PROMPT_SYMBOL<span style="color:#66d9ef">$(</span>parse_git_state<span style="color:#66d9ef">)</span>$GIT_PROMPT_PREFIX<span style="color:#e6db74">%{</span>$fg<span style="color:#e6db74">[yellow]%}</span><span style="color:#e6db74">${</span>git_where#(refs/heads/|tags/)<span style="color:#e6db74">}</span>$GIT_PROMPT_SUFFIX<span style="color:#e6db74">&#34;</span>
  2461. </span></span><span style="display:flex;"><span><span style="color:#f92672">}</span>
  2462. </span></span><span style="display:flex;"><span>
  2463. </span></span><span style="display:flex;"><span><span style="color:#75715e"># Set the right-hand prompt</span>
  2464. </span></span><span style="display:flex;"><span>RPS1<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;$(git_prompt_string)&#39;</span>
  2465. </span></span></code></pre></div><p>I hope the prompt is as useful and as big of a time saver for you as it is for me!</p>
  2466. ]]>
  2467.    </content>
  2468.  </entry><entry>
  2469.    <title>Rejecting False Binary Files in Git</title>
  2470.    <link rel="alternate" type="text/html" href="https://joshdick.net/2012/11/24/rejecting_false_binary_files_in_git" />
  2471.    <id>tag:joshdick.net,2012:/2012/11/24/rejecting_false_binary_files_in_git.html</id>
  2472.    <published>2012-11-24T00:00:00Z</published>
  2473.    <updated>2012-11-24T00:00:00Z</updated>
  2474.    <author>
  2475.      <name>Josh Dick</name>
  2476.      <uri>https://joshdick.net</uri>
  2477.    </author>
  2478.    <content type="html" xml:lang="en">
  2479.        <![CDATA[<blockquote>When text files stay up past their bedtime.</blockquote><h1 id="the-problem">The Problem</h1>
  2480. <p>I noticed a small but annoying issue with <a href="http://gitscm.org">Git</a> that surfaced every once in a while: Git would suddenly start treating text files as if they were binary files. This example output from a <a href="http://stackoverflow.com/questions/6855712/git-treats-text-file-as-a-binary">relevant Stack Overflow question</a> illustrates the issue:</p>
  2481. <pre><code>$ git diff MyFile.txt
  2482. diff --git a/MyFile.txt b/MyFile.txt
  2483. index d41a4f3..15dcfa2 100644
  2484. Binary files a/MyFile.txt and b/MyFile.txt differ
  2485. </code></pre>
  2486. <p>In general, this issue could be viewed as a limitation of Git&rsquo;s built-in diff capability, since it Git <a href="http://stackoverflow.com/questions/777949/can-i-make-git-recognize-a-utf-16-file-as-text">apparently is not great</a> at comparing files that use <a href="http://en.wikipedia.org/wiki/Variable-width_encoding">variable-width encoding</a>. For my job however, none of the source code our team works on is supposed to use variable-width encoding. For our purposes, it&rsquo;s safe to assume that seeing this issue means that a developer mistakenly added non-ASCII characters to an otherwise-ASCII text file (Git&rsquo;s limitations notwithstanding.)</p>
  2487. <p>I decided to create a <a href="http://www.kernel.org/pub/software/scm/git/docs/githooks.html">Git update hook</a> to reject problem commits when developers try to push them so these mistakes could be caught in an automated fashion when they happened, rather than having developers figure out when and why their diffs suddenly stopped working.</p>
  2488. <h1 id="the-code">The Code</h1>
  2489. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash
  2490. </span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
  2491. </span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
  2492. </span></span><span style="display:flex;"><span><span style="color:#75715e"># [Your existing update hook code here...]</span>
  2493. </span></span><span style="display:flex;"><span><span style="color:#75715e">#</span>
  2494. </span></span><span style="display:flex;"><span>
  2495. </span></span><span style="display:flex;"><span>refname<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span>
  2496. </span></span><span style="display:flex;"><span>oldrev<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$2<span style="color:#e6db74">&#34;</span>
  2497. </span></span><span style="display:flex;"><span>newrev<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$3<span style="color:#e6db74">&#34;</span>
  2498. </span></span><span style="display:flex;"><span>
  2499. </span></span><span style="display:flex;"><span><span style="color:#75715e"># --- Reject this commit if it contains source files that Git views as binary files.</span>
  2500. </span></span><span style="display:flex;"><span>
  2501. </span></span><span style="display:flex;"><span><span style="color:#75715e"># First, make sure user is pushing a new branch and not deleting one. ($newrev will be all zeros when deleting.)</span>
  2502. </span></span><span style="display:flex;"><span>zero<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;0000000000000000000000000000000000000000&#34;</span>
  2503. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> <span style="color:#e6db74">&#34;</span>$newrev<span style="color:#e6db74">&#34;</span> !<span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;</span>$zero<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]</span>; <span style="color:#66d9ef">then</span>
  2504. </span></span><span style="display:flex;"><span>
  2505. </span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Tests whether Git thinks the passed filename ($1) is a binary file.</span>
  2506. </span></span><span style="display:flex;"><span>  isBinary<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
  2507. </span></span><span style="display:flex;"><span>    binaryPattern<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>printf <span style="color:#e6db74">&#39;%s\t-\t&#39;</span> -<span style="color:#66d9ef">)</span>;
  2508. </span></span><span style="display:flex;"><span>    diffResult<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>git diff --numstat master $newrev -- <span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">)</span>;
  2509. </span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">$(</span><span style="color:#f92672">[[</span> <span style="color:#e6db74">&#34;</span>$diffResult<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">=</span>~ <span style="color:#e6db74">&#34;</span>$binaryPattern<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">]]</span><span style="color:#66d9ef">)</span>
  2510. </span></span><span style="display:flex;"><span>  <span style="color:#f92672">}</span>
  2511. </span></span><span style="display:flex;"><span>
  2512. </span></span><span style="display:flex;"><span>  <span style="color:#75715e"># Get a list of all relevant files to check: filter the names of all changed files in $newrev by extension.</span>
  2513. </span></span><span style="display:flex;"><span>  checkFiles<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>git show --pretty<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;format:&#34;</span> --name-only $newrev | grep -E <span style="color:#e6db74">&#39;\.(java|groovy|js|xml|css|less|sh)(\..+)?$&#39;</span><span style="color:#66d9ef">)</span>
  2514. </span></span><span style="display:flex;"><span>
  2515. </span></span><span style="display:flex;"><span>  binaryFilesFound<span style="color:#f92672">=</span>false
  2516. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">while</span> read -r filename; <span style="color:#66d9ef">do</span>
  2517. </span></span><span style="display:flex;"><span>      <span style="color:#66d9ef">if</span> <span style="color:#f92672">[</span> ! -z $filename <span style="color:#f92672">]</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#66d9ef">$(</span>isBinary $filename<span style="color:#66d9ef">)</span>; <span style="color:#66d9ef">then</span>
  2518. </span></span><span style="display:flex;"><span>        echo <span style="color:#e6db74">&#34;*** File </span>$filename<span style="color:#e6db74"> appears to be a binary file, but should be plain text.&#34;</span> &gt;&amp;<span style="color:#ae81ff">2</span>
  2519. </span></span><span style="display:flex;"><span>        binaryFilesFound<span style="color:#f92672">=</span>true
  2520. </span></span><span style="display:flex;"><span>      <span style="color:#66d9ef">fi</span>
  2521. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">done</span> <span style="color:#f92672">&lt;&lt;&lt;</span> <span style="color:#e6db74">&#34;</span>$checkFiles<span style="color:#e6db74">&#34;</span>
  2522. </span></span><span style="display:flex;"><span>
  2523. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">if</span> $binaryFilesFound; <span style="color:#66d9ef">then</span>
  2524. </span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;Please remove all non-human-readable characters from the above file(s).&#34;</span>
  2525. </span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;For example, to remove NUL characters from a file:&#34;</span>
  2526. </span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;  tr &lt; file.ext -d &#39;\000&#39; &gt; file.tmp&#34;</span>
  2527. </span></span><span style="display:flex;"><span>    echo <span style="color:#e6db74">&#34;  mv file.tmp file.ext&#34;</span>
  2528. </span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Reject the push</span>
  2529. </span></span><span style="display:flex;"><span>    exit 1;
  2530. </span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">fi</span>
  2531. </span></span><span style="display:flex;"><span>
  2532. </span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
  2533. </span></span><span style="display:flex;"><span>
  2534. </span></span><span style="display:flex;"><span><span style="color:#75715e"># --- Finished</span>
  2535. </span></span><span style="display:flex;"><span>exit <span style="color:#ae81ff">0</span>
  2536. </span></span></code></pre></div><h1 id="how-it-works">How it Works</h1>
  2537. <p>This code lives inside the update hook script (<code>hooks/update</code>) in our central Git repository. It runs on the server whenever someone does a <code>git push</code>.</p>
  2538. <p>Here&rsquo;s a summary of what the code does:</p>
  2539. <ol>
  2540. <li>Get a list of all files to be changed in the new revision (incoming pushed changes).</li>
  2541. <li>Filter the list of files by their extensions, so that the list only contains files that are supposed to be plain text files.</li>
  2542. <li>For each file in the list, make sure that the incoming changes to that file don&rsquo;t cause Git to treat the file as binary data.</li>
  2543. <li>If any of the files fail this test, reject the push and show the user an explanatory error so they can fix the problem before attempting to push again.</li>
  2544. </ol>
  2545. <h1 id="considerations">Considerations</h1>
  2546. <p>Using an update hook isn&rsquo;t the ideal solution, since an ideal solution would prevent this type of mistake from being made at all. However, the update hook does prevent developers from accidentally propagating problematic changes.</p>
  2547. <p>If you know of a better way to solve this problem, I&rsquo;d love to hear about it!</p>
  2548. ]]>
  2549.    </content>
  2550.  </entry>
  2551. </feed>
  2552.  

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid Atom 1.0" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=https%3A//joshdick.net/writing.xml

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda