<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Evan Burbidge on Medium]]></title>
        <description><![CDATA[Stories by Evan Burbidge on Medium]]></description>
        <link>https://medium.com/@thewebuiguy?source=rss-1ec9d8a9430c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d4Aj8EIFFZ9KktS4IV6SNA.jpeg</url>
            <title>Stories by Evan Burbidge on Medium</title>
            <link>https://medium.com/@thewebuiguy?source=rss-1ec9d8a9430c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:55:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thewebuiguy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part 1: Event Ingestion and Live DAU/MAU Tracking]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://thewebuiguy.medium.com/part-1-event-ingestion-and-live-dau-mau-tracking-ce2799534b50?source=rss-1ec9d8a9430c------2"><img src="https://cdn-images-1.medium.com/max/2600/1*LeCTG1jAiQC86CX-Eq08kQ.jpeg" width="3999"></a></p><p class="medium-feed-snippet">A practical guide to collecting millions of events, processing them with Kafka and Flink, and estimating unique users with HyperLogLog.</p><p class="medium-feed-link"><a href="https://thewebuiguy.medium.com/part-1-event-ingestion-and-live-dau-mau-tracking-ce2799534b50?source=rss-1ec9d8a9430c------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://thewebuiguy.medium.com/part-1-event-ingestion-and-live-dau-mau-tracking-ce2799534b50?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce2799534b50</guid>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[apache-flink]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[metrics]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 10:55:54 GMT</pubDate>
            <atom:updated>2026-11-02T10:55:54.491Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Multifaceted Benefits of Indoor Climbing: Fitness, Mental Health, and Overcoming Fears]]></title>
            <link>https://thewebuiguy.medium.com/the-multifaceted-benefits-of-indoor-climbing-fitness-mental-health-and-overcoming-fears-6266c00b20cf?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6266c00b20cf</guid>
            <category><![CDATA[overcoming-fear]]></category>
            <category><![CDATA[workout]]></category>
            <category><![CDATA[climbing]]></category>
            <category><![CDATA[indoor-climbing]]></category>
            <category><![CDATA[fitness]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 14:16:40 GMT</pubDate>
            <atom:updated>2024-07-05T14:16:40.482Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>limbinThe Multifaceted Benefits of Indoor Climbing: Fitness, Mental Health, and Overcoming Fears</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-UUH9jtDsEcCJKvsteRzQ.png" /></figure><p>Indoor climbing has surged in popularity as a multifaceted exercise that offers more than just a physical workout. Its benefits extend into mental health improvements and can even help individuals conquer their fear of heights. In this article, we’ll delve into how indoor climbing can enhance your fitness, aid in muscle building, bolster your mental well-being, and assist you in overcoming acrophobia (the fear of heights).</p><h3>Fitness and Muscle Building</h3><h3>Whole-Body Workout</h3><p>Indoor climbing is a holistic physical activity that engages multiple muscle groups simultaneously. Unlike conventional gym workouts that might isolate specific muscles, climbing requires the use of arms, legs, core, and even fingers, offering a comprehensive workout. This diversity not only improves overall body strength but also enhances endurance and flexibility.</p><h3>Strength and Endurance</h3><p>Climbing walls demand both explosive power to leap for distant holds and endurance to sustain longer climbs. This combination of fast-twitch and slow-twitch muscle engagement is excellent for building a balanced physique. Regular climbers often notice improvements in grip strength, upper body muscles, and core stability.</p><h3>Flexibility and Balance</h3><p>Navigating through various holds and positions on a climbing wall naturally increases your range of motion and flexibility. Moreover, the constant adjustment of your body to maintain balance and posture while climbing can significantly enhance your proprioception and coordination.</p><h3>Mental Health Benefits</h3><h3>Stress Reduction</h3><p>Climbing is an excellent stress reliever. The focus required to navigate a route allows climbers to enter a state of flow, momentarily putting aside life’s stressors. This mindfulness aspect, akin to moving meditation, can decrease anxiety and elevate mood.</p><h3>Confidence and Achievement</h3><p>Completing a challenging route provides a tangible sense of accomplishment, boosting self-esteem and confidence. Indoor climbing offers a safe environment to set and achieve personal goals, fostering a positive mindset and a can-do attitude.</p><h3>Social Interaction</h3><p>Climbing gyms are communal spaces where individuals can meet and connect over shared challenges and successes. This social aspect can contribute positively to mental health, offering a sense of belonging and community support.</p><h3>Overcoming the Fear of Heights</h3><p>On a personal note, this was the worst part of learning to climb for me. From a young age I have always struggled with heights. I could hardly stand on a chair without my legs feeling shakey. After a year of climbing, I can climb ladders, chairs and anything else without the fear effecting me as much.</p><h3>Gradual Exposure</h3><p>Indoor climbing offers a controlled environment to confront and gradually desensitize the fear of heights. Starting with lower bouldering walls and progressing to taller climbing routes can help individuals build confidence in their abilities and safety systems in place.</p><h3>Mind Over Matter</h3><p>Climbing requires not just physical strength but mental fortitude. By focusing on technique and problem-solving, climbers can shift their attention away from fear, training their minds to manage and overcome panic and anxiety.</p><h3>Trust in Equipment</h3><p>Learning about and experiencing the reliability of climbing gear (harnesses, ropes, and belay devices) can alleviate fears associated with falling. This trust, combined with the support of belayers and instructors, creates a safe space to challenge oneself beyond comfort zones.</p><h3>Conclusion</h3><p>Indoor climbing is not just an exercise for the body but also a catalyst for personal growth and mental resilience. By pushing physical limits, offering a path through mental challenges, and providing a platform to overcome innate fears, it stands out as a holistic activity conducive to overall well-being. Whether you’re looking to enhance your fitness, build muscle, improve your mental health, or conquer a fear of heights, indoor climbing offers a unique and fulfilling path to achieving your goals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6266c00b20cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Workout routines for busy developers]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://thewebuiguy.medium.com/workout-routines-for-busy-developers-972a62559d43?source=rss-1ec9d8a9430c------2"><img src="https://cdn-images-1.medium.com/max/1184/1*huyjCI88wVVdYnA-2s-IMQ.png" width="1184"></a></p><p class="medium-feed-snippet">In today&#x2019;s fast-paced world, finding time for exercise can be challenging. However, even the busiest individuals can incorporate effective&#x2026;</p><p class="medium-feed-link"><a href="https://thewebuiguy.medium.com/workout-routines-for-busy-developers-972a62559d43?source=rss-1ec9d8a9430c------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://thewebuiguy.medium.com/workout-routines-for-busy-developers-972a62559d43?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/972a62559d43</guid>
            <category><![CDATA[workout-routines]]></category>
            <category><![CDATA[workout]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 19:58:20 GMT</pubDate>
            <atom:updated>2024-06-25T19:58:20.368Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A Guide to Measuring Distance on any Webpage]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/a-guide-to-measuring-distance-on-any-webpage-22cb1032393a?source=rss-1ec9d8a9430c------2"><img src="https://cdn-images-1.medium.com/max/941/1*eYUjB1xoTVpuHjsAXq3Hnw.png" width="941"></a></p><p class="medium-feed-snippet">Measuring pixel distance on a webpage is a crucial skill for web developers and designers, ensuring that layouts appear as intended across&#x2026;</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/a-guide-to-measuring-distance-on-any-webpage-22cb1032393a?source=rss-1ec9d8a9430c------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/a-guide-to-measuring-distance-on-any-webpage-22cb1032393a?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/22cb1032393a</guid>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Sun, 10 Mar 2024 17:54:36 GMT</pubDate>
            <atom:updated>2024-03-11T17:16:06.035Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How covid killed my startup]]></title>
            <link>https://thewebuiguy.medium.com/how-covid-killed-my-startup-a44c5fc95843?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a44c5fc95843</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 13:36:20 GMT</pubDate>
            <atom:updated>2024-02-26T13:36:20.201Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is a short story about filling my time during the pandemic, almost scoring big.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*WEH3VX60Yr46lNw0uihBsg.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fcarney.co%2Fdaily-carnage-feature%2Fsmile-through-the-pain%2F&amp;psig=AOvVaw2gdSYI1eBjlpjf4xoJkpgD&amp;ust=1709040700169000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBMQjRxqFwoTCIDp5fGOyYQDFQAAAAAdAAAAABAD">link</a></figcaption></figure><h4>Introduction</h4><p>2020 was a bit of a crazy year, and yes I know that is an understatement. I remember being at a party and people being asked “do you think this covid thing will affect your trip” and folks thinking no, no way. Then they announced the lockdown and with that everything stopped.</p><p>I was fresh into a new job and terrified that I was going to be made redundant. I had left a job in a sector that I knew would survive in the long term (education) and I now had a new dog which was a great excuse to get out and go for short enough walks at lunch time.</p><p>But I needed to fill my evenings so I developed “Kount”.</p><h4>Inspirations</h4><p>I started to develop Kount as some restrictions started to be lifted. I went to my local McDonalds, because it had just reopened and I was saw they were using a pen and paper in order to record the details of everyone going into the restaurant. I thought to myself, why not automate it.</p><p>Which is when I the idea came to me that got me to start developing “kount”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*tIsbzRkPAoojKR_GOZfayA.png" /></figure><p>The idea of kount was simple, there was an admin and a consumer application. The admin app could scan a barcode and the consumer app allowed consumers to enter their details which would be embedded into a QR Code that could be scanned by the admin app. The admin app would then record the persons data incase of a close contact issue happening.</p><h4>Ok so what happened?</h4><p>It went great, I took a while to develop it as I was new to some of the tech involved but I had managed to sign up a number of businesses. They were all onboarded to the system and ready to go.</p><p>Then two days before our launch…. lockdown was over.</p><p>The government announced that there would be no more restrictions, no more contact tracing and no need for businesses to keep track of the comings and goings of their customers. So there was no need for Kount anymore.</p><p>I was contacted later on that day by many of the folks asking to cancel their accounts.</p><h4>But every cloud has a silver lining</h4><p>But, on the upside, now I knew how to write mobile applications and I didn’t have to stay within 2km of my home anymore. So I got back to normal life, I got back to going into the office and I kept going on walks with my dog each day at lunch time.</p><p>The learnings that I have from this project have sparked a lot of new projects. One of these gymbuddy.ai uses the same underlying components that I had developed for Kount.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a44c5fc95843" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leveraging Github and Jira to manage a large amount of tasks and context switching.]]></title>
            <link>https://thewebuiguy.medium.com/leveraging-github-and-jira-to-manage-a-large-amount-of-tasks-and-context-switching-a812a69cd181?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a812a69cd181</guid>
            <category><![CDATA[jira]]></category>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[task-management]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 16:04:35 GMT</pubDate>
            <atom:updated>2024-01-08T16:04:35.528Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide to</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pn1P9tssVl05ZJLdK2Daaw.png" /><figcaption>Dall-e</figcaption></figure><h4>Introduction</h4><p>A significant challenge I face involves remembering the specific repository and feature branch associated with a particular ticket or issue. To address this, I often name branches in a way that references the ticket id or source.</p><p>For instance, while working on a GitHub issue, I might name my branch “<strong>git-&lt;issue_id&gt;</strong>”. Similarly, for a Jira issue, I use a combination of the Jira project abbreviation and the issue id, like “<strong>prj-123”.</strong></p><p>This approach helps me maintain a direct link to the ticket. However, difficulties arise when a task spans multiple repositories, teams, and requires additional tracking to keep track of all the aspects influenced by the issue.</p><h4>Mention the issue</h4><p>The first thing that I will always do when working on an issue is to mention that issue in any pull requests that are opened. This ensures automatically on Github that an issue has references to all of the pull requests that are related.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*EW1vzORtzabJdSgtz2D7dA.png" /><figcaption>Mentioning the issue</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*5kPnmipb-EVVC68Is9XSHA.png" /><figcaption>Linked mention</figcaption></figure><p>With this tool you can mention this issue in all of your repos and have the issue referenced across different repositories if needed. You Will need to copy / paste the full URL of your issue if you’re not in the same repository.</p><h4>Draft Pull Requests</h4><p>To manage feature branches effectively, it’s recommended to maintain draft Pull Requests (PRs). This can be done by either directly associating the issue with the PR if it’s on GitHub, or by adding a link to the corresponding Jira ticket in the PR’s description.</p><p>When a link to a Jira ticket is included in the PR body, Jira should automatically synchronise with that PR. This approach helps in organising and tracking the progress of feature developments efficiently.</p><p>Draft Pull Requests (PRs) serve as an excellent tool for recording preliminary ideas or notes that might later be included in the PR description. It’s often useful to outline the intended work in these drafts, employing checkboxes to monitor completed tasks.</p><p>This method is particularly beneficial for those who frequently switch contexts, as it provides a clear reference of pending tasks upon returning to the draft PR. Additionally, this list can effectively double as a summary of changes, offering valuable insight when the PR is eventually ready for review.</p><h4>Use Github Keywords</h4><p>Github offers a list of <a href="https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword">keywords</a> that can be used within a pull requests template. This will allow you to automatically close, fix or resolve your issues through merging your pull request.</p><p>However, it’s important to note that even after a pull request is merged and the associated issue is closed, the task isn’t necessarily complete. There remains a crucial step: testing the changes in various environments, including testing and production.</p><p>While the tools and processes in place help in staying organised and tracking tasks efficiently, they might inadvertently lead developers to overlook the final and critical phase of testing the implemented changes once they are released. This step is essential to ensure that everything works as intended in real-world scenarios.</p><p>If you want to sign up to access more medium content please do so with the following <a href="https://thewebuiguy.com/membership">link</a>. This will enable me to write more stories through a small commission from Medium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a812a69cd181" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cleaning Up Reducers with the kotlin-when Package]]></title>
            <link>https://blog.stackademic.com/cleaning-up-reducers-with-the-kotlin-when-package-4834827681fc?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4834827681fc</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[state-management]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Sat, 14 Oct 2023 13:42:43 GMT</pubDate>
            <atom:updated>2023-10-16T08:13:05.306Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide to</h4><h4>Sometimes our reducers can get quite long and verbose within switch statements, by using the kotlin-when package we can clean them up</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R7-PZpOiZUjvwU47DOqwJQ.png" /><figcaption><a href="https://media.geeksforgeeks.org/wp-content/cdn-uploads/20191216192618/7-Tips-To-Write-Clean-And-Better-Code-in-2020.png">Credits</a></figcaption></figure><h4>Introduction</h4><p>In React, Redux reducers play a pivotal role in managing the application’s state. They are responsible for specifying how the application’s state should change in response to various actions or events.</p><p>Reducers are pure functions that take the current state and an action as input and return a new state object, ensuring that the original state remains unaltered. This predictable and immutable approach to state management makes Redux a popular choice for handling complex application state, enabling developers to easily reason about the flow of data and maintain a consistent, centralized state throughout their React applications.</p><h4>The verbose reducer</h4><p>Consider a simple example of a Redux reducer for managing the state of data fetching from an API. This reducer might have three states: ‘idle’, ‘loading’, and ‘loaded’. In the ‘idle’ state, no data has been requested or received, and the initial state is empty.</p><p>When an action is dispatched to initiate a data request, the reducer transitions to the ‘loading’ state, indicating that data retrieval is in progress. Once the data is successfully fetched, the state transitions to ‘loaded,’ storing the received data.</p><p>If an error occurs during the request, a separate state like ‘error’ could be included to handle error conditions. This basic example showcases how a Redux reducer can efficiently manage the progression of data fetching.</p><pre>// Initial state<br>const initialState = {<br>  data: null,<br>  loading: false,<br>  error: null,<br>};<br><br>// Reducer function<br>const dataReducer = (state = initialState, action) =&gt; {<br>  switch (action.type) {<br>    case &#39;FETCH_DATA_REQUEST&#39;:<br>      return {<br>        ...state,<br>        loading: true,<br>      };<br>    case &#39;FETCH_DATA_SUCCESS&#39;:<br>      return {<br>        ...state,<br>        loading: false,<br>        data: action.payload,<br>        error: null,<br>      };<br>    case &#39;FETCH_DATA_FAILURE&#39;:<br>      return {<br>        ...state,<br>        loading: false,<br>        data: null,<br>        error: action.error,<br>      };<br>    default:<br>      return state;<br>  }<br>};<br><br>export default dataReducer;</pre><h4>Cleaning it up</h4><p>So how can we go about cleaning up this reducer? This is where our <a href="https://npmjs.com/package/kotlin-when">kotlin-when </a>package comes in handy. In order to clean up our state we can do something like this.</p><pre>import { when } from &#39;kotlin-when&#39;<br>// Initial state<br>const initialState = {<br>  data: null,<br>  loading: false,<br>  error: null,<br>};<br><br>// Reducer function<br>const dataReducer = (state = initialState, action) =&gt; when(action.type, {<br>  &#39;FETCH_DATA_REQUEST&#39;: () =&gt; ({...state, loading: true }),<br>  &#39;FETCH_DATA_SUCCESS&#39;: () =&gt; ({...state, loading: false, data: action.payload }),<br>  &#39;FETCH_DATA_FAILURE&#39;: () =&gt; ({...state, loading: false, data: null, error: action.error  }),<br>  // the else clause is similar to the default clause in switch<br>  else: () =&gt; state,<br>});<br><br><br>export default dataReducer;</pre><p>As we can see our function looks a whole lot smaller now and we can still handle the same states. Now let’s see if we can clean this up even further.</p><h4>Easier testing</h4><p>By default when returns the value passed at the end of its function, in this case it will pass back each state given to it by the return function in our when conditions. So we could also move these functions out of the clause itself and have them to be tested individually or simply write tests for this method passing in the different keys. Here is an example jest test.</p><pre>const when = require(&quot;./whenjs&quot;);<br><br>const initialState = { data: null, loading: false }<br>const reducer = (state = initialState, action) =&gt; when(action.type, {<br>  &#39;FETCHING&#39;: () =&gt; ({ ...state, loading: true }),<br>  &#39;FETCHING_DONE&#39;: () =&gt; ({ ...state, loading: false, data: [1, 2, 3] }),<br>})<br><br>describe(&quot;When.js&quot;, () =&gt; {<br>  it(&quot;should test a &#39;reducer method&#39;&quot;, () =&gt; {<br>    const result = reducer(initialState, { type: &#39;FETCHING&#39; });<br>    expect(result.loading).toBe(true);<br>  });<br>  it(&quot;should test a &#39;reducer method&#39;&quot;, () =&gt; {<br>    const result = reducer(initialState, { type: &#39;FETCHING_DONE&#39; });<br>    expect(result.loading).toBe(false);<br>    expect(JSON.stringify(result.data)).toBe(JSON.stringify([1, 2, 3]));<br>  });<br>});</pre><h4>Conclusions</h4><p>While not absolutely needed in every project this is a nice tool to have in your toolkit that can clean your code up. It’s also slightly faster than a switch statement as it doesn’t have to check each case but rather accesses the correct function in O(1) time.</p><p>If you want to sign up to access more medium content please do so with the following <a href="https://thewebuiguy.com/membership">link</a>. This will enable me to write more stories through a small commission from Medium.</p><h3>Stackademic</h3><p><em>Thank you for reading until the end. Before you go:</em></p><ul><li><em>Please consider </em><strong><em>clapping</em></strong><em> and </em><strong><em>following</em></strong><em> the writer! 👏</em></li><li><em>Follow us on </em><a href="https://twitter.com/stackademichq"><strong><em>Twitter(X)</em></strong></a><em>, </em><a href="https://www.linkedin.com/company/stackademic"><strong><em>LinkedIn</em></strong></a><em>, and </em><a href="https://www.youtube.com/c/stackademic"><strong><em>YouTube</em></strong></a><strong><em>.</em></strong></li><li><em>Visit </em><a href="http://stackademic.com/"><strong><em>Stackademic.com</em></strong></a><em> to find out more about how we are democratizing free programming education around the world.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4834827681fc" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/cleaning-up-reducers-with-the-kotlin-when-package-4834827681fc">Cleaning Up Reducers with the kotlin-when Package</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A cleaner way of checking conditions in Javascript]]></title>
            <link>https://thewebuiguy.medium.com/a-cleaner-way-of-checking-conditions-in-javascript-085b617b264f?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/085b617b264f</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[conditional-statements]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 22:03:55 GMT</pubDate>
            <atom:updated>2023-10-12T22:03:55.000Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dPWEJ9Rd29uYUCZ8j21pg.png" /></figure><h3>Introduction</h3><p>Using `if-else` statements and `switch` cases in JavaScript can often lead to verbose code due to their repetitive and explicit nature. Let’s explore two examples of this verbosity:</p><ol><li><strong>Multiple Conditions in `if-else` Statements:</strong><br> When you have to evaluate multiple conditions, `if-else` chains become cumbersome. For instance, consider a scenario where you want to categorize a person’s age into different age groups. Using `if-else`, you might end up with a lot of repetitive code:</li></ol><pre>if (age &lt; 18) {<br>    category = &quot;Child&quot;;<br>} else if (age &gt;= 18 &amp;&amp; age &lt; 30) {<br>    category = &quot;Young Adult&quot;;<br>} else if (age &gt;= 30 &amp;&amp; age &lt; 50) {<br>    category = &quot;Adult&quot;;<br>} else if (age &gt;= 50) {<br>    category = &quot;Senior&quot;;<br>}</pre><p>This code is verbose and prone to errors, especially if you need to adjust the age groups. Using a switch case can also be verbose when multiple cases share the same code block.</p><p><strong>2. Switch Cases:</strong><br> Switch cases are straightforward when you’re comparing a single value, but they can become verbose when you need to perform more complex comparisons. For example all of this code just to tell us the day of the week.</p><pre>switch (dayOfWeek) {<br>    case &quot;Monday&quot;:<br>        console.log(&quot;It&#39;s Monday!&quot;);<br>        break;<br>    case &quot;Tuesday&quot;:<br>        console.log(&quot;It&#39;s Tuesday!&quot;);<br>        break;<br>    case &quot;Wednesday&quot;:<br>        console.log(&quot;It&#39;s Wednesday!&quot;);<br>        break;<br>    case &quot;Thursday&quot;:<br>        console.log(&quot;It&#39;s Thursday!&quot;);<br>        break;<br>    case &quot;Friday&quot;:<br>        console.log(&quot;It&#39;s Friday!&quot;);<br>        break;<br>    case &quot;Saturday&quot;:<br>        console.log(&quot;It&#39;s Saturday!&quot;);<br>        break;<br>    case &quot;Sunday&quot;:<br>        console.log(&quot;It&#39;s Sunday!&quot;);<br>        break;<br>    default:<br>        console.log(&quot;Invalid day of the week&quot;);<br>}</pre><p>As shown, this approach results in a lot of indentation and can be challenging to read and maintain. In such cases, a more concise and readable approach, such as using object literals or function-based dispatching, can make the code less verbose and more maintainable.</p><p>In summary, while `if-else` and `switch` statements have their uses, they can become verbose and hard to manage in certain situations, especially when dealing with multiple conditions or complex comparisons. In such cases, it’s often better to explore alternative coding patterns that lead to more concise and maintainable code.</p><h3>So let’s try “when”</h3><p>In the Kotlin language we can use when statements which is their answer to the Java switch statement. Here is an example:</p><pre>fun main() {<br>    val number = &quot;11&quot;<br>    val result = when (number) {<br>        &quot;12&quot; -&gt; { &quot;not eleven?&quot; }<br>        &quot;11&quot; -&gt; { &quot;Bingo! It&#39;s eleven.&quot; }<br>        else -&gt; { &quot;Invalid number&quot; }<br>    }<br>    println(result)<br>}</pre><p>In order to replicate this I have created the <a href="https://www.npmjs.com/package/kotlin-when"><strong>kotlin-when</strong></a><strong> </strong>npm library. In this library, if a matching case is found, only the code in the respective case block is executed, and execution continues with the next statement after the when block.</p><p>This essentially means that we don’t need break statements at the end of each case block.</p><pre>when(dayOfTheWeek, {<br>  &quot;Monday&quot;: () =&gt; console.log(&quot;It&#39;s a Monday&quot;,)<br>  &#39;Tuesday&#39;: () =&gt; console.log( &quot;It&#39;s a Tuesday&quot;)<br>});</pre><p>If you want to sign up to access more medium content please do so with the following <a href="https://thewebuiguy.com/membership">link</a>. This will enable me to write more stories through a small commission from Medium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=085b617b264f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Planning Frontend Projects Using Atomic Design]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/planning-frontend-projects-using-atomic-design-5fbde75d5a6f?source=rss-1ec9d8a9430c------2"><img src="https://cdn-images-1.medium.com/max/1200/1*Uo5tF1reZzfhzjkkGVtlvw.jpeg" width="1200"></a></p><p class="medium-feed-snippet">Planning a project can take up a large amount of time. But proper planning can ensure better execution</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/planning-frontend-projects-using-atomic-design-5fbde75d5a6f?source=rss-1ec9d8a9430c------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/planning-frontend-projects-using-atomic-design-5fbde75d5a6f?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fbde75d5a6f</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[atomic-design]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 15:06:00 GMT</pubDate>
            <atom:updated>2023-08-31T09:38:43.146Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Ensuring Reusability of Code in Large Projects]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://javascript.plainenglish.io/ensuring-reusability-of-code-in-large-projects-cb52e41f1653?source=rss-1ec9d8a9430c------2"><img src="https://cdn-images-1.medium.com/max/1304/1*fdkIYhvkj84YPnd1pyPIiA.png" width="1304"></a></p><p class="medium-feed-snippet">The cost of software is high, but ensuring reusability by being application agnostic is an easy way to reduce that cost.</p><p class="medium-feed-link"><a href="https://javascript.plainenglish.io/ensuring-reusability-of-code-in-large-projects-cb52e41f1653?source=rss-1ec9d8a9430c------2">Continue reading on JavaScript in Plain English »</a></p></div>]]></description>
            <link>https://javascript.plainenglish.io/ensuring-reusability-of-code-in-large-projects-cb52e41f1653?source=rss-1ec9d8a9430c------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb52e41f1653</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Evan Burbidge]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 11:26:31 GMT</pubDate>
            <atom:updated>2023-08-21T00:30:05.055Z</atom:updated>
        </item>
    </channel>
</rss>