<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Mike West</title>
    <link rel="alternate"   type="text/html"            href="http://mikewest.org/" />
    <link rel="self"        type="application/atom+xml" href="http://feeds.mikewest.org/mikewest/" />
    <id>http://mikewest.org/</id>
    <updated>2009-10-04T16:31:23+00:00</updated>
    <author>
        <name>Mike West</name>
        <uri>http://mikewest.org/</uri>
        <email>mike@mikewest.org</email>
    </author>
    <entry>
        <title type='text'>Fallow fields, revisited</title>
        <link rel="alternate" href="http://mikewest.org/2009/09/fallow-fields-revisited" />
        <id>http://mikewest.org/2009/09/fallow-fields-revisited</id>
        <updated>2009-10-04T16:31:23+00:00</updated>
        <content type='html'>
&lt;p&gt;I'm currently in the process of gutting my website, and rebuilding it piece by piece.  I suspect I'm doing this to distract myself from the fact that I don&amp;rsquo;t seem to have anything interesting floating around in my head to write about.  &amp;ldquo;Surely it&amp;rsquo;s the &lt;em&gt;site&amp;rsquo;s&lt;/em&gt; fault; raze it to the ground!&amp;rdquo;, the large, simple, and shouty part of my brain tells me.  So I build anew (this is possibly &lt;a href=&quot;http://mikewest.org/2009/09/productivity-or-my-lack-thereof&quot;&gt;ironic&lt;/a&gt;, but I'm ignoring that).&lt;/p&gt;

&lt;p&gt;Happily, the small, quiet, and generally reasonable portion of my brain agrees with the plan, at least insofar as it&amp;rsquo;s clear that the current system (&lt;a href=&quot;http://github.com/mikewest/fallow/&quot;&gt;fallow&lt;/a&gt;) was a solid idea but poorly implemented.  The system works, and I'm happy I wrote it.  It was a good introduction to Ruby and Git, and a good reason to migrate off the almost-as-inefficient-as-wordpress Textpattern.  But it&amp;rsquo;s failing me in a number of ways, the most important being that I literally forgot how to get content onto the site, and it took me 45 minutes of reading through painfully structured Ruby code to figure it out again.  That&amp;rsquo;s the sort of thing that happens when you don&amp;rsquo;t touch a website for 6 months.&lt;/p&gt;

&lt;p&gt;Rather that catalog the failings of the system I'm replacing (for they are legion), I'd like to touch on the carefully considered bits I'm keeping:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;URL structure: Posts live at &lt;code&gt;/[year]/[month]/[URLified Title]&lt;/code&gt; which
seems more or less perfect to me.  It&amp;rsquo;s meaningful, while containing just
enough temporal context to make completely outdated information easy to
spot.  Moreover, it provides a natural &lt;code&gt;/[year]/&lt;/code&gt; and &lt;code&gt;/[year]/[month]/&lt;/code&gt;
for yearly and monthly archive pages.  Tag pages live under &lt;code&gt;/tags/[tag]&lt;/code&gt;,
which makes sense, and ad hoc pages have ad hoc URLs (&lt;code&gt;/is/&lt;/code&gt;, for instance).
This strikes me as a clean setup, one which I can&amp;rsquo;t see any way to improve 
upon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Content storage: The site&amp;rsquo;s content consists entirely of UTF-8 encoded text
files on disk.  Text files are simple to work with, and have a more or less
infinite shelf life.  A site like this one simply doesn&amp;rsquo;t need a database,
a single flat text file per piece of content is &lt;a href=&quot;http://mnmlist.com/a-case-for-storing-all-your-info-in-text-files/&quot;&gt;good enough&lt;/a&gt;.  Metadata
(title, tags, etc.) is contained in a YAML block at the top of each file.
It&amp;rsquo;s a format that is clear, human readable, and easily parsed, and I'm
especially pleased to see that the format I'd decided upon for Fallow
matches up quite well against more widely used systems like &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static HTML: Dynamic content doesn&amp;rsquo;t really exist on this site.  I write an
article, then post it online.  That&amp;rsquo;s the extent of the processing that
particular page needs.  The server shouldn&amp;rsquo;t be working to rebuild an
article from last week (or last year!) every time it&amp;rsquo;s requested, that&amp;rsquo;s
simply wasteful.  This site, therefore, generates a page once when it&amp;rsquo;s
created, or when a template changes, and then simply serves that cached copy
over and over again.  Similarly, overview pages (like tag pages, or current
archives) are regenerated when a new article is published, then served
straight from disk.  On a small VPS, I can serve upwards of 300 static 
requests per second through Nginx with extremely low load.  Textpattern
would fall over and die at those absurd traffic levels.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Historical redirects: The (miserable) &lt;code&gt;/blog/id/[ID]&lt;/code&gt; URL structure I
decided upon in 2005 still works for the content I've kept from that period.
The (also bad) &lt;code&gt;/archives/[Title]/&lt;/code&gt; structure from 2007-8 works too.  The
(not so lovely) Tumblr-generated links for content that used to be at
&lt;code&gt;blog.mikewest.org&lt;/code&gt; will redirect nicely.  All these old URLs will continue
to generate nice, clean permanent redirects
&lt;a href=&quot;http://www.w3.org/Provider/Style/URI&quot;&gt;for the foreseeable future&lt;/a&gt;: why make the reader jump through hoops
created by my lack of foresight?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So, those are the good bits I'd like to keep going as I rebuild.  With the understanding that I'm about to make one of those dangerous &amp;ldquo;forward looking statements&amp;rdquo; that I never seem to follow through on as cleanly as I'd like, I expect &lt;code&gt;mikewest.org&lt;/code&gt; to be running a new Jekyll-based backend sometime in October.  With luck, no one will notice a thing but me.  With even more luck, I&amp;rsquo;ll squeeze out a post or two about the bits of Jekyll I'm adjusting, and the places where it&amp;rsquo;s falling down completely.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Productivity, or my lack thereof</title>
        <link rel="alternate" href="http://mikewest.org/2009/09/productivity-or-my-lack-thereof" />
        <id>http://mikewest.org/2009/09/productivity-or-my-lack-thereof</id>
        <updated>2009-09-23T17:41:25+00:00</updated>
        <content type='html'>
&lt;p&gt;I just spent the last half-hour screwing around with my Vim configuration to set up a &amp;ldquo;more perfect&amp;rdquo; writing environment.  Fullscreen!  Eighty columns!  Proper line-wrapping!  Large, readable font!  Markdown syntax highlighting!  Spellcheck!  Etcetera, etcetera!  Hilariously wrongheaded, of course, since I created this environment &lt;em&gt;instead of&lt;/em&gt; writing anything.  Likewise, I've played around with &lt;a href=&quot;http://todotxt.com/&quot;&gt;todo.sh&lt;/a&gt; quite a bit in the last week or two (it&amp;rsquo;s nice), trying to put together a good system for recording my ever-growing list of things I need to take care of.  Perhaps there&amp;rsquo;s a reason that the list is ever-growing.&lt;/p&gt;

&lt;p&gt;Building new bash scripts that make recording tasks easier might &lt;em&gt;feel&lt;/em&gt; like Doing Important Work, but it isn&amp;rsquo;t.  Not really.  This is unfortunately true even when &amp;ldquo;write new bash scripts to make recording tasks easier&amp;rdquo; is on my newly created todo list.&lt;/p&gt;

&lt;p&gt;This is a long way of saying that &lt;a href=&quot;http://www.marco.org/about&quot;&gt;Marco Arment&lt;/a&gt; is &lt;a href=&quot;http://www.marco.org/182893582&quot;&gt;dead on&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;  The best way to increase your productivity, hack your life, and be
  minimalist is to stop reading those sites.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Also, hello again Internet.  It&amp;rsquo;s been a while.&lt;/p&gt;

&lt;p&gt;Also also, dear God is it a nightmare to publish anything here.  Who wrote this &lt;a href=&quot;http://github.com/mikewest/fallow/&quot;&gt;crap&lt;/a&gt;?&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Instapaper is Amazing</title>
        <link rel="alternate" href="http://mikewest.org/2009/03/Instapaper-is-amazing" />
        <id>http://mikewest.org/2009/03/Instapaper-is-amazing</id>
        <updated>2009-03-22T20:37:07+00:00</updated>
        <content type='html'>
&lt;p&gt;I'm subscribed to a slowly-expanding list of something like 230 RSS feeds (I
take the firehose approach to news-gathering, apparently), and for all
practical purposes, my internet experience centers around &lt;a href=&quot;http://www.newsgator.com/INDIVIDUALS/NETNEWSWIRE/&quot;&gt;NetNewsWire&lt;/a&gt;.
Most mornings, I sit down, skim through the headlines of some subset of my feeds,
and open tabs for all the the articles think I might find interesting.  Tabs
are NetNewsWire&amp;rsquo;s killer feature, so far as I'm concerned.  I can pop open a
few tabs and NNW happily keeps track of them across restarts so I don&amp;rsquo;t miss
out on whatever it was that I found interesting if I don&amp;rsquo;t read the article
immediately.&lt;/p&gt;

&lt;p&gt;Unfortunately, this is sometimes as far as I get.  On Friday, I had 97 tabs
open; some had been sitting there since &lt;em&gt;January&lt;/em&gt;, which is a bit absurd.
These were articles that I'd almost certainly find interesting, but that I
hadn&amp;rsquo;t made time to actually &lt;em&gt;read&lt;/em&gt;.  Reading ought to be the entire point of
the tab-opening process, but here I was, opening tab after tab after tab,
regardless of the queue of content I'd already identified.  Obviously
something has gone seriously wrong with my workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://carlo.zottmann.org/&quot;&gt;Carlo&lt;/a&gt; has been singing the praises of &lt;a href=&quot;http://instapaper.com/&quot;&gt;Instapaper&lt;/a&gt; for a while now, this
mountain of built up content seemed like a perfect test case.  After digging
around a bit, I came up with a script to &amp;ldquo;integrate&amp;rdquo; my Instapaper queue with
NNW (&lt;a href=&quot;http://protagonist.co.uk/nnwInstaPost/&quot;&gt;NNWInstaPost&lt;/a&gt;), and I started pushing articles to Instapaper, and
closing tabs.  This worked halfway decently (I'd like a &amp;lsquo;to Instapaper&amp;rsquo;
toolbar button in NNW.  Or a keyboard shortcut.  Or &lt;em&gt;anything&lt;/em&gt; other than
clicking through the &lt;code&gt;Scripts&lt;/code&gt; menu for each article individually).  After a
day or two, I've come to the conclusion that Carlo was right: Instapaper (in
particular, Instapaper.app on my iPhone) is &lt;em&gt;gobsmackingly brilliant&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I think I've &lt;em&gt;read&lt;/em&gt; more articles with Instapaper in the last two days than I
have in the last two weeks with NNW alone.  Walking around with a queued-up
list of content in my pocket is really quite wonderful.  I can read on the
bus.  I can read while waiting for the bus.  I can read while walking from
the bus to the subway.  I can read on the subway.  Etc, etc.&lt;/p&gt;

&lt;p&gt;I love it.  I think you will too, go &lt;a href=&quot;http://instapaper.com/&quot;&gt;try it out&lt;/a&gt;.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Opera Web Standards Curriculum: The JavaScript Bits</title>
        <link rel="alternate" href="http://mikewest.org/2009/02/opera-web-standards-curriculum-javascript" />
        <id>http://mikewest.org/2009/02/opera-web-standards-curriculum-javascript</id>
        <updated>2009-02-08T12:19:27+00:00</updated>
        <content type='html'>
&lt;p&gt;Last year, I jumped on the opportunity to sit down and write some articles for Opera&amp;rsquo;s &lt;a href=&quot;http://www.opera.com/company/education/curriculum/&quot; title=&quot;The Opera Web Standards Curriculum&quot;&gt;Web Standards Curriculum&lt;/a&gt;.  I bit off a bit more than I could chew, and Chris Mills exhibited the patience of a saint as I finished the first quickly, the second slowly, the third &lt;em&gt;very&lt;/em&gt; slowly, and then completely failed to deal with the rest.  Regardless, those were released along with the rest of the JavaScript bits to complete the curriculum.&lt;/p&gt;

&lt;p&gt;I'm not particularly proud of my end of the &lt;em&gt;process&lt;/em&gt; of getting these articles released, but I'm happy to see them released, and happier still to see the company they keep.  Chris did a brilliant job organizing a brilliant group of authors;  Opera (and Chris in particular) have organized a great body of work, which I'm proud to have had a hand in.&lt;/p&gt;

&lt;p&gt;My articles are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/javascript-functions/&quot;&gt;JavaScript Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/objects-in-javascript/&quot;&gt;Objects in JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/traversing-the-dom/&quot;&gt;Traversing the DOM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I hope you enjoy them.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Centralized Bug Tracking</title>
        <link rel="alternate" href="http://mikewest.org/2009/01/centralized-bug-tracking" />
        <id>http://mikewest.org/2009/01/centralized-bug-tracking</id>
        <updated>2009-01-10T19:32:15+00:00</updated>
        <content type='html'>
&lt;p&gt;I liked many things about working at Yahoo.  I'm coming to realize that what I (in hindsight) like &lt;em&gt;most&lt;/em&gt; is probably the piece of software I thought about the &lt;em&gt;least&lt;/em&gt; positively, namely Yahoo&amp;rsquo;s mostly centralized and completely open bug tracking system: Bugzilla.  We abused it more than a bit, attempting to layer task and project management on top of a system that wasn&amp;rsquo;t really designed to support it, but all told, Bugzilla made my work life better.&lt;/p&gt;

&lt;p&gt;As a generic employee, the centralization of bug tracking meant that I was able to quickly and easily file bugs against any Yahoo property.  I didn&amp;rsquo;t have to know who was responsible for a project in order to raise bugs against it.  I didn&amp;rsquo;t need the group responsible for a project to know &lt;em&gt;me&lt;/em&gt;.  When I saw an issue on a Yahoo site, I filed a bug against the project, and knew &lt;em&gt;someone&lt;/em&gt; with the capability to fix the issue would be notified about it.  Bugzilla minimized the friction caused by unclear answers to the question &amp;ldquo;I found a bug, now what?&amp;rdquo;.  Instead of sending out a few emails, looking for someone to stick with a problem, it gave everyone in the company a clear &amp;ldquo;next step&amp;rdquo;, and (in the best cases) fostered a corporate culture of &lt;em&gt;reporting&lt;/em&gt; bugs rather than avoiding them.&lt;/p&gt;

&lt;p&gt;As a developer, Bugzilla meant that &lt;em&gt;I&lt;/em&gt; didn&amp;rsquo;t have to keep the list of bugs on my projects.  The bug database was maintained for me, triaged and prioritized by my managers, and brutally honest.  Every bug that was reported against News sat in my queue, staring at me pleadingly until I fixed it.  I made appropriate comments on each bug when necessary, which simple integration with CVS made trivial, with the cumulative effect that I didn&amp;rsquo;t worry about forgetting to fix something, or losing track of a bug&amp;rsquo;s status.  Everything was maintained for me, removing a burden from my shoulders.&lt;/p&gt;

&lt;p&gt;This isn&amp;rsquo;t to say Bugzilla was perfect.  It was a bit of a mess, honestly, often difficult to use, full of confusing forms and confused categorizations, and plagued by an understaffed team of developers who played with the UI far too often.  For these reasons and more, it probably annoyed me more than any piece of software at Yahoo, but it&amp;rsquo;s existence was hugely advantageous.  In hindsight, I'm coming to consider this a critical component of any development team; a central bug tracking system provides &lt;strong&gt;visibility&lt;/strong&gt; and &lt;strong&gt;accountability&lt;/strong&gt; in a way difficult (impossible) to replicate with personal to-do lists and email.&lt;/p&gt;

&lt;p&gt;Don&amp;rsquo;t read this as an endorsement of Bugzilla in particular, but as an endorsement of the concept of bug tracking.  Working without a centralized bug database makes your work life more difficult for no good reason.  It&amp;rsquo;s something I highly suggest that you avoid.&lt;/p&gt;

&lt;p&gt;If you'd like to get started quickly with an externally hosted bug tracking system, I've heard good things about &lt;a href=&quot;http://lighthouseapp.com/&quot;&gt;Lighthouse&lt;/a&gt; and &lt;a href=&quot;http://sifterapp.com/&quot;&gt;Sifter&lt;/a&gt;.  I'm still looking for a locally hosted system that I like, but I've been recommended &lt;a href=&quot;http://www.mantisbt.org/&quot;&gt;Mantis&lt;/a&gt;, &lt;a href=&quot;http://www.fogcreek.com/FogBUGZ/&quot;&gt;FogBugz&lt;/a&gt;, and, of course, &lt;a href=&quot;http://www.bugzilla.org/&quot;&gt;Bugzilla&lt;/a&gt;.  Honestly, even a hand-maintained text file in &lt;a href=&quot;http://github.com/henrik/tasks.tmbundle/tree/master&quot;&gt;Tasks&lt;/a&gt; format that you print out and pin to the wall for people to write on is better than nothing.  For the sake of your own sanity, use &lt;em&gt;something&lt;/em&gt;.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Some Thoughts Regarding Caja</title>
        <link rel="alternate" href="http://mikewest.org/2008/12/some-thoughts-regarding-caja" />
        <id>http://mikewest.org/2008/12/some-thoughts-regarding-caja</id>
        <updated>2008-12-16T20:39:27+00:00</updated>
        <content type='html'>
&lt;p&gt;Yesterday, Yahoo! made some announcements regarding The Future™ of many of their high profile properties.  Specifically, they&amp;rsquo;re (slowly) opening up, enabling third-party developers to build applications that can be seen on and interact with your &lt;a href=&quot;http://my.yahoo.com/&quot;&gt;My Yahoo!&lt;/a&gt; page, or your &lt;a href=&quot;http://mail.yahoo.com/&quot;&gt;mailbox&lt;/a&gt;.  I think this is a great step, and one I wish they'd made &lt;em&gt;before&lt;/em&gt; they laid me off. &lt;/p&gt;

&lt;p&gt;Ah well.&lt;/p&gt;

&lt;p&gt;One of the core technologies that&amp;rsquo;s behind this set of features is called &lt;a href=&quot;http://code.google.com/p/google-caja/&quot;&gt;Caja&lt;/a&gt;.  Caja is a code sanitizer: it takes an HTML fragment, and JavaScript that operates on it, and &amp;ldquo;cajoles&amp;rdquo; it into a chunk that can be embedded into a page without the risk of maliciousness.  I'd like to ramble about that, briefly, at a very high level.  I'm still trying to wrap my head around it&amp;rsquo;s details&lt;/p&gt;

&lt;h2&gt;JavaScript is, simply, dangerous.&lt;/h2&gt;

&lt;p&gt;If you've paid attention to any of &lt;a href=&quot;http://developer.yahoo.com/yui/theater/&quot;&gt;Doug Crockford&amp;rsquo;s presentations&lt;/a&gt;, you&amp;rsquo;ll know that the browser security model is simply broken-as-designed.  The internet, therefore, is a place where one can barely trust &lt;em&gt;first-party&lt;/em&gt; code, much less code written by your neighbor.  You have to keep a constant eye out for new cross-site scripting vectors, and be very careful about how you filter third-party input before making it available as &amp;ldquo;user generated content.&amp;rdquo;&lt;/p&gt;

&lt;p&gt;Seen in this light, Yahoo! has a massive problem to confront with it&amp;rsquo;s new &amp;ldquo;open&amp;rdquo; initiatives.  On the one hand, they &lt;em&gt;must&lt;/em&gt; protect the security of their sites.  On the other, they want to pull in content from their users, and not just &lt;em&gt;text&lt;/em&gt;, but &lt;em&gt;code&lt;/em&gt;.  Working applications, written outside of Yahoo!, running directly &lt;em&gt;on&lt;/em&gt; a Yahoo! site.  The project specification itself is basically a nightmare scenario for the security team.  They need to find a way to include third-party JavaScript safely and sanely onto Yahoo! pages.  This mechanism needs to be pretty automatic, as they can&amp;rsquo;t dedicate an engineering team to manually review (potentially) thousands of applications.&lt;/p&gt;

&lt;p&gt;There are two broad paths to take to this end:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Code sanitization, which reads unknown code, processes it, and outputs
a sandboxed version (if possible).  &lt;a href=&quot;http://code.google.com/p/google-caja/&quot;&gt;Caja&lt;/a&gt; is the best known example of
this tact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static analysis, which reads unknown code, parses it, and gives a
thumbs-up if it only does known-safe things.  &lt;a href=&quot;http://adsafe.org/&quot;&gt;AdSafe&lt;/a&gt; is a
work-in-progress along these lines.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Yahoo!&amp;rsquo;s running with the former, so let&amp;rsquo;s dive in.&lt;/p&gt;

&lt;h2&gt;Code Sanitization&lt;/h2&gt;

&lt;p&gt;Untrusted JavaScript must not be allowed access to the &lt;code&gt;document&lt;/code&gt; or &lt;code&gt;window&lt;/code&gt; objects.  This means that it must not gain direct access to any DOM node, as every DOM node enables you to crawl back up to &lt;code&gt;document&lt;/code&gt;.  &lt;code&gt;event&lt;/code&gt; objects are right out as well, as they contain dangerous references as well.  Really, when you get right down to it, you have to throw out practically everything of practical use.&lt;/p&gt;

&lt;p&gt;I mentioned that JavaScript was broken, right?&lt;/p&gt;

&lt;p&gt;Caja is an attempt to distill a safe subset of JavaScript out of this mess through server-side sanitization.  A third-party uploads an application, consisting of JavaScript, CSS, and HTML fragments, and Caja transforms it into something that can be guaranteed not to damage the page into which it&amp;rsquo;s embedded.  This is a good thing.&lt;/p&gt;

&lt;p&gt;Caja is a capability-based system, meaning in practice that it begins by defining an extremely restrictive sandbox in which code must run, and enabling well thought-out bits of functionality by selectively injecting access as needed.&lt;/p&gt;

&lt;p&gt;Think of it this way: when you hand your car to a valet, you would be better off if you gave them the valet key, which &lt;em&gt;only&lt;/em&gt; enables them to &lt;em&gt;drive&lt;/em&gt; the car.  You shouldn&amp;rsquo;t give them &lt;em&gt;your&lt;/em&gt; key, which would also let them rummage through your glove box, etc.  In the same way, you shouldn&amp;rsquo;t give a program access to &lt;em&gt;everything&lt;/em&gt; in the DOM if it&amp;rsquo;s only supposed to change a background colour in a particular location.  You'd be better off if you could restrict it&amp;rsquo;s scope of access.  Caja attempts to do this.&lt;/p&gt;

&lt;p&gt;The token you give the valet, the key, can be looked at as a set of &lt;em&gt;capabilities&lt;/em&gt;.  The valet key enables &amp;ldquo;drive the car&amp;rdquo;, your key enables much more.  Similarly, handing an object to a program &lt;em&gt;is&lt;/em&gt; handing it capabilities, enabling it to act in whatever ways are exposed by that object.  Since JavaScript&amp;rsquo;s default objects are &lt;em&gt;so&lt;/em&gt; overpowered, Caja exposes a new set of objects that completely wrap things like the DOM or the event model, and rewrites input programs to use these objects instead, severely limiting the damage they can do.  These wrapper objects contain a series of runtime checks to ensure that a malicious program hasn&amp;rsquo;t somehow broken out of their constraints, and the entire rewriting process fails if the program is written in such a way as to make it impossible to sandbox.&lt;/p&gt;

&lt;h2&gt;Big Drawback&lt;/h2&gt;

&lt;p&gt;Though I understand Caja&amp;rsquo;s practical necessity, I really don&amp;rsquo;t like the way it works.  In short: it breaks progressive enhancement completely, and introduces a hard dependency on JavaScript for functionality.&lt;/p&gt;

&lt;p&gt;As a quick demo, let&amp;rsquo;s look at the following code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;searchbox.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;link rel=stylesheet href=&quot;searchbox.css&quot; /&amp;gt; 
&amp;lt;form&amp;gt; 
  &amp;lt;input type=&quot;text&quot; size=&quot;60&quot; name=&quot;q&quot;&amp;gt; 
  &amp;lt;input type=&quot;button&quot; value=&quot;Search&quot; onclick=&quot;doSearch(this)&quot;&amp;gt; 
&amp;lt;/form&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After &amp;ldquo;cajoling&amp;rdquo;, it will look something more like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
IMPORTS___.htmlEmitter___.p('form') 
    .a('onsubmit', 'return false') 
    .ih('  &amp;lt;input type=&quot;text&quot; size=&quot;60&quot; name=&quot;q&quot;&amp;gt;\n' 
      + '  &amp;lt;input type=&quot;button&quot; value=&quot;Search&quot;' 
      + ' onclick=&quot;return plugin_dispatchEvent___(…)&quot;&amp;gt;\n') 
    .e('form'); 
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The HTML is transformed into a series of JavaScript method calls that &lt;em&gt;generate&lt;/em&gt; HTML.  This makes sense, as it enables Caja to retain complete control over what&amp;rsquo;s written to the page, but it has the side effect of making the form completely inaccessible to anyone who isn&amp;rsquo;t running JavaScript.&lt;/p&gt;

&lt;p&gt;I'd much prefer more thought to be put into &lt;a href=&quot;http://adsafe.org/&quot;&gt;AdSafe&lt;/a&gt;, which sets up the same sort of wrapped-object sandbox, as well as a series of rules which third-party developers must follow.  The system them simply &lt;em&gt;verifies&lt;/em&gt; that they have done so, rather than rewriting their code to ensure that they have.  If the rules are solid, the effect will be the same as can be achieved with Caja, but much more elegant, and with more respect for the fundamentals of the web.&lt;/p&gt;

&lt;p&gt;Crockford has (finally) put up some example code on the &lt;a href=&quot;http://adsafe.org/&quot;&gt;AdSafe site&lt;/a&gt;.  I'd suggest that you go take a look at it.  It looks like a very interesting way to program indeed.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>My job's value</title>
        <link rel="alternate" href="http://mikewest.org/2008/11/my-jobs-value" />
        <id>http://mikewest.org/2008/11/my-jobs-value</id>
        <updated>2008-11-30T15:50:24+00:00</updated>
        <content type='html'>
&lt;p&gt;Recently, I wrote a &lt;a href=&quot;/2008/11/the-inspiration-of-ownership&quot; title=&quot;Mike West: &amp;lsquo;The Inspiration of Ownership&amp;rsquo;&quot;&gt;short article&lt;/a&gt; on the effect a team&amp;rsquo;s sense of ownership in it&amp;rsquo;s projects can have on the finished product.  The &lt;a href=&quot;/2008/11/mike-has-been-laid-off&quot;&gt;surprising twist&lt;/a&gt; in my professional life last week has led me back onto the same train of thought, but I'm coming to it from a slightly different angle.  I discussed &amp;ldquo;ownership&amp;rdquo; in a narrow sense, relating to a team&amp;rsquo;s involvement with and responsibility for decisions made about a project&amp;rsquo;s vision and direction.  This isn&amp;rsquo;t the only way in which the word has impact; one also has &amp;ldquo;ownership&amp;rdquo; of a project in the broader sense of pure possession.&lt;/p&gt;

&lt;p&gt;A relatively famous study offered a representative sample of students a straight choice between a bar of chocolate and a coffee mug.  Opinions were split: neither bars nor mugs were substantially preferred.  If, however, a group was &lt;em&gt;given&lt;/em&gt; one, and then asked if they'd like to trade it for the other, surprisingly few would.  Even though the items were roughly equivalent in the abstract, &lt;em&gt;possession&lt;/em&gt; (however brief) seemed to imbue them with irrationally high value.  &lt;em&gt;My&lt;/em&gt; coffee mug is much more important &lt;em&gt;to me&lt;/em&gt; than some random bar of chocolate with which I have no relationship, even if I've only had &lt;em&gt;my&lt;/em&gt; mug for a few minutes.  Even if it&amp;rsquo;s a bit chipped and cracked, it&amp;rsquo;s &lt;em&gt;mine&lt;/em&gt;, and that counts for something.&lt;/p&gt;

&lt;p&gt;The economist &lt;a href=&quot;http://en.wikipedia.org/wiki/Richard_Thaler&quot; title=&quot;Wikipedia: &amp;lsquo;Richard Thaler&amp;rsquo;&quot;&gt;Richard Thaler&lt;/a&gt; coined the term &amp;ldquo;endowment effect&amp;rdquo; to describe this phenomenon, and I'm reminded very strongly of it as I start looking around for a new job.  Now that my projects at Yahoo! have been taken from me, I'm starting to wonder whether I perhaps I've been valuing them more than I rationally ought.  There are a lot of good jobs out there, and I'm relatively sure of finding one quite quickly.  Perhaps &lt;em&gt;my&lt;/em&gt; job wasn&amp;rsquo;t the best for me after all.  Perhaps that bar of chocolate across the room is significantly tastier than I expect.  Perhaps.&lt;/p&gt;

&lt;p&gt;This, of course, is nothing more than a thinly veiled attempt to rationalize to myself the thought that it&amp;rsquo;s really not all that bad to have my position yanked out from under me.  It&amp;rsquo;s not quite working.&lt;/p&gt;

&lt;p&gt;Yet.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>Has Mike been laid off?  Yes.  Yes he has.</title>
        <link rel="alternate" href="http://mikewest.org/2008/11/mike-has-been-laid-off" />
        <id>http://mikewest.org/2008/11/mike-has-been-laid-off</id>
        <updated>2008-11-21T17:13:13+00:00</updated>
        <content type='html'>
&lt;p&gt;Yahoo! has decided to close down the engineering team in it&amp;rsquo;s German office, of which I am (er&amp;hellip; &lt;a href=&quot;http://hasmikebeenlaidoffyet.info/&quot;&gt;was&lt;/a&gt;) a part.  I'm suddenly &lt;em&gt;incredibly&lt;/em&gt; motivated to look for new work.&lt;/p&gt;

&lt;p&gt;If you happen to know of an exciting web company somewhere in or around Munich that&amp;rsquo;s in need of a solid webdev, please &lt;a href=&quot;mailto:mike%40mikewest.org&quot;&gt;drop me an email (mike@mikewest.org)&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/mikewest&quot;&gt;ping me on twitter&lt;/a&gt;, &lt;a href=&quot;/resume&quot;&gt;take a look at my resume&lt;/a&gt; (or &lt;a href=&quot;http://www.linkedin.com/in/mikewestorg&quot;&gt;linkedin profile&lt;/a&gt;, if that&amp;rsquo;s your style), or give me a call ( +49 176 4854 6453 ).  I'd really &lt;em&gt;love&lt;/em&gt; to hear any and all leads you might have.  :)&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>I &hearts; GitHub</title>
        <link rel="alternate" href="http://mikewest.org/2008/11/i-love-github" />
        <id>http://mikewest.org/2008/11/i-love-github</id>
        <updated>2008-11-16T16:53:09+00:00</updated>
        <content type='html'>
&lt;p&gt;Over the last two or three weeks, a substantial subset of my friends and colleagues have started using &lt;a href=&quot;http://github.com/&quot;&gt;GitHub&lt;/a&gt; to host some of their personal projects.  I'm really enjoying this influx, and it&amp;rsquo;s inspiring in a way I didn&amp;rsquo;t really expect.  GitHub has done nothing less than to make my friend&amp;rsquo;s coding activity &lt;em&gt;visible&lt;/em&gt; to me, and mine visible to them.  This doesn&amp;rsquo;t sound like much, but it&amp;rsquo;s simply transformative; If this is how &amp;ldquo;normal&amp;rdquo; people feel about Facebook, then I can start to understand how it&amp;rsquo;s captured so much mindshare.&lt;/p&gt;

&lt;h3&gt;Coding in the Open&lt;/h3&gt;

&lt;p&gt;Visibility is inspiration and accountability.  Watching talented developers Get Things Done™ around me gives me impetus to start putting something together of my own.  &lt;a href=&quot;http://neilcrosby.com/&quot;&gt;Neil&lt;/a&gt; was creating a new repository every day at one point, and &lt;a href=&quot;http://marknormanfrancis.com/&quot;&gt;Norm&lt;/a&gt;&amp;rsquo;s potential set of projects is great to see.  The whole group of Londoners are setting an example I'd like to live up to, and at the same time generating gentle social pressure for me to build something exciting of my own.  Watching practically everyone I know fork &lt;a href=&quot;http://github.com/norm/homedir/tree/master&quot;&gt;Norm&amp;rsquo;s &lt;code&gt;homedir&lt;/code&gt;&lt;/a&gt; immediately after he put it online is simply brilliant.  I want that to happen to &lt;em&gt;my&lt;/em&gt; projects.  You couldn&amp;rsquo;t ask for better, more constructive peer pressure.&lt;/p&gt;

&lt;p&gt;To that end, I'm putting as much of my current code as possible out into the open.  I'm not generating a whole lot of code that I'd expect to be of use to anyone but myself at the moment, but even so, I &lt;em&gt;work harder&lt;/em&gt; when I know that people I respect will be seeing what I'm producing.  I'm coding for myself, but an audience changes the way I think about what I'm doing; The simple fact that my friends are following my progress on GitHub is reason enough to try to exceed their expectations.&lt;/p&gt;

&lt;p&gt;Moreover, I've been able to convince myself that even &lt;em&gt;robot&amp;rsquo;s&lt;/em&gt; opinions matter.  Just knowing that &lt;a href=&quot;http://calendaraboutnothing.com/&quot;&gt;CalendarAboutNothing&lt;/a&gt; is &lt;a href=&quot;http://calendaraboutnothing.com/%7Emikewest&quot;&gt;watching my every commit&lt;/a&gt; gives me reason to make sure that I make a little bit of time every day to sit down and write something resembling quality code.  It&amp;rsquo;s a simple thing, and has been much more effective than I thought it would be over the last ~2 weeks.  I highly recommend trying it out; soon you&amp;rsquo;ll be just as hooked on big red X&amp;rsquo;s as I've become.&lt;/p&gt;

</content>
    </entry>    <entry>
        <title type='text'>An Admonition Regarding Details</title>
        <link rel="alternate" href="http://mikewest.org/2008/11/an-admonition-regarding-details" />
        <id>http://mikewest.org/2008/11/an-admonition-regarding-details</id>
        <updated>2008-11-11T22:33:41+00:00</updated>
        <content type='html'>
&lt;p&gt;If Apple&amp;rsquo;s taught me anything about design, it&amp;rsquo;s that details are everything.  The overall product might be brilliant, but it&amp;rsquo;s the tiny bits of &lt;em&gt;perfection&lt;/em&gt; that really bring things together and imbue an experience with a sense of wonder and care.  When I noticed that &lt;a href=&quot;http://robgoodlatte.com/&quot;&gt;Rob Goodlatte&lt;/a&gt; (who has gone dark, apparently?) replaces the ampersands on his Lucida Grande dominated page with lovely, lovely Baskerville, I was thrilled.  The first time I saw the little bit of bounce-back at the end of an iPhone&amp;rsquo;s scrolled list, I was hooked.  These almost insignificant changes have an effect on the overall experience far out of proportion to their apparent importance.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s important, however, not to miss the forest for the trees.  Attention to details will often make or break a project, but first laying down a solid foundation of functionality in broad strokes is &lt;em&gt;critical&lt;/em&gt;.  If you haven&amp;rsquo;t yet &lt;em&gt;built&lt;/em&gt; a bit of your application, worrying about making it pixel-perfect cross-browser and subtly animated to amaze your users is nonsensical and counterproductive.&lt;/p&gt;

&lt;p&gt;Put (virtual) pen to (virtual) paper, and start working.  Details will fall into place naturally, either in the nooks and crannies of unconnected code you cleverly hack together to solve a problem, or in the long periods of iteration and polishing that you&amp;rsquo;ll start to go through near the middle of a project when things &lt;em&gt;mostly&lt;/em&gt; work.&lt;/p&gt;

&lt;p&gt;Test-Driven Development generally advocates that you should begin by ignoring (irrelevant) details and &amp;ldquo;Do the simplest thing that could possibly work.&amp;rdquo;  &lt;a href=&quot;http://neilcrosby.com/vcard/&quot;&gt;Neil Crosby&lt;/a&gt; similarly says &amp;ldquo;&lt;a href=&quot;http://thecodetrain.co.uk/2008/11/make-it-work-make-it-pretty-make-it-right/&quot;&gt;Make it work, Make it pretty, Make it right&lt;/a&gt;.&amp;rdquo;  My Dad (enthralled with the message while completely missing the commercial point of the Nike campaign) always told us &amp;ldquo;Just do it.&amp;rdquo;  These are starting to resonate with me, and I like the idea of the development process as a continual process of iteration, building something delightful&lt;/p&gt;

&lt;p&gt;This, of course, is a long-winded way of justifying the &lt;a href=&quot;http://github.com/mikewest/fallow/commit/9d9b4e69e56841fabe38eb4724caa8b629f40db3&quot;&gt;gaudy hack I've just put into Fallow&lt;/a&gt; to handle simple conditionals in templates.  It&amp;rsquo;s ugly, but functional, and I know I can make it cleaner tomorrow.  But right now, it works; That&amp;rsquo;s better than yesterday, and I can live with that.&lt;/p&gt;

</content>
    </entry>
</feed>
<!-- Served uncached, via Fallow: 0.068003 seconds.  Probably 1 database query. -->