<?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>a timocracy of one</title>
    <link>http://posterous.timocracy.com</link>
    <description>Tim Connor's blog</description>
    <generator>posterous.com</generator>
    <link xmlns="http://www.w3.org/2005/Atom" href="http://posterous.com/api/sup_update#323b83214" type="application/json" rel="http://api.friendfeed.com/2008/03#sup" />
    
    
    <feedburner:info uri="timocracy" /><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/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.timocracy.com/xml/atom10/feed.xml" /><feedburner:emailServiceId>timocracy</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fwww.timocracy.com%2Fxml%2Fatom10%2Ffeed.xml" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fwww.timocracy.com%2Fxml%2Fatom10%2Ffeed.xml" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://www.timocracy.com/xml/atom10/feed.xml" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fwww.timocracy.com%2Fxml%2Fatom10%2Ffeed.xml" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fwww.timocracy.com%2Fxml%2Fatom10%2Ffeed.xml" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><item>
      <pubDate>Mon, 10 Oct 2011 09:27:00 -0700</pubDate>
      <title>An eye-opener about your own biases</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/6ipm5-jpk_Y/an-eye-opener-about-your-own-biases</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/an-eye-opener-about-your-own-biases</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Even though I have been preaching about this stuff, and admitting I have non-conscious biases, it still caught me off guard to see it in myself: &lt;a href="https://implicit.harvard.edu/implicit/demo/"&gt;a web demo of Harvard's studies on our implicit, unconscious biases that you can take yourself&lt;/a&gt;&amp;nbsp;in 5-10 minutes (per test).&amp;nbsp;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/an-eye-opener-about-your-own-biases"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/an-eye-opener-about-your-own-biases#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/timocracy/~4/6ipm5-jpk_Y" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/an-eye-opener-about-your-own-biases</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 09 Oct 2011 10:29:00 -0700</pubDate>
      <title>My response to the pushback on my diversity talks</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/HOHI20hz65g/my-response-to-the-pushback-on-my-diversity-t</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/my-response-to-the-pushback-on-my-diversity-t</guid>
      <description>&lt;p&gt;
	&lt;p&gt;After I gave &lt;a href="http://posterous.timocracy.com/tag/monoculturelightning"&gt;a couple inflammatory talks on diversity and discrimination in the ruby community&lt;/a&gt;&amp;nbsp;I got &lt;a href="http://posterous.timocracy.com/pushback-from-my-diversity-talks"&gt;some feedback and pushback&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here is my response&lt;/strong&gt;:&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;To use your example, plenty of hockey players are probably racist, actually, even if they don't realize it. Not to pick on them, but part of my talk was about how pretty much everyone is, they just don't consciously acknowledge it. I'm not talking about overt racism, just the basic assumptions of the privileged that come out in everything because they don't realize the are privileged and how underexposed to other cultures, races, ways of life, etc, they may be.&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;Athletes in all nearly white fields certainly aren't immune to bigotry. &amp;nbsp;Having grown up a competitive bump skier I can attest to that. &amp;nbsp;Like most winter sports it's a &lt;strong&gt;very&lt;/strong&gt; white field. &amp;nbsp;Often bigotry is strongly linked with lack of exposure and diversity. &amp;nbsp;Due to the very fact of not having more minority and female colleagues we start subconsciously building assumptions. &amp;nbsp;&lt;/p&gt;
&lt;p class="p2"&gt;In SF, the majority of downtown business people's exposure to black people is the homeless. &amp;nbsp;I'd put a fiver on that negatively affectively their biases. &amp;nbsp;There are studies that watching the Summer Olympics, which has a lot black role models performing well, temporarily counters some of the subconscious racist bias in test subjects. And I think everyone has anecdotal experience with racists justifications they've overheard that negative experiences can create biases.&lt;/p&gt;
&lt;p class="p1"&gt;A large part of what sparked my initial talk, was a) &lt;a href="http://twitter.com/bryanl"&gt;@bryanl&lt;/a&gt; giving a talk where he had a line about it being about time we (the white audience) were the uncomfortable ones in the room and b)&amp;nbsp;&lt;a href="http://twitter.com/gigglegirl4e"&gt;@gigglegirl4e&lt;/a&gt; gaving a talk titled "Whose wife are you?" because that is something she hears, especially at conferences. &amp;nbsp;As long as she is hearing that...&lt;/p&gt;
&lt;p class="p1"&gt;You really should read up some on feminist theory and privilege. &amp;nbsp; I really, really don't care if a bunch of straight white males get a little offended that they don't realize how good they have it and how exclusionary they are. &amp;nbsp;I am queer, and yes the field is to blame. Not entirely, no. &amp;nbsp;And maybe in part it's better than other fields, but it's far worse than many. We &lt;strong&gt;are&lt;/strong&gt;&amp;nbsp;an awesome, low bullshit community, based around a very easy language to learn. &amp;nbsp;We should be the best community there is on this topic. &amp;nbsp;It's not that I don't love us, it's that I do enough to have set a higher bar for my expectations. &amp;nbsp;As &lt;a href="http://twitter.com/dnscollective"&gt;@dnscollective&lt;/a&gt;&amp;nbsp;said in his far gentler, more inclusive lightning talk, let's be the industry and community we want to work in.&lt;/p&gt;
&lt;p class="p1"&gt;If you think being offended at having people say the field is discriminatory and that you have biases is rough, then you should sit down longer and listen, not talk to, but listen to some of the black guys or women in the field, on the topic. &amp;nbsp;Not all of them may have had a rough time, but most will be able to talk your ear off.&lt;/p&gt;
&lt;p class="p2"&gt;As for the other example, I think comparing the cultural stereotype of interior designers all being gay, to the straight, white, male predominance in ours is actually offensive. &amp;nbsp;For one, it's based on a huge assumption without any apparent research backing it. &amp;nbsp;It comes off as a defensive knee-jerk rather than having to admit that being a white male in a field making giant amounts of money, while the rest of the country swirls down the drain, might be a pretty cush situation, that being excluded from is actually a form of class warfare. &amp;nbsp;Do you think Interior Design and Ruby Programmer are equivalently powerful positions in our current economy? &amp;nbsp;Also, there are some long standing reasons for straight men not being as prevalent in Interior Design (which has actually shifted farther in the last 5 years than our field, so hah, its a straw man AND moot!) and they have mostly to do with sexism and discrimination.&lt;/p&gt;
&lt;p class="p1"&gt;Interior Design has been the domain of housewives and openly gay men, because the "real men" were busy dominating the "real jobs." &amp;nbsp;Do you think Jewish people were discriminating against the goyim by keeping them out of the money-changing field, during a couple hundred&amp;nbsp;(or thousand?)&amp;nbsp;years of European history? &amp;nbsp;By my admittedly limited reading (not being a history major), largely not, it was actually discrimination the other way that drove Jewish people into that field as one of the few jobs they were allowed.&lt;/p&gt;
&lt;p class="p1"&gt;Also, I don't get what our whole field's anti-intellectual and academic obsession is. &amp;nbsp;We seem fine saying "Well I haven't read the Gang of Four, but it's not much use anyways" or "Well I haven't really studied this field, but I have lots of opinions based on my own personal experience which is obviously applicable to the position of the historically discriminated-against and oppressed." This stretches out to me, too - I am a college drop-out. &amp;nbsp;So I do understand the bias against overly academic CS, but unfortunately, we've let it bleed over so far into anti-academia that we sounds like George W. Bush supporters ranting against those damn liberal (feminist) snobs, sometimes.&lt;/p&gt;
&lt;p class="p2"&gt;Usually, I just write negative responses off as the classic example of what happens when you speak to power and privilege: offense, defensiveness, and pooh poohing. &amp;nbsp;"There isn't any problem with black people having to use separate water fountains; they get the same water." &amp;nbsp;Almost universally, IME, when you explain the huge difference between discrimination by the majority, by the patriarchy, by those who have always had it easier, without even realizing how much so, versus discrimination up the ladder by the oppressed, you get anger, justification, and dodging of responsibility. &amp;nbsp;&lt;/p&gt;
&lt;p class="p2"&gt;In fact DHH, is one of the few counter-examples I can think of - after the first&amp;nbsp;Gogaruco, when these concepts were explained to him he said roughly "Hmm, that makes sense, if you are already the minority in the room, and here for professional development or work, that wouldn't be very fair, to be forcefully exposed to something that&amp;nbsp;highlights&amp;nbsp;just how in the minority you are." &amp;nbsp;When he did that I gained even more respect for him than when I got in a technical debate with him and only realized how right he was 3 months later, when I learned more.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p2"&gt;&lt;strong&gt;End of my response&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p2"&gt;I never sent it, because the guy in question wrote &lt;a href="http://posterous.timocracy.com/pushback-from-my-diversity-talks"&gt;the nuancing reply that I mention in my previous post&lt;/a&gt;&amp;nbsp;and gave me the go ahead to use his anonymous words for a discussion point. And now I add him to the small pool of guys who, even when pushed hard by my intentionally inflammatory, discussion-starting claims, actually listen, process, and admit that maybe those crazy feminists aren't totally making this all up. ;)&lt;/p&gt;
&lt;p class="p2"&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p2"&gt;Thanks for the edits &lt;a href="http://www.twitter.com/alexch"&gt;@alexch&lt;/a&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/my-response-to-the-pushback-on-my-diversity-t"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/my-response-to-the-pushback-on-my-diversity-t#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/timocracy/~4/HOHI20hz65g" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/my-response-to-the-pushback-on-my-diversity-t</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 09 Oct 2011 10:18:00 -0700</pubDate>
      <title>Pushback from my diversity talks</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/oeAGVvj8YRw/pushback-from-my-diversity-talks</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/pushback-from-my-diversity-talks</guid>
      <description>&lt;p&gt;
	&lt;p&gt;This is part of the exchange that occurred in response to my &lt;a href="http://www.justin.tv/timocratic/b/295399005"&gt;talk on diversity at gogaruco, where I pointed out the the entire audience, and myself, are a bunch of sexist, racists, homophobic bigots&lt;/a&gt;, and the &lt;a href="http://vimeo.com/30268872"&gt;slightly more nuanced followup at rubyconf&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'm anonymizing this to avoid causing a flame war for the quite reasonable guy who posted it, and because he followed up with this:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Well, I'm glad we had our conversation last week. I feel less strongly about the issue now than I did before that conversation. I think I was mostly reacting to the inflammatory nature of your talk (ie. opening with calling the audience racists, bigots, and misogynists). I've gone back and watched your talk on confreaks, and it doesn't seem as inflammatory as it did that night (chalk that up to either having more perspective after our conversation, or being over the shock value of those statements).&lt;/p&gt;
&lt;p class="p1" style="padding-left: 30px;"&gt;...&lt;/p&gt;
&lt;p class="p1" style="padding-left: 30px;"&gt;So I feel I've gotten my thoughts out of my system, and don't feel strongly enough to post them publicly.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;His original thoughts are below:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;I care about equality and despise discrimination, and yet I am concerned and offended by a growing trend to accuse the technology sector, and the software industry specifically, of being bigots, racists, and misogynists. Think about this question: Are the interior decorating power elite keeping straight men out of their industry? I don't know the answer to that question, but I doubt that they are. Some may suggest that the analogy isn't a good one, because straight men aren't typically systematically oppressed. I'm not sure I agree with that either. I'll return to this analogy.&lt;/p&gt;
&lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;I've not studied discrimination, oppression, women's issues, etc. beyond that which is taught in a typical American college education and that which is generally reported in major news media. But I do have eyes, ears, an open mind, and I generally don't see evidence of discrimination in the software development industry.&lt;/p&gt;
&lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;I do see that the industry is dominated by white males. There is no question of that. Furthermore, I personally would greatly welcome more diversity. But are the demographics of the software development industry an indication of systematic oppression/discrimination? Is the white male dominance a malignancy?&lt;/p&gt;
&lt;p class="p1"&gt;Surely there is discrimination. I would be foolish to suggest that it doesn't happen. It is a sad fact that discrimination persists everywhere. So when blaming a lack of diversity of a group on discrimination, then surely the accusation is that the group discriminates more than the population on whole.&lt;/p&gt;
&lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;[need to flush out more of my thoughts prior to wrapping up]&lt;/p&gt;
&lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;Returning to the analogy of the interior decorating industry, I would argue that fewer straight men are interested in interior decorating. I would also argue that there is nothing wrong with that. To argue otherwise would to suggest that there should be a uniform distribution of interests and competencies across all genders, races, and sexual orientations. I don't believe that belief in human equality in general means a belief in uniform distribution of interests and competencies.&lt;/p&gt;
&lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;[Other analogies include: Are ice hockey players racist since most ice hockey professionals are white males? I'd argue that socio-economics play a bigger role in determining someone's likelihood of becoming a professional hockey player.]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/pushback-from-my-diversity-talks"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/pushback-from-my-diversity-talks#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/timocracy/~4/oeAGVvj8YRw" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/pushback-from-my-diversity-talks</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 09 Oct 2011 07:58:00 -0700</pubDate>
      <title>Video of the 'Scaling your Rubyists' the panel I organized on hiring rubyists</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/-AAeTrP5D-Q/video-of-the-scaling-your-rubyists-the-panel</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/video-of-the-scaling-your-rubyists-the-panel</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/30255028?portrait=0" frameborder="0" height="283" width="500"&gt;&lt;/iframe&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/video-of-the-scaling-your-rubyists-the-panel"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/video-of-the-scaling-your-rubyists-the-panel#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/timocracy/~4/-AAeTrP5D-Q" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/video-of-the-scaling-your-rubyists-the-panel</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 06 Oct 2011 07:00:00 -0700</pubDate>
      <title>My 2nd diversity lightning talk - rubyconf</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/tbf_YwD67k4/my-2nd-diversity-lightning-talk-rubyconf</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/my-2nd-diversity-lightning-talk-rubyconf</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;a href="http://vimeo.com/30268872"&gt;A less rapid and angry diversity lightning talk for rubyconf 2011&lt;/a&gt;. &amp;nbsp;I think I might mix it up and continue to give some variation of this at each conference I attend.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/my-2nd-diversity-lightning-talk-rubyconf"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/my-2nd-diversity-lightning-talk-rubyconf#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/timocracy/~4/tbf_YwD67k4" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/my-2nd-diversity-lightning-talk-rubyconf</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 18 Sep 2011 10:12:00 -0700</pubDate>
      <title>My diversity lightening talk at gogaruco</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/NjIM_X98qkk/my-diversity-lightening-talk-at-gogaruco</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/my-diversity-lightening-talk-at-gogaruco</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;a href="http://www.justin.tv/timocratic/b/295399005"&gt;www.justin.tv/timocratic/b/295399005&lt;/a&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/my-diversity-lightening-talk-at-gogaruco"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/my-diversity-lightening-talk-at-gogaruco#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/timocracy/~4/NjIM_X98qkk" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/my-diversity-lightening-talk-at-gogaruco</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 18 Aug 2011 01:25:33 -0700</pubDate>
      <title>My upcoming speaking events</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/Zz3PMzxE4yM/my-upcoming-speaking-events</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/my-upcoming-speaking-events</guid>
      <description>&lt;p&gt;
	&lt;p&gt;I had a blast speaking at the&lt;a href="http://www.sfruby.info/events/25898151/"&gt; Database meet-up that Wellness FX put on last month&lt;/a&gt;&amp;nbsp;where I talked about managing migrations in Mongo.&amp;nbsp;I'm pumped to follow that up with speaking at&amp;nbsp;&lt;a href="http://madisonruby.org/speakers#tim_connor"&gt;Madison Ruby this coming week-end&lt;/a&gt;&amp;nbsp;where I will be expanding the material from that initial 20 minute talk to the fuller 30 minutes allotted at Madison. I'll definitely be fleshing out some of the positives of working with MongoMapper that I glossed over in the initial talk - namely the incredibly fun power of the DataMapper pattern combined with a schemaless datastore. &amp;nbsp;Hopefully this helps alleviate some of the anti-Mongo vibe my first talk seemed to give off; MongoHQ are speaking at Madison as well and we wouldn't want that to lead to a pub brawl during the post conference drinking (we're rubyists, the drinking is a given). &amp;nbsp;Don't worry though, I won't let that entirely keep me from speaking my mind. ;)&lt;/p&gt;
&lt;p&gt;Next I'm organizing a &lt;a href="http://www.sfruby.info/events/29950351/"&gt;panel on hiring rubyists, coming up in Sept&lt;/a&gt;,&amp;nbsp;with some very well known names in the local ruby community. I'm honored that they all seemed to jump at the chance to do this panel with me. &amp;nbsp;As a consultant, how to deal with hiring rubyists is a question that comes up constantly and it will be great to get these 4 views on the topic posted up on the web so I can point to it and say "that's how." &amp;nbsp;I definitely have to say thank you to &lt;a href="http://www.engineyard.com/"&gt;Engine Yard&lt;/a&gt; for graciously offering to host the event.&lt;/p&gt;
&lt;p&gt;And to cap off my continuously expanding&amp;nbsp;talk on Mongo and how to deal with your lack of schema, data validity, migrations, etc, I will&amp;nbsp;&lt;a href="http://rubyconf.org/schedule"&gt;literally be closing down the conference at RubyConf&lt;/a&gt;. &amp;nbsp;I'm hoping that even though I am speaking dead last, my immediately following Tom Preston-Werner will help motivate attendees to stay to the bitter end for my talk. &amp;nbsp;I will have already added some code examples to my nearly Bauhausian minimilist slides from the Wellness event for Madison, but talks are 45 minutes at RubyConf, so there will certainly be even more of the nitty gritty and code examples that people have been asking for.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/my-upcoming-speaking-events"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/my-upcoming-speaking-events#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/timocracy/~4/Zz3PMzxE4yM" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/my-upcoming-speaking-events</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 20 Mar 2011 13:45:00 -0700</pubDate>
      <title>The unbearable flexibility of schemalesness</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/axcvWwTeq3I/the-unbearable-flexibility-of-schemalesness</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/the-unbearable-flexibility-of-schemalesness</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Everybod hates Single Table Inheritance, right? &amp;nbsp;MongoMapper has a similar concept, Single Collection Inheritance, but also a better alternative. &amp;nbsp;MM provides, and in fact is mostly built with, a simple plugin system that is a thin wrapper around ruby's include. &amp;nbsp;It includes the InstanceMethods, extends the ClassMethods, and provides a callback for configuring the model.&lt;/p&gt;
&lt;p&gt;This better use of the ruby approach to grouping methods into modules becomes truly powerful when combined with the DataMapper pattern (which MongoMapper essentially implements) and a schemaless datastore like Mongo.&lt;/p&gt;
&lt;p&gt;In the gist below I demonstrate using MongoMapper's plugin system to build aggregate models, in place of a pure single inheritance hierarchy with which it is fully compatible. &amp;nbsp;You can couple this with composition by using your plug-in to add associations and associated proxy methods for them.&lt;/p&gt;
&lt;p&gt;I think this flexibility is the real power of NoSQL: not "web-scale", which people have been doing with SQL for years, but defining your data type once, in your model, with the full dynamism of ruby. I was skeptical about key-value stores as a default storage engine for web apps, until very recently, and still think MySQL is the right answer for many people and projects. But my most recent client project uses MongoMapper, and as we started to refactor and DRY up the models, I finally saw how truly useful not being bound to a datastore's schema is.&lt;/p&gt;
&lt;p&gt;Migrations? Yes, you don't get AR migrations. The 'proper' migrations, which only affect schema, are unneeded anyways, in a DataMapper. And data migrations are done wrong 99% of the time anyways, imo; pretending they are instantaneous is a mistake. In either AR or MM you should handle you data migrations more robustly, via code switches and async tasks to transform the data. If I get a chance to make this a talk, I may explore that more fully.&lt;/p&gt;
&lt;p&gt;&lt;div class="data type-ruby"&gt;
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;span rel="#L8" id="L8"&gt;8&lt;/span&gt;
&lt;span rel="#L9" id="L9"&gt;9&lt;/span&gt;
&lt;span rel="#L10" id="L10"&gt;10&lt;/span&gt;
&lt;span rel="#L11" id="L11"&gt;11&lt;/span&gt;
&lt;span rel="#L12" id="L12"&gt;12&lt;/span&gt;
&lt;span rel="#L13" id="L13"&gt;13&lt;/span&gt;
&lt;span rel="#L14" id="L14"&gt;14&lt;/span&gt;
&lt;span rel="#L15" id="L15"&gt;15&lt;/span&gt;
&lt;span rel="#L16" id="L16"&gt;16&lt;/span&gt;
&lt;span rel="#L17" id="L17"&gt;17&lt;/span&gt;
&lt;span rel="#L18" id="L18"&gt;18&lt;/span&gt;
&lt;span rel="#L19" id="L19"&gt;19&lt;/span&gt;
&lt;span rel="#L20" id="L20"&gt;20&lt;/span&gt;
&lt;span rel="#L21" id="L21"&gt;21&lt;/span&gt;
&lt;span rel="#L22" id="L22"&gt;22&lt;/span&gt;
&lt;span rel="#L23" id="L23"&gt;23&lt;/span&gt;
&lt;span rel="#L24" id="L24"&gt;24&lt;/span&gt;
&lt;span rel="#L25" id="L25"&gt;25&lt;/span&gt;
&lt;span rel="#L26" id="L26"&gt;26&lt;/span&gt;
&lt;span rel="#L27" id="L27"&gt;27&lt;/span&gt;
&lt;span rel="#L28" id="L28"&gt;28&lt;/span&gt;
&lt;span rel="#L29" id="L29"&gt;29&lt;/span&gt;
&lt;span rel="#L30" id="L30"&gt;30&lt;/span&gt;
&lt;span rel="#L31" id="L31"&gt;31&lt;/span&gt;
&lt;span rel="#L32" id="L32"&gt;32&lt;/span&gt;
&lt;span rel="#L33" id="L33"&gt;33&lt;/span&gt;
&lt;span rel="#L34" id="L34"&gt;34&lt;/span&gt;
&lt;span rel="#L35" id="L35"&gt;35&lt;/span&gt;
&lt;span rel="#L36" id="L36"&gt;36&lt;/span&gt;
&lt;span rel="#L37" id="L37"&gt;37&lt;/span&gt;
&lt;span rel="#L38" id="L38"&gt;38&lt;/span&gt;
&lt;span rel="#L39" id="L39"&gt;39&lt;/span&gt;
&lt;span rel="#L40" id="L40"&gt;40&lt;/span&gt;
&lt;span rel="#L41" id="L41"&gt;41&lt;/span&gt;
&lt;span rel="#L42" id="L42"&gt;42&lt;/span&gt;
&lt;span rel="#L43" id="L43"&gt;43&lt;/span&gt;
&lt;span rel="#L44" id="L44"&gt;44&lt;/span&gt;
&lt;span rel="#L45" id="L45"&gt;45&lt;/span&gt;
&lt;span rel="#L46" id="L46"&gt;46&lt;/span&gt;
&lt;span rel="#L47" id="L47"&gt;47&lt;/span&gt;
&lt;span rel="#L48" id="L48"&gt;48&lt;/span&gt;
&lt;span rel="#L49" id="L49"&gt;49&lt;/span&gt;
&lt;span rel="#L50" id="L50"&gt;50&lt;/span&gt;
&lt;span rel="#L51" id="L51"&gt;51&lt;/span&gt;
&lt;span rel="#L52" id="L52"&gt;52&lt;/span&gt;
&lt;span rel="#L53" id="L53"&gt;53&lt;/span&gt;
&lt;span rel="#L54" id="L54"&gt;54&lt;/span&gt;
&lt;span rel="#L55" id="L55"&gt;55&lt;/span&gt;
&lt;span rel="#L56" id="L56"&gt;56&lt;/span&gt;
&lt;span rel="#L57" id="L57"&gt;57&lt;/span&gt;
&lt;span rel="#L58" id="L58"&gt;58&lt;/span&gt;
&lt;span rel="#L59" id="L59"&gt;59&lt;/span&gt;
&lt;span rel="#L60" id="L60"&gt;60&lt;/span&gt;
&lt;span rel="#L61" id="L61"&gt;61&lt;/span&gt;
&lt;span rel="#L62" id="L62"&gt;62&lt;/span&gt;
&lt;span rel="#L63" id="L63"&gt;63&lt;/span&gt;
&lt;span rel="#L64" id="L64"&gt;64&lt;/span&gt;
&lt;span rel="#L65" id="L65"&gt;65&lt;/span&gt;
&lt;span rel="#L66" id="L66"&gt;66&lt;/span&gt;
&lt;span rel="#L67" id="L67"&gt;67&lt;/span&gt;
&lt;span rel="#L68" id="L68"&gt;68&lt;/span&gt;
&lt;span rel="#L69" id="L69"&gt;69&lt;/span&gt;
&lt;span rel="#L70" id="L70"&gt;70&lt;/span&gt;
&lt;span rel="#L71" id="L71"&gt;71&lt;/span&gt;
&lt;span rel="#L72" id="L72"&gt;72&lt;/span&gt;
&lt;span rel="#L73" id="L73"&gt;73&lt;/span&gt;
&lt;span rel="#L74" id="L74"&gt;74&lt;/span&gt;
&lt;span rel="#L75" id="L75"&gt;75&lt;/span&gt;
&lt;span rel="#L76" id="L76"&gt;76&lt;/span&gt;
&lt;span rel="#L77" id="L77"&gt;77&lt;/span&gt;
&lt;span rel="#L78" id="L78"&gt;78&lt;/span&gt;
&lt;span rel="#L79" id="L79"&gt;79&lt;/span&gt;
&lt;span rel="#L80" id="L80"&gt;80&lt;/span&gt;
&lt;span rel="#L81" id="L81"&gt;81&lt;/span&gt;
&lt;span rel="#L82" id="L82"&gt;82&lt;/span&gt;
&lt;span rel="#L83" id="L83"&gt;83&lt;/span&gt;
&lt;span rel="#L84" id="L84"&gt;84&lt;/span&gt;
&lt;span rel="#L85" id="L85"&gt;85&lt;/span&gt;
&lt;span rel="#L86" id="L86"&gt;86&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="c1"&gt;#rvm use 1.9.2&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&lt;span class="c1"&gt;#brew install mongo&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;span class="c1"&gt;#gem install mongo_mapper&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&lt;span class="c1"&gt;#gem install bson_ext&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rubygems&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mongo_mapper&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC8"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC9"&gt;&lt;span class="no"&gt;MongoMapper&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;database&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mm_demo&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC10"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC11"&gt;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;MMDemo&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC12"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;HasDoorsAndWindows&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC13"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC14"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="ss"&gt;:doors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:default&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC15"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="ss"&gt;:windows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:default&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC16"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="ss"&gt;:sun_roof&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:default&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC17"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC18"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC19"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;InstanceMethods&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC20"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;enterable?&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC21"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;doors&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC22"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC23"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC24"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;well_lit?&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC25"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;windows&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doors&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC26"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC27"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC28"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC29"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC30"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC31"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC32"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;House&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC33"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;MongoMapper&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Document&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC34"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC35"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;plugin&lt;/span&gt; &lt;span class="no"&gt;MMDemo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;HasDoorsAndWindows&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC36"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC37"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC38"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Vehicle&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC39"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;MongoMapper&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Document&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC40"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC41"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="ss"&gt;:wheels&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Integer&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC42"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC43"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC44"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Motorcyle&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Vehicle&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC45"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC46"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC47"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Vehicle&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC48"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;plugin&lt;/span&gt; &lt;span class="no"&gt;MMDemo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;HasDoorsAndWindows&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC49"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;well_lit?&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC50"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;sunroof?&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC51"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC52"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC53"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC54"&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;minitest/autorun&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC55"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC56"&gt;&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;a House&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC57"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;has doors&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC58"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC59"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC60"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC61"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;has windows&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC62"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC63"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC64"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC65"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;is enterable if there are any doors&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC66"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;enterable?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC67"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;enterable?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC68"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC69"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC70"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;is enterable if there are any doors&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC71"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;enterable?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC72"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;enterable?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC73"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC74"&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC75"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;is well lit if there are 5x as many windows as doors&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC76"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:windows&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;well_lit?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC77"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;House&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:doors&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:windows&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;well_lit?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC78"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC79"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC80"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC81"&gt;&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;a Car&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC82"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;is well lit if it has a sunroof&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC83"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:sunroof&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;well_lit?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC84"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:sunroof&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;well_lit?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;must_equal&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC85"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC86"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/the-unbearable-flexibility-of-schemalesness"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/the-unbearable-flexibility-of-schemalesness#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/timocracy/~4/axcvWwTeq3I" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/the-unbearable-flexibility-of-schemalesness</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 07 Feb 2011 21:57:00 -0800</pubDate>
      <title>A pattern for testing class methods in ruby with rspec explicit subjects</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/xGDXXhrH1ic/a-pattern-for-testing-class-methods-in-ruby-w</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/a-pattern-for-testing-class-methods-in-ruby-w</guid>
      <description>&lt;p&gt;
	&lt;p&gt;RSpec's subject method, both implicitly and explicitly set, is useful for declaratively setting up the context of the object under test.  If you provide a class for your describe block, subject will implicitly be set to a new instance of this class (with no arguments passed to the constructor).  If you want something more complex done, such as setting arguments, you can use the explicit subject setter, which takes a block.&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;describe Person do
  context &amp;quot;born 19 years ago&amp;quot; do
    subject { Person.new(:birthdate =&amp;gt; 19.years.ago }
    it { should be_eligible_to_vote }
    its(:age) { should == 19 }
    it &amp;quot;should be younger than a 20 year old&amp;quot; do
      twenty_year_old = Person.new(:birthday =&amp;gt; 20.years.ago)
      subject.should be_younger_than(twenty_year_old)
    end
  end
end&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The subject block is called after any befores. In fact, it is not called until it is referenced in the spec - the compact syntaxes of 'it { should }' and 'its(:property)' implicitly call subject as needed*.  This means any method calls in the subject block reference the state of the system (like your db), at the time subject is called.&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;describe &amp;quot;the oldest person&amp;quot; do
  subject { Person.new(:birthdate =&amp;gt; Person.oldest_person.birthdate - 1) }
  it &amp;quot;should be older than the next oldest person&amp;quot; do
    original_oldest_person = Person.new(:birthdate =&amp;gt; 100.years.ago)
    subject.should be_older_than(original_oldest_person)
  end
end&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;subject thus provides a decent syntax for testing method calls directly. Sometimes, though, you have methods you want to test almost purely based on what is passed into them, with few other concerns of state, for instance, when testing class methods.  These specs may have a little shared set-up needed, but really the true object under test is the method call itself.  In these cases it makes sense to set that as the subject, and this leads to an effective and succinct, if slightly distasteful, pattern for setting the method arguments via standard rspec ivar trickery.&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;describe &amp;quot;.first&amp;quot; do
  before { Person.create_10_people }
  subject { Person.first(@number_of_people) }
  it &amp;quot;should return the specified number of people&amp;quot; do
    @number_of_people = 5
    subject.size.should == 5
  end
  
  it &amp;quot;should return a single person when so specified&amp;quot; do
    @number_of_people = 1
    subject.should be_a(Person)
  end

  it &amp;quot;should default to returning a single person&amp;quot; do
    subject.should be_a(Person)
  end
end&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I was bemoaning the difference between ruby and more functional languages like JavaScript, where you do have ways of easily differentiating between a method reference and call (parentheses), and how that would make a pattern like this easier by letting you set the method as the subject and then call it in the spec.  Then I realized, of course ruby has a way for creating a callable reference like this: a lambda.&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;describe &amp;quot;.first&amp;quot; do    
  subject { lambda { |number_of_people| Person.first(number_of_people  ) } }
  it { subject.call(5).size.should == 5 }
  it { subject.call(1).should be_a(Person) }
  it { subject.call.should be_a(Person)
end&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;If I continue to like this pattern enough after more usage, I'll probably see if I can get them to accept a patch to allow passing of arguments directly into subject itself. That could possibly get a little messy in the code for subject itself, but behind the scenes gymnastics to get a nice testing syntax is what rspec is all about, after all.&lt;/p&gt;
&lt;p&gt;*The latter syntax actual resets subject, the getter, to be the result of the property access, allowing for the intriguing abuse of syntax: 'its(:property) { subject.should....'&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/a-pattern-for-testing-class-methods-in-ruby-w"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/a-pattern-for-testing-class-methods-in-ruby-w#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/timocracy/~4/xGDXXhrH1ic" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/a-pattern-for-testing-class-methods-in-ruby-w</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 05 Dec 2010 21:47:00 -0800</pubDate>
      <title>Simplest static site on Heroku (plain Rack)?</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/afk8VmzuH4Y/simplest-static-site-on-heroku-plain-rack</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/simplest-static-site-on-heroku-plain-rack</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;code&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;gem 'rack-rewrite', '~&amp;gt; 1.0.0'
require 'rack/rewrite'

use Rack::Rewrite do
  rewrite '/favicon.ico', '/images/favicon.ico'
  rewrite '/', '/index.html'
end
run Rack::File.new('public')&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;/code&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/simplest-static-site-on-heroku-plain-rack"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/simplest-static-site-on-heroku-plain-rack#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/timocracy/~4/afk8VmzuH4Y" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/simplest-static-site-on-heroku-plain-rack</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 09 Nov 2010 08:07:04 -0800</pubDate>
      <title>Help me pick the new logo for my company</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/2cF3X1KUsy4/help-me-pick-the-new-logo-for-my-company</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/help-me-pick-the-new-logo-for-my-company</guid>
      <description>&lt;p&gt;
	So, as part of transitioning back to full-time contracting I am rebranding my company.  Help me pick the final logo design: &lt;a href="http://www.facebook.com/l.php?u=http%3A%2F%2F99designs.com%2Flogo-design%2Fvote-mwq9kd&amp;amp;h=df798"&gt;http://99designs.com/logo-design/vote-mwq9kd&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/help-me-pick-the-new-logo-for-my-company"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/help-me-pick-the-new-logo-for-my-company#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/timocracy/~4/2cF3X1KUsy4" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/help-me-pick-the-new-logo-for-my-company</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 10 Oct 2010 15:08:00 -0700</pubDate>
      <title>The new css 100% width and height with header and sidebar</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/OxqOowEVfK8/the-new-css-100-width-and-height-with-header-0</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/the-new-css-100-width-and-height-with-header-0</guid>
      <description>&lt;p&gt;
	&lt;p&gt;It's been a while since I've had to deal with making a cross-browser 100% height layout - long enough that a couple version of IE have come out since. &amp;nbsp;CSS support in IE has come a long way, so I thought I'd start fresh and try a purely standards based approach for the latest IE and standards based browsers, using the 'display: table-*' styles, and just do a fallback for older versions of IE (a 100% height modified&amp;nbsp;&lt;a href="http://www.alistapart.com/articles/holygrail"&gt;Holy Grail layout&lt;/a&gt;&amp;nbsp;that relies on the IE quirks box-model).&lt;/p&gt;
&lt;p&gt;Unfortunately, while IE8 does support the table display styles, IE7 doesn't, and there doesn't seem to be any way to put IE7 in quirks mode, while keeping IE8 and every other browser in standards mode. &amp;nbsp;So I just settled on the old-fashioned approach of having one layout for all other browsers and keeping the IEs clumped together in quirks mode.&lt;/p&gt;
&lt;p&gt;&lt;div class='p_embed p_image_embed'&gt;
&lt;img alt="Standards" height="405" src="http://getfile7.posterous.com/getfile/files.posterous.com/temp-2010-10-10/ceplJbqiAECBpHgcphyterxAvBqJEpvlfeBJuBhhBstxleqCoddDCuzpnfJx/standards.png.scaled500.png" width="472" /&gt;
&lt;img alt="Ies" height="388" src="http://getfile2.posterous.com/getfile/files.posterous.com/temp-2010-10-10/wiuzijCafmslEEajmthEybmqtAastgtFngHxiasxyEdAomtFzasBIvyjpkGx/ies.png.scaled500.png" width="420" /&gt;
&lt;a href="http://getfile5.posterous.com/getfile/files.posterous.com/temp-2010-10-10/EnxhEqqatGtohzlEImIsrJqzBlFmxHbsuvbHlCyBHfkCltJycsdFqBkswmlz/scrolling1.png.scaled1000.png"&gt;&lt;img alt="Scrolling1" height="403" src="http://getfile9.posterous.com/getfile/files.posterous.com/temp-2010-10-10/EnxhEqqatGtohzlEImIsrJqzBlFmxHbsuvbHlCyBHfkCltJycsdFqBkswmlz/scrolling1.png.scaled500.png" width="500" /&gt;&lt;/a&gt;
&lt;a href="http://getfile9.posterous.com/getfile/files.posterous.com/temp-2010-10-10/HIcAwrtAhcCldeabackCcybkClmhpxhdrIdbpIiwhHklCvwqFkHwskhgttwq/scrolling2.png.scaled1000.png"&gt;&lt;img alt="Scrolling2" height="403" src="http://getfile1.posterous.com/getfile/files.posterous.com/temp-2010-10-10/HIcAwrtAhcCldeabackCcybkClmhpxhdrIdbpIiwhHklCvwqFkHwskhgttwq/scrolling2.png.scaled500.png" width="500" /&gt;&lt;/a&gt;
&lt;div class='p_see_full_gallery'&gt;&lt;a href="http://posterous.timocracy.com/the-new-css-100-width-and-height-with-header-0"&gt;See the full gallery on Posterous&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;&lt;div class="data type-html"&gt;
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;span rel="#L8" id="L8"&gt;8&lt;/span&gt;
&lt;span rel="#L9" id="L9"&gt;9&lt;/span&gt;
&lt;span rel="#L10" id="L10"&gt;10&lt;/span&gt;
&lt;span rel="#L11" id="L11"&gt;11&lt;/span&gt;
&lt;span rel="#L12" id="L12"&gt;12&lt;/span&gt;
&lt;span rel="#L13" id="L13"&gt;13&lt;/span&gt;
&lt;span rel="#L14" id="L14"&gt;14&lt;/span&gt;
&lt;span rel="#L15" id="L15"&gt;15&lt;/span&gt;
&lt;span rel="#L16" id="L16"&gt;16&lt;/span&gt;
&lt;span rel="#L17" id="L17"&gt;17&lt;/span&gt;
&lt;span rel="#L18" id="L18"&gt;18&lt;/span&gt;
&lt;span rel="#L19" id="L19"&gt;19&lt;/span&gt;
&lt;span rel="#L20" id="L20"&gt;20&lt;/span&gt;
&lt;span rel="#L21" id="L21"&gt;21&lt;/span&gt;
&lt;span rel="#L22" id="L22"&gt;22&lt;/span&gt;
&lt;span rel="#L23" id="L23"&gt;23&lt;/span&gt;
&lt;span rel="#L24" id="L24"&gt;24&lt;/span&gt;
&lt;span rel="#L25" id="L25"&gt;25&lt;/span&gt;
&lt;span rel="#L26" id="L26"&gt;26&lt;/span&gt;
&lt;span rel="#L27" id="L27"&gt;27&lt;/span&gt;
&lt;span rel="#L28" id="L28"&gt;28&lt;/span&gt;
&lt;span rel="#L29" id="L29"&gt;29&lt;/span&gt;
&lt;span rel="#L30" id="L30"&gt;30&lt;/span&gt;
&lt;span rel="#L31" id="L31"&gt;31&lt;/span&gt;
&lt;span rel="#L32" id="L32"&gt;32&lt;/span&gt;
&lt;span rel="#L33" id="L33"&gt;33&lt;/span&gt;
&lt;span rel="#L34" id="L34"&gt;34&lt;/span&gt;
&lt;span rel="#L35" id="L35"&gt;35&lt;/span&gt;
&lt;span rel="#L36" id="L36"&gt;36&lt;/span&gt;
&lt;span rel="#L37" id="L37"&gt;37&lt;/span&gt;
&lt;span rel="#L38" id="L38"&gt;38&lt;/span&gt;
&lt;span rel="#L39" id="L39"&gt;39&lt;/span&gt;
&lt;span rel="#L40" id="L40"&gt;40&lt;/span&gt;
&lt;span rel="#L41" id="L41"&gt;41&lt;/span&gt;
&lt;span rel="#L42" id="L42"&gt;42&lt;/span&gt;
&lt;span rel="#L43" id="L43"&gt;43&lt;/span&gt;
&lt;span rel="#L44" id="L44"&gt;44&lt;/span&gt;
&lt;span rel="#L45" id="L45"&gt;45&lt;/span&gt;
&lt;span rel="#L46" id="L46"&gt;46&lt;/span&gt;
&lt;span rel="#L47" id="L47"&gt;47&lt;/span&gt;
&lt;span rel="#L48" id="L48"&gt;48&lt;/span&gt;
&lt;span rel="#L49" id="L49"&gt;49&lt;/span&gt;
&lt;span rel="#L50" id="L50"&gt;50&lt;/span&gt;
&lt;span rel="#L51" id="L51"&gt;51&lt;/span&gt;
&lt;span rel="#L52" id="L52"&gt;52&lt;/span&gt;
&lt;span rel="#L53" id="L53"&gt;53&lt;/span&gt;
&lt;span rel="#L54" id="L54"&gt;54&lt;/span&gt;
&lt;span rel="#L55" id="L55"&gt;55&lt;/span&gt;
&lt;span rel="#L56" id="L56"&gt;56&lt;/span&gt;
&lt;span rel="#L57" id="L57"&gt;57&lt;/span&gt;
&lt;span rel="#L58" id="L58"&gt;58&lt;/span&gt;
&lt;span rel="#L59" id="L59"&gt;59&lt;/span&gt;
&lt;span rel="#L60" id="L60"&gt;60&lt;/span&gt;
&lt;span rel="#L61" id="L61"&gt;61&lt;/span&gt;
&lt;span rel="#L62" id="L62"&gt;62&lt;/span&gt;
&lt;span rel="#L63" id="L63"&gt;63&lt;/span&gt;
&lt;span rel="#L64" id="L64"&gt;64&lt;/span&gt;
&lt;span rel="#L65" id="L65"&gt;65&lt;/span&gt;
&lt;span rel="#L66" id="L66"&gt;66&lt;/span&gt;
&lt;span rel="#L67" id="L67"&gt;67&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="c"&gt;&amp;lt;!-- keep IE in quirks mode --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="c"&gt;&amp;lt;!-- This following meta tag does no good since there is no way to trigger quirks&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;span class="c"&gt;mode only in IE7.  The problems with an xml prolog that triggered quirks mode were&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;&lt;span class="c"&gt;fixed in IE7, but this meta tag was not yet introduced, so the only thing you can do&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC8"&gt;&lt;span class="c"&gt;is trigger IE-wide quirks via the comment before the DOCTYPE //--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC9"&gt;    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;X-UA-Compatible&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;IE=EmulateIE8&amp;quot;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC10"&gt;    &lt;span class="nt"&gt;&amp;lt;style &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC11"&gt;&lt;span class="c"&gt;/*You still need an unbroken chain of 100% from the viewport down to the &amp;#39;table&amp;#39; &lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC12"&gt;&lt;span class="c"&gt;container*/&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC13"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;#wrapper&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;margin&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC14"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC15"&gt;&lt;span class="c"&gt;/* This is the heart of the new layout.  You don&amp;#39;t even need to worry about &lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC16"&gt;&lt;span class="c"&gt;min-height vs. height issues, because table handle those fine without weird issues&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC17"&gt;&lt;span class="c"&gt;when the browser window becomes smaller than the content.*/&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC18"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#wrapper&lt;/span&gt;            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC19"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#header&lt;/span&gt;             &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;99px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC20"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#logo&lt;/span&gt;               &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-cell&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC21"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#header_contents&lt;/span&gt;    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-cell&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC22"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#container&lt;/span&gt;          &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC23"&gt;&lt;span class="c"&gt;/* This is the one min-X needed, it prevents the sidebar from collapsing down to&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC24"&gt;&lt;span class="c"&gt;it&amp;#39;s contents width when the containing div tries to shrink due to the window being&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC25"&gt;&lt;span class="c"&gt;shrunk down*/&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC26"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#sidebar&lt;/span&gt;            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-cell&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;/div&gt;&lt;div class="line" id="LC27"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;min-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;vertical-align&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC28"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#content&lt;/span&gt;            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;table-cell&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC29"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="line" id="LC30"&gt;&lt;span class="c"&gt;/* Fluff, purely for illustration of the containers */&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC32"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#content&lt;/span&gt; &lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC33"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#header_contents&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="k"&gt;solid&lt;/span&gt; &lt;span class="nb"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#cfc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC34"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="k"&gt;solid&lt;/span&gt; &lt;span class="nb"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ccf&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC35"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nf"&gt;#content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="k"&gt;solid&lt;/span&gt; &lt;span class="nb"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fcc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC36"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC37"&gt;&lt;span class="c"&gt;&amp;lt;!-- The quirks mode based IE approach below.  Since in that box model paddings and&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC38"&gt;&lt;span class="c"&gt;margins are not additive with the contents width/height, you can just add some&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC39"&gt;&lt;span class="c"&gt;paddings to the parent. For an explanation of the sidebar negative margin tricks,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC40"&gt;&lt;span class="c"&gt;google &amp;#39;holy grail css.&amp;#39; And the header is just absolutely positioned over the space&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC41"&gt;&lt;span class="c"&gt;created by the padding trick on the container //--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC42"&gt;&lt;span class="c"&gt;&amp;lt;!--[if IE]&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC43"&gt;&lt;span class="c"&gt;    &amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC44"&gt;&lt;span class="c"&gt;      #wrapper, #logo, #header, #container, #sidebar, #content { display: block }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC45"&gt;&lt;span class="c"&gt;      #header { position: absolute; padding-left: 200px; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC46"&gt;&lt;span class="c"&gt;      #logo { float:left; height:100%; width:200px; margin-left: -200px; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC47"&gt;&lt;span class="c"&gt;      #header_contents { height: 100%; width:100%; float:left;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC48"&gt;&lt;span class="c"&gt;      #sidebar { float: left; height: 100%; margin-left: -200px; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC49"&gt;&lt;span class="c"&gt;      #container { height: 100%; padding-top: 99px; padding-left: 200px; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC50"&gt;&lt;span class="c"&gt;      #content { height: 100%; width: 100%; float: left; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC51"&gt;&lt;span class="c"&gt;    &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC52"&gt;&lt;span class="c"&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC53"&gt;  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC54"&gt;  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC55"&gt;    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wrapper&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC56"&gt;      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC57"&gt;        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;logo&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Logo&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;header_contents&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Header&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC58"&gt;      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC59"&gt;      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;container&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC60"&gt;        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;sidebar&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;box&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sidebar&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC61"&gt;        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC62"&gt;          &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;box&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC63"&gt;        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC64"&gt;      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC65"&gt;    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC66"&gt;  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC67"&gt;&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/the-new-css-100-width-and-height-with-header-0"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/the-new-css-100-width-and-height-with-header-0#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/timocracy/~4/OxqOowEVfK8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
      <media:content type="image/png" height="405" width="472" url="http://getfile6.posterous.com/getfile/files.posterous.com/temp-2010-10-10/ceplJbqiAECBpHgcphyterxAvBqJEpvlfeBJuBhhBstxleqCoddDCuzpnfJx/standards.png">
        <media:thumbnail height="405" width="472" url="http://getfile7.posterous.com/getfile/files.posterous.com/temp-2010-10-10/ceplJbqiAECBpHgcphyterxAvBqJEpvlfeBJuBhhBstxleqCoddDCuzpnfJx/standards.png.scaled500.png" />
      </media:content>
      <media:content type="image/png" height="388" width="420" url="http://getfile3.posterous.com/getfile/files.posterous.com/temp-2010-10-10/wiuzijCafmslEEajmthEybmqtAastgtFngHxiasxyEdAomtFzasBIvyjpkGx/ies.png">
        <media:thumbnail height="388" width="420" url="http://getfile2.posterous.com/getfile/files.posterous.com/temp-2010-10-10/wiuzijCafmslEEajmthEybmqtAastgtFngHxiasxyEdAomtFzasBIvyjpkGx/ies.png.scaled500.png" />
      </media:content>
      <media:content type="image/png" height="413" width="512" url="http://getfile8.posterous.com/getfile/files.posterous.com/temp-2010-10-10/EnxhEqqatGtohzlEImIsrJqzBlFmxHbsuvbHlCyBHfkCltJycsdFqBkswmlz/scrolling1.png">
        <media:thumbnail height="403" width="500" url="http://getfile9.posterous.com/getfile/files.posterous.com/temp-2010-10-10/EnxhEqqatGtohzlEImIsrJqzBlFmxHbsuvbHlCyBHfkCltJycsdFqBkswmlz/scrolling1.png.scaled500.png" />
      </media:content>
      <media:content type="image/png" height="413" width="512" url="http://getfile3.posterous.com/getfile/files.posterous.com/temp-2010-10-10/HIcAwrtAhcCldeabackCcybkClmhpxhdrIdbpIiwhHklCvwqFkHwskhgttwq/scrolling2.png">
        <media:thumbnail height="403" width="500" url="http://getfile1.posterous.com/getfile/files.posterous.com/temp-2010-10-10/HIcAwrtAhcCldeabackCcybkClmhpxhdrIdbpIiwhHklCvwqFkHwskhgttwq/scrolling2.png.scaled500.png" />
      </media:content>
    <feedburner:origLink>http://posterous.timocracy.com/the-new-css-100-width-and-height-with-header-0</feedburner:origLink></item>
    <item>
      <pubDate>Sat, 09 Oct 2010 16:31:17 -0700</pubDate>
      <title>Getting back on the horse that threw me</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/worzq7OtedE/getting-back-on-the-horse-that-threw-me</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/getting-back-on-the-horse-that-threw-me</guid>
      <description>&lt;p&gt;
	So after about 3 years of happily working at &lt;a href="http://www.yieldbuild.com"&gt;YieldBuild&lt;/a&gt;, I decided it was time to try something new (or retry something old).  I&amp;#39;d still definitely recommend them as an employer, so let me know if you want to your resume passed along.&lt;p /&gt;&lt;div&gt;I&amp;#39;m in the process of rebooting my web contracting firm (I&amp;#39;ll post when I have the new rebranded web-site up) and am currently doing a gig at the &lt;a href="http://www.pivotallabs.com"&gt;the incredible Pivotal Labs&lt;/a&gt;; learning more about their approach to the agile way.  &lt;/div&gt; &lt;p /&gt;&lt;div&gt;I am planning on focusing on doing quick prototypes for start-ups/founders that will help them flesh out their ideas and perhaps secure funding for a next stage.  Projects initially too small for a firm like Pivotal could grow to a size they would be interested in after I help them out.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;That means I&amp;#39;m definitely in the market for contract work again.  I&amp;#39;m busy 9-6 PST for a while, since Pivotal does full-time pairing and you can&amp;#39;t cut out easily for other stuff, but I have a some bandwidth for side-projects in the evenings and on the week-ends.  &lt;/div&gt; &lt;p /&gt;&lt;div&gt;And after that gig wraps up I&amp;#39;ll be looking for more larger projects - if I can get enough consistent work I may be rehiring some of my old employees.&lt;/div&gt;&lt;p /&gt;&lt;div&gt;&lt;a href="mailto:timocratic@gmail.com"&gt;Drop me a line&lt;/a&gt; if you need some ruby, javascript, html/css, etc done.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/getting-back-on-the-horse-that-threw-me"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/getting-back-on-the-horse-that-threw-me#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/timocracy/~4/worzq7OtedE" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/getting-back-on-the-horse-that-threw-me</feedburner:origLink></item>
    <item>
      <pubDate>Sat, 04 Sep 2010 14:33:21 -0700</pubDate>
      <title>A list of some sites I follow to keep up in my field (ruby and web development)</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/mRUPhoJiWQA/a-list-of-some-sites-i-follow-to-keep-up-in-m</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/a-list-of-some-sites-i-follow-to-keep-up-in-m</guid>
      <description>&lt;p&gt;
	&lt;a href="http://www.google.com/reader/bundle/user%2F12740622692005399469%2Fbundle%2FRuby%20JS%20and%20other%20dev"&gt;http://www.google.com/reader/bundle/user%2F12740622692005399469%2Fbundle%2FRuby%20JS%20and%20other%20dev&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/a-list-of-some-sites-i-follow-to-keep-up-in-m"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/a-list-of-some-sites-i-follow-to-keep-up-in-m#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/timocracy/~4/mRUPhoJiWQA" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/a-list-of-some-sites-i-follow-to-keep-up-in-m</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 21 Jun 2010 17:35:00 -0700</pubDate>
      <title>Git sub-tree merging back to the subtree for pushing to an upstream</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/KWEyn7wBmO4/git-sub-tree-merging-back-to-the-subtree-for</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for</guid>
      <description>&lt;p&gt;
	&lt;p&gt;While &lt;a href="http://progit.org/book/ch6-7.html"&gt;git sub-tree merge strategy&lt;/a&gt; works great for merging a library into vendor (when you want to pull HEAD on that library instead of waiting for releases), I had trouble finding documentation on pushing back to upstream.  This is annoying because one of the most obvious times you may want to use subtree is when you manage the library yourself, so can just pull straight from the repo, and want to push your maintenance changes back.&lt;/p&gt;
&lt;p&gt;Surprisingly, and not what I have come to expect from git, it just works.  From the example in the docs I linked, when you are checked out on master&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;git merge --squash -s subtree --no-commit rack_branch&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;will merge the rack_branch into where you have specified.  But it just works the other way to.  If checked out on rack_branch&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;git merge --squash -s subtree --no-commit master&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;will do what you expect, so you can now just push your library branch back to it's upstream.&lt;/p&gt;
&lt;p&gt;Awesome!&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for#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/timocracy/~4/KWEyn7wBmO4" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 19 May 2010 23:32:00 -0700</pubDate>
      <title>Our vows and pre-vow speeches</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/z50yJETCMB8/our-vows-and-pre-vow-speeches</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/our-vows-and-pre-vow-speeches</guid>
      <description>&lt;p&gt;
	&lt;h2&gt;Roula&lt;/h2&gt;
&lt;p&gt;I am honored that you have chosen me to be your wife.  You: the best person I know, my dearest friend, the highlight of my day.  &lt;/p&gt;
&lt;p&gt;I may have doubts and questions about life, but of you and this marriage I have none - it is the most fulfilling work of my life.&lt;/p&gt;
&lt;p&gt;The sounds of your voice and the touch of your hand assures me that I am, at last, home, and I cannot wait to spend the rest of my life with you.&lt;/p&gt;
&lt;p&gt;I love you now and always.&lt;/p&gt;
&lt;h2&gt;Tim&lt;/h2&gt;
&lt;p&gt;Some of you know that we aren't very traditional and aren't sold on the cultural expectations of marriage. We decided we'd try and have a kid before we decided to get married and we live as if we are married: we live together, share our expenses, daily life, hopes, dreams, and plans. Yet, I very much wanted to have a wedding and get married.&lt;/p&gt;
&lt;p&gt;I want to commit so absolutely that Roula can feel it incarnated on her finger.  I want her to have a constant reminder that I am here for her, at all times, and I want the same for me.  I want to gather our loved ones and have them share a moment where we formalize our commitment. I want to crystalize and distill this moment down for all eternity, for us to share and remember when we are 102 and and hobbling down to the park for a Sunday picnic. I want to make the implicit, explicit, and for us to say out loud, in front of witnesses, the things we already both know and feel.&lt;/p&gt;
&lt;h2&gt;Vows&lt;/h2&gt;
&lt;p&gt;I promise to love and treasure you always, in sickness and in health, in poverty and in wealth;&lt;br /&gt;to be considerate of your feelings, kind in all things, and ask forgiveness when I fail at that;&lt;br /&gt;to talk through the tough times and always remember to the good ones;&lt;br /&gt;to hold you above all others in my heart.&lt;/p&gt;
&lt;p&gt;This I vow: to commit to this marriage with all my being and no reservations.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/our-vows-and-pre-vow-speeches"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/our-vows-and-pre-vow-speeches#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/timocracy/~4/z50yJETCMB8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/our-vows-and-pre-vow-speeches</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 27 Apr 2010 18:09:45 -0700</pubDate>
      <title>The Tea Party is Racist</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/CXt9D12Xo9w/the-tea-party-is-racist</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/the-tea-party-is-racist</guid>
      <description>&lt;p&gt;
	&lt;a href="http://politicalirony.com/2010/04/27/the-tea-party-is-racist/"&gt;http://politicalirony.com/2010/04/27/the-tea-party-is-racist/&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/the-tea-party-is-racist"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/the-tea-party-is-racist#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/timocracy/~4/CXt9D12Xo9w" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/the-tea-party-is-racist</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 27 Apr 2010 18:06:44 -0700</pubDate>
      <title>Unobtrusive JavaScript vs. Kool-Aid</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/judPAabF7e0/unobtrusive-javascript-vs-kool-aid</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/unobtrusive-javascript-vs-kool-aid</guid>
      <description>&lt;p&gt;
	Great response to @jamis' UJS == Kool-aid posts. Welcome to the post-2005 era of web dev. ;)&lt;p /&gt;  &lt;p /&gt; &lt;p /&gt; &lt;div style="font-family: sans-serif; overflow: auto; margin: 0px 10px;"&gt;&lt;h2 style="margin: 0.25em 0 0 0;" /&gt;&lt;div class=""&gt;&lt;a href="http://feedproxy.google.com/~r/dailyjs/~3/BcWRmWlkHRQ/unobtrusive-js"&gt;Unobtrusive JavaScript vs. Kool-Aid&lt;/a&gt;&lt;/div&gt; &lt;div style="margin-bottom: 0.5em;"&gt;via &lt;a href="http://dailyjs.com" class="f"&gt;DailyJS&lt;/a&gt; on 4/26/10&lt;/div&gt;&lt;br style="display: none;" /&gt; &lt;p&gt;This article is a guide to writing &lt;em&gt;unobtrusive JavaScript&lt;/em&gt;. It’s not always easy for people to transition to writing JavaScript this way, so I’ve tried to address common concerns.&lt;/p&gt; &lt;p&gt;The techniques presented here should enable you to think differently about client-side code and work more productively.&lt;/p&gt; &lt;h3&gt;Background&lt;/h3&gt; &lt;p&gt;It’s important to realise that unobtrusive JavaScript is an evolving concept, perhaps even a movement. The broad goal is to separate JavaScript into a &lt;em&gt;behaviour&lt;/em&gt; layer, but related goals include: enhancing browser behaviour, capability detection, and transparently supporting modern platforms like touchscreen phones.&lt;/p&gt; &lt;p&gt;This article was inspired by my surprise at the following tweets:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;almost two months later, I’m still have trouble swallowing the &lt;span&gt;UJS&lt;/span&gt; kool-aid. &lt;a href="http://twitter.com/jamis/status/12901143048"&gt;@jamis&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;Funny how the JS people get all shocked and dismayed when jamis complains about &lt;span&gt;UJS&lt;/span&gt;. Evidence of kool-aid. &lt;a href="http://twitter.com/rjs/status/12903026393"&gt;@rjs&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Unobtrusive JavaScript isn’t a fad, it’s how you should write JavaScript&lt;/strong&gt;. If you read this blog, you’re probably doing it already. If you have server-side developer friends who don’t write much client-side code, please send them this article!&lt;/p&gt; &lt;p&gt;I don’t advocate blindly applying the techniques championed by the proponents of unobtrusive JavaScript. However, I have learned lessons from several hard-won battles which have enabled me to write JavaScript more productively — my own practices have evolved &lt;em&gt;towards&lt;/em&gt; unobtrusive JavaScript over the last 4-5 years.&lt;/p&gt; &lt;h3&gt;Inline JavaScript&lt;/h3&gt; &lt;p&gt;Where does inline JavaScript come from? One common place is server-side frameworks. It’s easier for frameworks to inject JavaScript through helpers — popular frameworks like &lt;a href="http://rubyonrails.org/"&gt;Rails&lt;/a&gt; do this. This is because the &lt;span&gt;HTML&lt;/span&gt; and JavaScript these frameworks generate is naturally tightly coupled. It’s also because the framework builders often try to appeal to the host language rather than seasoned JavaScript developers.&lt;/p&gt; &lt;p&gt;Inline JavaScript crops up in several places:&lt;/p&gt; &lt;ul&gt; 	&lt;li&gt;Events like &lt;code&gt;onclick&lt;/code&gt; are added to page elements through attributes&lt;/li&gt; 	&lt;li&gt;Inline &lt;code&gt;script&lt;/code&gt; tags&lt;/li&gt; 	&lt;li&gt;Conditionally generated combinations of the above&lt;/li&gt; 	&lt;li&gt;Custom solutions like Rails’ &lt;span&gt;RJS&lt;/span&gt; templates (often used to communicate between the server and client)&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;These techniques work well for frameworks and make life easy for the host language developer. In fact, Rails is one of the projects that helped JavaScript frameworks bring Ajax to the world, and also the now ubiquitous use of visual effects through projects like &lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;The Alternative&lt;/h3&gt; &lt;p&gt;The alternative isn’t just about moving your JavaScript into its own files. It’s to change the way you think about JavaScript, the &lt;span&gt;DOM&lt;/span&gt;, and &lt;span&gt;HTML&lt;/span&gt; templates.&lt;/p&gt; &lt;p&gt;If you’ve worked with &lt;span&gt;CSS&lt;/span&gt;, you’ll be familiar with the separation of style from structure through the use of stylesheets. The popular argument for writing unobtrusive JavaScript is that scripts define a &lt;em&gt;behaviour&lt;/em&gt; layer, and therefore should be separated, just like stylesheets.&lt;/p&gt; &lt;p&gt;This is true up to a point, but it takes a leap of faith to get there. The key is to stop thinking about templates like static blocks of &lt;span&gt;HTML&lt;/span&gt;, and see documents for what they are: living, breathing tree structures of &lt;span&gt;DOM&lt;/span&gt; objects, events, and styles.&lt;/p&gt; &lt;h3&gt;Concerns&lt;/h3&gt; &lt;p&gt;The main concern of those who are uncomfortable with writing unobtrusive JavaScript is maintainability. This is deeper than just finding code, or the link between a template and a script — it also affects project management.&lt;/p&gt; &lt;p&gt;When planning new features, it can be difficult to determine what page elements will be affected by a change if all of the JavaScript is outside the templates.&lt;/p&gt; &lt;p&gt;Or is it?&lt;/p&gt; &lt;h3&gt;Mental Models&lt;/h3&gt; &lt;p&gt;People resist writing JavaScript this way is because their mental model of a &lt;span&gt;HTML&lt;/span&gt; document is based on &lt;span&gt;HTML&lt;/span&gt; templates. A more useful mental model is one which encapsulates the true nature of the &lt;span&gt;DOM&lt;/span&gt; — a document is a collection of interrelated objects, affected by scripts, stylesheets and their very structure.&lt;/p&gt; &lt;p&gt;When I start work on a new project or feature, I think in terms of these objects and how they’re related. I try to group like items and behaviours — just as styles can be efficiently shared, &lt;em&gt;events&lt;/em&gt; can also.&lt;/p&gt; &lt;h3&gt;Strategies and Patterns&lt;/h3&gt; &lt;h4&gt;&lt;span&gt;DOM&lt;/span&gt; Ready&lt;/h4&gt; &lt;p&gt;This is what makes healthy client-side code possible. &lt;span&gt;DOM&lt;/span&gt; ready lets you run a function when the document is in a usable state. This allows you to safely bind event handlers. In jQuery it looks like this:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;$(document).ready(function() { // Your code here });&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;Prototype:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;document.observe(&amp;quot;dom:loaded&amp;quot;, function() { // Your code here });&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;This isn’t actually an easy thing to write from scratch — let the framework do the work. I’ve written my own &lt;span&gt;DOM&lt;/span&gt; ready handler before and it wasn’t much fun (mainly due to IE).&lt;/p&gt; &lt;h4&gt;Event Delegation: &lt;span&gt;DRY&lt;/span&gt;&lt;/h4&gt; &lt;p&gt;If you’ve come to JavaScript through jQuery, you might be wondering what I’ve been talking about. People raised on jQuery think in terms of event delegation, and this is one of the key strategies to writing unobtrusive JavaScript.&lt;/p&gt; &lt;p&gt;Event delegation is where an event is bound to a containing element, then conditionally executed based on the event’s element.&lt;/p&gt; &lt;p&gt;Imagine if you wanted to open popup windows when the user clicks a link. You could attach an &lt;code&gt;onclick&lt;/code&gt; attribute and set up a window. Every link would then have to repeat this code.&lt;/p&gt; &lt;p&gt;An alternative approach is to use event delegation to bind an event to a high level element, the use a class to trigger a special popup event handler:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;$(document).click(function(event) { if ($(event.target).is('.popup') { // Open a new window with specified parameters } event.preventDefault(); });&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;The benefit is similar to the benefits brought in by stylesheets — you can now change the behaviour of all popup windows across your entire project. You could even have multiple class names for different window properties — sizes, toolbar hiding, whatever! It also makes the page size smaller, all for the price of one event handler with an &lt;code&gt;if&lt;/code&gt; statement.&lt;/p&gt; &lt;h4&gt;Internal Relationships&lt;/h4&gt; &lt;p&gt;On larger projects I use a technique that maps &lt;em&gt;controllers&lt;/em&gt; to JavaScript objects. I do this by using &lt;code&gt;body&lt;/code&gt; ID tags and classes. A function runs when the &lt;span&gt;DOM&lt;/span&gt; is ready and calls the appropriate object.&lt;/p&gt; &lt;p&gt;For example, let’s say you’re making a blog application in Rails (or similar) and you have an &lt;code&gt;ArticlesController&lt;/code&gt;. I’d use a helper in my Rails layout to create an appropriate body tag:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;%= body :id =&amp;gt; controller.name %&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;Which is defined like this:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;def body(options = {}) tag 'body', options, true end&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;Then my JavaScript delegation function would look at the body tag and call a method on an associated object:&lt;/p&gt; &lt;div&gt;&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;ArticlesController = { run: function() { // Do stuff that the articles templates need } }; $(document).ready(function() { var controllerName = ''; if ($('body').id) { controllerName = $('body').id + 'Controller'; if (typeof controllerName !== 'undefined') { controllerName['run'](); } } });&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;/div&gt;&lt;p&gt;This body ID delegation pattern has allowed me to build very large Rails projects without feeling lost when moving between JavaScript and Rails templates. I also use body class names for shared functionality. The JavaScript “controllers” are generally stubs that invoke other objects.&lt;/p&gt; &lt;p&gt;Any framework could use this technique — it’s really just an agreement between your server-side code and JavaScript.&lt;/p&gt; &lt;h3&gt;Test First&lt;/h3&gt; &lt;p&gt;When I start writing JavaScript for a project, I try to think in terms of the core functionality, independent of the browser. I’ll write console-based code and run unit tests in the console. Once I’m happy with my “models” I’ll start to hook up event handlers.&lt;/p&gt; &lt;p&gt;Get used to thinking about events through &lt;span&gt;CSS&lt;/span&gt; classes — try to group like events and rely on high-level delegated event handlers. Not only does this result in fast UI code, it also makes testing easier.&lt;/p&gt; &lt;h3&gt;Light Event Handlers&lt;/h3&gt; &lt;p&gt;Good code us usually easy to test. I’ve found that writing light event handlers then calling higher-level objects helps keep testing simple and increases reusability.&lt;/p&gt; &lt;h3&gt;Basics&lt;/h3&gt; &lt;p&gt;It’s useful to be fully-versed in JavaScript’s object model and prototypal inheritance. Even though you can use certain libraries to ape classical OO, good code comes from a deep understanding of the tools at hand.&lt;/p&gt; &lt;p&gt;Maintainable and clear code comes from knowing when to exploit JavaScript’s flexible object system, rather than trying to write in a style that doesn’t suit it.&lt;/p&gt; &lt;h3&gt;Byte-sized Takeaway&lt;/h3&gt; &lt;p&gt;Keeping JavaScript out of templates can help:&lt;/p&gt; &lt;ul&gt; 	&lt;li&gt;Reduce page size&lt;/li&gt; 	&lt;li&gt;Improve performance&lt;/li&gt; 	&lt;li&gt;Allow broad brush-stroke changes across a site&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;To ensure projects are maintainable:&lt;/p&gt; &lt;ul&gt; 	&lt;li&gt;Create a clear link between templates and the location of associated scripts&lt;/li&gt; 	&lt;li&gt;Use the body ID/class technique&lt;/li&gt; 	&lt;li&gt;Think in terms of &lt;span&gt;DOM&lt;/span&gt; objects — the &lt;span&gt;DOM&lt;/span&gt; is a living, breathing system, not just a static page&lt;/li&gt; 	&lt;li&gt;Exploit JavaScript’s inherent advantages rather than trying to force it to be something it isn’t&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/dailyjs/~4/BcWRmWlkHRQ" height="1" width="1" /&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/unobtrusive-javascript-vs-kool-aid"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/unobtrusive-javascript-vs-kool-aid#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/timocracy/~4/judPAabF7e0" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/unobtrusive-javascript-vs-kool-aid</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 22 Apr 2010 00:37:19 -0700</pubDate>
      <title>Following up on how to test a config.ru, an actual patch </title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/wajfWHqGLHg/following-up-on-how-to-test-a-configru-an-act</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/following-up-on-how-to-test-a-configru-an-act</guid>
      <description>&lt;p&gt;
	&lt;a href="http://github.com/timocratic/rack-test/commit/dd5324627890b4632c07deed1fc252827cab7c51"&gt;http://github.com/timocratic/rack-test/commit/dd5324627890b4632c07deed1fc2528...&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/following-up-on-how-to-test-a-configru-an-act"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/following-up-on-how-to-test-a-configru-an-act#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/timocracy/~4/wajfWHqGLHg" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/following-up-on-how-to-test-a-configru-an-act</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 21 Apr 2010 10:20:00 -0700</pubDate>
      <title>Testing a rackup (config.ru) file with Rack::Test</title>
      <link>http://feedproxy.google.com/~r/timocracy/~3/cWnnRUpTwaE/testing-a-rackup-configru-file-with-racktest</link>
      <guid isPermaLink="false">http://posterous.timocracy.com/testing-a-rackup-configru-file-with-racktest</guid>
      <description>&lt;p&gt;
	&lt;p&gt;The ever useful &lt;a href="http://github.com/brynary/rack-test"&gt;rack-test gem let's you easily integration test any rack project&lt;/a&gt;.  All you have to do is include the Rack::Test::Methods and define an app method that returns your rack app.  So people usually have a config.ru that just references their my_application.rb that they reference in their config.ru and then in their test file they can also reference that app and return it.  Something to to this effect:&lt;/p&gt;
&lt;p&gt;&lt;div class="data type-ruby"&gt;
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MySweetRackApp&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;Proc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Content-Type&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;text/html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;success&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I had a project where I was actually trying to better breakdown a more complex app, and I wanted to just be able to use Rack's built-in map method at the top level of my config.ru to route to different apps.  And in at least some of the cases I wanted to be able to test the whole thing.  Also, I figured sometimes it's useful to actually be able to test your rackup file itself, all routing/mapping included.  So I dug around in the rack code and found how the rackup command handles the .ru file, and came up with this:&lt;/p&gt;
&lt;p&gt;&lt;div class="data type-ruby"&gt;
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="n"&gt;use&lt;/span&gt; &lt;span class="no"&gt;Rack&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Bug&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/my_sweet_rack_app&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;run&lt;/span&gt; &lt;span class="no"&gt;MySweetRackApp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="no"&gt;DenyAccessAndRecordRetinaApp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are running off of a new enough version of rack, you could also just use Rack::Builder.parse_file&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://posterous.timocracy.com/testing-a-rackup-configru-file-with-racktest"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://posterous.timocracy.com/testing-a-rackup-configru-file-with-racktest#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/timocracy/~4/cWnnRUpTwaE" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/268173/3615386840_8daa074da0.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/36jCZ6DFuhgZ</posterous:profileUrl>
        <posterous:firstName>Tim</posterous:firstName>
        <posterous:lastName>Connor</posterous:lastName>
        <posterous:nickName>timocratic</posterous:nickName>
        <posterous:displayName>Tim Connor</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://posterous.timocracy.com/testing-a-rackup-configru-file-with-racktest</feedburner:origLink></item>
  </channel>
</rss>

