<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I’m Rob Sobers: a hacker who writes about building software and startups.</description><title>accidental hacker</title><generator>Tumblr (3.0; @rsobers)</generator><link>http://accidentalhacker.com/</link><item><title>Fixed Bid Contracts</title><description>&lt;p&gt;I was listening to &lt;a href="http://rubyfreelancers.com/the-ruby-freelancers-show-057-fixed-bids/" target="_blank"&gt;episode 57&lt;/a&gt; of the Ruby Freelancers Show yesterday and, while some of the advice was fairly good, one of the panelists said something really counter-intuitive.&lt;/p&gt;

&lt;p&gt;Eric Davis remarked that fixed vs. hourly is merely semantics since customers are essentially trying to map the project&amp;#8217;s cost to their budget to ensure there is a cap on their spend.&lt;/p&gt;

&lt;p&gt;Eric says:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you really think about it, if you have a fixed bid contract that&amp;#8217;s, say, 6 months and you’re bidding $60,000, you’re actually just saying &amp;#8216;That’s still a variable rate&amp;#8217;. The unit of time is 6 months and the cost per unit of time is $60,000.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The premise that the goal of a fixed bid is to map the project&amp;#8217;s cost to a budget misses the primary reason for fixed bids: &lt;strong&gt;fixing the cost to a specific outcome.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In an hourly arrangement, when you use up the allotted hours, the project stops whether the code compiles or not.  Same with a 6 month, $60,000 contract.  After 6 months, we stop working.  With an actual fixed bid contract, a customer will almost always want to specify something like: &amp;#8220;I get X product with Y features completed and bug free for $10,000.&amp;#8221;&lt;/p&gt;

&lt;p&gt;The bottom line: fixed bid == fixed payment &lt;strong&gt;+ fixed deliverable&lt;/strong&gt;&lt;/p&gt;</description><link>http://accidentalhacker.com/post/48946744949</link><guid>http://accidentalhacker.com/post/48946744949</guid><pubDate>Fri, 26 Apr 2013 15:43:31 -0400</pubDate><category>freelancing</category><category>consulting</category></item><item><title>parislemon:

buzzfeed:

collegehumor:

12 Game of Thrones House...</title><description>&lt;img src="http://24.media.tumblr.com/7cd3eacd41fd39092818ffc0784aa995/tumblr_mkfnqbeRkV1qasthro1_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/cde5298606ffe0305354be883cc0975b/tumblr_mkfnqbeRkV1qasthro2_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/17d0c3c18d253049c34507cecd6e6997/tumblr_mkfnqbeRkV1qasthro3_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/81a357cc7ec3712e3bf7a15e6574bb70/tumblr_mkfnqbeRkV1qasthro4_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;&lt;a href="http://parislemon.com/post/46713860311/buzzfeed-collegehumor-12-game-of-thrones" class="tumblr_blog" target="_blank"&gt;parislemon&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://buzzfeed.tumblr.com/post/46608375534/collegehumor-12-game-of-thrones-house-sigils" class="tumblr_blog" target="_blank"&gt;buzzfeed&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://blog.collegehumor.com/post/46606675692/12-game-of-thrones-house-sigils-for-the" target="_blank"&gt;collegehumor&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://www.collegehumor.com/article/6880782/12-game-of-thrones-house-sigils-for-the-internet" target="_blank"&gt;&lt;strong&gt;12 Game of Thrones House Sigils for the Internet&lt;/strong&gt;&lt;/a&gt; [Click for more]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Behold the mighty clans of Web-steros! &lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://i.imgur.com/3tM6yv0.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;Okay guys, I whipped up a quick one for you guys.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Perfect.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/46731900349</link><guid>http://accidentalhacker.com/post/46731900349</guid><pubDate>Sun, 31 Mar 2013 00:09:28 -0400</pubDate></item><item><title>Breaking Down Amazon's Mega Dropdown</title><description>&lt;a href="http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown"&gt;Breaking Down Amazon's Mega Dropdown&lt;/a&gt;: &lt;p&gt;Love it.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/44712605823</link><guid>http://accidentalhacker.com/post/44712605823</guid><pubDate>Wed, 06 Mar 2013 11:51:37 -0500</pubDate><category>code</category></item><item><title>parislemon:

robsheridan:

Fantastic advertising for Game of...</title><description>&lt;img src="http://24.media.tumblr.com/5ce79240ea65b35b0756d75166398a13/tumblr_mivjdio0Hz1qa0uc2o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://parislemon.com/post/44147703403/robsheridan-fantastic-advertising-for-game-of" class="tumblr_blog" target="_blank"&gt;parislemon&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://robsheridan.tumblr.com/post/44133171777/fantastic-advertising-for-game-of-thrones-in-the" target="_blank"&gt;robsheridan&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Fantastic advertising for &lt;em&gt;Game of Thrones&lt;/em&gt; in the &lt;em&gt;New York Times&lt;/em&gt; (the dragon shadow is printed on the paper over regular articles). &lt;a href="http://www.buzzfeed.com/erinlarosa/mind-blowing-game-of-thrones-ad-in-the-new-york-times?utm_campaign=socialflow&amp;utm_source=twitter&amp;utm_medium=buzzfeed" target="_blank"&gt;More&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Excellent.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/44167309075</link><guid>http://accidentalhacker.com/post/44167309075</guid><pubDate>Wed, 27 Feb 2013 17:14:52 -0500</pubDate></item><item><title>9 Easy Questions</title><description>&lt;a href="http://www.slideshare.net/spolsky/outc"&gt;9 Easy Questions&lt;/a&gt;: &lt;p&gt;This slide deck by Joel Spolsky is slathered in pure truth.&lt;/p&gt;

&lt;p&gt;I wish I was smart enough to recognize these things when I graduated college.  I’ve learned most of them the hard way; the others came to light during my privileged time working for Joel at Fog Creek.&lt;/p&gt;

&lt;p&gt;If you ever talk to young developers, designers, or product managers about career path, please dog-ear this link and pass it along.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/42147796351</link><guid>http://accidentalhacker.com/post/42147796351</guid><pubDate>Sat, 02 Feb 2013 20:37:00 -0500</pubDate><category>career</category></item><item><title>"As a manager, I can’t easily know how many hours each person on my team is working. This is actually..."</title><description>“As a manager, I can’t easily know how many hours each person on my team is working. This is actually good for me because &lt;em&gt;it forces me to look at what they’ve done.&lt;/em&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://blog.stackoverflow.com/2013/02/why-we-still-believe-in-working-remotely/" target="_blank"&gt;http://blog.stackoverflow.com/2013/02/why-we-still-believe-in-working-remotely/&lt;/a&gt;&lt;/em&gt;</description><link>http://accidentalhacker.com/post/42053821204</link><guid>http://accidentalhacker.com/post/42053821204</guid><pubDate>Fri, 01 Feb 2013 18:18:51 -0500</pubDate><category>teams</category></item><item><title>nevver:

Vintage Japanese camera-like Logos</title><description>&lt;img src="http://25.media.tumblr.com/b01a3e11274c82e353eff3c0aa500c00/tumblr_mhdauj3PUx1qz6f9yo1_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/4654b512524e2a2ccf4b2ba85b59447d/tumblr_mhdauj3PUx1qz6f9yo2_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/5fe7993017daa7096ca742cf2d09c91b/tumblr_mhdauj3PUx1qz6f9yo3_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/3f14c6eac6f66e5b17ec95e24eacb48c/tumblr_mhdauj3PUx1qz6f9yo4_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/6058966299c99d8a23e30ab40266e17c/tumblr_mhdauj3PUx1qz6f9yo5_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;&lt;a href="http://thisisnthappiness.com/post/41757231229/vintage-japanese-camera-like-logos" class="tumblr_blog" target="_blank"&gt;nevver&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://www.dezeen.com/2013/01/28/made-in-japan-logos-by-antrepo/" target="_blank"&gt;Vintage Japanese camera-like Logos&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/41913596589</link><guid>http://accidentalhacker.com/post/41913596589</guid><pubDate>Wed, 30 Jan 2013 21:26:40 -0500</pubDate></item><item><title>gameofthrones:

I made  a Game of Thrones themed dinner planning...</title><description>&lt;img src="http://24.media.tumblr.com/050cbc29f705c11d8ae422c96413fbc4/tumblr_mh5t8xWjgQ1rsg038o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://gameofthrones.tumblr.com/post/41438960431/i-made-a-game-of-thrones-themed-dinner-planning" class="tumblr_blog" target="_blank"&gt;gameofthrones&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I made  a Game of Thrones themed dinner planning menu for my fridge.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/41452209724</link><guid>http://accidentalhacker.com/post/41452209724</guid><pubDate>Fri, 25 Jan 2013 13:23:24 -0500</pubDate></item><item><title>Rails has Two Default Stacks</title><description>&lt;a href="http://words.steveklabnik.com/rails-has-two-default-stacks"&gt;Rails has Two Default Stacks&lt;/a&gt;: &lt;blockquote&gt;Starting Rails today is like starting to watch a soap opera in the 7th season.&lt;/blockquote&gt;

&lt;p&gt;Wise words here. Learn how to ride the bike before you pick out your custom wheels and sidecar.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/40535455377</link><guid>http://accidentalhacker.com/post/40535455377</guid><pubDate>Mon, 14 Jan 2013 14:47:00 -0500</pubDate></item><item><title>parislemon:

nevver:

“No chance the iPhone is going to get any...</title><description>&lt;img src="http://25.media.tumblr.com/849767e3895370e8c6bd8d129b86a1a8/tumblr_mgdi7noUHx1qz6f9yo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://parislemon.com/post/40126467219/nevver-no-chance-the-iphone-is-going-to-get" class="tumblr_blog" target="_blank"&gt;parislemon&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://thisisnthappiness.com/post/40109230832/no-chance-the-iphone-is-going-to-get-any" class="tumblr_blog" target="_blank"&gt;nevver&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;“No chance the iPhone is going to get any significant market share.” — &lt;a href="http://dailyexhaust.com/2013/01/iphone-vs-microsoft.html" target="_blank"&gt;Microsoft CEO Steve Ballmer, 2007&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Reblog-bait.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/40159772977</link><guid>http://accidentalhacker.com/post/40159772977</guid><pubDate>Thu, 10 Jan 2013 01:22:59 -0500</pubDate></item><item><title>What would the greatest technological leap you'd have to explain to someone who time traveled from the 1950's?</title><description>&lt;p&gt;&lt;a href="http://nonchalantrepreneur.com/post/39896022627/what-would-the-greatest-technological-leap-youd-have" class="tumblr_blog" target="_blank"&gt;cdixon&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;I possess a device in my pocket that is capable of accessing the entirety of information known to man.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I use it to look at pictures of cats and get in arguments with strangers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Bill_Gross/status/288115780531412992" target="_blank"&gt;via&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/39910993348</link><guid>http://accidentalhacker.com/post/39910993348</guid><pubDate>Mon, 07 Jan 2013 01:04:08 -0500</pubDate></item><item><title>msg:

explore-blog:

Chuck Close on creativity

The rest of this...</title><description>&lt;img src="http://24.media.tumblr.com/19d3dd427218a64e3a8366f0dede9251/tumblr_mfp3lwABw01rqpa8po1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://www.michaelgalpert.com/post/38956982173/explore-blog-chuck-close-on-creativity-the" target="_blank"&gt;msg&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a class="tumblr_blog" href="http://exp.lore.com/post/38952042248/chuck-close-on-creativity" target="_blank"&gt;explore-blog&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Chuck Close&lt;/strong&gt; &lt;a href="http://www.brainpickings.org/index.php/2012/12/27/chuck-close-on-creativity/" target="_blank"&gt;on creativity&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The rest of this quote is glorious as well:&lt;/p&gt;
&lt;p&gt;“Inspiration is for amateurs — the rest of us just show up and get to work. And the belief that things will grow out of the activity itself and that you will — through work — bump into other possibilities and kick open other doors that you would never have dreamt of if you were just sitting around looking for a great ‘art idea.’ And the belief that process, in a sense, is liberating and that you don’t have to reinvent the wheel every day. Today, you know what you’ll do, you could be doing what you were doing yesterday, and tomorrow you are gonna do what you did today, and at least for a certain period of time you can just work. If you hang in there, you will get somewhere.”&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/39006829782</link><guid>http://accidentalhacker.com/post/39006829782</guid><pubDate>Thu, 27 Dec 2012 22:26:59 -0500</pubDate></item><item><title>Rocking GTD with Trello</title><description>&lt;a href="http://whiletruecode.com/post/rocking-gtd-with-trello"&gt;Rocking GTD with Trello&lt;/a&gt;: &lt;p&gt;I’m a &lt;em&gt;very&lt;/em&gt; heavy Trello user and erudite GTD’er, so I was thrilled to stumble upon Josh Earl’s GTD-with-Trello &lt;a href="http://whiletruecode.com/post/rocking-gtd-with-trello" target="_blank"&gt;system&lt;/a&gt;, which I’m going to experiment with.&lt;/p&gt;

&lt;p&gt;I’ve been using Ryan Carson’s (non-GTD, but effective) &lt;a href="http://ryancarson.com/post/25580650719/7-dos-and-donts-for-founders" target="_blank"&gt;approach to organizing TODOs&lt;/a&gt; with Trello for a few months.  It’s worked well, but my biggest impediment lately has been my failure to clearly define—in GTD parlance—a next &lt;strong&gt;physical&lt;/strong&gt; action for every project.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is critical.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If I don’t have a list of next physical actions in front of me when I sit down at my desk I invariably spend 10-15 minutes (and lots of mental cycles) simply &lt;em&gt;deciding&lt;/em&gt; what the hell I should be doing.  Sometimes I pay that tax multiple times a day.&lt;/p&gt;

&lt;p&gt;If I had a list of very clearly defined, &lt;strong&gt;bite-sized&lt;/strong&gt; actions, I wouldn’t have to think. I could just churn and burn.&lt;/p&gt;

&lt;p&gt;Before GTD was published, Joel Spolsky &lt;a href="http://www.joelonsoftware.com/articles/fog0000000245.html" target="_blank"&gt;wrote about&lt;/a&gt;  the importance of nailing down very fine-grained tasks in order to accurately estimate your time:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you are sloppy, and pick big “chunky” tasks…then you haven’t really thought about what you are going to do. And when you haven’t thought about what you’re going to do, you just can’t know how long it will take.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But a nice side-effect that Joel doesn’t mention is that, when you know what you’re going to do, you can stop stressing and do your job.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/37883161398</link><guid>http://accidentalhacker.com/post/37883161398</guid><pubDate>Thu, 13 Dec 2012 22:18:00 -0500</pubDate><category>gtd</category><category>trello</category></item><item><title>"You can tell something is important when people spend money on it and when one person is responsible..."</title><description>“You can tell something is important when people spend money on it and when &lt;em&gt;one&lt;/em&gt; person is responsible for it.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Merlinn Mann / 46:30
&lt;a href="http://www.43folders.com/2010/04/27/impro-talk" target="_blank"&gt;http://www.43folders.com/2010/04/27/impro-talk&lt;/a&gt;&lt;/em&gt;</description><link>http://accidentalhacker.com/post/37683052590</link><guid>http://accidentalhacker.com/post/37683052590</guid><pubDate>Mon, 10 Dec 2012 21:10:00 -0500</pubDate></item><item><title>How to Redirect Tumblr Post URLs After Migrating a Blog</title><description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;For the solution, click &lt;a href="#tldr" target="_blank"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Tumblr has a great feature that lets you create multiple blogs beneath a single umbrella account.  However, your &lt;strong&gt;primary&lt;/strong&gt; blog&amp;#8212;i.e., the one you create &lt;em&gt;first&lt;/em&gt;&amp;#8212;is &lt;strong&gt;special&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;How so?&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;When you &amp;lt;3 someone else&amp;#8217;s Tumblr post, the action is associated with your primary blog&lt;/li&gt;
&lt;li&gt;You can only follow other blogs with your primary blog&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;There are some other details, outlined &lt;a href="http://www.tumblr.com/docs/en/blog_management" target="_blank"&gt;here&lt;/a&gt;, but the above are the ones I care about most.  I couldn&amp;#8217;t display my &amp;#8220;likes&amp;#8221; in the sidebar if this were a secondary blog.&lt;/p&gt;

&lt;p&gt;Critically, you &lt;em&gt;cannot&lt;/em&gt; change which blog acts as your primary blog, so if you mess up (like I did) you&amp;#8217;re kinda stuck.  &lt;em&gt;Kinda.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Tumbeasts&lt;/h2&gt;

&lt;p&gt;All of my Pulitzer-winning blog content was stuck in a puny secondary blog.  Ideally I would have been able to delete my primary blog and promote my secondary blog.  But since that isn&amp;#8217;t possible, for what I assume are architectural reasons, I had to come up with a Plan B, otherwise:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_meonaewtyu1qaex6z.png" alt="Tumbeasts"/&gt;&lt;/p&gt;

&lt;h2&gt;Plan B: Move the posts (duh)&lt;/h2&gt;

&lt;p&gt;Here is the plan I drafted:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Copy &amp;amp; paste the post titles and content from my secondary blog to my primary blog&lt;/li&gt;
&lt;li&gt;Publish the posts on the primary blog&lt;/li&gt;
&lt;li&gt;Edit the posts and change the publish dates to match when they were originally published&lt;/li&gt;
&lt;li&gt;Re-point my custom domain (accidentalhacker.com) to my primary blog&lt;/li&gt;
&lt;li&gt;Create Tumblr &lt;a href="http://support.tumblr.com/post/23625479768/how-to-make-redirect-pages" target="_blank"&gt;redirect pages&lt;/a&gt; for each of the old post URLs so that they redirect to the new post URLs&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Solid plan.  Everything worked smoothly&amp;#8230;until step 5.  When I tried to redirect my old post URLs like so:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_meolbpztF21qaex6z.png" alt="Tumblr redirect page"/&gt;&lt;/p&gt;

&lt;p&gt;I got the following error message:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_meolfviP0L1qaex6z.png" alt="No redirect for you!"/&gt;&lt;/p&gt;

&lt;p&gt;Ack!  Looks like Tumblr is being protective of their &lt;code&gt;/post/1234&lt;/code&gt; URL format.  They don&amp;#8217;t want you to define a static page (or redirect) whose URL could conflict with the URL of a regular Tumblr post.  Understandable.&lt;/p&gt;

&lt;p&gt;But now I have dilemma.  All the inbound links (and Google SERPs) point to the old Tumblr post URLs, which I &lt;strong&gt;cannot&lt;/strong&gt; redirect on the server.  They generate 404s from the new blog now.  Editing the old posts does no good because the accidentalhacker.com domain name no longer points there.&lt;/p&gt;

&lt;h2 id="tldr"&gt;JavaScript, FTW&lt;/h2&gt;

&lt;p&gt;To solve the problem, I edited my primary blog&amp;#8217;s theme HTML (via the Customize menu) and in the &lt;code&gt;&amp;lt;head&amp;gt;...&amp;lt;/head&amp;gt;&lt;/code&gt; put the following bit of code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;
    // if the URL contains the ID of an old post, redirect to the corresponding new post URL
    if(window.location.href.indexOf("16116466587") != -1) {
        window.location.replace("http://accidentalhacker.com/post/37384370552/please-dont-learn-to-code");
    } else if(window.location.href.indexOf("15551408069") != -1) {
        window.location.replace("http://accidentalhacker.com/post/37385466610/using-mercurial-subrepositories");
    } else if(window.location.href.indexOf("15521210350") != -1) {
         window.location.replace("http://accidentalhacker.com/post/37385931471/sticky-notes-with-css3");
    }
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, if my blog detects the ID of one of the old posts in the URL, it redirects the visitor transparently via JavaScript using &lt;code&gt;window.location.replace&lt;/code&gt;.  Done!&lt;/p&gt;

&lt;p&gt;(Thankfully Tumblr leaves the URL in tact on 404s and doesn&amp;#8217;t auto-redirect to something generic like &lt;code&gt;accidentalhacker.com/404&lt;/code&gt;, otherwise this wouldn&amp;#8217;t be possible.)&lt;/p&gt;

&lt;p&gt;This method might not be scalable for people importing hundreds of posts, but I neither is copy/pasting all the content.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/37431059019</link><guid>http://accidentalhacker.com/post/37431059019</guid><pubDate>Fri, 07 Dec 2012 17:58:00 -0500</pubDate><category>code</category><category>tumblr</category></item><item><title>
Great Houses by Narwen 
</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo2_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo7_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo6_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo9_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo5_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo3_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_mbn1dhxNxa1rtug9eo8_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Great Houses&lt;/strong&gt; by &lt;a href="http://7narwen.deviantart.com/" target="_blank"&gt;Narwen&lt;/a&gt; &lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://accidentalhacker.com/post/33531784071</link><guid>http://accidentalhacker.com/post/33531784071</guid><pubDate>Sat, 13 Oct 2012 20:39:12 -0400</pubDate></item><item><title>Please don't learn to code</title><description>&lt;p&gt;I remember stumbling upon &lt;a href="http://tryruby.org" target="_blank"&gt;tryruby.org&lt;/a&gt; a few years back.  It was this neat little web-based shell that helped teach Ruby in a fun and interactive way.&lt;/p&gt;

&lt;p&gt;The site lowered the barrier to entry for newcomers: you didn&amp;#8217;t have to download anything; you didn&amp;#8217;t need an editor or an interpreter; you didn&amp;#8217;t even have to know what a shell was.  You would simply read the instructions on the screen, type some commands, hit enter, and immediately see the results.  In mere seconds, you were coding.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lxz9fvQIwk1qaex6z.jpg" alt="Try Ruby"/&gt;&lt;/p&gt;

&lt;p&gt;This was just one of &lt;a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff" target="_blank"&gt;why the lucky stiff&amp;#8217;s&lt;/a&gt; many whimsical creations aimed at spreading the joy of coding.  Nowadays, there are dozens of interactive code tutorial sites trying to do the same thing, mostly for profit.  Some have even &lt;a href="http://techcrunch.com/2011/10/27/codecademy-raises-2-5-million-to-teach-you-how-to-code/" target="_blank"&gt;raised millions in venture capital&lt;/a&gt; to fuel their efforts.&lt;/p&gt;

&lt;p&gt;One site in particular, Codecademy, reportedly hauled in 1,000,000 users due largely to their well-timed &lt;a href="http://codeyear.com/" target="_blank"&gt;Code Year&lt;/a&gt; initiative, which delivers weekly programming lessons to people who have resolved to learn to code in 2012.  Last week, they announced a &lt;a href="http://blog.codecademy.com/announcing-meetups-and-our-partnership-with-t" target="_blank"&gt;partnership with the White House&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The response has been overwhelmingly positive: writers, VCs, accountants, lawyers all learning to code!  But someone has to be the bearer of bad news:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We&amp;#8217;re not all going to be programmers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ly3qrsd2iB1qaex6z.png" alt="Hipster Puppy"/&gt;&lt;/p&gt;

&lt;p&gt;I promise I&amp;#8217;m not trying to cut anyone down or dig a moat around my pristine programming castle.    Those who know me know that I&amp;#8217;ll happily teach programming to anyone who will give me the time of day.  I&amp;#8217;ve personally use sites like &lt;a href="http://www.codeschool.com" target="_blank"&gt;codeschool.com&lt;/a&gt; and &lt;a href="http://www.udemy.com" target="_blank"&gt;udemy.com&lt;/a&gt;.  I also don&amp;#8217;t believe you have to switch professions in order to justify learning and enjoying the craft.&lt;/p&gt;

&lt;p&gt;Confused yet?  Let me try to explain where I&amp;#8217;m coming from.&lt;/p&gt;

&lt;p&gt;On a &lt;a href="http://5by5.tv/hypercritical/47" target="_blank"&gt;recent episode&lt;/a&gt; of my favorite podcast&amp;#8212;Hypercritical&amp;#8212;John Siracusa talks about &lt;a href="http://www.loper-os.org/?p=568" target="_blank"&gt;the death of HyperCard&lt;/a&gt;.  HyperCard was an application on early MacOS that let you make your own programs, or &lt;em&gt;stacks&lt;/em&gt;, via Lego-block-style programming.  HyperCard made it super-easy for normal people to build their very own programs.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ly148or2141qaex6z.png" alt="HyperCard"/&gt;&lt;/p&gt;

&lt;p&gt;The nerds thought: of course everyone wants to write their own computer programs!  Why else would people want a computer &lt;em&gt;in their house?&lt;/em&gt;  &lt;strong&gt;We just have to make it easy enough for them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;John mentions other attempts at lowering the coding bar: AppleScript, Logo for kids, and Automator made programming more natural, fun, and easy.  These platforms did, without question, make programming more accessible, but they never took off the way we geeks hoped and expected they would.&lt;/p&gt;

&lt;p&gt;Siracusa explains (paraphrasing):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You could build up a pretty powerful system by composing all of these pieces that you didn&amp;#8217;t write and you didn&amp;#8217;t have to understand.  But in all of these cases&amp;#8212;HyperCard, AppleScript, Automator&amp;#8212;the harsh reality is that anything that lowers the bar for people to do powerful things inevitably leads to Programming with a capital P.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These abstractions were &lt;a href="http://joelonsoftware.com/articles/LeakyAbstractions.html" target="_blank"&gt;leaky&lt;/a&gt;.  The minute you try to do anything that is even slightly off the rails, you very quickly find yourself doing actual programming: conditionals, loops, composition, abstraction.  These concepts aren&amp;#8217;t natural to most people, so they stop right there. They won&amp;#8217;t ever make the leap, no matter how easy or fun you make it.&lt;/p&gt;

&lt;p&gt;If CPA firms had ping pong tables and Friday beer bashes, I might be tempted to learn accounting.  And I would love it if there were a fun and easy way to go about it.  But in the end, I could never  be passionate about double-entry bookkeeping the way I&amp;#8217;m passionate about JavaScript, because you can&amp;#8217;t teach passion.&lt;/p&gt;

&lt;p&gt;The percentage of the population that can engineer great software is so minuscule, and that number won&amp;#8217;t change dramatically.  HyperCard couldn&amp;#8217;t change it; Visual Basic couldn&amp;#8217;t change it; and no amount of instructional videos and interactive code challenges can change it.  We might be able to nudge the number upward by making things easier, &lt;strong&gt;but there is a hard limit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I would love to see more people from all walks of life learn to code, but I think we need to calibrate our expectations so we&amp;#8217;re not shocked or disappointed when the dust settles and it&amp;#8217;s just us nerds hunched over our laptops hacking away at 3am because we just can&amp;#8217;t help ourselves.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/37384370552</link><guid>http://accidentalhacker.com/post/37384370552</guid><pubDate>Thu, 19 Jan 2012 10:11:00 -0500</pubDate><category>code</category></item><item><title>Using Mercurial Subrepositories</title><description>&lt;p&gt;Code reuse is important. As developers, we don’t want to keep reinventing   the wheel over and over again. We should leverage code that we’ve already   written, and use open source libraries and frameworks where appropriate.&lt;/p&gt;



&lt;p&gt;Having the source code of a library that your project depends on is very   beneficial.  You can browse through it, debug into it, and make changes   to it.  But what is the most efficient way to store and track a piece of   code that is shared across dozens of projects? Should you simply copy and   paste the library’s source code into a lib folder within each project’s   repository? Or should you store the library in its own repository and   reference it externally?&lt;/p&gt;



&lt;p&gt;The copy/paste method makes propagating changes a real nightmare, and the   external reference approach has its own drawbacks:&lt;/p&gt;



&lt;ul&gt;&lt;li&gt;How is this extra step communicated?  Is it in a wiki document   somewhere? &lt;/li&gt;&#13;
&lt;li&gt;Should you write a script to fetch the dependencies or some build   tool? &lt;/li&gt;&#13;
&lt;li&gt;What &lt;em&gt;version&lt;/em&gt; of the library should you clone? &lt;/li&gt;&#13;
&lt;li&gt;Where on my disk does the library need to live? &lt;/li&gt;&#13;
&lt;li&gt;Does the build server know about all this? &lt;/li&gt;&#13;
&lt;/ul&gt;&lt;p&gt;That’s a lot of question marks. They’re not intractable issues by any   stretch, but you do have to think about them. You don’t want to have to   think, you want to write code and get things done.&lt;/p&gt;



&lt;h2&gt;Subrepositories to the rescue&lt;/h2&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Subrepositories let you treat a collection of repositories as a group.   For example, when you clone a repo, Mercurial will recursively clone all   of its subrepositories as well, so the developer (or build server)   doesn’t need to know about the dependencies — the source control system   handles it all.&lt;/p&gt;



&lt;p&gt;When you create (or update) a subrepository, Mercurial takes a snapshot   of the subrepo’s state and stores it in the parent repository’s   &lt;code&gt;.hgsubstate&lt;/code&gt; file. This means that multiple projects can   point to a single shared subrepository, yet each one can independently   decide which revision of the shared repository to rely on.&lt;/p&gt;



&lt;p&gt;Further, the subrepository can be anywhere — on your local disk, in Kiln,   on a co-worker’s machine, etc. Heck, it can even be a &lt;em&gt;Subversion&lt;/em&gt; repository!&lt;/p&gt;



&lt;p&gt;Let’s see an example that illustrates exactly how to use them.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Before you get your hands dirty, if you’re using   subrepos, you almost certainly want to have the following lines in your   &lt;code&gt;.hgrc&lt;/code&gt; or &lt;code&gt;Mercurial.ini&lt;/code&gt; file (thanks to &lt;a href="http://twitter.com/#!/wolever/" target="_new"&gt;David Wolever&lt;/a&gt; for this   tip).&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;[ui]&#13;
commitsubrepos = false&lt;/code&gt;&#13;
&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;h2&gt;A Tale of Two Résumés: A Case Study in Subrepositories&lt;/h2&gt;



&lt;p&gt;Fog Creek is always looking to hire great people. In fact, I’m proud to   announce our two most recent hires — we just poached Darth Vader from   Microsoft and Cthulhu from Facebook (sorry, Zuck).&lt;/p&gt;



&lt;p&gt;Whenever someone new joins the team, one of the first things we have them   do is create a personal résumé site that showcases their skills. I   provide them with a standard HTML template and they fill in all the   content. Each team member has their own repository in Kiln.&lt;/p&gt;



&lt;p&gt;Here’s what the project looks like right now:&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifgcq7Oh1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;Vader and Cthulhu have very similar sites at this point — both contain a   single static HTML page, CSS, and some images. There aren’t any external   dependencies.&lt;/p&gt;



&lt;p&gt;Have a look inside Cthulhu’s repo:&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifhbZkgs1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;The résumés look nice and clean, albeit plain:&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifigwS9R1qaex6z.png"/&gt;&lt;/p&gt;



&lt;h2&gt;Creating a subrepository&lt;/h2&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;I’ve been spending my days on Hacker News reading about how all the   JavaScript ninjas are writing jQuery plugins to enhance their websites.   So, naturally, I wrote a jQuery plugin that everyone can use to add   awesome &lt;a href="http://mothereffingtextshadow.com/" target="_blank"&gt;text shadows&lt;/a&gt; to   their résumés. The plugin is aptly named &lt;strong&gt;awesomejs&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;I checked &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs/History/d5e13195590d" target="_new"&gt;my code&lt;/a&gt; into Kiln so my team can grab it.&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxiflkFckz1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;Now, don’t tell Cthulhu, but Vader is my favorite co-worker. His ability   to dominate a galaxy is truly unmatched. Vader happens to be out of the   office at the moment. While he’s gone, I’m going to make his résumé just   a little more awesome.&lt;/p&gt;



&lt;p&gt;First I’ll clone Vader’s repo down to my machine.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code&amp;gt;hg clone &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Websites/vader" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Websites/vader&lt;/a&gt;&#13;
destination directory: vader&#13;
adding changesets&#13;
adding manifests&#13;
adding file changes&#13;
added 1 changesets with 4 changes to 4 files&#13;
updating to branch default&#13;
4 files updated, 0 files merged, 0 files removed, 0 files unresolved&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Then, from &lt;em&gt;within&lt;/em&gt; the &lt;strong&gt;vader&lt;/strong&gt; repo, I’ll clone   &lt;strong&gt;awesomejs&lt;/strong&gt; so that it becomes a nested subdirectory.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code&amp;gt;cd vader&#13;
&#13;
c:\code\vader&amp;gt;hg clone &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs&lt;/a&gt;&#13;
destination directory: awesomejs&#13;
requesting all changes&#13;
adding changesets&#13;
adding manifests&#13;
adding file changes&#13;
added 1 changesets with 1 changes to 1 files&#13;
updating to branch default&#13;
1 files updated, 0 files merged, 0 files removed, 0 files unresolved&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Now I have two nested Mercurial repositories, but &lt;strong&gt;they are not   linked&lt;/strong&gt; in any way and I can’t operate on them in tandem…yet.&lt;/p&gt;



&lt;p&gt;To achieve full-subrepo goodness I have to create the &lt;code&gt;.hgsub&lt;/code&gt; file in the &lt;strong&gt;vader&lt;/strong&gt; repository’s root directory.   &lt;code&gt;.hgsub&lt;/code&gt; is a plain text file with one line per subrepository.   On left-hand side of the equals sign is the local directory name where   the subrepo will reside. On the right-hand side is where that repo lives.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\vader&amp;gt;echo awesomejs = &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs&lt;/a&gt; &amp;gt; .hgsub&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;I save the file, add it, and commit it just like I would any other file.   I can tell by the output that Mercurial knows I’m making a subrepo when I   commit &lt;code&gt;.hgsub&lt;/code&gt;. Further, it automatically creates a   &lt;code&gt;.hgsubstate&lt;/code&gt; file where it records a snapshot of the   subrepo’s state.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\vader&amp;gt;hg add&#13;
adding .hgsub&#13;
&#13;
c:\code\vader&amp;gt;hg commit -m "adding subrepository awesomejs"&#13;
committing subrepository awesomejs&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;With my new subrepo in place, I’m ready to share my changes, so, from   within the &lt;strong&gt;vader&lt;/strong&gt; repo, I push my changeset to Kiln.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\vader&amp;gt;hg push&#13;
pushing to &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Websites/vader" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Websites/vader&lt;/a&gt;&#13;
pushing subrepo awesomejs to &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs&lt;/a&gt;&#13;
searching for changes&#13;
searching for changes&#13;
no changes found&#13;
searching for changes&#13;
searching for changes&#13;
remote: kiln: successfully pushed one changeset&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Notice how issuing &lt;code&gt;hg push&lt;/code&gt; from the parent repository   automatically pushed the subrepo as well (though, in our case, there   happened not to be any changes in the subrepo). Mercurial will   automatically push all subrepositories when the parent repository is   being pushed. This ensures new subrepository changes are available when   referenced by top-level repositories.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; not all Mercurial commands will automatically   recurse into subrepos. For instance, &lt;code&gt;hg status&lt;/code&gt; does not   recurse unless the &lt;code&gt;-S&lt;/code&gt; option is specified, and &lt;code&gt;hg   pull&lt;/code&gt; will not act on subrepositories at all. Type &lt;code&gt;hg help   subrepos&lt;/code&gt; for more on this.&lt;/p&gt;



&lt;p&gt;Now, if I look at the Vader website in Kiln I can see my new changeset.   And if I switch to the file browser I can see a little visual cue next to   &lt;strong&gt;awesomejs&lt;/strong&gt; to indicate that there’s a subrepo present.&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxiflxYR021qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;If I click on the &lt;strong&gt;awesomejs&lt;/strong&gt; folder, I can see that I   don’t have a copy of the &lt;strong&gt;awesomejs&lt;/strong&gt; files within the   &lt;strong&gt;vader&lt;/strong&gt; repository; rather, I have a link to the   &lt;strong&gt;Subrepo Demo -&amp;gt; Libraries -&amp;gt; awesomejs&lt;/strong&gt; repository.   What’s more, Kiln knows exactly which revision of   &lt;strong&gt;awesomejs&lt;/strong&gt; to show me based on the data in   &lt;code&gt;.hgsubstate&lt;/code&gt;.&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifmnffNz1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;If I were to peer inside the &lt;code&gt;.hgsubstate&lt;/code&gt; file in the   &lt;strong&gt;vader&lt;/strong&gt; repo, I would see that it simply contains the   changeset hash of the revision that it expects &lt;strong&gt;awesomejs&lt;/strong&gt; to be locked on:&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifnl4ZQv1qaex6z.png"/&gt;&lt;/p&gt;



&lt;h2&gt;Applying some awesomeness&lt;/h2&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Now that I have my subrepo relationship established, I’ll actually make   use of the plugin. I will edit &lt;code&gt;index.html&lt;/code&gt; and, right above   the closing &amp;lt;body&amp;gt; tag, add references to jQuery and awesomejs, and   call the plugin.&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;&#13;
&amp;lt;script src="awesomejs/awesome.js"&amp;gt;&amp;lt;/script&amp;gt;&#13;
&amp;lt;script&amp;gt;&#13;
    // make all the h1 and dt tags awesome.&#13;
    $(document).ready(function () {&#13;
        $('h1, dt').makeAwesome();&#13;
     });&#13;
&amp;lt;/script&amp;gt;&#13;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Much better:&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifokvQ5e1qaex6z.png"/&gt;&lt;/p&gt;



&lt;h2&gt;Cthulhu’s turn&lt;/h2&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Cthulhu decided that, not only is he going to use   &lt;strong&gt;awesomejs&lt;/strong&gt; for his own resume, he’s going to contribue   some changes to the plugin to make it better. He noticed that I   hard-coded the color magenta right into &lt;code&gt;awesome.js&lt;/code&gt; and   thought it might be better if it were &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs/History/e281bb75e574" target="_blank"&gt; passed as a parameter to the plugin instead&lt;/a&gt;. This way, each engineer   can use their own personalized color scheme.&lt;/p&gt;



&lt;p&gt;To make this change, first Cthulhu clones his repo and repeats the same   steps I did to create the subrepository (i.e., hg clone awesomejs, create   &lt;code&gt;.hgsub&lt;/code&gt;, hg add, hg commit). Then, within the subrepository   folder, Cthulhu makes his changes to &lt;strong&gt;awesomejs&lt;/strong&gt;. Lastly,   Cthulhu updates &lt;code&gt;index.html&lt;/code&gt; within the   &lt;strong&gt;cthulhu&lt;/strong&gt; repository to referenence and call the plugin.   &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Websites/cthulhu/History/90ccac8e4a0b" target="_blank"&gt; He likes cyan.&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;img class="outline" src="http://media.tumblr.com/tumblr_lxifovDCji1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;Now he’s ready to commit the changes in both repositories. Note, however,   that when you call &lt;code&gt;hg status&lt;/code&gt; from within the parent repo,   you won’t see your changes to any subrepos. If you want to see what’s   changed in a subrepo, you’ll need to use &lt;code&gt;hg status -S&lt;/code&gt; instead. Here’s what &lt;code&gt;hg status -S&lt;/code&gt; looks like at this point:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\cthulhu&amp;gt;hg status -S&#13;
M awesomejs\awesome.js&#13;
M index.html&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IMPORTANT POINT!&lt;/strong&gt; When he commits, he must do so &lt;em&gt;from   within the parent repository&lt;/em&gt;, otherwise Mercurial will NOT update   its &lt;code&gt;.hgsubstate&lt;/code&gt;. As a result, when the next developer comes   along and clones the Cthulhu website, they’d get the hard-coded magenta   version of &lt;strong&gt;awesomejs&lt;/strong&gt; with it, and that’s &lt;a href="http://kiln.stackexchange.com/questions/1066/problems-using-sub-repositories-subrepos" target="_blank"&gt; not what we want.&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;First he commits the change to &lt;strong&gt;awesomejs&lt;/strong&gt;:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\cthulu&amp;gt;hg commit -m "make the color a parameter instead of hard-coding it to 'magenta'" awesomejs&#13;
committing subrepository awesomejs&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Then the change to &lt;code&gt;index.html&lt;/code&gt; in &lt;strong&gt;vader&lt;/strong&gt;:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\cthulu&amp;gt;hg commit -m "make use of the awesomejs plugin.  I like cyan." index.html&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;And here’s the log:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;c:\code\cthulhu&amp;gt;hg log&#13;
changeset:   3:90ccac8e4a0b&#13;
tag:         tip&#13;
user:        Rob Sobers&#13;
date:        Thu Mar 17 14:42:26 2011 -0400&#13;
summary:     make use of the awesomejs plugin.  I like cyan.&#13;
&#13;
changeset:   2:71e8c78d1f59&#13;
user:        Rob Sobers&#13;
date:        Thu Mar 17 14:42:04 2011 -0400&#13;
summary:     make the color a parameter instead of hard-coding it to 'magenta'&#13;
&#13;
changeset:   1:7f699cdf3208&#13;
user:        Rob Sobers&#13;
date:        Thu Mar 17 14:24:43 2011 -0400&#13;
summary:     adding awesomejs subrepository&#13;
&#13;
changeset:   0:3517279c43fd&#13;
user:        Rob Sobers&#13;
date:        Tue Mar 15 23:45:15 2011 -0400&#13;
summary:     new resume site&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Cthulhu can now push these changes up to Kiln (remember, push is   recursive) and carry on…right?&lt;/p&gt;



&lt;p&gt;&lt;em&gt;Wait a minute!&lt;/em&gt; Cthulhu changed the signature to the   &lt;code&gt;makeAwesome&lt;/code&gt; function without regard for anyone else! What is   that going to do to Vader’s site? Vader isn’t passing a color name, so   his shadow color will be &lt;code&gt;undefined&lt;/code&gt;, which I’m pretty sure   isn’t a valid HTML color. Vader is expecting his drop shadows to be   magenta.&lt;/p&gt;



&lt;p&gt;No worries! The change Cthulhu made to the subrepo is &lt;em&gt;available&lt;/em&gt; to Vader, but not automatically &lt;em&gt;forced&lt;/em&gt; on him. Here’s what’s in   Vader’s subrepo:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;C:\code\vader\awesomejs&amp;gt;hg tip&#13;
changeset:   0:d5e13195590d&#13;
tag:         tip&#13;
user:        Rob Sobers&#13;
date:        Tue Mar 15 23:37:48 2011 -0400&#13;
summary:     creating new jQuery plugin&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;And here’s the incoming changeset, should he choose to pull it:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;C:\code\vader\awesomejs&amp;gt;hg in&#13;
&#13;
comparing with &lt;a href="https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs" target="_blank"&gt;https://rob.kilnhg.com/Repo/Subrepo-Demo/Libraries/awesomejs&lt;/a&gt;&#13;
searching for changes&#13;
changeset:   1:e281bb75e574&#13;
tag:         tip&#13;
user:        Rob Sobers&#13;
date:        Thu Mar 17 14:42:04 2011 -0400&#13;
summary:     make the color a parameter instead of hard-coding it to 'magenta'&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;When Vader is ready, he can pull the above change, update, and commit the   parent repo to record the new version in &lt;code&gt;.hgsubstate&lt;/code&gt;.&lt;/p&gt;



&lt;p&gt;And that’s the beauty of subrepositories — they give you the benefit of   working on a single shared repository across multiple projects while   letting you lock each project at a specific version.&lt;/p&gt;



&lt;p&gt;All of the code from this tutorial is available for you to play with in a   public Kiln repo: &lt;a href="https://rob.kilnhg.com/" target="_blank"&gt;&lt;a href="https://rob.kilnhg.com" target="_blank"&gt;https://rob.kilnhg.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h5&gt;Credits:&lt;/h5&gt;

&lt;ul&gt;&lt;li&gt;Cthulhu résumé and HTML template by Chris Coyier: &lt;a href="http://css-tricks.com/one-page-resume-site/" target="_blank"&gt;&lt;a href="http://css-tricks.com/one-page-resume-site" target="_blank"&gt;http://css-tricks.com/one-page-resume-site&lt;/a&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Darth Vader résumé details: &lt;a href="http://www.giraffecvs.co.uk/darth-vader-cv" target="_blank"&gt;&lt;a href="http://www.giraffecvs.co.uk/darth-vader-cv" target="_blank"&gt;http://www.giraffecvs.co.uk/darth-vader-cv&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h5&gt;Other resources:&lt;/h5&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://nerdwords.blogspot.com/2010/10/understanding-mercurial-subrepositories.html" target="_blank"&gt;&lt;a href="http://nerdwords.blogspot.com/2010/10/understanding-mercurial-subrepositories.html" target="_blank"&gt;http://nerdwords.blogspot.com/2010/10/understanding-mercurial-subrepositories.html&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kiln.stackexchange.com/questions/2685/how-does-fog-creek-or-other-users-use-sub-repositories" target="_blank"&gt;&lt;a href="http://kiln.stackexchange.com/questions/2685/how-does-fog-creek-or-other-users-use-sub-repositories" target="_blank"&gt;http://kiln.stackexchange.com/questions/2685/how-does-fog-creek-or-other-users-use-sub-repositories&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kiln.stackexchange.com/questions/1066/problems-using-sub-repositories-subrepos" target="_blank"&gt; &lt;a href="http://kiln.stackexchange.com/questions/1066/problems-using-sub-repositories-subrepos" target="_blank"&gt;http://kiln.stackexchange.com/questions/1066/problems-using-sub-repositories-subrepos&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mercurial.aragost.com/kick-start/en/subrepositories" target="_blank"&gt;&lt;a href="http://mercurial.aragost.com/kick-start/en/subrepositories" target="_blank"&gt;http://mercurial.aragost.com/kick-start/en/subrepositories&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://accidentalhacker.com/post/37385466610</link><guid>http://accidentalhacker.com/post/37385466610</guid><pubDate>Mon, 21 Mar 2011 23:18:00 -0400</pubDate></item><item><title>Sticky notes with CSS3</title><description>&lt;p&gt;I’ve been working on a pretty cool wall-mounted status board as one of my projects at Fog Creek. It’s a webapp that runs on a vertically mounted LCD screen in our office. It displays a bunch of interesting information like tech support calls, staff vacations, tweets about FogBugz, and more.&lt;/p&gt;



&lt;p&gt;I’ve been incrementally adding features and improving the UI whenever I have spare cycles. The other night, I decided to redesign the Kanban board widget, which is a list of the top N things that the customer team needs from engineering. I decided to go with a sticky note UI that mimics a &lt;a href="http://farm3.static.flickr.com/2562/3726484920_f21d793c99_o.jpg" title="Real-life Kanban board" target="_blank"&gt;real-life Kanban board&lt;/a&gt;, which typically consists of a giant white board filled with a bunch of sticky notes.&lt;/p&gt;



&lt;p&gt;My initial design used the classic yellow sticky notes, which I thought looked pretty neat. I showed my co-worker Rich who suggested that we make the notes look like the FogBugz and Kiln notepads that are laying around the office. Awesome idea! Way better.&lt;/p&gt;



&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lxfrl7qIeg1qaex6z.png"/&gt;&lt;/p&gt;



&lt;p&gt;Click &lt;a href="http://jsfiddle.net/rsobers/a9eFX/150/" title="Edit in jsfiddle" target="_blank"&gt;here&lt;/a&gt; to play around with the code yourself on jsFiddle. As you can see, the implementation is pretty simple. CSS3 is really nifty. No images necessary (aside from the kiwi and dodo logos).&lt;/p&gt;



&lt;p&gt;Here’s the markup:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;&amp;lt;link href='http://fonts.googleapis.com/css?family=Reenie+Beanie&amp;amp;amp;subset=latin' rel='stylesheet' type='text/css'&amp;gt;&#13;
&#13;
&amp;lt;ul id="notes"&amp;gt;&#13;
    &amp;lt;li&amp;gt;&#13;
        &amp;lt;p&amp;gt;Push new feature to Kiln for code review&amp;lt;/p&amp;gt;&#13;
    &amp;lt;/li&amp;gt;&#13;
    &amp;lt;li class="kiln"&amp;gt;&#13;
        &amp;lt;p&amp;gt;Browse hacker news for a bit&amp;lt;/p&amp;gt;&#13;
    &amp;lt;/li&amp;gt;&#13;
    &amp;lt;li&amp;gt;&#13;
        &amp;lt;p&amp;gt;Read JavaScript: The Good Parts by Douglas Crockford&amp;lt;/p&amp;gt;&#13;
    &amp;lt;/li&amp;gt;&#13;
&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Notice that I’m pulling in the handwriting-style font right from the &lt;a href="http://code.google.com/webfonts" title="Google CDN" target="_blank"&gt;Google CDN&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;Now for the CSS3 magic:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;body {&#13;
    background: #B2CCCC;&#13;
}&#13;
&#13;
#notes li {&#13;
    position: relative;&#13;
    width: 300px;&#13;
    min-height: 100px;&#13;
    margin: 25px auto;&#13;
    padding: 60px 15px 15px 15px;&#13;
    background: #fff url(&lt;a href="http://our.fogbugz.com/images/tbKiwiLogo.gif" target="_blank"&gt;http://our.fogbugz.com/images/tbKiwiLogo.gif&lt;/a&gt;) no-repeat 4px 8px;&#13;
    -webkit-box-shadow: 0 2px 12px rgba(0,0,0,.5);&#13;
    -moz-box-shadow: 0 2px 12px rgba(0,0,0,.5);&#13;
    box-shadow: 0 1px 2px #000;&#13;
    -webkit-transform: rotate(-.5deg);&#13;
    -moz-transform: rotate(-.5deg);&#13;
    -o-transform: rotate(-.5deg);&#13;
}&#13;
&#13;
#notes li:nth-child(even) {&#13;
    -webkit-transform: rotate(.5deg);&#13;
    -moz-transform: rotate(.5deg);&#13;
    -o-transform: rotate(.5deg);&#13;
}&#13;
&#13;
#notes li.kiln&#13;
{&#13;
    background-image: url(&lt;a href="https://rob.kilnhg.com/Content/Images/kiln_focus.gif" target="_blank"&gt;https://rob.kilnhg.com/Content/Images/kiln_focus.gif&lt;/a&gt;);&#13;
}&#13;
&#13;
#notes li p {&#13;
    text-align: center;&#13;
    font: normal normal normal 40px/48px 'Reenie Beanie', Helvetica, Arial, sans-serif;&#13;
    color: #000;&#13;
    text-shadow: white 1px 1px 0px;&#13;
    overflow:hidden;&#13;
}&#13;
&#13;
#notes li::before {&#13;
    content: ' ';&#13;
    display: block;&#13;
    position: absolute;&#13;
    left: 115px;&#13;
    top: -15px;&#13;
    width: 75px;&#13;
    height: 25px;&#13;
    z-index: 2;&#13;
    background-color: rgba(243,245,228,0.5);&#13;
    border: 2px solid rgba(255,255,255,0.5);&#13;
    -webkit-box-shadow: 0 0 5px #888;&#13;
    -moz-box-shadow: 0 0 5px #888;&#13;
    box-shadow: 2px 2px 2px #000;&#13;
    -webkit-transform: rotate(-6deg);&#13;
    -moz-transform: rotate(-6deg);&#13;
    -o-transform: rotate(-6deg);&#13;
}&#13;
&#13;
#notes li:nth-child(even)::before {&#13;
    -webkit-transform: rotate(6deg);&#13;
    -moz-transform: rotate(6deg);&#13;
    -o-transform: rotate(6deg);&#13;
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&#13;&lt;/p&gt;

&lt;p&gt;Each note has a &lt;a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-understanding-css3-gradients/" title="background gradient" target="_blank"&gt;background gradient&lt;/a&gt; to give it the sticky note color. The note is rotated ever-so-slightly with a &lt;a href="http://24ways.org/2009/going-nuts-with-css-transitions" title="transform" target="_blank"&gt;transform&lt;/a&gt; and decorated with a little &lt;a href="http://www.css3.info/preview/box-shadow/" title="box-shadow" target="_blank"&gt;box shadow&lt;/a&gt; for a 3D effect.&lt;/p&gt;



&lt;p&gt;The tape is inserted using &lt;a href="https://developer.mozilla.org/en/CSS/:before" title="::before" target="_blank"&gt;::before&lt;/a&gt; and is absolutely positioned with a box shadow, slight rotation, and a semi-transparent background color (using &lt;a href="http://css-tricks.com/rgba-browser-support/" title="rgba notation" target="_blank"&gt;rgba notation&lt;/a&gt; to set alpha transparency).&lt;/p&gt;



&lt;p&gt;I hope you found this little technique useful. I’m going to be posting more about the big board soon. Stay tuned.&lt;/p&gt;</description><link>http://accidentalhacker.com/post/37385931471</link><guid>http://accidentalhacker.com/post/37385931471</guid><pubDate>Tue, 23 Nov 2010 05:42:00 -0500</pubDate><category>code</category></item></channel></rss>
