<?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 Andy Crouch on Medium]]></title>
        <description><![CDATA[Stories by Andy Crouch on Medium]]></description>
        <link>https://medium.com/@amcrouch?source=rss-5b7f573b5e68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*txp5E-giuC48sv-bVsbddQ.jpeg</url>
            <title>Stories by Andy Crouch on Medium</title>
            <link>https://medium.com/@amcrouch?source=rss-5b7f573b5e68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:37:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amcrouch/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[Thoughts on “What You Do Is Who You Are”]]></title>
            <link>https://amcrouch.medium.com/thoughts-on-what-you-do-is-who-you-are-101a6450ff64?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/101a6450ff64</guid>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[leadership-development]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Tue, 23 Mar 2021 12:42:56 GMT</pubDate>
            <atom:updated>2021-03-23T12:42:56.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*DS24fLTu17GMPEpH.jpg" /></figure><p>Team culture is vital for any company. It is something I have experienced as both a team member and a leader. When I talk about “Team” here, I am obviously talking at both a team and company level. Some teams get culture and the impact it can have on the success of a company and others don’t. There is a lot of research and writing on the subject with just about as many opinions on the subject. <a href="https://www.amazon.co.uk/What-You-Do-Who-Are/dp/0008356114">“What You Do Is Who You Are”</a> by Ben Horowitz is a book looking at leadership culture from a very different angle.</p><p>The book is not a standard walkthrough on how to implement culture within your company. Instead, it takes a long trek through three specific historical characters and samurai history. While the samurai don’t stand out, the three historical characters do. Toussaint Louverture, Shaka Senghor and Genghis Khan. None of these figures I knew much, if anything in Senghor’s case, about. But, having followed Ben’s writing for some time I did know the man knows a lot about three things: Rap music, Business and History.</p><p>After asking the obvious question “What is culture” Ben spends a couple of chapters on Toussaint Louverture. Louverture was the leader of the Haitian slave uprising in the 18th century who understood that the culture of slavery was shaping the salves behaviour. He could see an opportunity to change that culture to enable a successful uprising and Ben outlines how he did it. Tactics used include “Keep what works”, “Create shocking rules” and “Walk the talk”. Some of this is obvious, although “Keep what works” is the result of constant cultural development. “Create shocking rules” might not relate as you would think. Here Ben summarises them as memorable, easy to explain and encountered daily. Amazon’s meeting process, Facebook’s early “Move Fast and Break Things” mantra and partnerships that are always 49/51 against the company are used as examples. He provides context against each point backing them all with a solid reason.</p><p>The book then flows into the success of the samurai’s and the code they lived by, the samurai bushido. This section really focuses on the difference between values and virtues. These are well documented and Ben shares examples of virtues he’s instilled at companies. One example is that the company <em>“… tell the truth even if it hurts … we do not withhold material information or tell half-truths. Even if the truth will be difficult to hear or to say, we err on the side of truth in the face of difficult consequences”</em>. This is obviously, taken from Andreessen Horowitz but he also provides examples from the Netscape days such as “If you see a snake, don’t call committees, don’t call your buddies, don’t form a team, don’t get a meeting together, just kill the snake”.</p><p>The book then moves on to Shaka Sengor who in 1991 was convicted of murder. During his time in prison, he became the leader of The Melanics who he transformed so that “when we went back to the community, we could help fix it for other kids.” He clearly transformed himself by his desire to move away from where he grew up and discovered on his journey that culture is not a “set it and forget it” task. A leader has to subscribe to the cultural elements he prescribes or else there is not culture.</p><p>The last character that Ben use’s to highlight strong culture is Genghis Khan, not usually high up the business idol worship list. Khan has gone down in history as perhaps the greatest warrior but Ben focuses on inclusion within his army and how he communicated new practices. The element around inclusiveness and diversity is really interesting and Ben is clear to state that getting it right doesn’t fall to a single “Head of Diversity”. He argues that teams should hire from different background and different talent pools. He uses Khan’s ability to assimilate his enemies armies upon defeat to his advantage as an example.</p><p>The book winds up stating that the main virtues you need in modern business are Trust, Openness to bad news and Loyalty. These are not the only ones as you should decide what is important to you and your team but they are core ones that if not adopted can have dire consequences. He is clear that defining questions that have answers that define who you are will help you to define your culture. “Can this phone call wait til tomorrow?” “Should I go home at 5 pm or 8 pm?”, “Is winning more important than ethics?”.</p><p>The book was a really enjoyable read. I love the mix of history and examples and found a few “aha” moments. Does it help you go and set a culture for a team or an entire company? No. Instead, it makes you think about culture at a much deeper level. You may take nothing actionable away from this book but it makes you think hard about how to get your culture right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=101a6450ff64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding JavaScript’s Destructuring Syntax Through Examples]]></title>
            <link>https://medium.com/better-programming/understanding-the-javascript-destructuring-syntax-through-examples-524c7274a967?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/524c7274a967</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 08:40:21 GMT</pubDate>
            <atom:updated>2021-03-17T14:31:17.743Z</atom:updated>
            <content:encoded><![CDATA[<h4>Array destructuring, object destructuring, and more</h4><figure><img alt="Code on desktop computer" src="https://cdn-images-1.medium.com/max/1024/0*oEK0YLL7jYVySCvB" /><figcaption>Photo by <a href="https://unsplash.com/@ffstop?utm_source=medium&amp;utm_medium=referral">Fotis Fotopoulos</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>.</figcaption></figure><p>JavaScript has the destructuring assignment syntax to allow you to unpack objects and arrays into variables. I still see a lot of code where either the developer is not aware of this language feature or just didn’t use it. The feature was added in ES6 and enables terser code without the loss of intent.</p><p>What follows is a whistle-stop tour of the syntax and how to use it.</p><h3>Array Destructuring</h3><p>Array destructuring allows you to define variables based on the position of elements in an array. A simple example is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0730ddbc2a520186db2f5c4afa65f310/href">https://medium.com/media/0730ddbc2a520186db2f5c4afa65f310/href</a></iframe><p>To destructure array values, you will see that the variables are defined by declaring them in a set of square brackets. They are defined in the order they will be mapped against the array elements. If the variables do not already exist, then you need to prefix the declaration with a let or const. As the position is used to destructure the values from the array, you need to handle the position of values you do not want. You will see there is an empty space declared in the a, e, and g destructuring.</p><p>If you are interested in the first couple of elements in the array, then you can apply a “rest” pattern and combine the remaining elements into a single variable. This is achieved by prefixing the final variable declared with three periods, as shown in the example below:</p><pre>const numbers = [1,2,3,4];<br>const [ one, two, ...remainder ] = numbers;<br><br>console.log(one);       // 1<br>console.log(two);       // 2<br>console.log(remainder); // [3,4]</pre><p>You can use this array destructuring approach with iterables, as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b588cce69f7abb5d1576b56cadb20945/href">https://medium.com/media/b588cce69f7abb5d1576b56cadb20945/href</a></iframe><h3>Object Destructuring</h3><p>Destructuring objects works in a near-identical manner to what we have seen above. Instead of a variable being bound on position, they are bound to object properties, as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8899162fb576b3bc1d340c7ae5b983c/href">https://medium.com/media/b8899162fb576b3bc1d340c7ae5b983c/href</a></iframe><p>An even clearer approach is to use the provided shortcut that works if you give the variables the same names as the properties:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2ca876b792ee434d5faea22f2a24605/href">https://medium.com/media/f2ca876b792ee434d5faea22f2a24605/href</a></iframe><p>You will notice that instead of square brackets, object destructuring uses curly brackets to surround the variable declaration.</p><p>In order to deconstruct more complex objects, such as the address data in the person object, you can nest the declaration of variables in line with the structure of the object. You prefix each block of variable destructuring with the name of the parent property and surround their child declarations with further curly brackets, as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16ebd86a5495fc7e18d39417bf03426a/href">https://medium.com/media/16ebd86a5495fc7e18d39417bf03426a/href</a></iframe><p>You can nest your destructuring of the data as deeply as you want by continuing the pattern, as shown here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d683c265f49d758245d617842ac1474/href">https://medium.com/media/2d683c265f49d758245d617842ac1474/href</a></iframe><h3>Destructuring Defaults</h3><p>If you try to destructure array elements or object properties that don’t exist, your variable will be set to undefined, as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ecb04d806d021c0b204a6cde7af4884a/href">https://medium.com/media/ecb04d806d021c0b204a6cde7af4884a/href</a></iframe><p>If you are unsure of the properties you are destructuring, you can set default values when declaring the variables:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fd096fc84b1cfc7c312fd16ee20be04/href">https://medium.com/media/6fd096fc84b1cfc7c312fd16ee20be04/href</a></iframe><h3>Wrapping Up</h3><p>Hopefully, you can see the benefit of destructuring and how it reduces the number of variable declarations you make to retrieve data from objects and arrays. You can use the syntax in a few ways other than just variable declaration.</p><p>You can define a function to accept a single object as a parameter and use the destructuring syntax to pull the actual values from the object that you need:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/415186afc79fdf96bd4a83ae902065b5/href">https://medium.com/media/415186afc79fdf96bd4a83ae902065b5/href</a></iframe><p>You can also use the syntax to handle returning multiple values from a function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81e256472fb57932527e8e7071225bb2/href">https://medium.com/media/81e256472fb57932527e8e7071225bb2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=524c7274a967" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/understanding-the-javascript-destructuring-syntax-through-examples-524c7274a967">Understanding JavaScript’s Destructuring Syntax Through Examples</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Environments When Building Sites With Jekyll]]></title>
            <link>https://amcrouch.medium.com/configuring-environments-when-building-sites-with-jekyll-dd6eb2603c39?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd6eb2603c39</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[jekyll]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Thu, 25 Feb 2021 08:49:37 GMT</pubDate>
            <atom:updated>2021-02-25T08:49:37.422Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*uW9s3PgmhO4a-Vsd.jpg" /></figure><p>I love static sites for many reasons and <a href="https://jekyllrb.com/">Jekyll</a> is still a firm favourite when I need to throw together a simple site. One thing I hadn’t hit with Jekyll before was handling different environment settings and basic secrets. As with most things it was easy if not obvious at first how to handle it. There was also not much reference material other than the documentation. So here is a simple overview.</p><h3>Setting Up &amp; Configuring Your Configuration Files.</h3><p>Jekyll gives you the ability to specify what configuration files are processed at build time via the <em>-c</em> command line switch. If you use this then you can pass an argument that is a comma-separated list of configuration files. So to add one or more additional configuration files you:</p><ul><li>Create your secret/environment file. This file should be stored at the root of your project (i.e. the same level as <em>_config.yml</em>). I called mine <em>_environment.yml</em>. This is a standard YAML file which you can add key-value pairs such as:</li></ul><pre>service-url: &quot;https://url-to-this-environments-service&quot; user-name: &quot;A User&quot;</pre><ul><li>Add the new file(s) to your .gitignore file:</li></ul><pre>_site</pre><pre>.jekyll-cache</pre><pre>_environment.yml</pre><ul><li>Start your site. Depending on your environment the command can start to get quite long. I generally create a script to start sites locally:</li></ul><pre>#!/usr/bin/env bash set -euo pipefail bundle exec jekyll serve -c _config.yml,_environmet.yml --watch --future --livereload</pre><p>The other command switches here provide hot reloading of changes (<em>livereload</em>) which occurs when Jekyll rebuilds automatically on file changes (<em>watch</em>). If you have dated content then the <em>future</em> will allow you to see the content locally before the publish date.</p><p>So far all really easy. When you come to build your site for publication you can just update the build command to include the</p><pre>$ jekyll build -c _config.yml,_environmet.yml</pre><h3>Using Your New Configuration Values.</h3><p>Variables added to these configuration files can be accessed via the <em>site</em> <a href="https://jekyllrb.com/docs/variables/">liquid variable</a>. This means they can be added to pages very easily using the standard pattern.</p><p>If you need to use these variables in your JavaScript or CSS then don’t forget you can preprocess these files just by adding frontmatter markup to the top of your files such as:</p><pre>--- layout: null ---</pre><p>This means you can access the variables from these configuration files using the same markup as above.</p><pre>$.getJSON(&quot;{{ site.ENVIRONMENTVARIABLE  }}&quot;, function (data) {};</pre><p>The popular static site hosts all provide ways to handle these configuration files so make sure you check out their documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd6eb2603c39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Sony WF-1000XM3 Bluetooth Earbuds On Linux]]></title>
            <link>https://amcrouch.medium.com/configuring-sony-wf-1000xm3-bluetooth-earbuds-on-linux-f3079eafb0f8?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3079eafb0f8</guid>
            <category><![CDATA[bluetooth]]></category>
            <category><![CDATA[sony]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[headphones]]></category>
            <category><![CDATA[manjaro]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 10:06:43 GMT</pubDate>
            <atom:updated>2021-02-18T10:10:15.096Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*s7k4jIL2NEe2KSg8.jpg" /></figure><p>I spend a lot of time wearing headphones. This is for a couple of reasons. The first is that working remotely means I talk a lot on video calls with my team and clients. The second is that when I am not talking I am devouring almost any type of music while I work.</p><p>For the last year, I have been using some <a href="https://www.taotronics.com/products/tt-bh060-active-noise-cancelling-headphones">Taotronics Sound Surge 60</a> over-ear headphones. These are noise cancelling, Bluetooth over-ear headphones that I tried to see if I like that style of headphones. They cost about £60 on Amazon when I got them and the sound and battery life have been great. But, when we had warmer weather last summer I found one issue, they are really hot when worn for eight hours straight.</p><p>So, I decided to look for some lighter, earbud-style, headphones. I did have a pair of <a href="https://www.taotronics.com/products/tt-bh053-true-wireless-earbuds">Taotronics Sound Liberty 53’s</a>, again a cheap pair from Amazon. The trouble with these was that the fit was just horrible and the sound was really weak compared to the Sound Surge 60’s. So, after researching what people thought were the best earbuds, I brought some <a href="https://www.sony.co.uk/electronics/truly-wireless/wf-1000xm3">Sony WF-1000XM3</a> in black. I opted for these as the reviews were glowing and in particular raved about the fit and sound. They are indeed a great set of earbuds and the fact they provide a variety of tips to suit all ear fitments is brilliant. The sound and noise-cancelling are just as good as a pair of over-ear headphones.</p><p>As always, it is fun to pair new Bluetooth gadgets up with Linux. While the situation is a lot better of late, it is not always straightforward. I have Blueberry installed in i3 to handle Bluetooth management and it has worked well with both sets of the Taotronics. The Sony’s would show up in Blueberry and even look like they are connected but I would get no sound.</p><p>So slipping back into 2015 I hit the terminal and hit up bluetoothctl:</p><p>$ bluetoothctl</p><p>bluetooth# power on bluetooth</p><p># agent on bluetooth</p><p># default-agent bluetooth</p><p># scan on</p><p>At this point, you will see the available devices to pair with scrolling on the screen. Enable pairing on the earbuds and then enter:</p><p>bluetooth# pair XX:XX:XX:XX:XX:XX:XX</p><p><em>(replace XX:XX:XX:XX:XX:XX:XX with the id for the ear-buds as shown on the screen. You can type the first few characters and then tab and it should select the right id.)</em></p><p>Once the paired message is displayed then type:</p><p>bluetooth# trust XX:XX:XX:XX:XX:XX:XX bluetooth</p><p># connect XX:XX:XX:XX:XX:XX:XX</p><p><em>(Again use the earbuds id)</em></p><p>At this point, you should hear the “connected” message in the earbuds. You can now exit bluetoothctl.</p><p>I have found that once you have done this once, connecting via Blueberry works fine.</p><p>I have been really happy with the WF-1000XM3 earbuds. One of the main issues for me when looking for earbuds was the battery life and I have found no issue here. They easily last an average day for me and if I slip them off then I put them in the case which can hold up to three days charge. The sound is brilliant and I don’t feel like my ears ache after a day wearing them.</p><p>If only Linux Bluetooth was as painless.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3079eafb0f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Serverless React Forms Using React Hook Form & Getform.io]]></title>
            <link>https://amcrouch.medium.com/building-serverless-react-forms-using-react-hook-form-getform-io-8f3e10633f1c?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f3e10633f1c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Tue, 09 Feb 2021 09:08:05 GMT</pubDate>
            <atom:updated>2021-02-09T09:08:05.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*e26Iykddz89JQ_tU.jpg" /></figure><p>The speed of development you can achieve using serverless architectures and services can be mind-boggling. For small projects, having the ability to connect several services, each having a specific purpose, is very powerful. Recently, I built an MVP that used <a href="http://getform.io/">GetForm.io</a> and <a href="https://zapier.com/">Zapier</a> to connect a <a href="https://www.gatsbyjs.com/">GatsbyJS </a>web app to <a href="https://mailchimp.com/">Mailchimp</a>. The whole process took just a couple of hours.</p><p>The aim of the project was to build a long contact form which collected a lot of information from the user. As the web project was built in GatsbyJS, I was building a React form. Small forms in React are straightforward and it is trivial to handle validation. When you build larger forms with many fields, each of which has different validation rules, it is easy for your code to run away from you.</p><h3>React-Hook-Form</h3><p>After a search to see if there were any packages that would help make it easier to build the form, I found <a href="https://react-hook-form.com/">React Hook Form</a>. Its strapline was “Performant, flexible and extensible forms with easy-to-use validation.” It sounded exactly what I needed. I was able to build the form using standard HTML controls. React Hook Form can register and track the form fields using a registration mechanism using the <em>ref</em> attribute of your controls. They provide easy access to validation errors and as a nice touch, you can “watch” your field values in the console while building and debugging your forms.</p><p>To get started, add react-hook-form to your project:</p><pre>$ npm install react-hook-form</pre><p>A very basic example form component would look similar to this:</p><pre>import * as React from &quot;react&quot;;<br>import { useForm } from &quot;react-hook-form&quot;;</pre><pre>export default () =&gt; {<br>  const { handleSubmit, register, watch, errors } = useForm();</pre><pre>  const onSubmit = (data) =&gt; console.info(data);</pre><pre>  console.info(watch(&quot;firstName&quot;));<br>  console.info(watch(&quot;lastName&quot;));<br>  console.info(watch(&quot;age&quot;));</pre><pre>  return (<br>    &lt;form onSubmit={handleSubmit(onSubmit)}&gt;<br>      &lt;input name=&quot;firstName&quot; ref={register({ required: true })} /&gt;<br>      {errors.firstName &amp;&amp; &lt;span&gt;First Name Is Required&lt;/span&gt;}</pre><pre>      &lt;input name=&quot;lastName&quot; ref={register({ required: true })} /&gt;<br>      {errors.lastName &amp;&amp; &lt;span&gt;Last Name Is Required&lt;/span&gt;}</pre><pre>      &lt;input name=&quot;age&quot; defaultValue=&quot;21&quot; ref={register()} /&gt;</pre><pre>      &lt;input type=&quot;submit&quot; /&gt;<br>    &lt;/form&gt;<br>  );<br>};</pre><p>As you can see in the above example:</p><ul><li>We import react-hook-form.</li><li>We define the methods we need using useForm().</li><li>We define an <em>onSubmit</em> handler to fire when a user submits the form. This will receive a <em>data</em> parameter from the hook and you can still define an <em>e</em> parameter to access the target form if you need to.</li><li>We then define the form. For the <em>onSubmit</em> form handler, we pass in the <em>handleSubmit</em> hook method, passing in our own <em>onSubmit</em> event handle that we have defined.</li><li>We then just define our form fields as we would but we register them by applying a <em>ref</em> attribute which is used to register the field to the form. This is done by calling the <em>register</em> method passing in any validation rules that need to be applied. All fields need to have a unique <em>name</em> attribute applied.</li><li>Validation errors are handled via the <em>errors</em> object and each registered field becomes a property to the object. You can see in the first and last name fields I have made them mandatory and if the form is submitted without them being completed the associated validation message are displayed.</li></ul><p>When the <em>onSubmit</em> handler fires all of the data in your form is passed as the <em>data</em> parameter. This means you are free to process it as you need. The <em>watch</em> method I have used above is a useful utility to allow you to track and test your code as you develop it. By passing in the name of the field you want to watch, you can see in real-time the changes as you type them in your form in your browser dev tools.</p><p>You should read the documentation in full <a href="https://react-hook-form.com/api">here</a> to find out what else is possible using React Hook Form.</p><h3>Getform.io</h3><p>GetForm.io is a really simple service that provides a flexible way to store form data from your site. I have used it in multiple projects for collecting email addresses or contact form data. It works by allowing you to set up a form which has a unique endpoint. You apply the endpoint using the <em>action</em> attribute on your form and ensuring that the <em>method</em> attribute is set to “POST”. This will then post your form data straight to your form in GetForm.io. You can then export your data or set up integrations to automatically sync it with other applications or databases. It is so simple they have an example on their <a href="http://getform.io/">Home Page</a>.</p><p>They also have an API which can be used to fire your data into your form which is what I opted to use in my lengthy contact form. The code below shows how this would work in a scaled-down manner.</p><pre>import axios from &quot;axios&quot;;<br>import * as React from &quot;react&quot;;<br>import { useForm } from &quot;react-hook-form&quot;;</pre><pre>export default () =&gt; {<br>  const [serverState, setServerState] = useState({ submitting: false, status: null });</pre><pre>  const handleServerResponse = (ok, msg, form) =&gt; {<br>    setServerState({ submitting: false, status: { ok, msg } });</pre><pre>    if (ok) {<br>      // show success message<br>      // handle success next steps<br>      return;<br>    }</pre><pre>    // show failure message<br>    // handle failure next steps<br>    return;<br>  };</pre><pre>  const onSubmit = (data, e) =&gt; {<br>    const formData = new FormData();</pre><pre>    for (var field in data) {<br>      formData.append(field, data[field]);<br>    }</pre><pre>    setServerState({ submitting: true });</pre><pre>    // replace the url parameter with your own GetForm.io form id/url<br>    axios({<br>      method: &quot;post&quot;,<br>      url: &quot;https://getform.io/f/11111111-aaaa-1111-aaaa-111111111111&quot;,<br>      data: formData,<br>    })<br>      .then((r) =&gt; {<br>        e.target.reset();<br>        handleServerResponse(true, &quot;Form Submitted&quot;, e);<br>      })<br>      .catch((r) =&gt; {<br>        handleServerResponse(false, r.response.data.error, e);<br>      });<br>  };</pre><pre>  const { handleSubmit, register, watch, errors } = useForm();</pre><pre>  console.info(watch(&quot;firstName&quot;));<br>  console.info(watch(&quot;lastName&quot;));<br>  console.info(watch(&quot;age&quot;));</pre><pre>  return (<br>    &lt;form onSubmit={handleSubmit(onSubmit)}&gt;<br>      &lt;input name=&quot;firstName&quot; ref={register({ required: true })} /&gt;<br>      {errors.firstName &amp;&amp; &lt;span&gt;First Name Is Required&lt;/span&gt;}</pre><pre>      &lt;input name=&quot;lastName&quot; ref={register({ required: true })} /&gt;<br>      {errors.lastName &amp;&amp; &lt;span&gt;Last Name Is Required&lt;/span&gt;}</pre><pre>      &lt;input name=&quot;age&quot; defaultValue=&quot;21&quot; ref={register()} /&gt;</pre><pre>      &lt;input type=&quot;submit&quot; /&gt;<br>    &lt;/form&gt;<br>  );<br>};</pre><p>The changes here are very straightforward:</p><ul><li>I define a state variable <em>serverState</em> to track when the form is waiting for the server to respond. This is useful to control UI elements when posting your data.</li><li>I update the <em>onSubmit</em> function to receive the <em>e</em> parameter to be able to access the form. I also create a new <em>FormData</em> object and populate it with the fields passed in the <em>data</em> parameter.</li><li>I then use an axios promise to post the form data to my GetForm.io form (remember to use the correct url as specified in your form settings) and handle the response accordingly.</li><li>In the example, I define a <em>handleServerResponse</em> function which takes some params for me to handle the axios response. In my real-world example, I used this function to show a notification to the user for example. The important thing to note is to ensure you update the <em>serverState</em> variable. You can also see I use the <em>e</em> param in the <em>then</em> promise handler to reset the form back to its original state.</li></ul><h3>Zapping GetForm.io To Mailchimp</h3><p>Once the form was working and the data was saving to GetForm.io all that was left was to ensure that when a user submitted the contact form that they received a Thank You email. This was already set up on Mailchimp which was being used for automated email workflows. I set up a Zapier Zap to connect my GetForm.io form and the Mailchimp account. This approach is really flexible and allows you to select the fields that you want to sync with your Mailchimp audience.</p><h3>Wrapping up</h3><p>I really like React Hook Form as it makes stuff super simple and form building can be a horrible task no matter what your tech stack. I still have ASP related nightmares even after all of this time.</p><p>I am really just scratching the surface of what you can do with serverless architecture, there is a so much more available. The power for me in using these services is being able to quickly prototype and get running functionality that previously could have taken a few days previously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f3e10633f1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reap The Benefits Of Include Junior Team Members In Your Code Review Process]]></title>
            <link>https://amcrouch.medium.com/reap-the-benefits-of-include-junior-team-members-in-your-code-review-process-c4fad44c49e7?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4fad44c49e7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[code-review]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 11:26:49 GMT</pubDate>
            <atom:updated>2021-02-12T23:57:17.817Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reap The Benefits Of Including Junior Team Members In Your Code Review Process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*YpiQaZ7iW-xqhwjN.jpg" /></figure><p>Code reviews are a vital part of running a development team. Once you get past developer number one, its vital to ensure you have an agreed code review checklist and factor time into your workflow to ensure you review all code. I would argue that if you work as a lone developer, you should go back periodically and review code written more than two weeks ago. It is amazing when I do that the things I spot.</p><p>A lot of articles exist detailing how to review code and best practices. Ensuring that the requirements have been met, that there are no logic or security issues introduced by the changes and that the code adheres to the in-house style guide are top of most code review checklists. One thing often missed with peer code reviews is that it is an opportunity for learning.</p><p>Lots of teams state only a more senior or experienced member of the team is to review pull requests. They do not think about the more junior members of a team reviewing code of the seniors. On the surface this makes sense. You hope that your seniors are capable of recognizing issues and maintaining a high standard in your codebase.</p><p>This approach is flawed for a couple of reasons. The first is that you add an increasingly significant burden on your senior developers as your team grows. You reduce the capacity of your sprints and limit the time within them to focus on larger “big picture” changes to your product. Not only that but I have seen senior developers struggle to maintain enthusiasm for code reviews as time goes on and this leads to a reduction of effectiveness.</p><p>By enabling more junior members of your team to undertake code reviews you can shift that burden across the team. This has many benefits. If a change is simply adding fields to a form, for example, there is less risk than a change which integrates with a third party API. A non-senior team member should be capable of ensuring that the changes work, that it follows your style guide and that it has supporting tests that are sensible and passing. It also allows them to feel part of the whole process and I have found that has a measurable effect on how they engage in stand-ups and work within the team.</p><p>What I would not suggest is that a non-senior member of the team reviews code written by a senior. A large scale architectural change or a brand new feature that has an impact across the whole codebase needs to be reviewed by a peer at a similar level. These big picture style changes absolutely have to be checked for security and logic issues and impact on existing code. But, the key thing to consider here is to allow more junior team members to still review the pull request as a learning opportunity. A team is only as strong as the knowledge within it. Each developer can not only learn about the new feature or the code added in the pull request, but they should also be encouraged to ask questions and learn about the how and why behind the request as well.</p><p>By allowing your less senior developers to be a part of the whole development process your team wins on many levels. You spread the burden of reviews across your team which means your senior members can add more value in any given sprint. You decrease the risk of harming the enthusiasm of your senior developers and you enable the less senior members of the team to learn and grow their knowledge. This can only benefit your team as a whole. You reduce the risk of developers leaving, you increase your sprint capacity and you engage and empower the lower two-thirds of your team. So if you have a good code review process already which is geared towards top-down reviews, think about how you can change it to benefit the whole team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4fad44c49e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Easy, Reliable Backups On Linux In 5 Minutes Using Cronopete]]></title>
            <link>https://amcrouch.medium.com/setting-up-easy-reliable-backups-on-linux-in-5-minutes-using-cronopete-97806405ada8?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/97806405ada8</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[how-to]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Thu, 14 Jan 2021 09:53:49 GMT</pubDate>
            <atom:updated>2021-01-14T09:53:49.295Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*v1J3eBhEGSbE61Ir.jpg" /></figure><p>Late last year I experienced my first fatal failure under Linux for a very long time. I was restoring a project to work on and updating the Jekyll framework which was refusing to play nicely. I applied a recommended fix from the Manjaro repo’s and my laptop froze. Upon rebooting it just panicked and refused to boot.</p><p>This wasn’t a huge problem I thought, I will just reinstall and apply my dotfiles and be up and running. Only, what the experience taught me is that it is never that simple. Since switching to my latest work laptop I had not bothered setting up local backups. Why? Well, all my vital data now lives in one of two clouds and although I have local copies recovering that is easy. What you forget are all the small settings, fixes and changes you make bit by bit, day by day as you go about your work.</p><p>Getting the OS installed took 15 minutes and the first thing I wanted to set up was local backups. I read up on the latest state of Linux backup solutions and opted for <a href="https://rastersoft.com/programas/cronopete.html">Cronopete</a>. The application is a clone of Apples Time Machine and it is simple to set up and running. Once installed, open the application and select a backup location. I chose an external hard drive and opted to back up all files in my home directory (including hidden files). I set the option to back up every hour and set it off on it’s first back up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*xgb5EGla4TsVSnKn.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/0*Izg-KNej4jAGpgF7.jpg" /></figure><p>To be honest I thought it would have taken quite a while on the first back up but it had my drive replicated in less than 15 minutes. Cronopete keeps files on the following basis:</p><ul><li>One copy per hour is kept for the last 24 hours.</li><li>One daily copy for the last 15 days.</li><li>One weekly copy for the rest.</li></ul><p>If you need to recover the files you can select the “Restore Files” option from the applications system tray menu. This brings up what is a functional UI (not the best) which allows you to choose the date at which to restore your files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*TRT2PhqRYbA4g4ov.jpg" /></figure><p>Given how quick and easy it was to set up, you’d be foolish not to have Cronopete set up to provide you peace of mind that you can recover any file you need when you need it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97806405ada8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Impact Of Not Including A README File]]></title>
            <link>https://amcrouch.medium.com/the-impact-of-not-including-a-readme-file-b5bfcb84c81e?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5bfcb84c81e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[professional-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Tue, 12 Jan 2021 11:14:56 GMT</pubDate>
            <atom:updated>2021-01-12T11:14:56.193Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Wr-8Nr4d6gfN86xh.jpg" /></figure><p>Over the last week, I have looked at the code for four projects at <a href="https://www.platform-eight.com/">Platform Eight</a>. There was a common thread across the projects and that was a complete lack of documentation. This seems to be an ongoing problem across nearly all of the projects I have been involved in over the last year and it needs to stop.</p><p>Now I know that as developers and creators we hate documentation and I get that. The dream of writing code that is so prose-like that no documentation is required is still just a dream. Even small projects are much more than just code. This post isn’t a rant about a lack of functional documentation or schematics. Agile rightly attempts to limit this.</p><blockquote><em>At a minimum, every project needs an up to date, relevant README file.</em></blockquote><h3><strong>What Is A README File</strong></h3><p>A README file is a file written using <a href="https://daringfireball.net/projects/markdown/">Markdown</a> syntax. It is used to convey some basic information about your project and how it works. Details such as how to clone it, required software or libraries and how to build and get the project running. The README is usually found in the root of the project folder. Git-based source control systems such as GitHub use this content. They display it when you land on the projects hosting page.</p><h3>The Difference Between A Good And Bad README File</h3><p>Stop and think about how you mentally feel when searching for projects on GitHub. Do you trust the projects that have no details on their page? Or do you find yourself more trusting of the pages with lots of helpful details and screenshots?</p><p>Private, commercial, projects are no different. Git allows me to see who has worked on a project. Their reputation to me is influenced in the same way as you are influenced when landing on a GitHub project. The impact on the reputation of software teams and dev houses is even greater. When being paid to start a project with a view to handing it back, the lack of a README or any basic project document is damaging. I would advise any client to demand this document in any agreed contract or agreement or withhold payment until it is produced.</p><p>Why? Well, there are a couple of trains of thought here. The first is developer productivity. If another developer takes over a project they want to be up and running with the code ASAP. They don’t want to spend their time figuring out how they need to configure their machine. What version of the stack should they be running? Which libraries and versions need to be installed? Some frameworks make this a trivial matter. But some allow you to set up projects and environments in various ways. Again this matters if you transfer a project between developers or teams and you are paying a day rate. You are effectively doubling your costs. The other thought is that if the developer(s) can not be professional enough to add a README then what state is the code in? That might seem a harsh comment and is not always the case but it carries merit.</p><p>As always you might want to think of it from an investment point of view as well. If you have to go through a Due Diligence process with no basic documentation then you will need to defend that.</p><p>Here is a great template from <a href="https://gist.github.com/PurpleBooth/109311bb0361f32d87a2">GitHub</a>. If you need to, go and copy it and fill in the blanks. Don’t be the developer or team that tries to hide or use your project knowledge for financial or reputational gain. It just makes you look bad.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5bfcb84c81e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A High-Level Introduction To Tailwind CSS]]></title>
            <link>https://amcrouch.medium.com/a-high-level-introduction-to-tailwind-css-1728ebc60f59?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/1728ebc60f59</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 08:22:00 GMT</pubDate>
            <atom:updated>2020-12-18T08:22:00.269Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*iK5GVpCbOgHtlKx7.jpg" /></figure><p>The last few projects I have built have been either <a href="https://reactjs.org/">React</a> or <a href="https://www.gatsbyjs.com/">Gatsby</a> based. When setting up these projects I wanted a fast and simple way to apply a consistent and maintainable style system for them. There are different ways to define styles when building components, from inline styles and CSS stylesheets through to <a href="https://cssinjs.org/?v=v10.5.0">CSS-in-JS</a>. On top of these foundations has grown a wide array of libraries and tools to help developers define and manage their project styles. From <a href="https://sass-lang.com/">Sass</a> which extends the CSS language through to frameworks such as <a href="https://getbootstrap.com/">Bootstrap</a>. I could have gone with any of these for my projects but I didn’t.</p><blockquote><em>Instead, I have gone to a happy place by using Tailwind CSS.</em></blockquote><h3>First, Some History</h3><p>CSS is easy to write and even easier to allow to grow into a mess. On small projects with limited resources, it is not so much of a problem but when the codebase grows it can be hard to keep your CSS under control. It’s a problem that seems to become linearly harder based on the number of developers on the project. There have been many attempts from projects trying to govern how CSS should be written and applied in code. It would seem that any developer that has written on the subject has at least 3 suggestions about how to solve the problems that CSS causes.</p><p>The most logical of the previously suggested approaches was <a href="http://getbem.com/introduction/">BEM</a>. This stands for Block, Element and Modifier. This is a great way to structure your HTML and CSS but it requires you to be consistent and does not provide much in the way of tooling to help you. This brings us to the biggest issue with almost all styling approaches, humans. On large projects knowledge transfer is hard, developers will struggle to maintain convention-based code that a compiler will ignore. You will end up with a lot of duplicate code and implementing a consistent UI/UX style becomes way more work than it should be.</p><h3>What Is Tailwind?</h3><p><a href="https://tailwindcss.com/">Tailwind CSS</a> is a utility first CSS framework which aims to provide an API for your design system.</p><p>The main difference between Tailwind and other frameworks is that it provides a default set of helper style classes and an adaptable configuration approach but does not provide ready to use components. Instead, by working at a lower level, you apply the helper classes directly to your elements to quickly build your own components. Tailwind is completely unopinionated and its configuration is highly flexible to allow you to build and include only the features that you need.</p><h3>Getting Started</h3><p>Tailwind has brilliant documentation. Probably some of the best I have seen across both Open Source and commercial products. Follow their <a href="https://tailwindcss.com/docs/installation">installation guide for your project type</a> to get Tailwind set up and ready to use.</p><p>Once installed, you will have created a tailwind.css.js configuration file which sits at the root of your project. This will be used to configure the styles and elements to include at build time.</p><p>You will also need to include the following in your CSS file. These are placeholders for the build process which will generate the required styles and inject them into your CSS file.</p><p>@tailwind base; @tailwind components; @tailwind utilities;</p><h3>Using Tailwind</h3><p>Tailwinds utility classes can be used directly within the HTML as shown on the snippet below</p><figure><img alt="An example of adding Tailwind CSS utility classes to a block of HTML" src="https://cdn-images-1.medium.com/max/1024/1*cGkaqJix-4lV9_AvGpkYpg.png" /></figure><p>So what are we doing here? Lets first look at the div definition.</p><figure><img alt="Using Tailwind CSS to style a div HTML element" src="https://cdn-images-1.medium.com/max/1024/1*J0TDVbZhC80fGwAPY88BfQ.png" /></figure><p>We are defining a div element to act as a container and we are applying the <em>container</em> utility class. This sets the div’s width to a fixed size based on the current screen breakpoint. To centre the fixed size container, we apply the <em>mx-auto</em> utility class. <em>m</em> prefixed utility classes control margin’s and the <em>x</em> means we want to control the horizontal margins. By using the <em>auto</em> modifier we are providing an equal margin on the left and the right of the container so that it becomes centred in the total screen area. Finally, we are applying a full border to the container using the <em>border</em> utility class and specifying the colour of the border using the <em>border-blue-500</em> utility class.</p><figure><img alt="Using Tailwind CSS to style a HTML header" src="https://cdn-images-1.medium.com/max/1024/1*fM6a4UKB3Jp4ba2QbCHehg.png" /></figure><p>Tailwind provides several utility classes that make working with text simple. In the h1 snippet above we are using the <em>text</em> prefixed utility classes to increase the size of the text to <em>xx-large</em> and to make the text red. The <em>–500</em> modifier is used to specify the shade of red to apply based on your configuration. The colour pallet used in Tailwind can be fully customised and provides 9 shades for each colour which can be accessed by the <em>-100</em> to <em>-900</em> modifiers. The <em>font</em> prefixed modifier is used to make the text bold.</p><figure><img alt="Using Tailwind CSS on a HTML button" src="https://cdn-images-1.medium.com/max/1024/1*DjKm9gC-W1W1lqfAAfSEVg.png" /></figure><p>Tailwind is designed to support responsiveness out of the box and fully supports variants as a way to work with pseudo-classes. This can be seen in the button snippet above. We start by using the <em>w</em> utility class to specify a width for the button. Tailwind provides a large number of predefined widths and heights (using the <em>h</em> prefixed modifiers). We then define the background and text colours using the <em>text</em> and <em>bg-blue-500</em> class variants. These are the standard styles applied to the element. To change the colours of the background and text when we hover over the button element we define secondary colour classes and prefix them with the <em>hover</em> variant modifier.</p><p>The <a href="https://tailwindcss.com/docs">Tailwind</a> documents show what a broad selection of utility classes they provide.</p><h3>Really Useful Resources For Tailwind</h3><p>The following are a bunch of really useful rearouses and links I found when picking up and building things with Tailwind:</p><ul><li><a href="https://tailwindcss.com/docs">Tailwind CSS Documentation</a> — Excellent quality documentation that explains everything in great detail.</li><li><a href="https://play.tailwindcss.com/">Simple Tailwind CSS Playground</a> — A really simple playground with IntelliSense to allow you to trail styling elements with Tailwind.</li><li><a href="https://nerdcave.com/tailwind-cheat-sheet">Tailwind CSS Cheat Sheet</a> — A condensed cheat sheet that provides a great quick reference for the utility classes.</li><li><a href="https://tailwindgrids.com/#/">Tailwind Grid Generator</a> — A useful utility to generate Flex-based grids.</li><li><a href="https://tailwindcomponents.com/">Tailwind Components</a> — A site full of components developed in HTML and Tailwind that you can use in your project or for reference.</li><li><a href="https://www.tailwindtoolbox.com/">Tailwind Toolbox</a> — A second site of ready to go templates and components.</li></ul><h3>Wrapping Up</h3><p>Tailwind is quick to pick up and it is so intuitive that when you switch back to a project that is not using it, you really miss it. It is not an infallible system and I am sure that some projects may still struggle with their CSS by using it. But, by mixing it with other tools available (such as <a href="https://emotion.sh/docs/introduction">Emotion</a> or <a href="https://storybook.js.org/">Storybook</a>), developing a design system has become a lot easier to implement and manage. I will be pushing for Tailwind at the start of all projects going forward so I can stay in my happy place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1728ebc60f59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Professional Courtesy Regarding Knowledge Transfer From Outsourced Teams]]></title>
            <link>https://amcrouch.medium.com/professional-courtesy-regarding-knowledge-transfer-from-outsourced-teams-dd7a3f7832a5?source=rss-5b7f573b5e68------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd7a3f7832a5</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[outsourced-team]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[professional-development]]></category>
            <category><![CDATA[knowledge]]></category>
            <dc:creator><![CDATA[Andy Crouch]]></dc:creator>
            <pubDate>Wed, 16 Dec 2020 08:21:42 GMT</pubDate>
            <atom:updated>2020-12-16T08:24:07.013Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*MoZE2WqDACkxrqwq.jpg" /></figure><p>I have looked at a lot of projects over the last year for clients of all sizes at <a href="https://platform-eight.com/">Platform Eight</a>. One of the trends I have seen in a lot of the projects is the failure to provide adequate handover documentation from outsourced teams. In some cases, there has been none.</p><p>This is not acceptable. When a business outsources development work they are entrusting the outsource team to deliver in a professional, timely manner. They are buying the expertise offered by the outsource team and have every right to expect the work to be completed to an acceptable level. This is why they are happy to pay outsource team rates. Outsource teams do project work as a matter of course. The expectation should be that they will not build an ongoing relationship with the business and therefore, they should hand over each project like that is the end of the partnership. A full knowledge transfer should be completed.</p><p>On more than one occasion I have taken on a project and found at least one of the following problems:</p><ul><li>The wrong repositories have been shared with the client.</li><li>The right repository is shared but there is no README to provide a summarized view of how to get the project running locally.</li><li>The commit history is full of one-word commit messages that provide no context or reason for a change or addition.</li><li>There has been no handover of updated project assets, plans or documentation.</li><li>There is no deployment documentation explaining the “where” and “why” around how one or more services is deployed.</li></ul><p>This has to stop. There is already a distrust of technology teams and consultants and getting the simple stuff wrong is just amateur.</p><h3>README Files</h3><p>Each code repository <a href="https://www.amcrou.ch/include-a-readme">should include a README file</a> in the root of the project. The quality of the README can be a good indicator of the quality of the project. The aim of the file is to explain the project, provide an overview of how it is built and how to run it.</p><p>Like almost everything else these days, there are a lot of articles and guides on how to write a good README. For me, I would suggest that a README file should allow a new developer on the project to:</p><ul><li>Understand the aim of the project through a descriptive summary.</li><li>Understand how to clone the project and install the required dependencies.</li><li>Understand how to set up the project to run locally.</li><li>Understand if any related projects are needed and the dependencies between the projects.</li></ul><p>For open-source projects, having the developer contacts and licence information is also required. Maintenance of the README file is important to ensure it stays relevant. This should be part of your code review process. Overly long README files that are not maintained or which are hard to read provide little value.</p><p>Given that most cloud-based Git services will generate a README when you set up a project there is no excuse to not have one. Or worse, have a blank one. If you need help or inspiration in creating a README then the following links might be of use:</p><ul><li><a href="https://www.makeareadme.com/">Make A Readme</a></li><li><a href="https://github.com/matiassingers/awesome-readme">Awesome README</a></li></ul><h3>Commit Messages</h3><p>When code is being developed, the changes will be added to Git source control. There is an <a href="https://www.amcrou.ch/git-commit-message-etiquette">acceptable standard for the messages</a> that should be added to each commit. Again, I instil a standard that I expect from each outsourced team at the start of a project. While developers may argue that it takes time to write meaningful commit messages, I disagree. When the developer writes the message, the work is fresh in their mind. They have the opportunity to share the change, the context and the reasons they have made the changes they have. This again builds up into valuable knowledge that may not be captured elsewhere.</p><h3>Knowledge Transfer</h3><p>Knowledge is power and in the case of the technology powering a business, the difference between success and failure. If you opt to outsource some technical development then you must have a defined outcome and expected set of assets that you must be provided. Be clear on these when you start the project and enforce receipt of them on completion. As a minimum I would expect:</p><ul><li>Access to all code repositories. You need to ensure you have access to all code repository’s that were created or used in the project. All code branches should be pushed to whichever cloud service that was used as origin. Each repository should have a README and all code and deployment-related assets.</li><li>A deployment plan. A top-level diagram of the deployment of the application plus a detailed document covering the underlying services used and their configuration. This should also detail how to set up the deployment from scratch, any external services used for monitoring or error tracing and details of the database (schema, security and roles etc).</li><li>Credentials &amp; Secrets. Ideally, you will set up a centralised password and secret tool to share and keep passwords, API keys and third party service access routes.</li><li>Design Assets. All design work and generated assets such as image files and videos.</li><li>Sprint data. You should be using a work planning tool such as Jira or Trello to log the agreed work. Once the project is over you should retain access or have that data exported so no knowledge is lost.</li><li>Full IP Ownership. Once the project is completed then you should have a document confirming that all IP is transferred to you. This usually is included in the contract. However, I have worked on projects where the outsource team have used in-house developed libraries or systems and you should insist that you retain ownership of this code. If that is not possible then you need to decide on how to proceed but I would recommend at the very least that you agree on a maintenance &amp; licencing basis to ensure you receive all future updates</li></ul><p>None of the above assets should be chargeable by an outsourced team as they are part and parcel of every professional software project. They are core elements that all projects should contain to ensure that knowledge can be transferred between developers and teams regardless of if they are in-house or outsourced.</p><p>I make a point at the start of each relationship with an outsourced team to ensure that they know what my expectations are regarding a handover at the end of the project. For non-technical founders and startups that entrust outsource teams, they do not know what to expect upon delivery as in many cases this might be their first time running a technical partnership. Don’t be the team that fails to provide a full handover, do the right thing and raise the standard.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd7a3f7832a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>