<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Patrick Collison's Blog</title>
	<link>http://collison.ie/blog</link>
	<description>I hate self-referential taglines</description>
	<pubDate>Sat, 18 Dec 2010 21:57:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>27C3</title>
		<link>http://collison.ie/blog/2010/12/27c3</link>
		<comments>http://collison.ie/blog/2010/12/27c3#comments</comments>
		<pubDate>Sat, 18 Dec 2010 21:57:55 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2010/12/27c3</guid>
		<description><![CDATA[I&#8217;m heading to 27C3 this year, but all the tickets appear to be sold out. If any blog readers happen to know how I could get a ticket, I&#8217;d greatly appreciate it if you could drop me a line.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m heading to <a href="http://events.ccc.de/congress/2010/wiki/Main_Page">27C3</a> this year, but all the tickets appear to be sold out. If any blog readers happen to know how I could get a ticket, I&#8217;d greatly appreciate it if you could drop me a line.</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2010/12/27c3/feed</wfw:commentRss>
		</item>
		<item>
		<title>Social services</title>
		<link>http://collison.ie/blog/2010/11/social-services</link>
		<comments>http://collison.ie/blog/2010/11/social-services#comments</comments>
		<pubDate>Sun, 28 Nov 2010 16:15:28 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2010/11/social-services</guid>
		<description><![CDATA[Explaining the various new baubles of the internet to an iPhone-less visitor over Thanksgiving prompted me to put this taxonomy together. It&#8217;s somewhat unfairly (and perhaps meaninglessly) reductionist, but I was surprised by how neatly the services fit into this kind of ontology.


Service
Primary element
Feed-based
Primarily mobile
Subscription
Default public
Likes
Comments
Arbitrary restriction


Facebook
Status update
Yes
No
Symmetric
No
Yes
Yes
5000 friends


Foursquare
Check-in
No
Yes
Symmetric
No
No
No



Twitter
Textual status update
Yes
Yes
Asymmetric
Yes
No
No
140 character updates


Instagram
Photo
Yes
Yes
Asymmetric
Yes
Yes
Yes
Square pictures


Path
Photo
Yes
Yes
Asymmetric
No
No
No
50 friends


Quora
Question [...]]]></description>
			<content:encoded><![CDATA[<p>Explaining the various new baubles of the internet to an iPhone-less visitor over Thanksgiving prompted me to put this taxonomy together. It&#8217;s somewhat unfairly (and perhaps meaninglessly) reductionist, but I was surprised by how neatly the services fit into this kind of ontology.</p>
<table>
<tr>
<th>Service</th>
<th>Primary element</th>
<th>Feed-based</th>
<th>Primarily mobile</th>
<th>Subscription</th>
<th>Default public</th>
<th>Likes</th>
<th>Comments</th>
<th>Arbitrary restriction</th>
</tr>
<tr>
<td>Facebook</td>
<td>Status update</td>
<td>Yes</td>
<td>No</td>
<td>Symmetric</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
<td>5000 friends</td>
</tr>
<tr>
<td>Foursquare</td>
<td>Check-in</td>
<td>No</td>
<td>Yes</td>
<td>Symmetric</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td></td>
</tr>
<tr>
<td>Twitter</td>
<td>Textual status update</td>
<td>Yes</td>
<td>Yes</td>
<td>Asymmetric</td>
<td>Yes</td>
<td>No</td>
<td>No</td>
<td>140 character updates</td>
</tr>
<tr>
<td>Instagram</td>
<td>Photo</td>
<td>Yes</td>
<td>Yes</td>
<td>Asymmetric</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Square pictures</td>
</tr>
<tr>
<td>Path</td>
<td>Photo</td>
<td>Yes</td>
<td>Yes</td>
<td>Asymmetric</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>50 friends</td>
</tr>
<tr>
<td>Quora</td>
<td>Question answer</td>
<td>Yes</td>
<td>No</td>
<td>Asymmetric</td>
<td>Yes</td>
<td>No</td>
<td>Yes</td>
<td></td>
</tr>
</table>
<p>Am I missing any important properties?</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2010/11/social-services/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tracing memory leaks in Ruby</title>
		<link>http://collison.ie/blog/2010/06/tracing-memory-leaks-in-ruby</link>
		<comments>http://collison.ie/blog/2010/06/tracing-memory-leaks-in-ruby#comments</comments>
		<pubDate>Sun, 27 Jun 2010 21:10:45 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2010/06/tracing-memory-leaks-in-ruby</guid>
		<description><![CDATA[A project I&#8217;m working on at the moment has a lot of long-lived objects, and we want to make sure that everything gets garbage collected correctly.
While trying to track down some issues, I wished I had Squeak&#8217;s PointerExplorer, which makes it easy to examine the references to an object—and figure out who&#8217;s causing problems by [...]]]></description>
			<content:encoded><![CDATA[<p>A project I&#8217;m working on at the moment has a lot of long-lived objects, and we want to make sure that everything gets garbage collected correctly.</p>
<p>While trying to track down some issues, I wished I had Squeak&#8217;s <a href="http://map.squeak.org/package/1508934b-79ea-4216-956c-1948e9d48aad">PointerExplorer</a>, which makes it easy to examine the references to an object—and figure out who&#8217;s causing problems by hanging on to one.</p>
<p>After a quick look at a <a href="http://timetobleed.com/memprof-a-ruby-level-memory-profiler/">few</a> <a href="http://blog.evanweaver.com/articles/2007/04/28/bleak_house/">existing</a> tools for tracing leaks, it doesn&#8217;t appear that there&#8217;s currently any way of doing this. So I took some <a href="http://timetobleed.com/plugging-ruby-memory-leaks-heapstack-dump-patches-to-help-take-out-the-trash/">code</a> from Joe Damato, updated it a bit, and implemented two things: weak arrays, and <tt>GC.heap_find()</tt>.</p>
<p>Weak arrays work pretty much as you&#8217;d expect:</p>
<pre>&gt;&gt; a = []
=&gt; []
&gt;&gt; a.weak = true
=&gt; true
&gt;&gt; 1000.times { a &lt;&lt; Object.new }
=&gt; 1000
&gt;&gt; GC.start
=&gt; nil
&gt;&gt; a[200]
=&gt; nil</pre>
<p>Like the PointerExplorer, <tt>GC.heap_find</tt> scans the heap to find references to an object. Since it uses the same algorithms that the garbage collector itself uses, it won&#8217;t miss anything. (If Ruby&#8217;s mark-and-sweep collector can&#8217;t find your object, it&#8217;s not going to be kept.)</p>
<pre>&gt;&gt; obj = Object.new
=&gt; #&lt;Object:0x1007f6900&gt;
&gt;&gt; a = [obj]
=&gt; [#&lt;Object:0x1007f6900&gt;]
&gt;&gt; h = {:foo =&gt; 2, :bar =&gt; obj}
=&gt; {:bar=&gt;#&lt;Object:0x1007f6900&gt;, :foo=&gt;2}
&gt;&gt; refs = GC.heap_find(obj)
=&gt; [{:bar=&gt;#&lt;Object:0x1007f6900&gt;, :foo=&gt;2}, [#&lt;Object:0x1007f6900&gt;]]
&gt;&gt; refs[1].object_id
=&gt; 2151609120
&gt;&gt; a.object_id
=&gt; 2151609120</pre>
<p>One slight issue is that <tt>heap_find</tt> can&#8217;t return some objects that are traversed by Ruby&#8217;s GC, but aren&#8217;t first class Ruby objects—things like <tt>SCOPE</tt>s and <tt>VARMAP</tt>s. <tt>heap_find</tt> could indicate their presence somehow, but, since they&#8217;re not first class, they can&#8217;t be returned directly. This isn&#8217;t that big a deal: memory issues here are pretty unlikely, and any present probably indicate a bug in Ruby itself.</p>
<p>Because the arrays returned by <tt>heap_find</tt> are weak, you can continue to explore the object graph as far as you like, without worrying about them interfering with the results, and leading to confusing additional references.</p>
<pre>&gt;&gt; refs.weak?
=&gt; true
&gt;&gt; obj2 = Object.new
=&gt; #&lt;Object:0x1013ec9c0&gt;
&gt;&gt; foo = [1, 2, obj2]
=&gt; [1, 2, #&lt;Object:0x1013ec9c0&gt;]
&gt;&gt; GC.heap_find(obj2)
=&gt; [[1, 2, #&lt;Object:0x1013ec9c0&gt;]]
&gt;&gt; foo.weak = true
=&gt; true
&gt;&gt; GC.heap_find(obj2)
=&gt; []
</pre>
<p><a href="/code/gcpatch.txt">Here&#8217;s the patch</a> for ruby 1.8.7-p174 (shipped with OS X 10.6).</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2010/06/tracing-memory-leaks-in-ruby/feed</wfw:commentRss>
		</item>
		<item>
		<title>A good email client, please.</title>
		<link>http://collison.ie/blog/2010/02/a-good-email-client-please</link>
		<comments>http://collison.ie/blog/2010/02/a-good-email-client-please#comments</comments>
		<pubDate>Tue, 02 Feb 2010 00:31:30 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2010/02/a-good-email-client-please</guid>
		<description><![CDATA[Gmail proved that, despite the apparently high switching costs, a new webmail client can quickly get a lot of traction. There&#8217;s room now to do to Gmail what Gmail did to everything else. The replacement should have some concept of workflow (&#8221;archive, but remind me to respond tomorrow&#8221;, &#8220;send, and alert me if I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Gmail proved that, despite the apparently high switching costs, a new webmail client can quickly get a lot of traction. There&#8217;s room now to do to Gmail what Gmail did to everything else. The replacement should have some concept of workflow (&#8221;archive, but remind me to respond tomorrow&#8221;, &#8220;send, and alert me if I don&#8217;t get a response within a few days&#8221;), some concept of teams and colleagues (allow threads to be shared as a first-class object, rather than flailing around with forwards and CC lines), be some way smart about mining the semi-structured mails going through the system (flight booking emails should be automatically annotated with .ics files), know something about prioritization (I like Twitter DMs because of the assumption that they&#8217;ll go to a mobile device. If I&#8217;ve sent more than 20 emails to someone, they should have the option of copying their mail to me as an SMS).</p>
<p>Potentially most powerfully of all, developers should be able create their own plug-ins that run on the server. There should be an agreement between plug-in developers and the webmail provider that creating a plug-in automatically grants a royalty-free perpetual irrevocable worldwide (etc.) license to the provider, and that the source code to any plug-in may be merged into the main product. Though plug-ins have niche appeal, this could be a good source of new features, and a strong competitive advantage. I&#8217;d just fix Gmail if I could.</p>
<p>I&#8217;d happily pay for any service that got this stuff right.</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2010/02/a-good-email-client-please/feed</wfw:commentRss>
		</item>
		<item>
		<title>clean-downloads</title>
		<link>http://collison.ie/blog/2009/12/clean-downloads</link>
		<comments>http://collison.ie/blog/2009/12/clean-downloads#comments</comments>
		<pubDate>Wed, 09 Dec 2009 06:28:42 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/12/clean-downloads</guid>
		<description><![CDATA[This has solved the eternal &#8220;there&#8217;s 3GB of stuff in my Downloads directory that I don&#8217;t feel comfortable deleting&#8221; problem for me:
$ crontab -l
0 * * * *   /Users/patrick/Binaries/clean-downloads
$ cat Binaries/clean-downloads
#!/bin/zsh
find ~/Downloads -maxdepth 1 -amin +720 -exec mv {} ~/.Trash \;
You have twelve hours to do something with whatever it is you downloaded, [...]]]></description>
			<content:encoded><![CDATA[<p>This has solved the eternal &#8220;there&#8217;s 3GB of stuff in my Downloads directory that I don&#8217;t feel comfortable deleting&#8221; problem for me:</p>
<pre>$ crontab -l
0 * * * *   /Users/patrick/Binaries/clean-downloads
$ cat Binaries/clean-downloads
#!/bin/zsh
find ~/Downloads -maxdepth 1 -amin +720 -exec mv {} ~/.Trash \;</pre>
<p>You have twelve hours to do something with whatever it is you downloaded, or it&#8217;ll end up in the Trash. I highly recommend it.</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/12/clean-downloads/feed</wfw:commentRss>
		</item>
		<item>
		<title>Surprises</title>
		<link>http://collison.ie/blog/2009/10/surprises</link>
		<comments>http://collison.ie/blog/2009/10/surprises#comments</comments>
		<pubDate>Mon, 19 Oct 2009 00:41:53 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Start-ups]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/10/surprises</guid>
		<description><![CDATA[Someone asked me today what surprised me most about doing a start-up. This was my response:

How slowly things change. When we started Auctomatic in mid-2007, eBay was dominant but faltering, PayPal was lumbering along without any innovation, Facebook was amazing everyone (and scaring Google) with their growth, the iPhone was reshaping the cell phone industry, [...]]]></description>
			<content:encoded><![CDATA[<p>Someone asked me today what surprised me most about doing a start-up. This was my response:</p>
<ul>
<li>How slowly things change. When we started Auctomatic in mid-2007, eBay was dominant but faltering, PayPal was lumbering along without any innovation, Facebook was amazing everyone (and scaring Google) with their growth, the iPhone was reshaping the cell phone industry, and everyone was talking about Twitter. Two and a half years on, that still sounds like a reasonable assessment of things. With Auctomatic, we felt this tremendous sense of urgency. That may have been good for other reasons, but it was misguided. When building something, I now think you should assume that you&#8217;ve plenty of time, and that very little will change in the interim. (This is, admittedly, the kind of rule that works until it doesn&#8217;t.)</li>
<li>Tied to this, the realization that a good product is so much more important than first mover advantage. Obvious, but keeps surprising me. Facebook, the iPhone, Dropbox, Skype, etc., have an amazing array of failed predecessors.</li>
<li>Succeeding at biz dev just requires endless persistence.</li>
<li>Internationalization is an underexploited axis—people try to expand on the x-y plane, and ignore this third dimension. We grew our <a href="http://steamheavyindustries.com">iPhone app</a> revenue by over 200% through internationalization. The biggest competitve advantage we ever had with Auctomatic was supporting the obscure international eBay sites that the big US players ignored. I&#8217;m generalizing from pretty limited experience, but if I were a floundering start-up trying to get to cashflow positive, internationalizing is probably the first trick I&#8217;d try.</li>
<li>How dangerous the assumption that you&#8217;re going to grow is: &#8220;oh, we need to build this this way, because when we&#8217;re successful, we&#8217;ll need it&#8221;. This is often used as an argument against over-engineering for scalability, but it applies more generally. Now, when coding, I try to think: &#8220;how can I write this such that if people saw my code, they&#8217;d be amazed at how little there is and how little it does&#8221;.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/10/surprises/feed</wfw:commentRss>
		</item>
		<item>
		<title>Undop</title>
		<link>http://collison.ie/blog/2009/08/undop</link>
		<comments>http://collison.ie/blog/2009/08/undop#comments</comments>
		<pubDate>Sun, 16 Aug 2009 00:10:51 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/08/undop</guid>
		<description><![CDATA[Like most internet users, I waste too much time on the web. Despite that, I&#8217;ve never had much luck with the apps that set out to solve this, like Freedom or RescueTime. They feel too heavy-handed. Instead, I want fairly repetitive and annoying prods that make wasting time less fun&#8212;the equivalent of small electric shocks, [...]]]></description>
			<content:encoded><![CDATA[<p>Like most internet users, I waste too much time on the web. Despite that, I&#8217;ve never had much luck with the apps that set out to solve this, like <a href="http://macfreedom.com/">Freedom</a> or <a href="http://www.rescuetime.com/">RescueTime</a>. They feel too heavy-handed. Instead, I want fairly repetitive and annoying prods that make wasting time less fun&mdash;the equivalent of small electric shocks, counterbalancing the <a href="http://www.slate.com/id/2224932/">Dopamine hits</a>.</p>
<p>So here&#8217;s <a href="http://github.com/pc/undop">undop</a>. Every time I visit a domain in <tt>~/.bad_sites</tt>, it dims the display by 30%, gradually returning it to its previous brightness over the course of 30 seconds. It&#8217;s both an annoyance and a reminder. The effect is small enough that I don&#8217;t mind it on those occasions when I actually <i>do</i> want to read Twitter or Hacker News or whatever blog, but it&#8217;s jarring enough that I now subconsciously avoiding following links to them, and have mostly broken the check-for-new-stuff muscle memory.</p>
<p><!--Overall, it seems to be a good test: if I'm not willing to endure the fleeting inconvenience of a marginally darker display, I should probably not be doing --></p>
<p>Caveats: it only works with Safari on OS X. (Patches with support for other browsers welcome.) I&#8217;m guessing it might not be good for display backlights.</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/08/undop/feed</wfw:commentRss>
		</item>
		<item>
		<title>Facebook doesn&#8217;t want you to deactivate your account</title>
		<link>http://collison.ie/blog/2009/07/facebook-doesnt-want-you-to-deactivate-your-account</link>
		<comments>http://collison.ie/blog/2009/07/facebook-doesnt-want-you-to-deactivate-your-account#comments</comments>
		<pubDate>Sun, 05 Jul 2009 22:49:43 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/07/facebook-doesnt-want-you-to-deactivate-your-account</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://collison.ie/pics/60b1637dffc83eeb2597be5afe89fe5c.png"><img style="border: none" width="600" src="http://collison.ie/pics/60b1637dffc83eeb2597be5afe89fe5c.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/07/facebook-doesnt-want-you-to-deactivate-your-account/feed</wfw:commentRss>
		</item>
		<item>
		<title>Screenshots to URLs</title>
		<link>http://collison.ie/blog/2009/06/screenshots-to-urls</link>
		<comments>http://collison.ie/blog/2009/06/screenshots-to-urls#comments</comments>
		<pubDate>Sun, 28 Jun 2009 23:14:10 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/06/screenshots-to-urls</guid>
		<description><![CDATA[Whenever I take a screenshot, the next step is usually to paste it into an email or IM conversation. Here&#8217;s a modified version of a launchd script for OS X, originally from Avi, that automates that: whenever you take a screenshot, it uploads it to a server of your choice, places the URL on the [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever I take a screenshot, the next step is usually to paste it into an email or IM conversation. <a href="http://gist.github.com/137399">Here&#8217;s</a> a modified version of a launchd script for OS X, originally from <a href="http://avibryant.com">Avi</a>, that automates that: whenever you take a screenshot, it uploads it to a server of your choice, places the URL on the clipboard, and beeps. Download and execute the script to install the service. It assumes you use key-based SSH authentication.</p>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/06/screenshots-to-urls/feed</wfw:commentRss>
		</item>
		<item>
		<title>Where&#8217;d that code go?</title>
		<link>http://collison.ie/blog/2009/06/whered-that-code-go</link>
		<comments>http://collison.ie/blog/2009/06/whered-that-code-go#comments</comments>
		<pubDate>Sun, 28 Jun 2009 23:02:28 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://collison.ie/blog/2009/06/whered-that-code-go</guid>
		<description><![CDATA[$ &#60; ~/Binaries/git-find-removal
#!/bin/zsh
if [ $# != 2 ] ; then
  echo "$0 &#60;commit&#62; &#60;string&#62;" &#62;/dev/stderr
  exit 1
fi
git bisect start
git bisect good $1
git bisect bad
git bisect run grep -qRE $2 .
$ git-find-removal HEAD~20 'def my_important_function'
]]></description>
			<content:encoded><![CDATA[<pre>$ &lt; ~/Binaries/git-find-removal
#!/bin/zsh
if [ $# != 2 ] ; then
  echo "$0 &lt;commit&gt; &lt;string&gt;" &gt;/dev/stderr
  exit 1
fi
git bisect start
git bisect good $1
git bisect bad
git bisect run grep -qRE $2 .</pre>
<pre>$ git-find-removal HEAD~20 'def my_important_function'</pre>
]]></content:encoded>
			<wfw:commentRss>http://collison.ie/blog/2009/06/whered-that-code-go/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

