<?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[Thread Engineering - Medium]]></title>
        <description><![CDATA[Engineering life at Thread - Medium]]></description>
        <link>https://medium.com/thread-engineering?source=rss----d735826ac48b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Thread Engineering - Medium</title>
            <link>https://medium.com/thread-engineering?source=rss----d735826ac48b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 23:33:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/thread-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Searching and sorting text with diacritical marks in JavaScript]]></title>
            <link>https://medium.com/thread-engineering/searching-and-sorting-text-with-diacritical-marks-in-javascript-45afef20e7f2?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/45afef20e7f2</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[unicode]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Paul Springett]]></dc:creator>
            <pubDate>Wed, 29 Aug 2018 09:24:47 GMT</pubDate>
            <atom:updated>2018-08-30T10:34:34.377Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve been busy rebuilding Thread’s frontend codebase using <a href="https://reactjs.org/">React</a>, and lately that’s included rebuilding our <a href="https://www.thread.com/browse">browse filters</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bw_W-r9V6oKQWZvCa5ysQ.png" /><figcaption>Searchable browse filters on Thread</figcaption></figure><p>These filters allow customers to find products more easily by selecting which brands, colours or prices they want to see.</p><p>Because some of our filters contain a lot of options (we have over 500 brands available on Thread) we need them to be easily searchable, and sorted correctly.</p><h3>Sorting</h3><p>Take the following list of brands:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2005dab3946f7eb0ce6493ca80900d05/href">https://medium.com/media/2005dab3946f7eb0ce6493ca80900d05/href</a></iframe><p>Let’s see how we can best sort them intuitively for our users.</p><p>Sorting these in JavaScript initially seemed straightforward: just call sort() on the brands array, passing a function to compare the two labels, eg:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8845adb798939f440804e3b0b3420a7/href">https://medium.com/media/a8845adb798939f440804e3b0b3420a7/href</a></iframe><p>This appears to work, with the exception of Études, which gets incorrectly placed at the bottom of the list. JavaScript compares strings lexicographically, but with limitations. It actually uses the character’s position in the Unicode table to determine its ordering.</p><p>If we look the characters <a href="https://unicode-table.com/en/007A/">z</a> and <a href="https://unicode-table.com/en/00E9/">é</a> we can see the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e59d590eefbdbf39b8ed20a3c230831/href">https://medium.com/media/5e59d590eefbdbf39b8ed20a3c230831/href</a></iframe><p>Notice the decimal values for the characters; é has a much higher value than z meaning it will be sorted after z.</p><p>Fortunately, JavaScript has <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare">String.prototype.localeCompare</a> which meaning we can simply rewrite the above function to be:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/087c4db8e8eed3dc9fb5a24e659bce85/href">https://medium.com/media/087c4db8e8eed3dc9fb5a24e659bce85/href</a></iframe><p>Have a read <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare">of the docs</a> to see what other arguments the localeCompare function accepts.</p><h3>Searching</h3><p>Sorting was quite straightforward to solve, but what about searching?</p><p>Our browse filters provide a handy search input that filters large lists as you type, however searching for Cote was not yielding results for Côte et Ciel.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f846031573fa2433a62e67ffa01569c/href">https://medium.com/media/9f846031573fa2433a62e67ffa01569c/href</a></iframe><p>We didn’t think it was reasonable to expect our customers to know we’re using the brand spelling with diacritics, or to be able to easily input the right characters.</p><p>So in order to allow customers to find these brands, we need to remove the diacritical marks from the characters before comparing them with the search query.</p><p>We can do this in two parts.</p><p>First, we need to “decompose” the string so that any characters with diacritical marks are represented by their two-byte surrogate pair. This is a technique used in UTF-8 to represent a single character as a pair of two bytes.</p><p>We can do this using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize">normalize function</a> in JavaScript, and passing the NFD form.</p><p>Looking at the docs, we can see that “NFD” stands for “Normalization Form Canonical Decomposition”–the important word being “Decomposition”.</p><p>We can see this working by comparing the string length before and after decomposition:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b7694f3abcbb4163ccd5e96d61b7971/href">https://medium.com/media/7b7694f3abcbb4163ccd5e96d61b7971/href</a></iframe><p>This shows that the ô character is now being represented by two bytes rather than one.</p><p>Second, now we have separate bytes for the character and the diacritical mark, we can remove the unwanted characters using the String.prototype.replace function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/735c2697eca4b1f5405a13df2fc337d0/href">https://medium.com/media/735c2697eca4b1f5405a13df2fc337d0/href</a></iframe><p>The replace function takes a range of Unicode points from <a href="https://unicode-table.com/en/#0300">U+0300</a> to <a href="https://unicode-table.com/en/#036F">U+036F</a>, covering any diacritic bytes we might have in the string.</p><p>Et voilà! This is a great technique to have in mind if you’re allowing your users to search lists of data that might include diacritics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45afef20e7f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/searching-and-sorting-text-with-diacritical-marks-in-javascript-45afef20e7f2">Searching and sorting text with diacritical marks in JavaScript</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dealing with legacy code in React]]></title>
            <link>https://medium.com/thread-engineering/dealing-with-legacy-code-in-react-18bc0c039e8b?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/18bc0c039e8b</guid>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Jack Franklin]]></dc:creator>
            <pubDate>Thu, 10 May 2018 12:48:20 GMT</pubDate>
            <atom:updated>2018-05-10T13:29:25.669Z</atom:updated>
            <content:encoded><![CDATA[<p>At Thread we’ve a large, five year old codebase that has lived through several frameworks, libraries and techniques, particularly on the frontend. These days we’re primarily writing our frontend in <a href="https://reactjs.org/">React</a>, using <a href="https://github.com/css-modules/css-modules">CSS Modules</a>. In contrast, most of our old frontend code is jQuery layered on top of server side rendered content. This means we spend a reasonable amount of time converting jQuery into React components.</p><h3>The CollectPlus widget</h3><p>On a recent project we were rebuilding part of our checkout flow in React. The first step of our checkout is to pick your shipping address, and one option that we offer is <a href="https://www.collectplus.co.uk/">CollectPlus</a>. The checkout page was written primarily in jQuery and used a CollectPlus widget library to load the CollectPlus UI and allow the user to pick the store for their parcel to be sent to. The code was pretty standard jQuery that would look for a div on a page that has a certain set of attributes that we need (such as the CollectPlus API key), and initialise the CollectPlus widget via the parcelpoint API library that we use.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bad1507b9a0ac9ddc2be8d6696b7f5d/href">https://medium.com/media/9bad1507b9a0ac9ddc2be8d6696b7f5d/href</a></iframe><p>We wanted to turn our CollectPlus code into a React component so it could fit into the rest of our new checkout , but one thing that we didn’t want to do is rework the old jQuery code; the CollectPlus widget (that is provided by a 3rd party for us) functioned perfectly, and it wasn’t worth our time to completely rebuild it from scratch, given that we could take advantage of a 3rd party library that provided the functionality for us.</p><p>To avoid rebuilding, we were able to take advantage of React’s references features to wrap this legacy CollectPlus code in a React container.</p><p>The CollectPlus widget takes a selection of configuration options and a DOM reference, into which it will mount the CollectPlus widget. Typically when working with React you don’t want to reference the DOM; you should give React a selection of components and allow it to do the messy work with the DOM, but React provides an escape hatch when you need it in the form of <a href="https://reactjs.org/docs/refs-and-the-dom.html">references</a>. Using references allowed us to move forward with the checkout rewrite without being delayed on rewriting the CollectPlus widget code entirely in React.</p><h3>References in React</h3><p>React uses references to provide a direct link to the DOM node that was rendered. You access this via a callback ref prop that you pass to an element within your component&#39;s render function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc85889f50c68a44ebef4fbb4e439680/href">https://medium.com/media/cc85889f50c68a44ebef4fbb4e439680/href</a></iframe><p>Please be aware that in the React 16.3 there is a new Ref.createRef() <a href="https://reactjs.org/docs/refs-and-the-dom.html">API that it is recommended you use</a>; but when we first wrote this code we weren’t on the latest React, so these examples use <a href="https://reactjs.org/docs/refs-and-the-dom.html#callback-refs">the older callback ref API</a>, which is still implemented in React.</p><p>When this render function runs, React will call the ref property and set this.divRef to have a reference to the actual div that was rendered into the DOM. By the time the componentDidMount lifecycle function fires, we can be confident that this.divRef has been set, and we can trigger any code that relies on the presence of this element in the DOM.</p><h3>Running the CollectPlus widget within React</h3><p>The first step was to take our legacy code and wrap it in a function that can take the div element and the CollectPlus API key:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe0167b18319d155aa16d7975a3fcca0/href">https://medium.com/media/fe0167b18319d155aa16d7975a3fcca0/href</a></iframe><p>Now we can create a CollectPlus component that can call the above function, passing in a reference from React:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce86a7b7d2ea1797f56648f8d57b2d88/href">https://medium.com/media/ce86a7b7d2ea1797f56648f8d57b2d88/href</a></iframe><h3>Dealing with user events</h3><p>Our final task is to deal with the callback that occurs when the user interacts with the widget and choses the store that they would like to use.</p><p>We can update our setupClickAndCollect code to also take in a callback function and implement it on the React side:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6910aa52ebde809465161715073e9a2/href">https://medium.com/media/c6910aa52ebde809465161715073e9a2/href</a></iframe><p>We can define the event handler in the React CollectPlus component. This has the advantage that we can deal with the state (which here is the store the user has picked) in React land, and only use our legacy jQuery for the actual event handler:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0af899580a811a58323b697ddafc6442/href">https://medium.com/media/0af899580a811a58323b697ddafc6442/href</a></iframe><h3>Conclusion</h3><p>One of the benefits of React components is that they are all isolated; each one has its own set of responsibilities that it deals with, and as a user you can treat them as a black box. You can take advantage of this characteristic when dealing with legacy code; this approach can be used to take some legacy code and wrap it in a more modern surrounding that allows you to move forward without refactoring every single last piece of code.</p><p>If you’ve enjoyed this blog post, you might be interested to know that we are hiring! Check out our <a href="https://www.thread.com/jobs/frontend-engineer">frontend engineer job listing</a> to find out more about the role and how to apply.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18bc0c039e8b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/dealing-with-legacy-code-in-react-18bc0c039e8b">Dealing with legacy code in React</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Django Codebases — PyCon UK 2017]]></title>
            <link>https://medium.com/thread-engineering/scaling-django-codebases-pycon-uk-2017-91c166fcb926?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/91c166fcb926</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Dan Palmer]]></dc:creator>
            <pubDate>Fri, 02 Mar 2018 10:13:48 GMT</pubDate>
            <atom:updated>2018-03-02T10:13:48.230Z</atom:updated>
            <content:encoded><![CDATA[<p>Four of us from the Thread engineering team went to PyCon UK again in September for the third year running, and I was lucky enough to have my talk selected.</p><p>At Thread we use Django for the backend of the main site which has grown to over 350 “<a href="https://docs.djangoproject.com/en/2.0/ref/applications/">apps</a>”, and various members of the team have used the framework since not long after the initial public release.</p><p>I’ve learnt many tips, tricks, and best practices for keeping engineers productive on a codebase of this size from my colleagues over the years, and I shared the highlights with the Python community in September.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjBBcORHhfV0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjBBcORHhfV0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjBBcORHhfV0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c5d6083b15b9da830aee706e91f58ca/href">https://medium.com/media/8c5d6083b15b9da830aee706e91f58ca/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91c166fcb926" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/scaling-django-codebases-pycon-uk-2017-91c166fcb926">Scaling Django Codebases — PyCon UK 2017</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed or quality? With Test & Delivery you don’t have to choose]]></title>
            <link>https://medium.com/thread-engineering/speed-or-quality-with-test-delivery-you-dont-have-to-choose-a562dc2597c1?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/a562dc2597c1</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[a-b-testing]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Thomas May]]></dc:creator>
            <pubDate>Fri, 09 Feb 2018 10:21:58 GMT</pubDate>
            <atom:updated>2018-02-09T10:21:58.246Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve all been there: that new feature you’ve been obsessively refining over the last few months is finally ready to go live. You’re glowing with pride for what you and your team has built. But when release day finally rolls around, it does… well, nothing. No movement to your KPIs and a lukewarm reaction from users. All those hours spent polishing the perfect experience and nothing to show for it.</p><p>Or perhaps you’ve gone too far the other way. You’re concerned about wasting time on low-impact features, so instead you hack together minimum viable products (MVPs) to test out your ideas. For a while, all seems well; you’re moving fast and your metrics are climbing. But one day you wake up to a product chock-full of barely working features, a codebase suffocating under mounting tech debt, and an increasingly exasperated user base.</p><p>My guess is that every Product team will encounter these pitfalls sooner or later. It’s just really hard simultaneously to maximise velocity, impact, and quality.</p><p>We’ve certainly fallen into these traps multiple times at Thread. So last year we set out to solve the problem once and for all. Could we find a process that allowed us to move fast, uncovering value as efficiently as possible, whilst also ensuring we deliver high-quality experiences built for the long-term? I’m excited to share the Test &amp; Delivery framework, which has enabled us to do exactly that.</p><h3>Test &amp; Delivery</h3><p>Whenever you release a new feature or change to our product, there are two key questions you should ask yourself:</p><ol><li>Did we build the <em>right </em>thing?</li><li>Did we build the thing <em>right</em>?</li></ol><p>The first question encompasses the <em>value risk</em> we may face with any project: Did we actually build something that moved the needle? It doesn’t matter how well we polished the feature if we didn’t get the impact that justified the project in the first place. Whereas the second question focuses on the <em>execution risk</em>. Did we build something people will love to use? Did we introduce any tech debt or other complexity we might pay for in the future?</p><p>The core insight of the Test &amp; Delivery framework is that it’s really hard, if not impossible, sufficiently to account for both value and execution risk at the same time, in the same project. Think about it for a minute and this is kind of obvious: how can you validate an idea quickly whilst simultaneously building it into a polished, high quality experience? It just can’t be done.</p><p>So in Test &amp; Delivery, you don’t even try to reconcile this tension: instead, every project you work on is classified as one of two types. Either it’s a Test project, in which you expend as little time and effort as possible to validate your idea. Or it’s a Delivery project, in which you take an already-validated idea and invest in a high-quality execution. Put another way: in Test you account for the value risk and then in Delivery you account for execution risk.</p><p>I’ll talk through the details of the process we use at Thread below.</p><h3>Test projects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLfoQDHKsfQhIlxa5koEAQ.png" /></figure><p>Let’s say you’ve got a great idea for a new feature. You’re excited to get stuck in building it, and think there’s a chance it’ll have a huge impact on your metrics and UX. However, it could take weeks to build it in a way that meets your quality bar. This means there’s quite a high <em>value risk</em>: what if you spend all that time building something that doesn’t end up moving the needle? So, unless you already have reason to be super-confident in the idea, you’ll probably want to validate it first. In this case, you’ll kick-off a Test project.</p><p>To be clear: The goal of a Test project is not to <em>prove </em>scientifically, beyond all reasonable doubt, that the feature is going to be impactful. Instead, your aim is to get to a point where you and your team feel confident enough to invest the additional time in executing a high quality version of the feature. This is always going to involve a good deal of judgement: Test projects are about <em>informing</em> rather than <em>driving </em>your decisions.</p><p>A Test project begins with a <em>pre-mortem</em>: essentially, you try to identify all the reasons the feature could end up failing to move the needle. Ask yourself and your team: “Imagine we’re sitting in a meeting in a few weeks’ time to discuss why the feature was a failure. What do you think we’d be discussing?” For example, maybe too few users engaged with the feature in the first place? Or maybe the UI was too complex or unintuitive? Or maybe the content just wasn’t valuable enough to the user? The purpose of this exercise is to uncover the <em>riskiest assumptions </em>associated with the project. What are the assumptions which could easily turn out to be false and thus cause the project to fail?</p><p>Next, you design <em>minimum viable tests</em> (MVTs) to validate these risky assumptions. An MVT is simply the minimum amount of work you need to do to validate an assumption. This could take the form of an A/B test, a simple prototype for user testing, or even an engineering spike. Basically, you just do whatever you need to test out your assumptions as quickly as possible.</p><p>Once you’ve gathered results and insights from your MVTs, you first stop and remove any code associated with the tests. This is an important point. Given that MVTs are designed to validate assumptions as fast as possible, they’ll naturally cut a few corners along the way. If you allow an ever-increasing array of MVTs to linger in your product, you’ll harm your product and code quality over time.</p><p>Depending on the results of your MVTs, you can then go one of three ways. If you’re lucky, you’ll have reached sufficient confidence in the idea that you’re happy to invest in a Delivery project. On the other end of the spectrum, your tests could have been so disastrous that you completely kill the idea and move on to other things. The third possibility is that the results were promising, but not a slam-dunk. In this case, you might have ideas for iterations which you can test out in another Test project.</p><h3>Delivery projects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXYlq6qqaYenXC1kMNPWLA.png" /></figure><p>Let’s say your Test project was a success, and you feel confident enough to commit the time to building a polished version of the feature. In this case, you’ll want to kick-off a Delivery project. From this point, you simply need to define and execute a high-quality realisation of the feature. This is where you think about all those edge-cases you glossed over when hacking together your MVTs. You obsess over the design details that’ll elevate the UX to something seamless and delightful. You also take steps to minimise technical debt, ensuring you can continue to move fast in the future.</p><p>Of course, it’s likely you’ll still need to make pragmatic compromises in Delivery projects. Even if you’re confident in a feature’s value, you probably don’t have the freedom to spend as long as you like on the final version. We’ve all got got business goals, after all. For example, you might decide to introduce a small amount of technical debt in order to dramatically reduce the estimate. Or perhaps you’ll reign in the scope to exclude some costly UX polish. The goal in Delivery isn’t necessarily to realise the <em>very best</em> execution, but instead to build features into your product which are designed to stick around for the long-term.</p><p>***</p><p>At Thread we’ve noticed a number of key benefits from adopting Test &amp; Delivery as a core part of our process, some intended and others unexpected:</p><ol><li><strong>Shorter time-to-impact:</strong> Most tests fail. If you only invest time polishing features that are already validated, then you’ll ship impactful changes faster. Although you spend more time on Delivery projects, this is more than offset by the time savings of building strict MVTs in Test.</li><li><strong>Long-term velocity:</strong> In Test projects, you might build MVTs which introduce some tech or design debt. But this debt is purely temporary: you remove it as soon as you’ve gathered insights from the test. When it comes to Delivery, we invest in building solid foundations that will enable us to continue to iterate fast in the future.</li><li><strong>Higher execution quality:</strong> In Delivery projects, you already know that the feature is valuable enough to keep in the product in the long-term. So it’s much easier to justify spending that additional 20% of effort to get things just right.</li><li><strong>Team alignment:</strong> This was one of the unexpected benefits we experienced after committing to Test &amp; Delivery. If a project is framed as either Test or Delivery, then it’s easier to align quickly on the primary goal. Are you aiming to test out a risky assumption? Or do you want to craft a high-quality feature? This means fewer time-consuming debates about where exactly to cut scope, or whether to spend those extra hours polishing the UX.</li></ol><p>The ultimate goal of product development is to create a seamless experience which repeatedly and reliably delivers value to its users. Test &amp; Delivery is a super valuable tool for any team aspiring to achieve that goal. First, you move fast, validating your ideas, uncovering the unique ways you can solve your users’ problems and add value to their lives. Next, you pause, take stock, and use these insights to craft an experience which people won’t just use, but will love.</p><p><em>How does your Product team try to strike the right balance between speed, impact, and quality? Have you tried out Test &amp; Delivery? Let us know in the comments!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a562dc2597c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/speed-or-quality-with-test-delivery-you-dont-have-to-choose-a562dc2597c1">Speed or quality? With Test &amp; Delivery you don’t have to choose</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How and why we teach non-engineers to use GitHub at Thread]]></title>
            <link>https://medium.com/thread-engineering/teaching-non-engineers-how-to-contribute-code-2e85411ab464?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2e85411ab464</guid>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Dan Palmer]]></dc:creator>
            <pubDate>Thu, 04 Jan 2018 14:14:23 GMT</pubDate>
            <atom:updated>2018-01-04T16:58:08.908Z</atom:updated>
            <content:encoded><![CDATA[<p>At Thread one of our core beliefs is that technology allows for great change. This is important to our product, but it’s also important to how we work internally.</p><p>Because of this way of working, we try to represent everything in data—products, measurements, styles, suppliers, locations in our warehouse, support ticket resolutions, and many more things that you’d never even think about.</p><p>All of these data models come with a cost of needing a way for those in the company who use them to maintain the data. This means building editing interfaces, with validation, database design, and front-end work. Often we just don’t have time to do this—new features are higher priority, and besides, a engineer can just update a few data files when needed right?</p><p>While this is a much quicker solution in the short term, an engineer will have to context switch out of their work, watch the release go out and make sure nothing goes wrong—that all hurts productivity. Perhaps more importantly though, the person who needs the data updated now no longer has ownership of the whole process and are reliant on someone else’s schedule.</p><p>Ultimately this process can be useful to get a feature out of the door quickly, but causes far too much friction to work long term.</p><h3>A better solution</h3><p>I remember when GitHub first launched their web editor — I wasn’t impressed. Why would anyone edit code in a web browser? Why would I use an editor that could only change one file per commit? Well years later I’ve realised that I am not the target market for the editor.</p><p>At Thread we now regularly teach those outside of the engineering team how to contribute to our codebase via the GitHub web interface, so that they are in control of updating data they need to work effectively.</p><p>We have now had more contributors to our main codebase who are in non-technical roles, than all engineers and contractors who have contributed over the years.</p><h3>Has it worked?</h3><p>As a engineer on the product team, I’m able to focus my efforts on building features that will benefit our customers and move metrics, rather than on building more <a href="https://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> interfaces. I’m also able to ship A/B tests faster as we can often skip the internal tooling for the test version in favour of editing data through data files to begin with. When we get to the delivery phase of a project we can then put the time into the editing interfaces as we’ll not only have an idea of the value of the feature, but also have a better idea of how our internal users would like the interfaces to work.</p><p>It’s also not limited to data files; many pages on <a href="https://www.thread.com/">thread.com</a> are essentially static HTML, pages like our delivery FAQ, returns policy, or terms and conditions. By learning how to use GitHub, our operations team can keep these up-to-date without asking for help. Our talent team are also able to edit our <a href="https://www.thread.com/jobs">jobs site</a>, reacting on a daily basis to common questions that come up when talking to candidates.</p><p>All of this means that our team members outside of the engineering team are able to have much more ownership over their work, and have less friction to make the changes their experience tells them is necessary.</p><h3>How do we do it?</h3><p>The first thing we do is run GitHub tutorials every now and again when we have a few new starters to teach. We cover the basics of what a repository is, comparing it to document revision histories on Google Docs, what it means to commit a file, and what a branch is. We only talk about these in high level ways as we don’t cover the command line interface at all in our current tutorial format.</p><p>Next up we go through how to edit a file on the GitHub web interface, how to write a commit message, what a pull request is, and what the build status reporting from Jenkins means.</p><p>Lastly we ask non-technical contributors to pick an engineer who is available on Slack to hit the merge button once the build is green.</p><h3>Issues we’ve encountered</h3><p>On balance we feel this is a huge win for the team as a whole, and we’re planning to continue the training and encourage more contributors as we grow, but we have changed our process slightly as this has evolved.</p><p>Firstly, we’ve used GitHub roles and locked branches to prevent accidental commits to master. For someone who isn’t as familiar with version control and branches in particular, the GitHub web interface isn’t particularly clear about when a commit is going on to the master branch or a new branch. At Thread our master branch is continuously deployed with no manual intervention required, which resulted in several commits going out that broke the site and caused downtime.</p><p>As for all downtime issues, we ran a blameless <a href="https://en.wikipedia.org/wiki/5_Whys">5 Whys</a> and realised that while <em>in hindsight </em>we could have caught these issues with unit tests run before deployment, we likely wouldn’t catch everything and so introducing protected branches to encourage code review was a lightweight way to solve the problem.</p><p>Secondly, somewhat in response to this issue, we have started to write some unit tests that just sanity-check the structure of the data in data files, or to check that all of our Django template files successfully parse as valid templates. Particularly in the case of the data files, these wouldn’t normally be something we’d expect to test, but as we now want the files to be editable by people without a knowledge of the code, they can be handy in catching simple mistakes.</p><p>Lastly, as we’re typically using Python for our data files, we’ve found that the syntax isn’t particularly intuitive and can take some getting used to. To address this, we’ve written documentation with a little more detail than if it were written for an engineer. This documentation is also in the repo and editable by everyone, so we encourage non-engineers to update and clarify the instructions as they learn, and to teach each other how to edit certain parts of the site.</p><h3>Moving forward</h3><p>We consider this experiment to be a success and will be continuing it for the foreseeable future. Where we’re designing data files to be editable, we’re going to try including detailed instructions in the files themselves, possibly including copy/pasteable examples.</p><p>We already try to make our test failures have informative error messages with details on how to fix where we can, but due to the complexity of interpreting test output we don’t currently expose Jenkins to non-technical team members, even though they can technically log in with single-sign-on. This is perhaps the next opportunity we have to improve the contribution experience and something we might trial in the next batch of new starters who go through the tutorial.</p><p>To finish, I’d encourage all developers to see if there are opportunities in your companies to get non-technical team members contributing to your codebases. There are benefits to productivity on both sides, more empathy between teams, and a stronger feeling of ownership over work for those who are no longer reliant on developers to make changes for them. The reduced friction also means shorter feedback cycles, which can be transformational for what others can accomplish in their work, all without the high cost of development time on editing interfaces.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e85411ab464" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/teaching-non-engineers-how-to-contribute-code-2e85411ab464">How and why we teach non-engineers to use GitHub at Thread</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering culture at Thread]]></title>
            <link>https://medium.com/thread-engineering/engineering-culture-at-thread-8851763e6fd7?source=rss----d735826ac48b---4</link>
            <guid isPermaLink="false">https://medium.com/p/8851763e6fd7</guid>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Ben Phillips]]></dc:creator>
            <pubDate>Fri, 10 Nov 2017 12:50:25 GMT</pubDate>
            <atom:updated>2017-11-10T12:50:24.845Z</atom:updated>
            <content:encoded><![CDATA[<p>Why should you care about the culture at your company? After all, aren’t we just engineers getting together to build something and change the world?</p><p>Your culture is the machine that builds your product. It’s the values that a group of people share. In this post I’ll discuss culture in a bit more detail, why it’s important, and how we build it at Thread.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F5LGS5S-taWl-2HLUZXU6w.jpeg" /></figure><h3>What culture is and why it’s important</h3><blockquote>“Culture is simply a shared way of doing something with passion” ─ Brian Chesky, Co-founder and CEO of Airbnb</blockquote><p>Culture is the way a group of people behave and interact through shared norms and values. You’ll see these customs when observing a group of people such as a football team, a circle of friends, or people working together. A culture in such a group will exist regardless of any attempts to define and control it.</p><p>It’s important because it influences how people behave and the resulting output. A team that values winning over everything else may tend towards morally questionable behaviour. One that installs pace as its key value will cut corners and may consider quality to be of secondary concern.</p><p>As such, if you want to influence the properties of a team’s output you should care deeply about its culture and how a team thinks about its work. This takes no small effort and the forces that drive a team in different directions can be strong. Culture allows autonomy and reduces the need for process.</p><p>A team’s culture also influences which people want to join you. It affects how you hire, how you assess, and the kind of people who are attracted to your team. People joining a new group will emulate observed behaviours and so your culture will continue to shape your team even as it grows.</p><p>Your culture should be unique to your team; mimicking the values of another will be similar to cargo-culting process─you’ll end up with something that isn’t genuine. At Thread we thought hard about what kind of team we wanted to build and while we took inspiration from other companies, our culture is derived mainly from our personal values and aspirations.</p><h3>Thread’s engineering culture</h3><p>Most people hear the word ‘values’ and roll their eyes, often for good reason. If the team doesn’t genuinely believe the values that you claim to define as your guiding principles then they’re a waste of time. They need to be regularly discussed, and behaviours held to account based on them.</p><p>We have seven values at Thread: User experience obsessed, Act like an owner, Uncomfortably fast, Candour, Extreme clarity, Relentless self-iteration and Enjoy the journey together. The detail of most of these is for another post, but we use them extensively: we have a values meeting every Friday where we discuss one and how we’re performing against that value as a company; we run retrospectives on every project and score ourselves against the values each time; we hire based on them; we have a #values Slack channel where we highlight behaviour that relates to our values, and so on.</p><p>The engineering team culture is highly dependant on the company culture as a whole, but there are some values specific to the engineering team that have emerged as a result of our dedication to quality code, learning and enjoyment of work.</p><h3>Care of craft, taking pride in one’s work</h3><p>We don’t see programming as just a job or a tool. It doesn’t mean we necessarily write code in our spare time─you don’t have to live and breathe programming. What it does mean is that we see our profession as our craft and we care about what we build and how we build it. We’re proud of what we produce.</p><h3>Feedback and self-iteration</h3><p>We take time to help each other learn and maximise our own improvement. Thread’s value of relentless self-iteration manifests in the engineering team via thorough and compassionate code reviews, regular lunch and learns, and a culture of sharing knowledge and best practices. We’re candid but caring with our feedback, and thankful to those who take the time to help us get better. We hire carefully and are constantly trying to raise the bar of our team so that everybody can constantly improve.</p><h3>Autonomy and a sense of purpose</h3><p>Engineers are creative people and therefore seek a purpose and an ability to work unhindered and without micromanagement. We don’t believe in merely passing specs to engineers, instead our engineering team is part of the product team and everybody is involved in the whole process, from user research and ideation through to building and measuring the success of what we give to our users. We care and believe in our mission and approach engineering with the user front of mind.</p><h3>Maximising enjoyment of work</h3><p>We believe that a great codebase is more pleasant to work with than one lumbered with technical debt and hacked together features. To maintain this, we aim to minimise technical debt by spending time up front thinking about the problem at hand and evaluate proposed solutions in detail before writing a line of code. We use a ‘test and delivery’ methodology which allows us to spike code and test the viability of a solution before building a polished version.</p><p>We enjoy the journey together which is about helping others, being empathetic, recognising when others may be struggling, and thinking of your impact not only on the product but on your fellow Thread team members. There’s little point building a great product if you don’t have fun along the way.</p><p>A culture does not only consist of values you can define explicitly, there are many other things that contribute. However you should carefully and consciously define the values that are important for your team─your product depends on it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8851763e6fd7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thread-engineering/engineering-culture-at-thread-8851763e6fd7">Engineering culture at Thread</a> was originally published in <a href="https://medium.com/thread-engineering">Thread Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>