<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yan Pritzker</title>
	<atom:link href="http://yanpritzker.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanpritzker.com</link>
	<description>photographer, entrepreneur, software engineer, musician, skier</description>
	<lastBuildDate>Fri, 29 Mar 2013 19:46:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel="next" href="http://yanpritzker.com/feed/?page=2" />

		<item>
		<title>Reverb Dev Blog Launches</title>
		<link>http://yanpritzker.com/2013/03/29/reverb-dev-blog-launches/</link>
		<comments>http://yanpritzker.com/2013/03/29/reverb-dev-blog-launches/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 18:54:57 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=605</guid>
		<description><![CDATA[We just launched the Reverb Dev Blog. I&#8217;ll be blogging there about more technical topics. This blog will remain as my personal blog with broader articles and thoughts, but with less technical content. If you&#8217;re interested in advanced Rails concepts and lean startup techniques, please follow the Reverb Dev Blog.]]></description>
			<content:encoded><![CDATA[<p>We just launched the <a href="http://devblog.reverb.com">Reverb Dev Blog</a>. I&#8217;ll be blogging there about more technical topics. This blog will remain as my personal blog with broader articles and thoughts, but with less technical content. If you&#8217;re interested in advanced Rails concepts and lean startup techniques, please follow the <a href="http://devblog.reverb.com">Reverb Dev Blog</a>.</p>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2013/03/29/reverb-dev-blog-launches/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2013/03/29/reverb-dev-blog-launches/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Reader dies. Who will profit?</title>
		<link>http://yanpritzker.com/2013/03/14/google-reader-dies-who-will-profit/</link>
		<comments>http://yanpritzker.com/2013/03/14/google-reader-dies-who-will-profit/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 16:58:06 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=599</guid>
		<description><![CDATA[Google is killing off Google Reader, which acts as a warehouse of feeds for many people, feeding apps like Feedly and MobileRSS. When it goes away there will be a power void. What we need is for someone to quickly build an API compatible replacement. Don&#8217;t worry about the web UI part, just let people [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://techcrunch.com/2013/03/13/googlereaderpocalypse-for-real-this-time/" title="Google is killing off Google Reader">Google is killing off Google Reader,</a> which acts as a warehouse of feeds for many people, feeding apps like Feedly and MobileRSS.</p>

<p>When it goes away there will be a power void. What we need is for someone to quickly build an API compatible replacement.</p>

<p>Don&#8217;t worry about the web UI part, just let people use a google account, pull their feeds, and then expose them with the same api. Charge a dollar. Or go to partners producing rss apps like Feedly and have them pay to use your api. They will need something like this if gReader goes away. You can cross promote feed apps and they can promote you to their users. Maybe get acquired by one of the larger feed app companies.</p>

<p>It seemse that <a href="http://www.engadget.com/2013/03/13/feedly-rss-service-promises-seamless-transition-after-google-r/">Feedly is already busy building an API replacement</a>. Whether they share this with other companies stands to be seen. Either way, I think there is room to compete here and to provide services for all the feed aggregators that are currently relying on Google Reader.</p>

<p>If I wasn&#8217;t so busy with <a href="http://reverb.com">creating a marketplace for musicians</a> I would be all over this. Now please lazy internet, make this happen :)</p>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2013/03/14/google-reader-dies-who-will-profit/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2013/03/14/google-reader-dies-who-will-profit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lean split testing with Nginx and Mixpanel in 5 minutes</title>
		<link>http://yanpritzker.com/2012/10/18/lean-split-testing-with-nginx-and-mixpanel-in-5-minutes/</link>
		<comments>http://yanpritzker.com/2012/10/18/lean-split-testing-with-nginx-and-mixpanel-in-5-minutes/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 17:20:51 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[a/b]]></category>
		<category><![CDATA[lean]]></category>
		<category><![CDATA[mixpanel]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[split testing]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=581</guid>
		<description><![CDATA[Lean split testing with Nginx and Mixpanel in 5 minutes Here&#8217;s a dead simple way to set up a split test without using a fancy application server or Rails application. Let&#8217;s say you&#8217;re starting out with a new application and you want to test a few versions of the landing page. In the truly lean [...]]]></description>
			<content:encoded><![CDATA[<p>Lean split testing with Nginx and Mixpanel in 5 minutes</p>

<p>Here&#8217;s a dead simple way to set up a split test without using a fancy application server or Rails application.</p>

<p>Let&#8217;s say you&#8217;re starting out with a new application and you want to test a few versions of the landing page. In the truly lean fashion, you haven&#8217;t built any dynamic application backend yet. All you&#8217;ve got is two versions of the homepage in static html, using something like MailChimp on the backend to capture your signups.</p>

<p>Take your two versions and place them in a directory, along with whatever assets (css/js/images) go along with them:</p>

<ul>
<li>public_html/welcome.html</li>
<li>public_html/hello.html</li>
</ul>

<p>Let&#8217;s also assume that these pages contain some type of signup form that redirects back to:</p>

<ul>
<li>public_html/thanks.html</li>
</ul>

<p>That way we&#8217;ll know the goal is completed.</p>

<p>Notice that I&#8217;ve named them in user friendly ways. This will become important as we&#8217;ll have our webserver (nginx) redirect to those pages, so users will see them in the url. Why nginx? Because apache is a horrible nightmare to configure.</p>

<p>Now sign up for <a href="http://mixpanel.com" title="mixpanel">mixpanel.com</a> and follow their instructions to place a snippet of their javascript into those two pages. Additionally, add an event to the bottom of each page to identify it:</p>

<p><strong>welcome.html:</strong>

<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>mixpanel.track(&quot;Landing Page: Welcome&quot;);<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></div>

</p>

<p><strong>hello.html:</strong>

<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>mixpanel.track(&quot;Landing Page: Hello&quot;);<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></div>

</p>

<p><strong>thanks.html:</strong>

<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>mixpanel.track(&quot;Signup Completed&quot;);<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></div>

</p>

<p>Now, we&#8217;ll set up nginx to redirect to one of these pages &#8220;randomly&#8221;. Since there is no true random capability built in, we&#8217;re going to use the last digit of the user&#8217;s ip:</p>

<p><strong>/etc/nginx/sites-enabled/mysite.conf</strong></p>

<blockquote>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">server {<br />
&nbsp; listen 80;<br />
&nbsp; server_name website.com;<br />
&nbsp; root /home/someuser/public_html;<br />
<br />
&nbsp; location / {<br />
&nbsp; &nbsp; if ($remote_addr ~ &quot;[02468]$&quot;) {<br />
&nbsp; &nbsp; &nbsp; rewrite ^/$ http://website.com/welcome.html break;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if ($remote_addr ~ &quot;[13579]$&quot;) {<br />
&nbsp; &nbsp; &nbsp; rewrite ^/$ http://website.com/hello.html break;<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
}</div></div>

</blockquote>

<p>Now hit your website. If your ip is even, you&#8217;ll see the first page, and if it&#8217;s odd, you&#8217;ll see the second page.</p>

<p>Go to Mixpanel, and create two Funnels. One that starts with your welcome event, and one that starts with the hello event, and the second step in each funnel is the Signup Completed event. Now you have a funnel analysis for each page, and you can compare each to see how it performs.</p>

<p>All that, and without even an application server.</p>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/10/18/lean-split-testing-with-nginx-and-mixpanel-in-5-minutes/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/10/18/lean-split-testing-with-nginx-and-mixpanel-in-5-minutes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nine months of pair programming</title>
		<link>http://yanpritzker.com/2012/08/22/nine-months-of-pair-programming/</link>
		<comments>http://yanpritzker.com/2012/08/22/nine-months-of-pair-programming/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 22:17:35 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[productivity]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=572</guid>
		<description><![CDATA[I&#8217;ve paired off and on throughout my programming career, but for the last nine months, I&#8217;ve had a chance to pair nearly full time. I&#8217;m not much of a drink-the-koolaid dogmatist, so I&#8217;ll try to give my honest opinion about what&#8217;s wonderful and not so wonderful about pair programming. The Good: Zero time for knowledge [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve paired off and on throughout my programming career, but for the last nine months, I&#8217;ve had a chance to pair nearly full time. I&#8217;m not much of a drink-the-koolaid dogmatist, so I&#8217;ll try to give my honest opinion about what&#8217;s wonderful and not so wonderful about pair programming.</p>
<h3>The Good:</h3>
<p><strong>Zero time for knowledge transfer</strong> &#8211; when my pair partner decided to leave the company, we didn&#8217;t have weeks of knowledge transfer sessions. Because we had been pairing about 90% of the time, there was actually no knowledge transfer required. Contrast to previous companies, where a core engineer with siloed knowledge leaving the company would wreak havoc.</p>
<p><strong>I felt more productive.</strong> A pair keeps you honest and prevents you from facebooking and checking email compulsively. This meant that we would get a very strong groove going and be very productive. Conversely, by the time 4:30 or 5pm rolled around, we were pretty destroyed. While we tried to take sporadic breaks, I found that when I worked by myself, I would work longer but with more breaks. With a pair, we would work shorter hours but start to feel quite inefficient by the afternoon.</p>
<p><strong>Higher quality code.</strong> I did feel that after discussing things with a pair, the overall code quality improved. For this to work, your pair doesn&#8217;t always have to be an all-knowledgeable rockstar. Even bouncing ideas off someone who doesn&#8217;t understand them fully can often lead to a better design. But it&#8217;s even better if your pair nicely complements your knowledge in areas you&#8217;re not strong in. I was lucky to work with some pretty bright people. In past companies, I had been paired with B-level guys, and that was not only a drag on productivity but also morale, leading me to dismiss pairing. But that&#8217;s more of a hiring issue, and not a pairing problem.</p>
<h3>Not So Good</h3>
<p><strong>My voice got tired.</strong> I also find that when coding, something happens to my linguistic center for English and I just start speaking very strangely. Switching constantly between English and code is hard and reduces overall productivity. On the other hand, discussing things usually leads to better code.</p>
<p><strong>Research and learning is awkward.</strong> It&#8217;s definitely counter productive to read over someone&#8217;s shoulder while they&#8217;re doing research, as people read and absorb information on different schedules and in different ways. For example, I google and skim pages at lightning speed, causing my partners to probably think I have ADD, but that&#8217;s what works for me. I found it extremely helpful if one person was coding, the other could use a second computer to look things up and pass things back and forth as chat links. </p>
<p><strong>Creative tasks are harder.</strong> While our combined creativity in refactoring code was high, non-coding tasks such as visual/ux design became a chore with someone over your shoulder. I found it easier to break apart for such things and have one person work on the connecting code while I mocked up the design.</p>
<p><strong>Simple tasks take longer.</strong> While the overhead of pairing is well justified when you&#8217;re debugging complex issues, designing new areas of the system, and so on, for quick one liner tasks the overhead of having to explain to your partner what you&#8217;re doing slowed the overall process down. </p>
<p>During times when I worked remotely, I was able to knock lots of little tasks in a day, whereas with a partner it felt like we achieved half as much. During remoting sessions, we would not simultaneously pair, but we would discuss things in chatrooms, and do code review via github pull requests. I believe if you are not lazy in code review, and really question every line of code, it can be just as good as pairing in terms of code quality.</p>
<p><strong>The desire for environment uniformity can be difficult to handle.</strong> One partner I worked with had an idea that everyone should have exactly the same environment, editor, etc. I believe this idea comes from Pivotal Labs. Having a uniform environment lets you seamlessly switch from one workstation to another and not have to adjust. This seems like a good idea on the surface, so that developers can be equally productive. However, I believe that lowering everyone to the lowest common denominator actually decreases productivity. </p>
<p>For example, my <a href="http://github.com/skwp/dotfiles">vim setup</a> lets me type probably an order of magnitude less keystrokes per day than most people and achieve incredible speed and efficiency. I personally don&#8217;t feel comfortable having to type more, which is horrible for your hand health, and forced into an editor I don&#8217;t like just to achieve team uniformity. Instead, I find having two machines side by side, with one person reviewing code and doing research much more productive. With my other partner, we were able to achieve a nice harmony with him driving for half the day, and I for the other half. This allowed each of us to be ultra productive on home turf, while still getting all the benefits of pairing in terms of knowledge transfer and code review.</p>
<h3>Summary</h3>
<p>I think pairing coupled with an extremely pragmatic approach to knowing when <em>not</em> to pair is the key to success. For me, the benefits of pairing are very high. Instant knowledge transfer and high quality code are very important. But, I believe it must come with a healthy dose of scheduled breaks, time for doing solo tasks such as design, and occasional remote code review sessions to give pairs a psychological break and mental refresh.
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/08/22/nine-months-of-pair-programming/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/08/22/nine-months-of-pair-programming/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Stop using colon commands in vim</title>
		<link>http://yanpritzker.com/2012/05/30/stop-using-colon-commands-in-vim/</link>
		<comments>http://yanpritzker.com/2012/05/30/stop-using-colon-commands-in-vim/#comments</comments>
		<pubDate>Wed, 30 May 2012 16:40:43 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=549</guid>
		<description><![CDATA[Time for another vim geekout! :) Typing colon :commands is really slow. You have to hit shift, colon, command, plus enter to execute. You&#8217;re taking a 3 keypress overhead every time you use one. So what to do? Simplify your life with a three tiered approach Super common things should be chords (Ctrl-something, Cmd-something, Cmd-Shift-something) [...]]]></description>
			<content:encoded><![CDATA[<div class='vim'>
Time for another vim geekout! :)</p>
<p>Typing colon :commands is really slow. You have to hit shift, colon, command, plus enter to execute. You&#8217;re taking a 3 keypress overhead every time you use one. So what to do? Simplify your life with a three tiered approach</p>
<ol>
<li>Super common things should be chords (<strong>Ctrl-something</strong>, <strong>Cmd-something</strong>,<strong> Cmd-Shift-something</strong>) or single key presses.
</li>
<li>Second most common things should be two character mnemonics such as <strong>vv</strong>
</li>
<li>Third tier should be leader-based commands with two or three keys such as <strong>,gg</strong> for GitGrep in my setup
</li>
</ol>
<p>For example, the normal way to go to a tab is <strong>:tabn</strong> which is at least 7 keypresses. A much better way is to map all your tabs to <strong>Cmd-1</strong> through <strong>Cmd-9</strong> and jump instantly to them with a single chord (This if for MacVim, you can map another key if you need unix)</p>
<p><strong>map &lt;silent&gt; &lt;D-1&gt; :tabn 1&lt;cr&gt;</strong></p>
<p>What about jumping between windows? The standard vim way will have you doing a chord and then a key (<strong>C-w, l</strong>) to get to the right. Remap to a two-key chord: </p>
<p><strong>nnoremap &lt;silent&gt; &lt;C-l&gt; &lt;C-w&gt;l</strong></p>
<p>Closing windows? Normally you&#8217;re stuck with <strong>:bd</strong> for 5 key presses to kill a buffer or <strong>C-w, c</strong> &#8211; a chord and a key (3 slow keys). I kill windows all the time, so for me it&#8217;s just the letter <strong>Q</strong> &#8211; a simple chord. And I made it smart enough to kill either the window or the buffer, using <a href="https://github.com/skwp/dotfiles/blob/master/vim/plugin/settings/yadr-window-killer.vim">a script that figures out if there are any other windows into the same buffer</a>.</p>
<p>What about splits? Same deal..way too many keys. Type a two key mnemonic <strong>vv</strong> for a vertical split:</p>
<p><strong>nnoremap &lt;silent&gt; vv &lt;C-w&gt;v</strong></p>
<p>I usually grep for things all day long so I mapped a single key <strong>K</strong> to give me the git grep for the current word under the cursor:</p>
<p><strong>nnoremap &lt;silent&gt; K :GitGrep &lt;cword&gt;&lt;CR&gt;</strong></p>
<p>My rule is to really consider every time I type more than 3 keys to execute a command in vim, and if it&#8217;s something I do every day, remap, remap, remap!</p>
<p>If you liked this, please take a look at my <a href="http://github.com/skwp/dotfiles">YADR dotfiles project</a> &#8211; which has many more interesting keymappings to save you time, and has recently broken 700 watchers on GitHub!
</div>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/05/30/stop-using-colon-commands-in-vim/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/05/30/stop-using-colon-commands-in-vim/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Talk Notes: Rails Sustainable Productivity by Xavier Shay</title>
		<link>http://yanpritzker.com/2012/04/26/talk-notes-rails-sustainable-productivity-by-xavier-shay/</link>
		<comments>http://yanpritzker.com/2012/04/26/talk-notes-rails-sustainable-productivity-by-xavier-shay/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 16:00:40 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[video-notes]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=529</guid>
		<description><![CDATA[http://confreaks.com/videos/815-larubyconf2012-rails-sustainable-productivity Here are my notes on Xavier Shay&#8217;s awesome video on sustainable productivity in Rails. I agree wholeheartedly with all of his points, and although they&#8217;re not particularly new, it&#8217;s nice to hear from someone with real world perspective on maintaining a large Rails project. Rails does not make data integrity a priority, so be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://confreaks.com/videos/815-larubyconf2012-rails-sustainable-productivity" title="Watch the original video">http://confreaks.com/videos/815-larubyconf2012-rails-sustainable-productivity</a></p>
<p>Here are my notes on Xavier Shay&#8217;s awesome video on sustainable productivity in Rails. I agree wholeheartedly with all of his points, and although they&#8217;re not particularly new, it&#8217;s nice to hear from someone with real world perspective on maintaining a large Rails project.</p>
<ol>
<li>Rails does not make data integrity a priority, so be conscious of it and take the effort. Ideally the framework will evolve in this direction eventually.
<ul>
<li>validates_uniqueness_of doesn&#8217;t validate uniqueness with concurrent access &#8211; you need db constraints (unique indexes, foreign keys, etc). At the same time, Rails doesn&#8217;t provide a good built in way to error handle constraint violations.</li>
<li>Rails encourages poor practice with database because things like t.references in migrations doesn&#8217;t add foreign keys.</li>
<li>(personal note) I have seen many Rails projects completely ignore database keys. I like the old adage that your database will outlive your application. Put constraints where they belong.
</li>
</ul>
</li>
<li>Consistency is incredibly important, and is more so when you have a large team. If you create two ways of doing one thing, the next developer has to scratch his head. Don&#8217;t duplicate code or concepts, design for reuse.</li>
<li>Don&#8217;t pepper third party dependencies in your code. Design layers of abstraction so that all third party access is in one spot, easy to change. Use reification &#8211; start naming concepts rather than implying them with conditional logic (e.g. the Null Object pattern).</li>
<li>&#8220;Fail your build for basic style, complexity, and readability violations.&#8221; Don&#8217;t let people check in stuff with bad whitespace, complex methods, etc. Make it part of the continuous integration cycle. Bad code spawns more bad code. Easier to prevent in the first place than untangle later. (see: <a href="https://github.com/square/cane">cane</a>, also <a href="https://github.com/jscruggs/metric_fu">metric_fu</a>)</li>
<li>Self-documenting code is awesome, but documentation should be used on a class level to describe how the class figures into the bigger picture. I&#8217;m a huge fan of this idea, and don&#8217;t do it enough myself.</li>
<li>Rails unit/functional/integration test definitions are different from everywhere else in the world. They tell you how to organize code but are not useful, leading us to have &#8220;fast spec&#8221; vs &#8220;slow spec&#8221;. This is bad. A unit test should not touch the database, filesystem, etc. Unit tests should be fast and without dependencies, integration tests specify boundaries, acceptance tests make sure the system works.
<ul>
<li> (Personal note) At <a href="http://crowdcast.com">Crowdcast</a> we have been working purely with fast-spec lately, even stubbing out dependencies in our controller tests so we can blazing fast TDD our code through the entire stack, relying on a single high level acceptance test that makes sure everything connects correctly, and stubbing everything at lower levels.</li>
</ul>
</li>
</ol>
<p>Videos are awesome but not everyone has the time. I made these notes for myself but if people find them useful, I&#8217;ll try to continue blogging short summaries of talks that I watch. I hope others do the same, so we can save each other time :)
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/04/26/talk-notes-rails-sustainable-productivity-by-xavier-shay/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/04/26/talk-notes-rails-sustainable-productivity-by-xavier-shay/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 minutes a day for exponential productivity</title>
		<link>http://yanpritzker.com/2012/04/25/5-minutes-a-day-for-exponential-productivity/</link>
		<comments>http://yanpritzker.com/2012/04/25/5-minutes-a-day-for-exponential-productivity/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 16:45:02 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=523</guid>
		<description><![CDATA[As a software developer, my day is taken by two primary activities: thought work and typing. Although I am a very fast typer, they pay me the big bucks ostensibly for what is inside my head, not my fingers. Every moment I spend typing something repetitive is therefore not only a waste of the time [...]]]></description>
			<content:encoded><![CDATA[<p>As a software developer, my day is taken by two primary activities: thought work and typing. Although I am a very fast typer, they pay me the big bucks ostensibly for what is inside my head, not my fingers. Every moment I spend typing something repetitive is therefore not only a waste of the time it takes to type it, but a waste of time away from thinking, developing, designing.  And every inch traveled by my hands brings me one inch closer to a potential repetitive strain injury.</p>
<p>So I decided to do something about this. Every single day, I spend at least 5 minutes learning something new that saves me time. I notice a repetitive motion, and I write a vim mapping, a shell alias, or a utility script, or just spend time looking at what <a href="https://github.com/search?q=dotfiles">other people are doing.</a> It&#8217;s sometimes hard to step back and be self aware about the things that I repeat, so I try to watch how others work too. Then I go and write a shortcut. This small investment every single day, pays huge dividends because I get exponentially faster at the mechanical parts of my job every day, leaving more time for thought and productivity.</p>
<p>I like doing this, and I like sharing my learnings with the world. If you want a peek at how I do things, check out <a href="http://skwp.github.com/dotfiles">my dotfiles project, YADR</a>. Fork it, copy it, steal the bits that you like, or contribute some of your own. Huge wins stand on the shoulders of lots of tiny ones.</p>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/04/25/5-minutes-a-day-for-exponential-productivity/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/04/25/5-minutes-a-day-for-exponential-productivity/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to change vim syntax colors that are annoying you</title>
		<link>http://yanpritzker.com/2012/04/17/how-to-change-vim-syntax-colors-that-are-annoying-you/</link>
		<comments>http://yanpritzker.com/2012/04/17/how-to-change-vim-syntax-colors-that-are-annoying-you/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 16:00:06 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=509</guid>
		<description><![CDATA[If you look at code all day, having readable colors is going to be the biggest thing that saves your eyes. Here&#8217;s how I tweak my colors any time they bother me. To start, you&#8217;ll need this little piece of script, which gives you a ,hi alias, which will display the current highlight group. 1. [...]]]></description>
			<content:encoded><![CDATA[<p>If you look at code all day, having readable colors is going to be the biggest thing that saves your eyes. Here&#8217;s how I tweak my colors any time they bother me. To start, you&#8217;ll need this little piece of script, which gives you a <strong>,hi</strong> alias, which will display the current highlight group. </p>
<p><script src="https://gist.github.com/2403574.js"> </script></p>
<p>1. With your cursor over the thing that&#8217;s highlighted in a bad color, hit the <strong>,hi</strong>. Say I don&#8217;t like the way this describe keyword is done in pink:</p>
<p><img src="http://i.imgur.com/2PsPa.png"/></p>
<p>2. Note the info displayed in the status line, it will look something like:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hi&amp;lt;&lt;strong&gt;rspecGroupMethods&lt;/strong&gt;&amp;gt; trans&amp;lt;&lt;strong&gt;rspecGroupMethods&lt;/strong&gt;&amp;gt; lo&amp;lt;&lt;strong&gt;Todo&lt;/strong&gt;&amp;gt; FG:#d33682</div></div>
<p>These are the color highlight groups, in brackets. The leftmost one is the one with highest precedence, and the one we want to override.</p>
<p>3. Look at the list of available colors using <strong>:hi</strong>. Note the names of the groups on the left, and their displayed colors. Find one you like. The list will look something like this:</p>
<p><img src="http://i.imgur.com/53jEH.png"/></p>
<p>4. Create a link between the group you want to modify and the one you like. Let&#8217;s say the one I like is Identifier, and the group I&#8217;m modifying is MatchParen. I would link them like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hi! link rspecGroupMethods Type</div></div>
<p>Reload your vimrc, or the file in which you placed the statement. The easiest way to evaluate the current file is <strong>:so %</strong>. And voila:</p>
<p><img src="http://i.imgur.com/iSeuK.png"/></p>
<p>You can place this in your ~/.vimrc, or in a subfile under ~/.vimrc/plugins. If you liked this example, be sure to check out my <a href="http://skwp.github.com/dotfiles">highly customized dotfile project called YADR,</a> which offers the <strong>,hi</strong> functionality, well organized vim snippets and plugins, and other handy shortcuts to save you tons of time.
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/04/17/how-to-change-vim-syntax-colors-that-are-annoying-you/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/04/17/how-to-change-vim-syntax-colors-that-are-annoying-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to win friends with Maintenance Driven Design</title>
		<link>http://yanpritzker.com/2012/04/04/how-to-win-friends-with-maintenance-driven-design/</link>
		<comments>http://yanpritzker.com/2012/04/04/how-to-win-friends-with-maintenance-driven-design/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 23:35:57 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=487</guid>
		<description><![CDATA[When I come to a design decision in writing an application, script, or interface. I ask myself only one question: What will the next guy think? I call this Maintenance Driven Design. By designing your software to be maintainable, you will earn many friends and praises. As software developers, ops guys, designers, it is a [...]]]></description>
			<content:encoded><![CDATA[<p>When I come to a design decision in writing an application, script, or interface. I ask myself only one question: </strong>What will the next guy think?</strong> I call this <strong>Maintenance Driven Design.</strong> By designing your software to be maintainable, you will earn many friends and praises.</p>
<p>As software developers, ops guys, designers, it is a known evil that we sometimes choose shortcuts, accruing tech debt with the knowledge that we&#8217;ll pay for it later with considerable interest. However, there are a few categories of design choices that we make every day that will make software easier or harder to maintain for the next guy who comes after us, which are specifically evil and malicious forms of tech debt. </p>
<p>Here are a few basic categories that most non-Maintenance Driven decisions fall into. Please don&#8217;t be that guy :)</p>
<ul>
<li><strong>duplication</strong> &#8211; This is the cardinal sin against Maintainable Design. If you duplicate code, it will instantly grow into piles of subtly divergent crap. It would have taken you an additional hour to figure out how to do it in a non-duplicated way. It will take your maintainers half a lifetime to understand why and how the code has diverged. My own anecdotal experience says that duplication has about a 1000% tech debt interest rate. That is, 1 hour saved by committing duplicated code will cost you 10 hours down the line. And this interest is compounded over time as the code diverges further.</li>
<li><strong>clever code</strong> &#8211; Clever is the enemy of Maintainable. Every time you cut and paste a really cool hack that you found on a blog in 2006, a unicorn dies. Follow conventions, and use existing and accepted practices instead of reinventing the wheel.</li>
<li><strong>personal aesthetics</strong> &#8211; Having a strong sense of personal style is awesome. You like snakeskin jackets and neon green pants? Sweet. But leave it out of the code. If you have a personal style that goes against accepted conventions, and you choose to prioritize your style over that of the community, you are not Maintenance Driven. When in doubt, look at the source code for a large community supported project (i.e. Rails) for style ideas.</li>
<li><strong>poor naming</strong> &#8211; Single letter variable names are impossible to grep for effectively. Names based on your favorite ninja turtles, though they will win you points with me, are bad for business. Same goes for commit messages &#8211; don&#8217;t write something clever and witty at the expense of clearly explaining your changes.</li>
</ul>
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/04/04/how-to-win-friends-with-maintenance-driven-design/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/04/04/how-to-win-friends-with-maintenance-driven-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim &#8211; Navigating files in vertical splits</title>
		<link>http://yanpritzker.com/2012/03/12/vim-navigating-files-in-vertical-splits/</link>
		<comments>http://yanpritzker.com/2012/03/12/vim-navigating-files-in-vertical-splits/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 16:44:22 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=468</guid>
		<description><![CDATA[The two most useful native vim mappings for navigation are arguably gf (go to file, use it over any reference to a file, such as a Rails partial), and Ctrl-] (go to tag, use it over any class or function name). But one problem in vim is that by doing these commands, you lose your [...]]]></description>
			<content:encoded><![CDATA[<p>The two most useful native vim mappings for navigation are arguably</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gf</div></div>
<p>(go to file, use it over any reference to a file, such as a Rails partial), and</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Ctrl-]</div></div>
<p>(go to tag, use it over any class or function name). But one problem in vim is that by doing these commands, you lose your previous place. Sure it&#8217;s easy to go back to with Ctrl-O or similar, but I find it much more useful to open the new location in a split, as you are usually exploring them while retaining the current context. Here are two mappings that do that for you:</p>
<p><script src="https://gist.github.com/2031016.js"> </script></p>
<p>If you like these, you might want to check out my <a href="https://github.com/skwp/dotfiles">Yet Another Dotfile Repo</a> project, which includes these and more!
<div class="plus-one-wrap"><g:plusone href="http://yanpritzker.com/2012/03/12/vim-navigating-files-in-vertical-splits/"></g:plusone></div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/03/12/vim-navigating-files-in-vertical-splits/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
