<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ZPAO - blah. blah. blah.]]></title><description><![CDATA[ZPAO - blah. blah. blah.]]></description><link>https://zpao.com</link><generator>RSS for Node</generator><lastBuildDate>Thu, 28 Jul 2022 04:48:06 GMT</lastBuildDate><atom:link href="https://zpao.com/feeds/default.xml" rel="self" type="application/rss+xml"/><item><title><![CDATA[Do We Need Node?]]></title><description><![CDATA[Lately I’ve been thinking a lot about JS modules and the different implementations of module loaders. At the end of the day we’ve all mostly…]]></description><link>https://zpao.com/posts/do-we-need-node/</link><guid isPermaLink="false">https://zpao.com/posts/do-we-need-node/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Lately I’ve been thinking a lot about JS modules and the different implementations of module loaders. At the end of the day we’ve all mostly settled on CommonJS, but even then we have our rough patches supporting AMD, “pure” &lt;code class=&quot;language-text&quot;&gt;require&lt;/code&gt;, and global script tags. There are tools to make all of this relatively painless, but I’m pretty excited for a future where we don’t need any of it.&lt;/p&gt;
&lt;p&gt;ES6 will hopefully bring with it modules in some form. Last I heard, &lt;a href=&quot;http://twitter.com/littlecalculist&quot;&gt;Dave Herman&lt;/a&gt; and others really want to push it through, though it’s an understandably difficult thing to push into the language, especially now. Languages like Python and Ruby have had this sort of capability from the beginning. Hell, even C had the ability to import into scope, even if it is kludgy. So I have no doubt we will have sane support for modules across modern JS engines in the next 2 years.&lt;/p&gt;
&lt;p&gt;Working from that assumption… I have to ask, do we really need Node anymore? Node has baggage. It’s tightly tied to a single JS engine, which makes it next to impossible for anybody to compare JS engines outside of the browser. V8 may have been the right choice for Ryan Dahl to make at the time, &lt;em&gt;a lot&lt;/em&gt; of that had to do with the C++ API, but is it still the best engine today? In 2 years? Node has it’s own standard library on top of the JS standard library. It &lt;a href=&quot;http://nodejs.org/docs/latest/api/globals.html&quot;&gt;adds globals&lt;/a&gt; to your scripts. Some are there to make CommonJS work (&lt;code class=&quot;language-text&quot;&gt;require&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;module&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;exports&lt;/code&gt;, which are actually local to each module but still considered “global”). Other globals are there to make scripting easier (e.g. &lt;code class=&quot;language-text&quot;&gt;__dirname&lt;/code&gt; is not unusual for scripting languages to have). There’s only 1 really odd one out and that’s &lt;code class=&quot;language-text&quot;&gt;Buffer&lt;/code&gt;. It may be useful, but it really has no place in the global scope. With a large portion of Node’s API written in JS, why can’t we ship each of those as a standalone module/package? We already mostly use these APIs by requiring them (&lt;code class=&quot;language-text&quot;&gt;require(&apos;fs&apos;)&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;I think we’ll always need a way to package and distribute modules. NPM has proven how valuable that is. Look around - Ruby has &lt;a href=&quot;http://rubygems.org/&quot;&gt;rubygems&lt;/a&gt;, Python has &lt;a href=&quot;https://pypi.python.org/pypi&quot;&gt;PyPI&lt;/a&gt;, Objective-C has &lt;a href=&quot;http://cocoapods.org/&quot;&gt;CocoaPods&lt;/a&gt;. The thing to note here is that these are &lt;em&gt;language&lt;/em&gt; based and not built around an additional layer on top of a language. When you look at gems built for Ruby on Rails, they are still distributed the same way, they just have different dependencies. Going further, there are multiple interpreters for some of these languages. Ruby has MRI, JRuby, and Rubinius (and others); Python has CPython and PyPy (and likely others). For the most part these are all interchangeable (you run into issues with binary compatibility, e.g., the sqlite gem isn’t compatible with JRuby).&lt;/p&gt;
&lt;p&gt;So what do I want? I want a world where the core JS engine is swappable. Maybe I’m deploying on an architecture not supported by V8 (Node on SPARC came up while working on SpiderNode). Maybe my employer only wants to use the JVM. Or maybe Microsoft can get some performance wins by using Chakra for Windows Azure. Back to modules, I don’t want to get rid of npm. Or maybe I do and I want something that only supports ES6+ modules.&lt;/p&gt;
&lt;p&gt;I think Node and npm have been forces of awesome over the past few years and there is no doubt they have helped propel JavaScript forward, but I think we’re outgrowing them. There are lots of things to figure out to replace &lt;code class=&quot;language-text&quot;&gt;node&lt;/code&gt; with &lt;code class=&quot;language-text&quot;&gt;js&lt;/code&gt;, but maybe we should start thinking about it.&lt;/p&gt;
&lt;p&gt;Just imagine: &lt;code class=&quot;language-text&quot;&gt;#!/usr/bin/env js&lt;/code&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[This is some good SHIT]]></title><description><![CDATA[It’s been a while since I last wrote about recruiters, but when I saw a LinkedIn email with the subject “This is some good S**T”, I knew it…]]></description><link>https://zpao.com/posts/this-is-some-good-shit/</link><guid isPermaLink="false">https://zpao.com/posts/this-is-some-good-shit/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;It’s been a while since &lt;a href=&quot;/posts/this-is-very-good-position&quot;&gt;I last wrote about recruiters&lt;/a&gt;, but when I saw a LinkedIn email with the subject “This is some good S**T”, I knew it would be good…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;This is some good S**T
Every manager and candidate I talk to says they want PASSION in the people they hire, the people they work with, and the position they hold. But when I actually speak with an individual who can CONVEY that passion and not just mouth the words, it’s a real treat. So I’m talking to this manager, and when we challenge her on the passion part, man did she go off. I mean wow. The descriptions are basically the same. RubyRubyRubyRuby. Ruby Tuesday, Ruby will you be mine, Jack Ruby, Rub on rails, Ruby don’t bring your love to town, Ruby Red. But what you will be doing, what you will be working on, what you will discover, what you will learn…Its impossible to convey the excitement this person displayed, the descriptions she gave, the PASSION she felt for her company and product. Really, you HAVE tow work her. Please call or send resume to :&lt;a href=&quot;mailto:joseph@rgatech.com&quot;&gt;joseph@rgatech.com&lt;/a&gt;; 415-951-8051 to get hooked up. Not everyone will qualify, but as she said “S**T, its worth a conversation!!!” I LOVE this woman!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My response:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is the worst recruiter email I’ve gotten in a while.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;“This is some good S**T” - Are you fucking serious?&lt;/li&gt;
&lt;li&gt;This whole thing reads like you’re trying to sell me drugs, not a job.&lt;/li&gt;
&lt;li&gt;Do you really expect somebody else to be excited by this? There’s nothing in here that says anything about the job.&lt;/li&gt;
&lt;li&gt;Spelling and grammer mistakes.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Don’t contact me again.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; yes, I misspelled “grammar”. And then I learned about &lt;a href=&quot;http://en.wikipedia.org/wiki/Muphry%27s_law&quot;&gt;Muphry’s Law&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Joe noticed too and responded with a single word email:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;grammar&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Touché.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Adding Line Highlights to Markdown Code Fences]]></title><description><![CDATA[One thing I needed recently was an unobtrusive way to highlight lines of code, while keeping it readable (and of course, inside Markdown…]]></description><link>https://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/</link><guid isPermaLink="false">https://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;One thing I needed recently was an unobtrusive way to highlight lines of code, while keeping it readable (and of course, inside Markdown). The main use case I wanted it for is to highlight changed lines of code inside a tutorial. I think this is a fairly common case, and if your code blocks contain more than 3 lines of code, it’s really helpful for the reader.&lt;/p&gt;
&lt;p&gt;I didn’t find any flavor of Markdown that let me do this, so I figured I would build on what I think is the best variant - &lt;a href=&quot;https://help.github.com/articles/github-flavored-markdown&quot;&gt;GitHub Flavored Markdown&lt;/a&gt;. Code fences are already a non-standard (but super common) feature that GitHub uses, and they’ve also added in syntax highlighting using &lt;a href=&quot;http://pygments.org/&quot;&gt;Pygments&lt;/a&gt;. Pygments already has the ability to highlight lines, so all we need is a way to pass that through.&lt;/p&gt;
&lt;p&gt;I came up with this syntax: &lt;code class=&quot;language-text&quot;&gt;{1,3,8-12}&lt;/code&gt;. It’s simple and let’s you express individual lines and ranges with ease. It shouldn’t conflict with any lexer name you might need to pass to Pygments (or highlighter of choice). Here’s what it looks like in more context:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;```javascript{1,3,8-12}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And a full working example:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight has-highlighted-lines&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// This is nonsense sample code&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; sample &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;sample&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;sample&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;click&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;This is a silly place.&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I would love to see this (or a similar) syntax make it’s way into GFM, and maybe get support in some of the Markdown parsers as another extension. I might start hacking on that soon, but in the mean time, if you want to add support for this to your Jekyll + Redcarpet + Pygments site (and are generating your own &lt;code class=&quot;language-text&quot;&gt;HTML&lt;/code&gt; because GitHub won’t run your code), here’s a file you can drop into &lt;code class=&quot;language-text&quot;&gt;_plugins&lt;/code&gt; and go (only tested with Jekyll 1.0+):&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist5557101&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-code_highlight_lines-rb&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-ruby  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;Ruby&quot; data-tagsearch-path=&quot;code_highlight_lines.rb&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# Replace Jekyll&amp;#39;s handling of the Redcarpet code_block (which already adds&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# support for highlighting, but needs support for the very non-standard&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# &amp;quot;code fences with line highlights&amp;quot; extension).&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# Since this is currently depending on Redcarpet to cooperate, we are going to&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# be naive, and only allow line highlighting when a language is specified. If&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# you don&amp;#39;t want any syntax highlighting but want to highlight lines, then you&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# need to specify text as your language (or it will break), like:&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# ```text{4}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;module&lt;/span&gt; &lt;span class=pl-v&gt;Jekyll&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;module&lt;/span&gt; &lt;span class=pl-v&gt;Converters&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;class&lt;/span&gt; &lt;span class=pl-v&gt;Markdown&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-k&gt;class&lt;/span&gt; &lt;span class=pl-v&gt;RedcarpetParser&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;        &lt;span class=pl-k&gt;module&lt;/span&gt; &lt;span class=pl-v&gt;WithPygments&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;          &lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;block_code&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;code&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;lang&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-en&gt;require&lt;/span&gt; &lt;span class=pl-s&gt;&amp;#39;pygments&amp;#39;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;lang&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=pl-s1&gt;lang&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;split&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;#39;{&amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-s1&gt;lang&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt; &amp;amp;&amp;amp; !&lt;span class=pl-s1&gt;lang_parts&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;empty?&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt; || &lt;span class=pl-s&gt;&amp;#39;text&amp;#39;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-s1&gt;hl_lines&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L20&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;20&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC20&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;size&lt;/span&gt; &amp;gt;= &lt;span class=pl-c1&gt;2&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L21&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;21&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC21&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;              &lt;span class=pl-s1&gt;hl_lines&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;lang_parts&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;gsub&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-pds&gt;/[{}]/&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;split&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;map&lt;/span&gt; &lt;span class=pl-k&gt;do&lt;/span&gt; |&lt;span class=pl-s1&gt;ln&lt;/span&gt;|&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L22&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;22&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC22&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;                &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;matches&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-pds&gt;/(&lt;span class=pl-cce&gt;\d&lt;/span&gt;+)-(&lt;span class=pl-cce&gt;\d&lt;/span&gt;+)/&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;match&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;ln&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L23&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;23&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC23&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;                  &lt;span class=pl-s1&gt;ln&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Range&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;new&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;matches&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;matches&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;2&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;to_a&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;join&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L24&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;24&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC24&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;                &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L25&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;25&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC25&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;                &lt;span class=pl-s1&gt;ln&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L26&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;26&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC26&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;              &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;join&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L27&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;27&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC27&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L28&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;28&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC28&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-s1&gt;output&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-en&gt;add_code_tags&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L29&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;29&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC29&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;              &lt;span class=pl-v&gt;Pygments&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;highlight&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;code&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-pds&gt;:lexer&lt;/span&gt; &lt;span class=pl-c1&gt;=&amp;gt;&lt;/span&gt; &lt;span class=pl-s1&gt;lang&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L30&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;30&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC30&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;                                 &lt;span class=pl-pds&gt;:options&lt;/span&gt; &lt;span class=pl-c1&gt;=&amp;gt;&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-pds&gt;:encoding&lt;/span&gt; &lt;span class=pl-c1&gt;=&amp;gt;&lt;/span&gt; &lt;span class=pl-s&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-pds&gt;:hl_lines&lt;/span&gt; &lt;span class=pl-c1&gt;=&amp;gt;&lt;/span&gt; &lt;span class=pl-s1&gt;hl_lines&lt;/span&gt; &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L31&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;31&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC31&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;              &lt;span class=pl-s1&gt;lang&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L32&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;32&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC32&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;            &lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L33&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;33&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC33&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;          &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L34&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;34&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC34&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;        &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L35&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;35&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC35&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L36&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;36&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC36&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L37&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;37&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC37&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-L38&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;38&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-code_highlight_lines-rb-LC38&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;end&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/5557101/raw/43b0798484a79503464454c3b3482ab5e676bcaa/code_highlight_lines.rb&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/5557101#file-code_highlight_lines-rb&quot;&gt;
          code_highlight_lines.rb
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Retiring Yell at the TV]]></title><description><![CDATA[4 years ago (holy shit!) I [launched]({% post_url 2009-01-21-yell-at-the-tv %}) a little project called Yell at the TV!. Up until recently…]]></description><link>https://zpao.com/posts/retiring-yell-at-the-tv/</link><guid isPermaLink="false">https://zpao.com/posts/retiring-yell-at-the-tv/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;4 years ago (holy shit!) I [launched]({% post_url 2009-01-21-yell-at-the-tv %}) a little project called &lt;a href=&quot;http://yellatthetv.com&quot;&gt;Yell at the TV!&lt;/a&gt;. Up until recently, I’d mostly forgotten about it, but then I got several emails asking for me to remove some tweets. I’d assumed the site just stopped working at some point but apparently not.&lt;/p&gt;
&lt;p&gt;For the past 4 years, it’s been slowly slurping up tweets with a few searches (most of which probably failed). It was running on Dreamhost shared hosting, on an ancient version of Rails, using SQLite. It had a &lt;em&gt;1.7GB&lt;/em&gt; production.sqlite. For any number of reasons the site should have stopped working a while ago, but it kept chugging. It was &lt;em&gt;sloooooooooooooooow&lt;/em&gt; but Google stuck it out and kept scraping.&lt;/p&gt;
&lt;p&gt;At the end of the day, I collected 7,240,187 tweets from 3,224,219 users. I only built in 21 shows and ended up with data about 2,441 episodes of those shows. The data collection and episode classification was pretty dumb, so I know not all of these tweets were really about the TV show or episode I assumed they were.&lt;/p&gt;
&lt;p&gt;Given the pervasion of Twitter and #hashtags on TV, I still think that there’s an experience to explore around this. I would love to see more metadata attached to tweets so somebody could build an experience much like &lt;a href=&quot;http://soundcloud.com&quot;&gt;SoundCloud&lt;/a&gt; for video streaming. There’s only so much you can get humans to encode machine-parsable data and still convey something valuable for humans in 140 characters. You can see Twitter trying to do this with &lt;a href=&quot;https://music.twitter.com/&quot;&gt;#Music&lt;/a&gt;, so we’ll see if they decide to do something for video too.&lt;/p&gt;
&lt;p&gt;Anyway, all data has been removed from the site. I may resurrect it in some way if I ever find the time, though honestly just searching Twitter is probably good enough.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[24 Hours of Android]]></title><description><![CDATA[Yesterday I picked up an HTC First with Facebook Home and have been using it almost exclusively. This is my second Android device (I had a…]]></description><link>https://zpao.com/posts/24-hours-of-android/</link><guid isPermaLink="false">https://zpao.com/posts/24-hours-of-android/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Yesterday I picked up an &lt;a href=&quot;http://www.htc.com/us/smartphones/htc-first/&quot;&gt;HTC First&lt;/a&gt; with &lt;a href=&quot;https://www.facebook.com/home&quot;&gt;Facebook Home&lt;/a&gt; and have been using it almost exclusively. This is my second Android device (I had a Samsung Galaxy Tab at Mozilla for a little while) but the first phone and first device I’ve used with any consistency. My first smartphone was an iPhone 3G four years ago and I’ve since owned an iPhone 4 and 5, so I’m writing from that perspective. I am currently employed by Facebook, so I’ll try to focus on Android itself and not go too much into Home.&lt;/p&gt;
&lt;p&gt;Since this is an experiment and I haven’t switched completely, here’s how my current phone setup is working… iPhone 5 with my personal number forwarding to Google Voice. HTC First is my work number, but set up to use my Google Voice number. SMS/iMessage is not forwardable, so I have been carrying my iPhone with me to check those occasionally. I convinced my wife to message me via Facebook and that’s 90% of my texting, so that’s been good enough for the past day.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Keyboard&lt;/h2&gt;
&lt;p&gt;In a word, it’s “bad”. Some of this is due to my muscle memory of key spacing on my iPhone. But far from all of it.&lt;/p&gt;
&lt;p&gt;Typing an email address is fucking difficult. Let me tell you what is not a valid character in an email address: a space. Let me tell you what takes up most of the bottom row of the Android keyboard when typing an email address: the spacebar. On the right of that there’s a tiny target for the period, which it turns out is actually necessary. So I’ve typed a lot of “name@email com”. And then I’ve needed to fix that, which means trying to get the caret right after that space, but that whole process is pretty bad too, so I usually fuck that up on my first try.&lt;/p&gt;
&lt;p&gt;Also, did you know you can crash the keyboard? And then you can’t get it back without restarting the phone… yup.&lt;/p&gt;
&lt;h2&gt;Click Targets&lt;/h2&gt;
&lt;p&gt;I noticed this a lot in the Play Store, but it seems to be a more systemic issue. Click targets are often small, often not well marked, and sometimes both.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 582px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5f393212531ca2f15610039be458e4f4/14007/24-hours-of-android_click-target-for-ants.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 61.71428571428571%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAMABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAwAC/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQD/2gAMAwEAAhADEAAAAXNMocM3/8QAGBABAQEBAQAAAAAAAAAAAAAAAQIAIkH/2gAIAQEAAQUCXU8zUk+sDqDf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8Bqv/EABgQAAIDAAAAAAAAAAAAAAAAAAERABAx/9oACAEBAAY/AqDKpHJk/8QAGxAAAgIDAQAAAAAAAAAAAAAAAREAITFBYZH/2gAIAQEAAT8hUQF4IonjksMENHUFtuBy5FTjwpif/9oADAMBAAIAAwAAABAPz//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EIj/xAAWEQADAAAAAAAAAAAAAAAAAAAQEVH/2gAIAQIBAT8QSB//xAAcEAEBAAMAAwEAAAAAAAAAAAABEQAhMUGBobH/2gAIAQEAAT8QNoV5H7gOQAlBd67mgIblQ7lwbl4KPrL4Yihd+cKZw/rn/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;What is this? A click target for ants!?&quot;
        title=&quot;What is this? A click target for ants!?&quot;
        src=&quot;/static/5f393212531ca2f15610039be458e4f4/14007/24-hours-of-android_click-target-for-ants.jpg&quot;
        srcset=&quot;/static/5f393212531ca2f15610039be458e4f4/e52aa/24-hours-of-android_click-target-for-ants.jpg 175w,
/static/5f393212531ca2f15610039be458e4f4/70ebb/24-hours-of-android_click-target-for-ants.jpg 350w,
/static/5f393212531ca2f15610039be458e4f4/14007/24-hours-of-android_click-target-for-ants.jpg 582w&quot;
        sizes=&quot;(max-width: 582px) 100vw, 582px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Browsers&lt;/h2&gt;
&lt;p&gt;The First ships with Chrome, but I also installed Firefox (obviously). Being able to choose a browser has been pretty cool. Both of these are synced with my desktop browsers so passwords and history are shared (with their respective desktop counterparts, there’s not good cross-browser sync yet that I know of). So overall my experience has been positive, except for one thing…&lt;/p&gt;
&lt;p&gt;I have a bunch of tabs open because I clicked a link in Facebook or Twitter and it opened in the browser. And then I went back and opened another. Browser choice is great, but the apparent lack of one-time-use support has been annoying. iOS apps mostly solve this by having an embedded browser (which has it’s own drawbacks).&lt;/p&gt;
&lt;h2&gt;Touch Latency&lt;/h2&gt;
&lt;p&gt;It’s there. And it’s annoying. It’s noticeable every time I swipe. It causes accidental clicks.&lt;/p&gt;
&lt;h2&gt;The Back Button&lt;/h2&gt;
&lt;p&gt;As a concept, it’s kind of cool. “The back button always goes back to where you just were*.” But then you read the fine print… ”* except when it doesn’t”. For example, if you open the Play Store and press the back button it takes you back in it’s history stack until it has no history left, then it takes you to the launcher. If you open the Phone app and press back, it takes you to the launcher. In a day it’s taught me that I should never completely trust it.&lt;/p&gt;
&lt;h2&gt;The Menu Button&lt;/h2&gt;
&lt;p&gt;I spent 5 minutes trying to figure out how to remove a phone number from a contact (which my face somehow managed to add to a random person when I tried to call the number…). Then in some other app I accidentally hit the menu button and I found a bunch of hidden stuff. Turns out that’s how you edit a contact without accidentally calling somebody.&lt;/p&gt;
&lt;h2&gt;It’s Not All Bad&lt;/h2&gt;
&lt;p&gt;Most of the apps I needed to use were available. I listend to music with Rdio, bought a movie ticket with Fandango, and rented a Zipcar. There isn’t too much more I &lt;em&gt;need&lt;/em&gt; from a phone that I couldn’t get on Android.&lt;/p&gt;
&lt;p&gt;I’ve actually used the notification area on Android to quickly turn wifi on/off. I know iOS’s Notification Center was pretty heavily influence by Android’s and I would like to see more come from that.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.google.com/landing/now/&quot;&gt;Google Now&lt;/a&gt; seems pretty cool. But also borderline creepy. I knew Google was doing something with my search history, but “shown before flights that you’ve searched for” makes it pretty obvious. It was helpful to have updating commute estimates so I could let my wife know I was going to be late. I look forward to seeing how this plays out over the next couple years.&lt;/p&gt;
&lt;h2&gt;The End&lt;/h2&gt;
&lt;p&gt;At the end of the day, Android would be a major upgrade from a feature phone. But to me it’s a downgrade from iOS. I’m not rooting my phone. I’m not turning my phone into &lt;a href=&quot;http://lifehacker.com/5936339/servers-ultimate-turns-your-old-android-phone-into-a-tiny-multipurpose-server&quot;&gt;a server&lt;/a&gt;. Don’t get me wrong, Android is great if you want more freedom with your phone. The fact that &lt;a href=&quot;https://www.facebook.com/home#chatheads&quot;&gt;Chat Heads&lt;/a&gt; can exist is really cool and I would love to see that sort of feature become available in iOS.&lt;/p&gt;
&lt;p&gt;I’m going to keep using it though --- let’s see if I feel differently in a week or so.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Calling an Array of Functions in JavaScript]]></title><description><![CDATA[I’ve reviewed some bits of code over the past couple months that stored functions in an array and then at some point in the future needed to…]]></description><link>https://zpao.com/posts/calling-an-array-of-functions-in-javascript/</link><guid isPermaLink="false">https://zpao.com/posts/calling-an-array-of-functions-in-javascript/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’ve reviewed some bits of code over the past couple months that stored functions in an array and then at some point in the future needed to call all of them. This is a very simple thing to do, but something about the code always bothered me.&lt;/p&gt;
&lt;p&gt;Assuming:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; callbacks &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You end up iterating over the array and calling each function explicitly:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;callbacks&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Part of the beauty of &lt;code class=&quot;language-text&quot;&gt;forEach&lt;/code&gt; is that you can pass it a function without it having to be defined each time. So we could define a function that does what our anonymous function does for us.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
callbacks&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;call&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This works but it feels silly. JS already has &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call&lt;/code&gt; so why should we have to write our own. Let’s figure out if we can make &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call&lt;/code&gt; work for us…&lt;/p&gt;
&lt;h2&gt;Function.prototype.call&lt;/h2&gt;
&lt;p&gt;The very first thing to know about is some internal implementation details. Like most objects in JS, functions use prototypes, and so within the prototype &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; refers to a particular instance. So a simplified implementation of &lt;code class=&quot;language-text&quot;&gt;call&lt;/code&gt; would look something like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;call&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;thisArg&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; arg1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; arg2&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token constant&quot;&gt;CALL_FN_WITH_SCOPE&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; thisArg&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; arg1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; arg2&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That’s going to be down in native code and will of course vary by engine, but the important thing to remember is that &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; is the function that gets called. There are a few more details in &lt;a href=&quot;http://es5.github.io/#x15.3.4.4&quot;&gt;the spec&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The second thing to know is that you can call functions on prototypes, so long as you use them correctly. So let’s try just calling one function.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;prototype&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;callbacks&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That’s not going to work. Effectively you’re just calling a function that then calls &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt;. We might be able to write some weird code that ends up doing what we want but let’s not. What you actually want to do is call &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call&lt;/code&gt; with a specific &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; so it knows what function to actually run. Confused?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;callbacks&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This works, but it’s also equivalent to just saying &lt;code class=&quot;language-text&quot;&gt;callbacks[0].call()&lt;/code&gt; so it’s pretty bad form to do. But the point here is that we can now call a function by passing it as an argument instead of needing a proper handle to that function.&lt;/p&gt;
&lt;h2&gt;Array.prototype.forEach&lt;/h2&gt;
&lt;p&gt;The way &lt;code class=&quot;language-text&quot;&gt;forEach&lt;/code&gt; works is also important to know. Go read &lt;a href=&quot;http://es5.github.io/#x15.4.4.18&quot;&gt;the spec&lt;/a&gt;, or even just the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach&quot;&gt;MDN page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The key take away: the 2nd argument will be used as the &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; that is accessible in the function argument. If you followed along with that chunk of the spec, you may have seen &lt;code class=&quot;language-text&quot;&gt;[[Call]]&lt;/code&gt; — this is effectively saying that your JS is transformed into this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token function&quot;&gt;myFunction&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;thisArg&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; item&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; index&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; array&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(I say “effectively” because that’s not &lt;em&gt;exactly&lt;/em&gt; how it happens but if you read the spec, the result is the same, with the same possible errors.)&lt;/p&gt;
&lt;h2&gt;Putting it Together…&lt;/h2&gt;
&lt;p&gt;We know we want to call &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call&lt;/code&gt; and we know what function we want to be run. So the next thing to try is:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;callbacks&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;call&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But that doesn’t work. It’s actually going to throw an error. Remember, &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; is what gets called and we’ve actually passed &lt;code class=&quot;language-text&quot;&gt;undefined&lt;/code&gt; as this, not an item from our array. It really looks something like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; callbacks&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We’re almost there. We actually want to pass &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call&lt;/code&gt; as &lt;code class=&quot;language-text&quot;&gt;this&lt;/code&gt; so it gets called — effectively &lt;code class=&quot;language-text&quot;&gt;Function.prototype.call.call&lt;/code&gt;. And that in turn is passed our callback. Basically, we’re creating a little JavaScript &lt;a href=&quot;http://en.wikipedia.org/wiki/Matryoshka_doll&quot;&gt;Matryoshka doll&lt;/a&gt;. It’s a little crazy but it works.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;callbacks&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;call&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;prototype&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;call&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;At the end of the day though, this isn’t straightforward code. And in fact, &lt;a href=&quot;http://jsperf.com/call-vs-prototype-call&quot;&gt;it’s quite slow&lt;/a&gt;. So I can’t recommend ever writing this code, though it made for an interesting thought experiment.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Safari 6 and a Bug with getBoundingClientRect]]></title><description><![CDATA[Safari 6 shipped in July with OS X Mountain Lion and with it, a nice little WebKit bug that has some fun side effects. The bug has since…]]></description><link>https://zpao.com/posts/safari-6-and-a-bug-with-getboundingclientrect/</link><guid isPermaLink="false">https://zpao.com/posts/safari-6-and-a-bug-with-getboundingclientrect/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Safari 6 shipped in July with OS X Mountain Lion and with it, a nice little WebKit bug that has some fun side effects. The bug has since been fixed in WebKit, but due to Safari’s slow release schedule, we’ll probably be living with this one for a while. Chrome on the other hand is unaffected (at least on the current stable release). No other browser seem to suffer from the same bug.&lt;/p&gt;
&lt;h2&gt;So What Happens?&lt;/h2&gt;
&lt;p&gt;Basically, if you translate a &lt;code class=&quot;language-text&quot;&gt;position:fixed&lt;/code&gt; element, Safari doesn’t know where it is. It &lt;em&gt;does&lt;/em&gt; — Safari renders everything in the right place — it just can’t tell you where it is. Once the element is translated, calls to &lt;code class=&quot;language-text&quot;&gt;getBoundingClientRect&lt;/code&gt; lie. Safari basically forgets that the element was fixed and returns values that change as you scroll (sort of the opposite of what you want with &lt;code class=&quot;language-text&quot;&gt;position:fixed&lt;/code&gt;). I’m pretty sure the Web Inspector uses &lt;code class=&quot;language-text&quot;&gt;getBoundingClientRect&lt;/code&gt; in the inspector too… go ahead and hover the element inside the dev tools and watch where Safari draws the bounding rectangle in content.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/examples/safari-6-and-a-bug-with-getboundingclientrect/&quot;&gt;I made a quick demo&lt;/a&gt; to show what’s happening.&lt;/p&gt;
&lt;h2&gt;It Gets Better… Sike!&lt;/h2&gt;
&lt;p&gt;The effect of this is cascading. Any element that is a descendent of a translated element will have its position reported incorrectly. On top of a misreported position, since Safari thinks the element is off screen, focusing it causes the page to scroll, &lt;em&gt;even if you can already see it&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;What Can We Do?&lt;/h2&gt;
&lt;p&gt;As far as I know, there’s only 1 option if you need generic code: walk up the DOM when you want to know the position of an element and see if any ancestors are translated, and then when you find one use &lt;a href=&quot;https://developer.apple.com/library/safari/documentation/AudioVideo/Reference/WebKitCSSMatrixClassReference/WebKitCSSMatrix/WebKitCSSMatrix.html&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;WebKitCSSMatrix&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[A Problem with Kellum Image Replacement]]></title><description><![CDATA[If you’ve ever made a website that needed to use an image instead of some text, chances are you’ve used some image replacement technique. We…]]></description><link>https://zpao.com/posts/a-problem-with-kellum-image-replacement/</link><guid isPermaLink="false">https://zpao.com/posts/a-problem-with-kellum-image-replacement/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;If you’ve ever made a website that needed to use an image instead of some text, chances are you’ve used some image replacement technique. We all have our favorite way of doing this, but probably the most popular was the Phark technique, AKA “-9999px hack”, which keeps text accessible to screen readers while hiding text off screen (unless you have a ludicrously long piece of text).&lt;/p&gt;
&lt;p&gt;Recently, a new technique has become popular, &lt;a href=&quot;http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/&quot;&gt;touted by the venerable Zeldman&lt;/a&gt;. It’s a strikingly elegant solution and I quite like it.&lt;/p&gt;
&lt;h2&gt;However…&lt;/h2&gt;
&lt;p&gt;It does have one issue. When using the browser’s “find in page” functionality, the text you’ve hidden will become visible if it matches the text you’re looking for. Even worse, once the text is shown it doesn’t get hidden again when the search is complete. Try it out yourself on &lt;a href=&quot;/examples/a-problem-with-kellum-image-replacement/&quot;&gt;the example page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Like most things, there are quirks here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This bug(?) only occurs when using a positive &lt;code class=&quot;language-text&quot;&gt;text-indent&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;Different browsers behave differently. In this case, the text doesn’t become visible in Gecko browsers (Firefox). Webkit (Chrome, Safari) and Presto (Opera) both make the text visible. I haven’t tested IE.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Solutions?&lt;/h2&gt;
&lt;p&gt;I haven’t figured out a way to work around this, so for the time being I’ll likely be using the -9999px hack (or some smaller number). Or I may try another technique that sets &lt;code class=&quot;language-text&quot;&gt;font: 0/0 a&lt;/code&gt;, which of course has it’s own set of &lt;a href=&quot;http://nicolasgallagher.com/another-css-image-replacement-technique/&quot;&gt;compatibility problems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In case you’re using Firefox and can’t see the bug, here’s what it looks like:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 637px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b2ad15138281e934c2066fca3f3e9849/13a9a/a-problem-with-kellum-image-replacement.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 80.57142857142858%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAAAsTAAALEwEAmpwYAAADZUlEQVQ4y6WTy28bVRTGLxRYdIX/AZZI2SMFVkgohQrxiLNgF9RFSOQ0cl1QURZRkMjG3mSTxwaQYqfCCk5qglUhXqsqsZPU6cx4Ho4944mdsR3HsWfGrh0Tz9wPxqrsdIfKkb77HV0d/XSuzrnkj99/I19MTFyLbv70+i8PNl3+QMC1tLTkWllZci0vL7tWV1dcgUDA5ff7XWtra65gMNhzR6FQqKdwOOxaXFx8DQAhzjE3N/fWbmIv+2g3cawoci6dTquSJKmiKKiCIKqyLKuKoqgcx6ksx/WdYZgcy7LK4eFhaX19/fM+cHx8fHQ3nkAyyUAQJKhqHplsDhk5h2w2CzWnIJvNQJJEiKIInud7LssyNE3DwcEBAoHAN33g1NSUW9Nkq1rN26enOcswy7ZRLdhGSbGljGLzRzn7WKvYWvHUzhcKdk49trNZxeYFweY4rquqKoLB4HwfeO+ez82yARrf9WIv/iV9FP8KidBnSM69g/DsJwh/PYqHS7fwOLmNTqcL0zRhGAYqlQotl8vW5eUltre3Bx3Ozvrcf/3poxvhjxBa+5iGf/wU4e9v4tf7HyIWuokH393A/dW3wbI/wAlKbTwLCsBykkgkMgD6fDNulp2nyeQEnjzxUIbxIMlM45C7jSRzG4+ZGewd3EKxuHmF8zxwa2trALx71+euVmVqGgoMI0d1XYEjQ8+iXkujYaowTQXNZgWdi7/RbrfRarXwtPmUttttq9PpIBLZvAL0+dw8n6bptAJBOKKSmAHDCMgclSDwGgQ+g7NqHa3WBfS6jnqthvPzc1QqZ7RaPbfqdR0bGxsD4J07XnehkKcnJwVnDXpeKlWgaSsoFv0olY5xUiiiWj3rrUm5VHYGgnK5TLUTzep2u4hGowOg1+t1swxLOZaDJEqUY1nwvAg+9RCSFAPHMeBTAlKpFFJcCk6dIIjI5/NUkRVL1w1Eoz8/9+TRWq1mGYZpN5tNq9FoWIZhWIZxYZlGp5c7d41G09J13TJN03Lqng3k0rZtZ8rzV9Zmdgz/M2Kx2Ld94NjY2Ac7OztcIpEQ4/G48F+VSCQc5/f39zMLCwszhJCXnW/3EiHkDULIu4SQ9wkhN15A7xFC3hweHn6l1+HQ0NA1j8dzfXJy8oU0PT19fWRk5FXyb/wDKK6g4B3tipYAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;a problem with kellum image replacement&quot;
        title=&quot;a problem with kellum image replacement&quot;
        src=&quot;/static/b2ad15138281e934c2066fca3f3e9849/13a9a/a-problem-with-kellum-image-replacement.png&quot;
        srcset=&quot;/static/b2ad15138281e934c2066fca3f3e9849/4edbd/a-problem-with-kellum-image-replacement.png 175w,
/static/b2ad15138281e934c2066fca3f3e9849/13ae7/a-problem-with-kellum-image-replacement.png 350w,
/static/b2ad15138281e934c2066fca3f3e9849/13a9a/a-problem-with-kellum-image-replacement.png 637w&quot;
        sizes=&quot;(max-width: 637px) 100vw, 637px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Making restore_on_demand Accessible]]></title><description><![CDATA[I know I just wrote about some changes to Session Restore coming in Firefox 15, but here’s another one… Since Firefox 8, we’ve had a visible…]]></description><link>https://zpao.com/posts/making-restore-on-demand-accessible/</link><guid isPermaLink="false">https://zpao.com/posts/making-restore-on-demand-accessible/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I know I just wrote about &lt;a href=&quot;/posts/session-restore-changes-in-firefox-15&quot;&gt;some changes to Session Restore coming in Firefox 15&lt;/a&gt;, but here’s another one…&lt;/p&gt;
&lt;p&gt;Since Firefox 8, &lt;a href=&quot;/posts/max-concurrent-tabs-is-dead/&quot;&gt;we’ve had a visible preference to restore tabs “on demand”&lt;/a&gt;. This surfaced as a checkbox on the “General” preference pane. The checkbox would only be accessible if you enabled Session Restore (by setting Firefox to “Show my windows and tabs from last time”). This was a bit unfortunate because the preference had effects even if you didn’t have Session Restore enabled, namely, that preference was honored when restoring a session following a crash or when returning from Private Browsing mode. In order to change the preference, Session Restore had to be enabled temporarily.&lt;/p&gt;
&lt;p&gt;We’ll be changing that in Firefox 15 now that &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=720154&quot;&gt;bug 720154&lt;/a&gt; landed. The checkbox has been moved from the “General” pane to the “Tabs” pane and we’ve removed the dependency on Session Restore being enabled.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/bd6f427c510ad7e53ca7380b88b3801e/f8067/making-restore-on-demand-accessible.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.285714285714285%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACvElEQVQoz52QS2sTURTHLwWz8DMIDvgVurZQRAVXQm1KN1lIP0CsC9uSWoRSNHRRF4KgNg1u+oxNk2lek8ek4sY+MpOZO488pJqkmZkkfZGO2LlHZgJFl7r48T/3wP2dw0Ev/fPX51+/odbWN6hsJk3F6TgVpmNUJJam6M8JajMfpd69XaKSiQSVSiYomqapaDRKRSIRB7umafrm3Nyca3d3F6FgMOjZL3DA8/yFKGJTkiWzpEimKgmmykmmvCeY+4WvpiCIpoixKcuyqSiKqaqqnReqqv7EGHf9fv8gACD0fHr6STKZhFAoRFbX1oGObUIyFgU6tAyxlQgklrchQodgZXUdNkKfIBwOQzqTAZZlIZfLOckwDIyNjQ05woWFBS/H8SAI4qUoikQQRCJiTIqCSLCMSRELRJYUoqqqgyRJpFwuk0qlYmNVq1UiyzIZHx/vCQOLAW9RlEDE2FJUhWBJglKpBLIsg4QlqFaqcHx8DKenp3BycuKk/e50OjbE7mmaBj6fryd8Hwh49zkeCoWCxfM84XkeOI4DnuNg7+AAZEWBUrncG6IooCgKNDUNDMOwIa1WC+r1OkxNTfWEH+ZfeXl6C4rxqCUzMSIxMcDJbfjxJQ8dfg90w4Bmswm6roOuadBoNByZLbKF7Xbb6V0JF1/4vEpiC7jU9q9CPHpZTMUsnI5bhXjUqqZo+0bW4eF3y75XpVK1dF3/k0vDMKxarWZNTk72hEvBj0/1Qw2MWg1ajTq0jhrQPmo4taFpoOm6s419J5uzszM4Pz+/otvtgr3lzMzMsCOceDbxmN7IfMuxOwq7k1dz+R5sfkdl7WRZhzzbq7PZ7F/kcrkSwzCyx+N54AgRQrcQQncQQvcQQnf/A/vfIELohiMcuD3Q9/D+iOvR0LDLPeJ2ud3/zujo6LX+/v6+2dlZ9Bu8f5sMjNe+SQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;making restore on demand accessible&quot;
        title=&quot;making restore on demand accessible&quot;
        src=&quot;/static/bd6f427c510ad7e53ca7380b88b3801e/8c557/making-restore-on-demand-accessible.png&quot;
        srcset=&quot;/static/bd6f427c510ad7e53ca7380b88b3801e/4edbd/making-restore-on-demand-accessible.png 175w,
/static/bd6f427c510ad7e53ca7380b88b3801e/13ae7/making-restore-on-demand-accessible.png 350w,
/static/bd6f427c510ad7e53ca7380b88b3801e/8c557/making-restore-on-demand-accessible.png 700w,
/static/bd6f427c510ad7e53ca7380b88b3801e/f8067/making-restore-on-demand-accessible.png 726w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Session Restore Changes in Firefox 15]]></title><description><![CDATA[There are a few changes coming in Firefox 15’s Session Restore. There are a few under the hood changes which should be transparent to…]]></description><link>https://zpao.com/posts/session-restore-changes-in-firefox-15/</link><guid isPermaLink="false">https://zpao.com/posts/session-restore-changes-in-firefox-15/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;There are a few changes coming in Firefox 15’s Session Restore. There are a few under the hood changes which should be transparent to anybody using the API, but there are also some changes to the format of the &lt;code class=&quot;language-text&quot;&gt;JSON&lt;/code&gt; that is exposed.&lt;/p&gt;
&lt;h2&gt;Form Data&lt;/h2&gt;
&lt;p&gt;All of the changes have to do with the &lt;code class=&quot;language-text&quot;&gt;formdata&lt;/code&gt; object that is used to store (wait for it…) form data. Historically we’ve done our best to save the data so that when you recover from a crash or resume a session, we can do our best to get you going again. When we’ve saved the data in the past, it was just in a flat object that looked something like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;&quot;formdata&quot;: {
  &quot;#elementID&quot;: &quot;value for form field with id&quot;,
  &quot;/xpath/string&quot;: &quot;value for form field without id&quot;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Starting with Firefox 15, &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=697903&quot;&gt;we’ve broken that up a bit further&lt;/a&gt;, with &lt;code class=&quot;language-text&quot;&gt;id&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;xpath&lt;/code&gt; keys to scoped data. The other key difference is that we no longer prepend &lt;code class=&quot;language-text&quot;&gt;#&lt;/code&gt; to the element’s id (it was only being used to distinguish id vs xpath). The updated format looks like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;&quot;formdata&quot;: {
  &quot;id&quot;: {
    &quot;elementID&quot;: &quot;value for form field with id&quot;
  },
  &quot;xpath&quot;: {
    &quot;/xpath/string&quot;: &quot;value for form field without id&quot;
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This was a part of making some of Session Restore more usable to other components. In this case it was something originally thought up for Sync to be able to reuse code when syncing tabs between devices.&lt;/p&gt;
&lt;h2&gt;Better Restoration of &lt;code class=&quot;language-text&quot;&gt;&amp;lt;select&gt;&lt;/code&gt; Elements&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=662743&quot;&gt;The other change&lt;/a&gt; will result in better restoration of &lt;code class=&quot;language-text&quot;&gt;&amp;lt;select&gt;&lt;/code&gt; elements. For the simple case (no &lt;code class=&quot;language-text&quot;&gt;multiple&lt;/code&gt;) we would simply store the &lt;code class=&quot;language-text&quot;&gt;selectedIndex&lt;/code&gt; and move on. When restoring, we would re-select that index (unless it was suddenly out of bounds). This resulted in the wrong &lt;code class=&quot;language-text&quot;&gt;&amp;lt;option&gt;&lt;/code&gt; being selected if &lt;code class=&quot;language-text&quot;&gt;&amp;lt;option&gt;&lt;/code&gt;s were added or removed. This has been a problem for years with Bugzilla where a new product or component would get added and then people would accidentally save changes to bugs and make changes they didn’t intend.&lt;/p&gt;
&lt;p&gt;So now we save the value of the selected &lt;code class=&quot;language-text&quot;&gt;&amp;lt;option&gt;&lt;/code&gt; and check that when restoring the form. If the value at &lt;code class=&quot;language-text&quot;&gt;selectedIndex&lt;/code&gt; doesn’t match what we saved, we’ll look through all of the &lt;code class=&quot;language-text&quot;&gt;&amp;lt;option&gt;&lt;/code&gt;s until we find a match. It’s a simple change but should result in more reliable form restoration.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;&quot;selectEl&quot;: 1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;becomes&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;&quot;selectEl&quot;: {
  &quot;selectedIndex&quot;: 1,
  &quot;value&quot;: &quot;option value&quot;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Backwards Compatability&lt;/h2&gt;
&lt;p&gt;As with all changes in Session Restore, we’ll be maintaining compatability with the old format for some extended period of time. We will continue to be able to read the old format, but we won’t write it back out. If you’re an API consumer, you should update accordingly. Extension authors should be ready to handle both formats while supporting Firefox 14 and below.&lt;/p&gt;
&lt;h2&gt;Not Me!&lt;/h2&gt;
&lt;p&gt;I didn’t write code for any of this! Thanks to Andres and Bellindira from AppCoast for picking up half-written patches and taking them the rest of the way. Tim Taubert helped out a bunch with reviews too. There are other Session Restore changes that this group is working on so there’s more to come!&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Building Firefox on OS X Mountain Lion]]></title><description><![CDATA[In a similar vein to my article about building on 10.7, here are some issues that have come up while building Firefox on 10.8. I’ve had…]]></description><link>https://zpao.com/posts/building-firefox-on-os-x-mountain-lion/</link><guid isPermaLink="false">https://zpao.com/posts/building-firefox-on-os-x-mountain-lion/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;In a similar vein to &lt;a href=&quot;/posts/building-firefox-on-os-x-lion&quot;&gt;my article about building on 10.7&lt;/a&gt;, here are some issues that have come up while building Firefox on 10.8. I’ve had Mountain Lion installed for a few weeks now and while there were a few hiccups, things have been pretty smooth. Currently I have DP3 update 2 and Xcode 4.4 preview 5 installed.&lt;/p&gt;
&lt;h2&gt;Xcode &amp;#x26; Command Line Tools&lt;/h2&gt;
&lt;p&gt;If you’ve installed Mountain Lion (MoLo) then you’ve probably realized that you need to reinstall Xcode. This is available on the pre-release software page. Make sure you download &amp;#x26; install the Command Line Tools as well. I had issues installing the CL tools from within Xcode, so the separate download was necessary.&lt;/p&gt;
&lt;h2&gt;&lt;code class=&quot;language-text&quot;&gt;egrep&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;You will likely see an error about &lt;code class=&quot;language-text&quot;&gt;egrep&lt;/code&gt;. We have a “fixed &lt;code class=&quot;language-text&quot;&gt;egrep&lt;/code&gt;” command we’ve been using since Lion to work around an issue. It seems we no longer need to work around that issue. I have a patch in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=750574&quot;&gt;bug 750574&lt;/a&gt; that makes sure our workaround is only used on Lion.&lt;/p&gt;
&lt;h2&gt;&lt;code class=&quot;language-text&quot;&gt;clang&lt;/code&gt; &amp;#x26; &lt;code class=&quot;language-text&quot;&gt;ccache&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;I’ve been using &lt;code class=&quot;language-text&quot;&gt;clang&lt;/code&gt; to build Firefox for a few months now and have been using &lt;code class=&quot;language-text&quot;&gt;ccache&lt;/code&gt; for years. While I didn’t have any issue before, on MoLo the 2 didn’t play together nicely. I got build errors while building Growl. Specifically, &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=754988&quot;&gt;there were issues with an (un?)expanded NSParameterAssert macro&lt;/a&gt;. The fix is to ensure that you set the &lt;code class=&quot;language-text&quot;&gt;CCACHE_CPP2&lt;/code&gt; environment variable to &lt;code class=&quot;language-text&quot;&gt;yes&lt;/code&gt; (&lt;code class=&quot;language-text&quot;&gt;export CCACHE_CPP2=yes&lt;/code&gt;). Peter Eisentraut explains why this &lt;code class=&quot;language-text&quot;&gt;ccache&lt;/code&gt; setting works on &lt;a href=&quot;http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html&quot;&gt;his blog&lt;/a&gt;. We now have a &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=755145&quot;&gt;bug on file to make this automatic&lt;/a&gt; so you don’t have to set environment variables to get a working build.&lt;/p&gt;
&lt;h2&gt;homebrew&lt;/h2&gt;
&lt;p&gt;This isn’t directly related, but I had some issues with packages installed via &lt;code class=&quot;language-text&quot;&gt;brew&lt;/code&gt;. In my case &lt;code class=&quot;language-text&quot;&gt;imagemagick&lt;/code&gt; didn’t cooperate. That’s not required to build Firefox, but just a heads up that you may have issues. &lt;a href=&quot;https://gist.github.com/1860902&quot;&gt;These steps&lt;/a&gt; got everything working for me.&lt;/p&gt;
&lt;h2&gt;That’s it&lt;/h2&gt;
&lt;p&gt;There’s a good chance that this isn’t even relevant by the time you install 10.8. If so, then I’ve done my job!&lt;/p&gt;
&lt;p&gt;If you’re interested in working on features for Mountain Lion, let me know or follow &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=728102&quot;&gt;the tracking bug&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[hg amend]]></title><description><![CDATA[Mercurial 2.2 introduced a new  option to . If you’ve ever used Git, then you are probably thinking “finally”. For those of you who haven’t…]]></description><link>https://zpao.com/posts/hg-amend/</link><guid isPermaLink="false">https://zpao.com/posts/hg-amend/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Mercurial 2.2 introduced a new &lt;code class=&quot;language-text&quot;&gt;--amend&lt;/code&gt; option to &lt;code class=&quot;language-text&quot;&gt;commit&lt;/code&gt;. If you’ve ever used Git, then you are probably thinking “finally”. For those of you who haven’t used it, it’s a quick way to modify the last commit.&lt;/p&gt;
&lt;p&gt;My workflow with Mercurial is quite different than my workflow with Git, so &lt;code class=&quot;language-text&quot;&gt;amend&lt;/code&gt; is not going to be as critically important. With Git I typically just have a series of commits on a branch. With Mercurial I typically use a patch queue (because that’s just easier with posting patches to Bugzilla). But there have been plenty of times where I’ve &lt;code class=&quot;language-text&quot;&gt;qfinish&lt;/code&gt;ed a patch only to realize I didn’t update the commit message to include the reviewer. Previously this was a 3 step process to fix: &lt;code class=&quot;language-text&quot;&gt;qimport -r tip; qrefresh -e; qfinish qtip&lt;/code&gt;). Now it’s 1: &lt;code class=&quot;language-text&quot;&gt;hg commit --amend&lt;/code&gt;. You can do the same with files you forgot to add.&lt;/p&gt;
&lt;p&gt;I haven’t played with it much, but the &lt;a href=&quot;http://mercurial.selenic.com/wiki/WhatsNew#Mercurial_2.2_.282012-05-01.29&quot;&gt;release notes&lt;/a&gt; mention that this is a “safe” operation since it uses Mercurial &lt;a href=&quot;http://mercurial.selenic.com/wiki/Phases&quot;&gt;phases&lt;/a&gt;. Essentially this simply stops you from editing history in patches that you’ve already pushed to a remote repository.&lt;/p&gt;
&lt;p&gt;So there you have it. And a little bonus for people who like to cut down on typing - alias the option to a new command. I’ve been doing this with Git for ages, but now I can finally add it to my &lt;code class=&quot;language-text&quot;&gt;.hgrc&lt;/code&gt; too:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[alias]
amend = commit --amend&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content:encoded></item><item><title><![CDATA[Lion Full Screen Coming to Firefox]]></title><description><![CDATA[For the past little while, I’ve been working on adding support for OS X Lion’s native Full Screen mode to Firefox. This was something that…]]></description><link>https://zpao.com/posts/lion-full-screen-coming-to-firefox/</link><guid isPermaLink="false">https://zpao.com/posts/lion-full-screen-coming-to-firefox/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;For the past little while, I’ve been working on adding support for &lt;a href=&quot;https://www.apple.com/macosx/whats-new/full-screen.html&quot;&gt;OS X Lion’s native Full Screen mode&lt;/a&gt; to Firefox. This was something that others had started before Lion was even released but nobody ever finished it. Since then, every other major browser has shipped support for the feature.&lt;/p&gt;
&lt;p&gt;I decided to start working on it in December since nobody else was. Having never really touched Objective C(++) or Cocoa, the task took a bit longer for me than it would have others, but now it’s done and I have more experience with our &lt;code class=&quot;language-text&quot;&gt;widget/&lt;/code&gt; code. At the end of the day, the changes need to hook everything up were suprisingly minimal. If you want to check out the process, the work was done in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=639705&quot;&gt;bug 639705&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The patches were landed the other day and are currently in &lt;a href=&quot;http://nightly.mozilla.org&quot;&gt;Firefox Nightly&lt;/a&gt;. Assuming there are no major issues, this should ship in Firefox 14. Since this landed early in the release cycle, there should be plenty of time to catch any fallout. There are a few known bugs to follow up with (see below) but if you notice any other issues on the Firefox side, please &lt;a href=&quot;https://bugzilla.mozilla.org/enter_bug.cgi?blocked=639705&amp;#x26;cc=paul%40oshannessy.com&amp;#x26;component=General&amp;#x26;op_sys=Mac%20OS%20X&amp;#x26;product=Firefox&amp;#x26;rep_platform=x86&quot;&gt;file a new bug&lt;/a&gt; (already setup for a new bug in Firefox:General with me CCed).&lt;/p&gt;
&lt;h2&gt;Adding Support to Your Gecko Application&lt;/h2&gt;
&lt;p&gt;Since the feature is enabled down in the core, it’s now easy to support Lion Full Screen in your Gecko application. All that you need to do is add &lt;code class=&quot;language-text&quot;&gt;fullscreenbutton=&quot;true&quot;&lt;/code&gt; to your &lt;code class=&quot;language-text&quot;&gt;&amp;lt;window&gt;&lt;/code&gt;. Thunderbird &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=711750&quot;&gt;is in the process of doing this&lt;/a&gt;. If you’d like your application to make UI changes (beyond just titlebar hiding), the &lt;code class=&quot;language-text&quot;&gt;fullscreen&lt;/code&gt; event is fired on the window after the transition is complete.&lt;/p&gt;
&lt;h2&gt;But wait, there’s more&lt;/h2&gt;
&lt;p&gt;What I’ve done so far is really just the baseline support. There are a few followup bugs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=703724&quot;&gt;support resizing content area&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=716450&quot;&gt;figure out ‘background themes’ support&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=714172&quot;&gt;update menu with new string/shortcut&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=714186&quot;&gt;add top padding?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;and surely some other theme related tweaks&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[This is very good position]]></title><description><![CDATA[Hi Paul , I hope that you are doing well. There is a position in Ebay in as Frontend Engineer. Hiring managers from two different groups are…]]></description><link>https://zpao.com/posts/this-is-very-good-position/</link><guid isPermaLink="false">https://zpao.com/posts/this-is-very-good-position/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Hi Paul ,&lt;/p&gt;
&lt;p&gt;I hope that you are doing well. There is a position in Ebay in as Frontend Engineer. Hiring managers from two different groups are very much impressed with your profile and they want to set up telephonic talk on the phone.&lt;/p&gt;
&lt;p&gt;This is very good position . So would you please send me updated copy of your resume. If you are looking for Fulltime or long term contract  whatever way you are looking they can do it for you.&lt;/p&gt;
&lt;p&gt;Whatever  salary  you  are  looking  for    that  way  manager  is  ready  to  pay  you.&lt;/p&gt;
&lt;p&gt;Please send me salary expectation and your availability as soon as possible so we can schedule your interview because manager has your profile and they are pushing me to schedule your interview as soon as possible so you will be on board immediately after clearing an interview.&lt;/p&gt;
&lt;p&gt;Manager is also asking one question after reviewing your profile. So would you please give me your contact details so we can talk more about this position. He has very much hope on you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I understand that English is not everybody’s first language but I expect better of somebody whose job is entirely about communication.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Somebody That I Used to Know]]></title><description><![CDATA[Somehow I’ve been listening to Somebody That I Used to Know by Gotye on repeat for the past week and haven’t gotten sick of it yet. This…]]></description><link>https://zpao.com/posts/somebody-that-i-used-to-know/</link><guid isPermaLink="false">https://zpao.com/posts/somebody-that-i-used-to-know/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/d9NF2edxy-M?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Somehow I’ve been listening to &lt;em&gt;Somebody That I Used to Know&lt;/em&gt; by Gotye on repeat for the past week and haven’t gotten sick of it yet. This cover by Walk off the Earth is so excellent, not just because of how good it sounds but also because of how it was performed.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[What's the Deal With V8Monkey & SpiderNode?]]></title><description><![CDATA[tl;dr Neither are being actively worked on and could use some love. After NodeConf, development of V8Monkey & SpiderNode slowed. We all got…]]></description><link>https://zpao.com/posts/whats-the-deal-with-v8monkey-spidernode/</link><guid isPermaLink="false">https://zpao.com/posts/whats-the-deal-with-v8monkey-spidernode/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt; Neither are being actively worked on and could use some love.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;After NodeConf, development of &lt;a href=&quot;https://github.com/zpao/v8monkey&quot;&gt;V8Monkey&lt;/a&gt; &amp;#x26; &lt;a href=&quot;https://github.com/zpao/spidernode&quot;&gt;SpiderNode&lt;/a&gt; slowed. We all got a bit burnt out in the weeks preceding NodeConf and took a little break. Shortly after, Shawn left Mozilla to work at Facebook with Rob on &lt;em&gt;[redacted]&lt;/em&gt; and the little break became longer. I was in the middle of planning a wedding &amp;#x26; helping the (now-)wife with &lt;a href=&quot;http://onetruelovevintage.com&quot;&gt;her company&lt;/a&gt;. Shawn &amp;#x26; Rob were busy with work and some other &lt;a href=&quot;https://github.com/sdwilsh/tree-bot&quot;&gt;side&lt;/a&gt; &lt;a href=&quot;https://github.com/mozilla/rust&quot;&gt;projects&lt;/a&gt;. Mozilla opened an office in SF in August, so I stopped riding the train down the peninsula with Shawn &amp;#x26; Rob as often. Long story short, we lost interest.&lt;/p&gt;
&lt;p&gt;In October I pulled current mozilla-central into the V8Monkey tree &amp;#x26; tried to update from there. But some core things changed. APIs changed around Typed Arrays in SpiderMonkey. &lt;code class=&quot;language-text&quot;&gt;JSScript&lt;/code&gt; stopped being a &lt;code class=&quot;language-text&quot;&gt;JSObject&lt;/code&gt; which broke some of our assumptions with our implementation. I have &lt;a href=&quot;https://gist.github.com/1665805&quot;&gt;a patch locally&lt;/a&gt; to try to fix those, but they’re incomplete (it immediately segfaults). It’s been 3 months and the JS engine doesn’t idle, so it’s entirely possible the world changed again.&lt;/p&gt;
&lt;p&gt;SpiderNode is untouched. But Node has definitely changed - it’s gone from 0.4.x to 0.6.x and works on Windows! It’s now using a newer version of V8, and further, using more V8 APIs that V8Monkey hasn’t ported. It also looks like Buffers got a pretty big overhaul (I started to merge that, but it got messy). There’s surely some other work that needs to be done.&lt;/p&gt;
&lt;h2&gt;The Future&lt;/h2&gt;
&lt;p&gt;There has been &lt;a href=&quot;https://twitter.com/#!/BrendanEich/status/158326339039010817&quot;&gt;some mention&lt;/a&gt; of the JS team here at Mozilla implementing the V8 API. Not me or somebody doing it in their free time, but a full-time employee. I haven’t seen that happen, but that’s the best possible outcome. Assuming we have 100% compatibility (which is the only target that makes sense), then the path to reviving SpiderNode from there is easy. Basically we’d just need to fix the build system again to compile SpiderMonkey &amp;#x26; use that. Brendan has also &lt;a href=&quot;https://twitter.com/#!/BrendanEich/status/158328492709257217&quot;&gt;threatened to unbitrot V8Monkey&lt;/a&gt;, but he’s a busy guy, so we’ll see.&lt;/p&gt;
&lt;p&gt;If that doesn’t happen, then the future is grim. I don’t have the time or drive to do this myself. If you’re interested in helping out though, keep reading…&lt;/p&gt;
&lt;h2&gt;Want to help?&lt;/h2&gt;
&lt;p&gt;Awesome! Get in touch &amp;#x26; I can help get you started. I’m more than happy to get that going because I’d like to see these projects live on. Keep in mind that the real work mostly happens in V8Monkey — it’s 100% C++ and you’re implementing one JS engine’s API with another.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[And Just Like That I'm a Firefox Peer]]></title><description><![CDATA[Not-so-long story short, as of a couple weeks ago Firefox review policies changed and now I can review any code going into Firefox ()! In…]]></description><link>https://zpao.com/posts/and-just-like-that-im-a-firefox-peer/</link><guid isPermaLink="false">https://zpao.com/posts/and-just-like-that-im-a-firefox-peer/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Not-so-long story short, as of a couple weeks ago Firefox review policies changed and now I can review any code going into Firefox (&lt;code class=&quot;language-text&quot;&gt;browser/&lt;/code&gt;)! In actuality though, if a review request came my way in an area I wasn’t familiar with, I would just give feedback and redirect the review to somebody more familiar with that code.&lt;/p&gt;
&lt;p&gt;Read up on the &lt;a href=&quot;https://wiki.mozilla.org/Firefox/Code_Review&quot;&gt;new Firefox review policy&lt;/a&gt; and see &lt;a href=&quot;https://wiki.mozilla.org/Modules/Firefox&quot;&gt;who else can review your patches&lt;/a&gt; to Firefox.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Married!]]></title><description><![CDATA[Did you know that I got married 3.5 weeks ago? Now you do! I have more to say about it all, but here’s a short video from our awesome…]]></description><link>https://zpao.com/posts/married/</link><guid isPermaLink="false">https://zpao.com/posts/married/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe src=&quot;http://player.vimeo.com/video/30352750?title=0&amp;amp;byline=0&amp;amp;portrait=0&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;
&lt;p&gt;Did you know that I got married 3.5 weeks ago? Now you do! I have more to say about it all, but here’s a short video from our awesome videographers, &lt;a href=&quot;http://seaglasscinema.com/&quot;&gt;Seaglass Cinema&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[max_concurrent_tabs is Dead; Long Live restore_on_demand]]></title><description><![CDATA[Since last September, you could set  to 0, and you would essentially have a built-in BarTab. I slipped that in later in the Firefox…]]></description><link>https://zpao.com/posts/max-concurrent-tabs-is-dead/</link><guid isPermaLink="false">https://zpao.com/posts/max-concurrent-tabs-is-dead/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Since &lt;a href=&quot;/posts/cascaded-session-restore-a-hidden-bonus&quot;&gt;last September&lt;/a&gt;, you could set &lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.max_concurrent_tabs&lt;/code&gt; to 0, and you would essentially have a built-in BarTab. I slipped that in later in the Firefox 4 release cycle as a part of cascaded session restore, but it required going into &lt;code class=&quot;language-text&quot;&gt;about:config&lt;/code&gt; and changing a preference value (or installing something like &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/bartab-lite/&quot;&gt;BarTab Lite&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Starting with the latest nightly (and soon to be Aurora 8), &lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.max_concurrent_tabs&lt;/code&gt; is no more. We’re no longer allowing you to specify a specific number of tabs to restore concurrently. Instead we now allow you to either restore on demand, or use the hard-coded 3 tabs at a time value. The new preference is called &lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.restore_on_demand&lt;/code&gt;. If you had customized &lt;code class=&quot;language-text&quot;&gt;max_concurrent_tabs&lt;/code&gt; and set it to 0, then &lt;code class=&quot;language-text&quot;&gt;restore_on_demand&lt;/code&gt; will be migrated to true. Unlike the old preference, &lt;code class=&quot;language-text&quot;&gt;restore_on_demand&lt;/code&gt; is exposed in the Preferences/Options dialog to make it accessible to a larger audience.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3f3b25049aa800ab939c22d50035e1e5/0b533/restore_on_demand.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 90.85714285714286%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAADbUlEQVQ4y6WU32/bVBTHDQgknvrAEGnZn2HBCwKJf4TxVyDxBrxU2h760CckeKistFGi0iRNE7YmG2mTJl07LYl9bTd2Ev92HDtOyiSEat+Djpds6djbHj6+58pX33u+5xybAQBmL5O7WyxVvmw2G2y71WabjRbbaF+wzdY5e07O2f2DPFs6LLPPLi/YVqvFnp2dsaenp2yj0UjWZrP5RTab/RS1GHzk84Xfnnc60Ov2QBAEECUBJL4DosAD3+jC5dOncPnsAp53usDzAhBCQJZlkCQpAeNMJvNDIsgwzPsP7j/gCoUClEpHN6XSYVwuF+LDP3JxuZiPC+l8XCoW40LxIM7m9uODfD4uVyrxyclJXP+rHtfr9Zt6vQ6bm5s/LwXfOzo64hRVBU03ItcdU8t2EmzHpY7nUtt2qIM4DrVtm1qWRU3TXK6RZVmws7Pz0yvBx08ec+rVFUh8LxopfWqOhmAMVTAGKmiKAqPRCIbDIWialsS2bcNkMkHodDqNptMp7O3trQj+WeZG9WNo72eiXjlPe5U8CA+L0K0UQCpmwVQV0E0TzAWO44Dv+4lgEARREASwu7v7WrBWrXK6LIJ40Y4MiVBDImDKIhgygak2gPkshL9fvID5fJ5wfX0Ns9kMoWEYJhneEqxWa1w4n4MfTKNJENAgDMF2HOgrKiiDAfT7/cQmdhPBmg0GKqiqSmVJjvBdJpN5LXh8fMxhbVRFidBGGIaAt+IaLlbco7WF1WT1fZ/6vh9h/EaGVU5RVOh2OhEhhAo8n8wXzqQkisAv9nhmPB6/Eg7QzdtqiIKuOwaRkEiWZSrJVyDwAl6Q2JUlCQzdAM/zlkIJnufhGEW+/2ZTajVuOBzhFxCNhgM60k1AUcwO64NNWFpeyQ47Tvt9JcKLbo0NClqmCYqiRJZlUl3TksIbhpkILkWW4H5RYzqbzf5v+dGjh9yigzeGbsSG8RJd12PLsmLP827hum6sa1qsaTqeu8EM0+n0ymDXnqTHziTJCsGsEIzxMFpenUHMDr8aBJ3hPpfL/bIU/GDn991fL8/Iv5Ik+qIohqsQQkKe50NBEBKW8cr7gBDyz/b29o9LwY/u3Pnk68/vrn+f+iz1XSqVurfK+vr6W1k9s7GxcW9tbY3FPxfzzbdfJaIMw3z8jny4tbXF/AdfQx6zPOGw1wAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;restore on demand&quot;
        title=&quot;restore on demand&quot;
        src=&quot;/static/3f3b25049aa800ab939c22d50035e1e5/0b533/restore_on_demand.png&quot;
        srcset=&quot;/static/3f3b25049aa800ab939c22d50035e1e5/4edbd/restore_on_demand.png 175w,
/static/3f3b25049aa800ab939c22d50035e1e5/13ae7/restore_on_demand.png 350w,
/static/3f3b25049aa800ab939c22d50035e1e5/0b533/restore_on_demand.png 500w&quot;
        sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the details, check out &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=648683&quot;&gt;bug 648683&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[This is Bad Recruiting]]></title><description><![CDATA[An email came in yesterday with the subject Amazing Career Opportunity Unlimited Funds! looking like this: Hi Paul, This is [name] from…]]></description><link>https://zpao.com/posts/this-is-bad-recruiting/</link><guid isPermaLink="false">https://zpao.com/posts/this-is-bad-recruiting/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;An email came in yesterday with the subject &lt;em&gt;Amazing Career Opportunity Unlimited Funds!&lt;/em&gt; looking like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;This is &lt;em&gt;[name]&lt;/em&gt; from &lt;em&gt;[recruiting company]&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I’m recruiting for a super HOT online company opening a west coast office in San Francisco to build new products. We are looking for top engineers (Ruby Developers and JavaScript Engineers).&lt;/p&gt;
&lt;p&gt;This company is HOT and I want you to be a part of it… We have an unlimited budget! Offering you a guaranteed 20% pay raise (if not more), equity, and paid bonuses! Let’s just say this company is hotter than Google. We just hired the &lt;em&gt;[manager position]&lt;/em&gt; from Google for $300K. (Seriously no money cap) we are looking for the best and will pay to get the best.&lt;/p&gt;
&lt;p&gt;If you are interested and want to learn more let’s talk!&lt;/p&gt;
&lt;p&gt;What is a good time and number to give you a call?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What’s so bad here? To me, plenty. But if you see nothing wrong then I’ll refer you to this person and it’s all yours.&lt;/p&gt;
&lt;h2&gt;“super HOT online company … to build new products”&lt;/h2&gt;
&lt;p&gt;AWWWWW SHIT. You’re the same as nearly every tech company on the planet. Not only have you failed to differentiate this company from the rest of the world, you haven’t told me who the company is or what they might be making. In order to find out if it’s even remotely cool I have to email you (I know, that’s what they want you to do). For somebody who hasn’t entertained the thought of changing jobs, making me take the effort to contact you isn’t going to happen.&lt;/p&gt;
&lt;p&gt;I understand there are stealth companies out there making things. If you are one of these companies I hope that (a) you’re hiring people you know and trust and (b) you make it clear that you’re not ready to talk publicly about your product so I don’t call you a shitty recruiter.&lt;/p&gt;
&lt;h2&gt;“This company is HOT”&lt;/h2&gt;
&lt;p&gt;That’s the second time “HOT” was used in all caps to describe this company. I guess it’s better than saying “HAWT”. Seriously though, it just looks immature and desperate.&lt;/p&gt;
&lt;h2&gt;“Let’s just say this company is hotter than Google”&lt;/h2&gt;
&lt;p&gt;Bullshit.&lt;/p&gt;
&lt;h2&gt;OMG WE ARE LEAKING MONEY OUT OF OUR ASSHOLES AND MONEYMONEYMONEY&lt;/h2&gt;
&lt;p&gt;There are people out there who just want to make boatloads of cash and get out. Who wouldn’t mind boatloads of cash, especially in the bay area where shit is expensive. But you don’t actually want those people to work for your company. If they aren’t passionate about what they’re making, they’ll make a quick buck &amp;#x26; be gone fast, probably responding to another email like this. Hell, it might even be you recruiting them away.&lt;/p&gt;
&lt;p&gt;I know there’s a hiring frenzy in the SF area and in the tech industry as a whole. That’s all the more reason to be good at recruiting and not make me call out your shenanigans. There are recruiters out there who I’ve said more than “No” to because they make a proper attempt and are polite to me (&lt;a href=&quot;/posts/on-rude-recruiters&quot;&gt;I don’t like rude recruiters&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;That’s all I’ll say. That and I’m not looking for a new job.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[hg qedit]]></title><description><![CDATA[Mercurial queues are still far from my ideal workflow, but they mostly just work so I still use them. I haven’t gotten into qqueues because…]]></description><link>https://zpao.com/posts/hg-qedit/</link><guid isPermaLink="false">https://zpao.com/posts/hg-qedit/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Mercurial queues are still far from my ideal workflow, but they mostly &lt;em&gt;just work&lt;/em&gt; so I still use them. I haven’t gotten into qqueues because that seems like even more management I don’t need. If I had a 17 part patch then I would probably give those a go, but I don’t.&lt;/p&gt;
&lt;p&gt;Instead I end up reordering the patches in my queue more often that I want. I run &lt;code class=&quot;language-text&quot;&gt;vim .hg/patches/series&lt;/code&gt;, press a &lt;code class=&quot;language-text&quot;&gt;j&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;k&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;d&lt;/code&gt;, &amp;#x26; &lt;code class=&quot;language-text&quot;&gt;p&lt;/code&gt; a few times, then quit. But sometimes I forget that I’m not at &lt;code class=&quot;language-text&quot;&gt;hg root&lt;/code&gt; so that doesn’t work (usually tab completion is a good indicator but then I need to &lt;code class=&quot;language-text&quot;&gt;cd&lt;/code&gt; a bit). &lt;a href=&quot;https://github.com/zpao/dotfiles/commit/51cdfb838c672f80db5b005eca1fe9972c23dab6&quot;&gt;Enter &lt;code class=&quot;language-text&quot;&gt;hg qedit&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[alias]
qedit = !vim $(hg root)/.hg/patches/series&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Just add the above to your .hgrc and you now have a new command which will pop open vim so you can reorder your patches. And of course if you want this to use your editor of choice, you can change “vim” to “$EDITOR” to make that happen.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;A couple people have mentioned that there are easier ways to move things around in your queue without editing your series file…&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.gavinsharp.com/blog/&quot;&gt;Gavin&lt;/a&gt; told me about &lt;a href=&quot;http://mercurial.selenic.com/wiki/QupExtension&quot;&gt;qup&lt;/a&gt;, and &lt;a href=&quot;http://www.oxymoronical.com/&quot;&gt;Dave&lt;/a&gt; said that &lt;code class=&quot;language-text&quot;&gt;hg qpush --move &amp;lt;name&gt;&lt;/code&gt; achieves the same thing.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Building Firefox on OS X Lion]]></title><description><![CDATA[I know there are people here at Mozilla who have been building Firefox on Lion releases for a while now, but I couldn’t find anything that…]]></description><link>https://zpao.com/posts/building-firefox-on-os-x-lion/</link><guid isPermaLink="false">https://zpao.com/posts/building-firefox-on-os-x-lion/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I know there are people here at Mozilla who have been building Firefox on Lion releases for a while now, but I couldn’t find anything that described all the problems. So here I am.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Reinstall XCode &amp;#x26; apply a &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=547774&quot;&gt;couple&lt;/a&gt; &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=547889&quot;&gt;patches&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Mercurial&lt;/h2&gt;
&lt;p&gt;I had originally installed Mercurial via &lt;code class=&quot;language-text&quot;&gt;easy_install&lt;/code&gt;, so your results may be different. Regardless it was broken. Apparently you can edit the executable and it works, but I didn’t try. Attempting to install Mercurial again failed with &lt;code class=&quot;language-text&quot;&gt;Python headers are required to build Mercurial&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Reinstall XCode then reinstall Mercurial and you’re set.&lt;/p&gt;
&lt;h2&gt;&lt;code class=&quot;language-text&quot;&gt;make&lt;/code&gt; Not Found&lt;/h2&gt;
&lt;p&gt;Reinstalling XCode fixes that too.&lt;/p&gt;
&lt;h2&gt;Build Fails with &lt;code class=&quot;language-text&quot;&gt;expected initializer before ‘NS_NORETURN’&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Your build will probably fail. The patch in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=655339&quot;&gt;bug 655339&lt;/a&gt; works to get past this.&lt;/p&gt;
&lt;h2&gt;Build Fails with &lt;code class=&quot;language-text&quot;&gt;$MACOSX_DEPLOYMENT_TARGET mismatch&lt;/code&gt; error&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now &quot;10.6&quot; but &quot;10.7&quot; during configure&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I first thought this was a problem with specifying the wrong target SDK, but I was wrong. This is apparently a python bug. &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=659881&quot;&gt;Bug 659881&lt;/a&gt; has more details (and a workaround patch). The bug talks about python via MacPorts, but I’m not using MacPorts nor any non-default python installs.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Simple Tab Stats Script]]></title><description><![CDATA[My Firefox usage has always been a bit excessive. I used to open windows to group my different tasks. Then Panorama came along and I started…]]></description><link>https://zpao.com/posts/simple-tab-stats-script/</link><guid isPermaLink="false">https://zpao.com/posts/simple-tab-stats-script/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;My Firefox usage has always been a bit excessive. I used to open windows to group my different tasks. Then Panorama came along and I started using groups. Then I had too many groups so I started opening new windows. Luckily I set &lt;code class=&quot;language-text&quot;&gt;max_concurrent_tabs&lt;/code&gt; to 0 so I avoid loading all of those pages at startup (&lt;a href=&quot;/posts/cascaded-session-restore-a-hidden-bonus&quot;&gt;it’s that BarTab-like thing&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/0a698e93ee0f720d0193d948e11e9e4d/0b533/simple-tab-stats.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.857142857142854%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACwUlEQVQ4y6WOy1LTUByHo65d+QxWNz6AL6CvoCtHR1Tcqy8hC3ZaZaMj9mIppLn0FtS0SdskpDENFMtF1AoigtqW0OQ05+c0ZVDHnS6++f0v53znMKn07KnULHs2lZ47rapqZGVlNSJJUkQQhAjLspEnT55GpqamQnK5XCSbzR5loVCIFIvF05IkneE47qSmaQyTTKbu5/JFFKX5Tj6fd2OxmCvLslvTNLdUKrmiKLqiIIapKIqrqmqYlUol3Muy3JVlGbF4fLzb7TLM48ePHomiAEEQgunpaUxMTCARj4PnBbAsi5mZFDieB8dxSCYSyGQyYOfmwt1wxvMc5Xkek5OT9wAwTCbDPTTrFoy67TcWl2nDaVLTalDNqFO1olHLdqixYNHXskLLapWqVT3sDdOiNd0MKtUqqWk6Esnk3VCYls2oqL+FWGsSQWuiur4LZ4fA3u7jzecR1paL+qf9EGvThbV1MGLTpWa7R8x2D89z6kjIVptRwVjFTNkh2fo7KOvfoH86gPZxH8ZmP6TZAZZ+jFj8PsLZAxq7oM4eyLCOv1wYCXm9FS21viCtLJJ02UGmtoyi/QG5+gaKjY+QnDby1ntIjTZeNT+jYH9A1lyH3naHUmp/paTxlSI+b4yEorkWtbYJOK1FUiUb6bKNF68tJF/VkVYczCoNPC/oSMybYZ94aeJZtgp1o4PFb4fCXfwSCsbKQ3PLG77siwtrNG9tUMFYpbzeCmuu9paylSXKaS3K6yvhTFnbo/VtMpRReycg9k6AmKSPhHazFXUHQKdPSLdP0O0PfoOgc/AnPS/AwQDY92lY9/xg0PMDKLXDHy43lx7QYADf8zzie8Hf+Id4R+l7/cD3js74vtdHuVS6EwovXb58fvz27WvXx8aujN248U/cvDV+9cLFi+dCIcMwxxiGOc4wzIn/YHj/2FD4E2JC+HQ9vnb0AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;simple tab stats&quot;
        title=&quot;simple tab stats&quot;
        src=&quot;/static/0a698e93ee0f720d0193d948e11e9e4d/0b533/simple-tab-stats.png&quot;
        srcset=&quot;/static/0a698e93ee0f720d0193d948e11e9e4d/4edbd/simple-tab-stats.png 175w,
/static/0a698e93ee0f720d0193d948e11e9e4d/13ae7/simple-tab-stats.png 350w,
/static/0a698e93ee0f720d0193d948e11e9e4d/0b533/simple-tab-stats.png 500w&quot;
        sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My curiosity got the better of me so I wrote &lt;a href=&quot;https://gist.github.com/1020014&quot;&gt;a little script&lt;/a&gt; to tell me some facts about my usage. There are extensions that do some or all of this, but I didn’t actually want to install anything, I just wanted a quick snapshot of what was up. (That said I might turn it into an &lt;em&gt;about:something&lt;/em&gt; sort of extension.) You can see what it tells you - it’s not much but it told me what I wanted to know. My usage was higher earlier today, and I’m sure there are people who are much more abusive of Firefox, so no judging.&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist1020014&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-run-this-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;run-this.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;/* Run this in your error console */&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;wc&lt;/span&gt;&lt;span class=pl-c1&gt;=&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;tc&lt;/span&gt;&lt;span class=pl-c1&gt;=&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;tgc&lt;/span&gt;&lt;span class=pl-c1&gt;=&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;span class=pl-c1&gt;classes&lt;/span&gt;: &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;interfaces&lt;/span&gt;: &lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;utils&lt;/span&gt;: &lt;span class=pl-v&gt;Cu&lt;/span&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Components&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-v&gt;Cu&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;import&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;resource://gre/modules/Services.jsm&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-v&gt;Cu&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;import&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;resource://gre/modules/DownloadUtils.jsm&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;wm&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Services&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;wm&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;ss&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;@mozilla.org/browser/sessionstore;1&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getService&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsISessionStore&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;e&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;wm&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getEnumerator&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;navigator:browser&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;uc&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;while&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;e&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;hasMoreElements&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;win&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;e&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getNext&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;tabs&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;gBrowser&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;tabs&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;wc&lt;/span&gt;&lt;span class=pl-c1&gt;+=&lt;/span&gt;&lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;tc&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-s1&gt;tabs&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;length&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;gd&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;ss&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getWindowValue&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;tabview-group&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;tgc&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-s1&gt;gd&lt;/span&gt; ? &lt;span class=pl-v&gt;Object&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;keys&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-c1&gt;JSON&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;parse&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;gd&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;length&lt;/span&gt; : &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-v&gt;Array&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;forEach&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;tabs&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-k&gt;function&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;t&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;url&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;t&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;linkedBrowser&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;currentURI&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;spec&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-c1&gt;!&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;url&lt;/span&gt; &lt;span class=pl-k&gt;in&lt;/span&gt; &lt;span class=pl-s1&gt;uc&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L20&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;20&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC20&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;uc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s1&gt;url&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L21&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;21&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC21&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L22&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;22&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC22&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;uc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s1&gt;url&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-c1&gt;++&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L23&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;23&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC23&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L24&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;24&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC24&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L25&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;25&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC25&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;ssFile&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Services&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;dirsvc&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;get&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;ProfD&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsILocalFile&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L26&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;26&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC26&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s1&gt;ssFile&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;append&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;sessionstore.js&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L27&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;27&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC27&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;stream&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;@mozilla.org/network/file-input-stream;1&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;createInstance&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsIFileInputStream&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L28&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;28&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC28&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s1&gt;stream&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;init&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;ssFile&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;0x01&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L29&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;29&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC29&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;cvstream&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;@mozilla.org/intl/converter-input-stream;1&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;createInstance&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsIConverterInputStream&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L30&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;30&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC30&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;fs&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;stream&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;available&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L31&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;31&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC31&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;s&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Open windows: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;wc&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L32&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;32&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC32&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;        &lt;span class=pl-s&gt;&amp;quot;\nOpen tabs: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;tc&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L33&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;33&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC33&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;        &lt;span class=pl-s&gt;&amp;quot;\nTab Groups: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;tgc&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L34&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;34&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC34&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;        &lt;span class=pl-s&gt;&amp;quot;\nsessionstore.js file size: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-v&gt;DownloadUtils&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;convertByteUnits&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;fs&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;join&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L35&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;35&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC35&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;s2&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L36&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;36&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC36&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;for&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s1&gt;u&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;span class=pl-s1&gt;c&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt; &lt;span class=pl-k&gt;in&lt;/span&gt; &lt;span class=pl-v&gt;Iterator&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;uc&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L37&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;37&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC37&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;c&lt;/span&gt; &lt;span class=pl-c1&gt;&amp;gt;&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L38&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;38&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC38&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;s2&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;  &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;c&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; - &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;u&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L39&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;39&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC39&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L40&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;40&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC40&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L41&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;41&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC41&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;s2&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L42&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;42&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC42&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;s&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;\nDuplicated urls:\n&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;s2&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L43&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;43&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC43&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-run-this-js-L44&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;44&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-run-this-js-LC44&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s1&gt;s&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/1020014/raw/c32cce4ffe4ce4ce9f7400d4bb475f69c4bba243/run-this.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/1020014#file-run-this-js&quot;&gt;
          run-this.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Judging me on coding style? I would be. I started writing this in the error console, so I left out whitespace and used shitty variable names. Then it grew up and got all awkward.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[SpiderNode at NodeConf 2011]]></title><description><![CDATA[Two weeks ago, I traveled with Shawn and Rob to Portland for the inaugural NodeConf. To summarize: it was a great experience and a well run…]]></description><link>https://zpao.com/posts/spidernode-at-nodeconf-2011/</link><guid isPermaLink="false">https://zpao.com/posts/spidernode-at-nodeconf-2011/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Two weeks ago, I traveled with Shawn and Rob to Portland for the inaugural NodeConf. To summarize: it was a great experience and a well run conference. Other people have done overviews, so I’m not going to go there, but read a few &lt;a href=&quot;http://www.sauria.com/blog/2011/05/09/nodeconf-2011/&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://www.claassen.net/geek/blog/2011/05/reflections-on-jsconf-and-nodeconf-by-a-language-geek.html&quot;&gt;here&lt;/a&gt;, and &lt;a href=&quot;http://www.adamchristian.com/archives/10435&quot;&gt;here&lt;/a&gt;. I’m going to talk about SpiderNode at NodeConf instead.&lt;/p&gt;
&lt;h2&gt;A Quick Aside on the State of Things&lt;/h2&gt;
&lt;p&gt;We got SpiderNode running on the train ride shortly before getting on a plane to Portland. Under 24 hours before NodeConf. It didn’t pass all tests (still doesn’t) and we had to hack around Node’s Buffers pretty majorly. Ryan’s classic &lt;a href=&quot;https://github.com/ry/node_chat&quot;&gt;node_chat&lt;/a&gt; ran and that was a great state to be in going into NodeConf. As for other demos, those were written right before the presentation so they were a bit unpolished.&lt;/p&gt;
&lt;h2&gt;Back to NodeConf&lt;/h2&gt;
&lt;p&gt;As we’d suspected for a while, Brendan Eich was the “Mozilla Person Secret Talk” listed on the schedule. He talked a little bit about ES.next and SpiderNode, with a couple demos. In typical Brendan fashion, it was a lot of information to get in a short period of time. If you want to see the slides, &lt;a href=&quot;http://brendaneich.com/2011/05/mozillas-nodeconf-presentation/&quot;&gt;Brendan has them on his blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Overall, I think the reception we got was really positive. People seemed excited. Some viewed it as a way to run Node on architectures that V8 doesn’t support (before we left NodeConf I had an email from somebody telling me he had patches to get SpiderNode building on Solaris/Sparc). Others were just excited that this could open up the doors to making Node faster (more benchmarks to compete on). Other people were excited because they just really want block scoping (&lt;code class=&quot;language-text&quot;&gt;let&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Other people weren’t so excited. And that’s fair. But there seemed to be some misconceptions about the project and why we were at NodeConf contributing to what felt a bit like disdain.&lt;/p&gt;
&lt;h2&gt;Selling You&lt;/h2&gt;
&lt;p&gt;There were some people who seemed convinced that we were there to sell people on using SpiderNode. I think Brendan made this pretty clear during his talk, but here it is again: we’re not trying to sell you. We don’t think you should use it right now. We’re getting closer, but it might be a little while before we suggest people use it for anything besides experimenting. We don’t pass all of the Node tests and we’re almost certainly not faster at this point.&lt;/p&gt;
&lt;p&gt;I think &lt;a href=&quot;http://brendaneich.com/2011/05/mozillas-nodeconf-presentation/&quot;&gt;Brendan put it best&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We are not out to make a maintained, competing fork of Node, just a friendly downstream that should go away as soon as possible. We aren’t selling anything to Node users.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Splitting the Community&lt;/h2&gt;
&lt;p&gt;The Node community is pretty awesome and we really don’t want to split it in anyway. I’m sorry that some of you felt that’s what we were doing. If that was you, I’d love to find out what you meant.&lt;/p&gt;
&lt;p&gt;The only angle I can see on this one is that the JavaScript one would write using SpiderMonkey’s JS extensions wouldn’t run on normal (V8) Node. This goes back to the experiment thing. If you’re writing Node modules or code you want to share widely using the JS extensions STOP.&lt;/p&gt;
&lt;h2&gt;Contributing Back&lt;/h2&gt;
&lt;p&gt;I didn’t see any comments about this topic, but I wanted to make it clear that we’re most certainly going to be contributing back to Node. We created &lt;a href=&quot;https://github.com/sdwilsh/spidernode-upstreaming&quot;&gt;a repository&lt;/a&gt; to start that process now. We’re waiting for somebody to handle &lt;a href=&quot;https://github.com/joyent/node/pull/1021&quot;&gt;this pull request&lt;/a&gt;, which should make some uses of Buffer faster.&lt;/p&gt;
&lt;p&gt;There will surely be other things that can be upstreamed outside of our use of V8Monkey (and the build system changes required to support that).&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I hope this clears some things up for people. Let me know if it doesn’t or you have other concerns about SpiderNode’s existence.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[About That Hybrid “V8Monkey” Engine]]></title><description><![CDATA[I’ve sort of been working on this thing… Several weeks ago I was curious about why there was no implementation of Node.js using the…]]></description><link>https://zpao.com/posts/about-that-hybrid-v8monkey-engine/</link><guid isPermaLink="false">https://zpao.com/posts/about-that-hybrid-v8monkey-engine/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’ve sort of been working on this thing…&lt;/p&gt;
&lt;p&gt;Several weeks ago I was curious about why there was no implementation of &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt; using the &lt;a href=&quot;https://developer.mozilla.org/En/SpiderMonkey&quot;&gt;SpiderMonkey&lt;/a&gt; JavaScript engine (the one we use in Firefox). So &lt;a href=&quot;https://twitter.com/#!/zpao/status/42780850177327105&quot;&gt;I tweeted&lt;/a&gt; about it and several people said they wanted such a thing and would help work on it.&lt;/p&gt;
&lt;p&gt;After some poking around the source, we realized that Node was tied pretty closely to &lt;a href=&quot;http://code.google.com/apis/v8/&quot;&gt;V8&lt;/a&gt;, and there really wouldn’t be any way to use SpiderMonkey without ripping Node apart and rebuilding it. Not only would that suck now, but it would likely suck long into the future as Node gets updated. This port would fall behind and nobody wants that.&lt;/p&gt;
&lt;h2&gt;V8Monkey&lt;/h2&gt;
&lt;p&gt;So we decided that we would implement the V8 API on top of SpiderMonkey. That way we can just plug our work into Node, and it would “just work”. We’ve been chugging along on this project and have made some great progress. Thanks to John Ford we even have an automated build system running all of our tests on every checkin.&lt;/p&gt;
&lt;p&gt;The JS team at Mozilla is also really interested in just having this API around. It has potential for other projects like this, but also raises awareness of API differences and might help push forward changes to the SpiderMonkey API. We’ve already pushed for additions to the SpiderMonkey API (for example, there was previously no exposed API to check &lt;code class=&quot;language-text&quot;&gt;==&lt;/code&gt;, only &lt;code class=&quot;language-text&quot;&gt;===&lt;/code&gt;). There have also been discussions about turning the SpiderMonkey API into a C++ API (not just C).&lt;/p&gt;
&lt;p&gt;It also turns out that we’re not the first people to go down this track. There’s a team at Yahoo! who is very interested in Node and even did a very similar project. They even put the &lt;a href=&quot;https://github.com/bfrancojr/v8monkey/commit/95464c1ccc07e2ab10ba637de3938b5dcd924403&quot;&gt;code out there to prove it&lt;/a&gt; and it’s been a helpful reference for us. They stopped short to get Node mostly running, while our goal is a bit more ambitious and implement the whole V8 API.&lt;/p&gt;
&lt;h2&gt;SpiderNode&lt;/h2&gt;
&lt;p&gt;SpiderNode is what we’re calling our fork of Node. Once we have our V8 binding working, we’ll shift our work over here and focus on integrating SpiderMonkey into the Node build system. Ideally we’d love to get this upstreamed and give Node developers a choice.&lt;/p&gt;
&lt;p&gt;We think V8 is great and the fact that Node has become so widely used is a testament to that. But we also think there’s room for competition here. Browser based competition is old-hat. Let’s move this battle to the servers :)&lt;/p&gt;
&lt;p&gt;With some hackery from John, we now have a way to build SpiderNode. As of Tuesday &lt;code class=&quot;language-text&quot;&gt;node.cc&lt;/code&gt; compiles (OMG AWESOME) but that’s it.&lt;/p&gt;
&lt;h2&gt;Can You Help?&lt;/h2&gt;
&lt;p&gt;Absolutely. The code for both &lt;a href=&quot;https://github.com/zpao/v8monkey&quot;&gt;v8monkey&lt;/a&gt; and &lt;a href=&quot;https://github.com/zpao/spidernode&quot;&gt;SpiderNode&lt;/a&gt; are on GitHub for now. We have a &lt;a href=&quot;https://github.com/zpao/v8monkey/wiki/Hacking&quot;&gt;“hacking” wiki page&lt;/a&gt; there, as well as a general &lt;a href=&quot;https://github.com/zpao/v8monkey/wiki/TODO&quot;&gt;TODO page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We also chat a lot on IRC: &lt;a href=&quot;irc://irc.mozilla.org/spidernode&quot;&gt;#spidernode on irc.mozilla.org&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;It’s Not Just Me&lt;/h2&gt;
&lt;p&gt;That’s for damn sure. &lt;a href=&quot;https://twitter.com/robarnold&quot;&gt;Rob Arnold&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/sdwilsh&quot;&gt;Shawn Wilsher&lt;/a&gt; have been doing most of the heavy lifting. Rob has done some work on SpiderMonkey in a past life and is really good at this sort of language stuff. Shawn is also really smart and definitely no stranger to using SpiderMonkey. This project would be nowhere without these guys. &lt;a href=&quot;https://twitter.com/john_h_ford&quot;&gt;John Ford&lt;/a&gt; set up a buildbot for us, which has been incredibly helpful for catching all the tests I break. Having a build engineer helping out has been really great.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/BrendanEich&quot;&gt;Brendan Eich&lt;/a&gt; (you may have heard of him) said he’s going to start contributing. My intern &lt;a href=&quot;http://twitter.com/mehdiisdumb&quot;&gt;Mehdi Mulani&lt;/a&gt; submitted a couple patches early on and others have stepped up and are working on patches right now.&lt;/p&gt;
&lt;h2&gt;My Experience So Far&lt;/h2&gt;
&lt;p&gt;Honestly, this is the first large scale C/C++ project I’ve worked on. I took 1/2 a semester of C my freshman year in college (over 6 years ago) and I’ve written some random pieces of C++ at Mozilla. Mostly though, I write JavaScript and before that Ruby &amp;#x26; PHP - a lot of scripting languages. It’s a drastic change from what I’m used to and it’s taken me a while to get comfortable. Luckily I’m working with friends who have helped teach me as I go. Learning C++ while making one JavaScript engine work on top of another has been a real sink or swim experience.&lt;/p&gt;
&lt;p&gt;It’s been fun though. I really needed something entirely different from Firefox for a little while and this has fit the bill perfectly.&lt;/p&gt;
&lt;p&gt;Expect to see more from me and others in the coming days &amp;#x26; weeks. And hey, perhaps you’ll see one of us at NodeConf.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[reCAPTCHA and Gibberish]]></title><description><![CDATA[It appears the reCAPTCHA has officially gone through all of the English words and has moved on to Gibberish. For the record “sdngl witatimo…]]></description><link>https://zpao.com/posts/recaptcha-and-gibberish/</link><guid isPermaLink="false">https://zpao.com/posts/recaptcha-and-gibberish/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 300px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e776b679f7ae154d1c7d384b86a73cdc/f93b5/recaptcha-gibberish.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 18.857142857142858%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAEABQDASIAAhEBAxEB/8QAFwABAAMAAAAAAAAAAAAAAAAAAAEDBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAdmAtB//xAAYEAADAQEAAAAAAAAAAAAAAAAAARESE//aAAgBAQABBQLEfMSh/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAGhAAAgIDAAAAAAAAAAAAAAAAAAECkRIxMv/aAAgBAQAGPwJPKVnc7Ns//8QAGRAAAwEBAQAAAAAAAAAAAAAAAAERITFx/9oACAEBAAE/IVOP3jG23CiaW9P/2gAMAwEAAgADAAAAEHAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGxABAAMAAwEAAAAAAAAAAAAAAQARITFxseH/2gAIAQEAAT8QzANWB7I1C4tD5jOtfLF8n//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;recaptcha gibberish&quot;
        title=&quot;recaptcha gibberish&quot;
        src=&quot;/static/e776b679f7ae154d1c7d384b86a73cdc/f93b5/recaptcha-gibberish.jpg&quot;
        srcset=&quot;/static/e776b679f7ae154d1c7d384b86a73cdc/e52aa/recaptcha-gibberish.jpg 175w,
/static/e776b679f7ae154d1c7d384b86a73cdc/f93b5/recaptcha-gibberish.jpg 300w&quot;
        sizes=&quot;(max-width: 300px) 100vw, 300px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It appears the reCAPTCHA has officially gone through all of the English words and has moved on to Gibberish. For the record “sdngl witatimo” did work to prove I’m human.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[ShoeVox: Voice Control for Your PC Multimedia]]></title><description><![CDATA[Rob and Max are both really smart guys who work really well together (once upon a time, the 3 of us were working on a startup), so I’m…]]></description><link>https://zpao.com/posts/shoevox-voice-control-for-your-pc-multimedia/</link><guid isPermaLink="false">https://zpao.com/posts/shoevox-voice-control-for-your-pc-multimedia/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;a href=&quot;http://rsbaskin.com&quot;&gt;Rob&lt;/a&gt; and &lt;a href=&quot;http://www.maxcutler.com/&quot;&gt;Max&lt;/a&gt; are both really smart guys who work really well together (once upon a time, the 3 of us &lt;a href=&quot;/posts/the-rise-fall-of-courant-news&quot;&gt;were working on a startup&lt;/a&gt;), so I’m excited to see that they’ve made something cool. I don’t fit the target audience with my OS X loving ways, but I hope others can make use of it.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Multiple Assignment in JS With Objects]]></title><description><![CDATA[Note: Turns out this only works in Firefox since it is the only browser to include versions of JavaScript beyond 1.5. Perhaps something will…]]></description><link>https://zpao.com/posts/multiple-assignment-in-js-with-objects/</link><guid isPermaLink="false">https://zpao.com/posts/multiple-assignment-in-js-with-objects/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Note: Turns out this only works in Firefox since it is the only browser to include versions of JavaScript beyond 1.5. Perhaps something will show up in ECMAScript N/Harmony/whatever.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Alright, JavaScript is pretty cool. There are plenty of “tricks” that still boggle my mind. I just found another cool trick in &lt;a href=&quot;https://github.com/Mardak/restartless/blob/examples%2Fl10nDialogs/bootstrap.js#L37&quot;&gt;Mardak code&lt;/a&gt; (he would do this…).&lt;/p&gt;
&lt;p&gt;This is about multiple assignment in JS. Well, it’s actually about destructuring assignment, but potato, potato.&lt;/p&gt;
&lt;p&gt;Hopefully by now we all know that it can be done with arrays.&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist844787&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-assignment_array-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;assignment_array.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_array-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_array-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;arr&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;yea, yea&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;we knew this worked&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_array-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_array-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s1&gt;a&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;b&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;arr&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_array-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_array-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// a == &amp;quot;yea, yea&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_array-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_array-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// b == &amp;quot;we knew this worked&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787/raw/0dab50c664eec0aba5d9b32b56a9a84d66cb3a27/assignment_array.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787#file-assignment_array-js&quot;&gt;
          assignment_array.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;What I didn’t know is that it can also be done using objects.&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist844787&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-assignment_object-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;assignment_object.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;obj&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;foo&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;WTF&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;bar&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;this works?&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;baz&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;looks like it&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-c1&gt;foo&lt;/span&gt;: &lt;span class=pl-s1&gt;c&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;bar&lt;/span&gt;: &lt;span class=pl-s1&gt;d&lt;/span&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;obj&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// c == &amp;quot;WTF&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// d == &amp;quot;this works?&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787/raw/0dab50c664eec0aba5d9b32b56a9a84d66cb3a27/assignment_object.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787#file-assignment_object-js&quot;&gt;
          assignment_object.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This mostly makes sense now that I know it works, I was just a bit surprised. The syntax is strange, but it’s oddly satisfying (and follows from the assignment from an array).&lt;/p&gt;
&lt;p&gt;Turns out this works for nested objects too…&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist844787&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-assignment_object_nested-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;assignment_object_nested.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;obj2&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;foo&lt;/span&gt;: &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-c1&gt;dude&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;WTF&amp;quot;&lt;/span&gt; &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;bar&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;this works too?&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;baz&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;looks like it&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-c1&gt;foo&lt;/span&gt;: &lt;span class=pl-s1&gt;e&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-c1&gt;bar&lt;/span&gt;: &lt;span class=pl-s1&gt;f&lt;/span&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;obj2&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// e == { dude: &amp;quot;WTF&amp;quot; }&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// d == &amp;quot;this works too?&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787/raw/0dab50c664eec0aba5d9b32b56a9a84d66cb3a27/assignment_object_nested.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787#file-assignment_object_nested-js&quot;&gt;
          assignment_object_nested.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Just keep in mind the same rules for object references applies. If I change &lt;code class=&quot;language-text&quot;&gt;obj2.foo.dude&lt;/code&gt;, that changes &lt;code class=&quot;language-text&quot;&gt;e.dude&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And last but not least, we can also access values directly with nested objects.&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist844787&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-assignment_object_nested2-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;assignment_object_nested2.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// using the unchanged obj2 from above...&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-c1&gt;foo&lt;/span&gt;: &lt;span class=pl-kos&gt;{&lt;/span&gt; &lt;span class=pl-c1&gt;dude&lt;/span&gt;: &lt;span class=pl-s1&gt;g&lt;/span&gt; &lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;obj2&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-assignment_object_nested2-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// g == &amp;quot;WTF&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787/raw/0dab50c664eec0aba5d9b32b56a9a84d66cb3a27/assignment_object_nested2.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/844787#file-assignment_object_nested2-js&quot;&gt;
          assignment_object_nested2.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Modifying &lt;code class=&quot;language-text&quot;&gt;obj2.foo.dude&lt;/code&gt; here will have no effect on &lt;code class=&quot;language-text&quot;&gt;g&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Add this to the list of cool things that have been implemented in JS &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.6&quot;&gt;1.6&lt;/a&gt;, &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7&quot;&gt;1.7&lt;/a&gt;, and &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8&quot;&gt;1.8&lt;/a&gt;, but yet still aren’t available in all browsers (sigh). Generators, Iterators, array comprehensions, block scoping with &lt;code class=&quot;language-text&quot;&gt;let&lt;/code&gt;… all cool things that are used regularly within the Firefox codebase.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[2 Years at Mozilla]]></title><description><![CDATA[On February 23rd, 2009 I started full-time at Mozilla. So much has happened since then, yet it still feels like it was just a couple months…]]></description><link>https://zpao.com/posts/2-years-at-mozilla/</link><guid isPermaLink="false">https://zpao.com/posts/2-years-at-mozilla/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;On February 23rd, 2009 I started full-time at Mozilla. So much has happened since then, yet it still feels like it was just a couple months ago.&lt;/p&gt;
&lt;p&gt;In addition to my time as an intern, I feel like I’ve seen a lot at Mozilla. With Firefox 4 I’ll be seeing my 4th release; 3.0 came out very shortly into my internship, followed by 3.5 soon after I started. 3.6 was my first version where I was around for the whole release, and 4 is so close I can taste it. I’ve had 4 bosses (Connor, Beltzner, Dietrich, and Dolske). We’re now on our 2nd CEO; I’ve seen 1 VP Engineering leave. I’ve met awesome people, and attended 2 summits.&lt;/p&gt;
&lt;p&gt;I’ve worked on the password manager, satchel, session restore, the Jetpack prototype, the Add-on SDK, per tab network prioritization, and a whole bunch of random front-end stuff. I ported the Sync extension into Firefox and helped make Firefox work on Windows CE. I’ve even written docshell &amp;#x26; widget code (even if it didn’t all get checked in)! The fact that I’ve gotten to work on such varying parts of Firefox is one of my favorite things about my job.&lt;/p&gt;
&lt;p&gt;A lot has happened in my personal life as well. I lived by myself for the first time while Amanda was back at school (actually by myself, not counting dorm life or sharing a house). I’ve cleaned up more cat puke than I ever thought I would. I’ve made new friends and grown apart from older friends. &lt;em&gt;I got engaged!&lt;/em&gt; I helped my fiancée start a company.&lt;/p&gt;
&lt;p&gt;I guess it’s actually been a pretty long 2 years.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Updated Firefox Extension: Always Ask 2.0pre]]></title><description><![CDATA[Around the endgame for Firefox 3.6, I wrote an extension called Always Ask to make sure I always got a prompt when quitting. I used it for a…]]></description><link>https://zpao.com/posts/updated-firefox-extension-always-ask-2.0pre/</link><guid isPermaLink="false">https://zpao.com/posts/updated-firefox-extension-always-ask-2.0pre/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/4fc6e840871de4564e7d006e1353cc9d/0b533/always-ask-2.0pre.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 77.14285714285715%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAACBklEQVQoz42S324SQRTG99V8GB+C+A4mJlwpGqiCRMSKF00VG4GY2KSYQEyBsgtl2QVkF7b7f2Z2zswxC6QttY3+cq4m3zffOSdHyb3KHx9//nh4+KlWq5+cHFXfvzt4WSy9KRQKudyLfL6QP3hdqVSKxWKpVCqXy283VKvVTCaj1OtfB0P113nv8nLsOGtDN6pfFqft/umP7+32T200VjVtPB5pmjaZTEzT1HW93+93Op1sNquYpoGIMgUR8coLn1ecC21lWwvXWXkraz6f67oxHk8IIVslACBis9lUptMpIgohtm7f967WC9teWkur2R5UvrUvhuroctIbqFEUbZWcc0RsNBqKYeyScYOQkjFOKUPEJ88+PHr8lBAqhACAa81N8m1zkgBjTGyQKElMQs9HlABpmuu6lNIHzZSwwPOAcy5gk7artFXGZqYRBMGeeTpNzQkIxiUFGQPGDIRPPM/zfTcIPN/3wjCKE8EkMpCMS8b3zXECARMuASsWjuOGZ2ez2e9+z+idm+pwtl6v1xG3Q+4SCBMRsc3CrtvmQnKQDCThMqI8oHHEeBBDEPOQQESTiAHlqSBV8r9mFogg01+YQMolSQThu6JcJKktFciHFrZF3le3uf9I/pObIzFN807yP9kmt1otpdvtuq5rWZa9j2XZqrocje6+27a9XC7jOK7Van8AbLs8tka2FNsAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;always ask 2 0pre&quot;
        title=&quot;The dialog that Always Ask shows when it has determined Firefox will quit without prompting&quot;
        src=&quot;/static/4fc6e840871de4564e7d006e1353cc9d/0b533/always-ask-2.0pre.png&quot;
        srcset=&quot;/static/4fc6e840871de4564e7d006e1353cc9d/4edbd/always-ask-2.0pre.png 175w,
/static/4fc6e840871de4564e7d006e1353cc9d/13ae7/always-ask-2.0pre.png 350w,
/static/4fc6e840871de4564e7d006e1353cc9d/0b533/always-ask-2.0pre.png 500w&quot;
        sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Around the endgame for Firefox 3.6, &lt;a href=&quot;/posts/just-released-always-ask&quot;&gt;I wrote an extension called Always Ask&lt;/a&gt; to make sure I always got a prompt when quitting. I used it for a while and then forgot about it when it was no longer compatible as Firefox 3.7 (now 4) moved forward.&lt;/p&gt;
&lt;p&gt;Now that we’re at the endgame for Firefox 4, and especially with all the changes surrounding the quit dialog, I figured it should be updated. So I’m releasing v2.0pre today which updates the extension to work with component registration changes and &lt;a href=&quot;/posts/just-quit-it&quot;&gt;quit dialog&lt;/a&gt; &lt;a href=&quot;/posts/about-that-quit-dialog&quot;&gt;changes&lt;/a&gt; in Firefox 4. This also includes the translations that were submitted via Babelzilla (most of them over a year ago). Thanks to all of you who took the time to translate those strings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/always-ask/&quot;&gt;Get it now&lt;/a&gt;&lt;/strong&gt;. Or &lt;a href=&quot;https://github.com/zpao/alwaysAsk&quot;&gt;look at the code&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Why 2.0 “pre”?&lt;/h2&gt;
&lt;p&gt;Mostly just in case there are any further changes needed to be compatible with Firefox 4 (there better not be though).&lt;/p&gt;
&lt;h2&gt;Why not restartless?&lt;/h2&gt;
&lt;p&gt;This would probably work really well as a restartless extension. But I was really lazy and didn’t feel like figuring out the l10n part of that (though it looks like &lt;a href=&quot;http://erikvold.com/blog/index.cfm/2011/2/18/restartless-firefox-addons-part-4-localization-l10n&quot;&gt;Erik Vold has that figured out already&lt;/a&gt;).&lt;/p&gt;</content:encoded></item><item><title><![CDATA[New Firefox Extension: switch-to-tab Blacklist]]></title><description><![CDATA[Switch To Tab is a pretty cool feature that will be a part of Firefox 4. I didn’t work much on it, but I contributed a bit to it last year…]]></description><link>https://zpao.com/posts/new-firefox-extension-switch-to-tab-blacklist/</link><guid isPermaLink="false">https://zpao.com/posts/new-firefox-extension-switch-to-tab-blacklist/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Switch To Tab is a pretty cool feature that will be a part of Firefox 4. I didn’t work much on it, but I contributed a bit to it last year (see &lt;a href=&quot;/posts/switch-to-tab-closing-empty-tabs&quot;&gt;this post&lt;/a&gt; for one example).&lt;/p&gt;
&lt;p&gt;For the most part, I really like this new feature. It’s saved me much tab duplication over the past several month. However there are some sites that it doesn’t play well with, namely some JavaScript “applications” and pages with frames. I’ve quietly dealt with it and worked around the issues.&lt;/p&gt;
&lt;p&gt;But a couple weeks ago after trying to do multiple Google Maps search, I decided that I’d had enough. I never wanted Google Maps to show up in switch to tab and I was going to write an add-on to make that possible. So I spent a bit of time figuring out how I might do that and looking at this new bootstrapped extension stuff (which is pretty awesome by the way). I didn’t get far enough to make it actually work and stalled. Then I got back to work and fixed some more blockers and promptly forgot about this idea.&lt;/p&gt;
&lt;p&gt;Yesterday I started working on it again but my current approach wasn’t working (turns out &lt;code class=&quot;language-text&quot;&gt;gBrowser._placesAutocomplete&lt;/code&gt; is readonly and it means it). So I asked &lt;a href=&quot;http://shawnwilsher.com/&quot;&gt;Shawn&lt;/a&gt; about it and he came up with the answer: cheat. Don’t try to intercept the additions to the database, just revert them after the fact. Smart guy.&lt;/p&gt;
&lt;p&gt;I wrote a quick and dirty version and iterated. I released a “good enough” version 1.0 last night. “Good enough” meant it was restartless but required restarting to re-process the blacklist preference, which was… dumb. Over lunch today I finished v1.1 to fix that and a couple other small issues.&lt;/p&gt;
&lt;h2&gt;Let me have it&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://addons.mozilla.org/firefox/addon/switch-to-tab-blacklist/&quot;&gt;switch-to-tab Blacklist on AMO&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Can I see the code?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/zpao/switchToTabBlacklist&quot;&gt;It’s on github&lt;/a&gt;. I need to clean it up because it’s a bit hard to look at, so don’t judge me too much.&lt;/p&gt;
&lt;h2&gt;This picture is not worth 1000 words&lt;/h2&gt;
&lt;p&gt;Previously, that autocomplete result would have been said “Switch to tab:“.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ef0ae1bfad4b32b2696ecf4eb982af7e/0b533/switch-to-tab-blacklist.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 21.714285714285715%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAIAAAABPYjBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA3ElEQVQI12Po6OhZtGjpwkVLVyxfuRwVrVy5es2adVjRqlVrFixYxDB52qR1G1evXLFy5apV69auXrd2zerVK9esWbV508YTx4/dvXv7zp1bN25cO3b0yJmzp+/cuXXnzq3bt2/u37d3+7atDHPmzDt67OiWHbu27Tq2evuJ/WfuHzwHQofO3T9+6dGJy49B6NLjk1dAjCMXoejQ+QcHzz1gOHz46P//f05dvu/fsCd14t3sqXeSJ9xO6Lsd3X0routmSNsNr4Zrwa034npvxfTctC67YlMORbblVwCIAae+zJSthAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;switch to tab blacklist&quot;
        title=&quot;switch to tab blacklist&quot;
        src=&quot;/static/ef0ae1bfad4b32b2696ecf4eb982af7e/0b533/switch-to-tab-blacklist.png&quot;
        srcset=&quot;/static/ef0ae1bfad4b32b2696ecf4eb982af7e/4edbd/switch-to-tab-blacklist.png 175w,
/static/ef0ae1bfad4b32b2696ecf4eb982af7e/13ae7/switch-to-tab-blacklist.png 350w,
/static/ef0ae1bfad4b32b2696ecf4eb982af7e/0b533/switch-to-tab-blacklist.png 500w&quot;
        sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Customizing the blacklist&lt;/h2&gt;
&lt;p&gt;I’m storing a JSON array of regular expressions (stored as strings which get turned into regular expressions with &lt;code class=&quot;language-text&quot;&gt;new RegExp(...)&lt;/code&gt;). This is stored in a preference: &lt;code class=&quot;language-text&quot;&gt;extension.switchToTabBlacklist.blacklist&lt;/code&gt;. You need to edit it by hand for now.&lt;/p&gt;
&lt;h2&gt;Where’s my GUI&lt;/h2&gt;
&lt;p&gt;I don’t have visual basic on this computer so I couldn’t make one.&lt;/p&gt;
&lt;p&gt;To be honest, I just didn’t care enough to make it. I made this extension for me and I know how to edit a preference. I would gladly take patches though if somebody wants to make one.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[About That Quit Dialog...]]></title><description><![CDATA[Remember when we turned it off a couple weeks ago? We did that by just flipping the  preference to . I mentioned that you could get old…]]></description><link>https://zpao.com/posts/about-that-quit-dialog/</link><guid isPermaLink="false">https://zpao.com/posts/about-that-quit-dialog/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Remember when we &lt;a href=&quot;/posts/just-quit-it&quot;&gt;turned it off a couple weeks ago&lt;/a&gt;? We did that by just flipping the &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit&lt;/code&gt; preference to &lt;code class=&quot;language-text&quot;&gt;false&lt;/code&gt;. I mentioned that you could get old behavior back by flipping that preference back to &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt;. That’s not going to work anymore.&lt;/p&gt;
&lt;p&gt;I just landed &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=629485&quot;&gt;bug 629485&lt;/a&gt; to change things again, so pay attention. When we turned off the quit dialog, we took away any way of stopping the last window from closing without any warning, even if you explicitly set the visible pref &lt;code class=&quot;language-text&quot;&gt;browser.tabs.warnOnClose&lt;/code&gt; which would show the window closing warning (when you have multiple tabs). That wasn’t so cool. So we played around with the logic and made that possible. But in order to do so, we had to change the default value of &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit&lt;/code&gt; to &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt; and create a new preference which controls the quit dialog (&lt;code class=&quot;language-text&quot;&gt;browser.showQuitDialog&lt;/code&gt;). I know this sounds a bit inane, but there really wasn’t a better way to do it and maintain &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit == false&lt;/code&gt; as an override.&lt;/p&gt;
&lt;p&gt;It’s all a bit confusing, so I’ve &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/file/84921e24be9c/browser/components/nsBrowserGlue.js#l443&quot;&gt;documented the conditions&lt;/a&gt; under which we won’t show a dialog, as well as the rules for choosing which dialog to show. Some of that comment is perfectly clear; the rest requires a little bit of understanding of the code (but it shouldn’t be too hard to figure out if you want).&lt;/p&gt;
&lt;p&gt;Don’t expect me to write another post like this. I don’t expect any further changes to how this stuff works.&lt;/p&gt;
&lt;h2&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;We enabled the window closing dialog when closing the last window would otherwise just quit (mostly important to Windows and Linux users).&lt;/li&gt;
&lt;li&gt;If you want the quit dialog back, set &lt;code class=&quot;language-text&quot;&gt;browser.showQuitWarning&lt;/code&gt; to &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt; and make sure &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit&lt;/code&gt; is also &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Update: Feb. 8, 2011:&lt;/strong&gt; Yup. I fucked that up a little bit. We aren’t showing the quit dialog if you close the last window, even with the prefs mentioned above. That should be fixed in the next nightly.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The New Firefox Default Home Page is Seriously Sexy]]></title><description><![CDATA[The new Firefox default home page is seriously sexy. Seriously. A couple weeks ago Stephen Horlander designed an updated default home page…]]></description><link>https://zpao.com/posts/the-new-firefox-default-home-page-is-seriously-sexy/</link><guid isPermaLink="false">https://zpao.com/posts/the-new-firefox-default-home-page-is-seriously-sexy/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9d065d3f800cff99184a4f83f9ee740a/77672/new-firefox-default-home-page.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 79.42857142857143%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAAAsTAAALEwEAmpwYAAACjklEQVQ4y51TTWsTURTNn3AniGv/RdGtleJeiiubMoH6G/wJBVd1UZWIhFL6FZM2k8Z8SSlEsrBdlESwsZOZdJr3ZjIz7+vIm4nRtgmIBw5z33v3nHfvzJ1U9mPuQaF48LJcNo39/QOjVCoZe3t7xtbWlrG7u2tsbGwYb9bWjLfr68bm5mZ8VigUjXw+b+zs7Bjb29tGsVg0TNNcyWaz91Lr796vlCtVVD5X0Ww2cXJyiuPjY9RqNTQaDdTrdZQPD3FYqcRxtVrFp0IeplmK11qTz+eRy+Wwurr6NHV0dLRkWRZsZxC6rsuGwyGjlDLP8+KnpmQhAwviPUIIGwwc5l65kzzHcaJerwfTNOdT3W43jQQCgMItcLS+fUX9B8UMaI3UQbvdfpI6OztbllJCKSVUgiRLKXAR5+HZqw+4//w1fD+I11KqiddYI4UQaLVaieHYRCQ+Cpxz6Es0Nbrfe2h+aSdmSkFIAcY4ONdxLJY6d6qhFArkiiAIfOhbGed/muc83vM8CuvCgm1LjEZTDHULUkHo24RU4BJgQmHk+6CUghACMiSgxEcwCsGEBNcCpXVxU9cN9bsKhRJeJNVVIGB7HBZl6F8OYQ9c/HRc9GwX55YP63IEy2NwfA6dqzWRUFJ73KhQCSaVCnVlTMbUokaH4Nz10R+O4NAAJBTwmUTAJSKhu1FKqhnvUJevW9btMqngRQKnFxSX2sgPQUYhQq5+G2kBxmMx66MkgV4nvD5s6trZZHRuGabHc8jVFEj1TxBjw/lUp9NZ/quI/4Wa/CntdvuFHgtKaUApjW7S82jU75PItkkcT8uhlIbao1arPU4tLi7ezWQyjzKZzNwsppcyc+n07PMxHy4sLNz5BeSzayIkqquaAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;new firefox default home page&quot;
        title=&quot;new firefox default home page&quot;
        src=&quot;/static/9d065d3f800cff99184a4f83f9ee740a/8c557/new-firefox-default-home-page.png&quot;
        srcset=&quot;/static/9d065d3f800cff99184a4f83f9ee740a/4edbd/new-firefox-default-home-page.png 175w,
/static/9d065d3f800cff99184a4f83f9ee740a/13ae7/new-firefox-default-home-page.png 350w,
/static/9d065d3f800cff99184a4f83f9ee740a/8c557/new-firefox-default-home-page.png 700w,
/static/9d065d3f800cff99184a4f83f9ee740a/e996b/new-firefox-default-home-page.png 1050w,
/static/9d065d3f800cff99184a4f83f9ee740a/77672/new-firefox-default-home-page.png 1060w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The new Firefox default home page is seriously sexy. &lt;strong&gt;Seriously.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A couple weeks ago &lt;a href=&quot;http://www.stephenhorlander.com/&quot;&gt;Stephen Horlander&lt;/a&gt; designed an updated default home page for Firefox. Over the weekend, we landed most of it. So first off, a huge thanks to him.&lt;/p&gt;
&lt;p&gt;Mihai Sucan did an awesome job converting the HTML &amp;#x26; CSS Steven prototyped into something we could check in, which involved a lot of fun with media queries  (seriously, resize your window with it open), as well as a lot of work to make sure it worked with RTL locales.&lt;/p&gt;
&lt;p&gt;And then finally, I hooked up the “Restore Previous Session” button. Not the HTML &amp;#x26; CSS (that was Stephen &amp;#x26; Mihai), just the parts that made it hide when appropriate and work when pressed. Now hopefully a few people realize that feature exists :)&lt;/p&gt;
&lt;p&gt;I also can’t forget to mention &lt;a href=&quot;http://blog.bonardo.net/&quot;&gt;Marco Bonardo&lt;/a&gt;, who hooked up &lt;code class=&quot;language-text&quot;&gt;about:home&lt;/code&gt; back in August so that we could even get to this point.&lt;/p&gt;
&lt;p&gt;Keep in mind, the image I’m showing here is the unbranded “Minefield” version of the page. When loading this in Firefox it won’t look like your computer is going to explode. I think there is a little bit more tweaking that will be done, but it already looks so much better than it used to.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The California DMV has Terrible Browser Recommendations]]></title><description><![CDATA[It appears as though the California DMV has not updated their website in the past 10 years… To be able to use this online application, your…]]></description><link>https://zpao.com/posts/the-california-dmv-has-terrible-browser-recommendations/</link><guid isPermaLink="false">https://zpao.com/posts/the-california-dmv-has-terrible-browser-recommendations/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;It appears as though the California DMV has not updated their website in the past 10 years…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To be able to use this online application, your computer will need to have one of the latest versions of either the Internet Explorer, Netscape Communicator/Navigator, or equivalent web browsers. For Internet Explorer you must have version 4.0 or higher. We suggest you use Netscape Communicator/Navigator version 6.0 or higher to eliminate any possible printer problems.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;a href=&quot;https://www.dmv.ca.gov/online/dlrbi/faqbrowser.htm&quot;&gt;California DMV Browser Requirements&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Internet Explorer 4 came out in 1997. Netscape 6 came out in 2000. How far we’ve come…&lt;/p&gt;
&lt;p&gt;In related news, the next available appointment (to take the “written” test) at the DMV in San Francisco is halfway through March. I bet I could get a new passport sooner.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Just Quit It]]></title><description><![CDATA[For a long time now, if you didn’t have Firefox set to restore your session then Firefox would prompt you before quitting. A dialog with…]]></description><link>https://zpao.com/posts/just-quit-it/</link><guid isPermaLink="false">https://zpao.com/posts/just-quit-it/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;For a long time now, if you didn’t have Firefox set to restore your session then Firefox would prompt you before quitting. A dialog with 3 buttons and a checkbox. It looked like this:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 489px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/fd2ec79c7a946f544c9338e9d4cc8150/03e1f/just-quit-it.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 33.714285714285715%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAAsTAAALEwEAmpwYAAABm0lEQVQoz23QvY7TQBAHcL8lj0HFQyAegeoiCgokCgpOogEpgSTyem3HG68/OTuOvZ9e544DwWoZZN8hUVD8NP/RFDMaT0r+QQh1/npS5WRkXVVVXZZVned5nWVZzTmvx3GslVILrfX/VEqpGyEE8fqBle++fIOr6x+wjzWkJIQoOgDGGPb7HbRtC0IIkFIulXMOjM3YYhgY9H2/zKWUv7xzPxyfvlDw5Nlk31wzV9DIIR+7ACHn+4H7vNm4zWbtttudiw8HdyTEpWnqCElckhBHyNHhALumaUEpdeeZUaQoGuDt+5MTQkJVlkApfZRBnudQFiUURblcYYyBcRwXkzEwTYvfc5ZS3nuM8eT2VsP3e/Vz1Nq2bWspTW1KqaUZtUVR2uamscYYyxizXdfZoe8t49w2p7Nt2u4vNzB28ZRSnTET6PFh8/yjI0kgpRkwzuFyucA0TaC1hrquwPfRcvWpO8N66y8+bXbwcb2Drh/AQwg9D8PwNcb4KgzDFUJohTFe/JtnQRCs4jh67B9yFEWrOI7n/CoIgpd/AGUO6tMLTl/LAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;just quit it&quot;
        title=&quot;just quit it&quot;
        src=&quot;/static/fd2ec79c7a946f544c9338e9d4cc8150/03e1f/just-quit-it.png&quot;
        srcset=&quot;/static/fd2ec79c7a946f544c9338e9d4cc8150/4edbd/just-quit-it.png 175w,
/static/fd2ec79c7a946f544c9338e9d4cc8150/13ae7/just-quit-it.png 350w,
/static/fd2ec79c7a946f544c9338e9d4cc8150/03e1f/just-quit-it.png 489w&quot;
        sizes=&quot;(max-width: 489px) 100vw, 489px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That mostly just gets in your way though. You’ve already decided you want to quit. You don’t also need to decide if you want to reopen your tabs next time. So starting with the next nightly (January 21st) and Firefox 4 beta 10, you will no longer see that prompt. Of course if you already checked the box to “not ask next time” you weren’t seeing this anyway.&lt;/p&gt;
&lt;p&gt;Essentially, all we did was flip a preference that has been there since Firefox 3 (that was almost 3 years ago for those of you keeping track at home). &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit&lt;/code&gt; was added as hidden preference to override other conditions that might cause a dialog shown at quit. We set that to &lt;code class=&quot;language-text&quot;&gt;false&lt;/code&gt;. &lt;strike&gt;If you want Firefox 3.* behavior, then just flip the pref back to &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt;.&lt;/strike&gt;&lt;/p&gt;
&lt;p&gt;If you’re interested, this was done in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=592822&quot;&gt;bug 592822&lt;/a&gt; (it was originally planned as part of &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=588482&quot;&gt;bug 588482&lt;/a&gt;).&lt;/p&gt;
&lt;h2&gt;Dude, Where’s My Session?&lt;/h2&gt;
&lt;p&gt;I know it’s been a while since &lt;a href=&quot;/posts/restore-previous-session&quot;&gt;I wrote about it&lt;/a&gt;, but it’s now possible to restore your session on demand after startup. There is work underway to make that feature more visible, namely &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=593421&quot;&gt;bug 593421&lt;/a&gt; (to add a button on the start page) and &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=589665&quot;&gt;bug 589665&lt;/a&gt; (to add a button in Panorama).&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Update (Feb. 7, 2011):&lt;/strong&gt; We had to make some further changes. We kept the dialog turned off by default but had to do some work with preferences. Setting &lt;code class=&quot;language-text&quot;&gt;browser.warnOnQuit&lt;/code&gt; is no longer good enough to show the quit dialog. &lt;a href=&quot;/posts/about-that-quit-dialog&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Radiohead: 01 and 10]]></title><description><![CDATA[This might be old news to some, but I found it pretty interesting… Consider that In Rainbows was meant to complement OK Computer, musically…]]></description><link>https://zpao.com/posts/radiohead-01-and-10/</link><guid isPermaLink="false">https://zpao.com/posts/radiohead-01-and-10/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;This might be old news to some, but I found it pretty interesting…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Consider that In Rainbows was meant to complement OK Computer, musically, lyrically, and in structure. We found that the two albums can be knit together beautifully. By combining the tracks to form one playlist, 01 and 10, we have a remarkable listening experience. The transitions between the songs are astounding, and it appears that this was done purposefully.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I set this playlist up and it really is a great listening experience. It might not be intentional but I don’t care. If you have both albums give it a listen.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Use a Pager with Mercurial]]></title><description><![CDATA[In the spirit of sharing Mercurial extensions this week, did you know that there’s a pager extension that ships with Mercurial? After using…]]></description><link>https://zpao.com/posts/use-a-pager-with-mercurial/</link><guid isPermaLink="false">https://zpao.com/posts/use-a-pager-with-mercurial/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;In the spirit of sharing Mercurial extensions this week, did you know that there’s a &lt;a href=&quot;http://mercurial.selenic.com/wiki/PagerExtension&quot;&gt;pager extension&lt;/a&gt; that ships with Mercurial? After using Git for a while and having a nice pager when looking at diffs, I got really annoyed by the fact that I constantly had to scroll my terminal for &lt;code class=&quot;language-text&quot;&gt;hg diff&lt;/code&gt;. I found the Pager extension and there was much rejoicing.&lt;/p&gt;
&lt;p&gt;So turn it on and be happy. It’ll only page when you need to. And while you’re in your &lt;code class=&quot;language-text&quot;&gt;.hgrc&lt;/code&gt;, enable the also-shipped-but-not-on-by-default &lt;a href=&quot;http://mercurial.selenic.com/wiki/ColorExtension&quot;&gt;Color extension&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[hg-prompt Makes My Eyes Happier]]></title><description><![CDATA[For a long time I’ve had Git info in my terminal prompt. At Mozilla, we mostly use Mercurial though, so a Git aware terminal wasn’t super…]]></description><link>https://zpao.com/posts/hg-prompt-makes-my-eyes-happier/</link><guid isPermaLink="false">https://zpao.com/posts/hg-prompt-makes-my-eyes-happier/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;For a long time I’ve had Git info in my terminal prompt. At Mozilla, we mostly use Mercurial though, so a Git aware terminal wasn’t super helpful. A couple times I tried to hack together something for Mercurial to show me my current branch or applied patch queue. Every time though I either didn’t get everything I wanted or was too lazy to make it work like I wanted (and play nicely with my other customizations).&lt;/p&gt;
&lt;p&gt;This morning I started on this problem again. But this time I started by searching for a solution first and voilà, I found hg-prompt. Take a look at &lt;a href=&quot;http://sjl.bitbucket.org/hg-prompt/documentation/samples/&quot;&gt;the samples&lt;/a&gt; and then customize it with the &lt;a href=&quot;http://sjl.bitbucket.org/hg-prompt/documentation/keywords/&quot;&gt;extended list of keywords available&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Pagination: Next, Next, Previous]]></title><description><![CDATA[Nobody has said anything but I haven’t had pagination enabled on this blog since it started. It was initially cut from the theme since I…]]></description><link>https://zpao.com/posts/pagination-next-next-previous/</link><guid isPermaLink="false">https://zpao.com/posts/pagination-next-next-previous/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Nobody has said anything but I haven’t had pagination enabled on this blog since it started. It was initially cut from the theme since I didn’t like what I’d done and I didn’t have to worry about it.&lt;/p&gt;
&lt;p&gt;This summer I realized I had more than 1 page of content but didn’t care enough.&lt;/p&gt;
&lt;p&gt;Tonight I just took out the comments that had been hiding the content. Turns out what I had designed is good enough to get the point across.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Through the Spam Filter]]></title><description><![CDATA[Hi dear,
you are very nice
I wish i could get to know you for
it is my pleasure to have you as my friend
for a friend is all about Respect…]]></description><link>https://zpao.com/posts/through-the-spam-filter/</link><guid isPermaLink="false">https://zpao.com/posts/through-the-spam-filter/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Hi dear,
you are very nice
I wish i could get to know you for
it is my pleasure to have you as my friend
for a friend is all about Respect,,,Admiration,contentious and
affectionante also friendship is consist of sharing of ideas and
showing true affection without cheats,,,lies and betray so can you
welcome me, lets get to the ocean of love ?????????????
I am miss lucy by name&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Certainly not the most interesting piece of email to ever make it through the spam filter, but seriously, &lt;strong&gt;LET’S GET TO THE OCEAN OF LOVE ?????????????&lt;/strong&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Amazon and HTML5]]></title><description><![CDATA[Apparently Amazon is stepping right into HTML5 and using  in their sign in form. You can see the built-in form validation in action there…]]></description><link>https://zpao.com/posts/amazon-and-html5/</link><guid isPermaLink="false">https://zpao.com/posts/amazon-and-html5/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e9e6f8309e77079ade074bdbfdf4f6b4/d7abb/amazon-and-html5.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 63.42857142857142%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAACCUlEQVQoz32O3W/SYBTG+69yuxu88Mq46RyJF5pohESIM1mMXVEWy0KiTkyWLJuw0ZbiyucobWn5Wuno19u1b/u2BoiLRuHJc3Fycn7nebBPJPkxd0BkP+TzeZIkcRwniH0cxzPpTDqT2d19SxDE/t/CcTyXy8ViMey8QpPffmQ/n1/WW912k6FphqlVGbrGVlmGZmhqvqEZiqJoimLZKlutclydpir34nHs5HuhXDprtTtTVW3wCt8fKxLXFWVeGnaloSCPr6RJbzjz/cCDPvR93QLqDAAXPdjaxjrFV/ViunP04jlxtPGOTR2WXxdO944bLwvs3glPlCWiLBIlMXfRP6jI2VJv530x/ub02SG3cX8Tg2DmmJrnWMCFNowADGwvtL3A9gIHorkXA/CCpS3HuzEdD0UPHyWwaNb3NTH0QAQ0ZGphGEZL3Q3/CCEURdHWdgJD0J2O5IkiXMtC7eKMb9EjkVMEThV7yA/++2QJbz5OYKFraQo/VXqaIvTazEBip9dXk0nXc+05uRp+svMUCxBSFHkwkEVREEVJt1zThobl+gFaVX8Jp1IpDHmG0vjS575KPwv85bFh3wIXAhfena6D/QBZlgl9uOj4Oy2KUBiiMELhWng0GjebreFwqGr6QNXliWHYLvqDWAdDP7CBY5qmrhsz3Zjq4Ma8hT6KFpnh6uRkMvkL4EOxNWp3+2IAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;amazon and html5&quot;
        title=&quot;amazon and html5&quot;
        src=&quot;/static/e9e6f8309e77079ade074bdbfdf4f6b4/8c557/amazon-and-html5.png&quot;
        srcset=&quot;/static/e9e6f8309e77079ade074bdbfdf4f6b4/4edbd/amazon-and-html5.png 175w,
/static/e9e6f8309e77079ade074bdbfdf4f6b4/13ae7/amazon-and-html5.png 350w,
/static/e9e6f8309e77079ade074bdbfdf4f6b4/8c557/amazon-and-html5.png 700w,
/static/e9e6f8309e77079ade074bdbfdf4f6b4/d7abb/amazon-and-html5.png 959w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Apparently Amazon is stepping right into HTML5 and using &lt;code class=&quot;language-text&quot;&gt;type=&quot;email&quot;&lt;/code&gt; in their sign in form. You can see the built-in form validation in action there. This is pretty awesome to actually see out in the wild, especially from such a big name.&lt;/p&gt;
&lt;p&gt;Client-side form validation without various JS libraries is pretty cool. &lt;a href=&quot;http://blog.oldworld.fr/index.php?post/2010/11/17/HTML5-Forms-Validation-in-Firefox-4&quot;&gt;Read more about it&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Reset Panorama from the Error Console.]]></title><description><![CDATA[Panorama is this cool new feature coming to Firefox 4. Most of the big issues have been fixed, but there’s still the occasional issue with…]]></description><link>https://zpao.com/posts/reset-panorama-from-the-error-console/</link><guid isPermaLink="false">https://zpao.com/posts/reset-panorama-from-the-error-console/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.azarask.in/blog/post/designing-tab-candy/&quot;&gt;Panorama&lt;/a&gt; is this cool new feature coming to Firefox 4. Most of the big issues have been fixed, but there’s still &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=598600&quot;&gt;the occasional issue&lt;/a&gt; with orphan tabs.&lt;/p&gt;
&lt;p&gt;Last week I wrote &lt;a href=&quot;https://gist.github.com/626761&quot;&gt;a script&lt;/a&gt; that would strip the Panorama data out of Session Restore. That worked but would require a restart. &lt;a href=&quot;http://www.iangilman.com/&quot;&gt;Ian Gilman&lt;/a&gt; (one of the Panorama developers) used that script for the basis of &lt;a href=&quot;https://gist.github.com/637583&quot;&gt;a script&lt;/a&gt; that worked much better (it actually called into Panorama and told it to reset properly). The only problem is that it left tabs hidden, so it would require jumping into and then out of TabView to bring everything back to normal. I forked that and just added a call that made sure all tabs were shown.&lt;/p&gt;
&lt;p&gt;So if you ever get into a confusing state and don’t mind wiping out your current Panorama data, this script is for you:&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist638855&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-resetpanorama-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;resetpanorama.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;/* Run this from your error console. WARNING: removes tabs from their existing groups! */&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-v&gt;Cc&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Components&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;classes&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-v&gt;Ci&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Components&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;interfaces&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;wm&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;@mozilla.org/appshell/window-mediator;1&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getService&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsIWindowMediator&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;winEnum&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;wm&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getEnumerator&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;navigator:browser&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;while&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;winEnum&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;hasMoreElements&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;win&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;winEnum&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;getNext&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;TabView&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;_initFrame&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-k&gt;function&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;contentWindow&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;TabView&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;_window&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;contentWindow&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;UI&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;reset&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-v&gt;Array&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;forEach&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;gBrowser&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;tabs&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-k&gt;function&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;tab&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-s1&gt;win&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;gBrowser&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;showTab&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;tab&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-resetpanorama-js-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-resetpanorama-js-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/638855/raw/91690e6e1060a762eabfaf6fa75caccd849322d7/resetpanorama.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/638855#file-resetpanorama-js&quot;&gt;
          resetpanorama.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[P-I-Z-Z-A I want pizza!]]></title><description><![CDATA[P-I-Z-Z-A I want pizza!]]></description><link>https://zpao.com/posts/p-i-z-z-a-i-want-pizza/</link><guid isPermaLink="false">https://zpao.com/posts/p-i-z-z-a-i-want-pizza/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe width=&quot;640&quot; height=&quot;480&quot; src=&quot;http://www.youtube.com/embed/wusGIl3v044?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;blockquote&gt;
&lt;p&gt;P-I-Z-Z-A I want pizza!&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title><![CDATA[The Clipper Card System is a Fucking Mess]]></title><description><![CDATA[Here’s (only part of) why: Please note that when you add value online, it can take up to 3 days for the value to be available to be loaded…]]></description><link>https://zpao.com/posts/the-clipper-card-system-is-a-fucking-mess/</link><guid isPermaLink="false">https://zpao.com/posts/the-clipper-card-system-is-a-fucking-mess/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Here’s (only part of) why:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Please note that when you add value online, it can take up to 3 days for the value to be available to be loaded onto your card, and you must tag your card to a card reader to load the value. Your card balance will not be updated until you have tagged your card and loaded the value.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;3 days? By then I’ll have needed it 3 days ago.&lt;/p&gt;
&lt;p&gt;Another gem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cable car operators will be equipped with hand held card readers which can verify that a current Monthly Pass exists on your Clipper card. The card readers cannot deduct a cash fare, so customers paying with cash or 10-ride books are not yet able to ride the cable cars using Clipper.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I’ve seen failures on Muni where the stupid reader doesn’t work. No cash? Sorry get off the bus. On Caltrain I’ve seen people with autoload not have their card autoloaded. Operators tend to be understanding (“Oh yea these things kinda suck”), but the current condition is not great.&lt;/p&gt;
&lt;p&gt;I realize that this is one step towards the cashless future we see in movies. I just wish it wasn’t going to be a clusterfuck getting there.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[<3 Firefox Sync]]></title><description><![CDATA[Today I accidentally deleted my primary Firefox profile (mostly through user error). I was cleaning testing profiles out via the Profile…]]></description><link>https://zpao.com/posts/firefox-sync/</link><guid isPermaLink="false">https://zpao.com/posts/firefox-sync/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Today I accidentally deleted my primary Firefox profile (mostly through user error). I was cleaning testing profiles out via the &lt;a href=&quot;http://support.mozilla.com/kb/managing+profiles&quot;&gt;Profile Manager&lt;/a&gt; and managed to delete &lt;code class=&quot;language-text&quot;&gt;default&lt;/code&gt;. Since that actually deletes the whole profile folder from disk instead of moving to the trash can, I just said “Fuck”. This is a profile I’ve had for a while. It had a lot of history, passwords, bookmarks, extensions. All of it lost in an instant.&lt;/p&gt;
&lt;p&gt;Luckily though, I’d set this profile up to use Firefox Sync years ago when early versions of Weave were just being released. At that point I’d set it up for backup primarily. Since then I’ve synced that profile to multiple computers.&lt;/p&gt;
&lt;p&gt;The nice thing about it is I lost almost 0 time. I created a new profile, set up Sync, and within a couple minutes had the vital information I needed in my profile. I lost a couple things: extensions, some prefs. I don’t use many extensions so that’s not a huge issue. I don’t even remember what prefs I’ve tweaked, but I’m going to guess not too many. Some prefs were restored by Sync, but there’s only a handful that get synced. I even had all of my tabs a click away on the list of tabs from other computers.&lt;/p&gt;
&lt;p&gt;If you’re not using Firefox Sync, &lt;a href=&quot;http://www.mozilla.com/en-US/firefox/beta/features/&quot;&gt;it’s built in to Firefox 4&lt;/a&gt; and is also &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/10868/&quot;&gt;available as an extension&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[I Don't Blog Here Anymore]]></title><description><![CDATA[My homegrown blogging engine worked for a while, but I just don’t have the time to make the changes I want. Not only that, but when I blog…]]></description><link>https://zpao.com/posts/i-dont-blog-here-anymore/</link><guid isPermaLink="false">https://zpao.com/posts/i-dont-blog-here-anymore/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;My homegrown blogging engine worked for a while, but I just don’t have the time to make the changes I want. Not only that, but when I blog here, I feel like I need to put a lot of thought into each article. That’s not something I have the time to do for everything I want to share.&lt;/p&gt;
&lt;p&gt;Several months ago, I decided to give &lt;a href=&quot;http://tumblr.com&quot;&gt;Tumblr&lt;/a&gt; another shot. So far it’s been working out. It gives me a little bit more flexibility. I can write a thoughtful article, or I can share a funny video I found on YouTube. I feel a lot less pressure to make every post super meaningful.&lt;/p&gt;
&lt;p&gt;Eventually I’ll put on a fresh coat of paint here and make this more of a launching point to my separate content. I’ll still keep the articles around accessible by their current URLs regardless of what I do.&lt;/p&gt;
&lt;p&gt;If you’re an RSS kind of person &amp;#x26; you subscribed to the Feedburner feed, you’ll automagically get switched over to the new feed soon.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[I Already Love It]]></title><description><![CDATA[I already love it. I had to wait several minutes til my 100+ tabs are loaded. Now i can start to surf immediately. —trolly on mozillazine…]]></description><link>https://zpao.com/posts/i-already-love-it/</link><guid isPermaLink="false">https://zpao.com/posts/i-already-love-it/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;I already love it. I had to wait several minutes til my 100+ tabs are loaded. Now i can start to surf immediately.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;—&lt;a href=&quot;http://forums.mozillazine.org/viewtopic.php?p=9915641&amp;#x26;sid=5169dfe4ca931dad2c643f083536b945#p9915641&quot;&gt;trolly on mozillazine&lt;/a&gt; about &lt;a href=&quot;/posts/cascaded-session-restore-a-hidden-bonus&quot;&gt;Cascaded Session Restore&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Cascaded Session Restore + a Hidden Bonus]]></title><description><![CDATA[In the tradition of announcing major things on Friday nights… I did this thing where we don’t load all of your pages at once when we restore…]]></description><link>https://zpao.com/posts/cascaded-session-restore-a-hidden-bonus/</link><guid isPermaLink="false">https://zpao.com/posts/cascaded-session-restore-a-hidden-bonus/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;em&gt;In the tradition of announcing major things on Friday nights…&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I did this thing where we don’t load all of your pages at once when we restore your session. That should keep your Firefox (and computer in general) a bit more usable when you start up Firefox with a large session. See &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=586068&quot;&gt;bug 586068&lt;/a&gt; if you’re interested in the juicy details.&lt;/p&gt;
&lt;h2&gt;Other Details&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Switching tabs should cause the selected tab to start loading immediately, even if it wasn’t loading before&lt;/li&gt;
&lt;li&gt;This works with Panorama (so changing groups re-prioritizes your load order).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Preference Controlled&lt;/h2&gt;
&lt;p&gt;We load a certain number of tabs based on the &lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.max_concurrent_tabs&lt;/code&gt; preference. We’ve set the default to 3 for now.&lt;/p&gt;
&lt;h2&gt;Hidden Bonus&lt;/h2&gt;
&lt;p&gt;Set the pref to 0. It’s basically a built-in &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/67651&quot;&gt;BarTab&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Quirks&lt;/h2&gt;
&lt;p&gt;We show the page title and favicon at start up, before we try to load the page. So you might see some slightly odd behavior. Panorama’s thumbnail caching isn’t perfect, so there will probably be missing thumbnails at start up if you switch into the Panorama view.&lt;/p&gt;
&lt;p&gt;Please email me (link below!) or file a bug blocking 586068 if you see anything weird.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Restore Previous Session]]></title><description><![CDATA[I landed bug 588482 today (September 10th), so starting with tomorrow’s nightly version of Firefox (AKA Minefield), you’ll be able to…]]></description><link>https://zpao.com/posts/restore-previous-session/</link><guid isPermaLink="false">https://zpao.com/posts/restore-previous-session/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I landed &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=588482&quot;&gt;bug 588482&lt;/a&gt; today (September 10&lt;sup&gt;th&lt;/sup&gt;), so starting with tomorrow’s nightly version of Firefox (AKA Minefield), you’ll be able to restore your previous session at any point after start up. This means that you no longer have to restore your whole session immediately at start up. This will be available through a menu item in the History menu, as shown below.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/dd320868125a5aee7f21ac0c57eef741/0b533/restore-previous-session.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.85714285714286%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB2ElEQVQoz4WRa4+iMBSG+f+/Zz/Mmh0z4zi6ig5CKbe2FAQjFlSGS7mIsAGzJrtOdp+8OemH85yTtsJ48v59/KYAaJmmZSHXdTDGhBDDMFzHwQjtv8L3fYyxcD6fDodDWZRd17Vte/3N7dxer82fXC59LYtC0zSBMYYRCUMWBEGW59eH7kHoaZrmNrdpmq7rKKXCge1V9YNSN4qiqqpu+5vmem995CbHcSycWKCuFqaFfM/7TJLBadq27f5HVVVCud2il1doWkCWoQYxxgoA+/0+CkNeFI9OO9B1XVmWAt8dHRESlyZJmmdZMXA+neM45pzXVVUUZVWVN+pLfZ8yyP7Oep9pprV1XIT6TyKEUIcaumHohq5pEGoYIQCAClSE0PF4DBlLs6yuayEhxByNVAtR29Z0TdN1oCimadIBhLBtU9umhJA0y/Kcf/YknPN+c1lV1HEJxocg2Lqu73k7z9s6Tp5nZX/n9l8PJkrKbLmezpeL1WY6F2eL1Y+Xt6fn19F48u3peTIX5ytpJkpzUZotP+6Z/lwr0BAANDYAyqouyUBSoGZiaGKgW0C3VAPJ0Nio+l+Rob6WVVU3hTRJQsaiKGSMRayvafJZcF7wnPO86MO/Sp6l6S/NiMg3xRsBxQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Screenshot of History Menu&quot;
        title=&quot;Screenshot of History Menu&quot;
        src=&quot;/static/dd320868125a5aee7f21ac0c57eef741/0b533/restore-previous-session.png&quot;
        srcset=&quot;/static/dd320868125a5aee7f21ac0c57eef741/4edbd/restore-previous-session.png 175w,
/static/dd320868125a5aee7f21ac0c57eef741/13ae7/restore-previous-session.png 350w,
/static/dd320868125a5aee7f21ac0c57eef741/0b533/restore-previous-session.png 500w&quot;
        sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This feature will be in Firefox 4 &lt;strike&gt;beta 6&lt;/strike&gt; beta 7, due out in the next couple weeks.&lt;/p&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Restoring your previous session after you’ve browsed around will merge the sessions. You shouldn’t lose any new data by restoring your previous session.&lt;/li&gt;
&lt;li&gt;We didn’t break existing behavior. If you have Firefox set to show your windows and tabs from last time, we’ll continue to do so and you won’t even notice this feature exists&lt;/li&gt;
&lt;li&gt;App tabs still behave the same.&lt;/li&gt;
&lt;li&gt;This doesn’t break any existing APIs, but it does add some new ones.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=593421&quot;&gt;Discoverability is suboptimal&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=592822&quot;&gt;You are still prompted to save your session when quitting&lt;/a&gt; (assuming default prefs).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Why?&lt;/h2&gt;
&lt;p&gt;We did this primarily for 2 reasons.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We want faster start up times. By encouraging users to always resume their previous sessions, we give the impression that Firefox takes a long time to load up. But really, you’re loading 20, 50, 100+ tabs and that’s what is slow.&lt;/li&gt;
&lt;li&gt;When you’re quitting, you there’s a good chance you have no idea if you’ll need your tabs next time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(Keep in mind, if you’re reading this post, you aren’t the typical user. You’re probably a developer of some sort who drags your 400 tabs around to each session. You know it’s slow, but you really never got the hang of bookmarks, so you just keep tabs open.)&lt;/p&gt;
&lt;h2&gt;Privacy&lt;/h2&gt;
&lt;p&gt;Obviously, in order for us to restore your session, we need to save it to disk. We save this data in a plain-text JSON file in your &lt;a href=&quot;http://support.mozilla.com/kb/Profiles&quot;&gt;profile&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We currently consider sessions a little differently than some other browsers. We consider your session cookies (and a few other things) as part of your session. This means we write that information to disk. Under a normal session restore that you’ve explicitly opted-in to, that’s fine. We have a hidden preference (&lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.privacy_level&lt;/code&gt;) that specifies what level of privacy to use. &lt;strong&gt;The default value is 1&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There are 3 levels of privacy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt; = Save private information for HTTP and HTTPS sites.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt; = Save private information for HTTP sites.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt; = Don’t save any private information.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For deferred sessions, we created a new preference (&lt;code class=&quot;language-text&quot;&gt;browser.sessionstore.privacy_level_deferred&lt;/code&gt;) with a different default value. Since people are not making an informed decision to restore at shutdown, we don’t want to expose information that can be used to, for example, log in to GMail. This new preference has the same possible values but &lt;strong&gt;the default value is 2&lt;/strong&gt;, so that no session cookies will be restored.&lt;/p&gt;
&lt;h2&gt;Safari&lt;/h2&gt;
&lt;p&gt;Yea. They’ve been doing this for ages. But as far as I know, they still don’t allow you to restore your entire session at start up.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Helo, i'm a noob]]></title><description><![CDATA[Helo - i’m a noob; pls be kind.  i’m using getelementbyID to submit a form to a script, and want to prevent injection attacks.  Is there a…]]></description><link>https://zpao.com/posts/helo-im-a-noob/</link><guid isPermaLink="false">https://zpao.com/posts/helo-im-a-noob/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Helo - i’m a noob; pls be kind.  i’m using getelementbyID to submit a form to a script, and want to prevent injection attacks.  Is there a custom php function you’d reccomend, or is there a way to post an element instead of get?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;—ragas (on &lt;a href=&quot;irc://irc.freenode.net/#javascript&quot;&gt;##javascript on freenode&lt;/a&gt;)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Jetpack SDK 0.5 & the Request API]]></title><description><![CDATA[Jetpack SDK 0.5 hit the streets last week. There’s a bunch of new APIs in there. I worked on the  API, which enables a simple way to make…]]></description><link>https://zpao.com/posts/jetpack-sdk-0-5-the-request-api/</link><guid isPermaLink="false">https://zpao.com/posts/jetpack-sdk-0-5-the-request-api/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;a href=&quot;http://mozillalabs.com/jetpack/2010/06/24/announcing-jetpack-sdk-0-5/&quot;&gt;Jetpack SDK 0.5&lt;/a&gt; hit the streets last week. There’s a bunch of new APIs in there. I worked on the &lt;code class=&quot;language-text&quot;&gt;Request&lt;/code&gt; API, which enables a simple way to make XML HTTP Requests (XHR, or AJAX if you must). The API is a wrapper around the Gecko HXR object.&lt;/p&gt;
&lt;p&gt;Like jQuery, MooTools, Prototype (or pretty much any JS library), it makes the ugly stuff go away. You simple provide a URL, some data, and a callback, and we’ll do the rest (you can set some more things if you’d like). In the callback, you have access to the response headers and content as JSON/XML/text. &lt;a href=&quot;https://jetpack.mozillalabs.com/sdk/0.5/docs/#module/jetpack-core/request&quot;&gt;Read the documentation&lt;/a&gt; for the specifics.&lt;/p&gt;
&lt;p&gt;Keep in mind that this is meant to be a simple API. You can’t make complicated requests. For example, you can’t send files with it. The plan is to keep this API simple. It is a first version, so if people need more functionality, we can add more. Or we can take those additional needs and create another API. If you have feedback, please post to the &lt;a href=&quot;https://groups.google.com/group/mozilla-labs-jetpack&quot;&gt;Google Group&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wrote up a basic example using the Twitter API, which I’ve included below. It’s not too fancy, but gets your feet wet.&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist457704&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-requestexample-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;requestExample.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;latestTweetRequest&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-v&gt;Request&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;url&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;http://api.twitter.com/1/statuses/public_timeline.json&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;onComplete&lt;/span&gt;: &lt;span class=pl-k&gt;function&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;var&lt;/span&gt; &lt;span class=pl-s1&gt;tweet&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-smi&gt;this&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;response&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;json&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-smi&gt;console&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;log&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;User: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;tweet&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;user&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;screen_name&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-smi&gt;console&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;log&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;Tweet: &amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;tweet&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;text&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;// Be a good consumer and check for rate limiting before doing more.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-v&gt;Request&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c1&gt;url&lt;/span&gt;: &lt;span class=pl-s&gt;&amp;quot;http://api.twitter.com/1/account/rate_limit_status.json&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;onComplete&lt;/span&gt;: &lt;span class=pl-k&gt;function&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-smi&gt;this&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;response&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;json&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;remaining_hits&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;latestTweetRequest&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;get&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-kos&gt;}&lt;/span&gt; &lt;span class=pl-k&gt;else&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-smi&gt;console&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;log&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;You have been rate limited!&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-requestexample-js-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-requestexample-js-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;get&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/457704/raw/af553fcbbc9f7b1d382d96477c842c735315432e/requestExample.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/457704#file-requestexample-js&quot;&gt;
          requestExample.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Good Life in Concert]]></title><description><![CDATA[Last Thursday I saw The Good Life play at Bottom of the Hill with Victoria and Megan. With the exception of the obnoxiously loud drunk girl…]]></description><link>https://zpao.com/posts/the-good-life-in-concert/</link><guid isPermaLink="false">https://zpao.com/posts/the-good-life-in-concert/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/mu0SqIGE338?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Last Thursday I saw &lt;a href=&quot;http://www.thegoodlifemusic.com&quot;&gt;The Good Life&lt;/a&gt; play at &lt;a href=&quot;http://www.bottomofthehill.com&quot;&gt;Bottom of the Hill&lt;/a&gt; with Victoria and Megan. With the exception of the obnoxiously loud drunk girl dropping pint glasses nearby, it was one of the better shows I’ve been to in a while. Tim Kasher is just a great performer and he really pours his heart into the music. Bottom of the Hill is a small venue, but for a band like The Good Life, the intimacy is entirely appropriate. They played a lot of fan favorites and even covered Fleetwood Mac’s “The Chain,” which was pretty cool. They finished strong with “Album of the Year” as seen in the video above.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Switch to Tab & Closing Empty Tabs]]></title><description><![CDATA[Firefox 4 will be introducing a new feature called “Switch to Tab” or “Tab Matches in Awesomebar”, a feature that attempts to see if the…]]></description><link>https://zpao.com/posts/switch-to-tab-closing-empty-tabs/</link><guid isPermaLink="false">https://zpao.com/posts/switch-to-tab-closing-empty-tabs/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Firefox 4 will be introducing a &lt;a href=&quot;https://wiki.mozilla.org/Firefox/Projects/Tab_Matches_in_Awesomebar&quot;&gt;new feature&lt;/a&gt; called “Switch to Tab” or “Tab Matches in Awesomebar”, a feature that attempts to see if the page you’re looking for is already open. If it is (and you explicitly select that location bar suggestion), you’ll be taken to that open tab instead of opening a new one. This is great step forward &amp;#x26; I’ve already found it quite helpful. I tend to open the same bug several times over the course of a day or week. Now instead of having 3 copies, I can just have one and switch to it quickly.&lt;/p&gt;
&lt;p&gt;Even though &lt;a href=&quot;http://theunfocused.net&quot;&gt;Blair&lt;/a&gt; toiled away on it, there were still a few bugs with the initial implementation. Blair immediately jumped into another small project (redesigning the Add-ons Manager is pretty trivial right?), so many of the followup bugs went unowned. I took two of those bugs; I fixed &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=556061&quot;&gt;one&lt;/a&gt; a few weeks ago and finally fixed the &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=555767&quot;&gt;other&lt;/a&gt; today.&lt;/p&gt;
&lt;p&gt;The second one is the one that will make more of a difference for user experience. My common workflow goes like this (notice the brokenness at the end):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open a new tab&lt;/li&gt;
&lt;li&gt;Start typing new URL&lt;/li&gt;
&lt;li&gt;Sweet, a match! Switch to it.&lt;/li&gt;
&lt;li&gt;Repeat 1-3&lt;/li&gt;
&lt;li&gt;WTF? I have 15 blank tabs open?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/rev/2333f6d349d7&quot;&gt;my patch&lt;/a&gt; &lt;em&gt;we’ll now close that empty tab after we switch focus&lt;/em&gt;. No more step 5. That is all.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[I'm Comic Sans, Asshole.]]></title><description><![CDATA[People love me. Why? Because I’m fun. I’m the life of the party. I bring levity to any situation. Need to soften the blow of a harsh message…]]></description><link>https://zpao.com/posts/im-comic-sans-asshole/</link><guid isPermaLink="false">https://zpao.com/posts/im-comic-sans-asshole/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;People love me. Why? Because I’m fun. I’m the life of the party. I bring levity to any situation. Need to soften the blow of a harsh message about restroom etiquette? SLAM. There I am. Need to spice up the directions to your graduation party? WHAM. There again. Need to convey your fun-loving, approachable nature on your business’ website? SMACK. Like daffodils in motherfucking spring.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(via &lt;a href=&quot;http://twitter.com/johnolilly&quot;&gt;@johnolilly&lt;/a&gt;)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Are Cameras the New Guns?]]></title><description><![CDATA[Almost without exception, police officials have staunchly supported the arresting officers. This argues strongly against the idea that some…]]></description><link>https://zpao.com/posts/are-cameras-the-new-guns/</link><guid isPermaLink="false">https://zpao.com/posts/are-cameras-the-new-guns/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Almost without exception, police officials have staunchly supported the arresting officers. This argues strongly against the idea that some rogue officers are overreacting or that a few cops have something to hide. “Arrest those who record the police” appears to be official policy, and it’s backed by the courts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I’ve take a &lt;a href=&quot;http://www.flickr.com/photos/zpao/sets/72157613241445785/&quot;&gt;few photos&lt;/a&gt; of officers in action without arrest. I’m worried by the direction the law is heading — that it becomes a crime punishable by multiple years in prison, just for photographing a cop (doing something wrong).&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Now Using JSON.parse in Session Restore]]></title><description><![CDATA[Back in March, I partially dropped support for sessions from Firefox 2.0 & 3.0. For Firefox 4.0, we’ll be dropping backwards compatibility…]]></description><link>https://zpao.com/posts/now-using-json-parse-in-session-restore/</link><guid isPermaLink="false">https://zpao.com/posts/now-using-json-parse-in-session-restore/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Back in March, &lt;a href=&quot;/posts/partially-dropping-support-for-firefox-2-0-3-0&quot;&gt;I partially dropped support for sessions from Firefox 2.0 &amp;#x26; 3.0&lt;/a&gt;. For Firefox 4.0, we’ll be dropping backwards compatibility of sessions for Firefox 2.0 &amp;#x26; 3.0. That means that sessions created with nightlies starting tomorrow, will no longer be loadable by versions of Firefox prior to 3.5. With &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=387859&quot;&gt;bug 387859&lt;/a&gt;, Session Restore will now use &lt;code class=&quot;language-text&quot;&gt;JSON.parse&lt;/code&gt; instead of &lt;code class=&quot;language-text&quot;&gt;evalInSandbox&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;So why use &lt;code class=&quot;language-text&quot;&gt;JSON.parse&lt;/code&gt;?&lt;/h2&gt;
&lt;p&gt;Mostly, it’s faster. &lt;code class=&quot;language-text&quot;&gt;evalInSandbox&lt;/code&gt; involved going through XPConnect and a whole bunch of object wrapping for security needed to be done. By using &lt;code class=&quot;language-text&quot;&gt;JSON.parse&lt;/code&gt;, we don’t have to worry about that overhead. We also don’t have to worry about changes made to Chrome Object Wrappers (changes which have broken about:sessionrestore recently).&lt;/p&gt;
&lt;h2&gt;What does this mean for me? Not Much.&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;If for some reason you’re bouncing between nightlies and Firefox 3.0, then you’ll want to load your session in Firefox 3.5 or 3.6 before loading it in Firefox 3.0 again. If this describes you, then you should really &lt;a href=&quot;http://www.mozilla.com/firefox/firefox.html&quot;&gt;just upgrade&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The contents of &lt;code class=&quot;language-text&quot;&gt;sessionstore.js&lt;/code&gt; will no longer have wrapping parenthesis. Those were added so that sessions could still be loaded by Firefox 3.0-.&lt;/li&gt;
&lt;li&gt;The keys that were only ever used internally are now excluded from exported sessions. This includes &lt;code class=&quot;language-text&quot;&gt;_tabStillLoading&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;_hosts&lt;/code&gt;, and &lt;code class=&quot;language-text&quot;&gt;_formDataSaved&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Special Offer]]></title><description><![CDATA[You’ve all seen these. They’re all over purchase confirmation pages on sites like TicketMaster, CampusFood, Fandango. This particular one…]]></description><link>https://zpao.com/posts/special-offer/</link><guid isPermaLink="false">https://zpao.com/posts/special-offer/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;img src=&quot;./special-offer.gif&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;You’ve all seen these. They’re all over purchase confirmation pages on sites like TicketMaster, CampusFood, Fandango. This particular one was on TicketWeb (&lt;a href=&quot;http://www.theindependentsf.com/calendar/event-detail/?tfly_event_id=7979&quot;&gt;after buying tickets to see Matt Pond PA&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;There’s a lot not to understand here… I don’t understand why these special offers are always presented as images. Nor do I understand why they would use a button from 1995. Nor do I understand why the button text is anti-aliased but the text text isn’t.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[waitForClipboard now available to Mochitests]]></title><description><![CDATA[Testing is a part of life. Sadly, that means we have to write tests for things that involve the clipboard. The clipboard is complicated…]]></description><link>https://zpao.com/posts/waitforclipboard-now-available-to-mochitests/</link><guid isPermaLink="false">https://zpao.com/posts/waitforclipboard-now-available-to-mochitests/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Testing is a part of life. Sadly, that means we have to write tests for things that involve the clipboard. The clipboard is complicated enough with all of this flavor and transferable stuff we have going on. Throw in the fact that the clipboard can be asynchronous (thanks Linux), and it gets worse. We’ve had a number of tests that fail due to expectations that the clipboard be synchronous. Most of those tests have been changed to use a “polling” strategy - essentially waiting for the clipboard to have the expected value. If it doesn’t have the right value after a few seconds, then the test fails. I know of at least 3 tests that use this strategy now, and they all ended up having similar code, perhaps even copy-pasted directly from another test.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.gavinsharp.com/&quot;&gt;Gavin&lt;/a&gt; made me use polling for the test in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=556061&quot;&gt;a bug&lt;/a&gt; I fixed recently. Then the following week there was a password manager bug that I saw doing clipboard stuff (without polling) so I passed along the “polling is good” requirement.&lt;/p&gt;
&lt;p&gt;Instead of making everybody rewrite the wheel, I decided to write &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=567870&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;SimpleTest.waitForClipboard&lt;/code&gt;&lt;/a&gt; to take care of this polling stuff for us. It only works with the global clipboard, and only with &lt;code class=&quot;language-text&quot;&gt;text/unicode&lt;/code&gt; strings (&lt;code class=&quot;language-text&quot;&gt;text/plain&lt;/code&gt; should work too since it’s available on the clipboard in the unicode flavor). It works by setting the clipboard to a known value (different than your expected value), then polling for that value. After the known value is found, your setup function is called, and we poll again. When we find the value, we add a &lt;strong&gt;PASS&lt;/strong&gt; &amp;#x26; then your success function is called. If at any point we timeout waiting for the expected value, we add a &lt;strong&gt;FAIL&lt;/strong&gt; &amp;#x26; then your failure function is called.&lt;/p&gt;
&lt;p&gt;Following are the arguments and then a simple example test. Hopefully it’s clear how to make use of &lt;code class=&quot;language-text&quot;&gt;waitForClipboard&lt;/code&gt; in tests you write in the future. I’ve already converted a few tests to use this method. If there are any existing [orange]s that you think could benefit from this, please convert them!&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;gist423041&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-simpletest_excerpt-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;SimpleTest_excerpt.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;/*&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * Polls the clipboard waiting for the expected value. A known value different than&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * the expected value is put on the clipboard first (and also polled for) so we&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * can be sure the value we get isn&amp;#39;t just the expected value because it was already&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * on the clipboard. This only uses the global clipboard and only for text/unicode&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * values.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * &lt;span class=pl-k&gt;@param&lt;/span&gt; aExpectedVal&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        The string value that is expected to be on the clipboard&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * &lt;span class=pl-k&gt;@param&lt;/span&gt; aSetupFn&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        A function responsible for setting the clipboard to the expected value,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        called after the known value setting succeeds.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * &lt;span class=pl-k&gt;@param&lt;/span&gt; aSuccessFn&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        A function called when the expected value is found on the clipboard.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; * &lt;span class=pl-k&gt;@param&lt;/span&gt; aFailureFn&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        A function called if the expected value isn&amp;#39;t found on the clipboard&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; *        within 5s. It can also be called if the known value can&amp;#39;t be found.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt; */&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-simpletest_excerpt-js-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-v&gt;SimpleTest&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-en&gt;waitForClipboard&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-k&gt;function&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-s1&gt;aExpectedVal&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;aSetupFn&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;aSuccessFn&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;aFailureFn&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;span class=pl-kos&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/423041/raw/7a4476140a1a6489e4d5887e118eabf9881334c8/SimpleTest_excerpt.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/423041#file-simpletest_excerpt-js&quot;&gt;
          SimpleTest_excerpt.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-waitforclipboard_sample-js&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-javascript  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;JavaScript&quot; data-tagsearch-path=&quot;waitForClipboard_sample.js&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;function&lt;/span&gt; &lt;span class=pl-en&gt;test&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;waitForExplicitFinish&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c&gt;// the value we expect to be on the clipboard&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;const&lt;/span&gt; &lt;span class=pl-c1&gt;EXPECTED_VAL&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;foo&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c&gt;// function that will set up the clipboard&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;function&lt;/span&gt; &lt;span class=pl-en&gt;setup&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-v&gt;Cc&lt;/span&gt;&lt;span class=pl-kos&gt;[&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;@mozilla.org/widget/clipboardhelper;1&amp;quot;&lt;/span&gt;&lt;span class=pl-kos&gt;]&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-en&gt;getService&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-v&gt;Ci&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;span class=pl-c1&gt;nsIClipboardHelper&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;.&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-en&gt;copyString&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-c1&gt;EXPECTED_VAL&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-c&gt;// function that will be run after the clipboard has EXPECTED_VAL&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;function&lt;/span&gt; &lt;span class=pl-en&gt;nextTest&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt; &lt;span class=pl-kos&gt;{&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-c&gt;// do some other testing here if you want&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-en&gt;finish&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L20&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;20&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC20&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;waitForClipboard&lt;/span&gt;&lt;span class=pl-kos&gt;(&lt;/span&gt;&lt;span class=pl-c1&gt;EXPECTED_VAL&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;setup&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;nextTest&lt;/span&gt;&lt;span class=pl-kos&gt;,&lt;/span&gt; &lt;span class=pl-s1&gt;finish&lt;/span&gt;&lt;span class=pl-kos&gt;)&lt;/span&gt;&lt;span class=pl-kos&gt;;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-L21&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;21&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-waitforclipboard_sample-js-LC21&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-kos&gt;}&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/423041/raw/7a4476140a1a6489e4d5887e118eabf9881334c8/waitForClipboard_sample.js&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/423041#file-waitforclipboard_sample-js&quot;&gt;
          waitForClipboard_sample.js
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Secret Diary of Steve Jobs : Guest blogger: John Gruber]]></title><description><![CDATA[Update: Oh right, FSJ is entirely satire. I feel dumb, but I’ll leave the original post intact. I still stand by the first paragraph. I used…]]></description><link>https://zpao.com/posts/the-secret-diary-of-steve-jobs-guest-blogger-john-gruber/</link><guid isPermaLink="false">https://zpao.com/posts/the-secret-diary-of-steve-jobs-guest-blogger-john-gruber/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Oh right, FSJ is entirely satire. I feel dumb, but I’ll leave the original post intact. I still stand by the first paragraph.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I used to like &lt;a href=&quot;http://daringfireball.net/&quot;&gt;John Gruber&lt;/a&gt; a lot. I feel like he’s gotten pretty arrogant and a tad ignorant over the past few years. He’s written some great articles and had many insightful comments. He’s also written some FUD. Nowadays I kind of think he’s an ass. Keep in mind, I’m a big Mac fan, have multiple Mac products. But I try to keep my viewpoint a bit rounded and not let myself get completely blinded by the light.&lt;/p&gt;
&lt;p&gt;With this coming from FSJ, I’m not 100% sure this is actually John Gruber, but regardless, it makes me feel even more strongly that he’s an ass.&lt;/p&gt;
&lt;p&gt;Here’s a choice quote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;… and OS X Snow Leopard is the top-selling operating system on Amazon for the 125th straight week, so you tell me who’s right and who’s wrong. Yeah. I thought so. You’ve just been destroyed. Crushed. Embarrassed and humiliated, ground to dust under the heel of my boot. Be gone now, you Windows loving FUD machine. You ugly Apple hating troll. You porn-loving Android user, pleasuring yourself with your Nexus One.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Even including pre-sales, that means Snow Leopard has been on sale for 2.5 years! I’m calling shenanigans on that.&lt;/li&gt;
&lt;li&gt;Go ahead and take a look at the &lt;a href=&quot;http://www.amazon.com/gp/bestsellers/software/229653/ref=pd_ts_sw_nav&quot;&gt;“Best Sellers in Operating Systems” page&lt;/a&gt;. Is it just me or does that say Windows 7?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So Mr. (Fake?) Gruber. &lt;em&gt;You&lt;/em&gt; are wrong.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Evolution of Privacy on Facebook]]></title><description><![CDATA[This is by far the best visualization I’ve seen on how Facebook’s privacy has changed over time. (via @fligtar, @joedrew, @tieguy)]]></description><link>https://zpao.com/posts/the-evolution-of-privacy-on-facebook/</link><guid isPermaLink="false">https://zpao.com/posts/the-evolution-of-privacy-on-facebook/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;This is by far the best visualization I’ve seen on how Facebook’s privacy has changed over time.&lt;/p&gt;
&lt;p&gt;(via &lt;a href=&quot;http://twitter.com/fligtar/status/13573156229&quot;&gt;@fligtar&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/joedrew/status/13571134468&quot;&gt;@joedrew&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/tieguy/status/13570338427&quot;&gt;@tieguy&lt;/a&gt;)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Problem Report: Cat]]></title><description><![CDATA[Fact: Cats make things happen that you never expect. Like crash your computer. See also.]]></description><link>https://zpao.com/posts/problem-report-cat/</link><guid isPermaLink="false">https://zpao.com/posts/problem-report-cat/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/1c978e23e21cb0832c5c3afdc6d0cc88/49217/problem-report-cat.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 71.42857142857143%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAADDUlEQVQ4y62SyW/bRhTG2WuBoocUCOBFbU424G4o5EV1ckjqukci/6iBWlYdy5YjanEcSzT3TSJlkqIWSlbiMDQoUhy9YkZwGrTXEvj4zZvlNzPvDUVR1FeH+aOL1+VKwjDM3fn566Dw16ugcHwSMOWz4CifDw4ODoLDw8Mgn88HR4VCUCqViMrlcsAwzIdKpRIVi8X2xsbGY4qiqG84jtM9zwPHcaDVNqF+2YDamwYoigqSJIMgCNAyDJAVBRRZBlEQQZZlsG2brOl2u6Cq6mR9ff0JBj6q1+syx3FwzbKpLEtIkWWEned5JIoiEgSBtLHbto0cx0Gu6xC3bTt1XRdv4K+trX1HgIIgKGyzCQxTQ7KsgiwrYBgtGA598H0fBoMBhOE9pOkMkiSB2WwGUTSFKIqwUBzHYJrmKJPJLICiICgYIAgiurpiodm8Bp4XQdN00PUWaJoBpmmBYbSh3bbIZr4/gslkAuPxLXr3/u5fQFFQul0PPM9D4/EYbm8nkCJETpIkM+KLdkKET/TZh/DPsqzRysrKAsjzvIITbJom6vX6EIYhmTmfzz9f+CnGnqbpf4Crq6v/AEVBgmqlhqrVGjQaLLAsB42rJrx924DLyyvAqbhmOZKOZoMl1x4MhtDr9dHd3QfodDqj5eXlBVASRWU4GILreshxXHBsBzqdG3DdLti2A5bVAcvCsbfod1wYjcZEw6GPcIFubm5GS0tLD1XmlTiJcW7SOI7nWNPpdB7H0/lDnCSLviiKiO7v78l4EsfpLEmg1Wr5mcy3D1WW9K7TA01TQNNU/EjBMHTQNR00VSPVVhUV5wn6/T6R5/VA1XSQZAVUzcBzJj//9OMCWGXqTZ5VZ6en10HxhAuLJ3x4WuTCaqUWlstMWCqdhxcXF6EkSaFhGESKqobHJ2fhn/njj4VXZ9NqrW7/8P0GAX6Z3fzleW535+XO9jMaa3vnGb29/ZTO5XJ07tcc8d3dXeLZbJbOZjfpra0teu+3F/T+/h79x+97Lzc3s/sURX2NgRQA/C+iqC+ovwH+uFAG5EtuSgAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;problem report cat&quot;
        title=&quot;problem report cat&quot;
        src=&quot;/static/1c978e23e21cb0832c5c3afdc6d0cc88/8c557/problem-report-cat.png&quot;
        srcset=&quot;/static/1c978e23e21cb0832c5c3afdc6d0cc88/4edbd/problem-report-cat.png 175w,
/static/1c978e23e21cb0832c5c3afdc6d0cc88/13ae7/problem-report-cat.png 350w,
/static/1c978e23e21cb0832c5c3afdc6d0cc88/8c557/problem-report-cat.png 700w,
/static/1c978e23e21cb0832c5c3afdc6d0cc88/49217/problem-report-cat.png 701w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Fact: Cats make things happen that you never expect. Like crash your computer. &lt;a href=&quot;http://twitter.com/zpao/status/10605017612&quot;&gt;See also&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[A Followup to Flash on Windows]]></title><description><![CDATA[Last week I went on a little rant about Adobe’s inane method of installing Flash on Windows (in Firefox). I received a few emails from…]]></description><link>https://zpao.com/posts/a-followup-to-flash-on-windows/</link><guid isPermaLink="false">https://zpao.com/posts/a-followup-to-flash-on-windows/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Last week I went on a &lt;a href=&quot;/posts/how-to-install-flash-on-windows-or-a-cleveland-steamer-is-a-better-experience&quot;&gt;little rant&lt;/a&gt; about Adobe’s inane method of installing Flash on Windows (in Firefox). I received a few emails from people pointing out the much better way of installing Flash - just download the .exe installer! Sounds simple, but good luck actually finding that on Adobe’s website (while using Firefox anyway - they do UA sniffing to make you use the extension). I’d known that this existed and this was exactly what I was expecting. I just couldn’t find that page with minimal effort, so I thought I’d rant.&lt;/p&gt;
&lt;p&gt;I was also directed towards the &lt;a href=&quot;http://support.mozilla.com/en-US/kb/Installing+the+Flash+plugin&quot;&gt;Installing the Flash Plugin article&lt;/a&gt; on the Mozilla Support website. The support moderators have dealt with the experience I had and spent a lot of time getting the support article right.&lt;/p&gt;
&lt;p&gt;That article explain 2 methods of installing Flash, neither of with involves Adobe DLM:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Flash through the missing plugin dialog. This involves simply going to &lt;a href=&quot;http://www.adobe.com/software/flash/about/&quot;&gt;a page that requires Flash&lt;/a&gt; (without the usual JS fallback, ie. not YouTube) and getting prompted by Firefox to install Flash for you.&lt;/li&gt;
&lt;li&gt;Installing via the .exe installer. There is a &lt;a href=&quot;http://get.adobe.com/flashplayer/thankyou/?installer=Flash_Player_10_for_Windows_-_Other_Browsers&quot;&gt;direct link to the page on Adobe’s site&lt;/a&gt; where you can download the actual installer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So there are sane ways to get Flash installed. Adobe just doesn’t promote them.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[How to Install Flash on Windows OR A Cleveland Steamer is a Better Experience]]></title><description><![CDATA[I got a 2nd computer at work which I’ve installed Windows 7 onto. So I wanted to finally see the Out Of Process Plugins coming in Firefox…]]></description><link>https://zpao.com/posts/how-to-install-flash-on-windows-or-a-cleveland-steamer-is-a-better-experience/</link><guid isPermaLink="false">https://zpao.com/posts/how-to-install-flash-on-windows-or-a-cleveland-steamer-is-a-better-experience/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I got a 2nd computer at work which I’ve installed Windows 7 onto. So I wanted to finally see the &lt;a href=&quot;http://www.mozilla.com/en-US/firefox/3.6.4/whatsnew/#oopp&quot;&gt;Out Of Process Plugins coming in Firefox 3.6.4&lt;/a&gt;. It’s a new computer, so I still need to install Flash. No problem, right? &lt;em&gt;Wrong!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Pretend for a moment that a helpful Adobe customer service agent is helping your mother install Flash:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You need Flash! Go download it.&lt;/li&gt;
&lt;li&gt;Oh and by the way, we’re going to trick you into installing some McAffee product that you don’t want! I mean, we’re not tricking you, we’re helping you…&lt;/li&gt;
&lt;li&gt;Oh you’re using Firefox? We have an &lt;em&gt;awesome&lt;/em&gt; way of installing Adobe products: an extension! You know that way you normally install things on a Windows computer, fuck it! Trust us, this is &lt;em&gt;wayyyy better&lt;/em&gt;!&lt;/li&gt;
&lt;li&gt;Ok, so since we’re not doing this like you would expect, you’re probably confused by what’s happening now. So we’re going to give you a link to a &lt;a href=&quot;http://www.adobe.com/products/reader/dlm/firefox_steps.html&quot;&gt;page that’s going to make you more confused&lt;/a&gt;! Oh yea, we’re going to make you edit Firefox options that you didn’t know existed. We’re also going to show you instructions for an old version of Firefox (we know, Firefox 2 came out 4 years ago, but it’s still awesome!), so those pictures don’t match up with what’s actually happening to you. Oh and one more thing. We know you’re installing Flash, but these instructions are for Adobe Reader. I mean, they’re the same, so that big title that says “Adobe Reader Installation Instructions” shouldn’t confuse you at all. If it does, you’re dumb!&lt;/li&gt;
&lt;li&gt;Our bad, just click that ‘Allow’ button up at the top of Firefox, but under the tabs. It’s a little yellow. It’s really easy to see. Found it yet? No? That’s cool, I guess we didn’t explain this very well. Moving on.&lt;/li&gt;
&lt;li&gt;Sweet, so now we’re installing an extension! WOOOOO!! It’s called ‘Adobe DLM’, not Flash. Oh you didn’t read the fine print? Yea we said we might use the Adobe Download Manager, so we’re doing that. But we didn’t actually want to say ‘Download Manager’ when you were installing - we thought that might get confusing.&lt;/li&gt;
&lt;li&gt;Right, so since this is a Firefox extension, we’re going to need you to restart Firefox. I mean, we needed to do that anyway, so let’s just get it out of the way. Go ahead, you definitely want to do that. BUT we’re going to make you figure that out yourself. Oh? You didn’t notice that little bar in Firefox that said you need to restart? Oh well. Find it and press it. We’re almost done now!&lt;/li&gt;
&lt;li&gt;So now you’ve restarted Firefox, you get an &lt;em&gt;awesome&lt;/em&gt; Windows alert asking if you want to let Adobe DLM make changes to your computer. You definitely want to press ‘Yes’. Still with us? Ok, so just let Adobe Download Manager do it’s thing (yes, DLM is an abbreviation for ‘Download Manager’, you didn’t figure that out on your own?).&lt;/li&gt;
&lt;li&gt;And we’re done!&lt;/li&gt;
&lt;li&gt;By the way, we’re just going to leave this extension installed. That way when we want to fuck you in the ass, we can. Have a nice day ;)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;FUCK YOU ADOBE!&lt;/strong&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Muni Death Spiral]]></title><description><![CDATA[… Muni spends more to operate its vehicles than virtually any comparable transit agency. For every mile Muni runs a bus in this city, it…]]></description><link>https://zpao.com/posts/the-muni-death-spiral/</link><guid isPermaLink="false">https://zpao.com/posts/the-muni-death-spiral/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;… Muni spends more to operate its vehicles than virtually any comparable transit agency. For every mile Muni runs a bus in this city, it spends $19.21; comparable agencies nationwide pay between $10 and $13. For every mile Muni runs a light-rail vehicle, it throws down $24.37; comparable rail services spend between $12 and $22.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Those are frightening numbers.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[JAQK Wine Cellars' Bottles]]></title><description><![CDATA[JAQK Wine Cellars has the most fantastic wine bottle design I’ve seen. The High Roller literally has a poker chip in the bottle. It’s not…]]></description><link>https://zpao.com/posts/jaqk-wine-cellars-bottles/</link><guid isPermaLink="false">https://zpao.com/posts/jaqk-wine-cellars-bottles/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/de4f0652009f7bc3464ef5bb849bf44d/4d08a/jaqk.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 56.57142857142857%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAACqklEQVQozwGfAmD9APv7746NiNvb0Nra0MvMwvHx5rq5sfj47MbGveno3drZz8jIv/X16rKzqvj47MfHvuXl2+Li2MjIv/398AD+/vJ3dnLe3tOkpJ6Li4bm5tthYV34+Oxtb23Ky8KvrqeEhH7y8uZYWFb8/PBrbGrFxb28vbVvcW7///sA8/PoRkZExsa+oKCaiYmE4OHWTE1L8PHmyL2i8ezZnJ2ZeHhz7u7jSEhG6+zjyL6k4d3M39vJxrui+/zzAK2upgoKClZXU1FQTzAwL3h2cBANCqaik//otvLlvzw9PCEhIHNzbwAAAJGOgf/stvTmvfTlvffhrfXz4gCVlY4zMy9EREEzMzIbHR9nWk+LbVGJg29zcmOPindMTEY3ODY+PToVFhhtYVPny5j76bfz7L/56rT38NgAmJiRAAAANTUzR0ZEKSstdGVWnnZZj4V2Tk9GeHVnhHducGZiUk9MGh4hbmhdxZ5z582h6N6z6tmk+PLbAJqakgAAADg4Nz4+PSUmJ1xXTUs9LZSNesS7l8G6mmlCPlk0NGlkYC0vL3JkVciUZtS4jencsNnHl/bx3ACdnZYAAAA+Pjw4ODYmJiZkYFlIQz+hmIL//8fw67lNSUdEQ0FaWVYGBwl4cGK/nXPbzKP/8sD146v3894AnZ2WAAAAOzs5MzMyIyMiQUE+AAAAj4d0/+GW6diiHhscGRkYRUVBAAAAf3ho4LFs6NWd6tSe7NKM8u/bANzc0aCgmby8tLW0rbCwqb29tJ2dmNTRwvXnwu/myrGyq6+vqMPDuqKjndPQwfXmwvHoy+vgxOvfvfPy4gD6+u7///f9/fL5+e37++/8/PD///L5+e36+e36+e3+/vP///T7++////T7++/39u34+e/7+O38+O349+yzm5JrfEhG2wAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;jaqk&quot;
        title=&quot;jaqk&quot;
        src=&quot;/static/de4f0652009f7bc3464ef5bb849bf44d/8c557/jaqk.png&quot;
        srcset=&quot;/static/de4f0652009f7bc3464ef5bb849bf44d/4edbd/jaqk.png 175w,
/static/de4f0652009f7bc3464ef5bb849bf44d/13ae7/jaqk.png 350w,
/static/de4f0652009f7bc3464ef5bb849bf44d/8c557/jaqk.png 700w,
/static/de4f0652009f7bc3464ef5bb849bf44d/4d08a/jaqk.png 709w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jaqkcellars.com/&quot;&gt;JAQK Wine Cellars&lt;/a&gt; has the most fantastic wine bottle design I’ve seen. The &lt;a href=&quot;http://jaqkcellars.com/wine-jaqk-cellars-wine-collection-napa-valley-sonoma-coast/high-roller&quot;&gt;High Roller&lt;/a&gt; literally has a poker chip in the bottle. It’s not all just good looks though, it’s also pretty delicious wine.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[On Rude Recruiters]]></title><description><![CDATA[Recruiters are part of how the world works. For the most part, I don’t mind being contacted by them. They’re doing their job. However, I do…]]></description><link>https://zpao.com/posts/on-rude-recruiters/</link><guid isPermaLink="false">https://zpao.com/posts/on-rude-recruiters/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Recruiters are part of how the world works. For the most part, I don’t mind being contacted by them. They’re doing their job. However, I do mind when they lack manners. I probably shouldn’t complain that I’m being contacted, but the lack of manners is one of my biggest pet peeves so I’m bitching. Here’s a few recent examples.&lt;/p&gt;
&lt;p&gt;Last month I got one that included:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If for some reason you are not interested …&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think it’s a bit presumptuous to assume I would be interested. It’s probably a form footer, which doesn’t make it any better.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Currently I am crazy searching for 4 positions in the bay.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the first sentence from somebody I haven’t ever talked to. No “Hello”, no “My name is _____ and I’m reaching out to you because _____“. Also, you’re “crazy searching”? Really?&lt;/p&gt;
&lt;p&gt;Earlier today I had somebody call my work extension (which is not in any public place that I know of, nor have I given it to anybody outside the company). How did she get my number? Not only that, but she flat-out lied about what is on my LinkedIn profile:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I actually came across your LinkedIn profile and um… I see blatantly there that you’re um… um… in a position to look for something new.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Go ahead and look at &lt;a href=&quot;http://www.linkedin.com/in/pauloshannessy&quot;&gt;my profile&lt;/a&gt;. If you see anything there that says I’m interested in something new, let me know so I can remove it. I have zero plans to leave Mozilla.&lt;/p&gt;
&lt;p&gt;Obviously not all recruiters are rude. I like to think we have an awesome recruiting team at Mozilla, and I’ve been contacted by very polite people. I remember the nice ones and I’ve even reached out to the some when friends have been looking for positions.&lt;/p&gt;
&lt;p&gt;So recruiters, here are some simple rules for contacting people:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Say some sort of greeting.&lt;/li&gt;
&lt;li&gt;Introduce yourself, let me know where you work.&lt;/li&gt;
&lt;li&gt;Tell me how you got my name/email/phone number, etc.&lt;/li&gt;
&lt;li&gt;Then tell me about the awesome position that you think I’m qualified for and will love.&lt;/li&gt;
&lt;li&gt;DON’T MAKE SHIT UP (especially about me, I mean seriously)&lt;/li&gt;
&lt;li&gt;You’re going to say “if you know anybody else who might be interested please forward this along” or something along those lines. We all know it.&lt;/li&gt;
&lt;li&gt;If you’ve done the above, I’ll respond in a similarly polite fashion and maybe forward the position on to somebody who might be looking for a job.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://freelancewritinggigs.com/businesstips/wp-content/uploads/2009/07/Dewey-Bridge-Fire.jpg&quot;&gt;This is a picture of a burning bridge.&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Cat With Hands]]></title><description><![CDATA[It’s incredibly well done but as said here: fucking unsettling. If you nightmare easily, don’t watch it before bed, especially if you have a…]]></description><link>https://zpao.com/posts/the-cat-with-hands/</link><guid isPermaLink="false">https://zpao.com/posts/the-cat-with-hands/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/n4PR9NZlAB4?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;It’s incredibly well done but as said &lt;a href=&quot;http://www.reddit.com/r/WTF/comments/bom8g/the_cat_with_hands_unsettling/c0nseoo&quot;&gt;here&lt;/a&gt;: &lt;em&gt;fucking unsettling&lt;/em&gt;. If you nightmare easily, don’t watch it before bed, especially if you have a cat.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Rise & Fall of Courant News]]></title><description><![CDATA[I’m only a couple months late with this… Hot on the heels of the announcement that CoPress was shutting down, Max Cutler announced the end…]]></description><link>https://zpao.com/posts/the-rise-fall-of-courant-news/</link><guid isPermaLink="false">https://zpao.com/posts/the-rise-fall-of-courant-news/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’m only a couple months late with this… Hot on the heels of the &lt;a href=&quot;http://www.copress.org/2010/02/16/copress-is-closing-down-operations/&quot;&gt;announcement that CoPress was shutting down&lt;/a&gt;, Max Cutler announced the &lt;a href=&quot;http://www.maxcutler.com/2010/02/21/courant-no-longer&quot;&gt;end of the Courant News project&lt;/a&gt;. His post is a good read, and his blog in general has some great insight into the technology behind Courant. If you’re at all interested in the future of online journalism, I highly suggest it. Since I have yet to blog about &lt;a href=&quot;http://www.courantnews.com/&quot;&gt;Courant News&lt;/a&gt;, I feel like I must, so here’s the story.&lt;/p&gt;
&lt;p&gt;Courant News was an online newspaper project started in the fall of 2008. It was started by &lt;a href=&quot;http://www.maxcutler.com/&quot;&gt;Max Cutler&lt;/a&gt;, &lt;a href=&quot;http://rsbaskin.com/&quot;&gt;Robert Baskin&lt;/a&gt;, and myself out of our frustration with existing college newspaper technologies. Combined, we had ~8 years of working on college newspaper websites. Max and Rob both worked at the &lt;a href=&quot;http://www.yaledailynews.com/&quot;&gt;Yale Daily News&lt;/a&gt; and I worked for The Carnegie Pulse (now dead and without a domain). We both worked on custom built PHP back-ends. Robert had helped write the YDN one, while I inherited TCPulse’s (and had been wanting to rewrite it for years). Both worked, but were a bit rigid for the needs of an online newspaper.&lt;/p&gt;
&lt;p&gt;We started this project and settled on &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; as a technology choice. I was a Rails guy, while Max was the Django advocate. We chose Django because of it’s journalism roots, my admission that I was going to have less time, and the fact that this really was Max’s project. After I got to play with Django, I think it was the right choice for the project. The ability to have separate “apps” was pretty awesome. And the built in admin app (which I thought was dumb at first) turned out to be pretty essential. All-in-all I have a lot of respect for &lt;a href=&quot;http://www.youtube.com/watch?v=PLUS00QrYWw&quot;&gt;DJ Ango&lt;/a&gt;, and as the RailsEnvy guys said, “If it wasn’t for Rails I’d probably be programming Django right now.”&lt;/p&gt;
&lt;p&gt;We talked a lot via Skype about various things and within a few weeks were hacking away. We had a basic version running pretty quickly - it doesn’t take much to make something that serves content. We had various architecture discussions (hosted SASS? one large app with domain handling vs a separate instance per hosted site, etc), all of which were awesome to have. It felt great to be making something and talking with smart and passionate people.&lt;/p&gt;
&lt;p&gt;Probably the best part (technologically) was the idea of the “get” tag. I won’t explain it too much here, but in short it was a way to make Django’s template system even easier to use for designers. We were building this so that not-so-technically-inclined newspaper editors could make quick layout edits in relatively sane way. If you’re interested, &lt;a href=&quot;http://docs.courantnews.com/ref/core/gettag.html&quot;&gt;read more in the docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Eventually we got to really thinking about the viability of the project from a business stand point. It was now early 2009. I was getting ready to start full-time at Mozilla, Rob was going to be starting at Microsoft in a few months, and so we really had to evaluate where it was going. There was a legitimate concern about non-competes (more so for Rob), not to mention time constraints. There was also the issue about how we would make money. We crunched the numbers and it wasn’t convincing enough to risk losing our well-paying jobs.&lt;/p&gt;
&lt;p&gt;So we decided to open source the project. We talked with the CoPress people and with college newspaper editors and developers around the country. There was certainly interest in using such a project. Especially with the whole Knight Foundation sponsored &lt;a href=&quot;http://www.populousproject.com/&quot;&gt;Populous Project&lt;/a&gt; (which was supposed to be open source and awesome) going nowhere. The problem though is that there aren’t many people actually interested in working on the project.&lt;/p&gt;
&lt;p&gt;So we put the code out there exactly 1 year ago. I really didn’t have a whole lot of time to keep going, so Max and Rob continued to work on it, getting it ready to power The Yale Daily News. Originally targeted for late spring 2009, that slipped to the beginning of the fall semester. Max deserves a huge amount of credit here. While it was still using the stock Django admin, it was powering a major college newspaper. Not just powering, but &lt;a href=&quot;http://www.maxcutler.com/2009/09/23/keeping-courant-with-annie-le-coverage&quot;&gt;standing up to a huge spike during a breaking nation news story&lt;/a&gt; and allowing editors to do things they hadn’t been able to do before.&lt;/p&gt;
&lt;p&gt;Still though, nobody else was working on it. Max and Rob had continued doing some additional work, but with Max’s term ending at YDN and Rob working full-time, it was getting unreasonable. So Max and Rob made the decision to stop working on it and just let it run free.&lt;/p&gt;
&lt;p&gt;A lot of hard work went into Courant News. If this were several years ago, I’d still be working on it, but I think in the end, we all did what we needed here. It was fun while it lasted.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Shaver Facts]]></title><description><![CDATA[I had absolutely nothing to do with shaverfacts.com. Absolutely nothing.]]></description><link>https://zpao.com/posts/shaver-facts/</link><guid isPermaLink="false">https://zpao.com/posts/shaver-facts/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/12daa24275664758760d5b95f0d739c9/27b7a/shaver-facts.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 106.85714285714285%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEP0lEQVQ4y5WUbUxbVRjHL9LE+GEfnDGaxWRgNH6Q9wCrLC4RZckGjE0CNixuIMmYEJgxWRibbMnKNmCigKKzDDbQTUfHS+mLo3R0BAqMFoRSWgZD2ttW+eAy4yjt7ek9f3MvfMAYl/okT57knOf/e85J/ucwycnJ22739DVqtLo2g2HwO6PRqDAa7yn0er1C1den0Gq1Co1ao1Cp+hVK5W1Fd3e3QugxmUyKkZERsY6aTFcNd4daTlVW7mCio6Oj2tra0dHRgc7OTmi1WvT390OpVIqpVqvFFNb0ej0GBgagUqmg0+mg1eqg0aih1ujQfq0T2Zn7pExCfHzU3Nzc4+XlZUxZLMHOjg6i0WjI8vJDMj9vI1arlTjsdmK3z5Pe3h6i0+nIysoKMZvNZHp6mjgcdmKz2XiLxbJeVlaWykil0qhgMPgXAFhnZ/i4uDhaVFRES8sqaFXVaVp/+XN6rKSUdnV104aGRlpcXEIrKk7QSxcv0qNHC+n9STMVtJRSrq6ubheTmpoatba2JgIfPfpDmASrdRaq3lsYvKPC5LgRhoE+mM3DWLBbMDY6iN7uG5ifn8f4+AQ8Hq8I9Pl8nFwu3wCur6+LQAD8ZkXvTyfR3piDmy15+LE5H1eqs/FDUy76W2Uw9nyytVUEBgIBrqam5p9AfiMQJEFcbTmC8ydT0Ho5A+qqvejLS0VrdQ7cU+fBzjQjRAII8VTQ/DeQUspvgEMoLnwX+/e8BM2tcjysk+GXgl1w32lA8Ike3ONhUBrCpubpwI1tioaqXJi+ycT3XdX49HA6VFmvQ3mpAHcbZBj6qhh80B8eUKgkRPBF5UFUygvA7HsfLyQmwVZdgOMfZuGsLBbGM++BBHzhA9c5DhdO7Mebhblg3t6LyN3voLXkAK4dP4j0zLdw78KB/wf0c0G0t36G2IpjYBKleCYjG/V5u9FzKAZvpMRAXZMLPvAkfCDHcWi/fg6vfnQETGIans/Jh74oDTezXsOzr+yAsr4YCK2LxgnvhAE/vv72NF7O/wBM0h7EFxzG1KlD6JClgNm+HZXnPhbGIkTDBFISwBl5KV7MSAeTnIadMhm+rKvA9StnwTAMpNnpAA2GaxsqGBHLtglYTT+jR6eG/oEDnt8eYHSoH03NTdAPqERrCZ5+KlB4JsK+1+uF2TKNOZsdc7OzmL4/ibGxCTgWFrG6ugqrdQ6s24OA3w9CyL+BPp/vz01giOM4fmHBwQ8PD/MjIyO8yWTiZ2Zn+fHxcX5lZYV3uZy8wWDgZ2ZmeOEzIYSIT8bv9/vlcrn4fUUTQvzYEl6vB06nU0yWdcHtdsPr8cDlcsHldIo3YFn3VolwGNTW1kqZ2NjYnUtLSw6WZX93Op1ul8vlDjdYlnULGpZlvYuLi7+Wl5cnMQzDPCeRSGIkEkmiRCJJiIyMTIiIiAgrhV5BI2gjIiLiGIbZ9jd4iNF5HcGbdAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;shaver facts&quot;
        title=&quot;shaver facts&quot;
        src=&quot;/static/12daa24275664758760d5b95f0d739c9/8c557/shaver-facts.png&quot;
        srcset=&quot;/static/12daa24275664758760d5b95f0d739c9/4edbd/shaver-facts.png 175w,
/static/12daa24275664758760d5b95f0d739c9/13ae7/shaver-facts.png 350w,
/static/12daa24275664758760d5b95f0d739c9/8c557/shaver-facts.png 700w,
/static/12daa24275664758760d5b95f0d739c9/27b7a/shaver-facts.png 804w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I had absolutely nothing to do with &lt;a href=&quot;http://shaverfacts.com&quot;&gt;shaverfacts.com&lt;/a&gt;. Absolutely nothing.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Fuckin' Style. And Futura. And HTML5.]]></title><description><![CDATA[I’ve been wanting to redesign my blog for a while. Back on the old blog, I still have the same theme as I made a year and a half ago, which…]]></description><link>https://zpao.com/posts/fuckin-style-and-futura-and-html5/</link><guid isPermaLink="false">https://zpao.com/posts/fuckin-style-and-futura-and-html5/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’ve been wanting to redesign my blog for a while. Back on the &lt;a href=&quot;http://zpao.com&quot;&gt;old blog&lt;/a&gt;, I still have the same theme as I made &lt;a href=&quot;/posts/new_design_updates&quot;&gt;a year and a half ago&lt;/a&gt;, which for me is pretty impressive. I tend to redesign at the drop of a hat, work on it for a while, then forget about it. Eventually I’ll spend a day on a completely different design and that’s what I use.&lt;/p&gt;
&lt;p&gt;When I started &lt;a href=&quot;/posts/tumbling-down-the-rabbit-hole-again&quot;&gt;using Tumblr for blogging&lt;/a&gt;, I wanted to make it look slick. But I didn’t have the time, so I went with &lt;a href=&quot;http://www.tumblr.com/theme/1909&quot;&gt;the cleanest pre-made theme I could find&lt;/a&gt;. It worked well, and I was just going to tweak it. But then I decided I wanted to see what the buzz was about HTML5. So I rewrote that theme with the appropriate &lt;code class=&quot;language-text&quot;&gt;&amp;lt;article&gt;&lt;/code&gt;, et al. tags and my own, cleaner CSS. But it didn’t feel right. So I started over with minimal markup with no style, and just played with it. I still drew inspiration from that theme, but that’s ok.&lt;/p&gt;
&lt;p&gt;Anyway, it’s a work in progress. I won’t post about it again, but you may notice things change or break as I tweak it (or add features, like pagination or conversation posts). If you love &lt;a href=&quot;http://static.zpao.com/tumblr/future.css&quot;&gt;clean, structured CSS&lt;/a&gt; with variables, check out &lt;a href=&quot;http://sass-lang.com/&quot;&gt;Sass&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, if you don’t have Futura and you just see Helvetica (or even Arial), I’m sorry. It looks way better for me.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[(Partially) Dropping Support for Firefox 2.0/3.0 Sessions]]></title><description><![CDATA[Note: This does not affect Firefox 3.5 or 3.6 users! Today I landed a patch for bug 551285, which removes support for certain parts of…]]></description><link>https://zpao.com/posts/partially-dropping-support-for-firefox-2-0-3-0/</link><guid isPermaLink="false">https://zpao.com/posts/partially-dropping-support-for-firefox-2-0-3-0/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note: This does not affect Firefox 3.5 or 3.6 users!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Today &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/rev/55b6bc4c0b92&quot;&gt;I landed a patch&lt;/a&gt; for &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=551285&quot;&gt;bug 551285&lt;/a&gt;, which removes support for certain parts of sessions created in Firefox 2.0 and 3.0. &lt;em&gt;This means that if you upgrade directly from 2.0 or 3.0 to Firefox.next (currently 3.7), you will lose some session data.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The data you would lose is limited to the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Form data (2.0 and 3.0)&lt;/li&gt;
&lt;li&gt;Session Cookies (2.0 only)&lt;/li&gt;
&lt;li&gt;Tab XUL Attributes (2.0 and 3.0)&lt;/li&gt;
&lt;li&gt;Session History Post Data (2.0 only)&lt;/li&gt;
&lt;li&gt;Session History Owner (2.0 only)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If losing any of this data particularly bothers you, then it’s as simple as upgrading to &lt;a href=&quot;http://www.mozilla.com/en-US/firefox/firefox.html&quot;&gt;Firefox 3.6&lt;/a&gt; or &lt;a href=&quot;http://www.mozilla.com/firefox/all-older.html&quot;&gt;Firefox 3.5&lt;/a&gt; first. Alternatively, some session management add-ons could update your session file for you (for example, the author of &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/2324&quot;&gt;Session Manager&lt;/a&gt; is updating his add-on to do that).&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Gilbert Gottfried Introduces the Shoedini]]></title><description><![CDATA[Gilbert Gottfried introduces the Shoedini. Until now, the only thing I’ve liked him in was Aladdin.]]></description><link>https://zpao.com/posts/gilbert-gottfried-introduces-the-shoedini/</link><guid isPermaLink="false">https://zpao.com/posts/gilbert-gottfried-introduces-the-shoedini/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;iframe width=&quot;640&quot; height=&quot;480&quot; src=&quot;http://www.youtube.com/embed/LBPAQ6CJvTo?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Gilbert Gottfried introduces the &lt;a href=&quot;https://www.tryshoedini.com/&quot;&gt;Shoedini&lt;/a&gt;. Until now, the only thing I’ve liked him in was Aladdin.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Carnegie Mellon Professor Calculates Real Risk of Driving a Recalled Toyota]]></title><description><![CDATA[Consumers also may want to reconsider parking their recalled Toyotas until repairs have been made. “Replacing driving by walking really…]]></description><link>https://zpao.com/posts/real-risk-of-driving-a-recalled-toyota/</link><guid isPermaLink="false">https://zpao.com/posts/real-risk-of-driving-a-recalled-toyota/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Consumers also may want to reconsider parking their recalled Toyotas until repairs have been made. “Replacing driving by walking really increases the risk of dying,” Fischbeck said. “Walking a mile is 19 times or 1,900 percent more dangerous than driving a mile in a recalled Toyota. Driving while using a cell phone would increase risk much more than the chance of having a stuck accelerator.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I’m of the opinion that this whole thing is being blown way out of proportion. There may well be some problem, but I think that user error is at least partially to blame.&lt;/p&gt;
&lt;p&gt;Another interesting read is this Washington Examiner OpEd: &lt;a href=&quot;http://www.washingtonexaminer.com/opinion/columns/OpEd-Contributor/I-am-not-afraid-of-my-Toyota-Prius-87361597.html&quot;&gt;Theodore H. Frank: I am not afraid of my Toyota Prius&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Tumbling Down the Rabbit Hole (Again)]]></title><description><![CDATA[If you’ve followed my blogging habits, you’ll know that I’ve tried a bunch of different solutions (greymatter,  livejournal, blogger…]]></description><link>https://zpao.com/posts/tumbling-down-the-rabbit-hole-again/</link><guid isPermaLink="false">https://zpao.com/posts/tumbling-down-the-rabbit-hole-again/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;If you’ve followed my blogging habits, you’ll know that I’ve tried a bunch of different solutions (greymatter,  livejournal, blogger, wordpress, etc.) before finally &lt;a href=&quot;http://blarg.zpao.com/&quot;&gt;rolling my own&lt;/a&gt;. Wordpress lasted several years before being retired. Then I tried tumblr. It was a cool concept, but I ended up just pulling in twitter &amp;#x26; photo feeds and that got messy. I finally built my own and have been really happy with it, but I feel like every post there needs to be important — it feels too serious. The other problem I have is that I just don’t have the time to tinker as much as I used to. Having a full-time job is &lt;em&gt;(SURPRISE!)&lt;/em&gt; time consuming. By the time I’m home I just want to relax and get away from my computer. If I want to write something, I just want it to be easy.&lt;/p&gt;
&lt;p&gt;Now I’m back on tumblr with the hopes that I have more fun with it. As &lt;a href=&quot;http://cameronmoll.tumblr.com/post/434902312/new-design-new-host-and-tumblr-how-why&quot;&gt;Cameron Moll said the other day&lt;/a&gt;, I really like the idea of mixing interesting links with full content that &lt;a href=&quot;http://daringfireball.net/&quot;&gt;John Gruber&lt;/a&gt; and &lt;a href=&quot;http://kottke.org&quot;&gt;Jason Kottke&lt;/a&gt; do so well.&lt;/p&gt;
&lt;p&gt;So I’ll be doing just that: sharing cool things, thoughts that are too long for twitter, and maybe some full-length articles. I haven’t decided if I’ll be posting my work-related status reports here (it’s something we do now, but I’ve been terrible about) or if those would be better elsewhere. I’ll make that call… tomorrow.&lt;/p&gt;
&lt;p&gt;I’ve kicked off the fun by &lt;a href=&quot;http://zpao.tumblr.com/post/442212843/my-desktop-makes-me-happy-no-menu-no-icons-on&quot;&gt;showing off my desktop&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[My Desktop Makes Me Happy]]></title><description><![CDATA[My desktop makes me happy. No menu, no icons on the desktop, no dock. Minimal.]]></description><link>https://zpao.com/posts/my-desktop-makes-me-happy/</link><guid isPermaLink="false">https://zpao.com/posts/my-desktop-makes-me-happy/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/zpao/4426175014/&quot; title=&quot;My Minimal Desktop by zpao, on Flickr&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4051/4426175014_3e466c96f4_z.jpg&quot; width=&quot;640&quot; height=&quot;400&quot; alt=&quot;My Minimal Desktop&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My desktop makes me happy. No menu, no icons on the desktop, no dock. Minimal.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Just Released: Always Ask]]></title><description><![CDATA[No, I didn’t mean to press ⌘Q, I just wanted to close that tab. Sure, all I have to do is start Firefox again. You’re right, I didn’t really…]]></description><link>https://zpao.com/posts/just-released-always-ask/</link><guid isPermaLink="false">https://zpao.com/posts/just-released-always-ask/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;No, I didn’t mean to press ⌘Q, I just wanted to close that tab. Sure, all I have to do is start Firefox again. You’re right, I didn’t really need those minutes of my life. Yea, go ahead and install those updates I intentionally was putting off. I probably didn’t lose any important information. Oh wait, Session Restore doesn’t save form data on https sites (read: Bugzilla) by default? &lt;strong&gt;FFFFFFFFFFFFUUUUUUUUUUUUUUUUUU!!!!!!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/55824/&quot;&gt;Always Ask&lt;/a&gt; is an add-on that adds an additional prompt to Firefox when you are quitting. The prompt only shows up if Firefox has determined that you don’t need a prompt. This includes when you have &lt;a href=&quot;http://support.mozilla.com/en-US/kb/Session+Restore&quot;&gt;Session Restore&lt;/a&gt; enabled, if you’ve changed either of the &lt;code class=&quot;language-text&quot;&gt;browser.warnOn*&lt;/code&gt; prefs, or if you don’t have Session Restore enabled &amp;#x26; are closing multiple tabs. There’s probably some other combination of conditions that change the outcome here.&lt;/p&gt;
&lt;p&gt;Since I work on Session Restore, I’ve had it turned on for a long time. In the past I’ve intentionally changed my preferences so that it wouldn’t automatically quit, but that has led to me accidentally setting prefs and disabling the prompt. Then I have the same problem.&lt;/p&gt;
&lt;p&gt;So this extension is pretty simple. It’s currently available in English (en-US) but if you’d like to see it in your language, feel free to &lt;a href=&quot;http://www.babelzilla.org/index.php?option=com_wts&amp;#x26;extension=5271&quot;&gt;help out on Babelzilla&lt;/a&gt;. Code is available &lt;a href=&quot;http://github.com/zpao/alwaysAsk&quot;&gt;on Github&lt;/a&gt; (thanks to hg-git).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farm3.static.flickr.com/2682/4203971167_45d442d2eb.jpg&quot; alt=&quot;Always Ask in action&quot;&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Status Update: November 9, 2009]]></title><description><![CDATA[Not much exciting happened this past week. We had some out-of-towners (beltzner, johnath, and dietrich) down in the Mountain View office. It…]]></description><link>https://zpao.com/posts/status-update-nov-09-2009/</link><guid isPermaLink="false">https://zpao.com/posts/status-update-nov-09-2009/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Not much exciting happened this past week. We had some out-of-towners (&lt;a href=&quot;http://beltzner.ca/mike&quot;&gt;beltzner&lt;/a&gt;, &lt;a href=&quot;http://blog.johnath.com/&quot;&gt;johnath&lt;/a&gt;, and &lt;a href=&quot;http://autonome.wordpress.com/&quot;&gt;dietrich&lt;/a&gt;) down in the Mountain View office. It’s good to see the boss face-to-face every once in a while. Otherwise it was business as usual.&lt;/p&gt;
&lt;h2&gt;What I got done last week:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=522545&quot;&gt;Bug 522545&lt;/a&gt;:&lt;/strong&gt; Third time’s the charm. I finally found an acceptable approach to solving the problem. The problem of… ZOMBIE TABS. Interestingly, this bug is fallout from a different bug I worked on. Read the bug for full details.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=525635&quot;&gt;Bug 525635&lt;/a&gt; &amp;#x26; &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=521233&quot;&gt;Bug 521233&lt;/a&gt;:&lt;/strong&gt; Both of these are needed to get Per Tab Network Prioritization into Firefox 3.6. Bug 525635 was about the test that was randomly timing out on Linux. It’s using the test framework added in bug 521233 (waitforFocus in browser-chrome tests), which obviously is not quite right. &lt;a href=&quot;http://design-noir.de/log&quot;&gt;Dão&lt;/a&gt; is continuing to try to find the right fix, but until then, I’ve worked around the issue in a better way than I was. This should make it OK to land everything needed on branch.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What’s happening this week:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Finish bug 522545. Blockers come first. I already have a large portion of the work done &amp;#x26; have a good start on tests, so this shouldn’t be too much work.&lt;/li&gt;
&lt;li&gt;Land Per Tab Network Prioritization on branch. Not too much involved here, but it has to happen.&lt;/li&gt;
&lt;li&gt;Work on &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=526545&quot;&gt;bug 526545&lt;/a&gt; (Crash reporter still can send wrong URL when crashing during pageload). This is another blocker. The partial solution should be pretty easy and actually dovetails nicely with the work I’m doing for bug 522545. The full solution might be a bit harder, and might not be worth it.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Per Tab Network Prioritization Update]]></title><description><![CDATA[Progress on this was not as fast as I’d hoped it would be. It got stalled behind some other work, going to the CMU job fair, I was poisoned…]]></description><link>https://zpao.com/posts/per-tab-network-prioritization-update/</link><guid isPermaLink="false">https://zpao.com/posts/per-tab-network-prioritization-update/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Progress on this was not as fast as I’d hoped it would be. It got stalled behind some other work, going to the CMU job fair, &lt;a href=&quot;http://twitter.com/zpao/status/5076044119&quot;&gt;I was poisoned&lt;/a&gt;, and I had to figure out how the focus tests work. But that’s enough with the negativity, this is supposed to be good news.&lt;/p&gt;
&lt;p&gt;I finally got all my ducks in row and &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/rev/bbeaa4e518ee&quot;&gt;landed the feature today&lt;/a&gt;! If you don’t remember what the feature does (or never knew), read through &lt;a href=&quot;/posts/per-tab-network-prioritization/&quot;&gt;my original article on it&lt;/a&gt;. While the underlying implementation changed a fair amount, the basic concept is still the same. The only change made is that we adjust the priority instead of just changing it to pre-determined values. By doing it this way, we won’t interfere with an add-on that, for example, gave Gmail a super high network priority.&lt;/p&gt;
&lt;p&gt;We’ve talked about getting this into Firefox 3.6. It’ll need to “bake” a little while on trunk, but it landed cleanly and doesn’t have any compatibility issues, so it should be ok. Then again, &lt;abbr title=&quot;I Am Not A Driver&quot;&gt;IANAD&lt;/abbr&gt;.&lt;/p&gt;
&lt;p&gt;Going along with this, I’ve updated the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/14138&quot;&gt;mozNetworkPrioritizer extension&lt;/a&gt; to reflect the change in compatibility. It should no longer be used with Firefox 3.7a1pre (and beyond). It will interact poorly with the built-in functionality and could lead to some weird priorities. It won’t actually break anything, but there’s no need to use it. I’ll release another update if/when this goes into Firefox 3.6.&lt;/p&gt;
&lt;p&gt;And that’s it. I’ll post again about future landings. Otherwise, I’m going to be working on some session restore blockers and starting another project soon.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Status Update: September 25, 2009]]></title><description><![CDATA[I haven’t updated on the blog recently, so here’s the past 3 weeks all at once. The week of September 7, I was working on a couple blockers…]]></description><link>https://zpao.com/posts/status-update-sept-25-2009/</link><guid isPermaLink="false">https://zpao.com/posts/status-update-sept-25-2009/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I haven’t updated on the blog recently, so here’s the past 3 weeks all at once.&lt;/p&gt;
&lt;p&gt;The week of September 7, I was working on a &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=514751&quot;&gt;couple&lt;/a&gt; &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=497730&quot;&gt;blockers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The week of September 14, I was in Pittsburgh recruiting at the Carnegie Mellon &lt;abbr title=&quot;Technical Opportunities Conference&quot;&gt;TOC&lt;/abbr&gt; (job fair). I also did some work on Per Tab Network Prioritization (&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=514490&quot;&gt;bug 514490&lt;/a&gt;) and a password manager performance bug (&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=492197&quot;&gt;bug 492197&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This past week I worked on a few different things. I finished the password manager bug (which I hadn’t finished because of a non-syntax-error-syntax-error). While helping &lt;a href=&quot;http://www.hskupin.info/&quot;&gt;Henrik&lt;/a&gt; as he was using the storage API, &lt;a href=&quot;http://shawnwilsher.com/&quot;&gt;Shawn&lt;/a&gt; mentioned that one of the methods I used was deprecated (though never explicitly). So I filed &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=518434&quot;&gt;the bugs&lt;/a&gt; and &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/pushloghtml?changeset=5e6a413226d2&quot;&gt;fixed the places&lt;/a&gt; that used the deprecated code (hint: use &lt;code class=&quot;language-text&quot;&gt;executeStep()&lt;/code&gt; instead of &lt;code class=&quot;language-text&quot;&gt;step()&lt;/code&gt; and don’t use &lt;code class=&quot;language-text&quot;&gt;mozIStorageStatementWrapper&lt;/code&gt;). Filing the bugs took longer than fixing them.&lt;/p&gt;
&lt;p&gt;But all of that was unrelated to …&lt;/p&gt;
&lt;h2&gt;Per Tab Network Prioritization Status&lt;/h2&gt;
&lt;h3&gt;Progress&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Made it a JS module. This was advice from &lt;a href=&quot;http://autonome.wordpress.com/&quot;&gt;Dietrich&lt;/a&gt; to cut down on overhead. Since it was only being used from JS code, there was no need to use XPCOM.&lt;/li&gt;
&lt;li&gt;Made it pref enabled. Right now it’s &lt;code class=&quot;language-text&quot;&gt;browser.networkprioritizer.enabled&lt;/code&gt; but that’s easy to change.&lt;/li&gt;
&lt;li&gt;Got a first pass look from Shawn, fixed a few things up.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Next Steps&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Reviews. It seems like Boris is the guy for the job. Still need a browser person. Gavin said sometime after Fennec stuff, Connor said 2 weeks. Dolske said “soon”, so he’ll probably be the lucky guy, even if he isn’t a peer.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Per Tab Network Prioritization]]></title><description><![CDATA[First! (before you get distracted) Try server builds! and the extension! (Firefox 3.5+) The Idea In Summary An idea that’s likely been…]]></description><link>https://zpao.com/posts/per-tab-network-prioritization/</link><guid isPermaLink="false">https://zpao.com/posts/per-tab-network-prioritization/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;strong&gt;First!&lt;/strong&gt; (before you get distracted) &lt;a href=&quot;https://build.mozilla.org/tryserver-builds/poshannessy@mozilla.com-try-11a9e78a8cb5/&quot;&gt;Try server builds!&lt;/a&gt; and &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/14138/&quot;&gt;the extension!&lt;/a&gt; (Firefox 3.5+)&lt;/p&gt;
&lt;h2&gt;The Idea In Summary&lt;/h2&gt;
&lt;p&gt;An idea that’s likely been tossed around before has been brought to the forefront more recently by Firefox’s newest designer &lt;a href=&quot;http://limi.net/&quot;&gt;Alexander Limi&lt;/a&gt;, the idea of &lt;a href=&quot;https://wiki.mozilla.org/Firefox/Projects/Per_Tab_Network_Prioritization&quot;&gt;per tab network prioritization&lt;/a&gt;. The premise of the idea is that what you’re doing right now is more important that what you were doing 5 minutes ago. So to account for the relative importance, we should make what you’re looking at right now load faster. This is really part of a grander scheme to improve perceived performance, but has been reduced to try to make some improvement achievable for Firefox 3.6.&lt;/p&gt;
&lt;h2&gt;In More Detail&lt;/h2&gt;
&lt;p&gt;For this pass, we divided tabs into level of importance (shown in descending order):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Selected Tab in a Focused Window&lt;/li&gt;
&lt;li&gt;Background Tab in a Focused Window &amp;#x26; Selected Tab in a Background Window&lt;/li&gt;
&lt;li&gt;Background Tab in a Background Window&lt;/li&gt;
&lt;li&gt;Any Tab in a Minimized Window&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the most part that makes sense, except for maybe one thing: the 2^(nd) level of importance has 2 items. We decided that (at least in general terms) background tabs in your current window and the focused tab in a background window should get the same level of network priority.&lt;/p&gt;
&lt;p&gt;I then used this ranking to assign relative priorities. You can read more in the implementation section, but otherwise you can skip down to the progress report.&lt;/p&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;p&gt;My original plan was to do this all in browser/base/content (browser.js, tabbrowser.xml), but I ran into a roadblock of some sort. So I wrote it as an extension. After fixing an observer topic, I could do this with relative ease. I set my JS up much like the SessionStore component, observed a number of topics, and listened for a number of events. I was using an observer topic (xul-window-visible) which I was told I shouldn’t use. When a tab was selected it’s network priority gets bumped up and the previously selected tab gets dropped down. Same concept for windows.&lt;/p&gt;
&lt;p&gt;I had to &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=511503&quot;&gt;create some new events&lt;/a&gt; so that I could accurately know which window was focused. Then I brought it into our actual tree instead of living externally as an extension. I cleaned it up a bit, made sure I wasn’t doing to too much, and then finally got around to &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=514490&quot;&gt;filing the bug&lt;/a&gt;. I would go into further detail, but it’s not super interesting. However, if you are interested, &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=398441&amp;#x26;action=diff#a/browser/components/networkprioritizer/src/nsNetworkPrioritizer.js_sec1&quot;&gt;take a look at the code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While there are some implementation details to improve upon (or just straight up change), it’s doing what it was supposed to be doing. At this point I could move this back into browser/base/content but since it’s working, there’s no value in it (until we decide the project is a final go).&lt;/p&gt;
&lt;h2&gt;Progress Report&lt;/h2&gt;
&lt;p&gt;Initial results showed some improvement when loading large groups of tabs. It was most noticeable when loading many tabs from the same site (e.g. the default BBC livemarks). It was somewhat noticeable during a typical (for me) session restore. There was no difference during normal browsing.&lt;/p&gt;
&lt;p&gt;But I’m just one person. I know this is all the way at the bottom of this article, but &lt;strong&gt;PLEASE PLEASE PLEASE use &lt;a href=&quot;https://build.mozilla.org/tryserver-builds/poshannessy@mozilla.com-try-11a9e78a8cb5/&quot;&gt;a try server build&lt;/a&gt;&lt;/strong&gt; (or &lt;strong&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/14138/&quot;&gt;the extension&lt;/a&gt;&lt;/strong&gt;) for a little bit and see if there’s any noticeable difference. Even if it’s just to load up that 500 tab session you’ve been building up over the years.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next Steps:&lt;/strong&gt; Get Feedback! If people use it and the results are positive, this will get more attention (tests, better implementation, checked in). If it turns out that we didn’t quite achieve what we were hoping, then this will get shelved or used as part of another project.&lt;/p&gt;
&lt;p&gt;So again: &lt;strong&gt;&lt;a href=&quot;https://build.mozilla.org/tryserver-builds/poshannessy@mozilla.com-try-11a9e78a8cb5/&quot;&gt;try server builds&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/14138/&quot;&gt;the extension&lt;/a&gt;&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated September 4^(th) with links to the extension&lt;/em&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Oops, I Broke That]]></title><description><![CDATA[While making the “Set as Desktop Background” feature work on Windows CE, I accidentally broke it on other Windows systems. OOOOOPS. This…]]></description><link>https://zpao.com/posts/oops-i-broke-that/</link><guid isPermaLink="false">https://zpao.com/posts/oops-i-broke-that/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;While making the “Set as Desktop Background” feature work on Windows CE, &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=512524&quot;&gt;I accidentally broke it on other Windows systems&lt;/a&gt;. OOOOOPS.&lt;/p&gt;
&lt;p&gt;This went unnoticed for ~3 weeks on the nightlies! It was even in Firefox 3.6 alpha 1. The fix was easy and was checked into trunk today. It’ll be checked into the Firefox 3.6 branch soon.&lt;/p&gt;
&lt;p&gt;I don’t think mistakes like that are too uncommon, especially in areas where testing isn’t automated. We probably have &lt;a href=&quot;https://litmus.mozilla.org/&quot;&gt;Litmus tests&lt;/a&gt; for this so it would have been caught before a final release anyway, but still…&lt;/p&gt;
&lt;p&gt;This just goes to show how important testing is! (And yes, I &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=513349&quot;&gt;filed a bug&lt;/a&gt; to add tests here)&lt;/p&gt;
&lt;p&gt;This also goes to show just how little people use that feature :)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Better Session Restore Behavior]]></title><description><![CDATA[Last week bug 354894 landed to, surprisingly, little fanfare. It’s a big deal though (more so on Windows & Linux). Ever since Firefox…]]></description><link>https://zpao.com/posts/better-session-restore-behavior/</link><guid isPermaLink="false">https://zpao.com/posts/better-session-restore-behavior/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Last week &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=354894&quot;&gt;bug 354894&lt;/a&gt; &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/rev/cd25ab8c2f30&quot;&gt;landed&lt;/a&gt; to, surprisingly, little fanfare. It’s a big deal though (more so on Windows &amp;#x26; Linux).&lt;/p&gt;
&lt;p&gt;Ever since Firefox introduced Session Restore, there has been one particularly annoying problem: if you close your last browser window but accidentally left a non-browser window open (eg. Downloads), then your session was fucked. End of story.&lt;/p&gt;
&lt;p&gt;Well, no longer. Nils Maier (co-author of &lt;a href=&quot;http://www.downthemall.net/&quot;&gt;DownThemAll&lt;/a&gt;) finally got fed up with this problem &amp;#x26; decided to do something about it. This is the first “major” piece of code he’s contributed, so a round of applause.&lt;/p&gt;
&lt;p&gt;A super quick summary of the changes (assuming you have enabled session restore):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you leave a non-browser window open, just close it. Your session will be saved (assuming you aren’t on OS X anyway).&lt;/li&gt;
&lt;li&gt;If you’ve gotten down to that last non-browser window &amp;#x26; realized your mistake, opening Firefox again (e.g. from the start menu) reopens your last closed window.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a tangential comment, it’s things like this that really make me proud to be a part of the Mozilla community. So much of our browser &amp;#x26; platform comes from people like Nils who give their time freely to help make the web a better place.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Minor changes based on email with Nils.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Undo Close Window Has Landed!]]></title><description><![CDATA[I’m happy to announce the landing of Undo Close Window. This adds a menu & keyboard shortcut for reopening your previously closed windows…]]></description><link>https://zpao.com/posts/undo-close-window-has-landed/</link><guid isPermaLink="false">https://zpao.com/posts/undo-close-window-has-landed/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’m happy to announce the landing of &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=394759&quot;&gt;Undo Close Window&lt;/a&gt;. This adds a menu &amp;#x26; keyboard shortcut for reopening your previously closed windows. By default we store 3 windows (though sometimes more due to special cases involving pop-up windows). I’m not going to go into further implementation details (because really, I know you don’t care), but if you’re interested, you can take a look at the patches on the bug.&lt;/p&gt;
&lt;h2&gt;A Little History&lt;/h2&gt;
&lt;p&gt;Sometime before Firefox 2, there were APIs in place for handling recently closed windows. The only thing missing at that point was the front-end work to tie it together. But that never happened. Instead, since the code wasn’t even being published for extensions to use, all that was happening is that we were eating memory for no good reason. So the &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=344642&quot;&gt;code was taken out&lt;/a&gt; late in the 2.0 development cycle.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=360408&quot;&gt;Bug 360408&lt;/a&gt; was added for Firefox 3, making it possible for extensions to be able to implement their own Undo Close Window if they wanted. The description of that bug was unclear though, since it didn’t actually adding any APIs, it just made sure the data was kept around long enough to be saved by somebody else.&lt;/p&gt;
&lt;p&gt;Along comes &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=394759&quot;&gt;Bug 394759 - Add undo close window feature&lt;/a&gt;, which sat untouched for almost a year. After I finished the &lt;a href=&quot;/posts/passwordmgr-storage&quot;&gt;primary project I worked on during my internship&lt;/a&gt;, I still had a week left, so I looked for bugs that I found interesting and allowed me to explore a new area of the code. I found this bug and wrote a “working” patch over a weekend. At that point I was really surprised that we didn’t have this already. We’ve had Undo Close Tab for a while, and this seemed like the sensible next step. In all honesty, somebody familiar with the code involved here could have written that patch in an hour or two. That’s when I found out that I had essentially reimplemented the code that had been taken out and added the front-end to it.&lt;/p&gt;
&lt;p&gt;I worked on it a bit more before I was done interning, then went back to school and time to work on this became increasingly rare. I dropped the ball a bit, and then suddenly we were at string freeze, and this wasn’t done. Fast forward a few months; I graduated &amp;#x26; started working for Mozilla full time. I found out we were still going to have another string freeze for beta 4, so I got my patch out of bitrot and continued working on it. It needed more work and testing by then due to Private Browsing and a few other changes that were made. Strings went in right before we froze them &amp;#x26; the actual patch went in very last minute, and only because code freeze had slipped for other reasons.&lt;/p&gt;
&lt;p&gt;A huge thanks to Simon for all the reviewing he did and help he gave me, &lt;a href=&quot;http://autonome.wordpress.com/&quot;&gt;Dietrich&lt;/a&gt; for the heroic “today is code freeze” review and help, &lt;a href=&quot;http://en.design-noir.de/&quot;&gt;Dão&lt;/a&gt; for fixing the problems that popped up as this had a rocky landing (there was no time to bake on trunk), and &lt;a href=&quot;http://beltzner.ca/mike/&quot;&gt;Beltzner&lt;/a&gt; for approving this without the normal bake time.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Changing Tab Load Order]]></title><description><![CDATA[During the Firefox work week last month, somebody had the idea of loading visible tabs first. It’s one of those things that just make sense…]]></description><link>https://zpao.com/posts/changing-tab-load-order/</link><guid isPermaLink="false">https://zpao.com/posts/changing-tab-load-order/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;During the Firefox work week last month, somebody had the idea of loading visible tabs first. It’s one of those things that just make sense. Since I had done some work in the SessionStore component before, I volunteered to head up this task.&lt;/p&gt;
&lt;h2&gt;What does it do exactly?&lt;/h2&gt;
&lt;p&gt;When you open Firefox using session restore (and through some other paths), you often load several tabs. I know I’ve personally restored windows with 50+ open tabs. It takes a lot of time to load 50 tabs. One optimization that was done previously was to (roughly speaking) prioritize the selected tab, so that it would in theory load first. This change make it so that the tabs visible in your tab strip are also prioritized.&lt;/p&gt;
&lt;h2&gt;How does it work?&lt;/h2&gt;
&lt;p&gt;When we were doing this for just the selected tab, it was extremely simple - we just reordered the array of tab data so that the selected one was first. Now we prioritize a set of tabs (keeping the selected tab first). &lt;em&gt;That’s it.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To be clear&lt;/strong&gt;, this does not &lt;em&gt;actually&lt;/em&gt; improve performance. All it does is make the browser feel faster. But hey, isn’t that just as almost as important.&lt;/p&gt;
&lt;p&gt;Go ahead and try it out. It’s been in Minefield (mozilla-central) for over a week and landed in Shiretoko (mozilla-1.9.1) yesterday.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Is The Tree Green? For Your Desktop]]></title><description><![CDATA[GeekTool is awesome. Is the Tree Green? is awesome. So together they are SUPER AWESOME! isthetreegreen.py + GeekTool by zpao, on Flickr…]]></description><link>https://zpao.com/posts/is-the-tree-green-for-your-desktop/</link><guid isPermaLink="false">https://zpao.com/posts/is-the-tree-green-for-your-desktop/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;a href=&quot;http://projects.tynsoe.org/geektool/&quot;&gt;GeekTool&lt;/a&gt; is awesome. &lt;a href=&quot;http://isthetreegreen.com&quot;&gt;Is the Tree Green?&lt;/a&gt; is awesome. So together they are SUPER AWESOME!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/zpao/3382045487/&quot;&gt;&lt;img src=&quot;https://farm4.static.flickr.com/3588/3382045487_01114ff567.jpg&quot; alt=&quot;isthetreegreen.py + GeekTool by zpao, on Flickr&quot; title=&quot;isthetreegreen.py + GeekTool by zpao, on Flickr&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Python?&lt;/h2&gt;
&lt;p&gt;Historically, I’m a Ruby guy, but I started learning Python for a Django project I’m (barely) working on. So I picked up a book here at work &amp;#x26; decided to flex my pythons a little bit. You can laugh, it’s punny.&lt;/p&gt;
&lt;p&gt;The first pass of this took me ~20 minutes, and I just tidied it up this morning so it would take command line options.&lt;/p&gt;
&lt;h2&gt;How?&lt;/h2&gt;
&lt;p&gt;If you’re reading this and actually need to know whether or not the tree is green, then you should be able to figure it out. GeekTool is OS X only, but there are similar programs for Windows and Linux.&lt;/p&gt;
&lt;p&gt;It’s easy enough to do what I did in the image above. The program can take 2 arguments &lt;code class=&quot;language-text&quot;&gt;treename&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;output&lt;/code&gt;. Run it with &lt;code class=&quot;language-text&quot;&gt;-h&lt;/code&gt; for usage.&lt;/p&gt;
&lt;h2&gt;Code?&lt;/h2&gt;
&lt;p&gt;&lt;div id=&quot;gist84210&quot; class=&quot;gist&quot;&gt;
    &lt;div class=&quot;gist-file&quot; translate=&quot;no&quot;&gt;
      &lt;div class=&quot;gist-data&quot;&gt;
        &lt;div class=&quot;js-gist-file-update-container js-task-list-container file-box&quot;&gt;
  &lt;div id=&quot;file-isthetreegreen-py&quot; class=&quot;file my-2&quot;&gt;
    
    &lt;div itemprop=&quot;text&quot; class=&quot;Box-body p-0 blob-wrapper data type-python  &quot;&gt;

        
&lt;div class=&quot;js-check-bidi js-blob-code-container blob-code-content&quot;&gt;

  &lt;template class=&quot;js-file-alert-template&quot;&gt;
  &lt;div data-view-component=&quot;true&quot; class=&quot;flash flash-warn flash-full d-flex flex-items-center&quot;&gt;
  &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
  
    &lt;span&gt;
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      &lt;a href=&quot;https://github.co/hiddenchars&quot; target=&quot;_blank&quot;&gt;Learn more about bidirectional Unicode characters&lt;/a&gt;
    &lt;/span&gt;


  &lt;div data-view-component=&quot;true&quot; class=&quot;flash-action&quot;&gt;      &lt;a href=&quot;{{ revealButtonHref }}&quot; data-view-component=&quot;true&quot; class=&quot;btn-sm btn&quot;&gt;  Show hidden characters
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/template&gt;
&lt;template class=&quot;js-line-alert-template&quot;&gt;
  &lt;span aria-label=&quot;This line has hidden Unicode characters&quot; data-view-component=&quot;true&quot; class=&quot;line-alert tooltipped tooltipped-e&quot;&gt;
    &lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-alert&quot;&gt;
    &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/template&gt;

  &lt;table data-hpc class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip data-tagsearch-lang=&quot;Python&quot; data-tagsearch-path=&quot;isthetreegreen.py&quot;&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L1&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;1&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;#!/usr/bin/env python&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L2&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;2&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L3&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;3&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# Based on Is the Tree Green? &amp;lt;http://isthetreegreen.com&amp;gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L4&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;4&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# Original Code &amp;amp; Concept by Justin Dolske &amp;lt;dolske@mozilla.com&amp;gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L5&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;5&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-c&gt;# Ported to Python by Paul O&amp;#39;Shannessy &amp;lt;paul@zpao.com&amp;gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L6&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;6&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L7&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;7&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L8&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;8&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;import&lt;/span&gt; &lt;span class=pl-s1&gt;getopt&lt;/span&gt;, &lt;span class=pl-s1&gt;sys&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L9&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;9&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;from&lt;/span&gt; &lt;span class=pl-s1&gt;urllib&lt;/span&gt; &lt;span class=pl-k&gt;import&lt;/span&gt; &lt;span class=pl-s1&gt;urlopen&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L10&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;10&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L11&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;11&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;main&lt;/span&gt;(&lt;span class=pl-s1&gt;argv&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L12&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;12&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s&gt;&amp;quot;&amp;quot;&amp;quot;docstring for main&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L13&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;13&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;treename&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Firefox&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L14&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;14&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;output&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;all&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L15&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;15&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;try&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L16&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;16&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;opts&lt;/span&gt;, &lt;span class=pl-s1&gt;args&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;getopt&lt;/span&gt;.&lt;span class=pl-en&gt;getopt&lt;/span&gt;(&lt;span class=pl-s1&gt;argv&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;ht:o:&amp;quot;&lt;/span&gt;, [&lt;span class=pl-s&gt;&amp;quot;help&amp;quot;&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;treename=&amp;quot;&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;output=&amp;quot;&lt;/span&gt;]) &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L17&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;17&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;except&lt;/span&gt; &lt;span class=pl-s1&gt;getopt&lt;/span&gt;.&lt;span class=pl-v&gt;GetoptError&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L18&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;18&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-en&gt;usage&lt;/span&gt;()&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L19&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;19&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;sys&lt;/span&gt;.&lt;span class=pl-en&gt;exit&lt;/span&gt;(&lt;span class=pl-c1&gt;2&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L20&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;20&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC20&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L21&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;21&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC21&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;for&lt;/span&gt; &lt;span class=pl-s1&gt;opt&lt;/span&gt;, &lt;span class=pl-s1&gt;arg&lt;/span&gt; &lt;span class=pl-c1&gt;in&lt;/span&gt; &lt;span class=pl-s1&gt;opts&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L22&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;22&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC22&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;opt&lt;/span&gt; &lt;span class=pl-c1&gt;in&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot;-h&amp;quot;&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;--help&amp;quot;&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L23&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;23&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC23&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-en&gt;usage&lt;/span&gt;()&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L24&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;24&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC24&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;sys&lt;/span&gt;.&lt;span class=pl-en&gt;exit&lt;/span&gt;()&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L25&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;25&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC25&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;opt&lt;/span&gt; &lt;span class=pl-c1&gt;in&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot;-t&amp;quot;&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;--treename&amp;quot;&lt;/span&gt;): &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L26&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;26&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC26&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;treename&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;arg&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L27&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;27&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC27&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;opt&lt;/span&gt; &lt;span class=pl-c1&gt;in&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot;-o&amp;quot;&lt;/span&gt;, &lt;span class=pl-s&gt;&amp;quot;--output&amp;quot;&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L28&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;28&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC28&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;output&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;arg&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L29&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;29&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC29&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L30&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;30&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC30&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;is_the_tree_green&lt;/span&gt;(&lt;span class=pl-s1&gt;treename&lt;/span&gt;, &lt;span class=pl-s1&gt;output&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L31&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;31&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC31&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L32&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;32&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC32&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L33&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;33&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC33&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L34&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;34&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC34&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;usage&lt;/span&gt;():&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L35&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;35&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC35&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s&gt;&amp;quot;&amp;quot;&amp;quot;outputs the usage of this program&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L36&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;36&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC36&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;print&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L37&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;37&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC37&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;Prints the current status of tinderbox. While perhaps useful from the command&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L38&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;38&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC38&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;line for a quick update before checking in (in case you&amp;#39;re too lazy to check&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L39&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;39&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC39&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;tinderbox). It&amp;#39;s more fun to show it off on your desktop using GeekTool&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L40&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;40&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC40&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;&amp;lt;http://projects.tynsoe.org&amp;gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L41&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;41&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC41&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L42&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;42&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC42&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;Original concept: Justin Dolkse and his &amp;lt;http://isthetreegreen.com&amp;gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L43&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;43&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC43&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L44&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;44&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC44&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;  -t, --trename=    The tree to use, default is &amp;#39;Firefox&amp;#39;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L45&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;45&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC45&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;  -o, --output=     The output type. Valid options are &amp;#39;status&amp;#39;, &amp;#39;message&amp;#39;,&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L46&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;46&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC46&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;                    and &amp;#39;all&amp;#39;. Default is &amp;#39;all&amp;#39;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L47&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;47&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC47&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-s&gt;  &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L48&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;48&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC48&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L49&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;49&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC49&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L50&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;50&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC50&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L51&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;51&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC51&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;is_the_tree_green&lt;/span&gt;(&lt;span class=pl-s1&gt;treename&lt;/span&gt;&lt;span class=pl-c1&gt;=&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;Firefox&amp;quot;&lt;/span&gt;, &lt;span class=pl-s1&gt;output&lt;/span&gt;&lt;span class=pl-c1&gt;=&lt;/span&gt;&lt;span class=pl-s&gt;&amp;quot;all&amp;quot;&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L52&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;52&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC52&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s&gt;&amp;quot;&amp;quot;&amp;quot;docstring for is_the_tree_green&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L53&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;53&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC53&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L54&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;54&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC54&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;content&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-en&gt;urlopen&lt;/span&gt;(&lt;span class=pl-s&gt;&amp;quot;http://tinderbox.mozilla.org/%s/quickparse.txt&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; &lt;span class=pl-s1&gt;treename&lt;/span&gt;).&lt;span class=pl-en&gt;read&lt;/span&gt;()&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L55&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;55&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC55&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L56&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;56&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC56&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;lines&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;content&lt;/span&gt;.&lt;span class=pl-en&gt;lstrip&lt;/span&gt;().&lt;span class=pl-en&gt;rstrip&lt;/span&gt;().&lt;span class=pl-en&gt;split&lt;/span&gt;(&lt;span class=pl-s&gt;&amp;quot;&lt;span class=pl-cce&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L57&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;57&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC57&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L58&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;58&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC58&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;num_boxes&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;num_red&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;num_orange&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;num_green&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-c1&gt;0&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L59&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;59&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC59&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;for&lt;/span&gt; &lt;span class=pl-s1&gt;line&lt;/span&gt; &lt;span class=pl-c1&gt;in&lt;/span&gt; &lt;span class=pl-s1&gt;lines&lt;/span&gt;[:]:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L60&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;60&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC60&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    [&lt;span class=pl-s1&gt;build&lt;/span&gt;, &lt;span class=pl-s1&gt;tree&lt;/span&gt;, &lt;span class=pl-s1&gt;ident&lt;/span&gt;, &lt;span class=pl-s1&gt;state&lt;/span&gt;, &lt;span class=pl-s1&gt;num&lt;/span&gt;] &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s1&gt;line&lt;/span&gt;.&lt;span class=pl-en&gt;rstrip&lt;/span&gt;(&lt;span class=pl-s&gt;&amp;quot;|&amp;quot;&lt;/span&gt;).&lt;span class=pl-en&gt;split&lt;/span&gt;(&lt;span class=pl-s&gt;&amp;quot;|&amp;quot;&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L61&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;61&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC61&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L62&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;62&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC62&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;ident&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;static-analyis-bsmedberg&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L63&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;63&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC63&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-k&gt;continue&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L64&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;64&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC64&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L65&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;65&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC65&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;num_boxes&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L66&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;66&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC66&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L67&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;67&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC67&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;state&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;success&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L68&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;68&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC68&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;num_green&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L69&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;69&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC69&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;state&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;testfailed&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L70&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;70&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC70&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;num_orange&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L71&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;71&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC71&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;state&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;busted&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L72&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;72&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC72&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;num_red&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L73&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;73&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC73&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;state&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;open&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;or&lt;/span&gt; &lt;span class=pl-s1&gt;state&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;closed&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L74&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;74&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC74&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-c&gt;# Ignore the overall tree status on Firefox3.0 (CVS/Bonsai)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L75&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;75&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC75&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;num_boxes&lt;/span&gt; &lt;span class=pl-c1&gt;-=&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L76&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;76&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC76&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L77&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;77&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC77&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;status&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-en&gt;get_status&lt;/span&gt;(&lt;span class=pl-s1&gt;num_boxes&lt;/span&gt;, &lt;span class=pl-s1&gt;num_red&lt;/span&gt;, &lt;span class=pl-s1&gt;num_orange&lt;/span&gt;, &lt;span class=pl-s1&gt;num_green&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L78&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;78&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC78&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-en&gt;get_message&lt;/span&gt;(&lt;span class=pl-s1&gt;num_boxes&lt;/span&gt;, &lt;span class=pl-s1&gt;num_red&lt;/span&gt;, &lt;span class=pl-s1&gt;num_orange&lt;/span&gt;, &lt;span class=pl-s1&gt;num_green&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L79&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;79&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC79&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L80&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;80&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC80&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;output&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;status&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L81&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;81&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC81&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;print&lt;/span&gt; &lt;span class=pl-s1&gt;status&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L82&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;82&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC82&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;output&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;message&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L83&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;83&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC83&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;print&lt;/span&gt; &lt;span class=pl-s1&gt;message&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L84&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;84&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC84&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;else&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L85&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;85&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC85&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;print&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;%s - %s&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; (&lt;span class=pl-s1&gt;status&lt;/span&gt;, &lt;span class=pl-s1&gt;message&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L86&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;86&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC86&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L87&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;87&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC87&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;get_status&lt;/span&gt;(&lt;span class=pl-s1&gt;total&lt;/span&gt;, &lt;span class=pl-s1&gt;red&lt;/span&gt;, &lt;span class=pl-s1&gt;orange&lt;/span&gt;, &lt;span class=pl-s1&gt;green&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L88&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;88&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC88&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-c1&gt;not&lt;/span&gt; (&lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;green&lt;/span&gt;) &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s1&gt;total&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L89&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;89&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC89&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;return&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Maybe?&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L90&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;90&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC90&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;green&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s1&gt;total&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L91&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;91&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC91&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;return&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Yes!&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L92&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;92&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC92&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;else&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L93&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;93&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC93&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;return&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;No.&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L94&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;94&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC94&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L95&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;95&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC95&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;def&lt;/span&gt; &lt;span class=pl-en&gt;get_message&lt;/span&gt;(&lt;span class=pl-s1&gt;total&lt;/span&gt;, &lt;span class=pl-s1&gt;red&lt;/span&gt;, &lt;span class=pl-s1&gt;orange&lt;/span&gt;, &lt;span class=pl-s1&gt;green&lt;/span&gt;):&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L96&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;96&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC96&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-c1&gt;not&lt;/span&gt; (&lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s1&gt;green&lt;/span&gt;) &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s1&gt;total&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L97&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;97&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC97&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;I didn&amp;#39;t understand the Tinderbox status...&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L98&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;98&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC98&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-s1&gt;green&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s1&gt;total&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L99&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;99&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC99&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Everything is SUPER!&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L100&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;100&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC100&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;else&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L101&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;101&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC101&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;and&lt;/span&gt; &lt;span class=pl-c1&gt;not&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L102&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;102&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC102&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot;1 box is&amp;quot;&lt;/span&gt; &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt; &lt;span class=pl-k&gt;else&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;%d boxes are&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt;) &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; burning!&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L103&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;103&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC103&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;elif&lt;/span&gt; &lt;span class=pl-c1&gt;not&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;and&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L104&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;104&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC104&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;Tests failed on&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot; 1 box!&amp;quot;&lt;/span&gt; &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt; &lt;span class=pl-k&gt;else&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; %d boxes!&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L105&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;105&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC105&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;    &lt;span class=pl-k&gt;else&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L106&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;106&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC106&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;=&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot;1 box is&amp;quot;&lt;/span&gt; &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt; &lt;span class=pl-k&gt;else&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;%d boxes are&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; &lt;span class=pl-s1&gt;red&lt;/span&gt;) &lt;span class=pl-c1&gt;+&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; burning, and&amp;quot;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L107&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;107&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC107&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;      &lt;span class=pl-s1&gt;message&lt;/span&gt; &lt;span class=pl-c1&gt;+=&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; tests failed on&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;+&lt;/span&gt; (&lt;span class=pl-s&gt;&amp;quot; 1 box!&amp;quot;&lt;/span&gt; &lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-c1&gt;1&lt;/span&gt; &lt;span class=pl-k&gt;else&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot; %d boxes!&amp;quot;&lt;/span&gt; &lt;span class=pl-c1&gt;%&lt;/span&gt; &lt;span class=pl-s1&gt;orange&lt;/span&gt;)&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L108&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;108&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC108&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L109&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;109&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC109&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-k&gt;return&lt;/span&gt; &lt;span class=pl-s1&gt;message&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L110&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;110&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC110&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L111&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;111&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC111&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;
&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L112&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;112&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC112&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;&lt;span class=pl-k&gt;if&lt;/span&gt; &lt;span class=pl-s1&gt;__name__&lt;/span&gt; &lt;span class=pl-c1&gt;==&lt;/span&gt; &lt;span class=pl-s&gt;&amp;quot;__main__&amp;quot;&lt;/span&gt;:&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id=&quot;file-isthetreegreen-py-L113&quot; class=&quot;blob-num js-line-number js-code-nav-line-number js-blob-rnum&quot; data-line-number=&quot;113&quot;&gt;&lt;/td&gt;
          &lt;td id=&quot;file-isthetreegreen-py-LC113&quot; class=&quot;blob-code blob-code-inner js-file-line&quot;&gt;  &lt;span class=pl-en&gt;main&lt;/span&gt;(&lt;span class=pl-s1&gt;sys&lt;/span&gt;.&lt;span class=pl-s1&gt;argv&lt;/span&gt;[&lt;span class=pl-c1&gt;1&lt;/span&gt;:])&lt;/td&gt;
        &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;


    &lt;/div&gt;


  &lt;/div&gt;
&lt;/div&gt;

      &lt;/div&gt;
      &lt;div class=&quot;gist-meta&quot;&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/84210/raw/c4bb5c4496f862889cbdfa7f1c03ec9020ac63e5/isthetreegreen.py&quot; style=&quot;float:right&quot;&gt;view raw&lt;/a&gt;
        &lt;a href=&quot;https://gist.github.com/zpao/84210#file-isthetreegreen-py&quot;&gt;
          isthetreegreen.py
        &lt;/a&gt;
        hosted with &amp;#10084; by &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;A big thanks to Justin Dolske for &lt;a href=&quot;http://isthetreegreen.com&quot;&gt;Is the Tree Green?&lt;/a&gt;. He deserves more credit for this than I.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Your Browser is Special]]></title><description><![CDATA[Roughly 6% of the people visiting this site in the past month were using IE6. That’s mostly insignificant, but I despise IE6 and had to do…]]></description><link>https://zpao.com/posts/your-browser-is-special/</link><guid isPermaLink="false">https://zpao.com/posts/your-browser-is-special/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Roughly 6% of the people visiting this site in the past month were using IE6. That’s mostly insignificant, but I despise IE6 and had to do my part to put an end to it. So, following in the footsteps of &lt;a href=&quot;http://therissingtonpodcast.co.uk/&quot;&gt;The Rissington Podcast&lt;/a&gt; (and surely others), I’m serving up an IE6 stylesheet complete with Comic Sans. I also put together a super tiny script that puts a special message up top.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/zpao/3376947996/&quot;&gt;&lt;img src=&quot;https://farm4.static.flickr.com/3559/3376947996_7b3fa08bc4.jpg&quot; alt=&quot;Your Browser is Special by zpao, on Flickr&quot; title=&quot;Your Browser is Special by zpao, on Flickr&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’d been wanting to do this for a while, but it’s finally done. I’m using conditional comments to differentiate browsers. I used JavaScript to display the message so I wouldn’t be adding clutter to my source, even if nobody else would see it. View the source if you’re interested.&lt;/p&gt;
&lt;p&gt;And yes, I’m biased about the browser I’m suggesting, but I’m allowed to be.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Here I Am, Back Again]]></title><description><![CDATA[I’m now into my third week here at Mozilla, working on Firefox. It’s been a tiring 2 weeks so far, but I’ve enjoyed every second. For those…]]></description><link>https://zpao.com/posts/here-i-am-back-again/</link><guid isPermaLink="false">https://zpao.com/posts/here-i-am-back-again/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’m now into my third week here at Mozilla, working on Firefox. It’s been a tiring 2 weeks so far, but I’ve enjoyed every second.&lt;/p&gt;
&lt;p&gt;For those of you who don’t know, I was an intern on the Firefox team last summer. I primarily worked on the password manager and a performance analysis tool. I was offered a full-time position soon after the summer ended, and while I did some looking around, I realized that I wanted to be at Mozilla. I loved the company, the people, and the work I would do — so overall it was right for me.&lt;/p&gt;
&lt;p&gt;After an extended winter break, I flew out here with Amanda on February 17^(th), a Tuesday. Amanda had been looking at apartment stuff like a fiend, and while I helped, she found a bunch of great places for us to see and did the real work with that. So we spent Wednesday &amp;#x26; Thursday looking at ~20 apartments. CitiApartments may (apparently) be the spawn of Satan when it comes to housing in SF, but Hilary was an incredibly helpful agent, if perhaps a little unconventional. It turns out that the apartment we really wanted was the first one we saw on Wednesday morning. Friday was spent making sure our application went through, and jumping through hoops to get my money from my bank in Pennsylvania in order to get certified checks. It all worked out; we signed our lease on Saturday and moved in Monday/Tuesday. We’re working on making the place a bit more homey, but it’s coming along and hopefully we’ll have a little housewarming when there are places for people to sit.&lt;/p&gt;
&lt;h2&gt;Back to Work&lt;/h2&gt;
&lt;p&gt;I joined the team as we’re wrapping up Firefox &lt;del&gt;3.1&lt;/del&gt; 3.5, and since I’m already relatively familiar with the code base, I got to start working on fixing blockers &amp;#x26; participating in &lt;a href=&quot;https://wiki.mozilla.org/Firefox3.1/Sprints&quot;&gt;sprints&lt;/a&gt;. My first week was also a Firefox “work week,” where the Firefox team physically gets together (we’re spread out around the world), and gets stuff done face-to-face. We came up with a bunch of good ideas for what we want to be and how to make people excited about Firefox — that’s where our sprints came from.&lt;/p&gt;
&lt;p&gt;I look forward to working with everybody here and meeting those of you who I haven’t met yet. Remember, I’m not an intern this time around :)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[YELL AT THE TV!]]></title><description><![CDATA[FRESHLY LAUNCHED: Yell At The TV! I just launched a new app that lets you yell at your TV via twitter. It’s nothing fancy, but it was a good…]]></description><link>https://zpao.com/posts/yell-at-the-tv/</link><guid isPermaLink="false">https://zpao.com/posts/yell-at-the-tv/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;&lt;strong&gt;FRESHLY LAUNCHED:&lt;/strong&gt; &lt;a href=&quot;http://yellatthetv.com&quot;&gt;Yell At The TV!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I just launched a new app that lets you yell at your TV via twitter. It’s nothing fancy, but it was a good little bit of fun.&lt;/p&gt;
&lt;h2&gt;Is LOST on yet?&lt;/h2&gt;
&lt;p&gt;While this was an idea I had been kicking around for a while, it was the work done by Rick Olsen on &lt;a href=&quot;http://islostonyet.com/&quot;&gt;Is LOST on yet?&lt;/a&gt; that made me decide to do this.&lt;/p&gt;
&lt;h2&gt;Feature Poor&lt;/h2&gt;
&lt;p&gt;It’s worse than feature poor right now. There’s only the first page right now.&lt;/p&gt;
&lt;p&gt;Hopefully I’ll be adding features over the next week or so. The primary thing I want to add is some support for hashtags, allowing you to view tweets for a show, season, or episode. Something like #lost-s05e01. It shouldn’t be &lt;em&gt;that&lt;/em&gt; much work, so hopefully I’ll find some time to do that.&lt;/p&gt;
&lt;h2&gt;Dreamhost Pains&lt;/h2&gt;
&lt;p&gt;I originally made this in &lt;a href=&quot;http://sinatra.github.com&quot;&gt;Sinatra&lt;/a&gt;, but that didn’t work out so well on Dreamhost for a few reasons. I fucked around for a bit trying to get it to work, but gave up and instead rewrote it using Ruby on Rails. I really do like Dreamhost, but for projects like this, it’d be nice to host it with ease, using the framework of my choice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So give it a try: &lt;a href=&quot;http://yellatthetv.com&quot;&gt;http://yellatthetv.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Hey Hey-ey, Goodbye]]></title><description><![CDATA[Today I took my last final exam as a Carnegie Mellon student. It’s been four and a half years, but it feels like just yesterday I got here…]]></description><link>https://zpao.com/posts/hey-hey-ey-goodbye/</link><guid isPermaLink="false">https://zpao.com/posts/hey-hey-ey-goodbye/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Today I took my last final exam as a Carnegie Mellon student. It’s been four and a half years, but it feels like just yesterday I got here. Pending that one last grade, today I became a &lt;a href=&quot;http://ism.cmu.edu/&quot;&gt;Master of Information Systems Management&lt;/a&gt;. That degree joins my Bachelor’s degree I finished up in May. I could go on and on about the value of my education or spend time evaluating the programs I was in, but I won’t. I have a lot to say, so I’ll save it for another time. I mean this to be brief.&lt;/p&gt;
&lt;p&gt;It’s often said that college changes you. &lt;strong&gt;It’s true.&lt;/strong&gt; I really grew up here; or maybe matured. Either way, Carnegie Mellon has had a huge impact on my life. I figured out what I want to do with my life; I made good friends; I fell in love; &lt;em&gt;I learned&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now it’s time to move on, into the scary unknown of the real world. Working the ol’ daily grind, paying the bills, and so on. I’ll be far from my family and friends. I look forward to it though — it’s the next big adventure.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Cue sappy music: “A Whole New World”)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Oh yea, did I mention that I’ll be working on &lt;a href=&quot;http://getfirefox.com&quot;&gt;the best damn browser&lt;/a&gt; out there?&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Yahoo! HackU 2008]]></title><description><![CDATA[This past week Yahoo! was on campus for their annual HackU event. This is the third year they have been doing it and each year it has gotten…]]></description><link>https://zpao.com/posts/yahoo-hacku-2008/</link><guid isPermaLink="false">https://zpao.com/posts/yahoo-hacku-2008/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;This past week Yahoo! was on campus for their annual &lt;a href=&quot;http://developer.yahoo.com/hacku/&quot;&gt;HackU&lt;/a&gt; event. This is the third year they have been doing it and each year it has gotten progressively larger.&lt;/p&gt;
&lt;h2&gt;The Past&lt;/h2&gt;
&lt;p&gt;The first year (2006), I think there was a single entry. I made it in time for the presentation and was pretty sad I hadn’t had a chance to make anything.&lt;/p&gt;
&lt;p&gt;Last year, I made a determined effort and hacked together my own entry - &lt;a href=&quot;http://playground.zpao.com/yweather&quot;&gt;yWeather&lt;/a&gt; - and contributed to &lt;a href=&quot;http://flolcatr.com&quot;&gt;flolcatr&lt;/a&gt;. These were among the six or so entries from Carnegie Mellon. I didn’t win anything, though I’m still pretty proud of yWeather. There was a 24-hour hack session on the last night, but I’m pretty sure there was nobody there after midnight.&lt;/p&gt;
&lt;h2&gt;This year&lt;/h2&gt;
&lt;p&gt;This year there were 28 hacks! I was simply astounded at the number and variation of the entries this year. There were technically impressive hacks, humorous hacks, hacks that could change the web, and even some creepy hacks. We had some big hacker names from Yahoo! show up - &lt;a href=&quot;http://lerdorf.com/&quot;&gt;Rasmus Lerdof&lt;/a&gt; (creator of PHP), &lt;a href=&quot;http://kentbrewster.com/&quot;&gt;Kent Brewster&lt;/a&gt; (hacker extraordinaire), and my new pal &lt;a href=&quot;http://paulisageek.com/&quot;&gt;Paul Tarjan&lt;/a&gt; (creator of Search Monkey). I think there were people who actually pulled off the 24-hour hackathon, staying up the whole night. I know Paul was there when I left around 6am.&lt;/p&gt;
&lt;p&gt;Last year I took advantage of the time and spent the week working on my hack. This year I didn’t start until after midnight. I contributed a little bit to a hack (“lolmonkey”) with &lt;a href=&quot;http://matttthompson.com/&quot;&gt;Mattt Thompson&lt;/a&gt; which uses &lt;a href=&quot;http://developer.yahoo.com/searchmonkey/&quot;&gt;Search Monkey&lt;/a&gt; and creates an infobar in Yahoo! search results lolifying an image on the linked page. While not the craziest hack, we had fun with it. I think at this point we are both officially done creating tools/hacks that have anything to do with lolcats.&lt;/p&gt;
&lt;h2&gt;Busses &amp;#x26; the Blueprint Framework&lt;/h2&gt;
&lt;p&gt;The other hack that I worked on uses the &lt;a href=&quot;http://mobile.yahoo.com/developers/roadmap&quot;&gt;Yahoo! Blueprint framework&lt;/a&gt; for creating mobile applications. While not the most technically advanced hack, I think it was one with the most immediate value. It was called “CMU Busses”, and simply tells you the next 5 busses leaving Carnegie Mellon in either direction. You can see a screenshot on the &lt;a href=&quot;http://playground.zpao.com/bp_busses&quot;&gt;project page&lt;/a&gt;. This is something I’ve been wanting to make for a long time, and something I would actually use (no offense to the other hacks). This was a true “hack” - I’m scraping the PAT website with Ruby. My Ruby code is outputting PHP code (the departure times are hardcoded instead of doing a DB lookup). Then the rest of the script is using the PHP Blueprint framework that Yahoo! provides (after spending a while working it out).&lt;/p&gt;
&lt;p&gt;I had originally planned to make this an iPhone application, but having never done Objective-C, I figured now wasn’t the time to start. I had also wanted this application to be able to detect the user’s GPS coordinates and find the closes 5 bus stops before showing departure times, but that had some barriers as well. In a future iteration hopefully we’ll see that. The Blueprint framework is supposedly also able to convert a Blueprint application to an iPhone application, but that has not been released to the public yet. When it is released, I think I may publish what I have now as a first iteration.&lt;/p&gt;
&lt;h2&gt;Some Other Highlights&lt;/h2&gt;
&lt;p&gt;I got to hang out with some great people throughout the week. I also got treated to a dinner for all of the former Yahoo! interns at Fuel &amp;#x26; Fuddle. It was a good time, getting to talk some technology and design with smart people.&lt;/p&gt;
&lt;p&gt;As a result of working on the lolmonkey hack, Mattt and I were invited to dinner by Alicia at &lt;a href=&quot;http://buglabs.net&quot;&gt;Bug Labs&lt;/a&gt;. They have a really cool product called BUG, which as they say on their website, “is a collection of easy-to-use electronic modules that snap together to build any gadget you can imagine”. I got to play with one and it’s really neat. I wish I had some spare cash to get one. They also have some of the coolest package design I’ve seen in a while. So if you’re interested in hacking hardware, take a look at them - they’re cool people with a cool product, hacking on open source hardware and software.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Making the New Password Manager Storage Faster]]></title><description><![CDATA[When I first wrote the new storage module for the Password Manager, I took a few “shortcuts,” trying to keep my code DRY. Partially this was…]]></description><link>https://zpao.com/posts/passwordmgr-storage-faster/</link><guid isPermaLink="false">https://zpao.com/posts/passwordmgr-storage-faster/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;When I first wrote the new storage module for the Password Manager, I took a few “shortcuts,” trying to keep my code DRY. Partially this was because of the first patch by Mrinal Kant, but mostly it was because I like to reuse code. This bit us just a bit.&lt;/p&gt;
&lt;p&gt;I mentioned in my &lt;a href=&quot;/posts/passwordmgr-storage&quot;&gt;first post about this change&lt;/a&gt; that we were initially considerably slower in the critical &lt;code class=&quot;language-text&quot;&gt;countLogins&lt;/code&gt; method. While it got improved before being checked in, it was still marginally slower (milliseconds on an abnormally large dataset).&lt;/p&gt;
&lt;p&gt;As I said before, this was most likely since we were doing a &lt;code class=&quot;language-text&quot;&gt;SELECT *&lt;/code&gt; on the &lt;code class=&quot;language-text&quot;&gt;moz_logins&lt;/code&gt; table, and looping over the results and counting. This allowed me to reuse more code. Loops are a kind of slow, and since this was so important, I decided to speed it up.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=451479&quot;&gt;I filed a bug&lt;/a&gt; just over a week ago entitled “storage-mozStorage should use COUNT in countLogins” - which pretty much explains what the solution to the above problem. I created a patch which essentially just switched the mosStorage module to use &lt;code class=&quot;language-text&quot;&gt;SELECT COUNT(1)&lt;/code&gt;. I reran the performance tests I created and we’re doing much better now. There’s still a miniscule loss in speed from the legacy storage module, but at this point, we’ve done all that we can, and where the difference was milliseconds, its closer to millisecond.&lt;/p&gt;
&lt;p&gt;This was &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/rev/ce557eb9ef4a&quot;&gt;checked in&lt;/a&gt; today (thanks Justin!).&lt;/p&gt;
&lt;p&gt;And that’s it. I have another patch in the pipeline and hopefully I’ll have time to get it finished, approved, and reviewed for the freeze (whenever that is now).&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Password Manager now uses mozStorage]]></title><description><![CDATA[The other day my patch landed switching the Password Manager to use mozStorage (our wrapper around SQLite). The bug had been up on Bugzilla…]]></description><link>https://zpao.com/posts/passwordmgr-storage/</link><guid isPermaLink="false">https://zpao.com/posts/passwordmgr-storage/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;The other day &lt;a href=&quot;http://hg.mozilla.org//mozilla-central/index.cgi/rev/c2f416981fa3&quot;&gt;my patch landed&lt;/a&gt; switching the Password Manager to use &lt;a href=&quot;http://developer.mozilla.org/en/docs/Storage&quot;&gt;mozStorage&lt;/a&gt; (our wrapper around SQLite). &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=288040&quot;&gt;The bug&lt;/a&gt; had been up on Bugzilla for a long time, over 3 years, when I came across it at the end of June. I had been doing some Password Manager related work already by that point, so I decided I would do it. This is the story of that bug: the process, the hardships, the code (at least a bit). Keep in mind I was also doing work on my &lt;a href=&quot;/posts/dtrace-treemaps-part-1&quot;&gt;DTrace Treemaps&lt;/a&gt; at the time, went to Summit, and encountered more edge cases than I wanted, so this took longer than expected.&lt;/p&gt;
&lt;h2&gt;Quick Features &amp;#x26; Change Summary&lt;/h2&gt;
&lt;p&gt;Some of this is discussed further down, so bear with me. One of the primary differences in the switch to using mozStorage is that we now store data in a database. Previously we were storing data in a text file, using lines and periods to separate data fields. Open &lt;code class=&quot;language-text&quot;&gt;signons3.txt&lt;/code&gt; in your &lt;a href=&quot;http://support.mozilla.com/en-US/kb/Profiles&quot;&gt;profile directory&lt;/a&gt; and take a look at it (assuming you’ve saved a password before). All information was kept in memory, and when a new password was saved, the whole file would need to be rewritten. The same thing happened if you ever removed a saved password. Using a database means that we don’t have to keep any (potentially) sensitive information in memory. It also means faster reading and writing since we don’t have to read the whole file every time. These speed boosts are apparent especially in the speed tests, attached to the bug and summarized below.&lt;/p&gt;
&lt;p&gt;Since this is really just a drop in change that must implement an API, to the outside world nothing has changed. Although the inner workings are different, it’s the same to anybody who happens to use it (extensions or other parts of Firefox).&lt;/p&gt;
&lt;h2&gt;v0.1 - The beginning&lt;/h2&gt;
&lt;p&gt;I began work by really taking a look at the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/src/storage-Legacy.js&quot;&gt;legacy storage module&lt;/a&gt; to make sure I knew what was supposed to be happening. Then I looked at the initial attempts by other developers. The first attempts were made before Password Manager got rewritten, so those weren’t relevant. Mrinal Kant came in (over 2 years after the first patches) and wrote what I used as the basis for my code. I don’t think I ran it as it was, but it looked functional, at least at the core.&lt;/p&gt;
&lt;p&gt;I actually started by just copying the legacy storage file, removing all of the code from methods that would need to be changed, and started fresh. I copied in some code from Mrinal’s work and used some of the conventions, but the bulk of it was rewritten. I opted to use the wrapper we have for Storage, which makes it easy to do parameter replacement. This also automatically binds the parameters to a type - so when you give it a string, it will ensure it’s treated as a string. It’s very handy.&lt;/p&gt;
&lt;p&gt;This first version “worked” (at least as far as I remember), though it definitely had problems. I brought it up at our &lt;a href=&quot;http://wiki.mozilla.org/Firefox3.1/StatusMeetings/&quot;&gt;weekly status meeting&lt;/a&gt; and it became one of the “nice to have” features for 3.1. That gave it some attention it needed and I got some quick feedback from &lt;a href=&quot;http://shawnwilsher.com&quot;&gt;Shawn&lt;/a&gt; and &lt;a href=&quot;http://blog.mozilla.com/dolske/&quot;&gt;Justin&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;v0.2 - Database details&lt;/h2&gt;
&lt;p&gt;One of the primary changes here was some of the database stuff. Shawn had pointed out that I needed a way to version the database. All I had was a method to create the tables. In order to future-proof this, I needed to make sure the schema was stored somewhere and there was a procedure for migrating the database.&lt;/p&gt;
&lt;p&gt;I took a look at &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/toolkit/components/contentprefs/src/nsContentPrefService.js&quot;&gt;nsContentPrefService&lt;/a&gt; (which stores your preferences for specific sites, like remembering zoom settings) since that was another component using storage and written in JavaScript. I “hijacked” the code related to the database stuff, and modified it a bit to fit my needs.&lt;/p&gt;
&lt;p&gt;The other major change here was to replace &lt;code class=&quot;language-text&quot;&gt;var&lt;/code&gt; with &lt;code class=&quot;language-text&quot;&gt;let&lt;/code&gt; - “&lt;code class=&quot;language-text&quot;&gt;let is the new var&lt;/code&gt;” as my shirt says. A number of other changes were also made - cleaning up queries, hard-coding the table names, and making sure I was using statements correctly.&lt;/p&gt;
&lt;h2&gt;v0.3, v0.4 - Cleanup &amp;#x26; Optimization&lt;/h2&gt;
&lt;p&gt;These versions were pretty light - mostly involving cleanup. &lt;code class=&quot;language-text&quot;&gt;modifyLogin and the process involved got improved. I also reduced the number of queries we were making by hand and so all &lt;/code&gt;SELECTs were done from just 2 places (one for each table).&lt;/p&gt;
&lt;h2&gt;v0.5 - Importing&lt;/h2&gt;
&lt;p&gt;v0.5 focused on importing from the legacy module. The basics were in the original code Mrinal wrote, but all of the edge cases were difficult to handle. The one case that caused a lot of problems were the “user has a master password, but presses cancel when we import”. We needed to handle that gracefully, and Justin and I decided the best way was to introduce a &lt;code class=&quot;language-text&quot;&gt;_deferredInit&lt;/code&gt; method, which did the bulk of the initialization work. At the beginning of each public method, we then check the initialization state and try to import again. It can get annoying, but everything about the master password is annoying.&lt;/p&gt;
&lt;p&gt;This also resulted in a couple bugs being spun off to help us with importing: &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=449810&quot;&gt;one bug&lt;/a&gt; was just a few lines added to the legacy module and the password manager UI to handle an additional error, and &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=449095&quot;&gt;the other&lt;/a&gt; was just to ensure the legacy module didn’t create an empty file if it was never used.&lt;/p&gt;
&lt;h2&gt;v0.6 - Tests&lt;/h2&gt;
&lt;p&gt;I finally got to writing the tests, which involved a lot of copy &amp;#x26; paste from the legacy tests, then making small modifications. It’s not the most efficient way, but it works ok. Since the mozStorage module works slightly differently, the code duplication is a necessity for now. In theory they can be cleaned up, but that’ll be a task for the next intern :)&lt;/p&gt;
&lt;p&gt;At this point I thought I was pretty much done, and I was. There were still a few problems though, and also not quite enough test coverage.&lt;/p&gt;
&lt;h2&gt;v0.7, v0.8 - Cleanup, Tests, Corrupt Databases&lt;/h2&gt;
&lt;p&gt;v0.7 involved a lot of cleanup and adding tests. v0.8 was an important milestone in that I finally added the handling of a corrupt database. Before this point, if we encountered a corrupt database, we would fail and then as with a failed import, just try again and again. This was bad, really bad. So a “thank you” to Shawn for catching that. Now we backup the corrupt database and just create a new one. It should be difficult to get a corrupt database, but just in case (and to cover the case when people think they know what they’re doing, but don’t).&lt;/p&gt;
&lt;h2&gt;v0.9, v1.0 - Performance&lt;/h2&gt;
&lt;p&gt;In one of the recent status meetings, &lt;a href=&quot;http://shaver.off.net/diary/&quot;&gt;Mike Shaver&lt;/a&gt; asked me about performance. At that point I hadn’t really done much except throw it up on the try server. The try server gives decent ball park figures, but it’s not perfect. So Justin worked on getting &lt;a href=&quot;http://wiki.mozilla.org/StandaloneTalos&quot;&gt;Standalone Talos&lt;/a&gt; working while I wrote some XPC shell “tests”. I discovered that while we were generally faster - faster init, faster add, faster remove - we were considerably slower for &lt;code class=&quot;language-text&quot;&gt;countLogin&lt;/code&gt;, which is a critical path, since it gets called on every page. Over 90% of the that time was actually spent initializing &lt;code class=&quot;language-text&quot;&gt;nsLoginInfo&lt;/code&gt; objects (since I tried to reuse code). This got improved, though we are still a couple milliseconds slower. This could likely be improved a little bit since we are still doing a &lt;code class=&quot;language-text&quot;&gt;SELECT&lt;/code&gt; and looping over the results. A little bit more work needs to be done that way, so making the query use &lt;code class=&quot;language-text&quot;&gt;COUNT&lt;/code&gt; would cut that out. Maybe I’ll write another patch to do that before Beta 1. For now though, we’ll keep doing it how we’re doing it.&lt;/p&gt;
&lt;h2&gt;And that’s all… almost&lt;/h2&gt;
&lt;p&gt;After this got checked in, the Windows boxes turned orange on Tinderbox. This was because of the tests (trying to delete files). Justin and I thought we had a quick fix, committed that. As I was packing to come home, I got pinged on IRC since the boxes were still orange and it was my fault. So the tests for my changeset got backed out and we switched back to the legacy module, but the code was still in there.&lt;/p&gt;
&lt;p&gt;On Sunday, my module &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/index.cgi/rev/063c145b2a09&quot;&gt;was re-enabled&lt;/a&gt; (thanks Justin!). There was &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=451040&quot;&gt;another hiccup&lt;/a&gt; related to packages-static, but that was fixed as well. If you have any problems &lt;a href=&quot;https://bugzilla.mozilla.org/enter_bug.cgi?component=Password%20Manager&amp;#x26;product=Toolkit&quot;&gt;please report them on Bugzilla&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[New Design &amp; Updates]]></title><description><![CDATA[The night before heading to Whistler for Summit (it was awesome!), I started messing around in Illustrator. I came up with a little idea…]]></description><link>https://zpao.com/posts/new-design-updates/</link><guid isPermaLink="false">https://zpao.com/posts/new-design-updates/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;The night before heading to Whistler for &lt;a href=&quot;https://wiki.mozilla.org/Summit2008&quot;&gt;Summit&lt;/a&gt; (it was awesome!), I started messing around in Illustrator. I came up with a little idea that I liked and decided to take it a step further, so I opened Photoshop and got to work. It progressed fairly well, so I started working on the HTML the next day. By the end of the plane ride to Vancouver I had a single page mostly done, with all the images and everything.&lt;/p&gt;
&lt;p&gt;I was busy the next few weeks, so put it aside. When I flew home yesterday, I decided to actually make it work. So here it is. There are probably a few things I’ll tweak when I see them, but I hope to keep this for a while.&lt;/p&gt;
&lt;p&gt;I also decided to actually write my own comment system. I was pretty unhappy with &lt;a href=&quot;http://disqus.com&quot;&gt;Disqus&lt;/a&gt;. Disqus has potential, but it required more work than it took for me to write my own. I have a basic “human test” to prevent against spam. We’ll see how well it works. If you commented here previously, I’ve taken the liberty to copy your comment into the new system, adding a link to your website if I knew it.&lt;/p&gt;
&lt;p&gt;I’ve wrapped up my summer with Mozilla, so I’ll have more content about what I did coming shortly.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[DTrace and Treemaps: Part 1]]></title><description><![CDATA[One of my goals for this summer at Mozilla was improving performance when Firefox starts. Admittedly, I’ve done nothing of the sort. Instead…]]></description><link>https://zpao.com/posts/dtrace-treemaps-part-1/</link><guid isPermaLink="false">https://zpao.com/posts/dtrace-treemaps-part-1/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;One of my goals for this summer at Mozilla was improving performance when Firefox starts. Admittedly, I’ve done nothing of the sort. Instead I’ve tackled this from a more general angle - making a tool that uses DTrace and creates a treemap of the output. This serves as a way of analyzing performance in a very visual way. Before I go further, a little background.&lt;/p&gt;
&lt;h2&gt;DTrace&lt;/h2&gt;
&lt;p&gt;“DTrace is a comprehensive dynamic tracing framework created by Sun Microsystems for troubleshooting system and application problems in real time.”&lt;sup id=&quot;fnref-1&quot;&gt;&lt;a href=&quot;#fn-1&quot; class=&quot;footnote-ref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; It was originally in Solaris and OpenSolaris, but has since been ported to OS X and was &lt;a href=&quot;http://arstechnica.com/reviews/os/mac-os-x-10-5.ars/5#dtrace&quot;&gt;included in Leopard&lt;/a&gt;. In a nutshell, it lets you take a look at the inner workings of applications and kernel activity, with a low overhead. You can do everything from looking at file IO to time spent in functions to analyzing system call times. It’s pretty powerful and I’ve only just touched the surface of it.&lt;/p&gt;
&lt;p&gt;Developers at Mozilla have done a lot of work getting probes into Firefox so that we can take advantage of all DTrace has to offer. One of these places where probes have gone is into JavaScript execution. This opens up the doors to using DTrace to track what’s happening in JavaScript, which is especially useful at Mozilla since a lot of our front-end code is JavaScript.&lt;/p&gt;
&lt;h2&gt;Treemaps&lt;/h2&gt;
&lt;p&gt;“Treemapping is a method for displaying tree-structured data using nested rectangles.”&lt;sup id=&quot;fnref-2&quot;&gt;&lt;a href=&quot;#fn-2&quot; class=&quot;footnote-ref&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; In other words, pretty damn cool. One of the coolest uses I’ve seen recently is &lt;a href=&quot;http://marumushi.com/apps/newsmap/&quot;&gt;newsmap&lt;/a&gt; - which takes the news as aggregated by Google News, and builds a beautiful representation of what’s “hot” in the news.&lt;/p&gt;
&lt;h2&gt;What I’ve done&lt;/h2&gt;
&lt;p&gt;The work that I’ve been doing so far is pretty simple. I’ve taken the output of a single DTrace script (&lt;code class=&quot;language-text&quot;&gt;js_functime&lt;/code&gt;, &lt;a href=&quot;http://blogs.sun.com/brendan/entry/dtrace_meets_javascript&quot;&gt;available on Brendan Gregg’s blog&lt;/a&gt;) and used that to create a treemap. This DTrace script measures the time spent in Javascript functions. It’s not the most accurate measurement since the output is the overlapping times, but it’s still a good place to start. The output contains the number of times each function was called, the average time spent in the function, and the total time spent (across calls). From there I build these treemaps.&lt;/p&gt;
&lt;p&gt;I’ve used a modified version of the &lt;a href=&quot;http://rubytreemap.rubyforge.org/&quot;&gt;RubyTreemap&lt;/a&gt; gem to create SVG (Scalable Vector Graphics)s of this output. I create 3 different high-level maps, each representing the bits of information I get (count, average time, total time). Each of these maps is made from a tree 3 levels deep (though the root node is insignificant). The topmost level is the file from which the function is in. The second level is the function name. Size is determined from the measurement type (thus 3 maps). Each of these maps can then be broken down further, stepping into each individual file. So from these 3 “index” SVGs, I’ve linked down into the second level, and a new SVG is generated for each file, making it a bit easier to read the smaller nodes. Colors are consistent between runs and based on an adapted hashing algorithm.&lt;/p&gt;
&lt;p&gt;I can’t hand out the source yet since the original RubyTreemap is GPL’ed and I’m not ready to redistribute. The changes aren’t huge, but are very focused for this task, so might not even be able to be merged back. Also, my code is pretty ugly right now and that would just lead to embarrassment.&lt;/p&gt;
&lt;p&gt;So without further ado, here’s the page on playground: &lt;em&gt;&lt;a href=&quot;http://playground.zpao.com/dtrace_treemaps/&quot;&gt;DTrace Treemaps&lt;/a&gt;&lt;/em&gt;. Keep in mind that this is not complete and what you see may very well change soon. Here are the direct links to the SVGs if you are a bit impatient: &lt;a href=&quot;http://playground.zpao.com/dtrace_treemaps/js_functime_count/index.svg&quot;&gt;count&lt;/a&gt;, &lt;a href=&quot;http://playground.zpao.com/dtrace_treemaps/js_functime_avg/index.svg&quot;&gt;average&lt;/a&gt;, &lt;a href=&quot;http://playground.zpao.com/dtrace_treemaps/js_functime_sum/index.svg&quot;&gt;sum&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Future Directions&lt;/h2&gt;
&lt;p&gt;From here I plan on using the output from some of the scripts in the &lt;a href=&quot;http://opensolaris.org/os/community/dtrace/dtracetoolkit/&quot;&gt;DTrace Toolkit&lt;/a&gt; to create other visuals, likely more treemaps. I also need to do a number of things to package this nicely so it’s easy to adapt and use for different DTrace outputs. Last, but certainly not least, I need to make the code much better - it’s my own personal Frankenstein right now, and needs to suck less.&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&quot;fn-1&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/DTrace&quot;&gt;Wikipedia DTrace article&lt;/a&gt;&lt;a href=&quot;#fnref-1&quot; class=&quot;footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;fn-2&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Treemap&quot;&gt;Wikipedia Treemapping article&lt;/a&gt;&lt;a href=&quot;#fnref-2&quot; class=&quot;footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content:encoded></item><item><title><![CDATA[On Open Source]]></title><description><![CDATA[Two weeks ago, while working on a project yet to be revealed (unless you happen to stalk me on Bugzilla - I’ll write about it soon, I…]]></description><link>https://zpao.com/posts/on-open-source/</link><guid isPermaLink="false">https://zpao.com/posts/on-open-source/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Two weeks ago, while working on a project yet to be revealed (unless you happen to stalk me on &lt;a href=&quot;https://bugzilla.mozilla.org&quot;&gt;Bugzilla&lt;/a&gt; - I’ll write about it soon, I promise), I happened to make Minefield seg fault. I was talking to &lt;a href=&quot;http://shawnwilsher.com/&quot;&gt;Shawn Wilsher&lt;/a&gt; about what I was working on, so he had some familiarity with the code, and told me it &lt;em&gt;shouldn’t&lt;/em&gt; be crashing. But it was. Shawn told me to file a bug, create a test case, and get a stack trace with &lt;a href=&quot;http://sourceware.org/gdb/&quot;&gt;GDB&lt;/a&gt;. I was a bit annoyed because it took time away from what I was working on. But I did all that, filed &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=444233&quot;&gt;the bug&lt;/a&gt;, and went along my way.&lt;/p&gt;
&lt;p&gt;The other day, I got to work and found a few Bugzilla emails waiting. Apparently somebody had written a patch for the bug, and it had been r+ed and checked in. I figured somebody was looking at it, but a lot happened at once. So I took a look at the &lt;a href=&quot;http://hg.mozilla.org/index.cgi/mozilla-central/rev/3c1f72eddf61&quot;&gt;commit log&lt;/a&gt; and it turns out that the test case I had written had been included! That makes perfect sense - we want to keep the test around to make sure we don’t regress in the future - but it still surprised me. I never came to Mozilla expecting to touch such a random place in the code base. And while I wasn’t fixing the C++ code, I was still contributing. It felt good.&lt;/p&gt;
&lt;p&gt;I think &lt;em&gt;that&lt;/em&gt; is part of the power of open source.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Programming Brain Teaser]]></title><description><![CDATA[Since I was at a presentation during lunch, I took some time for myself and took a quick crack at Dustin Diaz’s programming brain teaser. He…]]></description><link>https://zpao.com/posts/programming-brain-teaser/</link><guid isPermaLink="false">https://zpao.com/posts/programming-brain-teaser/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Since I was at a presentation during lunch, I took some time for myself and took a quick crack at Dustin Diaz’s &lt;a href=&quot;http://www.dustindiaz.com/programming-brain-teaser/&quot;&gt;programming brain teaser&lt;/a&gt;. He said any language, so the quickest to get running for me is Ruby (and &lt;code class=&quot;language-text&quot;&gt;Command-R&lt;/code&gt; in Textmate is so easy).&lt;/p&gt;
&lt;p&gt;It’s not terribly clever, but it takes a different approach from some of the other solutions in that it modifies the array elements then just joins them, instead of creating a single output string and concatenating as time goes. My favorite solution in the comments used a regular expression, which I thought was particularly clever. Anyway, here’s mine:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;ruby&quot;&gt;&lt;pre class=&quot;language-ruby&quot;&gt;&lt;code class=&quot;language-ruby&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# the array&lt;/span&gt;
arr &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;a&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;b&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;c&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;c&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;d&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;e&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;a&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;a&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;a&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&apos;f&apos;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# some variables&lt;/span&gt;
count &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;
arr&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;each_index &lt;span class=&quot;token keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;# not the same as previous letter, so do some things&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; i &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;!=&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; count &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;
      arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;
      arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;count&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;count&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;
    count &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;
    put_tag &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;false&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;# increment count&lt;/span&gt;
  count &lt;span class=&quot;token operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; count &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;
  arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;
  arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;count&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; arr&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;count&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;

puts arr&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;join&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Thinking back, I should have gone for some JavaScript, since that’s mostly what I’m writing these days. Oh well.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Introducing LOLcanvas]]></title><description><![CDATA[Work has been going forward in (what will likely be) Firefox 3.1. While there are definitely changes happening in the front-end, there are…]]></description><link>https://zpao.com/posts/introducing-lolcanvas/</link><guid isPermaLink="false">https://zpao.com/posts/introducing-lolcanvas/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Work has been going forward in (what will likely be) Firefox 3.1. While there are definitely changes happening in the front-end, there are also a number of changes happening in the backend (AKA Gecko 1.9.1) as well.&lt;/p&gt;
&lt;p&gt;Gecko 1.9.1 is going to have even more improved CSS3 support, as &lt;a href=&quot;http://dbaron.org/log/20080603-new-selectors&quot;&gt;David Baron writes about&lt;/a&gt;. He’s landed support for some additional CSS selectors. Rob Arnold has recently done work on &lt;code class=&quot;language-text&quot;&gt;border-image&lt;/code&gt;, and I know at least one other intern is working on some CSS3 stuff.&lt;/p&gt;
&lt;p&gt;More relevantly though, &lt;a href=&quot;http://www.ericbutler.net/blog/2008/06/html-canvas-in-firefox-31/&quot;&gt;Eric Butler&lt;/a&gt; has done work on &lt;code class=&quot;language-text&quot;&gt;canvas&lt;/code&gt; support. One thing that he’s worked on is getting the &lt;code class=&quot;language-text&quot;&gt;canvas&lt;/code&gt; element text drawing up to speed, and more up to spec. I had some free time so I worked on a little demo to show off the new stuff.&lt;/p&gt;
&lt;p&gt;It’s called &lt;a href=&quot;http://playground.zpao.com/lolcanvas&quot;&gt;LOLcanvas&lt;/a&gt; and uses &lt;code class=&quot;language-text&quot;&gt;canvas&lt;/code&gt; to draw text on a flickr image, client side. This is similar to another project I worked on before - &lt;a href=&quot;http://flolcatr.com&quot;&gt;flolcatr&lt;/a&gt; - however now it’s all done right in the browser. Anyway, a picture is worth a thousand words, so here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/evapro/385650640/&quot;&gt;&lt;img src=&quot;http://zpao.com/images/lioncat.png&quot; alt=&quot;omg surprize it&amp;#x27;s Lion cat&quot; title=&quot;omg surprize it&amp;#x27;s Lion cat&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The details are on the &lt;a href=&quot;http://playground.zpao.com/lolcanvas&quot;&gt;LOLcanvas homepage&lt;/a&gt;, so give it a try and have fun. If you have some additional phrases to add, let me know. I’ll be throwing the readable source up somewhere soon so that you can see exactly what’s happening.&lt;/p&gt;
&lt;p&gt;Original image is &lt;a href=&quot;http://creativecommons.org/licenses/by/2.0/deed.en&quot;&gt;CC licensed&lt;/a&gt; and &lt;a href=&quot;http://www.flickr.com/photos/evapro/385650640/&quot;&gt;available here&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[It’s Awesome for a Reason]]></title><description><![CDATA[Firefox 3 came out yesterday to much fanfare and a world record. The world seems to like it, at least in general, though I have heard a bit…]]></description><link>https://zpao.com/posts/its-awesome-for-a-reason/</link><guid isPermaLink="false">https://zpao.com/posts/its-awesome-for-a-reason/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Firefox 3 came out yesterday to much fanfare and &lt;a href=&quot;http://www.spreadfirefox.com/en-US/worldrecord&quot;&gt;a world record&lt;/a&gt;. The world seems to like it, at least in general, though I have heard a bit of complaining. One thing in particular: the &lt;a href=&quot;http://blog.mozilla.com/blog/2008/04/21/a-little-something-awesome-about-firefox-3/&quot;&gt;Awesome Bar&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This has been the number one complaint I’ve heard, and to be fair, I can’t blame people. When I first downloaded a beta (or maybe a nightly) back in January, I HATED the Awesome Bar. I spent a couple hours with it and bitched to Rob (who was and still is an intern). I just wanted URLs to be matched as they always had been, with the first few letters and then a bunch of arrow pressing as I chose the right page. By the end of those hours I was frustrated as all hell and wanted out. Rob told me about the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/6227&quot;&gt;oldbar&lt;/a&gt; extension - which makes the Awesome Bar behave much like the old location bar - and installed it. I used Firefox &amp;#x26; Safari roughly equally over the next couple weeks, and then I interviewed with Mozilla.&lt;/p&gt;
&lt;p&gt;During one of my interviews (with &lt;a href=&quot;http://steelgryphon.com/blog/&quot;&gt;Mike Connor&lt;/a&gt; I believe), I was asked, “If you could change one thing about Firefox, what would it be?” I thought about it a second, and the first thing that came to mind was my new found hatred of the Awesome Bar, so I said that. I explained myself, and said some of the things that I said to Rob. My biggest gripe was that I just wanted URLs to be matched before titles of pages. Mike talked a bit about how it worked and how it used machine learning to adapt to how I used it. So if I just behaved like I used to and chose the page I was looking for, it would remember that for next time. He said it was still being tweaked and it wasn’t perfect yet, but that I really should give it another shot.&lt;/p&gt;
&lt;p&gt;So I did, and since I knew a little bit more about it, I felt a little less apprehensive about using it. So I set out to “train” it. I bit the bullet and got some inaccurate results over the next week or two. At one point in there I opened my browser and could not for the life of me think of the domain or URL for a page I knew I had been to a couple days before. I did however know what the page was about (it was something specific about Java or some such nonsense for an assignment). So I just typed the topic into the Awesome Bar. Luckily the word I was thinking had been in the page title, and &lt;del&gt;viola&lt;/del&gt; voilà - the first result after I had typed the word was the exact page I was looking for. It had proved itself to me. I probably would have spent another 20 minutes trying to remember exactly what I searched for on Google. I’ve been using it since and absolutely love it.&lt;/p&gt;
&lt;p&gt;So just give it a shot and quit complaining. Yes, it is a complete paradigm shift. But it’s not called the Awesome Bar for nothing; it really is awesome once you give it a chance.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[My First Patch]]></title><description><![CDATA[Today I put created my first patch for Firefox. It’s nothing major, but it still counts. It still hasn’t been r+ed yet (c’mon dolske…]]></description><link>https://zpao.com/posts/my-first-patch/</link><guid isPermaLink="false">https://zpao.com/posts/my-first-patch/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;Today I put created my first patch for Firefox. It’s nothing major, but it still counts. It still hasn’t been r+ed yet (c’mon &lt;a href=&quot;http://blog.mozilla.com/dolske/&quot;&gt;dolske&lt;/a&gt;!). Basically, it creates a public function that exposes a private function in the Password Manager. This makes it so that a user can have Firefox remember passwords, disable the feature to autofill login forms on page load, yet still expose the functionality to fill in the form. This opens it up for an extension to do that work.&lt;/p&gt;
&lt;p&gt;I think Justin probably &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=359675#c26&quot;&gt;said it better&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;…it seems like a legitimate use case for those who want this as an option. At the very least by adding some flags to the existing code, so an extension could drive the UI side. [Eg, currently the password manager form-fill code can only be triggered by page loads, but it should be easy to expose this as an interface for extensions.]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Better?&lt;/p&gt;
&lt;p&gt;So if you’d like to read some more about it, there’s &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=359675&quot;&gt;the discussion on Bugzilla&lt;/a&gt; and &lt;del&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=324865&amp;#x26;action=diff&quot;&gt;the diff for the patch&lt;/a&gt;&lt;/del&gt;. It’s not checked into source yet, but soon. So yea, this isn’t terribly exciting… unless you’re me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The original patch got canceled since we decided it would be better to expose just the functionality to fill a form as opposed to the whole document, at least as a first step. There’s a &lt;del&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=325053&amp;#x26;action=diff&quot;&gt;new patch&lt;/a&gt;&lt;/del&gt; in that’s now waiting for a review.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; I was very preemptive here. I should have just waited until it actually got committed. I ended up getting r-ed a couple times, but it made it in. So without further ado, &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/index.cgi/rev/055a716092aa&quot;&gt;the changeset.&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Interning at Mozilla: Week 1]]></title><description><![CDATA[I’ve just finished my first week at Mozilla. So far it’s been a blast. They’ve put us up in a really nice temporary living apartment complex…]]></description><link>https://zpao.com/posts/mozilla-week-1/</link><guid isPermaLink="false">https://zpao.com/posts/mozilla-week-1/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’ve just finished my first week at Mozilla. So far it’s been a blast. They’ve put us up in a really nice temporary living apartment complex (&lt;a href=&quot;http://www.oakwood.com/furnished-apartments/furnished/US/CA/Mountain-View/prop17/showPictures.html&quot;&gt;pictures&lt;/a&gt; and yes that &lt;em&gt;is&lt;/em&gt; a 40 person hot tub), the other interns are all really nice, and well, it’s California.&lt;/p&gt;
&lt;p&gt;This week we had a poker game / movie night. I was in on poker and turned $10 into $30, which should keep from an ATM a little bit longer. They’ve also been feeding us lunch this week; there’s a stock of good snacks &amp;#x26; cereal, so I don’t have to eat breakfast before work (although I have been).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anyway, on to Firefox.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So I am on the Firefox team for the summer. My initial goals include working on profiling startup and improving shutdown. Neither of these are one day tasks, not even 1 week. In fact, both seem pretty lofty and fun to work on.&lt;/p&gt;
&lt;p&gt;The improving shutdown part is where I’ve been focusing first - it’s something that has bothered me personally. The behavior is both inconsistent and can be pretty annoying. For example, if you close the last window vs. doing File|Exit (and have “Clear Privacy on Exit”) checked, you will have different outcomes when you try to restore your session. Not only that, but there are several different dialogs that can pop up. Then take into account leaving the Downloads window up when you close the last window — your session restore is screwed (at least last I remember). That is not the expected behavior.&lt;/p&gt;
&lt;p&gt;So all this week I’ve been digging through the Firefox source code with &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/&quot;&gt;MXR&lt;/a&gt;. I haven’t written a single line, just reading &amp;#x26; taking notes. It’s not simple. Shutdown (or “Exit” or “Quit”) goes through a number of steps and then broadcasts a &lt;code class=&quot;language-text&quot;&gt;quit-application-requested&lt;/code&gt; message. Other objects observe specific messages, so all the ones that observe &lt;code class=&quot;language-text&quot;&gt;quit-application-requested&lt;/code&gt; are then triggered. Some of these in turn trigger dialogs, set preferences, close windows, and so on. Assuming all goes well there, &lt;code class=&quot;language-text&quot;&gt;quit-application-granted&lt;/code&gt; and subsequently &lt;code class=&quot;language-text&quot;&gt;quit-application&lt;/code&gt; are broadcast. These events can be triggered in either JavaScript or C++, not to mention that sometimes the JavaScript is being called from XUL, or XUL is “run” from Javascript. It’s even more complicated than it may sound here, so maybe in a future post I’ll break it down even more. I still haven’t finished working it out completely. I’ve looked at some of the “Close Window” code as well to track down where differences lie and how that can be made more consistent… All in all, it’s hurts my brain a little bit.&lt;/p&gt;
&lt;p&gt;That said, it’s been a fun (albeit exasperating at times) week and I’m looking forward to the rest of the summer.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Reinstatement]]></title><description><![CDATA[I’ve been absent from blogging for a while now. I know, you’re all majorly disappointed. Anyway, I just wanted this to say that I’m back and…]]></description><link>https://zpao.com/posts/reinstatement/</link><guid isPermaLink="false">https://zpao.com/posts/reinstatement/</guid><dc:creator><![CDATA[Paul O’Shannessy]]></dc:creator><content:encoded>&lt;p&gt;I’ve been absent from blogging for a while now. I know, you’re all majorly disappointed. Anyway, I just wanted this to say that I’m back and powered by my own little Rails app running on &lt;a href=&quot;http://blog.dreamhost.com/2008/05/13/passenger-for-ruby-on-rails/&quot;&gt;Passenger at Dreamhost&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Blarg (this app) is really basic, uses &lt;a href=&quot;http://haml.hamptoncatlin.com/&quot;&gt;HAML&lt;/a&gt;, &lt;a href=&quot;http://github.com/matta/acts_as_taggable_on_steroids/tree/master&quot;&gt;acts_as_taggable_on_steroids&lt;/a&gt;, &amp;#x26; just some HTTP Auth… nothing fancy. Blarg is up on Github, but is private right now since it is very tailored for this site. I’ll try to abstract it out a bit and then leave it open for the world to use.&lt;/p&gt;
&lt;p&gt;Anyway, I’m hoping to get back to blogging. I’m going to try to make this a bit more professional than my last incarnation, but it will likely slip a bit into my personal life.&lt;/p&gt;</content:encoded></item></channel></rss>