<?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 James Ivings on Medium]]></title>
        <description><![CDATA[Stories by James Ivings on Medium]]></description>
        <link>https://medium.com/@jamesivings?source=rss-ab23677a6c60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*neDHQRQjUvGkxSLY.jpeg</url>
            <title>Stories by James Ivings on Medium</title>
            <link>https://medium.com/@jamesivings?source=rss-ab23677a6c60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:31:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jamesivings/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[A new version is available!]]></title>
            <link>https://medium.com/releasepage/how-to-update-your-running-web-app-babb03db4f7d?source=rss-ab23677a6c60------2</link>
            <guid isPermaLink="false">https://medium.com/p/babb03db4f7d</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[James Ivings]]></dc:creator>
            <pubDate>Wed, 10 May 2017 06:56:19 GMT</pubDate>
            <atom:updated>2017-05-21T07:28:36.404Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to update your running web-app</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*0ljskixh5IzjuGEB5_GK0Q.png" /></figure><p>So you’re doing continuous deployment right? If not, why not? The benefits are <a href="https://dzone.com/articles/benefits-of-continuous-deployment">demonstrably huge</a>.</p><p>In my previous article I spoke about <a href="https://medium.com/releasepage/the-three-laws-of-continuous-delivery-65033ac0e990">the three laws to ensuring successful continuous delivery</a>. Here we’ll be looking at what happens after you’ve deployed, and how to create a pleasant experience for your users. The focus is mainly on web-apps, but could apply to other things too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><h4>Getting users to update</h4><p>When a new version of your code is deployed, you may still have clients with the app already running. These will unfortunately go on using the old version of your code.</p><p>When releasing small bug-fixes, perhaps this is not too much of a problem, they’ll get the new version when they next start up the app or reload the webpage right?</p><p>But what if that doesn’t happen very often?</p><p>For example, let’s imagine a popular email client. Users often have a tab in their browser almost permanently open and flick back to it periodically to check their mail. If you are like me, this tab is only ever closed by accident (why is the Close Tab button right above the Close Other Tabs button, dammit Chrome?!). With a long-life web-app such as this, how do we deliver new updates to each client?</p><p>As well as this, sometimes we release new features, or backwards-incompatible changes, and we need any running clients to switch over to the new version or they will be unable to continue to use the app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ZdRq77mbTjA9C86CI2dcRA.png" /><figcaption>Backwards compatibility is not always easy (<a href="https://www.reddit.com/r/gaming/comments/69dqq7/it_worked/">source</a>)</figcaption></figure><p>To get users to update a web-app, the process is as simple as reloading the page. Once refreshed, the new version of the code will be available and the client will fetch and execute it. So all we need to do is let the client know when this is required, and automate the refresh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*PPJFg63aqpxP3UaSrSUU5A.png" /><figcaption>How Google deal with updates to Inbox (lets not get started on the design inconsistencies here)</figcaption></figure><h4>Our solution</h4><p>After we have deployed our application using our <a href="https://medium.com/releasepage/the-three-laws-of-continuous-delivery-65033ac0e990">automated processes</a>, we also manually <strong>tag</strong> and create a <a href="https://help.github.com/articles/about-releases/"><strong>release</strong></a> on GitHub. This is a formal expression to whomever may be watching that there is a new version of the software available.</p><p>Now we have made our release official we can make use of this information in our web-app using the GitHub API.</p><pre>GET /repos/:owner/:repo/releases/latest<br>{<br>  &quot;tag_name&quot;: &quot;v1.0.0&quot;,<br>  ...<br>}</pre><p>Using the <a href="https://developer.github.com/v3/repos/releases/">releases endpoint</a> we can fetch the latest release of a particular repository. By periodically checking this value we will be able to see when there is a new release and notify our users.</p><p>To help with this, we have created a simple JavaScript library to do just that. <a href="https://github.com/releasepage/reload.js">reload.js</a> will monitor a GitHub repository for new releases, and using <a href="https://github.com/npm/node-semver">semver</a> will check what kind of release it is and display an appropriate message. Or you can set your own message;</p><pre>reload.options({<br>  major: {<br>    content: &#39;A new version is available!&#39;<br>  },<br>  minor: {<br>    content: &#39;Take a look at our new features&#39;<br>  },<br>  patch: {<br>    content: &#39;Some bugs are fixed&#39;<br>  }<br>});</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKskwPdNwUMlm2udJdu_1A.png" /><figcaption>reload.js showing a popup when a new major version is available</figcaption></figure><p>If you ever deploy <em>very</em> breaking changes, then you can also tell reload.js to refresh to page automatically after a specified timeout. Though I recommend using this sparingly as it can create a rather jarring user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><p>We’re still working on striking the right balance between releasing as often as possible and not bombarding our users with notifications.</p><p>That said, this is now as important a step in our release process as actually deploying the code, and we will continue to work on it.</p><p>If you have a similar process then I’d love to hear about it, let me know in the comments below 😊</p><h3>Want to see more articles like this? Click the 💙</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F09d0d3%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fupscri.be%2F09d0d3%2F&amp;image=https%3A%2F%2Fupscri.be%2Fmedia%2Fform.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/5599fa265d75f2c1d50e960d9817e8c0/href">https://medium.com/media/5599fa265d75f2c1d50e960d9817e8c0/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=babb03db4f7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/releasepage/how-to-update-your-running-web-app-babb03db4f7d">A new version is available!</a> was originally published in <a href="https://medium.com/releasepage">ReleasePage</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The three laws of continuous delivery]]></title>
            <link>https://medium.com/releasepage/the-three-laws-of-continuous-delivery-65033ac0e990?source=rss-ab23677a6c60------2</link>
            <guid isPermaLink="false">https://medium.com/p/65033ac0e990</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[James Ivings]]></dc:creator>
            <pubDate>Tue, 25 Apr 2017 07:17:39 GMT</pubDate>
            <atom:updated>2017-05-21T07:28:24.109Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kPiICYuIqMkcoVmM_C4PCQ.jpeg" /><figcaption>The guy with his head in his hands is me while lost researching continuous delivery for the <strong>n</strong>th time</figcaption></figure><p>When starting our <a href="https://releasepage.co/">newest venture</a> this year I once again lost hours (okay…days) working out the best way to approach it. With the project itself hoping to fill a missing segment of the continuous delivery lifecycle it was certainly an important consideration for us ✨</p><p>In this series of posts I will attack various aspects of continuous delivery and describe how we are tackling them.</p><h4><strong>Visibility &amp; Feedback 👀</strong></h4><p>The superpower that we want to achieve is the ability to slip small incremental changes into production, as frequently as possible, without anyone noticing. Like all superpowers, this has it’s drawbacks. Although we don’t want the users to notice, we certainly do want our own team to be aware!</p><p><em>In other words — we need </em><strong><em>visibility</em></strong><em> of what will get deployed, where, and at what point.</em></p><p>With lots of things changing regularly it’s important that our app’s integrity does not suffer. For if it’s easy to deploy fixes, then it’s just as easy to deploy bugs 🐛</p><p><em>To combat this, at each step of the process it should be possible to review, request changes, and test everything that will make up the next release.</em></p><p>This two points lead us to the first draft of our three laws;</p><ol><li>we should always be able to see the code that is currently deployed to production so that we can use it for comparison</li><li>every new feature must be tested and deployable</li><li>all changes must be reviewed</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><p>I’ve always been a fan of the <a href="http://nvie.com/posts/a-successful-git-branching-model/">git flow</a> model of branch management. The progression of code from developed features to review, testing, and finally deployment is well thought out and best of all — predictable.</p><p>As well as this, infinite lifetime branches (master and develop) make setting up deployments a breeze, and the uniform nature of other branch names make it simple to automate other tasks.</p><p>With git flow we can rephrase our previous laws like so;</p><ol><li>master should always represent what is currently deployed to production</li><li>everything on develop must be tested and deployable</li><li>all commits to develop must be reviewed</li></ol><p>These form the basis of our continuous delivery lifecycle.</p><h4>Deployment</h4><p>I recently rediscovered <a href="https://circleci.com/">CircleCI</a>, which has excellent support for <a href="https://circleci.com/docs/1.0/configuration/#deployment">branch based deployment</a>, making it a great fit for use with our three laws.</p><p>There are plenty of other CI tools around, but CircleCI has a good combination of pretty web-interface, good free trial, and agreeable documentation.</p><p>Using the suggested circle.yml file allows you to provide configuration within your repositories that CircleCI how to run your tests. You can also define deployment steps to run if certain branches change.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8d0db1c7db4fd623abadcf8e85f9851/href">https://medium.com/media/c8d0db1c7db4fd623abadcf8e85f9851/href</a></iframe><p>By adding this file, now <strong>anything</strong> that changes on <strong>any</strong> branch is tested by CircleCI. We can then follow our three laws easily for any new release;</p><ul><li>when features are finished they are pushed to develop through pull-requests on GitHub in accordance with the third law.</li><li>develop is then automatically deployed to our staging environment and tested thoroughly in accordance with the second law.</li><li>if tests are green and we are happy the develop branch is manually merged onto master, which is deployed to production in accordance with the first law.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><p>The deploy scripts that you can see are included in each project as a node_module dependency so that they can also be versioned in git. These are super simple and all basically do the following;</p><ol><li>create a tar from the built files</li><li>copy the tar to the appropriate server, unpack it and update some symlinks</li><li>restart the process on the server (we use <a href="https://github.com/Unitech/pm2">pm2</a> for this which boasts clustering with zero downtime)</li></ol><p>CircleCI allows you to specify environment variables for each project you build, so the addresses of the boxes that we deploy to are stored there, as well as any other private variables that we don’t want in git.</p><p>We’ve also replaced the default npm install with yarn, which lets you do some super awesome optimisations like;</p><pre>yarn install --production --ignore-scripts --prefer-offline</pre><p>This tells yarn to take a look at the current node_modules directory and discard all the modules that are not used in production. An easy and fast way of getting rid of all the development modules before we copy them to the server.</p><p>Using CircleCIs build numbers we also have a rudimentary rollback system in place, however this is yet to be used! 🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><p>After several weeks use, I’m very happy with this setup. We have been releasing our software seamlessly, with very little interaction (except review), and so far we have encountered zero issues.</p><p>However, I’m sure there are plenty more improvements to be made, so please leave your suggestions in the comments!</p><p>The next steps in this series will cover the following;</p><ul><li>updating running instances when things change</li><li>notifying users of changes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VS1QjrM9-r3p4FVwsm7hag.png" /></figure><h3>Want to see more articles like this? Click the 💙</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F09d0d3%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fupscri.be%2F09d0d3%2F&amp;image=https%3A%2F%2Fupscri.be%2Fmedia%2Fform.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/5599fa265d75f2c1d50e960d9817e8c0/href">https://medium.com/media/5599fa265d75f2c1d50e960d9817e8c0/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65033ac0e990" width="1" height="1" alt=""><hr><p><a href="https://medium.com/releasepage/the-three-laws-of-continuous-delivery-65033ac0e990">The three laws of continuous delivery</a> was originally published in <a href="https://medium.com/releasepage">ReleasePage</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cycling Chiang Rai]]></title>
            <link>https://medium.com/squarecat-travel/cycling-chiang-rai-80a7f7c67631?source=rss-ab23677a6c60------2</link>
            <guid isPermaLink="false">https://medium.com/p/80a7f7c67631</guid>
            <category><![CDATA[thailand]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[southeast-asia]]></category>
            <dc:creator><![CDATA[James Ivings]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 03:31:06 GMT</pubDate>
            <atom:updated>2016-12-22T03:31:06.331Z</atom:updated>
            <content:encoded><![CDATA[<p>After a week chilling and exploring Chiang Mai we decided on a whim to head north to Chiang Rai, a city known for rich history and unusual temples.</p><p>As well as the sights, Chiang Rai is frequently passed through by travellers on their way to take the slow boat into Laos, so has a wide collection of bars and hostels — perfect.</p><p>We arrived late in the day, after a bus journey through the mountains and quickly set out to find food and drink. Our hostel was near the centre of the city (we now always book rooms near the ‘brown’ sections of Google maps, which often represent the hotbeds of activity), so we didn’t have far to walk.</p><p>The streets all radiate from the central clock tower and we headed toward this landmark. The bars around reminded us of the tourist strips in Chiang Mai that prey upon the western tourists all too willing to pay for extra friendly service… As such the bars were overpriced (฿110 on the Chang index), but not quite as sleazy. But first… food! We settled down next to the clock tower and ordered Khao soi. Oh, Khao soi! I could write an entire post on how great this dish is, and it has been a staple of our diet our entire time in the north. This was no exception and we slurped our beer and noodles in short time!</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;schema=instagram&amp;url=https%3A//www.instagram.com/p/BOKTX2cBb_N/&amp;image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fscontent.cdninstagram.com%252Ft51.2885-15%252Fs640x640%252Fsh0.08%252Fe35%252F15538844_693730214132815_1568947253966536704_n.jpg%253Fig_cache_key%253DMTQwODAyMzAzNTM5MDU3NDU0MQ%25253D%25253D.2%26key%3D4fce0568f2ce49e8b54624ef71a8a5bd" width="640" height="640" frameborder="0" scrolling="no"><a href="https://medium.com/media/73c85015fc39639395f7cb22a416e9e4/href">https://medium.com/media/73c85015fc39639395f7cb22a416e9e4/href</a></iframe><p>The following day, (still deathly afraid of hiring a scooter) we rented bicycles to explore the nearby White Temple. Around 12km from the city we had a short cycle first, but distances feel much further in the heat — for which we were underprepared as always!</p><p>Built relatively recently, the temple is an unusual sight to behold and quite unlike anything we had seen before. I am a big fan of hanging around Thai temples, the quiet ones definitely help to ease my mind and clear my head. However, the White Temple offered nothing of the sort. Although I definitely recommend visiting for the fascinating architecture, the White Temple feels more like a modern art installation than a real temple. We left feeling confused and pensive, attempting to decipher the message it was trying to portray.</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;schema=instagram&amp;url=https%3A//www.instagram.com/p/BOMRRVHgoWr/&amp;image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fscontent.cdninstagram.com%252Ft51.2885-15%252Fs640x640%252Fsh0.08%252Fe35%252F14498981_233991220371926_4019737824507985920_n.jpg%253Fig_cache_key%253DMTQwODU3Njc0MTE1NjQ4ODYxOQ%25253D%25253D.2%26key%3D4fce0568f2ce49e8b54624ef71a8a5bd" width="640" height="640" frameborder="0" scrolling="no"><a href="https://medium.com/media/c83450de7a5c12a0134855bcda2ba592/href">https://medium.com/media/c83450de7a5c12a0134855bcda2ba592/href</a></iframe><p>After chilling a while in the shade we took off toward <a href="https://www.tripadvisor.com/Attraction_Review-g297920-d6771960-Reviews-Singha_Park-Chiang_Rai_Chiang_Rai_Province.html">Singha Park</a>, which has been recommended to us by some friends. Once upon a time the park grounds had been used for growing hops and barley for Singha beer, but now is a popular attraction for walking and biking. This was definitely the highlight of our time in Chiang Rai. The park was beautiful, and the cycle around the grounds was perfect. Unexpectedly, we were also able to see and feed giraffes, which roam around a section of the park.</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;schema=instagram&amp;url=https%3A//www.instagram.com/p/BONe2LQhlxQ/&amp;image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fscontent.cdninstagram.com%252Ft51.2885-15%252Fs640x640%252Fsh0.08%252Fe35%252F15624617_1697971283848903_6101193802100244480_n.jpg%253Fig_cache_key%253DMTQwODkxNzkyMjc3MjMxMTEyMA%25253D%25253D.2%26key%3D4fce0568f2ce49e8b54624ef71a8a5bd" width="640" height="640" frameborder="0" scrolling="no"><a href="https://medium.com/media/79e8bb23791e4253c5ac79a6bba43fd6/href">https://medium.com/media/79e8bb23791e4253c5ac79a6bba43fd6/href</a></iframe><p>We stayed in the park for almost the entire afternoon, eventually watching the sunset with cans of Singha. A perfect end to a great few days in Chiang Rai.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_L76difLBTm6yMFxoc2Hg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80a7f7c67631" width="1" height="1" alt=""><hr><p><a href="https://medium.com/squarecat-travel/cycling-chiang-rai-80a7f7c67631">Cycling Chiang Rai</a> was originally published in <a href="https://medium.com/squarecat-travel">Squarecat Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>