<?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[Plum Guide - Medium]]></title>
        <description><![CDATA[Stories from the team behind the Plum Guide - Medium]]></description>
        <link>https://medium.com/plumguide?source=rss----a8ab03de32bf---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Plum Guide - Medium</title>
            <link>https://medium.com/plumguide?source=rss----a8ab03de32bf---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 20:18:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/plumguide" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Scaling the business with Deep Learning — Part 2]]></title>
            <link>https://medium.com/plumguide/scaling-the-business-with-deep-learning-part-2-e78f00abe181?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/e78f00abe181</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Manos Loukadakis]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 12:55:52 GMT</pubDate>
            <atom:updated>2021-10-11T16:15:00.811Z</atom:updated>
            <content:encoded><![CDATA[<h3>CriticNet: Scaling the business with Deep Learning — Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xkl_DuzQ60lH8BUz8gMieg.jpeg" /><figcaption>Marvel Vision</figcaption></figure><h3>Introduction</h3><p>In the previous <a href="https://medium.com/plumguide/criticnet-scaling-the-business-with-deep-learning-68db9efa0aad">article</a>, we explained what CriticNet is, how it is used to grade homes in terms of quality, and how CriticNet helps significantly to scale up home acquisition.</p><p>CriticNet requires input of four images, one image per room type (bathroom, bedroom, living room, kitchen) to score the home. Unfortunately, the dataset we had to do this was far from perfect, this required various problems to be addressed to reach the point where we end up with the best image per room type.</p><p>In this blog post, I will talk about the steps that need to be taken to clean out, preprocess the dataset and bring it to the desired format to feed it to CriticNet.</p><h3>Dataset Challenges</h3><p>The dataset we are assessing is a list of homes on other external platforms. This dataset is provided to us by a third-party provider and you can see what it looks like in <em>Figure 1. </em>It contains a unique identifier of a home and URL links of the images of the home.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nwmn8ntMFCyTKX3KB87nyg.png" /><figcaption>Figure 1: Dataset in Snowflake</figcaption></figure><p>As you can see, the images — links are not classified in any room type and each home contains ~40 images on average. Figure 2 depicts the images from <a href="https://www.plumguide.com/homes/28273/the-whalers-cottage">The Whaler’s Cottage</a> and you can see that there are few challenges we need to overcome.</p><p>First of all, there are images from outdoor spaces which are not useful for grading the home. So these images are just noise we need to get rid of. In addition, indoor images are not always useful. These images usually don’t depict the space of the room so it is difficult for the grader to figure out whether the room meets the Plum standards or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*Zm3HGg9QB3VB3M2jDOEWXw.png" /><figcaption>Figure 2: <a href="https://www.plumguide.com/homes/28273/the-whalers-cottage">The Whaler’s Cottage</a></figcaption></figure><p>To clean and preprocess the dataset, we need to divide and conquer the problem. More specifically, we need to tackle the following challenges:</p><ul><li>Classify images into room types: This is a classification problem in which we have to classify an image into a room type, living room, bedroom, bathroom, kitchen, or outdoor space.</li><li>Then we need, for each room type, to pick the image which best represents the room and this is a hard problem.</li></ul><h3>Room Classification</h3><p>The first task is to build an image classifier that predicts the room type of a given image. This problem doesn’t seem hard, as we can use state-of-the-art deep learning models. Let’s take a look at the dataset first.</p><h4>Dataset</h4><p>Unfortunately, at <a href="https://www.plumguide.com/">Plum Guide</a>, we don’t classify images into room types so there is not any in-house dataset that we can use. So, we built a crawler that inputs the keywords living room, bathroom, kitchen, bedroom, and outdoors in google search and fetches the images from the web. In that way, we created a decent dataset (see Figure 3). The dataset seems balanced among the 5 classes (<em>see Figure 5</em>) so we can start developing and training our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qJZOMWLMPQOJeYFLpByKIQ.png" /><figcaption>Figure 3: “Living room” results in Google search</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wKWUWApb_j7qRjLlMXr_dQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AULF2O9B_XdhAXUm0Vd1Gw.png" /><figcaption>Figure 4: Example of how the dataset looks like (left) and the distribution of the classes (right)</figcaption></figure><h4>Training and Evaluation</h4><p>The dataset size is not big enough for training a deep learning model from scratch, so we applied transfer learning and fine-tuned the weights of the pre-trained neural network. The pre-trained model that we picked to retrain is the <strong>EfficientNetB7</strong> which achieves the highest accuracy with a relatively small number of parameters. The steps that we followed to train the model are:</p><ol><li>We kept the top layer weights frozen (convolutional layers) and retrained with a high learning rate the softmax layer of 5 classes. In that way, we help the weights in the softmax layer to adjust to the pre-trained weights of the top layers of the network.</li><li>Then we trained the whole network with a small learning rate. The small learning rate helps to adjust the weights of the network on our dataset. Small learning rates keep the information of the pre-trained model. Remember it’s the final tweak of the weights so we don’t want big changes.</li></ol><p>The model achieves <strong>96.3% precision </strong>and<strong> 95% recall. </strong><em>Figure 5</em> depicts the precision-recall for different threshold values. The optimal threshold seems to be 0.5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*BUQz6huF0Yd9yO54T0fnGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*zUWX7dIvu1DbkvwD_MycCw.png" /><figcaption>Figure 6: Precision-Recall Curve</figcaption></figure><p>Let’s dig deeper into the evaluation results. In <em>figure 6</em>, we plot the confusion matrix, which gives us a clear picture of the performance of the classifier in each class. A few key observations are:</p><ul><li>The model always predicts correctly whether the photo is an outdoor space. However, because the outdoor spaces can be anything in the real world we should expect some misclassifications of the model in new unseen data when the model runs in production.</li><li>The living room class has the lowest performance with a precision score of 91% and recall 88%. Figure 7 shows the false positives and false negatives for the living room class. From the image below we notice that some images which don’t capture enough room space are very difficult to classify.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*-RYtYUWC-eWYiM4-cvvZDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*o1BZJnyJ-xqFxJkSFHVfFA.png" /><figcaption>Figure 7: Living room false negatives (left) and false positives (right)</figcaption></figure><h3>Robojack</h3><p>The second challenge we need to tackle is to figure out how to pick the best image per room type. First of all, we need to define what a good image means.</p><p>Imagine you are a home critic and you need to decide if a home is of high quality only from the photos. You need to have photos that capture as much of the room as possible. This is what we mean when we talk about photo composition.</p><h4>Dataset</h4><p>Our brand-quality team had compiled a dataset that contained photos of homes and each photo is categorized into two categories. The photoshopping meets the Plum standards or not (see <em>figure 8 </em>and<em> figure </em>9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*rfV9dLVFgJ-TQr13lxcs_w.png" /><figcaption>Figure 8: High-quality images</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*uBkRb2rb9Q7UsbMacKvf1g.png" /><figcaption>Figure 9: Low-quality images</figcaption></figure><h4>Training</h4><p>This is a binary classification task because the target variable is binary (meet Plum standards or not). In terms of the modeling, we will retrain and fine-tune again a pre-trained deep learning model. There are two options here:</p><ol><li>First, classify the images into room types and then retrain four deep learning models, each one for each room type. In that way, the training data would be more homogeneous and the task for the classifier is easier.</li><li>Simply train one model for all the images. This task is harder however it makes our life easier in the development of the whole pipeline and cheaper.</li></ol><p>We decided to go with the second option. However, in the future, we plan to try the first approach too.</p><p>The model we used is again the <strong>EfficientNetB7 </strong>and we followed the same approach in the training phase as before.</p><h4>Evaluation</h4><p>The model achieved <strong>88.1% precision</strong> and <strong>88.3% recall. </strong>From the confusion matrix (see <em>Figure 9), </em>we can see that the <strong>false negatives are 13%</strong>, which means that the classifier predicts wrongly that the quality of the image doesn’t meet the Plum standards (high photo shooting quality), and <strong>10% false positives</strong> which means that the classifier predicts wrongly that an image is high-quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*F_SUXEdojjnwm4K5qMhluQ.png" /><figcaption>Figure 9: Confusion matrix</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*nN0in8q7qQ7ZgrM9wKp8Dg.png" /><figcaption>Figure 10: Robojack false positives and false negatives results</figcaption></figure><h3>CriticNet Architecture</h3><p>So far, we have presented how we can clean and preprocess our dataset by using the room classifier to classify the photos of a home into room types and classify images into high-quality photography and low-quality photography. Now we will talk about how all these models are being assembled to grade homes automatically.</p><ol><li>The first step is to classify all the raw home images into room types. The reason we do this is that we want to get rid of outdoor space images and also we want to pick the best images per room type and feed them to CriticNet.</li><li>In the next step, we need to filter out images whose photo composition is poor. More specifically, we want to keep the images that depict as much space of the room as possible and ideally the best ones. For that reason, we feed the images to Robojack. Robojack classifies the images into high-quality images and low-quality images. It is a binary classification so the output is a score that expresses the probability that a given image is high-quality. From a set of images of the same room type, we pick the image with the highest probability to be high-quality. In that way, we end up with four images per home, and we are ready to make predictions with the CriticNet (see <em>Figure 11</em>).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqFpEOphn4YbvHYEv-ZnqA.png" /><figcaption>Figure 11: Automatic Grading Architecture</figcaption></figure><h3>Conclusion</h3><p>In this blog post, we described how we managed to use deep learning models to clean and preprocess the original dataset for consumption by the CriticNet. The room classifier and Robojack are not perfect and the potential misclassification errors propagate to CriticNet. However, <a href="https://medium.com/plumguide/criticnet-scaling-the-business-with-deep-learning-68db9efa0aad">CriticNet has shown exceptional performance on filtering out homes with very low quality</a>, which helped the scaling of the home acquisition of the business significantly.</p><p>As you may have noticed, we use only one image per room type. However, homes can have multiple different rooms of the same type. Currently, CriticNet doesn’t deal with this case. By picking the best images per room type is one of the reasons that the precision of CriticNet is relatively low (~66%).</p><p>If you like our work and are interested in solving challenging problems, we are hiring engineers to work with the data science team on rebuilding the <a href="https://www.plumguide.com/search">search experience</a><strong>. </strong>You can apply <a href="https://boards.greenhouse.io/plumguide"><strong>here</strong></a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e78f00abe181" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/scaling-the-business-with-deep-learning-part-2-e78f00abe181">Scaling the business with Deep Learning — Part 2</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A look into React state management in 2021]]></title>
            <link>https://medium.com/plumguide/a-look-into-react-state-management-in-2021-5fc46a247e65?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/5fc46a247e65</guid>
            <dc:creator><![CDATA[Ian Huntington]]></dc:creator>
            <pubDate>Wed, 21 Jul 2021 08:16:55 GMT</pubDate>
            <atom:updated>2021-07-21T08:16:55.049Z</atom:updated>
            <content:encoded><![CDATA[<p>At Plum Guide we have been primarily using React’s Context and useState to manage state within apps. This has worked well so far, for example on the listing pages, where state is shared in multiple branches of the React tree and there are a number of interactive components.</p><p>With some forthcoming projects that include search and host dashboard, I had the opportunity to investigate other state management libraries to see what other alternatives there are.</p><p>Our current approach to building with React is to start with either <a href="https://nextjs.org/">Next.js</a> or <a href="https://create-react-app.dev/">Create React App</a> depending on a projects particular set of requirements, such as whether server-side rendering is needed. Our frontend architecture consists of multiple micro-frontends and code is shared between these by a variety of internal libraries, including a component library.</p><h3>Best practices with React Context</h3><p>Over time as projects grow in terms of feature set and complexity, the amount of state that is contained also grows. To keep the complexity manageable we’ve adopted some best practices that have worked well for us when using the Context API:</p><ul><li>Keep state local until it needs to be shared with a common ancestor, if a sibling component depends on the state then lift it to their parent and pass it down to the components as a prop.</li><li>If a piece of state is required by multiple branches of the component tree (global state) then its a good time to introduce a provider.</li><li>Rather than store all state within one Context, separate state out into logical pieces. You may also find that not all providers need to be at the top of the React tree wrapping your entire app either. Use them where they are needed.</li><li>By using functional components React can make optimisations such as comparing props to determine whether a component needs to re-render. Optimise only when and where required.</li></ul><p>Even though we’re following the above we decided to have a look at what other options are available to us. Initially two libraries spring to mind: <a href="https://redux.js.org/">Redux</a> and <a href="https://mobx.js.org/">MobX</a>. While I have used Redux on past projects, it is rather verbose with actions, dispatchers and reducers, although it is quite nice to work with. Recently I noticed developers talking about some new state management libraries that have been created. I’m going to take a look at a couple of them here to see what they offer and how they differ from existing approaches.</p><h3>Zustand</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ej-1rHTfJ5ji7_5XscrWg.jpeg" /><figcaption>A happy bear playing the guitar</figcaption></figure><p><a href="https://github.com/pmndrs/zustand">Zustand</a> is a small and unopinionated library with a simplified take on the <a href="https://facebook.github.io/flux/docs/in-depth-overview">flux architectural pattern</a>. Like <a href="https://redux.js.org/">Redux</a> a store is used to hold state but does not require you to dispatch actions or implement reducers to modify a store’s state, instead hooks are used to read state.</p><p>The main API method is create which is used to create a store and this function receives two arguments: set and get. The function will return a hook to be used within a component.</p><p>The set function is used to set state in the store but it is important to note that this will also <strong>merge in the value you pass to it</strong>. This means you do not need to read the state of the store and merge a new value in manually.</p><p>The get function can be used to read the current state within an action, such as when you want to derive state from the store.</p><p>Here is an example of a booking form containing checkin and checkout dates, and the number of nights derived from those values:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4e1a28c66a765ad31292ca11d3bba09/href">https://medium.com/media/d4e1a28c66a765ad31292ca11d3bba09/href</a></iframe><p>To consume the store within a React component, call the useStore hook. While you can read the entire state of the store, it is best to select the value(s) you need for a component. Otherwise if another value in the store changes, the component will re-render unnecessarily.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8123bffc5f1c03781f44444fe0e5421/href">https://medium.com/media/f8123bffc5f1c03781f44444fe0e5421/href</a></iframe><p>In the example above two selectors were used to read the check in and check out dates. Zustand though provides a method to select multiple values at once with a shallow compare by using the shallow equality function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf3fb7cc2e6998e6257274cf280230c2/href">https://medium.com/media/cf3fb7cc2e6998e6257274cf280230c2/href</a></iframe><p>Some other nice features of Zustand are the ability to <a href="https://gist.github.com/ihuntington/ec6aa343ea1cd7db3b7a64d2c5c97dcc">add middleware</a> and make use of <a href="https://gist.github.com/ihuntington/ec6aa343ea1cd7db3b7a64d2c5c97dcc">Redux devtools</a>.</p><p>One example of using middleware I particularily like is configuring the set function to act as an <a href="https://immerjs.github.io/immer/">Immer</a> proxy allowing you to mutate deeply nested objects:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e302cb4755754de2a3170f3088f050cc/href">https://medium.com/media/e302cb4755754de2a3170f3088f050cc/href</a></iframe><p>To summarise, Zustand builds on top of great ideas from Redux and simplifies the flux pattern while having a small API and bundle size (1.7kb minified).</p><h3>Atomic state management libraries</h3><p>In 2020 two new libraries emerged; <a href="https://recoiljs.org/">Recoil</a> from Facebook and <a href="https://docs.pmnd.rs/jotai/introduction">Jotai</a> from the same team that made Zustand. Both libraries solve the following problems:</p><ul><li>Performance in large React trees where components in different branches of the tree need to stay in sync.</li><li>When context providers are coupled to individual components. Otherwise if multiple component’s state were in the same provider, whenever the state changes all the components will re-render.</li><li>Providers that need to be dynamically inserted at the root of the tree</li></ul><p>The solution that both libraries implement is to have small, shared units of state called “atoms”. An atom can be subscribed to by components, multiple atoms can be composed together, and atoms can be used to derive data from state.</p><p>It should be said that Recoil was created to solve some specific problems in a large, interactive app at Facebook where there were also requirements for persistence, robustness and some developer-centric functionality such as time-travel debugging.</p><p>I highly recommend watching <a href="https://youtu.be/_ISAA_Jt9kI">Dave McCabe’s introduction to Recoil video</a> that was shown at React Europe. Dave goes through the various problems that Recoil solves with some helpful diagrams and demos. These principles are also applicable to Jotai.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_ISAA_Jt9kI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_ISAA_Jt9kI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_ISAA_Jt9kI%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/220b61dbcebf1e04596ad47511c1c7b0/href">https://medium.com/media/220b61dbcebf1e04596ad47511c1c7b0/href</a></iframe><p>There are couple of key differences between the two libraries:</p><ul><li>Recoil requires atoms to have a globally unique string key, whereas Jotai compares objects referentially</li><li>Recoil has support for <a href="https://reactjs.org/docs/concurrent-mode-intro.html">React concurrency mode</a></li><li>Jotai has a smaller and more concise core API</li></ul><p>For an even more in-depth comparison between the two libraries I recommend reading <a href="https://blog.logrocket.com/jotai-vs-recoil-what-are-the-differences/">Jotai vs. Recoil: What are the differences?</a> by Yaroslav Lapin.</p><p>Here I’m going to have a look at Jotai more in-depth because it has a smaller API and I’m following on from <a href="https://kentcdodds.com/blog/application-state-management-with-react#what-about-performance">reading recommended advice</a> by <a href="https://kentcdodds.com/">Kent C Dodds</a> in his article <a href="https://kentcdodds.com/blog/application-state-management-with-react">Application State Management with React</a>.</p><h4>Jotai</h4><p>The core functions are atom and useAtom hook (which is similar to React.useState) and Provider. When creating an atom you can pass it an initial value or you can create a derived atom. There are three types of derived atom:</p><ul><li><strong>read only:</strong> pass a read function as the first argument and this will have access to a get function.</li><li><strong>read and write:</strong> pass a read function as the first argument and a write function as the second. The write function will have access to a get, set and update methods.</li><li><strong>write only:</strong> pass null as the first argument and a write function as the second.</li></ul><p>With that, here is an example of the booking form using a derived read atom to get the number of nights based on checkin and checkout:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d658ac65d45aaec9f59f212e188b939d/href">https://medium.com/media/d658ac65d45aaec9f59f212e188b939d/href</a></iframe><p>We can then consume the atoms within a React component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c98c53e7b5090a606499ab90f6eeb58/href">https://medium.com/media/2c98c53e7b5090a606499ab90f6eeb58/href</a></iframe><p>The provider can be passed a set of initialValues and ascope property to scope atoms, this is useful if creating a component library for instance.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2398f47562509f795118cc364889d788/href">https://medium.com/media/2398f47562509f795118cc364889d788/href</a></iframe><p>It is worth noting that read atoms can be asynchronous, however, when it comes to server-side rendering the atom will need to <a href="https://docs.pmnd.rs/jotai/guides/nextjs#you-can-t-return-promises-in-server-side-rendering">return either pre-fetched data or an initial value</a>.</p><p>Jotai also comes with a set of <a href="https://docs.pmnd.rs/jotai/api/utils">utility functions</a> and <a href="https://docs.pmnd.rs/jotai/api/devtools">developer tools</a> which mirror some of Recoil’s own functionality. Jotai also has a set of integrations with other libraries that include Immer and <a href="https://docs.pmnd.rs/jotai/integrations/optics">Optics</a>.</p><p>As an alternative to React Context and useState, Jotai provides a number of features in a small package.</p><h3>Our next steps</h3><p>Earlier this year we decided to move our component library to use CSS-in-JS. <a href="https://ruijdacd.medium.com/">Rui Duarte</a> has written an <a href="https://medium.com/plumguide/migrating-to-css-in-js-part-1-e93f60b57eba">article explaining the process</a> and the reasons why. One of the reasons was to improve performance but at the same time it gave us an opportunity to improve how state is managed within some components.</p><p>As an example we have refactored a slider into smaller components along with introducing it’s own provider. This enables use to have more <a href="https://kentcdodds.com/blog/compound-components-with-react-hooks">declarative compound components</a> and to create multiple variations of the slider too.</p><p>While we’re continuing to improve how we manage state on existing projects with React Context, we have some ambitious and state heavy projects coming along soon and we’re excited to put some new approaches to the test.</p><h3>Final thoughts</h3><p>Before reaching for a library though there are a couple of ways to make sure your app is performant:</p><ul><li>Keep state local until it needs to be shared with a common ancestor</li><li>Separate state into multiple logical providers</li><li>Keep providers close to where they need to be used</li></ul><p>Hopefully I have given you a flavour of a couple of libraries that interested me when researching into React state management. I’m looking forward to using them in the future and exploring their capabilities further on personal or work projects.</p><p>If you’re using one of the libraries mentioned and have some advice, or I’ve missed something, please share.</p><p>If you’re like us and love to share your work with your peers, and interested in challenging problems and scalability, <a href="https://boards.greenhouse.io/plumguide"><strong>we are hiring!</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc46a247e65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/a-look-into-react-state-management-in-2021-5fc46a247e65">A look into React state management in 2021</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CriticNet: Scaling the business with Deep Learning]]></title>
            <link>https://medium.com/plumguide/criticnet-scaling-the-business-with-deep-learning-68db9efa0aad?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/68db9efa0aad</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Manos Loukadakis]]></dc:creator>
            <pubDate>Mon, 12 Jul 2021 09:47:51 GMT</pubDate>
            <atom:updated>2021-07-22T09:22:23.766Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bWrwXgNbsnOwcgUW.jpeg" /></figure><h3>Introduction</h3><p><a href="https://www.plumguide.com/">Plum Guide</a> is not just a booking platform. Plum Guide is the benchmark for the best homes in the world. Our Mission is to become the new global quality standard for vacation homes. Just 3% of the homes in each destination win the <a href="https://www.plumguide.com/journal/plum-award-winners-highlights-from-2020">Plum Award</a>.</p><p>In the last 18 months, we have scaled our operations by 10x, from originally having homes in 12 large cities to now having homes in over 100 destinations.</p><p>The story I am going to tell you here is about how a Deep Learning model has helped to scale our acquisition efforts in only 1 year, despite having a smaller acquisition team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrOVH2TYxpnR8w_rGBdm3w.jpeg" /><figcaption>Figure 1: <a href="https://www.plumguide.com/homes/37023/desert-ace">Desert Ace</a> in Palm Springs</figcaption></figure><h3>Curating Homes — The old way</h3><p><a href="https://www.plumguide.com/">Plum Guide</a> was founded back in 2015 and since then we have been continually adding the best vacation homes to our platform for guests to book. Before adding a home to our platform, there are two types of tests that the home needs to pass.</p><p>Firstly, the Acquisition team evaluates each home by reviewing all of its photos. The Acquisition team is strict, and I mean very strict :) meaning there are numerous criteria that the home must pass.</p><p>If the team sees potential, we then arrange for a Home Critic to visit the home, in order to ensure the home meets the Plum Guide standards. Sounds pretty demanding, huh?</p><p>At Plum Guide, we collect data from various short-term rental platforms to find hidden gems among the millions of homes that are out there. Previously, the Acquisition team would go through each home’s photos manually to decide whether the home was up to the Plum Guide standards or not.</p><p>For four years this wasn’t a problem, because large expansion wasn’t a major part of our business. During the pandemic, we re-evaluated our strategy and took the opportunity to significantly grow our acquisition, based on prior metrics this would translate to us reviewing ~5.5m images in order to reach the goals we desired. This would have been an overwhelming task, to say the least.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*T0SjvGaMDz_RSrNgXLWE7w.png" /><figcaption>Figure 2: Comparison between a Plum Guide home and a low-quality home</figcaption></figure><h3>Deep Learning for the win</h3><p>The model we have built focuses on the first step of the testing, removing homes that are not meeting the Plum standards in order to reduce the manual workload.</p><p>From a business point of view, we wanted to accelerate the acquisition process and at the same time, we wanted to reduce the business costs of finding these homes. When the task came up, I was thinking that there are two solutions to this problem, a person with superpowers can grade homes (this never really crossed my mind) or a machine can do the job for us. We followed the second approach :)</p><h4>CriticNet</h4><p>Let’s start talking about the nerdy stuff now. Teaching a machine to be a home critic is a very hard problem, it’s tough as is for humans. Before digging into the technicalities I always like to think about the final product.</p><p>We want to build a system that gets as input the four indoor images per home (living room, kitchen, bedroom and bathroom) and “decides” if the home meets the Plum Guide standards or not (<em>see Figure 3 below</em>). As you can understand the ML task we need to solve here is a binary classification problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*S1OLLGv2kAaw0K4I2scZYA.png" /><figcaption>Figure 3: CriticNet as a black-box</figcaption></figure><h3>Dataset</h3><p>The dataset is being compiled from the Acquisition team and it is a continuous work of 5 years. There are two classes in the dataset, the home meets the <a href="https://www.plumguide.com/learn-how">Plum Guide standards</a> or not. The distribution of the classes is shown in the graph below. The dataset is extremely imbalanced, only ~6% of the data are in class 1 (Plum Homes) and the rest ~95% don’t meet the Plum standards and this is an issue to our classification task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UnD7yv-B3sIloXfhISzlIw.png" /><figcaption>Figure 4: Distribution of the data</figcaption></figure><p>The technique we applied to tackle the problem of the imbalanced dataset was data augmentation and undersampling the majority class. In the data augmentation, we created new images of homes that are in the minority class by transforming/processing them. We simply <strong>flipped</strong>, <strong>zoomed in, rotated, </strong>change<strong> the brightness </strong>in<strong> </strong>the images.</p><p>Data augmentation helped us avoid overfitting and reduce the bias on homes that their photography has high quality. There might be homes whose photographs are low quality but still meet our home’s standards.</p><h3>Modeling</h3><p>After preparing the dataset, it is time to work on the actual modeling. First of all, we need to come up with a Deep Learning architecture that receives 4 images as input and outputs the classification of the home given those images.</p><p>There are lots of models out there that are used for computer vision. As you can see in the image below, EfficientNet-B7 is the most efficient model in terms of accuracy. Also, it uses almost half of the parameters in contrast with the second most efficient model AmoebaNet-C. So according to these criteria, we picked the EfficientNetB7 as our base model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGxIa2tx_9iEo9JzHqnU_w.png" /><figcaption>Figure 5: Comparison of CNN models</figcaption></figure><p>The multi-input CriticNet model consists of 4 branches (each EfficientNet network process 1 image) of the EfficientNet model and at the end, we concatenated the fully connected layers of each branch. Then we applied a logistic regression which produces a score between 0 and 1 and expresses the probability that a given home is Plum or not.</p><p>The overall architecture is shown in the diagram below. Now that we have come up with the model it is time to train it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*byyhIsDEZKkvj99Rklfyzg.png" /><figcaption>Figure 6: CriticNet architecture</figcaption></figure><h3>Training the model</h3><p>The main challenge with deep learning models is that they need a lot of data (ideally millions) and lots of computing resources. However in order to save money and time we applied <a href="https://towardsdatascience.com/a-comprehensive-hands-on-guide-to-transfer-learning-with-real-world-applications-in-deep-learning-212bf3b2f27a">transfer learning</a> and we fine-tuned the weights of our network in order to adjust the weights in our dataset. The EfficientNet model we used was pre-trained on the <a href="https://image-net.org/">ImageNet</a> dataset.</p><p>In transfer learning, we freeze the weights of the upper layers of the pre-trained network (convolutional layers) and we train from scratch only the weights of the logistic regression at the very end. Then we fine-tune the weights of the network by training the whole network for a few epochs with a low learning rate.</p><h4>Fine-tuning stages</h4><p>We trained the model in two stages:</p><ol><li>We start by training only the last dense layer (logistic regression) with a higher learning rate. This ensures that the newly added random weights are adjusted to the ImageNet convolutional weights. This burn-in period mitigates the risk of juggling around the convolutional weights at the training start and consequently slowing down the training process.</li><li>Then, we train all weights in the CNN with a low learning rate, as figure 7 shows.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t60841OZwcWWDTc02-fhFA.png" /><figcaption>Figure 7: Training and validation cross-entropy loss</figcaption></figure><h3>Evaluation</h3><h4>Offline Metrics</h4><p>Looking at the validation loss for evaluation is not enough in a classification task, we should evaluate the model in more metrics to have a clearer picture. The model achieved <strong>F1 </strong>score of 78.43%, <strong>precision</strong> of 66.67%, and <strong>recall </strong>of 95.24%. Let us see what these results mean from a business point of view.</p><p><strong>Precision</strong> is simply how accurate the model is when it predicts positive labels. So let us say that the model predicts 100 Plum homes but only 66 homes are truly Plum. This gives us a 66% precision score.</p><p><strong>Recall </strong>indicates the accuracy of the model in the truly positive labels. Imagine in our dataset we have 100 Plum Homes and the model predicts 95 homes correctly and misses 5 homes which are predicted as low-quality homes (false negatives). This gives us a recall score of 95%.</p><p>The low precision score is mainly because the Acquisition team is very strict and even a good home may not meet the Plum standards. As a result, the team still has to check the homes which are classified as Plum manually, however, the amount of homes that need to be graded manually is significantly smaller, by a factor of 60%.</p><p><em>Figure 8,</em> below<em>, </em>helps you realize how difficult the task can be. For simplicity, we present only the living room images but the score is derived from all the main room images of each home. <em>Home 1</em> clearly doesn’t meet the Plum standards (you don’t have to be a home critic to know that) and the model predicts correctly by giving a score of 0.13 which is quite low. Easy!</p><p>There are cases that the distinction is not that obvious like in the case with <em>Home 3</em>. Even though it is marked as low quality, it is not clear why this home is not Plum. And this happens a lot and that is why the precision is low. However, the model achieves extremely good recall. This means that we don’t miss lots of high-quality homes (only ~5%).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*iF2e2vG-pc55XU9aQCf2EA.png" /><figcaption>Figure 8: CriticNet results</figcaption></figure><h4>Business Metrics</h4><p>From a business point of view, precision affects the cost of grading. The lower the precision, the more false positives we get so the more homes for the team to grade manually.</p><p>On the other hand, recall helping us evaluate how good the model is predicting Plum Homes, which is very important for the business. Recall gives us an estimation of how many homes we might be missing during the classification.</p><p>Apart from the evaluation during the training process, the most important metrics are the business metrics. Stakeholders don’t care about accuracies and F1 scores but how the model helps to achieve business goals and how to quantify the impact of the model using business metrics.</p><p>Since the rolling out of the model, the acquisition process accelerated by 30%, the costs of manually grading were reduced by 60%, and per batch the amount of high-quality homes is increased by ~50%-70%.</p><p>The acquisition team is not checking any more homes which are classified as low quality from CriticNet. However, due to the low precision score of CriticNet, the team still has to check manually the homes which are classified as Plum.</p><h3>Conclusion</h3><p>In this article, I explained to you briefly how we managed to optimize our home acquisition process by building a Deep Neural Network, gave you an idea of the architecture of the model and how we trained and evaluated it.</p><p>However, during this project, we faced lots of challenges related to the data. The data is far from clean. For every home, unfortunately, there are not only 4 images, one for every room, but on average there are 40 in total. Some of them are outside spaces and even worse the majority of them don’t depict the room space clearly so they don’t have any grading power.</p><p>In the next article, I will explain how we managed to overcome these challenges and built a system that gets raw images from homes, classifies them into rooms, and picks the best images to feed to CriticNet.</p><p>If you like our work and are interested in solving challenging problems, we are hiring engineers to work with the data science team on rebuilding the search experience<strong>. </strong>You can apply <a href="https://boards.greenhouse.io/plumguide"><strong>here</strong></a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68db9efa0aad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/criticnet-scaling-the-business-with-deep-learning-68db9efa0aad">CriticNet: Scaling the business with Deep Learning</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating to CSS in JS: Part 1]]></title>
            <link>https://medium.com/plumguide/migrating-to-css-in-js-part-1-e93f60b57eba?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/e93f60b57eba</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[css-in-js]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Rui Duarte]]></dc:creator>
            <pubDate>Mon, 28 Jun 2021 14:56:21 GMT</pubDate>
            <atom:updated>2021-06-29T08:43:29.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Photo of a flock of birds flying under blue sky during daytime" src="https://cdn-images-1.medium.com/max/1024/1*V4IvCPFA2S0h51ycxuLk2A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@kenrickmills">Kendrick Mills</a> on <a href="https://unsplash.com/photos/nn6nhhhf84M">Unsplash</a></figcaption></figure><p><strong>Part 1</strong> of a series of posts highlighting some of the motivations and decisions that led us to our recent endeavour into CSS in JS frameworks.</p><p>We will take a deep dive into our current stack and the problems we faced when scaling our design system and component library.</p><blockquote>This post will highlight the problems we faced at Plum Guide and why we took this approach. Not every solution applies and viable to every situation.</blockquote><h3>The current stack</h3><p>We are currently using CSS preprocessors, using SCSS and BEM as a naming convention.</p><p>This brings along some nice extendibility that plain CSS syntax does not support. At the time of writing this article here are a few examples:</p><ul><li>Nested style rules</li><li>Mixins</li><li>Complex variables and manipulation</li><li>Built-in colour functions and more</li></ul><p>While the CSSWG (CSS Working Group) has been consistently improving the feature set of vanilla CSS, some scenarios still require different approaches.</p><p>For the last 2 years we have been building a comprehensive component library in Storybook that has allowed us to build consistent UI faster.</p><p>As our design iterates and we enhance our UX, we naturally found some components would require some variants or modifications (modifiers as BEM references them by).</p><p>For example, a component as simple as the Button can have many different variations for size, appearance and behaviour. Common ones are <em>primary</em> and <em>secondary</em> for appearance and <em>small</em> and <em>large</em> for size.</p><p>Using the BEM naming convention, would be something like the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68e3290142fe3065f57679806aa919c8/href">https://medium.com/media/68e3290142fe3065f57679806aa919c8/href</a></iframe><blockquote>Consider a scenario where we only use the large primary Button. Ideally, we would only want to import the necessary styles for that variation. However, it’s not easy to effectively understand which styles should be sent to the user’s browser when importing the CSS file.</blockquote><p>This means that all users will end up receiving all the possible styles of each component.</p><h3>The pains of preprocessing styles</h3><h4>Bloated bundle</h4><p>Since code-splitting CSS code is exceptionally tricky, we (and many others) were forced to ship the entire styles of each component. This, of course, has a direct impact on the performance of the site and can lead to a higher drop-off rate of our users.</p><p>Taking our <a href="https://www.plumguide.com/">homepage</a> as an example, we can see that our main CSS file has a transfer size of around 21kb. Running a <a href="https://developers.google.com/web/tools/lighthouse/">Lighthouse</a> audit on the page shows that we can potentially have savings of up to 90%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uu2-go5r3_0XPS8vCaoelA.png" /><figcaption>Screenshot of Lighthouse audit result for unused CSS</figcaption></figure><p>Realistically speaking, achieving these savings would mean splitting our CSS by device dimensions since these calculations are measured against a specific mobile device (Moto G4).</p><p>We have performed some more accurate measurements, and we can estimate savings up to 80%, although this will vary depending on the project.</p><h4>Poor loading UX</h4><p>Another problem we encountered was <a href="https://en.wikipedia.org/wiki/Flash_of_unstyled_content">FOUC</a> (<strong>F</strong>lash <strong>O</strong>f <strong>U</strong>nstyled <strong>C</strong>ontent).</p><p>This is a common problem that most websites have where the stylesheets are bundled separately from the HTML (external CSS files), and so this leads to the page appearing unstyled while the styles are being loaded.</p><p>To avoid this, we would have had to split our CSS bundle intelligently and directly inject the critical/essential styles on a &lt;style&gt; tag and have the remaining be imported separately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_nqDTYWy8U2oPE-6.gif" /><figcaption>Example of FOUC <a href="https://github.com/vercel/next.js/issues/18769">https://github.com/vercel/next.js/issues/18769</a></figcaption></figure><h4>Discoverability of styles</h4><p>While code editors offer good support for .scss files, it adds overhead to our toolchain when trying to share styles across projects.</p><p>Without spending too much time, the furthest we got was to have our code editors index all of the classes present in our internal packages using the extension <a href="https://marketplace.visualstudio.com/items?itemName=gencer.html-slim-scss-css-class-completion">SCSS Everywhere</a>.</p><p>This left us without an intuitive way to directly consume design tokens (colours, spacing values, etc.) or helper mixins from our design system and component library.</p><h4>Composition</h4><p>It’s certainly possible to use style composition in SCSS by using, for example, the @extend rule.</p><p>Although the outcome isn’t always what you would expect, you might end up having specificity issues with your CSS instead of safely extending styles.</p><p>If you’d like to understand more how it works and some use cases, <a href="https://www.smashingmagazine.com/2015/05/extending-in-sass-without-mess/">this article</a> by David Khourshid explains it quite nicely.</p><h3>Quick recap</h3><p>We went over what motivated us to look at alternative solutions to CSS preprocessors and the critical problems we were facing.</p><p>If you find yourself in a similar situation to ours, we suggest the following approach:</p><ol><li>Identify the core problems you’re faced with</li><li>Research the market and understand which solution fits your needs the most (e.g. <a href="https://emotion.sh/">emotion</a>, <a href="https://styled-components.com/">styled-components</a>, <a href="https://stitches.dev/">Stitches</a> or <a href="https://vanilla-extract.style/">vanilla-extract</a>)</li><li>Start small and introduce it early to avoid any tech debt building up</li></ol><p>Stick around for <strong>Part 2</strong>, where we will go in-depth on the market research we performed on CSS in JS frameworks and where we will share our choice.</p><p>If you’re like us and love to share your work with your peers, and interested in challenging problems and scalability, <a href="https://boards.greenhouse.io/plumguide"><strong>we are hiring!</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e93f60b57eba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/migrating-to-css-in-js-part-1-e93f60b57eba">Migrating to CSS in JS: Part 1</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My personal experience as a candidate during The Plum Guide interview]]></title>
            <link>https://medium.com/plumguide/my-personal-experience-as-a-candidate-during-the-plum-guide-interview-67b395611ed5?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/67b395611ed5</guid>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[recruitment]]></category>
            <dc:creator><![CDATA[Arthur Tsvettsih]]></dc:creator>
            <pubDate>Tue, 04 Feb 2020 13:15:12 GMT</pubDate>
            <atom:updated>2020-02-04T13:15:11.974Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nwGPT7z2zjveFmYw" /><figcaption>Photo by <a href="https://unsplash.com/@hrsahatchiev?utm_source=medium&amp;utm_medium=referral">Hristo Sahatchiev</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Hello 👋</h4><p>My name is Arthur Tsvettsih, and I am a mid-level full-stack engineer here at <a href="https://careers.plumguide.com/">The Plum Guide</a>. I joined just over six months ago, and I thought it was worth sharing my experience as a candidate applying for a software engineering role here.</p><h3>Interview experience at other companies 😰</h3><p>Since finishing university, I have worked at three different companies. Before getting an offer from The Plum Guide, I had applied and interviewed at tens of companies. However, to keep this blog post fair, I will only count face-to-face interviews, which I have had around 15.</p><p>From my experience, I can group interviews into several groups:</p><ul><li>Whiteboarding ⬜ — coding on a whiteboard. It generally includes problems that can be solved in a few lines of code. I am not a huge fan of these, as some interviewers evaluate your syntax knowledge too much — let’s be honest, we all google how to declare an array every now and then 👀</li><li>Pair programming 💻 — coding on a laptop while being the driver. Most of these have asked me to implement a class and then write some tests. This type of interview is alright, but I believe it doesn’t show the interviewer more than that the developer knows the basics, which could be enough in some cases.</li><li>Algorithms 📈 — coming up with short and concise code that solves an algorithmic problem. This is my least favourite type of interview, as I believe they are like mathematical problems in school — the more you solve them, the higher your chances that you’ve solved a similar problem before, and know-how to tackle this one. I don’t think they tell the interviewer as much as other types of interviews.</li><li>Homework 📖 — doing a project at home and then discussing it. These can be okay, but they are hard to justify. These projects generally take longer than an hour, and you don’t get to talk to the interviewer to understand what areas they want you to focus on.</li><li>Informal Chat 💬 — talking about development in general. I believe these are the best kind of interviews as they show that the developer knows more than just the syntax and has a genuine interest in tech. Keeping it informal helps make the candidate feel like you want to get to know them more, not just from a technical level. Unfortunately, this quite rare.</li></ul><figure><img alt="Three women having a mediocre interview" src="https://cdn-images-1.medium.com/max/1024/1*a1BqnQcB6wupMaJWe_eaiw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@punttim?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim Gouw</a> on <a href="https://unsplash.com/s/photos/interview?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>The Plum Guide Interview 🙌</h3><p>At the time of writing this post, a back-end developer interview consists of a few stages:</p><ul><li>Phone screening (15 mins)</li><li>Technical face-to-face (60 mins)</li><li>Cultural (45 mins)</li></ul><p>For the face-to-face interview, The Plum Guide was more than happy to work around my current work schedule and arranged for me to come in and do the interview after I finished work. When I arrived at The Plum Guide office, I instantly felt very welcome, and I could already tell that this would be a great place to work just by the atmosphere in the office. The engineers doing the interview came over and greeted me, offered me a drink, and asked if I needed anything else before heading into the meeting room.</p><p>The interview started with <a href="https://medium.com/u/75a88ea4a454">Faesel</a> and <a href="https://medium.com/u/e22ee11fc783">Adrià</a> giving me a short overview of the company and it’s history, before diving into the tech stack and how the codebase is currently evolving. In short, The Plum Guide started as a monolithic .NET MVC application, and in the last few years, the team has begun breaking it down into microservices and micro-frontends. They have even done a talk explained how and why they have adopted a “vertical micro-frontend” approach using React.</p><p><a href="https://medium.com/plumguide/we-did-our-first-tech-talk-heres-what-we-learnt-from-it-b38e5b8ea521">We did our first tech talk — Here’s what we learnt from it</a></p><h4>Face-To-Face 💬</h4><p>After a brief 10–15 min introduction, I was asked to describe the architecture for a simple website. For the next 30 or so minutes, we built up an architecture diagram, with the interviewers asking me more questions and presenting various challenges along the way.</p><p>Afterward, they talked through some of the challenges they have faced and asked how I would have approached them. During this stage, both <a href="https://medium.com/u/75a88ea4a454">Faesel</a> and <a href="https://medium.com/u/e22ee11fc783">Adrià</a> were engaging. We then discussed various different technologies being used at The Plum Guide, but they also shared some insight into what they planned to use in the future.</p><p>I must admit, I didn’t really have much energy before I came for the interview because I had spent most of the week dealing with production issues at my last workplace, but after the interview, I was fairly relaxed and pretty excited about what they do at The Plum Guide.</p><figure><img alt="People sitting on a grass field and having a good time" src="https://cdn-images-1.medium.com/max/1024/1*zki6hwdSWrfetRqQnLUqwA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@benshares?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ben Duchac</a> on <a href="https://unsplash.com/s/photos/group-of-friends?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Cultural Interview 👪</h4><p>The next stage was a cultural interview with Lara, the lead designer, and <a href="https://medium.com/u/dbf031e73824">Lewis</a>, one of the backend engineers. I believe one of the first things that Lara asked me was whether I wanted a toastie. I was taken aback by that question, but Lara explained that The Plum Guide has <em>Toastie Thursdays</em>.</p><p>The cultural interview felt much more informal and they wanted to know more about myself and what I was passionate about. They also shared their own interests, and it was great to hear how important culture is here at The Plum Guide.</p><p>After about 15 minutes, <a href="https://medium.com/u/ffdb4e4241a1">Imran</a>, the CTO, stepped in for a chat to talk about the finer details and my career aspirations. As soon as <a href="https://medium.com/u/ffdb4e4241a1">Imran</a> introduced himself, he said: “The other guys loved you”, and seemed very enthusiastic while talking to me. After a brief 10 minutes, I was on my way home feeling excited and rejuvenated. I already knew this is where I wanted to work.</p><h4>The offer 📝</h4><p>The next day I got a call from the recruiter, saying that they really liked me and wanted to make an offer. At this stage, I was 99% certain I would take the offer, but I wanted to see the other offers first as I knew I would hear from them shortly.</p><p>I was very open with <a href="https://medium.com/u/ffdb4e4241a1">Imran</a>, and let him know that I would get back to him in a few days. However, he was very keen on me joining and told me to contact him if I had any questions. So I took him up on his offer and had a few phone calls with him to dig a little deeper into the tech. I was also invited to something called “Friday@5”, which is a company-wide meeting where all the departments present how the week went in a very transparent fashion. I really enjoyed this deeper insight and level of transparency you wouldn’t normally get in an interview or other companies in general.</p><p>To my surprise, I was invited to join the majority of the tech team who were heading to the pub for a few drinks. It gave me a chance to really get to know everyone in the team before deciding to accept the offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMXExHPHNfm4hCs7V1KvpQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@outdoor_junkiez?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Drew Farwell</a> on <a href="https://unsplash.com/s/photos/friends-pub?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>First Few Months 🌍</h3><p>I started working at <a href="https://careers.plumguide.com/">The Plum Guide</a> a few months ago, and so far, I love it. I have always worked with legacy systems until now, so there is an overwhelming amount of tech that I need to learn, but my colleagues are always there to help me get on my feet whenever I need them. I could list what each of them has helped me with, but that would be a very long list 😂</p><p>I am also blown away by the amount of trust that the tech team has. There’s no top-down dictation of how we need to build something. If we want to use .NET Core 3.0, which recently came out, we can! Furthermore, the engineering teams here have almost complete freedom on how we tackle our OKRs, and that’s terrific.</p><p>If you enjoyed this insight, share the love with a clap. 👏</p><p>We have huge ambitions for the future, so if you think like us, why not come and be a part of this great adventure. Check out our <a href="https://careers.plumguide.com/">careers</a> page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67b395611ed5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/my-personal-experience-as-a-candidate-during-the-plum-guide-interview-67b395611ed5">My personal experience as a candidate during The Plum Guide interview</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We did our first tech talk — Here’s what we learnt from it]]></title>
            <link>https://medium.com/plumguide/we-did-our-first-tech-talk-heres-what-we-learnt-from-it-b38e5b8ea521?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/b38e5b8ea521</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[micro-frontends]]></category>
            <category><![CDATA[public-speaking]]></category>
            <dc:creator><![CDATA[Nicholas Martin]]></dc:creator>
            <pubDate>Fri, 04 Oct 2019 15:34:04 GMT</pubDate>
            <atom:updated>2019-10-04T15:34:04.341Z</atom:updated>
            <content:encoded><![CDATA[<h3>We did our first tech talk — Here’s what we learnt from it</h3><h4>Tech talks are a great way to share your knowledge and put your work in front of talented engineers, but what makes a great talk?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-DVqFwy3v_W_e8l0wce-w.jpeg" /></figure><p>Here at <a href="https://medium.com/u/97b76ed517aa">Plum Guide</a>, we’re growing at a rapid pace, which brings some interesting and exciting technical challenges such as scalability and resilience, particularly when it comes to working with the frontend.</p><p>To help us grow, we’ve been expanding our team and looking for some talented engineers to join us, but as a relatively new start-up, not a lot of engineers have heard of us before.</p><p>We realised that tech talks are a great way to share your work and experience with the community. So we decided to take one of our previous posts (<a href="https://medium.com/u/6dc2669c70fa">Tiago Morais</a>’ post on <a href="https://medium.com/plumguide/scaling-plum-guide-modernising-and-scaling-the-frontend-66a5db6f8696">Modernising and Scaling the frontend</a>) and talk about it in more detail. Our aim was to share with others how we have approached the problem, what we have learnt along the way, and hopefully, get people excited about what we are doing.</p><p><a href="https://medium.com/plumguide/scaling-plum-guide-modernising-and-scaling-the-frontend-66a5db6f8696">Scaling Plum Guide — Modernising and Scaling the frontend</a></p><p><em>This was our first tech talk, so we thought it would be good to share some of our thoughts and what we learnt from it.</em></p><h4>Have a relevant and relatable subject</h4><p>Due to the rapid evolution of the front end landscape, there has been a lot of interest in how to scale and modernise a growing front end architecture. Last year, we began exploring how we could decouple the frontend from the backend and begin moving away from the monolithic architecture that we initially started with.</p><p>We wanted to ensure it was scalable and future proof, but we need to do so in an iterative manner so that we didn’t stall and can continue to support our hyper-growth. One of the more popular approaches is to use “compositional micro-frontends”, but we decided to take a “vertical micro-frontend” approach instead as we felt it worked better for what we were trying to achieve.</p><p>Not many people may be aware of this kind of approach, so we wanted to share our experience with others.</p><h4>(You don’t) know your audience</h4><p>There is always a level of uncertainty as to whether people will actually find your talk enjoyable and learn something from it. There was a variety of people at the meetup: juniors, lead engineers, and even some recruiters.</p><p>It’s easy to get carried away and go into lots of technical detail, but if it’s not easy to follow, the audience might lose interest. So we tried to keep the talk as a high-level overview of the challenges we faced and how we approached them but provided enough detail to be engaging and practical at the same time.</p><p>The general feedback many gave us was that the presentation had just the right mix of content to keep them engaged, wasn’t too technical for them, and that they had learnt something new and interesting from it. As a result, a few people approached us after the talk to thank us and to find out more about what we are doing at <a href="https://medium.com/u/97b76ed517aa">Plum Guide</a>, and it was great to hear that we inspired a few junior developers too.</p><h4>Practice and keep an eye on the time</h4><p>We felt that practising our talk multiple times helped us ensure we stayed within the allotted time, but also ensure the pace was right and engaging. Each time we practised, we tweaked the content ever so slightly to ensure it had a natural progression through each slide and kept the cadence of our talk even.</p><p>The practice also helped us memorise as much of it as possible so that we could talk more directly to the audience instead of just reading from our slide notes. By talking to the audience, they are more likely to stay engaged, and by scanning the room we could gauge whether we should dive a little deeper into some of the slides.</p><h4>Don’t rely on the internet</h4><p>During our presentation, we had a small video clip to demonstrate how our hybrid approach to lazy loading worked in practice. Sadly, we forgot to connect to the internet as we thought that it wasn’t required… but as we found out, the video couldn’t play without the internet.</p><p>Luckily it was only a short 3-second clip on a loop, and although we weren’t able to play the clip, we explained what the video was trying to show and moved on to the next slide. This highlights the importance of practise, as it will better you to deal with the unexpected and move on without losing pace. In hindsight, we could have created a GIF instead of any videos shorter than 5 seconds. Plus, it would have automatically looped the video for us!</p><h3>🥡 The biggest takeaway — TL;DR</h3><p>If there is anything you can learn from this post:</p><ul><li>Have a relevant subject matter that resonates well with others and ensure everyone in the audience can learn something from it</li><li>Be transparent and share your exploration to help others understand why you’ve taken a particular approach</li><li>Practise often to ensure the talk feels much more natural, and talk directly to the audience to keep them engaged.</li></ul><h3>🍿 You can watch our talk below!</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F58A-yx3Suus%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D58A-yx3Suus&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F58A-yx3Suus%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f17667ed203a443af266cd005f559dd6/href">https://medium.com/media/f17667ed203a443af266cd005f559dd6/href</a></iframe><p><strong>We intend on doing more talks in the future as we continue exploring new things, so if you have any tips on what makes a great tech talk, let us know!</strong></p><p>If you’re like us and love to share your work with your peers and interested in challenging problems and scalability, <a href="https://careers.plumguide.com/o/frontend-software-engineer"><strong>we are hiring</strong></a><strong>!</strong></p><p>We recently closed our <a href="https://techcrunch.com/2019/03/20/the-plum-guide-raises-18-5m-to-expand-its-vacation-homes-for-the-elite-service/"><strong>Series B</strong></a> round and are looking for talented people to help us grow and give more talks about our exciting work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b38e5b8ea521" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/we-did-our-first-tech-talk-heres-what-we-learnt-from-it-b38e5b8ea521">We did our first tech talk — Here’s what we learnt from it</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Principles of great engineering cultures]]></title>
            <link>https://medium.com/plumguide/principles-of-great-engineering-cultures-33cff9719988?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/33cff9719988</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[plum-guide]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Lewis Markwell]]></dc:creator>
            <pubDate>Thu, 20 Jun 2019 08:47:04 GMT</pubDate>
            <atom:updated>2019-06-20T08:56:21.261Z</atom:updated>
            <content:encoded><![CDATA[<p>At The Plum Guide, we have made a conscious decision to build a collaborative culture whilst maintaining a focus on autonomy, creativeness and self-empowerment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S3NWRM9GWq_o-g8diyQeGQ.jpeg" /></figure><p>Here are some of the key principles we to stick to:</p><p><strong>Idea sharing and debate</strong></p><p>For every new project we work on, we promote a collaborative environment where each developer can contribute their ideas and be taken seriously. There are no better people to evaluate the limits or limitlessness of technology at their disposal than the engineers of the platform, and at The Plum Guide, we frequently suggest and curate new ideas that other people in the business have not thought of.</p><p>When working on a new feature or task, each engineer has the ability to recommend new technologies and ideas as a solution. Have you read about something in your spare time that you think would be relevant? Perfect - suggest it, spike it, prove it is suitable. Done something similar before? You get the idea.</p><p>Every 2 weeks we hold a stack meeting to present changes and new tech we’ve introduced to the other engineers unfamiliar with the projects we’ve worked on. This is a great chance to broaden your knowledge and understand what other great work has been going on.</p><p><strong>Never stray too far from the problem</strong></p><p>As passionate tech people, it’s easy to get engulfed in the endless universe of available solutions to a problem. Without tight control, this can escalate and make a simple solution a marathon away. We know that delivering a working solution to the end user is a rewarding accomplishment. Constantly delivering value builds a stronger relationship between engineering and the rest of the business which in turn builds a rewarding engineering culture where the team knows they are contributing to the benefit of the business.</p><p>At The Plum Guide, we are lucky enough to have a wider team that will take the time out of their day to thank the engineering team for a new feature or bug fix that is going to make their lives easier.</p><p><strong>No egos</strong></p><p>The biggest blocker for a collaborative and tight-knit team, is a team full of egos — when someone doesn’t give time to anyone else’s opinion, and goes against good advice this can detriment morale and productivity across the team. It is important that a team of engineers has a healthy mix of self confidence and humility. This will only drive your engineering team to be more productive, happier and ultimately do better work.</p><p><strong>Hire doers</strong></p><p>At The Plum Guide, we require a quick turnaround of projects — the business has an endless amount of ideas to aid growth, expansion and our technology road map. We make sure we can do this by hiring serial doers and pragmatic engineers — those that have great ideas, can put them into practise efficiently and effectively while still being conscious of time scales and budgets.</p><p><strong>Strive for continuous improvement</strong></p><p>Continuous improvement relates to more than just the product, but also the process that supports it. Could something be better? Change it. Could our agile process be leaner, more effective and better at delivering results? Refine it.</p><blockquote>Build a process around the team, not a team around the process.</blockquote><p>At The Plum Guide, we embrace change and new ideas as the company evolves to find the right process that works for our team. The team is our biggest asset, and the processes we use are chosen to optimise our output. Recently, we’ve reduced the number of meetings we have, and reduced the amount of time for the essential meetings. We’re getting better at taking discussions offline and only with the relevant people, so our stand ups are quicker and more informative.</p><p><strong>Done is better than perfect</strong></p><p>Popularised by Facebook, and embraced by The Plum Guide, this doesn’t promote poor software, just an achievable end goal that isn’t utopia; a tangible endpoint in the project which delivers value. Striving for perfection creates the ideal environment for perfection paralysis, which only leads to 1 of 2 things: failing to deliver, or failing to deliver value.</p><p>Remember, nothing is perfect, therefore perfect is never done!</p><p>If you like the sound of what you have read, we are <a href="https://careers.plumguide.com/">hiring</a>! We’ve just closed our Series B round of funding, and have huge ambitions for the future. Come and be a part of this great adventure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33cff9719988" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/principles-of-great-engineering-cultures-33cff9719988">Principles of great engineering cultures</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Plum — How we handle tracking and analytics]]></title>
            <link>https://medium.com/plumguide/scaling-plum-how-we-handle-tracking-and-analytics-cf6719f885e2?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/cf6719f885e2</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Tiago Morais]]></dc:creator>
            <pubDate>Tue, 18 Jun 2019 11:02:55 GMT</pubDate>
            <atom:updated>2021-07-06T08:52:09.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fdPa1jDp7RLG5jkNVzHM8w.jpeg" /></figure><h3>Scaling Plum Guide— How we handle tracking and analytics</h3><p><em>The heart of good decision making is information.</em></p><p>At The Plum Guide, data is a big driver for what we do. Understanding our users is paramount to iterate and improve our product. It’s also extremely important for marketing and growth. So gathering accurate data from our users is critical to both the business and the product.</p><p>Is it not uncommon for a company to use multiple analytics tools across several channels. Google Analytics, KissMetrics, Indicative are some of the tools that we use to measure and get valuable insights into user behaviour, funnels, and conversions.</p><p>While many expensive off-the-shelf tools promise to solve these problems even without any custom code, the reality is, that for accurate and tailored analytics the best approach we found was having granular control over how, where and which user interactions are recorded.</p><p>As we add more features, the number of user interactions to record increases. Combine this with more code and more engineers working on it, it can be difficult to maintain and retain consistency of which events are fired when and where.</p><p>As our team scales, the way we handle analytics in our codebase also has to scale.</p><h3>🐣 Analytics — The early days</h3><p><em>The quick and manual approach</em></p><p>In the early days, third party scripts were simply added to the codebase, and the events were tracked both automatically and programmatically for each individual channel, everywhere in the code, where required.</p><p>With time these become littered in the code, lead to performance issues, became hard to manage, and added global third party script dependencies throughout the entire code base, making the code harder to test, and prone to errors and exceptions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43047015d3413ee3013fbf56083ceb55/href">https://medium.com/media/43047015d3413ee3013fbf56083ceb55/href</a></iframe><h3>🐥 Abstracting event tracking</h3><p><em>A better, but still manual, approach</em></p><p>The first step we took was to add an abstraction layer for our analytics that could serve any third party vendor we wanted.</p><p>We started by simply proxying every tracking call into our own module. Then the module would call the third party vendor calls as required. This made sure we kept all our analytics code isolated in a single module, which is easily mockable for testing.</p><p>This is how the setup looked, roughly</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b2135c2ef384b7813b17e5a24ec1a4b/href">https://medium.com/media/8b2135c2ef384b7813b17e5a24ec1a4b/href</a></iframe><p>To use it, all we had to do was:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3812345cb42bbda3f71806cb9e81609/href">https://medium.com/media/f3812345cb42bbda3f71806cb9e81609/href</a></iframe><p>This small abstraction, coupled with Typescript, allowed us to easily find where and how many times each event was used and which channel it was sent to.</p><p>Abstracting analytics was a good start but it still required a lot of developer time to maintain, and with lots of input from marketing and product teams.</p><p>But this did not solve all of our problems. The bottleneck moved from managing the code to managing vendors scripts.</p><p>As we scale away from a monolith project into several smaller projects, it became increasingly harder to manage multiple analytics third parties across several projects and environments, even when sharing common analytics code/modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F6R34rqTupBQxrVe7GS4fw.jpeg" /><figcaption>Look at it, so tidy!</figcaption></figure><h3>🐓 Abstracting vendors</h3><p><em>Like before. But better.</em></p><p>Even with code abstraction in place, it still was harder and harder to manage third party scripts, especially with a growing team, working on separate repos.</p><p>Luckily, there are tools that help greatly with this problem. For us, this tool was Google Tag Manager (GTM).</p><p>GTM allows developers to<a href="https://support.google.com/tagmanager/answer/7679219?hl=en"> simply push events to GTM’s </a><a href="https://support.google.com/tagmanager/answer/7679219?hl=en">dataLayer</a>, and to manage third party script separately from the codebase.<br>The only third party script we installed in our code was GTM’s. Then from GTM’s dashboard, we configure the rest.</p><p>Similar to our code-level analytics abstraction, GTM acts as a proxy receiving our events in their dataLayer and sending them to whatever channels are configure by us. <br>This allowed us to manage each <a href="https://support.google.com/tagmanager/answer/3281060">tag</a>(third-party channel) at will, in staging or production without changing any code at all. GTM handles all that for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1NGpuU3435-6_3-Z6u7aQ.jpeg" /><figcaption>Hand drawn for more realism</figcaption></figure><h3>🦅 A proactive, declarative approach</h3><p><em>We got wings now</em></p><p>The next step in improving how we do analytics was to move from an imperative reactive approach to a more proactive, declarative one.</p><p>Instead of requiring a developer to add or change specific source files with calls to the analytics module when analytics requirements changed, <strong>we inverted the flow.</strong></p><p>When a new feature is added, the developers are responsible for adding events to any major user or programmatic action that occurs across the feature they are working on.<strong> This is usually done with the help of the Product Owner</strong>.</p><p>We do this in two ways:</p><h4>Auto tracking with <strong>data-attributes</strong></h4><p>By adding data-attributes to our code, we can configure GTM once, to pick these up and push them to the <em>dataLayer</em> itself.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e23f2b10e89901708a89dca5f4f9b27d/href">https://medium.com/media/e23f2b10e89901708a89dca5f4f9b27d/href</a></iframe><p>This setup required a little configuration on GTM, but it’s only setup once and works for every project.</p><h4>Programatic with GTMs <strong>data-layer</strong></h4><p>GTM will pick these up and fire the appropriate tags, which in turn will send the events to the third party channels.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7831b5fab0066887d45e31061825a31a/href">https://medium.com/media/7831b5fab0066887d45e31061825a31a/href</a></iframe><p>The major benefit of this more proactive model is that events were setup by default, added at development time and if any stakeholder wants to track them, they can just configure GTM to do so.</p><p>This model also helped increase developer ownership and made our team more conscious and aware of the importance of user behaviour flows.</p><p>In the early days of this approach, developers would often forget to add these app-wide events, and would have to add them in when a new analytics requirement came. But with time, they become adept at adding all the necessary events by default.</p><p>Each time we develop a feature, we think about tracking and measuring as a first class citizen so our specs include our KPI metrics as well as the events needed to realise them.</p><h3>🚀 We’re just getting started</h3><p>Plum recently closed its <a href="https://techcrunch.com/2019/03/20/the-plum-guide-raises-18-5m-to-expand-its-vacation-homes-for-the-elite-service/">Series B</a> round, which is very exciting news for all of us. We’re continuing to grow fast and and so is our engineering team.</p><p>We’re working on very interesting problems, and data driven decisions are at the core of what we want do to.</p><p>If this is something you find interesting, <a href="https://careers.plumguide.com/o/frontend-software-engineer"><strong>we’re hiring!</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf6719f885e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/scaling-plum-how-we-handle-tracking-and-analytics-cf6719f885e2">Scaling Plum — How we handle tracking and analytics</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Plum Guide — Modernising and Scaling the frontend]]></title>
            <link>https://medium.com/plumguide/scaling-plum-guide-modernising-and-scaling-the-frontend-66a5db6f8696?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/66a5db6f8696</guid>
            <category><![CDATA[monolith]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Tiago Morais]]></dc:creator>
            <pubDate>Thu, 30 May 2019 16:00:37 GMT</pubDate>
            <atom:updated>2019-05-30T16:00:37.178Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PuqtBwOuzFSYJB9qH_Riw.jpeg" /></figure><h3>Scaling Plum Guide — Modernising and Scaling the frontend</h3><p><em>Where we started and how we are scaling our frontend architecture for team, product and company growth.</em></p><h3>👶 How it started</h3><p>The first version of the Plum Guide platform was built from scratch by <a href="https://medium.com/@imran.arshed">Imran</a> and Tom Williamson in 3.5 months. That’s an entire booking platform and internal tools for users, marketing, finance and sales management.</p><p>The first version was born as a .Net MVC web app and, in a short period of time, it quickly grew to thousands of lines of code across the stack.</p><p>The frontend was built using server side rendered Razor views, sprinkled with jQuery for interactivity and Ajax calls - a very common pattern around 2015.</p><h3>🤕 Growth pains</h3><p><em>The best kind of pain!</em></p><p>For start-ups, shipping features is a priority. When you’re experimenting at an early stage and doing everything to move the growth needle as quick as possible, your codebase can take a battering:</p><ul><li><strong>Complex pages with business logic seeping across the stack</strong></li><li><strong>Low code coverage and test-cases churning at a high rate</strong></li><li><strong>Build times increasing and deployment pipeline becoming very slow</strong></li><li><strong>Lack of reusable components</strong></li></ul><p>When I joined Plum Guide the pace and growth were constantly increasing, as well as the technical debt. This led to inefficiencies, and with further growth on the horizon, they soon would become critical.</p><p>The issues were beginning to slow down the team, so a plan was required to deal with them while maintaining the pace of delivery.</p><p>Easier said than done, of course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ubq116e1yIStxM8TjqdGaw.jpeg" /><figcaption>The juxtaposition here is palpable.</figcaption></figure><h3>✨ Frontend — Getting faster, slowly</h3><p>Our overall approach was:</p><ul><li><strong>Modernise the stack</strong></li><li><strong>Create new features in leaner isolated modules</strong></li><li><strong>Migrate and remove the legacy code as we go</strong></li></ul><h4>Migrating from jQuery, bower and grunt to React and Webpack</h4><p>The first decision we took was to stop writing jQuery code and stick to vanilla Javascript as much as possible.</p><p>As the UI became more complex and a lot of logic was being written on the client side, we opted to lean on a framework.</p><p>We set off creating a few POCs (Proof of Concept) using React, Vue and Angular. Based on our requirements, performance and product vision we decided to use React.</p><p>React made it easy for us to create new features in isolation. We build these as isolated testable pieces of functionality and deploy them in isolation from the main codebase.</p><p>We employed <a href="https://en.wikipedia.org/wiki/Salami_tactics">Salami Tactics</a>, or the <a href="https://martinfowler.com/bliki/StranglerFigApplication.html"><em>Strangler Pattern</em></a><em>,</em> as its known in other contexts, to slowly break apart and migrate large pages into smaller, well-structured and testable ones.</p><p>As these modules grew, they started to take over and replace piece-by-piece the big chunky pages built in Razor views and jQuery, until only the server rendered page shells (for SEO) remained and the rest of the code was made of client side rendered React.</p><p>With time we introduced Redux to handle local data, which meant we could push some server side rendering logic to the frontend (these pages still relied on server rendered Razor Views).</p><p>The way we accomplished this in practice warrants its own blog post, which we plan on doing soon.</p><h4>Decoupling backend from frontend</h4><p>Decoupling our backend from frontend also allowed to us greatly speed up our build, deployment and test pipelines as well as our development speed.</p><p>We gradually separated our single build pipeline into separate smaller ones. This way we can now build, test and deploy frontend code independently from backend code. If a new feature requires changes in both, we can just deploy both at the same time.</p><p>Any new features use the new pipelines, leaving the old ones alone. We now run deployment for React in a <strong>separate CI process and deploy it to a CDN.</strong> Resulting in deployment taking a fraction of the time it took previously!</p><p>This change also carved out the way for frontend developers to work on UI features without having to run the entire project locally. With new code we <strong>moved the Razor views logic into Redux, the data fetching into API endpoints or by injecting it directly in the <em>window</em> </strong><a href="https://github.com/reduxjs/redux/blob/master/docs/recipes/ServerRendering.md#inject-initial-component-html-and-state"><strong>via an <em>INITIAL_STATE</em> object</strong></a></p><p>Now frontend developers can run parts of the app locally and simply point to a staging API instance for rapid local development.</p><p>This allows us to start better leveraging the React ecosystem and create more complex data-driven interfaces which are better isolated and easily testable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxsN4bHu_n26AgiGhaajMw.jpeg" /><figcaption>This is what a component library looks like in real life, true story.</figcaption></figure><h4>Building a component library</h4><p>Now we have far less dependencies on the server side to build complex interfaces and handle its complex state. We can also develop new features easily without needing the entire monolith project to run locally and our deployments take a fraction of the time they used to.</p><p>That does not mean we would not end up in a similar place as we were going, but in a different ecosystem, so we needed to make sure our code was not only smaller (which means easier to test), but also more composable and reusable.</p><p>Once again React lent itself very easily to this.</p><p>We started by moving components we built initially in react to the library, and building smaller ones to serve <strong>as building blocks.</strong></p><p>Not unlike <a href="http://bradfrost.com/blog/post/atomic-web-design/"><em>Atomic Design</em></a> we built more complex components on top of these ones, and now, most pages are more than 70% built with reusable components, taking less than half the time it took to build similar pages before!</p><p>As we mature this library, we’re working closely with our product and design team to build a comprehensive component library with solid design patterns.</p><h3>🥡 The biggest takeaway — TL;DR</h3><p>If you take anything from this article is this:</p><ul><li>Identify your biggest bottlenecks that are slowing down the team down</li><li>Make a plan on how tackle them — progressively, avoid big re-writes.</li><li>Settle on a solution with your team, commit to it.</li><li>Keep track of you goal and progress, adjust and and improve as you go</li></ul><p>And remember:</p><ul><li><strong>Legacy codebases will always exist for a long time</strong>, so do not try to migrate all at once, or you will stall.</li><li><strong>Tech debt is a tool, not a problem.</strong> Manage it well, and you will move fast and deliver value while making incremental improvements.</li></ul><p>It’s been almost a year since we started on this path and we’ve made several new improvement to the new stack, introduced React SSR, isolated complex backend services to smaller, leaner ones, and are working on a robust design system.</p><h3>🚀 We’re just getting started</h3><p>Plum recently closed its <a href="https://techcrunch.com/2019/03/20/the-plum-guide-raises-18-5m-to-expand-its-vacation-homes-for-the-elite-service/">Series B</a> round, which is very exciting news for all of us. We’re continuing to grow fast and and so is our engineering team.</p><p>We’re working on very interesting problems, and scalability continues to be the biggest theme in the room.</p><p>If this is something you find interesting, <a href="https://careers.plumguide.com/o/frontend-software-engineer"><strong>we’re hiring!</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66a5db6f8696" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/scaling-plum-guide-modernising-and-scaling-the-frontend-66a5db6f8696">Scaling Plum Guide — Modernising and Scaling the frontend</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first year as a Software Engineer at Plum Guide]]></title>
            <link>https://medium.com/plumguide/my-first-year-as-a-software-engineer-at-plum-guide-4a0ce791809b?source=rss----a8ab03de32bf---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a0ce791809b</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Lewis Markwell]]></dc:creator>
            <pubDate>Fri, 17 May 2019 15:41:26 GMT</pubDate>
            <atom:updated>2019-05-17T15:49:22.748Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hi, I’m Lewis and I’m one of the engineers here at Plum Guide. I started over a year ago, and in that time I&#39;ve learned a lot about what makes Plum great.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6BKYmLbh-mM1-TWEjI4Qfg.png" /></figure><h3>My background</h3><p>I graduated from University in 2014 with a degree in Applied Computing, with the sole ambition <strong>not</strong> to be a Software Engineer... I held no aspirations to be the stereotypical basement engineer who avoided all human contact.</p><p>After going through a few interviews I realised this might not be the reality, so I started an engineering internship at a hyper growth start up (and now market leader) called Epos Now, where I spent 3 months being introduced to the industry and start up culture.</p><p>When the internship ended, I was offered a full-time role and rose through the ranks over 3.5 years, to eventually lead projects for global expansion. Leading and delivering this project alongside a sterling team included taking a UK-based platform and making it fully compatible with the US retail/hospitality market, and it firmly remains one of the highlights of my career.</p><p>With ambitions to recreate these successes elsewhere, I began my search for a similar existing company in a different industry to hopefully use some of my experiences and continue to learn a whole lot more.</p><h3>The hiring process (and why I decided to join)</h3><p>There were a few combining factors when I was looking for a new role: an ambitious company, personal responsibility, unlimited learning opportunities and a team that truly cared about the product they were building.</p><p>Plum&#39;s tagline alone oozes the ambition everyone in the company has — “Find the top 1% of homes in the world”. That&#39;s no mean feat by anyone’s standards!</p><p>The hiring process started with a short phone call with Imran, our Head of Tech, where we got to know more about each other. He told me all about Plum’s ambitions, the team structure and the stack being used.</p><p>After that came the face-to-face interview, which was run like a normal day at Plum: I was presented with a series of problems, and between me and a couple of their engineers, we worked to design a solution. At the end of the exercise, they explained how they solved this same problem, so at the very least I would have left knowing something new and could take those new ideas with me.</p><p>The final part of the interview was about meeting people from the wider business. I met with a couple of senior engineers, and showed them a project I had been working on in my spare time. I also had a good chat with Doron, our CEO, who wanted to find out a bit more about me and answer any of my questions.</p><p>One of things that convinced me happened by accident: before the final stage of the interview, I was asked if I didn’t mind waiting 5 more minutes whilst the Head of Tech and a senior engineer finished debugging and fixing a production issue. That was exactly what I was looking for; a team where everyone got involved and took ownership when things weren’t going according to plan.</p><p>After this experience, it was a no-brainer where I wanted my next job to be.</p><h3>Working at Plum</h3><p>The best thing about working here is probably being surrounded by some of the most intelligent, talented, ambitious and helpful people every day. This encompasses everyone in the company, not just the product and engineering team.</p><p>Everyone&#39;s ideas and opinions are valued, and you are given the opportunity to put your ideas into practise with the support of everyone around you. Help and assistance is never more than a question away and you’ll never stop learning.</p><h3>Some cool things I&#39;ve done</h3><p>When I first started at Plum, homes were available in two cities. A few months later 4 more cities were announced, and that meant scaling everything, from hiring across the business to the internal tools we all use.</p><p>At the time, releasing a new city was a lot of work across all teams. We helped create a playbook to make the process leaner and easier, and we&#39;ve since used it to prepare for the launch of 6 more cities. That meant the massive task of refining the tech side to make it even more automated. I still remember the euphoria when the new cities went live... A fantastic team achievement!</p><p>The second is a personal accomplishment. In the last few months, I have been the lead engineer for a massive solidification of the finance platform nestled within the Plum system. I&#39;ve always had an interest to work in more than just building the platform, so I took the opportunity to work alongside stakeholders from customer service, sales and finance to rethink their processes and build a product that made their lives easier. It now captures 10 times as much information as previously.</p><p>On the engineering side, all the new functionality has been built into two .Net Core micro-services, and large swathes of existing functionality were re-written with increased test coverage.</p><p>This project is far from complete and we&#39;ll continue to incrementally improve it, but it is in a much better shape, and has helped to set a precedent for future projects.</p><h3>What the future holds</h3><p>Firstly, I find expanding into new cities and territories really exciting. We&#39;re working on a &quot;city printing machine&quot; that will allow us to launch a new city with a click of a few buttons (instead of weeks of engineering work), but we will never be able to account for all the intricacies and challenges each new city presents.</p><p>Opening new cities also means hiring people from all over the world and all walks of life. Each of them totally unique, but as scarily ambitious and talented as the last.</p><p>The other thrilling thing about Plum is all the advancements in tech we&#39;re planning. Going from a single monolith application to a micro-service architecture is no walk in the park, and with something as abstract as this concept there&#39;s no blueprint that works for all scenarios.</p><p>It’s a complete journey of discovery, trial and error, and a great opportunity to learn, read, experiment and make a real impact on the future architecture of our platform. With the ability to scale the platform, Plum can continue marching on to vet every home on the planet to find the top 1%!</p><p>(We are hiring — if you like the sound of working with us, check out our live roles — <a href="https://careers.plumguide.com/">https://careers.plumguide.com/</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a0ce791809b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumguide/my-first-year-as-a-software-engineer-at-plum-guide-4a0ce791809b">My first year as a Software Engineer at Plum Guide</a> was originally published in <a href="https://medium.com/plumguide">Plum Guide</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>