<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Xavier Balloy</title>
    <subtitle>A software engineer sharing thoughts on code quality, conferences, and continuous learning.</subtitle>
    <link href="https://xballoy.github.io/tags/mob-programming/feed.xml" rel="self" type="application/atom+xml"/>
    <link href="2019-11-15T00:00:00+00:00"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2019-11-15T00:00:00+00:00</updated>
    <id>https://xballoy.github.io/tags/mob-programming/feed.xml</id>
    <author>
        <name>Xavier Balloy</name>
    </author>
    <entry xml:lang="en">
        <title>Back from SoCraTes France 2019</title>
        <published>2019-11-15T00:00:00+00:00</published>
        <updated>2019-11-15T00:00:00+00:00</updated>
        <author>
            <name>Xavier Balloy</name>
        </author>
        <link rel="alternate" type="text/html" href="https://xballoy.github.io/blog/socrates-france-2019/"/>
        <id>https://xballoy.github.io/blog/socrates-france-2019/</id>
        <summary type="html">&lt;p&gt;From October 17 to 20, one of the key events in the &lt;em&gt;software craftsmanship&lt;&#x2F;em&gt;
movement took place in France. SoCraTes-FR describes itself as an unconference
— it&#x27;s more of a retreat than a traditional conference.&lt;&#x2F;p&gt;</summary>
        <content type="html" xml:base="https://xballoy.github.io/blog/socrates-france-2019/">&lt;p&gt;From October 17 to 20, one of the key events in the &lt;em&gt;software craftsmanship&lt;&#x2F;em&gt;
movement took place in France. SoCraTes-FR describes itself as an unconference
— it&#x27;s more of a retreat than a traditional conference.&lt;&#x2F;p&gt;
&lt;span id=&quot;continue-reading&quot;&gt;&lt;&#x2F;span&gt;




&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;xballoy.github.io&amp;#x2F;processed_images&amp;#x2F;2019-11-15-socrates-france-2019-1.e39d17fc1737d75d.webp&quot; alt=&quot;Château de Massillan, where SoCraTes-FR 2019 was held&quot; width=&quot;800&quot; height=&quot;526&quot; loading=&quot;lazy&quot; &#x2F;&gt;
&lt;p&gt;The agenda isn&#x27;t known in advance. Instead, it takes shape each morning from the
many workshop proposals that everyone is encouraged to submit. The October 18
agenda — so hard to choose with this many options!&lt;&#x2F;p&gt;





&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;xballoy.github.io&amp;#x2F;processed_images&amp;#x2F;2019-11-15-socrates-france-2019-2.3a4991409151e456.webp&quot; alt=&quot;The October 18 agenda — so hard to choose with this many options!&quot; width=&quot;800&quot; height=&quot;600&quot; loading=&quot;lazy&quot; &#x2F;&gt;
&lt;p&gt;Software quality is part of AXA&#x27;s DNA, so it was natural for us to sponsor the
event and send our developers. I was lucky enough to attend and discuss a wide
range of topics — from DDD to code reviews, green IT, and many katas.&lt;&#x2F;p&gt;
&lt;p&gt;Here are some highlights from the discussions I had over those four days.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;code-reviews&quot;&gt;Code Reviews&lt;&#x2F;h2&gt;
&lt;p&gt;I didn&#x27;t expect code reviews to spark such intense discussions. To me, it&#x27;s
something everyone does as part of best practices when striving to improve
software quality.&lt;&#x2F;p&gt;
&lt;p&gt;But no! Even code reviews have their detractors.&lt;&#x2F;p&gt;
&lt;p&gt;Their main argument is that reviews are usually done poorly. For example,
reviewers don&#x27;t pull the code locally — they just skim through it during a
&lt;em&gt;pull request&lt;&#x2F;em&gt; or when someone presents code to them. In the end, reviews only
catch naming issues, typos, formatting problems, or obvious bugs.&lt;&#x2F;p&gt;
&lt;p&gt;Meanwhile, reviewers rarely question the business logic being implemented,
partly because &lt;strong&gt;the whole team&lt;&#x2F;strong&gt; doesn&#x27;t know every feature in detail. Worse,
the level of scrutiny varies based on trust in the author! We tend to trust
someone who&#x27;s been on the team longer and makes fewer mistakes.&lt;&#x2F;p&gt;
&lt;p&gt;Given this reality, some companies have stopped doing code reviews altogether,
opting instead for much more &lt;em&gt;pair programming&lt;&#x2F;em&gt; and &lt;em&gt;mob programming&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;pair-programming&quot;&gt;Pair Programming&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;Pair programming&lt;&#x2F;em&gt; is a working method where two developers work together at the
same workstation.&lt;&#x2F;p&gt;
&lt;p&gt;This technique proves useful for newcomers (whether experienced or junior) to
learn the team&#x27;s working methods and established best practices. It also avoids
the potential back-and-forth of early &lt;em&gt;pull requests&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Those back-and-forths are counterproductive: the same code gets reviewed
multiple times, development stalls, and the developer may feel frustrated or
take comments personally. Once this &lt;em&gt;pair programming&lt;&#x2F;em&gt; phase ends — which can be
seen as mentoring and typically lasts several weeks — you can trust these people
and stop reviewing their code entirely (or at least not every line).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;mob-programming&quot;&gt;Mob Programming&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;Mob programming&lt;&#x2F;em&gt; is similar to &lt;em&gt;pair programming&lt;&#x2F;em&gt;, except the entire team works
on the same feature! One key advantage is that the whole team shares both
business knowledge and code ownership. You&#x27;ll never hear &quot;That&#x27;s not my
code&#x2F;bug, it&#x27;s Paul&#x27;s&quot; or &quot;Who worked on this feature?&quot; anymore. Since the code
is written collaboratively, it&#x27;s higher quality and doesn&#x27;t need review
afterward.&lt;&#x2F;p&gt;
&lt;p&gt;




&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;xballoy.github.io&amp;#x2F;processed_images&amp;#x2F;2019-11-15-socrates-france-2019-3.477ea529840b06ac.webp&quot; alt=&quot;mob programming&quot; width=&quot;800&quot; height=&quot;608&quot; loading=&quot;lazy&quot; &#x2F;&gt;

Doing &lt;em&gt;mob programming&lt;&#x2F;em&gt; is like &lt;em&gt;pair programming&lt;&#x2F;em&gt; to the power of n — meaning
you get sustainable code. — Someone during a discussion at SoCraTes&lt;&#x2F;p&gt;
&lt;h2 id=&quot;katas&quot;&gt;Katas&lt;&#x2F;h2&gt;
&lt;p&gt;During this event, I practiced several katas that helped me discover a new
language (Haskell) and new ways of coding. A code kata is a development exercise that
helps you hone your skills through practice and repetition.&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re interested, here are the katas I practiced:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;codingdojo.org&#x2F;kata&#x2F;FizzBuzz&#x2F;&quot;&gt;FizzBuzz&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;codingdojo.org&#x2F;kata&#x2F;RPN&#x2F;&quot;&gt;RPN Calculator&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;codingdojo.org&#x2F;kata&#x2F;RomanNumerals&#x2F;&quot;&gt;Roman Numerals&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;tcr-instead-of-tdd&quot;&gt;TCR Instead of TDD&lt;&#x2F;h3&gt;
&lt;p&gt;I had the chance to try TCR, an acronym for test &amp;amp;&amp;amp; &lt;em&gt;commit&lt;&#x2F;em&gt; || &lt;em&gt;revert&lt;&#x2F;em&gt;. It&#x27;s a
programming method proposed by
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@kentbeck_7670&#x2F;test-commit-revert-870bbd756864&quot;&gt;Kent Beck&lt;&#x2F;a&gt;
(the inventor of TDD). The principle: when you run tests, if they fail, you
&lt;em&gt;revert&lt;&#x2F;em&gt; your code!&lt;&#x2F;p&gt;
&lt;p&gt;We applied a slightly less extreme version during the kata. Before running
tests, we&#x27;d bet on whether they&#x27;d pass or not. If we won the bet, we&#x27;d &lt;em&gt;commit&lt;&#x2F;em&gt;;
otherwise, we&#x27;d &lt;em&gt;revert&lt;&#x2F;em&gt;. This approach still lets you go through the &quot;red bar&quot;
phase where you see failing tests.&lt;&#x2F;p&gt;
&lt;p&gt;I preferred this approach. You spend less time &quot;running tests in your head&quot; to
avoid seeing all your code (including the latest test) disappear. Most
importantly, you keep the benefit of seeing your tests fail before they pass —
which I consider a crucial part of the TDD I practice daily.&lt;&#x2F;p&gt;
&lt;p&gt;However, TCR does force you to go through the obvious implementation phase of
the test (bet it&#x27;ll be green, commit) before refactoring (if it doesn&#x27;t work,
&lt;em&gt;revert&lt;&#x2F;em&gt; and return to a working state).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;fish-bowl-mob-programming&quot;&gt;Fish Bowl Mob Programming&lt;&#x2F;h3&gt;
&lt;p&gt;Before SoCraTes, I&#x27;d heard of &lt;em&gt;mob programming&lt;&#x2F;em&gt; but had never tried it. During
one kata, we experimented with a specific facilitation technique for &lt;em&gt;mob
programming&lt;&#x2F;em&gt;: the fish bowl.&lt;&#x2F;p&gt;
&lt;p&gt;The rules are fairly simple:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A driver has the keyboard. They &lt;strong&gt;only&lt;&#x2F;strong&gt; code and don&#x27;t make decisions.&lt;&#x2F;li&gt;
&lt;li&gt;A navigator tells the driver what to do. They&#x27;re the &lt;strong&gt;only&lt;&#x2F;strong&gt; one speaking.&lt;&#x2F;li&gt;
&lt;li&gt;One chair is open for &lt;strong&gt;questions&lt;&#x2F;strong&gt;. But beware — only questions to better
understand the code (e.g., an unfamiliar syntax) or the business logic. You
can&#x27;t ask questions like &quot;Why are we doing it this way?&quot; — in that case, you
take the navigator&#x27;s seat!&lt;&#x2F;li&gt;
&lt;li&gt;Everyone else stays &lt;strong&gt;silent&lt;&#x2F;strong&gt; and can take the driver&#x27;s or navigator&#x27;s place
at any moment.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I really liked this technique for &lt;em&gt;mob programming&lt;&#x2F;em&gt; because it prevents the
chaos that can arise when everyone tries to code at once. In those situations,
the driver doesn&#x27;t know what to do, and it&#x27;s hard to make progress.&lt;&#x2F;p&gt;
&lt;p&gt;Since the event, I&#x27;ve tested this technique during a kata and the format was
well received. However, like other techniques, I think you need to practice it
first before using it daily on production code.&lt;&#x2F;p&gt;
</content>
    </entry>
</feed>
