<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 <title>Rendered Text</title>
 
 <link href="http://renderedtext.com/" />
 <updated>2012-02-22T03:04:43-08:00</updated>
 <id>http://renderedtext.com/</id>
 <author>
   <name>Rendered Text Developers</name>
   <email>devs@renderedtext.com</email>
 </author>
 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RenderedText" /><feedburner:info uri="renderedtext" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <title>Doing code audit before improving software</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/kBF7DcMmKD8/" />
   <updated>2012-02-22T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2012/02/22/doing-code-audit-before-improving-software</id>
   <content type="html">&lt;p&gt;Recently we received a request to analyze and improve a process in a Rails app which consisted of half a dozen rake tasks. While our standard practice is for a rake task to consist of a single line, usually a class method call that’s properly spec&amp;#8217;d, these rake tasks had from 40 to 120 lines of code and almost no test coverage.&lt;/p&gt;
&lt;p&gt;Making a correct estimate can be very difficult, sometimes even more than the actual coding, but when you are faced with code that’s full of &lt;a href="http://www.codinghorror.com/blog/2006/05/code-smells.html"&gt;smells&lt;/a&gt; and no tests, it’s practically impossible without a thorough analysis and even writing some meta code.&lt;/p&gt;
&lt;p&gt;For starters, before any attempt was made at improving the code and making it more reliable, we were aware that we first needed to refactor. Martin Fowler defined refactoring as &amp;#8220;a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior&amp;#8221;. But why refactor when the rake tasks were already working? Why not just add or update a method? It’s simple. To begin with, it’s it was impossible to responsibly extend the code as it was. Refactoring allows us to more easily read, understand, update the code and write tests for it. Also, when the code is well written, it’s far easier to accomplish proper benchmarking and profiling.&lt;/p&gt;
&lt;p&gt;Tools that we used for the analysis were:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a pen and a notebook&lt;/li&gt;
	&lt;li&gt;GitHub and it’s &lt;a href="https://gist.github.com"&gt;Gist&lt;/a&gt; feature&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://workflowy.com"&gt;WorkFlowy&lt;/a&gt; and&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.pivotaltracker.com"&gt;Pivotal Tracker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our workflow was pretty straightforward. We would use the pen and paper to better understand the current code by drawing sketches that visualized the various interactions in the process. After that, we would go line by line and whenever we saw a piece of code that was a candidate for refactoring, we would mark the corresponding lines on GitHub and reference it on WorkFlowy with a short message of what needs to be done. If we already had some meta code in mind, we would write a Gist containing the meta code and attach it to the message.&lt;/p&gt;
&lt;p&gt;We decided to first just address the more standard code smells (long method, long parameter list, duplicate code, uncommunicative name&amp;#8230;) and later on, when we start with the actual optimization, address the more complex smells that have to do with code structure and system architecture. Majority of the planned refactoring involved moving out pieces of code into a method or a class.&lt;/p&gt;
&lt;p&gt;Our goal was to eventually be able to pull out the process into it’s standalone application, which would just send processed data back to the main application. With that in mind we tried to place most of the code into the &amp;#8216;lib&amp;#8217; directory and make it as independent as possible.&lt;/p&gt;
&lt;p&gt;Once we had a WorkFlowy list, which gave us a hight-level overview, we were finally able to create Pivotal Tracker stories and to give a time estimate.&lt;/p&gt;
&lt;p&gt;Here are a couple of books that I found very useful when I was learning about refactoring:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;Clean Code: A Handbook of Agile Software Craftsmanship&lt;/a&gt; (see my review &lt;a href="http://renderedtext.com/blog/2011/09/21/book-review-clean-code/"&gt;here&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Refactoring-Improving-Design-Existing-Technology/dp/0201485672"&gt;Refactoring: Improving the Design of Existing Code&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Refactoring-Ruby-Addison-Wesley-Professional/dp/0321603508"&gt;Refactoring: Ruby Edition&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Refactoring-Ruby-William-C-Wake/dp/0321545044"&gt;Refactoring in Ruby&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Working-Effectively-Legacy-Robert-Martin/dp/0131177052"&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/kBF7DcMmKD8" height="1" width="1"/&gt;</content>
   <author>
     <name>Vladimir</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2012/02/22/doing-code-audit-before-improving-software/</feedburner:origLink></entry>
 
 <entry>
   <title>Nebojsa Stričević joins Rendered Text</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/B-5GJ7wkzzE/" />
   <updated>2012-02-20T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2012/02/20/nebojsa-stricevic-joins-rendered-text</id>
   <content type="html">&lt;p&gt;We welcome Nebojša Stričević as the fifth member of Rendered Text, after completing a trial month in our office. Since he sent us a letter, beautifully typeset in Latex, we&amp;#8217;ve been impressed with his capacity to focus, learn and solve new challenges. He’s both self-managed and a good team player.&lt;/p&gt;

&lt;p&gt;We’re happy to have achieved nice growth in the past year, and believe that our new capacity will allow us to execute ideas for an even better one - some of which you will hear about here soon.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/B-5GJ7wkzzE" height="1" width="1"/&gt;</content>
   <author>
     <name>Marko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2012/02/20/nebojsa-stricevic-joins-rendered-text/</feedburner:origLink></entry>
 
 <entry>
   <title>Beware of MongoDB's document size limit</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/pIkHbhBxU_I/" />
   <updated>2012-02-17T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2012/02/17/beware-of-mongodbs-document-size-limit</id>
   <content type="html">&lt;pre&gt;
As a MongoDB beginner
When designing a database for large quantities of data
Then I should be aware of the document size limit in BSON format
&lt;/pre&gt;
&lt;p&gt;Including all embedded documents, it is currently 16 MB per document, unless you&amp;#8217;re using GridFS (but it seems like if you can&amp;#8217;t get GridFS from 3rd parties like MongoHQ or MongoLab?). Remember that MongoDB by default puts the working set of your database in RAM.&lt;/p&gt;

&lt;p&gt;So if you expect to have millions of some things then you better put those things in a separate collection, even if semantically it may make more sense to embed them in another document. If you&amp;#8217;re using mongoid that simply means having a stand-alone model referencing another model.&lt;/p&gt;

&lt;p&gt;Useful discussions on Stack Overflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://stackoverflow.com/questions/4667597/understanding-mongodb-bson-document-size-limit'&gt;Understanding MongoDB BSON document size limit&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://stackoverflow.com/questions/8773557/determine-size-of-a-document-using-mongoid'&gt;How to determine a document&amp;#8217;s size with Mongoid&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://stackoverflow.com/questions/6453584/what-does-it-mean-to-fit-working-set-into-ram-for-mongodb'&gt;What&amp;#8217;s a MongoDB working set&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/pIkHbhBxU_I" height="1" width="1"/&gt;</content>
   <author>
     <name>Marko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2012/02/17/beware-of-mongodbs-document-size-limit/</feedburner:origLink></entry>
 
 <entry>
   <title>My short trip to India</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/esb8X-J5qFs/" />
   <updated>2012-02-14T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2012/02/14/my-short-trip-to-india</id>
   <content type="html">&lt;p&gt;The short part is a bit tongue in cheek since to most people 25 days sounds like a long trip but for India, it&amp;#8217;s just too short.&lt;/p&gt;

&lt;p&gt;Everyone I&amp;#8217;ve met that has been to India has had a unique experience. I went with a couple of my close friends, my best friend already there for three months, finishing his internship. We landed in Bangalore and planned to fly back from Delhi.&lt;/p&gt;

&lt;p&gt;India is the first place where I&amp;#8217;ve experienced the feeling of almost too much freedom. You feel a certain connectedness with nature. Partly because animals freely roam through the streets, even in very urban places like Mumbai, and in part because you see an incredibly diverse and almost untouched, nature. Hampi, which is my favourite place of all I&amp;#8217;ve visited, is like that. Like God made a bouldering place for for himself. If you climb, you must visit it.&lt;/p&gt;
&lt;a href='/images/blog/hampi.jpg'&gt;&lt;img src='/images/blog/hampi.jpg' width='550' /&gt;&lt;/a&gt;&lt;p class='floatRight'&gt;&lt;em&gt;Me in Hampi&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But India is a land of contrasts as everyone will tell you. You see the extremely poor people and the extremely rich not more than two blocks from each other. Some of the former you can see living in slums and the latter in fort-like mansions. In spite of that, it seemed to me that the (not so rich) people in India are really happy. We had a running joke if were going to stumble upon anyone who&amp;#8217;ll treat us badly. But now that I think about it, a woman in Jaipur carrying bamboo sticks pulled out the largest knife I&amp;#8217;ve seen when I tried to photograph her.&lt;/p&gt;

&lt;p&gt;Indians work a lot. Much more so than people in Serbia or elsewhere I&amp;#8217;ve been. So many people work Sundays that you just don&amp;#8217;t care which day it is anymore. I tried to get my films developed on Sunday, January first, but the guy in the neighbouring shop told me that the photo store is closed on Sundays. Working on January first was the usual deal for him. It&amp;#8217;s not that it&amp;#8217;s mandated that you should be open, it&amp;#8217;s that by being open you get to earn money that day.&lt;/p&gt;
&lt;a href='/images/blog/pushkar.jpg'&gt;&lt;img src='/images/blog/pushkar.jpg' width='550' /&gt;&lt;/a&gt;&lt;p class='floatRight'&gt;&lt;em&gt;A boy running a masala chai stand in Pushkar&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It seemed to me that there&amp;#8217;s a kind of entrepreneurial spirit everywhere. Something is happening all the time around you. People are offering you things, fixing things, painting their shopfronts or otherwise making their shop more noticeable in streets &lt;em&gt;packed&lt;/em&gt; with small shops. In a Mumbai bookshop you can see a lot of REWORK copies and that &amp;#8216;The Lean Startup&amp;#8217; is currently one of the best selling titles.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s a feeling that there is a free market system in effect on the street level. You go to a rickshaw driver and haggle over the price and sometimes you get to pay less than the meter and sometimes you pay more. I&amp;#8217;ve heard that Indians get offended if you don&amp;#8217;t haggle, but to me they seemed very happy to see you pay much more than you should. And why wouldn&amp;#8217;t you do it when it&amp;#8217;s so much fun.&lt;/p&gt;

&lt;p&gt;I really miss India.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/esb8X-J5qFs" height="1" width="1"/&gt;</content>
   <author>
     <name>Miloš</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2012/02/14/my-short-trip-to-india/</feedburner:origLink></entry>
 
 <entry>
   <title>Sucking less at writing Cucumber</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/ZG8VlvIshuI/" />
   <updated>2011-12-06T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2011/12/06/sucking-less-at-writing-cucumber</id>
   <content type="html">&lt;p&gt;I wrote my first &lt;a href='http://cukes.info/'&gt;Cucumber&lt;/a&gt; scenario about five months ago. It went something like this:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='cucumber'&gt;&lt;span class='k'&gt;Scenario:&lt;/span&gt;&lt;span class='nf'&gt; Changing email&lt;/span&gt;
&lt;span class='k'&gt;  Given &lt;/span&gt;&lt;span class='nf'&gt;I am logged in&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;And &lt;/span&gt;&lt;span class='nf'&gt;I am on the homepage&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;When &lt;/span&gt;&lt;span class='nf'&gt;I click on &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;Account&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;And &lt;/span&gt;&lt;span class='nf'&gt;I fill in &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;email&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot; with &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;milos@example.com&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;And &lt;/span&gt;&lt;span class='nf'&gt;I press &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;Change Email&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;Then &lt;/span&gt;&lt;span class='nf'&gt;I should see &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;Email successfully changed&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;When &lt;/span&gt;&lt;span class='nf'&gt;I visit &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;My profile page&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;Then &lt;/span&gt;&lt;span class='nf'&gt;I should see &amp;quot;&lt;/span&gt;&lt;span class='s'&gt;milos@example.com&lt;/span&gt;&lt;span class='nf'&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Maybe my &lt;em&gt;naivete&lt;/em&gt; was not solely to blame; I was told it was so easy &amp;#8220;that it could be taught to a secretary&amp;#8221;. I am not so sure anymore.&lt;/p&gt;

&lt;p&gt;Some of the problems with the above scenario are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It&amp;#8217;s too long and verbose&lt;/li&gt;

&lt;li&gt;It&amp;#8217;s not using the &lt;em&gt;domain language&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read the scenario. As a reader, why do I need to have a mental model of that web site to be able to follow it? Couldn&amp;#8217;t it be replaced with:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='cucumber'&gt;&lt;span class='k'&gt;Background:&lt;/span&gt;&lt;span class='nf' /&gt;
&lt;span class='k'&gt;  Given &lt;/span&gt;&lt;span class='nf'&gt;I am logged in&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='cucumber'&gt;&lt;span class='k'&gt;Scenario:&lt;/span&gt;&lt;span class='nf'&gt; Changing Email&lt;/span&gt;
&lt;span class='k'&gt;  Given &lt;/span&gt;&lt;span class='nf'&gt;I am on my account page&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;When &lt;/span&gt;&lt;span class='nf'&gt;I change my email&lt;/span&gt;
&lt;span class='nf'&gt;  &lt;/span&gt;&lt;span class='k'&gt;Then &lt;/span&gt;&lt;span class='nf'&gt;I should see that my email has changed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Using web steps makes you write very imperative scenarios that you have to rewrite each time you change something. It&amp;#8217;s actually one of the reasons why they were removed from the latest version of cucumber. People used them too much and wrote shitty scenarios. I&amp;#8217;m not sure I agree with the descision to completely remove them but I can undestand. &lt;a href='https://github.com/cucumber/cucumber-rails/issues/174'&gt;The pull request&lt;/a&gt; now serves as an explicit note that you should be writing declarative steps.&lt;/p&gt;

&lt;p&gt;A good indicator that your scenario is not good is if you change something in your implementation and you have to change the scenario. You&amp;#8217;ll probably need to change your step definition anyway but the &lt;em&gt;Gherkin&lt;/em&gt; stuff should be as decoupled from the implementation as possible. In the above scenario:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How I change my email is an implementation detail and belongs in the step definition&lt;/li&gt;

&lt;li&gt;How I see that my email really changed is also an implementation detail&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We still test if this whole system works but if I change how it works I only need to change the step definitions. The scenario stays the same.&lt;/p&gt;

&lt;p&gt;Lately I just write the whole scenario and implement the steps. I only reuse steps if I see that the one I had just written is similar in wording to some step I had written before. The added benefit of this is that I now know capybara much more intimately than before. &lt;a href='https://github.com/jnicklas/capybara'&gt;Capybara&lt;/a&gt; is very powerful and much nicer to work with than web steps.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Reposted from &lt;a href='http://miloshadzic.com/2011/11/30/sucking-less-at-writing-cucumber/'&gt;Miloš&amp;#8217;s blog&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/ZG8VlvIshuI" height="1" width="1"/&gt;</content>
   <author>
     <name>Miloš</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/12/06/sucking-less-at-writing-cucumber/</feedburner:origLink></entry>
 
 <entry>
   <title>Agile and change</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/h6qejFGVaXc/" />
   <updated>2011-11-29T00:00:00-08:00</updated>
   <id>http://renderedtext.com/blog/2011/11/29/agile-and-change</id>
   <content type="html">&lt;p&gt;It happens that people identify themselves with a piece of work that they did. From a purely logical perspective, this does not make any sense, and generally it is a guaranteed way to lose your personal tranquility. Yet it&amp;#8217;s sometimes difficult to control, especially if you don&amp;#8217;t practice it somehow.&lt;/p&gt;

&lt;p&gt;To a programmer it may occur on both code and feature level. You think that something is such a great piece of code that it&amp;#8217;s a pity to remove it. The more time you&amp;#8217;ve spent on it, the greater the feeling. It influences your thinking in a situation when you&amp;#8217;re asked to discuss the real user value of it.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s one aspect where agile shines. When you&amp;#8217;re writing a spec first, that flow has framed the implementation code for you differently. It is more like a means to an end - to make the nice test pass. And that&amp;#8217;s good because your code &lt;em&gt;is&lt;/em&gt; a means to a user&amp;#8217;s end. So you&amp;#8217;re not personally attached to it.&lt;/p&gt;

&lt;p&gt;And when you&amp;#8217;re collaborating with your client daily, he gets to see the direction where you&amp;#8217;re going with a larger feature when it’s 20% done and not 99% done. It&amp;#8217;s a great framework of collaboration where nobody is afraid or opposed to change for any reason. Indeed, you will embrace change, as change is natural and feel a boost every time you refine your creation to better match the product.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/h6qejFGVaXc" height="1" width="1"/&gt;</content>
   <author>
     <name>Marko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/11/29/agile-and-change/</feedburner:origLink></entry>
 
 <entry>
   <title>Apprenticing at Rendered Text</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/9OZ8YT_FxMA/" />
   <updated>2011-10-21T00:00:00-07:00</updated>
   <id>http://renderedtext.com/blog/2011/10/21/apprenticing-at-rendered-text</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve kinda fell in love with Ruby after several love affairs with different languages. Somehow it just felt right both for reading and for writing. So I&amp;#8217;ve set out on a mission to write a lot of Ruby code over the summer. Luckily, the guys from Rendered Text needed help of an eager new rubyist and I needed a place to work with Ruby so that I can &amp;#8220;get it into my fingers&amp;#8221;. I was really excited because I knew they weren&amp;#8217;t locked in into some old legacy software system but were open to whatever works, new or old. I also knew they were into software crafstmanship which is a movement in software development that I really like.&lt;/p&gt;
&lt;a href='/images/blog/milos-apprenticeship/000061.jpg'&gt;&lt;img src='/images/blog/milos-apprenticeship/000061.jpg' width='550' /&gt;&lt;/a&gt;&lt;p class='floatRight'&gt;&lt;em&gt;Tortured apprentice&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Since I live in Belgrade and the Rendered Text office is in Novi Sad, the deal was for me to work remotely and occasionally go to Novi Sad for a few days. I had my first week in Novi Sad, mostly pairing with Darko.&lt;/p&gt;

&lt;h2 id='pairing'&gt;Pairing&lt;/h2&gt;

&lt;p&gt;In the first week, I paired with Darko on some Ruby code. I was happy that it was pure Ruby and not Rails because at the time my Rails knowledge was rather weak. I&amp;#8217;ve only just read &lt;a href='http://ruby.railstutorial.org/'&gt;The Ruby on Rails Tutorial book&lt;/a&gt; and I thought that I would be useless as a pilot or copilot. That turned out to be wrong and I was surprised to actually be useful. Maybe if it were Rails code I would have done worse, but probably not &lt;em&gt;that&lt;/em&gt; much worse. Even if you don&amp;#8217;t know the code, you&amp;#8217;re still useful in a pair programming session because you review code and ask questions about it as it is written.&lt;/p&gt;

&lt;p&gt;Pairing is also a great way to pick up editor and workflow tricks. I know I&amp;#8217;ve picked up quite a bit of vim and git tricks from Darko. I think he got a few from me as well.&lt;/p&gt;

&lt;h2 id='code_reviews'&gt;Code reviews&lt;/h2&gt;

&lt;p&gt;We use GitHub&amp;#8217;s pull request feature quite a bit. Most of the time when I wrote a piece of code that isn&amp;#8217;t trivial, I would open a pull request and either Marko or Darko would review it. This is by far where I learned the most. Writing some code the way I think it should be done and then getting detailed feedback on how it can be done better is invaluable.&lt;/p&gt;
&lt;a href='/images/blog/milos-apprenticeship/000057.jpg'&gt;&lt;img src='/images/blog/milos-apprenticeship/000057.jpg' width='550' /&gt;&lt;/a&gt;
&lt;h2 id='reading'&gt;Reading&lt;/h2&gt;

&lt;p&gt;Before I even started I needed to get up to speed with the tools used at Rendered Text, mainly RSpec, Cucumber and Rails. Marko and Darko suggested &lt;a href='http://pragprog.com/book/achbd/the-rspec-book'&gt;The RSpec book&lt;/a&gt; and The Ruby on Rails Tutorial. To this I would add &lt;a href='http://shop.oreilly.com/product/9780596518387.do'&gt;Apprenticeship Patterns&lt;/a&gt;. I probably should have read it earlier in my apprenticeship.&lt;/p&gt;

&lt;p&gt;I wanted to read as many books, articles and blog posts as I could, but there&amp;#8217;s only so much you can read in two months. It&amp;#8217;s great to be able to discuss what you read right away with people who have way more real world experience. Especially as I got interested in object-oriented design. I would come in and try stuff I read about in a blog post or a book and could get feedback or even a discussion going.&lt;/p&gt;

&lt;h2 id='bdd'&gt;BDD&lt;/h2&gt;

&lt;p&gt;Pretty much everything done at Rendered Text is developed using Behaviour-Driven Development. I was already sold on TDD before I arrived but I needed to acquire a taste for writing acceptance tests with Cucumber. At first I really sucked at this. It was hard for me to write good scenarios. Fast forward a few months, I still suck at it but a little bit less. An area to improve I guess. Reading the RSpec Book&amp;#8217;s chapters on Cucumber helped. I&amp;#8217;m planning to read through the new &lt;a href='http://pragprog.com/book/hwcuc/the-cucumber-book'&gt;Cucumber Book&lt;/a&gt;, and I hope that&amp;#8217;ll help as well.&lt;/p&gt;
&lt;a href='/images/blog/milos-apprenticeship/000062.jpg'&gt;&lt;img src='/images/blog/milos-apprenticeship/000062.jpg' width='550' /&gt;&lt;/a&gt;
&lt;h2 id='working_remotely'&gt;Working remotely&lt;/h2&gt;

&lt;p&gt;While it was super nice to work at the Rendered Text office, most of my work time was spent at home. We use Campfire quite a bit and also Pivotal Tracker and Basecamp. Campfire is super cool, kind of like irc on steroids.&lt;/p&gt;

&lt;p&gt;Tools aside, working remotely has some benefits but also some not so trivial downsides. The biggest benefit is that you don&amp;#8217;t have to commute to work. The biggest downside is that it&amp;#8217;s sometimes much harder to &amp;#8220;get in the zone&amp;#8221;. Pomodoros can help with this.&lt;/p&gt;

&lt;h2 id='what_i_did_wrong'&gt;What I did wrong&lt;/h2&gt;

&lt;p&gt;I think the biggest mistake I made was not reporting that I was stuck soon enough. Several times when I couldn&amp;#8217;t do something that I assumed was simple and that I could &amp;#8220;figure out&amp;#8221;, it turned out to be far from reality. I would spend a lot of time without anything to show for it. To make matters worse, it was usually something that would take a few lines on Campfire to resolve. In hindsight I really should have asked for help as soon as I got stuck. Asking on Campfire isn&amp;#8217;t as attention stealing like tapping someone on the shoulder and If someone knows it, you usually get an answer pretty quickly. If it turns out you can figure it out yourself, you just update the Campfire channel and there&amp;#8217;s way less time wasted.&lt;/p&gt;

&lt;h2 id='conclusion'&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This was so far the nicest part of my working life. I&amp;#8217;ve learned a lot, had quite a bit of fun and met really nice people. I&amp;#8217;m also very happy that I&amp;#8217;ll continue to work for Rendered Text.&lt;/p&gt;

&lt;p&gt;To any aspiring software crafsmen, I cannot recommend apprenticing highly enough.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/9OZ8YT_FxMA" height="1" width="1"/&gt;</content>
   <author>
     <name>Miloš</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/10/21/apprenticing-at-rendered-text/</feedburner:origLink></entry>
 
 <entry>
   <title>Making change</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/KgyBu_uU3H4/" />
   <updated>2011-10-18T00:00:00-07:00</updated>
   <id>http://renderedtext.com/blog/2011/10/18/making-change</id>
   <content type="html">&lt;p&gt;From &lt;em&gt;&lt;a href='http://www.amazon.com/Individuals-Interactions-Agile-Ken-Howard/dp/0321714091'&gt;Individuals and Interactions: An Agile Guide&lt;/a&gt;&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When building a new system, the software developers&amp;#8217; livelihood is based on creating change. At the same time, the world of many users of the new software may resist having to learn new tools.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While we, hackers, are all proud to be makers, it&amp;#8217;s easy to forget that in the end anything we make is a change for everyone who&amp;#8217;s exposed to our work. It is probably an underestimated reason why most software projects fail - they simply fail to negotiate enough attention with users.&lt;/p&gt;

&lt;p&gt;Every time you decide to use a piece of software, you enter an unwritten contract, where the application promises to be useful for certain tasks that are important to you, while you promise to give it your time, attention, and a spot in your living habits.&lt;/p&gt;

&lt;p&gt;It is no wonder that everyone sooner or later optimizes to work with less software. That is actually the starting point for most people outside the technology world - and they never move from it. We often need a number of years to enter that zone, and we may even glorify that realization, as shown by the popularity of software blogs that talk about &amp;#8220;minimalism&amp;#8221;, &amp;#8220;simplicity&amp;#8221; and &amp;#8220;zen&amp;#8221;.&lt;/p&gt;

&lt;p&gt;Similarly, on the web, &amp;#8220;tools&amp;#8221; are replaced with &amp;#8220;web sites&amp;#8221; and the concept remains. We have just enough space in our brain to visit a few sites when we&amp;#8217;re online, and it why most people get most of their information via recommendations off very few social web sites.&lt;/p&gt;

&lt;p&gt;That would mean that most web sites should be optimized for casual, short interaction and a short attention span. Be useful, and provide for quick exit. For a user it&amp;#8217;s a happy loop, and it&amp;#8217;s a promise for an eventual return.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/KgyBu_uU3H4" height="1" width="1"/&gt;</content>
   <author>
     <name>Marko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/10/18/making-change/</feedburner:origLink></entry>
 
 <entry>
   <title>How to solve the losing X11 connection problem with VirtualBox on Mac OS Lion</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/LRiucIiXzSU/" />
   <updated>2011-10-17T00:00:00-07:00</updated>
   <id>http://renderedtext.com/blog/2011/10/17/how-to-solve-the-losing-x11-connection-problem-with-virtualbox-on-mac-os-lion</id>
   <content type="html">&lt;p&gt;We all know that today you cannot get a better desktop operating system than Mac OS. Together with great Apple hardware the bundle is an unbeatable desktop platform. But everybody in our team has been sailing with Linux for almost a decade and we still prefer it as a development platform. Paired with isolation that VirtualBox provides we just feel like at home in our Linux + VirtualBox development boxes.&lt;/p&gt;
&lt;p&gt;Since we upgraded to Lion we got scared for a sec that we will have to leave VirtualBox + Linux behind because we just couldn&amp;#8217;t solve an issue of losing X11 connection, which is of corse key for running Cucumber scenarios that require Firefox. After googling about the issue for 5th time we found a solution which is extremely simple and works well for us. You just need to add &lt;code&gt;-Y&lt;/code&gt; when you are ssh-ing into your development box e.g. &lt;code&gt;ssh -Y devbox&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Solution is documented in a message on Apple discussion forum &amp;#8211; &lt;a href="https://discussions.apple.com/message/16025066#16025066"&gt;https://discussions.apple.com/message/16025066#16025066&lt;/a&gt;. Although some people reported that they still have some issues we haven&amp;#8217;t experienced any of them.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/LRiucIiXzSU" height="1" width="1"/&gt;</content>
   <author>
     <name>Darko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/10/17/how-to-solve-the-losing-x11-connection-problem-with-virtualbox-on-mac-os-lion/</feedburner:origLink></entry>
 
 <entry>
   <title>admin_view 0.2.0 released</title>
   <link href="http://feedproxy.google.com/~r/RenderedText/~3/u0UUQZDgw7g/" />
   <updated>2011-10-17T00:00:00-07:00</updated>
   <id>http://renderedtext.com/blog/2011/10/17/admin_view-0.2.0-released</id>
   <content type="html">&lt;p&gt;It happenned on Friday, but I had to postpone blogging until now &amp;#8211; &lt;a href="http://rubygems.org/gems/admin_view"&gt;admin_view 0.2.0&lt;/a&gt; is out and features new options: &lt;code&gt;--no_create&lt;/code&gt; and &lt;code&gt;--read_only&lt;/code&gt; for cases when the admin should only browse through user-created resources and a couple of improvements to code generation. A big thank you to all the people who tried the gem and were kind to report issues that they&amp;#8217;ve had.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RenderedText/~4/u0UUQZDgw7g" height="1" width="1"/&gt;</content>
   <author>
     <name>Marko</name>
     <uri>http://renderedtext.com</uri>
   </author>
 <feedburner:origLink>http://renderedtext.com/blog/2011/10/17/admin_view-0.2.0-released/</feedburner:origLink></entry>
 
</feed>

