<?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[G Adventures Technology - Medium]]></title>
        <description><![CDATA[A Technical Look into the World&#39;s Largest Adventure Travel Company - Medium]]></description>
        <link>https://medium.com/g-adventures-technology?source=rss----314740103cb7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>G Adventures Technology - Medium</title>
            <link>https://medium.com/g-adventures-technology?source=rss----314740103cb7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:05:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/g-adventures-technology" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Taming memory leaks in asyncio]]></title>
            <link>https://medium.com/g-adventures-technology/taming-memory-leaks-in-asyncio-ae49ac0e0809?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/ae49ac0e0809</guid>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[async]]></category>
            <dc:creator><![CDATA[Jakub Labath]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 15:57:21 GMT</pubDate>
            <atom:updated>2023-05-10T10:23:39.403Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6NgRIaCxBg2pme303utyaw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@florinb19?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Florin Beudean</a> on <a href="https://unsplash.com/s/photos/horses?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Recently I’ve observed an unpleasant problem in our python asyncio application. The symptoms were that our python process would eat all the memory until there was none left at which point <a href="https://en.wikipedia.org/wiki/Out_of_memory#Out_of_memory_management">OOM</a> killer would have to act. Now when stuff like this happens to me I’d say 9 out of 10 times it’s because of something I have done. And I have written about it in the past <a href="https://tech.gadventures.com/hunting-for-memory-leaks-in-asyncio-applications-3614182efaf7">here</a>. But there is the odd time when the problem lies in underlying libraries. I have observed such a problem with the <a href="https://docs.aiohttp.org/en/stable/client.html">aiohttp client</a>.</p><p>First, let’s talk about how we use it — we create the aiohttp client once at startup and then share this client among all the requests during the web server’s lifetime. We do this because our app talks to only 3 other REST services and re-using the open connections is a massive performance benefit. (In fact, we use three aiohttp clients — one per each service — to further ensure connection re-use). After many happy months of use, something happened that caused one (or perhaps several) of the clients to start leaking memory.</p><p>Now ideally it should be possible to simply figure out the bug and fix the root cause. Unfortunately, I have not been able to reproduce the problem and I don’t know what is causing it. We do all kinds of HTTP requests (at a rate of tens of requests per second) and it must be a tiny fraction of them that are causing the client to misbehave this way.</p><p>I found I don’t have the capacity to properly fix the root cause. I do not even have enough to file a useful bug report.</p><p>All I have is indirect evidence that it’s the client since the problem goes away should each request handler create and destroy their client(s). This works but of course, there is no connection re-use between requests and the increased duration of handling our requests has all kinds of cascading effects on the rest of our system and overall latency.</p><p>Alas, there is something that can be done!</p><p>I noticed the memory use was not sudden rather it could take 12 hours or more to build up to critical levels. The workaround from there is simple.</p><p><strong>Let’s re-use the client but close it just before the leak becomes a problem.</strong></p><p>There are a few ways this could be accomplished but I opted for a simple use counter. The behaviour is as follows: for N amount of times use the existing client, when the TTL (time to live) is reached create a new client and schedule the old client for cleanup (so that python runtime can reclaim any memory the client have allocated). From a user’s point of view, the logic went from:</p><pre>http_client = req[&#39;http_client&#39;]<br>## do stuff with http_client</pre><p>to something like this:</p><pre>http_client = await req[&#39;http_agent&#39;]()<br>## do stuff with http_client</pre><p>In other words, rather than storing the client to use, we store an agent that when called and awaited will return the client. That’s all that had to change from a user’s point of view. For the agent itself, I tried to keep the logic as simple as possible and I am happy to share it here.</p><pre>import typing<br>import asyncio<br><br><br>def lifecycle_agent(<br>    create: typing.Callable[[], typing.Awaitable],<br>    cleanup: typing.Callable[[typing.Any], typing.Awaitable],<br>    ttl: int,<br>) -&gt; typing.Callable[[], typing.Awaitable]:<br>    &quot;&quot;&quot;<br>    arguments are as follows:<br>    * create is awaitable that will create the resource<br>    * cleanup is awaitable that will be given the old resource<br>      to clean-up<br>    * ttl defines the maximum number of uses for a given resource<br>      this function will return awaitable that will return resource <br>      created by create<br>    &quot;&quot;&quot;<br>    life = 0<br>    resource_obj = None<br><br>    async def _agent():<br>        nonlocal life<br>        nonlocal resource_obj<br>        # increment life<br>        life = life + 1<br>        # see if we need a new object<br>        if life == 1:<br>            # we need to create new resource<br>            resource_obj = await create()<br>        if life &gt;= ttl:<br>            # schedule cleanup<br>            asyncio.create_task(cleanup(resource_obj))<br>            # reset life<br>            life = 0<br>        return resource_obj<br><br>    return _agent</pre><p>Here is a simple demo that demonstrates how the above can be used in practice.</p><pre>async def demo():<br>    print(&quot;Demo of lifecycle functionality&quot;)<br>    num_create = 0<br>    num_clean = 0<br>    <br>    async def create():<br>        nonlocal num_create<br>        num_create += 1<br>        await asyncio.sleep(0.01)<br>        print(&quot;creating demo object foo&quot;)<br>        return &quot;foo&quot;<br><br>    async def cleanup(obj):<br>        nonlocal num_clean<br>        num_clean += 1<br>        print(&quot;cleaning up obj {}&quot;.format(obj))<br><br>    agent = lifecycle_agent(create, cleanup, 100000)<br>    for _ in range(1000000):<br>        obj = await agent()<br>        if obj != &quot;foo&quot;:<br>            raise ValueError(&quot;Unexpected Value&quot;)<br><br>    await asyncio.sleep(0.3)<br>    if num_clean != num_create:<br>        raise ValueError(f&quot;cleanups {num_clean} and creates {num_create} do not match&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    asyncio.run(demo())</pre><p>A keen observer might notice that the cleanup function gets scheduled for execution immediately. This may be a problem if the resource getting cleaned-up is still used by the last process that obtained it. One simple way to deal with it is to introduce a waiting period in the cleanup function.</p><pre>async def cleanup(obj):<br>    # 40 seconds is the max duration of anyone using obj<br>    await asyncio.sleep(40)<br>    await obj.close()</pre><p>More sophisticated measures could include primitives that could be used with async with and would wrap the shared resource and it is what I ended up using in the end. But for proof of concept the sleep above was more than sufficient and non-invasive way to fix our runaway memory problems.</p><p>A graphic that illustrates our memory usage and how it fell back to normal after we deployed the above fix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJ0ED72pNz8gHlNe8G2C9g.png" /><figcaption>Memory leak history</figcaption></figure><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae49ac0e0809" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/taming-memory-leaks-in-asyncio-ae49ac0e0809">Taming memory leaks in asyncio</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A deep dive into swear patterns at G Stock]]></title>
            <link>https://medium.com/g-adventures-technology/a-deep-dive-into-swear-patterns-at-g-stock-33ce197ee82f?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/33ce197ee82f</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[funny]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Adam McKerlie]]></dc:creator>
            <pubDate>Fri, 13 Sep 2019 11:38:33 GMT</pubDate>
            <atom:updated>2019-09-13T17:59:37.488Z</atom:updated>
            <content:encoded><![CDATA[<h4>Warning: This post contains NSFW language. If this is an issue at your work you should check out our <a href="https://www.gadventures.com/careers/">career page</a>!</h4><p>Every year in September over 300 staff from around the world come to Toronto for our annual conference, called G Stock. This is a week-long event that culminates in a keynote by our founder Bruce called The State of G Nation.</p><p>Back in 2010 when I started at G, I used to track casual curse words Bruce would drop at G Stock via Twitter. In 2014 we decided to <a href="https://www.youtube.com/watch?v=KOO5S4vxi0o">take it to eleven</a> and build out a bespoke system to track it. This is a deep dive into the tech behind it and the data that’s been generated over the past five years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d80rwYNzZFoCpUNrwwN28g.jpeg" /></figure><h3>The Tech</h3><p>The technology behind tracking this is extremely simple. We have a Django app that keeps track of every time Bruce swears, a simple javascript frontend that polls for any new events and a simple admin interface where certain people can post new swears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*loJROFmhSchImSQ15zCX-w.png" /><figcaption>A fairly standard Django application</figcaption></figure><p>As you can see above, we’ve split the app into a few different sections, the most important ones being models, views and ajax_views. This application follows our standard layout where we like to split up ajax views with regular views. For larger applications this keeps things nice and tidy, in the case of the Swear app it’s overkill.</p><p>Our models are extremely simple:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f209e92de47ce1307c0617faf23bc7c/href">https://medium.com/media/7f209e92de47ce1307c0617faf23bc7c/href</a></iframe><p>As you can see, the models are really simple. At the core, we have a SwearEvent that stores the details of each G Stock and a Swear model that stores the details of each swear. One thing to keep in mind is that this was initially created back in 2015 and has changed little over the years. If I was writing this today I wouldn’t have a separate model for Tags, instead, I’d store it as a ArrayField.</p><figure><img alt="The frontpage of the Swear app" src="https://cdn-images-1.medium.com/max/1024/1*uHGWa5072SVGHeN63HkK_A.png" /><figcaption>When we launched this it was the first instance of polling. Technology advancement by swearing!</figcaption></figure><p>Next up we’ll look at the views file. As mentioned above, this could easily be in a single views.py file due to the size.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b153d0bf8cdb28eeb494cc6ce54c5e6/href">https://medium.com/media/8b153d0bf8cdb28eeb494cc6ce54c5e6/href</a></iframe><p>The views in views.py are fairly standard. SwearView loads up the homepage seen above. It pulls in the latest event (we only ever have one going at any given time), finds the event with the highest amount of swears and then creates the context to pass into the homepage. One thing you’ll see across the views is us passing in last_id to the context. This is how the frontend polls for newly created swears.</p><p>SwearAdminView creates the admin view where certain users can manually type in swears as Bruce says them. The get function is extremely simple, just setting the context to the latest event. The post function pulls in the event and text for the swear, splits on each hash to find all of the swear tags, creates the swear event and then posts to Slack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nLdGrwWtnKCfiotpMYlMcQ.png" /><figcaption>A very simple admin interface</figcaption></figure><p>In ajax_views.py we have a single class that takes in the latest swear ID (as set in the initial load) and then finds all of the swears that have been created since. It then adds that information to the context so the javascript app can display it.</p><p>That pretty much wraps up the technical side of things. Now we can dive into some data.</p><h3>The Data</h3><p>On average, Bruce swears 53 times per keynote. In 2016, we started raising money for <a href="https://planeterra.org/">Planeterra</a> based on the number of curses, and since then there has been an upward trend in the number of swears per year. Perhaps Bruce realizes this? So far we’ve raised over $2500 with over $500 already pledged this year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k8ZMC1uiEtRpHp7NBqYIdw.png" /></figure><p>Bruce really loves to say Fuck, as it brings in the dollars. We’ll dig into the trends of each swear type over the years but overall Fucks and Shits are trending upwards. We define Other swears as anything that doesn’t fit into a different tag or is a negative sentence towards a specific Region or Department at G Adventures. An example of an Other is What the hell have I created in this company?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CI9TOmYZCp7vVV77iOGvtQ.png" /></figure><p>On average there’s 45 per hour in the morning and only 21 per hour in the afternoon. It seems like Bruce loses steam as the day goes on. The lowest amount of swears come at 1 pm. This is primarily due to lunch (which is normally 12:45–1:30 pm) and Bruce no longer being <a href="https://www.merriam-webster.com/dictionary/hangry">hangry</a>. There are also fewer opportunities to swear in the afternoon because that’s when we present awards and have other people speak.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbUWhV88i8ZkgPShV5PDGw.png" /></figure><p>Next up we’ll look at some trends for each of the swears. G Stock 23 is obviously an outlier since it had the most swear words by almost 30%. Fucks and Shits are definitely on the rise. Year over year Bruce tends to lean towards these more than any other. Other and Bitches are trending downwards, especially when you consider G Stock 23. Asses have been pretty flat overall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*KH7-M_qaOzG9sXgg1b8WsA.png" /></figure><p>And that’s a deeper look into the tech that powers G Stock’s swear counter and a look into the trends of how Bruce has sworn over the years. G Stock 25 is happening this month and I’m excited to see if he’ll set a new record.</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33ce197ee82f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/a-deep-dive-into-swear-patterns-at-g-stock-33ce197ee82f">A deep dive into swear patterns at G Stock</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 questions to ask when starting out with email marketing]]></title>
            <link>https://medium.com/g-adventures-technology/5-questions-to-ask-when-starting-out-with-email-marketing-2936e1f1f152?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/2936e1f1f152</guid>
            <category><![CDATA[marketing-automation]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[email-marketing]]></category>
            <dc:creator><![CDATA[Phillip Wild]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 17:12:07 GMT</pubDate>
            <atom:updated>2019-04-23T17:12:07.727Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yXEKKcWeFnepzMkW" /><figcaption>Photo by <a href="https://unsplash.com/@johnschno?utm_source=medium&amp;utm_medium=referral">John Schnobrich</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I was learning to play poker, I remember reading an insight which really resonated with me. The basic premise is this: you can’t teach a poker player the right action in every circumstance. There are just too many hands, too many situations, too many opponents. But, you can teach them what to consider when making the decision. By equipping others with the tools to think critically about any given scenario, you can set them up for success.</p><p>We think about marketing automation in the same way. How can you equip your new team members with the tools to come to the right conclusions?</p><p>Since we recently onboarded some employees that did not come from an email marketing background, we had to really consider the above question. We took it as an opportunity to articulate and codify exactly how we approach email marketing and marketing automation in general.</p><p>So, what dictates whether we send one email or ten? Whether we put in a lot of time into a piece of communication or a little? And what should the main call-to-action be? We started to really examine a process that in the past, that primarily existed in our heads. Here are the results.</p><h3><strong>1. Who is the recipient, and what is their expectation?</strong></h3><p>What does the customer need? What do they expect? And what would delight them? You can’t always deliver incredible experiences, but by putting yourselves in the customer’s shoes you will step out of any prior “tunnel vision” and think about what’s best for the customer. For example, if you just gave an email address to a retail store to be sent your receipt electronically, would a person reasonably expect, and be happy, to receive marketing emails as well? Would you? Sometimes it brings out the hard truth that the email or communication has no reason to exist.</p><h3><strong>2. How many recipients are there?</strong></h3><p>Often we’ve found ourselves getting deep into a strategy, or even a build, only to run the segment and find we are only talking to 100 people in total. Hmm. Maybe we should have known that before we spent 10 hours on it.</p><p>It seems like a no-brainer, but is this worth the effort? Are there more efficient and productive things you could be doing instead? Can you delight 10,000 customers instead of simply this 100? Maybe with a few small tweaks, it could be an email you could use over and over again, instead of once.</p><h3><strong>3. How much time do you have? Where does this project fall in the priority list?</strong></h3><p>The reality is that if you have 15 emails to build before tomorrow then you simply can’t spend time customizing the elements within. Sometimes you just need to execute, and that’s fine. So if this project simply isn’t that important compared to others, based on your team and company goals, then get it done and move on.</p><h3><strong>4. Are there recipients in very different situations?</strong></h3><p>If you have the time, check: do you have recipients who are already customers of yours mixed in with some who have never heard of you before? Or are they evenly split between those under thirty years old, and those over seventy? This might mean they have different levels of education around your product, and therefore, different expectations. You don’t want to talk to a loyal customer as you talk to a new one if you have the time to vary the message.</p><h3><strong>5. Can it be tested? Would a test make a difference?</strong></h3><p>Perhaps you have the time to write two different headlines and run an A/B test. Fantastic. But if the second headline is against your brand guidelines, and you could never use it again, then there’s not really any point in testing it, is there?</p><p>It’s important to note that testing is most effective when it’s not “on the fly” but instead, part of a strategic plan to improve.</p><p>By asking yourself these questions, you should have a better idea of what the outcome should be based on the return you will get on your efforts. The beauty of email marketing is that there are just so many solutions to a problem. But the art is finding the best one, consistently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2936e1f1f152" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/5-questions-to-ask-when-starting-out-with-email-marketing-2936e1f1f152">5 questions to ask when starting out with email marketing</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating React into Django]]></title>
            <link>https://medium.com/g-adventures-technology/integrating-react-into-django-5e6591097b9e?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/5e6591097b9e</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Jamie Weatherby]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 14:36:02 GMT</pubDate>
            <atom:updated>2019-03-18T15:24:49.739Z</atom:updated>
            <content:encoded><![CDATA[<p>React and Django do not seem like they integrate very well together. When you use <em>create-react-app</em>, you’re given a barebones HTML file that contains only what is absolutely necessary to get the React app to display. It’s designed to be a single-page-app (SPA) and assuming you’re going to do all the work on the JavaScript side, connects to the data through an API. What happens when you already have a well-established site with robust HTML served through a CDN? What about all that sweet SEO? What about the UI: do you mash all the different user interactions into one giant JS app a la JQuery? How then are you going to evolve past JQuery into the React ecosystem?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tUgmYTigqshnqK60ajGX5w.jpeg" /><figcaption>Pineapple Supply Co. <a href="https://unsplash.com/@pineapple?utm_medium=referral&amp;amp;utm_campaign=photographer-credit&amp;amp;utm_content=creditBadge">https://unsplash.com/@pineapple</a></figcaption></figure><p>At G Adventures we wrestle with these problems. We have a well-established site built on Django from before the days of React. It’s out of the question to convert the entire thing into one giant React app, or even a series of smaller apps - we like having the HTML rendered server side and not asynchronously; the information displayed reads from multiple data sources that should not be exposed client side; and we have existing JavaScript apps living independently of each other all over the site. But, we’re excited about what React has to offer and with G’s <a href="https://tech.gadventures.com/why-we-created-a-rest-api-at-g-adventures-b9a99abc86d">well-rounded API</a>, it makes sense to move some of the logic client-side and focus on creating new and exciting UI features. We’ve built some React apps throughout the site, but in the past, they loaded independently of each other, similar libraries being loaded multiple times and 2 or 3 different redux stores are implemented, depending on which page you land on.</p><p>So, how do we optimize all this? We came up with the idea to extract the useful Webpack bits out of `create-react-app` and create a new monolith of a React app! This sounds like it’ll be a mess of logic and inevitable spaghetti code, but Django’s suggested file structure provided the answer. Django is app-based, so all the different bits of business logic should live in their own directory. Say you have a site that does 3 things: it allows you to view and book trips, write blogs and manage a profile (like gadventures.com 😉). The structure might look like this:</p><pre>main <br>- settings</pre><pre>trips<br>- views<br>- models</pre><pre>blog<br>- views<br>- models</pre><pre>profile<br>- views<br>- models</pre><p>Well, what if a React app looked similar? Say you want to make the trips app more interactive; you want to add things to a wish-list, check whether you need a Visa to visit the countries listed on the tour and you want to be able to search for related trips. These activities are not related except that they should all happen on the trips page. The HTML for the trips is already massive and robust, so we don’t want to turn the entire thing into a JS app; instead, we’ll embed these individual React apps as we see fit.</p><p>To create these apps, we’ll use a similar file structure:</p><pre>webpack<br>- settings<br>- dev<br>- prod</pre><pre>wishlist<br>- redux-helpers (reducers, API calls, etc)<br>- JSX Components</pre><pre>visa_checker<br>- redux-helpers<br>- JSX Components</pre><pre>trip_search<br>- redux-helpers<br>- JSX Components</pre><p>And from there, we can tweak the entry file as such:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/109297af8608ad6864484532da888465/href">https://medium.com/media/109297af8608ad6864484532da888465/href</a></iframe><p>As you can see, this new monolith app searches for DOM ids and embeds the React micro-apps as needed. From this file, you can tweak the `document.getElementById` to whatever you like. As it finds the corresponding DOM nodes, it’ll inject the corresponding React micro-app. They’ll share the redux store and the libraries (React, Redux, etc), which reduces network bandwidth. The HTML attributes can load supplemental information, like in the sample visa-checker app.</p><p>Using this technique, you get all the benefits of dynamically generated pages from Django and these React micro-apps will enhance your site’s user experience. At G Adventures, we implemented this solution and haven’t had any problems so far. It reduced the page load times, there are fewer API requests resulting from the shared redux store and it’s reusable across the entire site. Win-win-win!</p><p>Hope this solution helps those looking to implement similar hybrid apps!</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e6591097b9e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/integrating-react-into-django-5e6591097b9e">Integrating React into Django</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How technology drives a better customer experience]]></title>
            <link>https://medium.com/g-adventures-technology/how-technology-drives-a-better-customer-experience-6a6c61309a8?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a6c61309a8</guid>
            <category><![CDATA[customer-experience]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Lyndon File]]></dc:creator>
            <pubDate>Tue, 12 Feb 2019 14:17:32 GMT</pubDate>
            <atom:updated>2019-02-12T14:17:32.494Z</atom:updated>
            <content:encoded><![CDATA[<p>I have a confession. I’m not a technology guy. I remain convinced that Python is a type of snake. I have no funky beard, and I struggle to remember the code to my phone — let alone writing code. So, what am I doing here?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rc9freyX_8YBxiO3MCfNA.png" /></figure><p>I am the Director of Customer Experience here with G Adventures. It’s my role to make our customer experience all it can be. Technology is key to this as it underpins all of our customer experience efforts. From the <a href="https://tech.gadventures.com/why-we-created-a-rest-api-at-g-adventures-b9a99abc86d">API sharing information</a> with our partners to the multitude of technical solutions that allow communication of many kinds to flow internally and with our customers; technology is key to making it all happen. Technology is the thread that binds us together.</p><p>On average, we have 114 days from when a customer books a trip to when they begin their tour. In looking at our total customer experience, we have some great marketing materials on how to prepare for an upcoming tour. But….is this working…does it resonate with our customer? Recently, I asked the question: <em>“How might we better understand how well we are preparing our customers for their upcoming travels?”</em></p><p>Enter a collaborative undertaking with many parts of our organization, the most important of which were our Technology teams. The first task was to simply ask a question of our customers who had travel confirmed. As with many customer experience endeavours, we wanted <a href="https://tech.gadventures.com/a-b-testing-and-statistical-significance-for-marketing-5d5b52d969c9">to test the concept first</a> and have a proof of concept. So, we selected Peru as a test case destination. We inserted a question into our automated e-mail communications 65 days before travel, and again 7 days before travel that asked: How ready are you? Travellers have the choice of answering <em>“Totally Ready, Somewhat Ready, or Not Ready At All”. </em>For those answering <em>‘Somewhat Ready and Not Ready At All”</em> it promoted a follow-up question of why. This information is hugely beneficial in terms of getting an insight into why our customers may have some anxiety, and what we might do to better prepare them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*H3OOQlpjkV2jhgQxclq71A.png" /></figure><p>The interesting element here is how we capture the data.</p><p>At G Adventures, we believe in understanding a 360 degree perspective of the customer. This means that it is important for all customer related data to live in the same place on the same profile, and for that, we use the Salesforce.com CRM (SFDC).</p><p>First, our internal email engine (known internally as Tin Can) that understands and keeps a timeline of our customer, creates a record in SFDC called the “G Readiness Survey”. We use our internal <a href="https://developers.gadventures.com/">G API</a> to create the record. This links the customer, the booking and the future response. It also generates a survey link that we embed in an email. The link shows up as the first question in the survey which is simply a happy, neutral and sad face. Small design choices like this immensely help our return rate. We host our surveys on Qualtrics, which has a powerful integration with SFDC. Again, this really helps to make the systems less mysterious, more malleable and less reliant on developers for quick changes. Once the customer is directed to and fills out the survey, depending on their responses if they feel they need assistance, a Case in the SFDC Service Cloud gets created. The Case again links back to the customer and booking so that we can tie back in the communication with the customer journey.</p><p>It’s not that we like to complicate simple processes, in this case surveying our customers and collecting data. However through connecting our systems, Tin Can to SFDC through GAPI and then SFDC and Qualtrics, we create a solid foundation to make data immediately useful to us. Our customer journey is dynamic and ever-evolving, and when we make design choices with our integrations and the systems we use, we always keep this at the forefront, so that hopefully, this process stays relevant five to ten years down the line.</p><p>Here’s an example of how we have taken the data and mined it to improve things. Take the idea of needing to pack for your trip. Previously we provided a basic packing list. But the data told us our customers were wanting and needing more. So our creative team got to work, and turned an unexciting static list into this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F301907089%3Fapp_id%3D122963&amp;dntp=1&amp;url=https%3A%2F%2Fvimeo.com%2F301907089%2Fa7c1fe455c&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F740562701_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f5c24d7e280f7615fdb35ea982e9a37/href">https://medium.com/media/7f5c24d7e280f7615fdb35ea982e9a37/href</a></iframe><p>Data is key to understanding the customer and their journey. But it’s the technology that binds the entire process together that makes this initiative a success.</p><p>Now…about those Pythons…</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a6c61309a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/how-technology-drives-a-better-customer-experience-6a6c61309a8">How technology drives a better customer experience</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things I learned making my first Github action]]></title>
            <link>https://medium.com/g-adventures-technology/things-i-learned-making-my-first-github-action-84f528a97015?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/84f528a97015</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[bash]]></category>
            <dc:creator><![CDATA[Bartek Ciszkowski]]></dc:creator>
            <pubDate>Wed, 16 Jan 2019 18:37:48 GMT</pubDate>
            <atom:updated>2019-01-21T16:00:43.459Z</atom:updated>
            <content:encoded><![CDATA[<h3>Things I learned making my first Github Action</h3><p>Recently, <a href="https://github.com/features/actions">GitHub Actions</a> added another tool to the workflows we’ve all centralized around GitHub, making it even easier to have bots do the process-heavy things that we humans don’t want to do.</p><p>My initial thought when I heard the news was how this plays with Travis CI, which we also use, and then I led to thinking automating our linting via Actions is a logical first step (and we now are <a href="https://github.com/bartek/pylint-action">using that</a>, although it’s still a work-in-progress!)</p><p>Through that project, I learned a few things about GitHub Actions, and perhaps the ideology behind what GitHub is trying to do here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*yVPkDZpolki4Cu86uwavtw.jpeg" /><figcaption>Swank!</figcaption></figure><p>So, let’s explore a few of my learnings and throughout this article, we’ll build out a simple GitHub Action. We’ll make an action which is triggered on a any commit, and reviews the commit message</p><p><strong>How Actions Run — Scaffolding our project</strong></p><p>The first step — and the easiest one — is the setup we need to do on our repository.</p><p>It’s pretty neat. Essentially, each Action runs within a Docker container, which is given a variety of context from Github (environment variables, the repository at hand), which then can execute well … anything you could within a Docker container!</p><p>By and large, the primary thing I learned from this process was how lacking in knowledge I am with my bash scripting, but I’ll share some neat tricks and best practices I found shortly!</p><p>An action is broken down like so:</p><pre>+-- Dockerfile<br>+-- README.md<br>+-- your_entry_script.sh<br>+-- ... any additional folders for organization</pre><p>The Dockerfile can be as simple or complex as you wish, but ultimately it’s a place to setup a bit of Action metadata (<em>LABEL</em>s, etc.), install dependencies, and initialize the entry command for the container. Here’s what our git commit message project uses, which you can copy down as a starting point:</p><pre>FROM alpine:latest</pre><pre>LABEL &quot;com.github.actions.name&quot;=&quot;git-commit-message-check&quot;<br>LABEL &quot;com.github.actions.description&quot;=&quot;Check the quality of the git commit message&quot;<br>LABEL &quot;com.github.actions.icon&quot;=&quot;check-square&quot;<br>LABEL &quot;com.github.actions.color&quot;=&quot;yellow&quot;</pre><pre>RUN apk add --no-cache \<br>    jq \<br>    curl \<br>    git</pre><pre>COPY &quot;run-git-message-check.sh&quot; /usr/bin/run-git-message-check</pre><pre>CMD [&quot;sh&quot;, &quot;/usr/bin/run-git-message-check&quot;]</pre><p>I think the beauty of GitHub Actions is that they, implicitly through the nature of the design, encourage light-weight actions that do one thing, and do it well.</p><p>This mentality begins at the root, with the minimal <strong><em>alpine</em></strong> Docker container. This container comes with the bare essentials, so any dependency, even as common as <strong><em>curl</em></strong> must be installed.</p><p>We install a few more dependencies our script will need (you’ll see soon!), and then <em>COPY</em> our primary script to the container. Note that you’ll want to <strong><em>chmod +x</em></strong> your script locally to ensure when it’s copied over, it’s executable!</p><p><strong>Building out the shell script (&amp; What I learned about bash)</strong></p><p>Now, you can write in any language that’ll run in a Docker container, but it was fun to try and flex my (non-existent) bash muscles!</p><p>The first thing to know about Actions is that upon running any script, you have some neat additional context to work with. Actions provide a robust <a href="https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/">runtime environment</a>, giving you a lot of information about your repository, the triggered event, and the actors (systems or people) behind it.</p><p>A fun way to dig into this is to make an Action that well, does nothing but outputs the runtime environment. Take a look:</p><pre><br>#!/bin/bash</pre><pre>set -e<br>set -o pipefail</pre><pre>main() {<br>   jq --raw-output . &quot;$GITHUB_EVENT_PATH&quot;<br>}</pre><pre>main</pre><p>Add this to your project as <em>run-git-message-check.sh. </em>At this point, with just this shell code and the Docker container, you are very close to adding an action. If you want to pause now and try, I recommend reading the GitHub documentation on <a href="https://developer.github.com/actions/creating-github-actions/creating-a-new-action/">Creating a new GitHub Action</a>, as it goes into the details of rolling it out which we won’t in this article. (Mainly because we’re focusing on the Action’s <em>functionality</em> here, and the rest is connecting pieces!)</p><p>I love how simple this shell script is, and I learned a few useful bits:</p><ul><li><strong><em>set -e </em></strong>stops the execution of the shell script whenever there’s any error from a command or pipeline. This keeps our action fairly sane, and is something new to me in the bash world!</li><li>Similar to that, I learned a lot about <em>pipefail</em>! There’s been <a href="https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/">great writing</a> on this already, so I recommend that as a side read!</li><li>I learned about <a href="https://github.com/koalaman/shellcheck">shellcheck</a>, which lints your bash! In my example repo linked later, I provide a means of using this against the code we write.</li></ul><p>That aside, I punched that shell code and Docker container into a workflow and you can see a snippet of the output within the Actions tab of GitHub (snipped for brevity):</p><pre>### STARTED post git quality control 19:04:00Z<br><br>Pulling image: gcr.io/github-actions-images/action-runner:latest<br>latest: Pulling from github-actions-images/action-runner<br>cd784148e348: Already exists<br>1a34a342bc8b: Pulling fs layer<br>571706cf6933: Pulling fs layer<br>....<br>....<br>(5/10) Installing curl (7.61.1-r1)<br>(6/10) Installing expat (2.2.5-r0)<br>(7/10) Installing pcre2 (10.31-r0)<br>(8/10) Installing git (2.18.1-r0)<br>(9/10) Installing oniguruma (6.8.2-r0)<br>(10/10) Installing jq (1.6_rc1-r1)<br>Executing busybox-1.28.4-r2.trigger<br>Executing ca-certificates-20171114-r3.trigger<br>OK: 20 MiB in 23 packages<br> ---&gt; b3a1810ba635<br>Step 7/8 : COPY &quot;run-git-mesage-check.sh&quot; /usr/bin/run-git-message-check</pre><p>Beautiful! Essentially it’s building and running the Docker container, and the entire log is contained within this output.</p><p><strong>The runtime environment</strong></p><p>As we did above, we used <strong><em>jq </em></strong>to inspect <em>GITHUB_EVENT_PATH, </em>which is a useful JSON file full of metadata like so<em>:</em></p><pre>{<br>  &quot;after&quot;: &quot;1870aa8285a40ac84debc34885314b0553c1de55&quot;,<br>  &quot;base_ref&quot;: null,<br>  &quot;before&quot;: &quot;b0dba7f5a0b290bfabcf4498ff19980f3c0b7fd6&quot;,<br>  &quot;commits&quot;: [<br>    {<br>      &quot;added&quot;: [],<br>      &quot;author&quot;: {<br>        &quot;email&quot;: &quot;bart.ciszk@gmail.com&quot;,<br>        &quot;name&quot;: &quot;Bartek Ciszkowski&quot;,<br>        &quot;username&quot;: &quot;bartek&quot;<br>      },<br>      &quot;committer&quot;: {<br>        &quot;email&quot;: &quot;bart.ciszk@gmail.com&quot;,<br>        &quot;name&quot;: &quot;Bartek Ciszkowski&quot;,<br>        &quot;username&quot;: &quot;bartek&quot;<br>      },<br>      &quot;distinct&quot;: true,<br>      &quot;id&quot;: &quot;1870aa8285a40ac84debc34885314b0553c1de55&quot;,<br>      &quot;message&quot;: &quot;Fix COPY command in Docker&quot;,<br>      &quot;modified&quot;: [<br>        &quot;Dockerfile&quot;<br>      ],<br>      &quot;removed&quot;: [],<br>      &quot;timestamp&quot;: &quot;2019-01-15T21:14:45-05:00&quot;,<br>      &quot;tree_id&quot;: &quot;a791cf15588173a748df25d3b92208f31d384025&quot;,<br>      &quot;url&quot;: &quot;https://github.com/bartek/action-git-message/commit/1870aa8285a40ac84debc34885314b0553c1de55&quot;<br>    }<br>  ],<br>...<br>}</pre><p>This data was what came out when our script ran that <strong><em>jq </em></strong>command against the repository I was building for this project. You can see the latest commit (in which I made a typo on the <em>COPY</em> command). The above is just a tiny snippet of the metadata available to you in the GitHub event JSON.</p><p>Glorious! So much information. For our project, we’ll leverage the commits array, looking at each message, and validating it’s meeting our best practices. Yeah, this bot is a bit passive aggressive, but remember, this is just a way to learn! Your real live bot could be nicer.</p><p>Alright, let’s build out the core of this script. I loved this article on <a href="https://chris.beams.io/posts/git-commit/">git message best practices</a>, and it highlights these rules:</p><ol><li><a href="https://chris.beams.io/posts/git-commit/#separate">Separate subject from body with a blank line</a></li><li><a href="https://chris.beams.io/posts/git-commit/#limit-50">Limit the subject line to 50 characters</a></li><li><a href="https://chris.beams.io/posts/git-commit/#capitalize">Capitalize the subject line</a></li><li><a href="https://chris.beams.io/posts/git-commit/#end">Do not end the subject line with a period</a></li><li><a href="https://chris.beams.io/posts/git-commit/#imperative">Use the imperative mood in the subject line</a></li><li><a href="https://chris.beams.io/posts/git-commit/#wrap-72">Wrap the body at 72 characters</a></li><li><a href="https://chris.beams.io/posts/git-commit/#why-not-how">Use the body to explain <em>what</em> and <em>why</em> vs. <em>how</em></a></li></ol><p>My bash-foo was in for a serious test here, so I focused on ensuring <strong>rule 2</strong> has been met, while adding the functionality to post a comment on GitHub for all relevant commit sha’s. I’ll try to hide my lack of bash skills by saying I’m keeping the example simple to be concise, but I bet someone will come here, read this, and provide a one-liner to reduce my script to nothing (Actually — I’d appreciate that). Without further ado:</p><pre>#!/bin/bash</pre><pre>set -e<br>set -o pipefail</pre><pre>URI=<a href="https://api.github.com/">https://api.github.com</a><br>API_VERSION=v3<br>API_HEADER=&quot;Accept: application/vnd.github.${API_VERSION}+json; application/vnd.github.antiope-preview+json&quot;<br>AUTH_HEADER=&quot;Authorization: token ${GITHUB_TOKEN}&quot;</pre><pre>post_quality_control_message() {<br>   for i in ${!COMMIT_IDS[@]};<br>   do<br>      id=${COMMIT_IDS[$i]}<br>      curl -sSL -H &quot;${AUTH_HEADER}&quot; -H &quot;${API_HEADER}&quot; -d <a href="http://twitter.com/quality_message">@quality_message</a>.json -H &quot;Content-Type: application/json&quot; -X POST &quot;${URI}/repos/${GITHUB_REPOSITORY}/commits/${id}/comments&quot;<br>   done</pre><pre>}</pre><pre>main() {<br>   commits=$(jq --raw-output .commits &quot;$GITHUB_EVENT_PATH&quot;)</pre><pre>COMMIT_IDS=()<br>   for row in $(echo &quot;${commits}&quot; | jq -r &#39;.[] | <a href="http://twitter.com/base64">@base64</a>&#39;); do<br>     message=&quot;$(echo &quot;$row&quot; | base64 --decode | jq -r &#39;.message&#39;)&quot;</pre><pre>if [ ${#message} -ge 50 ]; then<br>        COMMIT_IDS+=&quot;$(echo &quot;$row&quot; | base64 --decode | jq -r &#39;.id&#39;)&quot;<br>        continue<br>     fi</pre><pre>done</pre><pre>post_quality_control_message;<br>}</pre><pre>main</pre><p>For the record, you can find all this code on my <a href="https://github.com/bartek/action-git-message">repository</a>.</p><p>There’s a few things going on here but, in summary:</p><ul><li>As a first step, I use <strong><em>jq</em></strong> to get the <em>commits</em><strong><em> </em></strong>from the Github Event data. This again is a JSON file provided by the GitHub Actions runtime environment</li><li>Our action is fired whenever there’s any push event in the repository (this is defined when you make the actual workflow), so we have the context of the git commit, among other details within our environment.</li><li>I then flex my non-existent bash muscles and iterate over each commit I’ve found in the JSON, capturing the length of the message, checking if it’s greater than 50 characters or more — and if so — storing that commit id for reporting later.</li><li>Then, iterating over all collected commit ids, I use the GitHub API to send a message to the commit comments. Here’s what that looks like:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNYVZgDVreiNAEOx4s55QA.png" /><figcaption>So friendly! A bit of work necessary on formatting!</figcaption></figure><p>And with that, we have a functional GitHub Action.</p><p>Now, what we’ve created today isn’t useful in isolation, but it’s given us some idea of what GitHub Actions can do! We’ve seen that we get a wonderful and slim runtime environment, we can run a variety of arbitrary commands, and we can interact with the GitHub API.</p><p>All these pieced together and you get quite the powerful ecosystem!</p><p>I really enjoyed spending some time with GitHub Actions and I have a general excitement about their capabilities. As someone who spends a significant part of his brain power thinking about how to improve process and reduce barriers for developers, this addition provides more enlightenment.</p><p>There’s a lot more for me to learn, and I hope you found this as a good start. I highly recommend the introductory talk for GitHub Actions, when they were introduced at <a href="https://www.youtube.com/watch?v=HCCkVz25UU4">AWS re:invent</a> earlier in 2018.</p><p>If you had issues running what I’ve provided in my <a href="https://github.com/bartek/action-git-message/">repository</a>, or want to provide additional input, please, reach out! I’d love to learn more.</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84f528a97015" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/things-i-learned-making-my-first-github-action-84f528a97015">Things I learned making my first Github action</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The top G Adventures Technology blog posts of 2018]]></title>
            <link>https://medium.com/g-adventures-technology/the-top-g-adventures-technology-blog-posts-of-2018-15a376563bb9?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/15a376563bb9</guid>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[travel-technology]]></category>
            <category><![CDATA[2018]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Adam McKerlie]]></dc:creator>
            <pubDate>Mon, 31 Dec 2018 19:07:12 GMT</pubDate>
            <atom:updated>2018-12-31T19:07:11.888Z</atom:updated>
            <content:encoded><![CDATA[<p>2018 was a productive year for the G Adventures technology team. We talked about <a href="https://tech.gadventures.com/how-we-support-a-global-company-d67976a9a468">how we support a global company</a> and about our <a href="https://tech.gadventures.com/tagged/marketing">marketing automation initiatives</a>. We set up two new offices, launched trip reviews, visa and vaccination requirements. We also wrote a lot more than in previous years (20 articles vs 9 in 2017). We also launched an industry first <a href="https://www.gadventures.com/about-us/ripple-score/">Ripple Score</a> to show you the percentage of money we spend locally on trip services like accommodations, restaurants, and transportation. As you can see, we’ve been a little busy but now on to the top posts of 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4t9apQr9kIDO5hzb" /><figcaption>Photo by <a href="https://unsplash.com/@jingdachen?utm_source=medium&amp;utm_medium=referral">Jingda Chen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>The most-read posts of the year</strong></p><ul><li><a href="https://tech.gadventures.com/modern-functions-in-python-3-80208c44ce47">Modern Functions in Python 3</a></li><li><a href="https://tech.gadventures.com/migrating-our-api-gateway-from-flask-to-django-88a585c4df1a">Migrating our API Gateway from Flask to Django</a></li><li><a href="https://tech.gadventures.com/hunting-for-memory-leaks-in-asyncio-applications-3614182efaf7">Hunting for Memory Leaks in asyncio Applications</a></li><li><a href="https://tech.gadventures.com/simple-react-transitions-a5f6bbb680a9">Animate React Component Loading</a></li><li><a href="https://tech.gadventures.com/we-taught-a-neural-network-to-write-a-blog-6463f619ac4c">We Taught a Neural Network to Write a Blog</a></li><li><a href="https://tech.gadventures.com/bringing-confidence-to-our-apis-uptime-through-elastic-search-c398599cf8ba">Bringing confidence to our API’s uptime through Elastic Search</a></li><li><a href="https://tech.gadventures.com/make-your-rest-resources-as-dumb-as-a-rock-fa64b3c71647">Make your REST resources as dumb as a rock</a></li><li><a href="https://tech.gadventures.com/how-to-stop-writing-code-as-a-people-manager-75ccef6061e0">How To Stop Writing Code As A People Manager</a></li><li><a href="https://tech.gadventures.com/deploying-code-at-g-adventures-577678a145c2">Simple Deploys using Fabric</a></li><li><a href="https://tech.gadventures.com/why-we-created-a-rest-api-at-g-adventures-b9a99abc86d">Why we created a REST API at G Adventures</a></li></ul><p>We’re excited to see what 2019 will bring. Have a safe and happy New Year!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15a376563bb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/the-top-g-adventures-technology-blog-posts-of-2018-15a376563bb9">The top G Adventures Technology blog posts of 2018</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we support a global company]]></title>
            <link>https://medium.com/g-adventures-technology/how-we-support-a-global-company-d67976a9a468?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d67976a9a468</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tech-support]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[customer-service]]></category>
            <dc:creator><![CDATA[Steve Ladgrove]]></dc:creator>
            <pubDate>Thu, 06 Dec 2018 00:34:21 GMT</pubDate>
            <atom:updated>2018-12-06T01:18:55.710Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the hardest parts of any organizations IT tech support structure is making sure that you’re providing top tier tech support every time a customer engages you. What happens however if you’re a worldwide organization? At G Adventures, we’re a company made up of an extremely diverse workforce. 25 offices worldwide with localized support in Toronto, London, Melbourne, Lima and Bangkok and additional locations as diverse as Nairobi, Delhi, Istanbul and Quito.</p><p>So how does our group of Solutionators (Our Helpdesk team name) manage to help the offices that we’re not localised in? What happens if one of our users needs admin rights at 1am in the morning? Or needs an updated copy of their favourite browser?</p><p><strong>Providing 24/7 service</strong></p><p>This is by far the most important aspect of our team. The support team are a completely reachable team at any time of day. Staff can reach out to us by submitting a ticket and it will hit our inbox to be dealt with. With having staff around the globe, we’re never offline. When one staff member clocks off for the day another one hops online. Slack also helps with this for any urgent requests, plus it helps that our team is full of awesome, service first minded people.</p><p><strong>Self Service Tools</strong></p><p>Let me preface this paragraph to tell you that I’m a total Apple and JAMF fanboy. We’re predominately an Apple OS company and we use Casper’s Mobile Device Management program, JAMF Pro, to manage our Macs and IOS devices. <a href="https://www.jamf.com/">JAMF’s Self Service</a> is the perfect tool we leverage to empower our customers to help service their own computers and not always need to rely on the support team to install apps or services that they need in their roles. Why is this great? Firstly, it gives end users instant access to a full self service, self help destination of diversified resources. If the user needs an update to Chrome, Firefox, Adobe or Slack it’s in Self Service. We have full control over what is installed on the end users machines, all apps that are in the Self Service catalogue are approved and pushed by us. A common example is that as a company, our users are always travelling, so let’s say they need a printer installed instantly and they’re in an office where they don’t have localised support. We’ve been able to create a subheading in Self Service for worldwide printers that the user can install the printer of the office that they’re in. Instantly. It’s game changing!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xi6eEO-x_OGChAPHOywI6g.png" /><figcaption>Our self service catalogue for our users</figcaption></figure><p><strong>A Culture of sharing and collaborative technology</strong></p><p>We leverage Google’s G Suite tools to effectively use collaboration in our workplace. It’s the perfect tool for us to bridge the gap between the vast distances and time zones our environment shares. Using G Drive as a company is the perfect way for us to never feel like we’re never out of the loop as we can check in on documents and work together in one workspace without having any interruptions in workflow. Drive allows multiple people to edit on the same document at the same time, if you’re into that sort of thing.</p><p><strong>Great meeting spaces worldwide</strong></p><p>There’s nothing better than having our offices around the world fitted with the best technology and meeting rooms so it’s a comfortable work environment for our staff to work in. And that’s where <a href="https://zoom.us/">Zoom Rooms</a> come in. Every user has a Zoom profile and can connect with any of our users anywhere in the world. We then have 17 zoom rooms worldwide where our users can enter a room and the technology is set up and ready to use. It’s great for large team meetings, or for 1 on 1’s that a manager is on the other side of the world. The Zoom client is also available in our self service catalogue if anyone needs access to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*FZbmxE9YaQaGTYIM4Ghrkg.jpeg" /><figcaption>The Beatles Room in the Summit (our London office). Zoom supported.</figcaption></figure><p><strong>Aligning the support team globally</strong></p><p>From our end, it helps reduce help desk tickets and support costs while maintaining control of our environment. Aside from this, it takes a lot of the tier zero jobs away from us so we can prioritise more important tasks.</p><p>And that’s what it’s all about. More time to focus on bigger picture projects and get our team away from the things our end users can easily do themselves!</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d67976a9a468" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/how-we-support-a-global-company-d67976a9a468">How we support a global company</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Stop Writing Code As A People Manager]]></title>
            <link>https://medium.com/g-adventures-technology/how-to-stop-writing-code-as-a-people-manager-75ccef6061e0?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/75ccef6061e0</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Bartek Ciszkowski]]></dc:creator>
            <pubDate>Mon, 01 Oct 2018 13:11:03 GMT</pubDate>
            <atom:updated>2018-10-01T13:42:34.169Z</atom:updated>
            <content:encoded><![CDATA[<p>Congratulations! You’re off to great places, you’re off to many meetings, and you’re in charge of real, live people!</p><p>But hey, you’ve been a developer since as long as you remember. You’re going to miss this stuff. So, you’ve decided to take time out of your evenings to hobbyist develop.</p><p>You quickly realize it’s been 3 weeks since you said that and you’ve had not a single night coding — you’ve been too damn tired.</p><p>So, you change it up. You’re going to fix the “small” things that come up. You’re both going to manage your new people <em>and</em> help them out even more by fixing all the little things they don’t have time for!</p><p>Do we see that? That’s your burn out and inability to let go creeping up. That can easily happen. Now, let’s discuss how we prevent that.</p><h3>The People, Help Them Soar</h3><p>First and foremost, who is number one? Your reports. They are your people. They are the ones who you need to ensure have growth opportunities, feel like they can speak to you with honesty, and realistically, are the ones who will be the ones developing all code within the products you manage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LblurB8j2ZPhQo30" /><figcaption><a href="https://unsplash.com/@nesabymakers?utm_source=medium&amp;utm_medium=referral">NESA by Makers</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You’re likely the one who developed most of the systems you’re now managing. You have opinions, they are probably quite strong — after-all, this gusto is what got you this job — but, it’s time to move on!</p><p>Step one, it’s time to relinquish ownership. Ownership is a strong word with many layers and we want to be careful with its usage. You want to focus on creating champions, who will actually form organically by being passionate individuals who get things done. These champions will go the extra mile to connect to the bigger picture and support the people on your team.</p><p>And, it’s about building that trust with your people. Continuously, through repetition and positive reinforcement that these projects are theirs to build on. Never stop that and be consistent, because that trust will take months, if not years to build, and can very easily crumble with a few inconsistent moves.</p><p>You want to let this run its course naturally. Let people tinker, fail a bit, and of course, succeed. Let them feel accomplished and ownership of the work they do. It’s not <em>my</em> project anymore, it’s <em>our</em> project, and you’re in charge of making sure everyone feels that way.</p><p>Because, if you’re the guy still digging that hole, you’re going to forget you’re building a highway — and you’re the one that needs to focus on the highway.</p><h3>Figure Out Your Focus</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qNXdI5__Xtm_r5nk" /><figcaption><a href="https://unsplash.com/@rawpixel?utm_source=medium&amp;utm_medium=referral">rawpixel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You’ve given up coding cold turkey! You’re done! Your team is flying along, building cool stuff. Sprints are going great and everyone’s aligned. You’re feeling pretty damn good about your manager skills.</p><p>But then, you begin to think .. <em>“I’ve been in a lot of meetings and spending a lot of time in Trello (or Jira, or whatever your poison) lately”</em> It’s a lot, and you’re a bit flustered. This .. is not what you signed up for.</p><p>This moment doesn’t happen to everyone, but it can, and when it hits, it sucks.</p><p>Thus, you must adapt your role to meet your career growth needs, while also bringing the best to your team. A few examples:</p><ul><li>When scoping a project, work with the stakeholders and dig deep. You have the time and opportunity to learn the business at another level. A stronger scoping document will ultimately benefit everyone</li><li>Work on the larger vision and initiatives which impact your team. Go beyond the tasks and projects within the Sprint. Use your business knowledge, technical experience, and knowledge of larger issues beyond your team to set initiatives that move not only your team, but the business forward. Take ownership of these initiatives and don’t wait for others to tell you how or when to do them.</li><li>Find opportunities that connect your team members to challenges beyond their team. Again, this is about that bigger picture, and you’re always thinking of it in a way that benefits your people. That’ll help them grow, and naturally, you’ll grow too.</li><li>Big decisions like what database you’re going to use can impact a business for years. If you are the most senior on your team and they are young, this is a good opportunity to practice your research and architecture chops. Research, plan, and share with your team on these big-picture ideas. Then, let them be the ones to execute it based on your guidance.</li></ul><p>Focusing on the bigger picture means the work you do has a larger impact and will be felt by the company for years. Your focusing on <em>guidance</em> and <em>mentorship</em>, and less on day-to-day management (maintenance mode!). Here’s where you can truly be an agent of change and develop your growth through your technical &amp; business experience, while continuously empowering the people around you.</p><h3>Don’t Add Fuel To The Fire(s)</h3><p>If you’ve been at your business for a while and you’ve played the role of that senior developer / technical lead, you’ve probably collected an assortment of fires you put out on a regular basis.</p><p>Some cron breaks once every 162 hours and you’re not sure why, this dashboard needs a kick each Sunday, and this process required to make another department function needs data cleanup once a week.</p><p>All these little fires you put out each week — They are unproductive! And can ultimately lead to you building resentment towards the people behind those processes.</p><p>Leverage your team. Look for new ideas, or as per above, find an initiative that can wipe these out. Stop spending time on these menial tasks because they will simply kill you. I’m not joking!</p><p>You’re not protecting your team by hiding these from others, and you’re simply doing a disservice to everyone. Find the ones that bring the biggest frustrations and set a clear path to either deprecate, or fix it once-and-for-all.</p><h3>You Can Still Code</h3><p>I don’t want you to have read this post and now be living with a Post-It note on your monitor that says <em>“Don’t Code!!!”</em></p><p>Remember, coding is something you’ve been passionate about for a long time. There’s no reason to go cold turkey as mentioned above. We have to be honest with ourselves!</p><p>And, with respect to being focused, you have to find the right areas where you can still enjoy that creative process without hampering the growth of your team. You should see coding as that relaxed meditative activity for you, and not playing catchup.</p><p>When you find what that could be, you’ll enjoy that time so much more. For me, it has been spending time improving our <a href="https://developers.gadventures.com/docs/index.html">documentation website</a>, tinkering with Slack bots, and reading on higher level architecture (Currently reading <a href="https://dataintensive.net/">Designing Data-Intensive Applications</a>, great book!). These initiatives are done on my own pace and not critical to the business. They are things I am passionate about — Yes, I am passionate about documentation! — and fit that need I have to open up <em>vim</em> and stay connected to the technical world.</p><p>People management can be tough and there’s a lot of ways you can fail at it. It’s not for everyone, but it’s also about being honest with yourself and carving out the path that makes you happy. Ultimately, by doing this, you’ll empower the people around you, grow yourself, and succeed beyond your wildest expectations.</p><p>There’s a large assortment of great writing about how to be a good people manager, and I’ll allow you to peruse Google for those. If you’re in such a role, or thinking of moving into it, I’d love to <a href="/service/mailto:bartekc@gadventures.com">talk to you</a> and learn from you.</p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75ccef6061e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/how-to-stop-writing-code-as-a-people-manager-75ccef6061e0">How To Stop Writing Code As A People Manager</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketing automation: maximise your return on effort]]></title>
            <link>https://medium.com/g-adventures-technology/marketing-automation-maximise-your-return-on-effort-ed67b044c60b?source=rss----314740103cb7---4</link>
            <guid isPermaLink="false">https://medium.com/p/ed67b044c60b</guid>
            <category><![CDATA[marketing-automation]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[email-marketing]]></category>
            <dc:creator><![CDATA[Phillip Wild]]></dc:creator>
            <pubDate>Sat, 29 Sep 2018 20:39:26 GMT</pubDate>
            <atom:updated>2018-09-29T21:39:44.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S2RHPACpWACICJoi" /><figcaption>Photo by <a href="https://unsplash.com/@chrisliverani?utm_source=medium&amp;utm_medium=referral">Chris Liverani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When evaluating automated marketing campaigns, generally speaking, ROI isn’t the best measure.</p><p>Why? Well, in general, you don’t pay by the email for your marketing automation software, or for your own time — making the “cost” part of the equation difficult to pin down. And with the <a href="https://litmus.com/blog/the-roi-for-email-marketing-the-good-news-and-the-bad-news">average ROI of email marketing being 38:1</a>, the channel is so clearly profitable that it’s rarely a question of whether to proceed or not. Rather, it should be a question of what you could be doing that is a more worthwhile use of your time. <strong>What is the return on effort?</strong></p><p>So here’s the question. Day-to-day, are you spending your time setting up the campaigns and architecture that will have the biggest impact on your business? Or is it more one-off, short-term projects? Being able to recognize the difference will separate good results from great results.</p><p>Let me illustrate with a real-life example. Like many businesses, at G Adventures there will always be the need to advertise <a href="https://www.gadventures.com/search/">our tours</a> that are at risk due to fixed costs. Once you’ve paid to charter a boat, whether you have one passenger or one hundred, the fixed cost doesn’t change. That’s a reality that leads to sales of particular products each month.</p><p>The decision is now how you act on these sales. There are two competing options here:</p><ol><li><strong>To send a one-off batch email that will advertise the discounted tours and fill those spots</strong>. The message is something like “In the month of January, product x is 15% off.” This will really only work to those who are considering our product already (travel generally isn’t an impulse-buy).</li><li><strong>To set up automated emails which will send to qualified customers all year, introducing the relevant tours. </strong>This approach won’t sell much in the short term since it won’t mention the sale. But, it will “fill the funnel” with qualified leads all year, which should reduce the need to have future sales.</li></ol><p>Working in marketing automation, <strong>option 2 should be the most appealing</strong>. It will go out year round, meaning that the email you craft will work away in the background with no further effort on your part. <strong>With option 1</strong>, once it’s sent, it’s done. The sale is over and no other leads will see your work.</p><p>If you have 20,000 people in your database at the start of the sale, and then add 1,000 people each month until the end of the year, that means that Option 1 will go out to 20,000 people — but Option 2 will go out to 32,000 people. And that’s just in the first year. Or to put it another way, <strong>Option 2 has a higher return on effort.</strong></p><p>But wait, I hear you say. My boss has a revenue number to drive. I can’t simply refuse to advertise the sale. That’s not how it works.</p><p>Fair enough. But there are ways to have the best of both worlds and drive your return on effort even higher. In the example above, we were able to put a dynamic block into the email which advertised the sale <em>only if the email deployed in the month the sale was active. </em>That way, we got the advantages of an “evergreen” nurture email with the short-term advantages of pushing the sale to qualified leads.</p><p>Granted, this example is not applicable to every business. But the underlying principle is. It’s all too easy to spend your time on short-term solutions in a monthly cycle, never actually improving the underlying architecture which could solve the problem before it begins. Cast a critical eye over your work and ask yourself: <em>Is this giving us the best return on the effort we are putting in?</em></p><p><em>Keep following us on </em><a href="https://tech.gadventures.com/"><em>Medium</em></a><em> and </em><a href="https://twitter.com/gadventurestech"><em>Twitter</em></a><em> for more snippets of the Tech world according to G!</em></p><p><em>Want to help G Adventures change people’s lives and travel the world? </em><a href="https://gadventures.com/careers"><em>Check out all our jobs and apply today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed67b044c60b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/g-adventures-technology/marketing-automation-maximise-your-return-on-effort-ed67b044c60b">Marketing automation: maximise your return on effort</a> was originally published in <a href="https://medium.com/g-adventures-technology">G Adventures Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>