<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:posterous="http://posterous.com/help/rss/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Jiaaro (on life, the universe, and everything)</title>
    <link>http://jiaaro.com</link>
    <description>Topic: hacking stuff - by James Robert</description>
    <generator>posterous.com</generator>
    <link xmlns="http://www.w3.org/2005/Atom" type="application/json" href="http://posterous.com/api/sup_update#cc8accb3e" rel="http://api.friendfeed.com/2008/03#sup" />
    
    
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Jiaaro" /><feedburner:info uri="jiaaro" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://posterous.superfeedr.com/" /><item>
      <pubDate>Wed, 12 Dec 2012 10:24:00 -0800</pubDate>
      <title>The myth of pervasive Internet &amp; why “offline mode” is the best free marketing you could ask for</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/QICm5CWlfGQ/the-myth-of-pervasive-internet-and-why-offlin</link>
      <guid isPermaLink="false">http://jiaaro.com/the-myth-of-pervasive-internet-and-why-offlin</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I'm sitting on a train, making my 45 minute, 3 mile commute.&lt;/p&gt;
&lt;p&gt;And by train, I mean: tiny aluminum can filled to capacity with iPhones and their owners.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://thechive.com/2010/12/07/subway-sardines-why-dont-asians-value-personal-space/" rel="nofollow"&gt;&lt;img src="http://thechive.files.wordpress.com/2010/12/a-tokyo-subway-sardines-10.jpg?w=500&amp;amp;h=357" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The alarming speed and sheer mass of concrete above our heads isn't getting any attention from these nerds.&lt;/p&gt;
&lt;p&gt;Because they're too busy looking at iPhones.&lt;/p&gt;
&lt;p&gt;But wait a minute &amp;ndash; not their own iPhones. A lot of them are looking at somebody else's. In fact, I'd say in a given subway ride at least half of them will glance at their neighbor's display. You know you've done it. Moving, flashing lights are hard to ignore.&lt;/p&gt;
&lt;p&gt;Eavesdropping. &lt;em&gt;iVesdropping&lt;/em&gt;? Heh. I love a good pun.&lt;/p&gt;
&lt;p&gt;Let's talk about &lt;strong&gt;pervasive Internet&lt;/strong&gt;. That idea mobile developers keep spouting about how we have Internet access "everywhere" thanks to our iThings. What shit.&lt;/p&gt;
&lt;p&gt;I spend an 90 minutes a day using an iPhone with no Internet. That's very possibly &lt;em&gt;the majority&lt;/em&gt; of my phone usage. 5 days a week.&lt;/p&gt;
&lt;p&gt;And I'm not the only one.&lt;/p&gt;
&lt;p&gt;Most of the iVesdropping I see is people watching somebody else play a game.&lt;/p&gt;
&lt;p&gt;I think it's because games are immersive and the device owner is least likely to look up and trigger that awkward moment where you both realize just how long you've been snooping.&lt;/p&gt;
&lt;p&gt;Speculations aside, this is not going away. And I know I've searched the App Store on more than one occasion for an app I saw in that sardine can.&lt;/p&gt;
&lt;p&gt;Guess which apps I never see down there. Words with friends, song pop, facebook, twitter, buffer.&lt;/p&gt;
&lt;p&gt;All those social ones that &lt;em&gt;demand&lt;/em&gt; network access.&lt;/p&gt;
&lt;p&gt;But Mail works, so does Podcasts, and Reeder, and letterpress (sort of).&lt;/p&gt;
&lt;p&gt;And I know that not everyone lives in the city. But cities are cultural centers. Getting big in New York or San-fran can catapult an app into the charts, and the visibility of being in the charts can make or break your sales numbers.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Dear app developers, I'm begging you. Please make your apps work offline. At the very least make sure they don't&amp;nbsp;&lt;strong&gt;&lt;em&gt;crash&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;when you launch them without internet (I'm looking at you zynga).&lt;/p&gt;
&lt;p&gt;It's in your best interest.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/the-myth-of-pervasive-internet-and-why-offlin"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/the-myth-of-pervasive-internet-and-why-offlin#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/QICm5CWlfGQ" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/the-myth-of-pervasive-internet-and-why-offlin</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 30 Nov 2012 08:06:00 -0800</pubDate>
      <title>The Good Idea Lottery</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/qopbwYHFkDE/the-good-idea-lottery</link>
      <guid isPermaLink="false">http://jiaaro.com/the-good-idea-lottery</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Have you ever tried to sit down and come up with a good idea?&lt;/p&gt;
&lt;p&gt;It's really hard.&lt;/p&gt;
&lt;p&gt;After long, painful hours you still have a blank sheet of paper. Not a single good idea written down. Sound familiar?&lt;/p&gt;
&lt;p&gt;I think we've all been there. If you've ever been a student you know exactly what I mean.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://esploded.s3.amazonaws.com/anon_data/2012/KlUh-mftAtWs.jpg" alt="Blank notepad" width="222" /&gt;&lt;/p&gt;
&lt;p&gt;The craziest part is that during those excruciatingly long minutes, you probably weren't even thinking of ideas the whole time. An idea comes into your mind, you consider it, decide it's not &lt;em&gt;the one&lt;/em&gt; and then you try to think of something else.&lt;/p&gt;
&lt;p&gt;But then you get distracted.&lt;/p&gt;
&lt;p&gt;You'd be appalled how much time distractions take out of the process when you do &amp;ldquo;brainstorming&amp;rdquo; this way.&lt;/p&gt;
&lt;p&gt;I've been in this situation many, &lt;em&gt;many&lt;/em&gt; times, and I finally realized something that totally changed the way I approach creative thinking:&lt;/p&gt;
&lt;blockquote class="posterous_short_quote"&gt;
&lt;p&gt;Coming up with 1 good idea is actually &lt;strong&gt;harder&lt;/strong&gt; than coming up with 10 good ideas.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It sounds crazy, but I'm about to convince you it's true ;)&lt;/p&gt;
&lt;h2&gt;Being prolific when you're brainstorming is &lt;em&gt;absolutely key&lt;/em&gt; to finding good ideas.&lt;/h2&gt;
&lt;p&gt;In part, because as humans, we're not very good at focusing our thoughts when the rest of our body is idle. But also because we're notoriously bad at identifying &lt;strong&gt;which ideas are &lt;em&gt;good&lt;/em&gt;&lt;/strong&gt;, and which ones aren't.&lt;/p&gt;
&lt;p&gt;The trick is to accept failure from the start.&lt;/p&gt;
&lt;p&gt;Most of your ideas will suck, but that's fine. Just write them all down. Every. Single. Stinking. Idea.&lt;/p&gt;
&lt;p&gt;Don't stop until you have at least 15 (and hopefully 30, 50, or 100). Every idea you write down is a ticket in the Good-Idea Lottery.&lt;/p&gt;
&lt;p&gt;Obviously this exercise leaves you with a list of dozens of ideas which you now have to vet, but (and here's a third reason to do it my way):&lt;/p&gt;
&lt;blockquote class="posterous_short_quote"&gt;
&lt;p&gt;Vetting ideas and coming up with ideas are different frames of mind.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When you're coming up with ideas you want to be open minded, creative, and optimistic. When you're vetting ideas you want to be analytical, realistic, and tactical. Trying to do both is hard &amp;ndash; yet another fault of our species &amp;ndash; &lt;a href="http://blog.bufferapp.com/what-multitasking-does-to-our-brains" title="http://blog.bufferapp.com/what-multitasking-does-to-our-brains"&gt;we suck at multi-tasking&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So how do you vet all these ideas?&lt;/p&gt;
&lt;p&gt;Well, I thought about this for a while and the answer is really: "it depends" as it always seems to be (nod to &lt;a href="http://www.startupsfortherestofus.com" title="http://www.startupsfortherestofus.com"&gt;startups for the rest of us&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;But in most cases (all?) you are well served by soliciting opinions from others.&lt;/p&gt;
&lt;p&gt;So do that.&lt;/p&gt;
&lt;p&gt;If it's artwork, show it to people with good taste.&lt;/p&gt;
&lt;p&gt;If it's a business idea, show it to some would-be customers.&lt;/p&gt;
&lt;p&gt;If it's a blog post&amp;hellip; well if it's a blog post quit loafing and just post it ;) Your loyal readers are step 1 in vetting the content. When something seems to resonate with them, &lt;a href="http://hive.rootbuzz.com/12y-the-secret-to-social-marketing-rocket-fuel" title="http://hive.rootbuzz.com/12y-the-secret-to-social-marketing-rocket-fuel"&gt;*that's* when you go all-out and try to promote it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I started doing this sort of thing a lot.&lt;/p&gt;
&lt;p&gt;At first I was just keeping hand written lists of people's feedback. Then it was excel spreadsheets.&lt;/p&gt;
&lt;p&gt;Business ideas, marketing plans, songs, resume designs&amp;hellip; all kinds of stuff.&lt;/p&gt;
&lt;p&gt;I was really just collecting anecdotes &amp;ndash; I'd ask 3 people here, 5 people there &amp;ndash; sometimes that's good enough. It's certainly a good place to start.&lt;/p&gt;
&lt;p&gt;As I continued my education I learned about statistical significance, and other fun things and the urge to make these decisions based on (more) data resurged.&lt;/p&gt;
&lt;p&gt;I was an economics student, and a closet hacker.&lt;/p&gt;
&lt;p&gt;There are a lot of ways to gather data, but I didn't use any of them. I did want any na&amp;iuml;ve hacker would: &lt;strong&gt;I built myself a tool that took all these unwashed ideas and ranked them&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And I called it the Whicher. (this may sound familiar if you follow me on twitter, facebook, etc).&lt;/p&gt;
&lt;p&gt;Essentially, you put in a question, and 20 images and it shows people 2 at a time until they've gone through all of them.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.thewhicher.com/"&gt;&lt;img src="https://whicher.s3.amazonaws.com/img/hero-screenshot.png" alt="" width="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You're probably wondering at this point, "why not just ask people to rank the ideas instead of this convoluted tournament thing?"&lt;/p&gt;
&lt;p&gt;That was my first plan.&lt;/p&gt;
&lt;p&gt;Let's rewind. It's story time&amp;hellip;&lt;/p&gt;
&lt;p&gt;My band was making a CD. There were 6 of us which meant lots of arguments about how much violin should be in the chorus of song X, and whether or not it was a good idea to cover songs our friends had written.&lt;/p&gt;
&lt;p&gt;One day we're all sitting around in the "Recording Studio" (e.g., my parent's formal living room) trying to pick which 10 of our 30ish songs &lt;em&gt;deserved&lt;/em&gt; to be included in the album.&lt;/p&gt;
&lt;p&gt;We took ourselves very seriously. Don't laugh, this is important.&lt;/p&gt;
&lt;p&gt;So Matt (drummer) proposes that we all make a top 10 list and then we'll all compare. 10 minutes of scribbling, crossing out, eraser dust, new sheets of paper, and general kindergarden activity ensues.&lt;/p&gt;
&lt;p&gt;When Matt read my list his reaction was, "really? you like Song A more than Song B?". And answer was, "No." I didn't.&lt;/p&gt;
&lt;p&gt;That's the funny thing about rankings. You can get circular logic: Song A beats Song B, Song B beats Song C, but Song C beats Song A.&lt;/p&gt;
&lt;p&gt;In other words, lots of rankings aren't necessarily transitive. A brief aside: Phil Haack wrote a fascinating article &lt;a href="http://haacked.com/archive/2012/11/27/condorcet-paradox.aspx" title="http://haacked.com/archive/2012/11/27/condorcet-paradox.aspx"&gt;about this in regards to political elections&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Our (again, suboptimal) human brains end up performing the ranking process as a series of X vs Y choices anyway.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Do I like this song more than that one, and less then the one above it? Perfect. I'll just slip it in there.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;And it occurred to me,&lt;/p&gt;
&lt;blockquote class="posterous_short_quote"&gt;
&lt;p&gt;why don't we just simplify the whole thing to just &lt;strong&gt;A&lt;/strong&gt; vs &lt;strong&gt;B&lt;/strong&gt; choices?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My hacker brain took off from there.&lt;/p&gt;
&lt;p&gt;In fact it's not just simpler, but now we can get useful data even if the person don't make a choice about every song.&lt;/p&gt;
&lt;p&gt;And besides, who are we do choose? We should ask &lt;em&gt;THE FANS&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So here we are&amp;hellip; in the present day. I didn't actually build the tool because I was too busy economics-ing or whatever.&lt;/p&gt;
&lt;p&gt;I think we voted on which songs to put on the album. yay irony!&lt;/p&gt;
&lt;p&gt;But I did &lt;em&gt;eventually&lt;/em&gt; build this thing.&lt;/p&gt;
&lt;p&gt;I'm still working on it, but you can check out &lt;a href="https://www.theWhicher.com" title="https://www.theWhicher.com"&gt;theWhicher.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, there's a little more history to the story, which you can read on &lt;a href="https://www.theWhicher.com/about/" title="https://www.theWhicher.com/about/"&gt;the Whicher's About Page&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;But really, seriously, in conclusion: Stop doing it the hard way&lt;/h2&gt;
&lt;p&gt;Don't let your single-minded, reptilian, teenaged, brain thing hold you back.&lt;/p&gt;
&lt;p&gt;Please consider brainstorming without any fear of failure; in fact, do it for me. Plan on coming up with &lt;strong&gt;swaths of bad ideas&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It's a good idea.&lt;/p&gt;
&lt;p&gt;And you'll have plenty of time to vet them afterward ;)&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/the-good-idea-lottery"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/the-good-idea-lottery#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/qopbwYHFkDE" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/the-good-idea-lottery</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 26 Jul 2012 17:49:00 -0700</pubDate>
      <title>You need to support mobile, even if you don't support mobile</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/FWmReRJedPI/you-need-to-support-mobile-even-if-you-dont-s</link>
      <guid isPermaLink="false">http://jiaaro.com/you-need-to-support-mobile-even-if-you-dont-s</guid>
      <description>&lt;p&gt;
	&lt;p&gt;
&lt;p&gt;Your application emails people when important things happen, right?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it doesn't it should. People like to know about important things (and it's the &lt;a href="http://www.kalzumeus.com/2012/05/31/can-i-get-your-email/"&gt;best marketing you could ask for&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Most people check email on their phones &amp;ndash; among other places &amp;ndash; and the &lt;em&gt;best email is actionable&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;hellip;so they log in to take care of whatever you emailed about.&lt;/p&gt;
&lt;p&gt;On their phone.&lt;/p&gt;
&lt;p&gt;You probably have more mobile traffic than you think. And if you don't, you probably don't use email very effectively.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;tl;dr: You need to support mobile, even if you don't.&lt;/strong&gt;&lt;/p&gt;
&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/you-need-to-support-mobile-even-if-you-dont-s"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/you-need-to-support-mobile-even-if-you-dont-s#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/FWmReRJedPI" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/you-need-to-support-mobile-even-if-you-dont-s</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 27 Feb 2012 09:02:00 -0800</pubDate>
      <title>Python performance the easy(ish) way</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/_arl4vkkpww/python-performance-the-easyish-way</link>
      <guid isPermaLink="false">http://jiaaro.com/python-performance-the-easyish-way</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Ctypes is great. Let's start with a simple (and trite) example: Summing a range of numbers.&lt;/p&gt;
&lt;p&gt;Here it is in python:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;def sumrange(arg):
    return sum(xrange(arg))&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Very nice! But let's say we're summing a LOT of numbers, like 0 through 10**8 (that's 100,000,000).&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; %timeit sumrange(10**2)
1000000 loops, best of 3: 1.42 us per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange(10**8)
1 loops, best of 3: 1.13 s per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange(10**10)
1 loops, best of 3: 701 s per loop&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Well that's no fun. Let's try something else:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;def sumrange2(arg):
    x = i = 0
    while i &amp;lt; arg:
        x += i
        i += 1
    return x&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;How'd we do?&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; %timeit sumrange2(10**2)
100000 loops, best of 3: 14.9 us per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange2(10**8)
1 loops, best of 3: 16.5 s per loop&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Wow... that's even worse... (I dare not attempt this one with 10**10) so how do we speed it up? (don't suggest math tricks... this is the the new world of computing!)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;*edit*&lt;/strong&gt;: yes I know there's a constant time algoritm, n*(n+1)/2 . That isn't the purpose of this post&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;how about ctypes?&lt;/p&gt;
&lt;p&gt;sumrange.c&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;#include &amp;lt;stdio.h&amp;gt;

unsigned long long sumrange(unsigned long long arg)
{
    unsigned long long i, x;
    x = 0;

    for (i = 0; i &amp;lt; arg; i++) {
        x = x + i;
    }
    return x;
}&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;compile it:&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;$ gcc -shared -Wl,-install_name,sumrange.so -o sumrange.so -fPIC sumrange.c -O2&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;and the python code...&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;import ctypes
sumrange_ctypes = ctypes.CDLL('/path/to/sumrange.so').sumrange
sumrange_ctypes.restype = ctypes.c_ulonglong&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I &lt;a href="http://stackoverflow.com/questions/12394616/python-int-overflows-when-calling-types-functions"&gt;learned on StackOverflow that you have to set the restype&lt;/a&gt; or else python will assume it's an int (which will overflow)&lt;/p&gt;
&lt;p&gt;And the winner is...?&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**8)
1000000 loops, best of 3: 590 ns per loop&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Wow that's fast... too fast. Let's experiment&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**2)
1000000 loops, best of 3: 601 ns per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**10)
1000000 loops, best of 3: 592 ns per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**16)
1000000 loops, best of 3: 602 ns per loop&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;It seems gcc has optized this into a constant time algorithm LOL. Let's try without the optimize flag (for the record I tried with -O1 and it was still contant time)&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;$  gcc -shared -Wl,-install_name,sumrange.so -o sumrange.so -fPIC sumrange.c&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;... and in python (ipython in my case)...&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**2)
1000000 loops, best of 3: 807 ns per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**8)
1 loops, best of 3: 214 ms per loop

&amp;gt;&amp;gt;&amp;gt; %timeit sumrange_ctypes(10**10)
1 loops, best of 3: 3.01 s per loop&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Roundup!&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;iterations      |   10**2       10**8       10**10                        
-------------------------------------------------------
pure python     |   1.42 us     1.13 s      701 s
ctypes          |   807 ns      214 ms      3.01 s&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;That is a hell of a performance boost!&lt;/p&gt;
&lt;p&gt;For nodejs hackers, the node equivalent of ctypes is FFI (Foreign Function Interface): &lt;a href="https://github.com/rbranson/node-ffi"&gt;https://github.com/rbranson/node-ffi&lt;/a&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/python-performance-the-easyish-way"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/python-performance-the-easyish-way#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/_arl4vkkpww" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/python-performance-the-easyish-way</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 07 Nov 2011 09:39:00 -0800</pubDate>
      <title>Why do we still hate Microsoft but love Apple?</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/J8_j15pbmss/why-do-we-still-hate-microsoft-but-love-apple</link>
      <guid isPermaLink="false">http://jiaaro.com/why-do-we-still-hate-microsoft-but-love-apple</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Apple has grown larger than Microsoft. This is old news. Steve Jobs (RIP) never became a philanthropist like Bill Gates. So why do the technorati hold Jobs in such high regard will still harboring resentment for Gates?&lt;/p&gt;
&lt;p&gt;I think the differentiation is in the context under which we use their products.&lt;/p&gt;
&lt;p&gt;I find myself with other options in every arena in which I use Apple's products. I &lt;strong&gt;choose&lt;/strong&gt; to use them because I want to.&lt;/p&gt;
&lt;p&gt;Let's compare this with Microsoft. I often find myself using Microsoft products because I have no other choices.&lt;/p&gt;
&lt;p&gt;I use Excel because Google docs wasn't able to open a complex spreadsheet created with Excel.&lt;/p&gt;
&lt;p&gt;I use Word because Open Office couldn't display the track changes recorded in Word.&lt;/p&gt;
&lt;p&gt;I use Windows to test my websites in Internet Explorer because IE isn't available anywhere else.&lt;/p&gt;
&lt;p&gt;The one &lt;strong&gt;notable exception&lt;/strong&gt; is Xbox; I love my Xbox. I chose it over playstation.&lt;/p&gt;
&lt;p&gt;I wasn't strong-armed into using Xbox through anti-competitive practices, it's a good product that I &lt;em&gt;wanted&lt;/em&gt; to use.&lt;/p&gt;
&lt;p&gt;I don't think profit, or good vs. evil has anything to do with it. We simply like companies when we&amp;nbsp;&lt;strong&gt;choose&lt;/strong&gt; to use their products -- over and over -- because they're better.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/why-do-we-still-hate-microsoft-but-love-apple"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/why-do-we-still-hate-microsoft-but-love-apple#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/J8_j15pbmss" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/why-do-we-still-hate-microsoft-but-love-apple</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 11 Aug 2011 16:41:00 -0700</pubDate>
      <title>960gs Reference</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/upth_ZziF6Q/960gs-reference</link>
      <guid isPermaLink="false">http://jiaaro.com/960gs-reference</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I am sick of the &lt;a href="http://960.gs"&gt;960.gs webpage&lt;/a&gt;&amp;nbsp;I have shit to get done and I don't want to be sold on 960 -- just remind me what the damn css classes are.&lt;/p&gt;
&lt;p&gt;Here is my own personal 960.gs documentation :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;note&lt;/strong&gt;: In the list below XX is used to denote a number of columns&lt;/p&gt;
&lt;p&gt;Quick reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;container_XX&lt;/li&gt;
&lt;li&gt;grid_XX&lt;/li&gt;
&lt;li&gt;prefix_XX&lt;/li&gt;
&lt;li&gt;suffix_XX&lt;/li&gt;
&lt;li&gt;push_XX&lt;/li&gt;
&lt;li&gt;pull_XX&lt;/li&gt;
&lt;li&gt;alpha&lt;/li&gt;
&lt;li&gt;omega&lt;/li&gt;
&lt;li&gt;clear&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;container_XX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;All elements in the page should be inside one of these -- it tells the grid system how many columns your layout should be.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;grid_XX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Makes the element XX columns wide&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;prefix_XX&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Shift the element XX columns to the right (take up XX more columns on the left)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;suffix_XX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Push the next element XX columns to the right (take up XX more columns on the right)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;push_XX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Shift this element XX columns to the &lt;strong&gt;right&lt;/strong&gt; without affecting any other elements&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;pull_XX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Shift this element XX columns to the &lt;strong&gt;left&lt;/strong&gt; without affecting any other elements&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;alpha / omega&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When using grid_XX inside another grid_XX element. use &lt;strong&gt;alpha and omega&lt;/strong&gt; on the &lt;strong&gt;first and last element&lt;/strong&gt; respectively to avoid doubling the gutter padding.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;clear&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;clears floated elements in a way that doesn't suck&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/960gs-reference"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/960gs-reference#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/upth_ZziF6Q" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/960gs-reference</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 24 Jul 2011 16:47:00 -0700</pubDate>
      <title>Google Plus is good, but don't switch to it</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/OVTRaDcNO2Y/google-plus-is-good-but-dont-switch-to-it</link>
      <guid isPermaLink="false">http://jiaaro.com/google-plus-is-good-but-dont-switch-to-it</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I'm going to assume that since you're reading this, you're a technophile and you're already in the Google+ beta. I'm not going to talk about why Google+ is good, or how google finally "got social right", or why I love it more than life itself or any such nonsense. I'm going to talk about facebook.&lt;/p&gt;
&lt;p&gt;&lt;div class='p_embed p_image_embed'&gt;
&lt;img alt="Google-plus-logotransparent" height="315" src="http://getfile2.posterous.com/getfile/files.posterous.com/temp-2011-07-24/lpqCfujwcGfodlCjvDooFBfgkfDqDktHBBGbCwqoprfrDiHtJycilqExDIBl/google-plus-logotransparent.png.scaled500.png" width="315" /&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Please don't misunderstand the title, I think you should try google+ out. If you like it (I do) then great! keep using it to your hearts content.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;It's still about search&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I'm pretty sure the primary reason for google+ is the +1 button. All this +1 action is going to give Google's search team a HUGE dataset to mine; no more scraping twitter for "social data". &lt;a href="http://blog.facebook.com/blog.php?post=33443992130"&gt;Facebook talked about doing this years ago&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It's good to understand Google's motivation before we pass judgement.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now about switching: &lt;strong&gt;don't&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Google is a very powerful company and they've (finally) created a good social network with some profound insights. One that I personally enjoy using more than facebook and twitter. Facebook is also a powerful company, let's not kid ourselves but they are *much* smaller than google.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Competition works&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If everyone switches away from facebook and uses google+ instead, what we will have is facebook again, except owned by google (remember myspace). That isn't great.&lt;/p&gt;
&lt;p&gt;Remember when Firefox started getting traction and over time started getting slow and bloated? And then Google released their own web browser, and all of a sudden Firefox was &lt;a href="http://arewefastyet.com/"&gt;getting HUGE speed improvements&lt;/a&gt;? Right now we have 4 browsers with significant marketshare (sorry opera) all competing to be fast. &lt;strong&gt;That &lt;em&gt;was&lt;/em&gt; great&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;div class='p_embed p_image_embed'&gt;
&lt;a href="http://getfile8.posterous.com/getfile/files.posterous.com/temp-2011-07-24/hkqBztwIJpwyIkyFohbmcguFDFeigffpGmCcIpqbmmgcJJzusaGIehjgllCk/browser_wars.jpg.scaled1000.jpg"&gt;&lt;img alt="Browser_wars" height="273" src="http://getfile6.posterous.com/getfile/files.posterous.com/temp-2011-07-24/hkqBztwIJpwyIkyFohbmcguFDFeigffpGmCcIpqbmmgcJJzusaGIehjgllCk/browser_wars.jpg.scaled500.jpg" width="500" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Well right now facebook has lost focus. They're the biggest by a lot and, frankly, they've got a bad case of slow-and-bloated syndrome (and a case of doing evil as well, but the degree to which they are doing it on purpose has been debated).&lt;/p&gt;
&lt;p&gt;I'd like to see facebook have a change of heart on their &lt;a href="http://www.readwriteweb.com/archives/facebooks_zuckerberg_says_the_age_of_privacy_is_ov.php"&gt;crazy policies&lt;/a&gt;, and I hope Google+ is the catalyst. But it'd be a day when google controls our search, email, phones, photos, AND social graph.&lt;/p&gt;
&lt;p&gt;Let's keep the Social Web &lt;strong&gt;competitive&lt;/strong&gt;: let's force them not to be evil (and I don't just mean Google).&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/google-plus-is-good-but-dont-switch-to-it"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/google-plus-is-good-but-dont-switch-to-it#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/OVTRaDcNO2Y" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
      <media:content type="image/jpeg" height="300" width="550" url="http://getfile5.posterous.com/getfile/files.posterous.com/temp-2011-07-24/hkqBztwIJpwyIkyFohbmcguFDFeigffpGmCcIpqbmmgcJJzusaGIehjgllCk/browser_wars.jpg">
        <media:thumbnail height="273" width="500" url="http://getfile6.posterous.com/getfile/files.posterous.com/temp-2011-07-24/hkqBztwIJpwyIkyFohbmcguFDFeigffpGmCcIpqbmmgcJJzusaGIehjgllCk/browser_wars.jpg.scaled500.jpg" />
      </media:content>
      <media:content type="image/png" height="315" width="315" url="http://getfile9.posterous.com/getfile/files.posterous.com/temp-2011-07-24/lpqCfujwcGfodlCjvDooFBfgkfDqDktHBBGbCwqoprfrDiHtJycilqExDIBl/google-plus-logotransparent.png">
        <media:thumbnail height="315" width="315" url="http://getfile2.posterous.com/getfile/files.posterous.com/temp-2011-07-24/lpqCfujwcGfodlCjvDooFBfgkfDqDktHBBGbCwqoprfrDiHtJycilqExDIBl/google-plus-logotransparent.png.scaled500.png" />
      </media:content>
    <feedburner:origLink>http://jiaaro.com/google-plus-is-good-but-dont-switch-to-it</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 16 Mar 2011 14:58:00 -0700</pubDate>
      <title>Decoding facebook's base64url signed_request</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/jOma29S_RME/decoding-facebooks-base64url-signedrequest</link>
      <guid isPermaLink="false">http://jiaaro.com/decoding-facebooks-base64url-signedrequest</guid>
      <description>&lt;p&gt;
	&lt;p&gt;In python:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
 import base64

 def signed_request_to_json(s):
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sig, encoded_json = s.split(".",2)
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;encoded_json += (len(encoded_json) % 4) * "="
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return {
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'sig': sig,
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'json': base64.b64decode(encoded_json)
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/code&gt;&amp;nbsp;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/decoding-facebooks-base64url-signedrequest"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/decoding-facebooks-base64url-signedrequest#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/jOma29S_RME" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/decoding-facebooks-base64url-signedrequest</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 15 Mar 2011 15:41:00 -0700</pubDate>
      <title>SSL Certificates are Miserable</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/5FCylB6JkX8/ssl-certificates-are-miserable</link>
      <guid isPermaLink="false">http://jiaaro.com/ssl-certificates-are-miserable</guid>
      <description>&lt;p&gt;
	&lt;p&gt;So... I was tasked with setting up https for a website recently. I was setting up Nginx with an ssl certificate from thawte. &lt;p /&gt;Pretty normal. Pretty standard. Pretty aweful.&lt;p /&gt;Here's to helping the next guy get through the process quicker than I did.&lt;p /&gt; &lt;strong&gt;&lt;span style="font-size: large;"&gt;Testing&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;div&gt;Before you start. &lt;strong&gt;Don't use a browser or openssl&lt;/strong&gt; to test your config. It will waste your time and make you unhappy.&amp;nbsp;&lt;/div&gt;
&lt;p /&gt;
&lt;div&gt;Use this tool to test your ssl config:&lt;br /&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.digicert.com/help/"&gt;http://www.digicert.com/help/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p /&gt;
&lt;h2&gt;Certificate Signing Requests (*.csr), PEM Files, Intermediary Certificates, root CACertificate, Secondary Certificate BS, and more&lt;/h2&gt;
&lt;p&gt;You should know Apache and several other web servers expect your ssl certificate to be in a separate file from the intermediary certificates Like this &lt;a href="http://www.apache-ssl.org/httpd.conf.example"&gt;example http.conf&lt;/a&gt;&lt;/p&gt;
&lt;code&gt;
 # your key file (often called www.example.com.key or privatekey.pem)
 SSLCertificateKeyFile /www/certs/ssl.fictional.co.key

# your ssl certificate (often called www.example.com.crt or certificate.pem)
SSLCertificateFile /www/certs/ssl.fictional.co.cert

#intermediary certificates (often a *.crt or *.pem file)
SSLCACertificateFile /www/certs/CA.cert
 &lt;/code&gt;
&lt;p&gt;ok great... but some other web servers expect &lt;strong&gt;your intermediary certificates to be concatenated with your ssl certificate&lt;/strong&gt; (i.e. the one you paid for). So open up notepad and copy/paste that CA.cert into the end of your ssl.fictional.co.cert and hit save.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;What about Nginx?&lt;/h2&gt;
&lt;p&gt;now your nginx config for ssl (&lt;a href="http://wiki.nginx.org/HttpSslModule"&gt;documentation here&lt;/a&gt;) will look like this:&lt;/p&gt;
&lt;code&gt;
http {
&amp;nbsp;&amp;nbsp;server {
 &amp;nbsp;&amp;nbsp; &amp;nbsp;listen 443;
&amp;nbsp;&amp;nbsp; &amp;nbsp;ssl on;

&amp;nbsp;&amp;nbsp; &amp;nbsp;# this file contains the ssl.fictional.co.cert AND CA.cert from
&amp;nbsp;&amp;nbsp; &amp;nbsp;# the apache example
&amp;nbsp;&amp;nbsp; &amp;nbsp;ssl_certificate /usr/local/nginx/conf/cert.pem;

&amp;nbsp;&amp;nbsp; &amp;nbsp;# this file corresponds to the ssl.fictional.co.key from the apache example
&amp;nbsp;&amp;nbsp; &amp;nbsp;ssl_certificate_key /usr/local/nginx/conf/cert.key;

&amp;nbsp;&amp;nbsp;}
}
&lt;/code&gt;
&lt;p&gt;Conclusion. SSL&lt;br /&gt; is a pain in the ass.&lt;/p&gt;
&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/ssl-certificates-are-miserable"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/ssl-certificates-are-miserable#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/5FCylB6JkX8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/ssl-certificates-are-miserable</feedburner:origLink></item>
    <item>
      <pubDate>Sat, 12 Feb 2011 14:58:00 -0800</pubDate>
      <title>Making Python Objects that act like Javascript Objects</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/JSBMht2Tbf0/making-python-objects-that-act-like-javascrip</link>
      <guid isPermaLink="false">http://jiaaro.com/making-python-objects-that-act-like-javascrip</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Been writing a lot of javascript and I thought this was neat:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;


class JsObject(dict):
&amp;nbsp;&amp;nbsp; &amp;nbsp;def __init__(self, *args, **kwargs):
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super(JsObject, self).__init__(*args, **kwargs)
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__dict__ = self&amp;nbsp;


&lt;/code&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/making-python-objects-that-act-like-javascrip"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/making-python-objects-that-act-like-javascrip#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/JSBMht2Tbf0" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/making-python-objects-that-act-like-javascrip</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 03 Feb 2011 10:33:00 -0800</pubDate>
      <title>OS X Devs Fail Usability: Tabbing Hotkeys</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/KBc2AWFCGKg/os-x-devs-fail-usability-tabbing-hotkeys</link>
      <guid isPermaLink="false">http://jiaaro.com/os-x-devs-fail-usability-tabbing-hotkeys</guid>
      <description>&lt;p&gt;
	&lt;p&gt;This is going to be short; I just want to point out how bad a user &lt;br /&gt;experience this is on OSX. &lt;p /&gt; On windows (and linux) there is ONE default hotkey for cycling through tabs in any UI: Ctrl + Tab &lt;p /&gt; So why does OSX have so many? Here are just a few: &lt;p /&gt; Adium: &lt;br /&gt;Cmd + left/right arrows &lt;p /&gt; Firefox, Chrome: &lt;br /&gt;Cmd + Option + left/right arrows &lt;p /&gt; Safari, Skype, Terminal: &lt;br /&gt;Cmd + Shift + left/right arrows &lt;p /&gt; The worst part about this is that it confuses the text editing options...&lt;p /&gt; If I want Cmd + arrow to go to the beginning or end of the current &lt;br /&gt;line of text and be able to hold shift to select then the Apple &lt;br /&gt;endorsed default (via safari and terminal - e.g. Cmd + Shift + arrows) is already accounted for. &lt;p /&gt; The Current state of things is not good :(&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: Things that should be reserved for consistant text editing:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Cmd + Arrow: (go to beginning/end of the current line)&lt;/p&gt;
&lt;p&gt;Cmd + Shift + Arrow: (go to beginning/end of current line while selecting)&lt;/p&gt;
&lt;p&gt;Opt + Arrow: move one word to the left or right&lt;/p&gt;
&lt;p&gt;Opt + Shift + Arrow: move one word to the left or right while selecting&lt;/p&gt;
&lt;p&gt;Shift + Arrow: move cursor one char while selecting&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as I can tell, you can't edit the Safari or terminal hot keys either :(&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/os-x-devs-fail-usability-tabbing-hotkeys"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/os-x-devs-fail-usability-tabbing-hotkeys#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/KBc2AWFCGKg" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/os-x-devs-fail-usability-tabbing-hotkeys</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 05 Dec 2010 00:23:59 -0800</pubDate>
      <title>Software is all about context</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/4P2lV2-WTRg/software-is-all-about-context</link>
      <guid isPermaLink="false">http://jiaaro.com/software-is-all-about-context</guid>
      <description>&lt;p&gt;
	In the early days, the context was the world, and you went to a computer and gave it some information to crunch and then returned to the world. Now as we move into an era dominated by computing, context is often completely within your computing experience. &lt;p /&gt;&lt;div&gt;You don&amp;#39;t do your taxes at your desk and type the mathematical computations into your computer anymore. You download your bank statements, import them into your tax software, and submit your tax returns over the internet. &lt;/div&gt; &lt;p /&gt;&lt;div&gt;If this is how things are going to be (I would bet on it). The context created by the software we create needs to be smarter.&lt;p /&gt; I don&amp;#39;t need to know about restaurants in 23rd and Park Ave (New York) when I&amp;#39;m alone in my apartment. I need to know about them when a group of friends and I spontaneously decide to go out for lunch on a thursday.&lt;/div&gt; &lt;div&gt; &lt;br /&gt;Computers have taken us a long way in terms of reducing the amount of time it takes to get information, but I think the real power is when it&amp;#39;s fast enough to effectively become augmented intelligence. Basically where internet access is fast enough that your brain going to the internet for info is more like hitting ram than hitting the hard disk (which is &lt;a href="http://i.imgur.com/X1Hi1.gif" target="_blank"&gt;slow as hell&lt;/a&gt;). We&amp;#39;re pretty close already - probably within an order or magnitude in terms of network speed.&lt;p /&gt; I don&amp;#39;t know about you, but the real problem I have, is knowing how to ask for exactly the information I want.&lt;p /&gt;As it stands, just about anyone can find the wikipedia article that contains a given bit of information without much trouble (a few minutes at most), but It could take you half an hour to read some of the articles on wikipedia enough to find the information you need. &lt;/div&gt; &lt;p /&gt;&lt;div&gt;This is the opportunity. &lt;/div&gt;&lt;p /&gt;&lt;div&gt;If there was some kind of system tracking your context the computer could do the scanning for you, and I&amp;#39;m not talking about ctrl+f.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt; What I really want to see is for the information to be prefetched and displayed automatically. The computer should be able to eliminate the: (1) google search, (2) clicking on the wikipedia result, and (3) scanning the article. &lt;/div&gt; &lt;p /&gt;&lt;div&gt;It should just skip to showing you &lt;a href="http://en.wikipedia.org/wiki/Mark_Twain#Legacy" target="_blank"&gt;that paragraph about how mark twain used his childhood friend as inspiration for a character&lt;/a&gt; so you can use him as an example for your next blog post/term paper. &lt;/div&gt; &lt;div&gt; &lt;br /&gt;Don&amp;#39;t force us to remember this stuff.&lt;p /&gt;Don&amp;#39;t force us to go look for it.&lt;p /&gt;You should be able to half remember it. Vaguely describe it, and then have your computer go through your history and show you similar things you&amp;#39;ve come across that could be the thing you mean.&lt;p /&gt; You know... the same thing your friend would do in conversation... that takes 20 minutes of both of your time to finally figure out what was on the tip of your tongue.&lt;/div&gt;&lt;p /&gt;&lt;div&gt;That&amp;#39;s how people work, and the goal is for computers to help us get things done. right?&lt;p /&gt; Computers should do that for us. They&amp;#39;re much better at these types of tasks, as long as we can write the software to figure out what info you need &lt;b&gt;right now&lt;/b&gt;.&lt;br /&gt; &lt;/div&gt;&lt;p /&gt;&lt;div&gt;That&amp;#39;s a hard example though, so here&amp;#39;s one you can implement tonight:&lt;/div&gt;&lt;p /&gt;&lt;div&gt;Let&amp;#39;s say you build software with users. Let&amp;#39;s also say that these users interact with each other.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;When you start typing into a field, try to autocomplete using first OR last name OR email address OR any other identifier in your system. And make sure people I&amp;#39;ve typed in this field before get sorted to the top. I probably mean them. Also any people I&amp;#39;ve recently connected with should get extra weight as well.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;This is pretty specific and probably wrong in your application so here is the most important part: measure your success rate. Keep track of how often I pick on of your autocomplete suggestions and keep tweaking the algorithm for better suggestive power.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;Measure --&amp;gt; update --&amp;gt; start over&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/software-is-all-about-context"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/software-is-all-about-context#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/4P2lV2-WTRg" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/software-is-all-about-context</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 02 Nov 2010 21:38:00 -0700</pubDate>
      <title>Drop.io was killed by facebook... what do I do?</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/7ktTNJv3SiU/dropio-was-killed-by-facebook-what-do-i-do</link>
      <guid isPermaLink="false">http://jiaaro.com/dropio-was-killed-by-facebook-what-do-i-do</guid>
      <description>&lt;p&gt;
	&lt;p&gt;So you had all kinds of stuff on drop.io, eh? Well my friend, lend me your ear. A few of my buddies and I are in a band. We make music. We hassle our friends to come see us play shows on facebook, and try to get our music out there any way we can.&lt;/p&gt;
&lt;p&gt;We're not beholden to some evil company, peddling our records, desperately trying to stop fans from downloading the music we make. But sometimes it's just not ready yet. During the process of creation we like to send each other different mixes and ideas, and we used to use a vanilla FTP server to do it.&lt;/p&gt;
&lt;p&gt;At some point I got tired of explaining how to use FTP to all my friends and put together a file uploading service (very similar to drop.io ;)) so we could exchange files.&lt;/p&gt;
&lt;p&gt;Anyway I guess what I'm getting at is this, it's in alpha right now. It's free to use, and the files are stored on amazon s3, so they're not at risk of getting lost.&lt;/p&gt;
&lt;p&gt;The idea is to provide more and more collaboration features as the site grows, and eventually become something like a github for everyone else (if you're unfamiliar with github, it is a site that facilitates collaboration on software projects).&lt;/p&gt;
&lt;p&gt;For anyone interested, you can email me (&lt;a href="mailto:jiaaro+ps1469492@gmail.com"&gt;jiaaro on gmail&lt;/a&gt;)&amp;nbsp;and I'll personally help you migrate your files to esploded (and give you 6 months of service for free once we do start charging)&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/dropio-was-killed-by-facebook-what-do-i-do"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/dropio-was-killed-by-facebook-what-do-i-do#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/7ktTNJv3SiU" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/dropio-was-killed-by-facebook-what-do-i-do</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 08 Oct 2010 14:23:00 -0700</pubDate>
      <title>Idea: Auto-syncing internet radio</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/mfRSMmAizFU/idea-auto-syncing-internet-radio</link>
      <guid isPermaLink="false">http://jiaaro.com/idea-auto-syncing-internet-radio</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I think it would be a neat project to make an html5 internet radio (like &lt;a href="http://mixest.com"&gt;mixest.com&lt;/a&gt; which I love) that automatically time syncs all the clients.&lt;/p&gt;
&lt;p&gt;That way you could have everyone in an office go to a certain url and all the computer's speakers combined become the house sound system.&lt;/p&gt;
&lt;p&gt;Not especially useful, but it would make a fun little&lt;a href="http://nodejs.org/"&gt; node.js&lt;/a&gt; project.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/idea-auto-syncing-internet-radio"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/idea-auto-syncing-internet-radio#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/mfRSMmAizFU" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/idea-auto-syncing-internet-radio</feedburner:origLink></item>
    <item>
      <pubDate>Sat, 02 Oct 2010 08:30:00 -0700</pubDate>
      <title>Give it to me straight</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/shYZolFTs4k/give-it-to-me-straight</link>
      <guid isPermaLink="false">http://jiaaro.com/give-it-to-me-straight</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Let's start with first principles. I want to know things; I want to know almost everything I can. In all but a select few scenarios I'll put in the time to learn something vs not.&lt;/p&gt;
&lt;p&gt;I'm not sure how this all got started, but it feels like nobody wants to explain anything anymore. I see it among friends, strangers, between parents and their children, all over.&lt;/p&gt;
&lt;p&gt;Let's take a ride in the &lt;a href="http://www.archive.org/web/web.php" title="I'm a robot"&gt;wayback machine&lt;/a&gt;.... *whirrrrrrr*&lt;/p&gt;
&lt;p&gt;Way back in the day, when I was a wee little high school student, I played the guitar. We all did. If you want to get laid in high school, you join the football team or you play guitar. I played guitar.&lt;/p&gt;
&lt;p&gt;There's actually one more step: you have to play for somebody.&lt;/p&gt;
&lt;p&gt;So there I was.&lt;/p&gt;
&lt;p&gt;Some kind soul had agreed to let us, a rowdy group of suburban teens, make loud, awesome noise for a few hours. And the guitar slingers among us were getting ready to melt faces.&lt;/p&gt;
&lt;p&gt;I doubt this particular individual understood the complex set of motives for our playing guitars (scene cred, getting laid, or both), but that's a story for another time.&lt;/p&gt;
&lt;p&gt;One particular guy, let's call him Jake, was sitting alone with his guitar doing something I'd never seen before, tuning with harmonics. It's really nothing special, but I was young and stupid and my motives were more than a little misplaced.&lt;/p&gt;
&lt;p&gt;Even despite that, I like to know things. I asked about it.&lt;/p&gt;
&lt;p&gt;"It's just a dumb trick," Jake tells me.&lt;/p&gt;
&lt;p&gt;We went back and forth for a while, him telling me it's nothing and trying to get me to leave, and my pressing for more information.&lt;/p&gt;
&lt;p&gt;I eventually got him to tell me it was the 5th and 7th fret harmonics, and you can use them to tune a guitar (in so many words). At the risk of being a huge hypocrite, I'm going to skip over that for now as it's not relevant to my story, but you can &lt;a href="http://www.youtube.com/watch?v=kSth9bmDFGg" title="Learn to tune a guitar using harmonics"&gt;learn how on youtube&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That isn't a particularly uncommon &lt;span&gt;occurence&lt;/span&gt;. Some people just don't want to explain anything.&lt;/p&gt;
&lt;p&gt;I have a couple ideas why.&lt;/p&gt;
&lt;p&gt;Maybe Jake is impatient and he doesn't want to waste his time teaching whenever he knows anything.&lt;/p&gt;
&lt;p&gt;Maybe he's shy, and embarrassed by suddenly becoming the authority on this one infinitesimally small topic.&lt;/p&gt;
&lt;p&gt;Whatever it is, he'd have saved us both some time by just spitting out the one sentence explanation. If it's the former he's doing a disservice to the world, and in the case of the latter, to himself.&lt;/p&gt;
&lt;p&gt;Google is great, but half the battle is knowing what to search for in the first place. It's usually the hardest step and presents a pretty big barrier to entry when you're first learning about anything.&lt;/p&gt;
&lt;p&gt;Until google can read minds, we still need other people to help us along the way. So don't dumb it down for me. Give it to me straight.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;(In other news, it turns out communication skills are useful for all kinds of things)&lt;/span&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/give-it-to-me-straight"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/give-it-to-me-straight#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/shYZolFTs4k" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/give-it-to-me-straight</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 13 Aug 2010 09:31:00 -0700</pubDate>
      <title>Python/Javascript Trick - Hacky Error Handling</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/4FfaZ1tCjnA/pythonjavascript-trick-hacky-error-handling</link>
      <guid isPermaLink="false">http://jiaaro.com/pythonjavascript-trick-hacky-error-handling</guid>
      <description>&lt;p&gt;
	&lt;p&gt;So I discovered an interesting way to run some code AFTER your return statement... get this (same idea works in both python and javascript)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
(function x() {
&amp;nbsp;&amp;nbsp;try {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var x = 7;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw "run catch block";
&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;catch (err) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x += 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return x;
&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;finally {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// if you return here it will override the return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// value from the catch block if it was run
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x += 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert(x); // 9
&amp;nbsp;&amp;nbsp;}
})();
// returns 8, but x === 9 !
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;or in python...&lt;/p&gt;
&lt;p&gt;&lt;code&gt; class FakeError(Exception): pass
 def my_func():
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = 7
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;raise FakeError
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;except FakeError:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x += 1
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return x
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;finally:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# if you return here it will override any value
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# returned by the except block if it was run.
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x += 1
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print x
 
 my_func() # prints "9" and THEN returns 8
 &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;pretty neat... kind of hard to read though&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/pythonjavascript-trick-hacky-error-handling"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/pythonjavascript-trick-hacky-error-handling#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/4FfaZ1tCjnA" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/pythonjavascript-trick-hacky-error-handling</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 11 Jun 2010 13:00:00 -0700</pubDate>
      <title>FizzBuzz</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/UipLP2An0Zg/fizzbuzz.html</link>
      <guid isPermaLink="false">http://jiaaro.com/2010/06/fizzbuzz.html</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Fizzbuzz seemed like fun... My 5 min attempt in python:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; for i in range(1, 101):
 &amp;nbsp;&amp;nbsp;&amp;nbsp; fizz = "Fizz" if not (i%3) else ""
 &amp;nbsp;&amp;nbsp;&amp;nbsp; buzz = "Buzz" if not (i%5) else ""
 &amp;nbsp;&amp;nbsp;&amp;nbsp; print (fizz + buzz) or i
 &lt;/code&gt;&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img class="posterous_download_image" src="https://blogger.googleusercontent.com/tracker/1087162989855557355-7682374118592403463?l=roborobert.com" height="1" alt="" width="1" /&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/2010/06/fizzbuzz.html"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/2010/06/fizzbuzz.html#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/UipLP2An0Zg" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/2010/06/fizzbuzz.html</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 03 May 2010 14:18:00 -0700</pubDate>
      <title>Why Hacker News/Webfaction was down</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/d7QVOvJVb2U/why-hacker-newswebfaction-was-down.html</link>
      <guid isPermaLink="false">http://jiaaro.com/2010/05/why-hacker-newswebfaction-was-down.html</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;span style="font-size: 85%;"&gt;Jiaaro (&lt;/span&gt;&lt;a href="http://twitter.com/Jiaaro/status/13305978016" title="twitter"&gt;&lt;span style="font-size: 85%;"&gt;twitter&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt;): &lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;span style="color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;oh boy... the datacenter where all my websites are hosted is down :(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: georgia; color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;mikegoldense (&lt;/span&gt;&lt;a href="http://twitter.com/Jiaaro/status/13306294070" title="twitter"&gt;&lt;span style="font-size: 85%;"&gt;twitter&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt;): &lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;span style="color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;@&lt;/span&gt;&lt;a href="http://twitter.com/Jiaaro" class="tweet-url username" title="Jiaaro" rel="nofollow"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-size: 85%;"&gt;Jiaaro&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt; Sorry, Jim. I tripped over the extension cord the datacenter was plugged into this morning. &lt;/span&gt;&lt;a href="http://twitter.com/search?q=%23mybad" class="hashtag tweet-url" title="#mybad" rel="nofollow"&gt;&lt;span style="font-size: 85%;"&gt;#mybad&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: georgia; color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;jiaaro (&lt;a href="http://twitter.com/Jiaaro/status/13306294070" title="twitter"&gt;twitter&lt;/a&gt;): @&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;span style="color: #333333;"&gt;&lt;a href="http://twitter.com/mikegoldense" class="tweet-url username" title="mikegoldense" rel="nofollow"&gt;&lt;span style="font-size: 85%;"&gt;mikegoldense&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt; damn... I knew we should've used more duct tape on that extension cord&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: georgia; color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;mikegoldense (&lt;a href="http://twitter.com/mikegoldense/status/13306698318" title="twitter"&gt;twitter&lt;/a&gt;): &lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;span style="color: #333333;"&gt;&lt;span style="font-size: 85%;"&gt;@&lt;/span&gt;&lt;a href="http://twitter.com/Jiaaro" class="tweet-url username" title="Jiaaro" rel="nofollow"&gt;&lt;span style="font-size: 85%;"&gt;Jiaaro&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt; Next time, PLEASE DO. You know how clumsy I am. And you've got all these dang blasted datacenters just lying around. YOUKIDSTODAY!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img class="posterous_download_image" src="https://blogger.googleusercontent.com/tracker/1087162989855557355-992861508507767449?l=roborobert.com" height="1" alt="" width="1" /&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/2010/05/why-hacker-newswebfaction-was-down.html"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/2010/05/why-hacker-newswebfaction-was-down.html#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/d7QVOvJVb2U" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/2010/05/why-hacker-newswebfaction-was-down.html</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 17 Mar 2010 13:04:00 -0700</pubDate>
      <title>Pythonic Decorators in Javascript</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/0gSbjfJLNNk/decorators-in-javascript.html</link>
      <guid isPermaLink="false">http://jiaaro.com/2010/03/decorators-in-javascript.html</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I've found plenty of examples of the Class decorator around the internets, but none of the function decorator I've come to know and love in python, so here it is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
x = function(msg) {
 alert(msg);
 return msg;
}
my_decorator = function(fn) {
 var that = this;
 return function() {
 msg = "Message: " + msg;
 return fn.apply(that, arguments);
 }
}
x = my_decorator(x);
x('qwery');

// result: an alert that says, "Message: querty"
&lt;/code&gt;&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img class="posterous_download_image" src="https://blogger.googleusercontent.com/tracker/1087162989855557355-6310338034028681538?l=roborobert.com" height="1" alt="" width="1" /&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/2010/03/decorators-in-javascript.html"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/2010/03/decorators-in-javascript.html#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/0gSbjfJLNNk" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/2010/03/decorators-in-javascript.html</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 18 Feb 2010 19:25:00 -0800</pubDate>
      <title>Automatically Update the Copyright Year with Django</title>
      <link>http://feedproxy.google.com/~r/Jiaaro/~3/oRZZV8hLuHQ/automatically-update-copyright-year.html</link>
      <guid isPermaLink="false">http://jiaaro.com/2010/02/automatically-update-copyright-year.html</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Ever get tired of updating the copyright year on your webpage? Why not update it programmatically? Django templates make it incredibly painless:&lt;p /&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;&lt;code&gt; &amp;amp;copy; {% now "Y" %} YOUR_NAME_HERE &lt;/code&gt;&lt;/p&gt;
&lt;div&gt;Yeah... it's that easy ;)&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img class="posterous_download_image" src="https://blogger.googleusercontent.com/tracker/1087162989855557355-8160782164887682962?l=roborobert.com" height="1" alt="" width="1" /&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jiaaro.com/2010/02/automatically-update-copyright-year.html"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://jiaaro.com/2010/02/automatically-update-copyright-year.html#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Jiaaro/~4/oRZZV8hLuHQ" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/669728/What_s_wrong_with_robots.png</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/5AafWFpp2Rjj</posterous:profileUrl>
        <posterous:firstName>James</posterous:firstName>
        <posterous:lastName>Robert</posterous:lastName>
        <posterous:nickName>jiaaro</posterous:nickName>
        <posterous:displayName>James Robert</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://jiaaro.com/2010/02/automatically-update-copyright-year.html</feedburner:origLink></item>
  </channel>
</rss>
