<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aaron Craig on Medium]]></title>
        <description><![CDATA[Stories by Aaron Craig on Medium]]></description>
        <link>https://medium.com/@aaroncraig?source=rss-27e5adf8477c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VsmtwypfWmxVGZb5.jpg</url>
            <title>Stories by Aaron Craig on Medium</title>
            <link>https://medium.com/@aaroncraig?source=rss-27e5adf8477c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:06:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aaroncraig/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[This is a companion post to my August 2017 talk at JS.LA]]></title>
            <link>https://medium.com/@aaroncraig/this-is-a-companion-post-to-my-august-2017-talk-at-js-la-63ea4048fb11?source=rss-27e5adf8477c------2</link>
            <guid isPermaLink="false">https://medium.com/p/63ea4048fb11</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Aaron Craig]]></dc:creator>
            <pubDate>Sun, 15 Oct 2017 23:28:11 GMT</pubDate>
            <atom:updated>2017-10-15T23:28:11.692Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a companion post to my August 2017 talk at JS.LA on the overuse of functional components in React.</em></p><p>Ask just about everyone “Class component or functional?” and the majority of developers will immediately respond “functional!”.</p><p>For the most part, this knee jerk reaction stems from ignorance on the inner workings of React, and invalid assumptions around performance optimization.</p><p><a href="https://www.youtube.com/watch?v=KnKVANnl9V0&amp;feature=youtu.be">I gave a talk at JS.LA</a> in August about this, and I thought it would be useful to sum up my talk in a few bullet points here.</p><h4>Functional components are not more performant than class instances</h4><p>A common misconception is that a functional component is somehow more performant than a class instance with a render method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9048c6c09c6f5354f6b7e6a8d9455d59/href">https://medium.com/media/9048c6c09c6f5354f6b7e6a8d9455d59/href</a></iframe><p>Fact is, under the hood your functional component will be wrapped up in a class instance, so it really makes no difference which pattern you use — by the time the rendering occurs, both are class instances.</p><h4>Functional components have no access to lifecycle events</h4><p>One major drawback to functional components is that you cannot plug in to lifecycle events, meaning you can’t avoid useless renders.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1d87543c0991add79b425a50524ca84/href">https://medium.com/media/d1d87543c0991add79b425a50524ca84/href</a></iframe><h4>Components should be plugged into state anyway</h4><p>If components are truly “independent, reusable pieces of UI” as suggested in the React docs, then the majority of your components should receive their state from the global app state, rather than by receiving props from their parent.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc3f4daf7d4c9e38650eff849e912dab/href">https://medium.com/media/fc3f4daf7d4c9e38650eff849e912dab/href</a></iframe><p>Components that receive props from their parent are tightly coupled to the parent — the parent must know what data the child needs. When components are autonomously connected to app state, the code base is more easily refactored as it grows and evolves.</p><p>Note that this is true regardless of which state management library you adopt.</p><p>You can <a href="https://github.com/aaroncraigongithub/jsla-talk/blob/master/slides.pdf">see the slides</a> for the talk in my <a href="https://github.com/aaroncraigongithub/jsla-talk">jsla repo</a>, which also has some illustrative code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63ea4048fb11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is good documentation]]></title>
            <link>https://medium.com/@aaroncraig/what-is-good-documentation-b66ee11ba3e4?source=rss-27e5adf8477c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b66ee11ba3e4</guid>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Aaron Craig]]></dc:creator>
            <pubDate>Sun, 17 Sep 2017 17:09:49 GMT</pubDate>
            <atom:updated>2017-09-17T17:09:49.579Z</atom:updated>
            <content:encoded><![CDATA[<p>In talking about <a href="https://medium.com/@aaroncraig/building-a-delightful-engineering-experience-25d88801e03">how a successful team might function</a> I mention that a big measure of a team’s health is whether or not a new team member can push code to production on their first day without help from another team member.</p><p>A good follow up question is “what makes for good documentation to enable this achievement?”.</p><blockquote>Good documentation allows a developer to easily use and contribute to a resource without any interaction with the authors of that resource.</blockquote><p>Documentation can live in a number of places:</p><ul><li>the code itself</li><li>tests</li><li>comments</li><li>external documentation (ie, README, autogenerated, etc)</li><li>tribal knowledge (conventions shared by the team or organization)</li></ul><p>Each team will decide the most appropriate place for documentation to live, and in most cases it will be a mix of all of these.</p><h3>Code as documentation</h3><p>Clearly written, well structured code often documents itself, especially when the team is comprised of experienced engineers.</p><p>Some keys to writing communicative code:</p><ul><li>meaningful function and variable names</li><li>short blocks of code with specific duties</li><li>preference for legibility over conciseness or obfuscation</li></ul><h3>Tests as documentation</h3><p>If you are writing test suites (and you should be!), you have another opportunity to get documentation for free.</p><p>Tests should cover at least all main usage methods of the resource, and by definition will implement the various APIs or interfaces of the resource in order to test them.</p><p>Keeping the future user of the resource in mind while writing tests helps to ensure that the tests themselves serve as ready examples of how to interact with the resource.</p><h3>Comments as documentation</h3><p>Comments as documentation serve two purposes — explaining necessarily complex code as well as for self-generating external documentation.</p><p>Sometimes you can’t help but do something that is difficult to understand at first glance, especially when dealing with code that does calculations, manages multi-threaded or asynchronous environments, or similar realms where either a specialized knowledge is required to understand the concepts being dealt with, or else mechanisms external to the code at hand somehow influence the behavior being coded for.</p><p>In these cases, a short comment block can go a long way in explaining what’s going on.</p><p>The other sort of documentation is in formal doc comments (ie, JSDoc, etc). These can be useful especially when you expect users of your code to be external to your team (ie, an OSS library, or an internal lib to be shared across an organization) and you want to be able to publish the docs as HTML somewhere.</p><p>Note that in many cases, self documenting code (see first section) can suffice for code that is only going to be used within a single team, or where publishing an HTML version of the documentation is not necessary. JSDoc and the like can create overhead, and in my opinion are not always necessary. Don’t document just for documentation sake.</p><h3>Tribal Knowledge</h3><p>Ruby on Rails is an example of the power, and the problems, with conventions in an ecosystem. Once you understand the conventions, you have a short path from reading some code to understanding a great deal about how it should work. However, learning all the conventions can take a significant amount of time — years in a code base as complex as RoR.</p><p>Still, I’m a big believer in the power of convention within a team. Some conventions can be enshrined in linter configurations, which reduces the need for explicit explanation.</p><p>When convention is a thing on a team, careful documentation in a README or other document shared repository is vital to making it easy for new members of the tribe to get up to speed quickly.</p><h3>Documentation Driven Development</h3><p>Many critics of documentation argue that writing documentation increases a team’s maintenance burden for the code base — documentation must be updated whenever code changes.</p><p>Of course it does, and that’s a feature, not a bug.</p><p>Documentation driven development states that when a change is going to be made to code, the documentation is updated first, then the tests, then the code itself.</p><p>Adopting this approach manages this tech debt well, and offers the added benefit of forcing developers to think through APIs and interfaces in a place that’s easy to iterate on — documentation — before getting into the more complex part of the implementation — the code itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b66ee11ba3e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a delightful Engineering Experience]]></title>
            <link>https://medium.com/@aaroncraig/building-a-delightful-engineering-experience-25d88801e03?source=rss-27e5adf8477c------2</link>
            <guid isPermaLink="false">https://medium.com/p/25d88801e03</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Aaron Craig]]></dc:creator>
            <pubDate>Wed, 13 Sep 2017 17:18:34 GMT</pubDate>
            <atom:updated>2017-09-13T17:18:34.648Z</atom:updated>
            <content:encoded><![CDATA[<p>Which software development team doesn’t claim they are in the business of building a great user experience.</p><p>But who thinks about the engineering experience when building software? Should we care?</p><p>Good engineers like the fun things — building new features, solving hard problems, creating new tech.</p><p>They hate the boring things — deploying builds, writing tests, fixing bugs.</p><p>It costs something like $25,000 in recruiter fees and a ton of time to hire a good engineer.</p><p>It seems clear we should invest as much energy in keeping engineers happy as they do their users.</p><p>Here’s a list of things we pay attention to at Rival, because we believe that when we invest in these things our developers are happier, our velocity increases and our company profits.</p><p><strong>Can a new developer push code on the first day?</strong></p><p>Without pairing with another engineer?</p><p>This is probably the number one measure of a team’s overall health.</p><p>If they can, it means the code base is well structured and well documented. The deployment framework is automated and easy to use. The team communicates well and can answer inevitable questions.</p><p>There are few things that makes an engineer more happy than feeling useful and productive.</p><p><strong>How easy is it to write tests?</strong></p><p>If your team doesn’t care about automated testing, it probably doesn’t have very many good engineers (sorry, it’s true).</p><p>Investing time in building an easy to use testing framework, with plenty of configurable fixtures and shared utilities, reduces friction around writing tests.</p><p>Less friction, more tests. More tests, fewer bugs. Fewer bugs, more new features. More features, happy engineers!</p><p><strong>How many team members understand the entire code base?</strong></p><p>If only a few (or one?!) on the team really understands the entire code base, then there is friction around writing new features in arcane realms of the code.</p><p>More friction, fewer features. Fewer features, frustrated engineers.</p><p><strong>How easy is it to add features?</strong></p><p>Does your team still work around that dumb decision the first CTO (you know, the friend of the CEO’s brother-in-law’s boyfriend?) made?</p><p>Fix it. Now.</p><p>More features… you know what comes next.</p><p>Building software is hard. The patterns and practices that evolve in a team over time can make the task more or less difficult. Mindfully nurturing patterns that decrease tech debt and increase developer happiness will pay off over time in increased velocity and decreased turnover.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25d88801e03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>