<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Life Lesson - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Life Lesson - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 26 May 2026 04:44:30 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/life-lesson/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Lessons We Can Learn from Git Revert in Our Fight with COVID-19 ]]>
                </title>
                <description>
                    <![CDATA[ By Syk Houdeib In this article, I'll discuss how a small tech team found itself in the middle of a national emergency in Spain. And what their use of git revert can teach us about dealing with COVID-19 in our personal lives. Intro It was late in the ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-we-can-learn-from-git-revert-in-our-fight-against-covid19/</link>
                <guid isPermaLink="false">66d461553bc3ab877dae2245</guid>
                
                    <category>
                        <![CDATA[ Covid-19 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Life Lesson ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Spain ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 08 Apr 2020 07:17:58 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9bbb740569d1a4ca2d97.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Syk Houdeib</p>
<p>In this article, I'll discuss how a small tech team found itself in the middle of a national emergency in Spain. And what their use of git revert can teach us about dealing with COVID-19 in our personal lives.</p>
<h2 id="heading-intro">Intro</h2>
<p>It was late in the afternoon of Wednesday 11th of March 2020. There were a few of us left in the office in the centre of Madrid as we got notified to take our laptops with us home today. Starting the day after we were to work remotely until further notice. </p>
<p>Two days earlier the government had closed all schools and universities because of the Coronavirus emergency. There was a lot of uncertainty, and things were changing at a fast pace. None of us really knew what was going to happen next.</p>
<p>The mood became sombre as we packed our stuff. We started making grim predictions about how long it would be before we came back. Little did we know that we were a few days away from a declaration of a nation-wide state of emergency. And that at the time of writing we are still weeks away from going back to that office in the centre of Madrid.</p>
<p>I want to share with you this article in two sections. The first a quick tour of how my team found itself at the centre of this national emergency. To give you an idea about how we reacted. </p>
<p>But in essence, I'm sharing this with you because I found a valuable lesson in that response for my personal life. And I'm hoping you too might find some value in it as we all deal with this worsening COVID-19 crisis and the changing world around us.</p>
<p>At the heart of all of this is a little checkbox titled "Revert".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-176.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@martinsanchez?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Martin Sanchez / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<h2 id="heading-in-the-eye-of-the-hurricane">In the eye of the hurricane</h2>
<p>I'm a front-end developer at Lola Market. It's a Spanish startup based in Madrid. Our business is offering a platform for online grocery shopping. Users can do their grocery shopping online from a wide selection of markets and supermarkets. Their orders then get sent to shoppers who can deliver it to their doorstep within an hour.</p>
<p>This has suddenly become an essential service right now.  If you are reading this and you are one of the millions that are currently on lockdown because of the coronavirus I don't need to explain to you why. But for posterity, I will. Believe it or not, this will all soon pass, and there will come a moment when it's not as evident as it is now.</p>
<p>Once the Spanish government declared the state of emergency the entire country went into lockdown. People were no longer allowed to leave their homes except for essentials. </p>
<p>Certain groups were in total quarantine which doesn't allow them to leave the house at all. This includes people who have any COVID-19 symptoms. Those who had contact with anyone who tested positive. Or people in high-risk groups.</p>
<p>In light of all this, getting shopping ordered online and delivered to the home stopped being a convenience. It was now a necessity for many people.</p>
<p>Lola Market, on the eve of the declaration of the state of emergency, was still a small startup. I have been there for nearly two years during which time we have seen steady and impressive growth. </p>
<p>We had changed offices a year ago and almost doubled in number. But we were still barely 40 people in total. The tech team is made up of 11 people, 8 of whom are developers. Our customer care team is even smaller.</p>
<p>The CEO only a few weeks earlier was talking about getting ready for the moment of exponential growth that we were working towards. But we had no idea that a worldwide pandemic was going to catapult us there so soon at this vertiginous speed. </p>
<h2 id="heading-the-flood">The flood</h2>
<p>Once the state of emergency was declared, we instantly started breaking all sorts of records. We watched as the number of orders exploded.</p>
<p>At first, all went well. But the numbers kept growing and growing. By the second week of the lockdown, the demand had exceeded everything that could be handled. </p>
<p>Customer care department was overwhelmed with thousands of emails and calls. Operations were struggling as supermarkets suffered serious shortages, long lines, early closures, and a lot of restrictions. As well as not having enough shoppers to cover the demand.</p>
<p>And our tech infrastructure started to suffer under a pressure that wasn't just coming from a huge increase of traffic. But also because the tools we had were being used in an atypical manner that didn't follow what we were used to with our usual user before the emergency. The entire country was stressed and under pressure. Everyone needed to cover their essentials.</p>
<p>One has to count their blessings though. Personally I was grateful to be in this situation. All around me people were losing their jobs in a blink of an eye. </p>
<p>And it wasn't just that we had a job to go to, it was that our job gave us the sensation that we are contributing to relief in a state of emergency. Even if it was in the smallest way possible. It gave us a purpose and made what we are doing worthwhile. And that's more than one could ask for in a dire situation like this.</p>
<h2 id="heading-the-shift">The shift</h2>
<p>Pretty early on, we had a meeting and our CTO told us how we needed to shift our priorities and respond to the sudden change.</p>
<p>We were in the middle of an important sprint finishing off the last projects of the quarter. But most of those projects were no longer a priority. The sprint needed to be suspended as we started dealing with the more urgent matters coming up.</p>
<p>In the first week, we needed to figure out ways to help out the rest of the team in other departments to deal with the great volume they were facing.</p>
<p>Even something as simple as moving a menu in an internal tool to be easily accessible could save hours of work when you are dealing with so much sudden demand. But by the second week, we had even more serious issues to deal with to be able to absorb and control the surge in demand on our infrastructure.</p>
<h2 id="heading-the-changes">The changes</h2>
<p>Over these last few weeks, we've had to implement a lot of changes on the fly to deal with this ever-changing situation. Some of the things entrusted to the tech team to solve included: </p>
<ul>
<li>Showing dynamic and clearer information to our users about the situation and about the state of their orders.</li>
<li>Simplifying and automating parts of the process of on-boarding new shoppers to speed up the process and help meet the demand.</li>
<li>Trying to show more realistic availability of delivery time slots.</li>
<li>Big improvements and optimisations of infrastructure, performance, customer care tools, operations tools, and the shopper app.</li>
<li>Automation of many internal tasks, especially those that have become repetitive.</li>
<li>Making the API load lighter.</li>
</ul>
<p><em>Disclaimer: This is a personal article and not an official statement from the company. At the time of writing we are still in the thick of it. Some changes are already deployed. Others we are still implementing. And the situation is constantly changing.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-177.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@glenncarstenspeters?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Glenn Carstens-Peters / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<h2 id="heading-the-emergency-list">The emergency list</h2>
<p>You can imagine that working in such circumstances is a challenge for any team, let alone a team of such a small size. It has been stressful and exhilarating in equal parts. </p>
<p>But I'm lucky to work with such a positive team. Especially the 4-person back end squad who dealt stoically with moments of complete meltdown and figured out solutions at an astonishing speed.</p>
<p>This brings me to the element that connects the two sections of this article: the emergency list.</p>
<p>To deal with all these tasks, and the constant shifts, we created an emergency list. It's a simple list of tasks in a Notion table. As the situation evolved the list kept on growing and the tasks kept altering in priority.</p>
<p>The most important part of that list for our story here is the column titled "Revert". The column contains a checkbox next to each task. It is this little checkbox that resonated with me and gave me an idea about how I should be dealing with this crisis on a personal level too. </p>
<h2 id="heading-revert">Revert</h2>
<p>We use the "Revert" checkbox to indicate clearly if this is a task that should be reverted once this is all over or not.</p>
<p>If the revert checkbox is checked it means it's a task that we are doing now to solve a specific problem that, once the crisis is over and we're back to normal, we'll need to revert. </p>
<p>This is something that only has value in this emergency and its context. It serves a purpose now, but will no longer be needed later. Many of these changes will, in fact, be downright harmful once the emergency passes.</p>
<p>If this checkbox is unchecked, it means that whatever we are changing is staying after the crisis is over. It's something that we knew all along we needed to do but hadn't come around doing it. But because of this situation has become a priority. </p>
<p>Or it's something we didn't see and it's become obvious now. These are things to help us scale better, and improve our service in general. They are things that are settling a technical debt that has become vital to pay. They are improvements to our codebase, our infrastructure, or our processes that are beneficial in the long run and not just for now.</p>
<p>What we are doing is we are thinking of the future, of what happens once all this passes. Because it will. And life will go back to its natural course. We will be changed, and the world around us too. But life will carry on.</p>
<p>A pandemic that most of us weren't prepared to face created havoc in our lives and our businesses. But we cannot permit this crisis to create total chaos in our lives afterwards too. We should be prepared for the time it all passes.</p>
<h2 id="heading-applying-the-revert-to-our-personal-lives">Applying the revert to our personal lives</h2>
<p>So how does any of this relate to our lives as we deal with this COVID-19 world we're living in and its aftermath?</p>
<p>Simply put, we all need a revert checkbox. We need it next to the many changes we are applying to our lives. Changes we are applying to deal with the virus, with our jobs, with our families and the world at large as we navigate this unprecedented situation.</p>
<p>For me, I'm keeping a similar kind of list for my personal life. We can all have a list like this one. Document it the way you know best. Whether it's a written list, a mental list or any other type of documenting you usually use. It doesn't matter. What matters is to have that "Revert" checkbox.</p>
<p>As we all grapple with this extraordinary situation and all the fear, hardship, uncertainty, and even tragedy it brings with it. We all have a list of things we are doing born out of this emergency.</p>
<p>We need to keep clear what needs to be reverted later and what needs to stay. We are very quick to form habits. Many of us have already spent a month indoors. Many more will follow suit soon as this thing keeps spreading. We can't even tell how long we are going to be in this situation.</p>
<p>So we need to keep that revert checkbox as prominent as possible.</p>
<p>We need to examine the list of changes that we are applying to our new reality.</p>
<p>If it's something that is improving us and our lives, keep that checkbox clear. Maybe you realised you should call your Mum more often. Or nurture your old friendships. Or spend more time with your kids. Or never take for granted the hugs you can give to your grandparents. </p>
<p>Maybe it's something as simple as being thankful that you can have a beer with your friends. Or listening to a busker on a busy street corner on your way back from work.</p>
<p>Mark those as habits to keep. Things to continue working on and improving after this passes.</p>
<p>But for anything else, all those things that will not be helpful after. We need to check the "Revert" box.</p>
<p>All the things that are helping us survive an ordeal, helping us cope with this, deal with it. All the fears that are important to keeping us on our toes and staying safe. All the extra precautions. The distancing. The little things we are allowing ourselves. The indulgences. The excesses. All those things that will quickly become harmful to us in a life after COVID-19.</p>
<p>For those make sure you check the "Revert" checkbox with a big fat green marker. ✅</p>
<p>Once this is over, it'll be time to revert. Time to undo all that and move forward.</p>
<h2 id="heading-outro">Outro</h2>
<p>Thank you for reading. I hope you and your loved ones stay safe and that life returns to normal for all of us very soon.  </p>
<p>And good luck with your revert checkboxes.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ These common mistakes will lead to immortal bugs. Learn how to avoid them. ]]>
                </title>
                <description>
                    <![CDATA[ By David Yu Didn’t we already fix that? The question that you or your teammate would ask after the product manager posts a snapshot of the bug. This whole event feels like a Deja Vu. You try to retrace the time you fixed that bug in the commits, but ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/these-common-mistakes-will-lead-to-immortal-bugs-learn-how-to-avoid-them-eee79ee43cd5/</link>
                <guid isPermaLink="false">66c362f5020f8e9c31066e66</guid>
                
                    <category>
                        <![CDATA[ bugs ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Life Lesson ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WeChat ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 13 Nov 2018 23:25:53 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*_tDOnN79K8WqoVD0" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By David Yu</p>
<p><strong><em>Didn’t we already fix that?</em></strong></p>
<p>The question that you or your teammate would ask after the product manager posts a snapshot of the bug.</p>
<p>This whole event feels like a Deja Vu. You try to retrace the time you fixed that bug in the commits, but what’s the point?</p>
<p>The reality is if you don’t get to the root cause of the bug, it will come back like the Hydra of Lerna.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/m8XUwZGMf2YTjk5zY2UhvOKC8qrJ2D5JEkIA" alt="Image" width="800" height="562" loading="lazy">
_Source: [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Hercules_and_the_Hydra_of_Lerna-_Hercules_grasps_his_club_with_both_hands_and_confronts_the_seven-headed_hydra,_from_the<em>series</em>%27The_Labors_of_Hercules%27_MET_DP832529.jpg" rel="noopener" target="<em>blank" title=")</em></p>
<p>Here are some patterns that lead to immortal bugs.</p>
<h3 id="heading-hardcoding-a-value">Hardcoding a value</h3>
<p>When we’re doing front-end development, we often use dummy data to build out the user interface quickly. That’s fine.</p>
<p>The problem is having dummy data at multiple locations. Then it’s easy to forget one or two when you push your code.</p>
<p>Here are some tips:</p>
<ul>
<li>Use a single variable for your dummy data and share it across different components</li>
<li>Write a comment like <code>// TODO: remove later</code> to allow easy search later</li>
<li>Don’t rely on backend data to always be the same</li>
</ul>
<pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code>&lt;img src={<span class="hljs-built_in">require</span>(<span class="hljs-string">`./assets/<span class="hljs-subst">${backendData.fileName}</span>.png`</span>)} /&gt;
</code></pre><pre><code><span class="hljs-comment">// This will break if fileName is an unexpected string</span>
</code></pre><pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code><span class="hljs-keyword">let</span> img;
</code></pre><pre><code><span class="hljs-keyword">try</span> {
</code></pre><pre><code>  img = <span class="hljs-built_in">require</span>(<span class="hljs-string">`./assets/<span class="hljs-subst">${backendData.fileName}</span>.png`</span>)
</code></pre><pre><code>} <span class="hljs-keyword">catch</span>(e) {  <span class="hljs-comment">// Catch error if file doesn't exist</span>
</code></pre><pre><code>}&lt;img src={img} /&gt;
</code></pre><pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code>&lt;img src={backendData.imgUrl} /&gt;
</code></pre><h3 id="heading-lets-refactor-later">Let’s Refactor Later</h3>
<p>Your codebase will only grow larger and larger as you work on it. Your client or your boss won’t know the negative effect of not refactoring the code, because everything looks fine on the surface.</p>
<p>Plus, it’s always more satisfying to write something new and show it to other people. “Hey, check out what it can do now.”</p>
<p>So how do we know when to refactor the code?</p>
<p>According to [Refactor Guru](http://2018-10-28    14:00    21:00    2018-10    ¥300.00    7:00:00    -¥2,100.00    David    Front-End    Bug fixes: speaker/headphone control. Countdown timer based on start_time plus duration. Update call status from in_progress to ended), follow the Rule of Three</p>
<ol>
<li>When you are doing something for the first time, just get it done.</li>
<li>When you are doing something similar for the second time, cringe at having to repeat but do the same thing anyway.</li>
<li>When you are doing something for the third time, start refactoring.</li>
</ol>
<h3 id="heading-keep-everything-in-one-file">Keep everything in one file</h3>
<p>This goes along with code refactor. When the project is fresh, it’s difficult to predict how large a feature will become.</p>
<p>In the past, I had a file that grew into thousands of lines of code. Refactoring that code is like performing surgery, delicate, but rewarding at the end.</p>
<p>Most people have a principle of how their project is structured. Separation of files by pages, features, dev. or production, private or public method, MVC model, etc.</p>
<p>How to structure a project folder is a large discussion by itself. I will save that for another article.</p>
<h3 id="heading-dont-write-specs-for-api">Don’t write specs for API</h3>
<p>“Wait, why don’t the pictures show up anymore?” the product manager asks the front-end developers.</p>
<p>“Wait, why doesn’t the data have the picture_url anymore?” The front-end developer checks the console for network response.</p>
<p>“Oh yea, now the pictures come in three sizes. large_pic_url, med_pic_url, small_pic_url.” The back-end developer heard the discussion and jumped in.</p>
<p>Sounds familiar?</p>
<p>Everyone is trying to do their job. But synergy won’t happen in the silo. It’s everyone’s job to communicate what’s needed.</p>
<p>Here are some simple solutions to start.</p>
<ul>
<li>Before building an API, start with a JSON file of the data that both front-end and back-end developers have access to.</li>
<li>When the API is completed, generate the document with <a target="_blank" href="https://github.com/apidoc/apidoc">https://github.com/apidoc/apidoc</a></li>
<li>Notify of breaking changes before deployment</li>
</ul>
<p>There are more sophisticated approaches to writing specs and handling documentation. And I would love to hear about what approach your team uses in the comment section.</p>
<h3 id="heading-merge-code-without-reading-conflicts">Merge code without reading conflicts</h3>
<p>Breaking things is less of a worry since you can always revert back to the previous commit.</p>
<p>It’s your or your teammate’s code disappearing during the process that’s the problem.</p>
<p>This often happens when you want to “save time” and move forward.</p>
<p>When in doubt, get in contact with the developer who made the commit that conflicts with yours.</p>
<p>When you mess up, <code>git merge --abort</code> or <code>git-reset --hard</code>.</p>
<p>When it breaks beyond repair, remove the project and clone it again.</p>
<p>Think twice when doing <code>git push -f</code>.</p>
<h3 id="heading-fix-a-reusable-component-without-testing">Fix a reusable component without testing</h3>
<p>Reusable components are the magical trick up every developer’s sleeve. Like when the client pitches you the wireframe that contains the same date picker across several pages.</p>
<p>In your mind, you think, “I am going to make an awesome date picker component. Write less code. Do more.”</p>
<p>A few months later, the client says, “I want the date picker in this page to explode with fireworks and on other pages, different kittens to represent months”. Now you need the date picker to be more dynamic than it was.</p>
<p>Then after you make the changes, you discover that fireworks are coming out of the kittens.</p>
<p>If you are on a larger team, you can defer quality assurance to a different team.</p>
<p>But if there is no such functionality in your organization, you will have to do a global search for your component’s name to see what your component affects.</p>
<p>Make a note to yourself of those files. Test those file visually and functionally depending on what they do.</p>
<h3 id="heading-anytime-you-say-its-fine-for-now">Anytime you say, “It’s fine for now”</h3>
<p>You know you will have to go back to it later. The key is “don’t forget”</p>
<p>When you decide between speed of development and stability of the software, we must be careful not to always put speed as a top priority. It’s similar to driving a car without ever checking the condition of the car.</p>
<p>You can decide a ratio between speed and quality assurance. Maybe it’s two speedy iterations and one quality assurance iteration, whichever makes sense for your team.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<ul>
<li>Avoid hardcoding a value if you can. If you have to, leave a note for yourself.</li>
<li>Refactor when you’re doing the same thing for the third time.</li>
<li>Split code and refactor often</li>
<li>Front-end and back-end engineers must work together to agree on the data being passed around.</li>
<li>If merge conflicts does not make sense to you, double check with the person who wrote the commit.</li>
<li>When making changes to a reusable component, test for the location(s) where it’s being used.</li>
<li>Find a healthy balance between speed and quality for your team.</li>
</ul>
<h3 id="heading-while-were-here">While we’re here…</h3>
<p>If you want to reach the 1 billion users of WeChat, you have to understand it first. Here’s a <a target="_blank" href="https://pages.convertkit.com/b2469604dd/0c671fdd2d"><strong>free glossary</strong></a> to get started.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
