<?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[ coding challenge - 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[ coding challenge - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 19 May 2026 10:28:54 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/coding-challenge/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Introducing freeCodeCamp Daily Python and JavaScript Challenges – Solve a New Programming Puzzle Every Day ]]>
                </title>
                <description>
                    <![CDATA[ The freeCodeCamp community is excited to announce that our new Daily Coding Challenges are ready for you to tackle. 🎊 Consistent practice is one of the most effective ways to improve your coding skills. So in addition to the core coding curriculum, ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/introducing-freecodecamp-daily-python-and-javascript-challenges-solve-a-new-programming-puzzle-every-day/</link>
                <guid isPermaLink="false">68bafb5703bcabb153325d47</guid>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tom Mondloch ]]>
                </dc:creator>
                <pubDate>Fri, 05 Sep 2025 15:01:43 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1757012321426/66cb1d9b-b2e1-4911-bea5-ca1f1308ca35.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The freeCodeCamp community is excited to announce that our new Daily Coding Challenges are ready for you to tackle. 🎊</p>
<p>Consistent practice is one of the most effective ways to improve your coding skills. So in addition to the core coding curriculum, you can now keep your programming skills sharp by solving a fun new coding challenge every single day.</p>
<p>Each day at <strong>midnight US Central time</strong>, a new programming puzzle will unlock on <a target="_blank" href="https://freecodecamp.org">freecodecamp.org</a> and the freeCodeCamp mobile app that you can solve in JavaScript and Python.</p>
<h2 id="heading-how-to-start-solving-daily-coding-challenges">How to Start Solving Daily Coding Challenges</h2>
<h3 id="heading-on-the-freecodecamp-mobile-app">On the freeCodeCamp Mobile App:</h3>
<ol>
<li><p>Download the freeCodeCamp mobile app from the Google Play Store or the Apple App Store and open it.</p>
</li>
<li><p>Don’t forget to sign in if you want to save your progress. Then find todays challenge at the top and click “Start the challenge”:</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757013682796/383439a2-12d5-4054-88d5-e0e6a6f052f0.png" alt="383439a2-12d5-4054-88d5-e0e6a6f052f0" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<ol start="3">
<li>Choose your preferred language:</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757013721085/873f1d66-93c5-47ac-805c-aa8ef99d058c.png" alt="873f1d66-93c5-47ac-805c-aa8ef99d058c" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<ol start="4">
<li>Read the challenge instructions:</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757013769135/ff7d0843-1566-4349-8559-9626264bb87a.png" alt="ff7d0843-1566-4349-8559-9626264bb87a" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<ol start="5">
<li>Write the code:</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757013821639/a049756c-b873-4b6b-a7a9-ab020db48933.png" alt="a049756c-b873-4b6b-a7a9-ab020db48933" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<ol start="6">
<li>Pass the tests:</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757014651276/28dff232-0c54-41b3-ac2f-0ddbfa0d913c.png" alt="28dff232-0c54-41b3-ac2f-0ddbfa0d913c" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>And voilà! You’ve completed the challenge.</p>
<h3 id="heading-on-the-website">On the Website:</h3>
<ol>
<li>Go to <a target="_blank" href="https://freecodecamp.org">freecodecamp.org</a> and make sure you’re logged in if you want to save your progress. Then scroll down to find the coding challenge of the day and click “Start”:</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757014100541/aaf37fe9-d06e-4198-834c-6cd6ea37d330.png" alt="aaf37fe9-d06e-4198-834c-6cd6ea37d330" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<ol start="2">
<li><p>Choose your preferred language at the top</p>
</li>
<li><p>Read the challenge instructions, write the code, and pass the tests:</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757014412721/ee3a6ed9-0628-41fe-acf0-fc10e5772ee8.png" alt="ee3a6ed9-0628-41fe-acf0-fc10e5772ee8" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-what-if-i-missed-a-day">What if I Missed a Day?</h2>
<p>Don’t worry if you miss a challenge. Both the mobile app and website include an <strong>archive page</strong>, where you can browse and complete past challenges at your own pace:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1757015163098/3bdf35b5-d76c-49de-bb50-35f262716059.png" alt="3bdf35b5-d76c-49de-bb50-35f262716059" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-start-your-first-challenge-today">Start Your first Challenge Today</h2>
<p>Today’s challenge is waiting for you. Open the freeCodeCamp app or head to <a target="_blank" href="https://freecodecamp.org">freecodecamp.org</a> to complete it. 🚀</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Python Coding Challenges For Beginner Developers – Code and Explanations ]]>
                </title>
                <description>
                    <![CDATA[ Learning Python can be challenging, especially if you're not actually writing enough code. As a beginner, you may go through lessons and tutorials without practicing on your own – and this makes it harder to learn the language. The truth is, you cann... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/python-coding-challenges-for-beginners/</link>
                <guid isPermaLink="false">66baef8eff91e9c03fcb30a3</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abhilekh gautam ]]>
                </dc:creator>
                <pubDate>Tue, 04 Jun 2024 20:18:55 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/06/pexels-pixabay-139392.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Learning Python can be challenging, especially if you're not actually writing enough code. As a beginner, you may go through lessons and tutorials without practicing on your own – and this makes it harder to learn the language.</p>
<p>The truth is, you cannot truly learn programming without writing code. It is through this process that you learn new things and discover how small errors, like missing a quote or space, can frustrate you for hours.</p>
<p>No course can teach you the intricacies of Python the way finding and solving errors does.</p>
<p>That's why coding challenges are important if you are starting your coding journey. They help you implement your knowledge in practice and boost your confidence.</p>
<p>So to help you start coding more, here are eight Python challenges you can try as a beginner. </p>
<p><strong>And here's a tip</strong>: really try to solve the challenge on your own after reading through the question/prompt. If you get stuck, then you can look at the code below and the explanation to help you figure it out.</p>
<h2 id="heading-here-are-the-challenges">Here Are the Challenges:</h2>
<ol>
<li><a class="post-section-overview" href="#heading-python-challenge-1-check-if-a-list-is-sorted">Python Challenge #1: Check if a List is Sorted</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-2-convert-binary-numbers-to-decimal">Python Challenge #2: Convert Binary number to decimal</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-3-loves-me-loves-me-not">Python Challenge #3: Loves Me, Loves Me Not</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-4-the-tribonacci-sequence-challenge">Python Challenge #4: The Tribonacci Sequence Challenge</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-5-hide-a-credit-card-number">Python Challenge #5: Hide a Credit Card Number</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-6-spongecase">Python Challenge #6: SpongeCase</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-7-caesar-encryption">Python Challenge #7: Caesar Encryption</a></li>
<li><a class="post-section-overview" href="#heading-python-challenge-8-is-the-product-divisible-by-the-sum">Python Challenge #8: Is the Product Divisible by the Sum?</a></li>
</ol>
<p>All of these challenges help you in enhancing your problem-solving and algorithmic thinking skills. You'll also gain experience with writing and testing code to ensure correctness and efficiency.</p>
<h2 id="heading-python-challenge-1-check-if-a-list-is-sorted">Python Challenge #1: Check if a List is Sorted</h2>
<p>The challenge: Write a function that checks whether a given list of numbers is sorted in either ascending or descending order.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">is_sorted</span>(<span class="hljs-params">lst</span>):</span>
    asc, desc = <span class="hljs-literal">True</span>, <span class="hljs-literal">True</span>
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(len(lst) - <span class="hljs-number">1</span>):
        <span class="hljs-keyword">if</span> lst[i] &gt; lst[i + <span class="hljs-number">1</span>]:
            asc = <span class="hljs-literal">False</span>
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(len(lst) - <span class="hljs-number">1</span>):
        <span class="hljs-keyword">if</span> lst[i] &lt; lst[i + <span class="hljs-number">1</span>]:
            desc = <span class="hljs-literal">False</span>
    <span class="hljs-keyword">return</span> asc <span class="hljs-keyword">or</span> desc
</code></pre>
<h3 id="heading-code-explanation">Code explanation:</h3>
<p>In the above code, we define a function <code>is_sorted</code> that takes in a <code>list</code> as a parameter. We initialize two booleans, <code>asc</code> (for ascending) and <code>desc</code> (for descending) to <code>True</code>. </p>
<p>We then iterate through the list. If the <code>i</code>th element of the list is greater than the <code>(i+1)</code>th element, the <code>asc</code> flag is set to <code>False</code>, indicating that the list is not sorted in ascending order.</p>
<p>Then we iterate through the list again. If the <code>i</code>th element of the list is smaller than the <code>i+1</code> th element, the <code>desc</code> flag is set to <code>False</code>, indicating that the list is not sorted in descending order.</p>
<p>If any element is found to be greater than the next element, the <code>asc</code> flag is set to <code>False</code>. Within the loop, we check to see if the <code>i</code>th element of the list is greater than the <code>i+1</code> th element. </p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(len(lst) - <span class="hljs-number">1</span>):
    <span class="hljs-keyword">if</span> lst[i] &lt; lst[i + <span class="hljs-number">1</span>]:
        desc = <span class="hljs-literal">False</span>
</code></pre>
<p>We return <code>True</code> if either <code>asc</code> or <code>desc</code> is <code>True</code>. This means that the list is sorted, either in ascending or descending order.</p>
<h2 id="heading-python-challenge-2-convert-binary-numbers-to-decimal">Python Challenge #2: Convert Binary Numbers to Decimal</h2>
<p>The challenge: Write a function that converts a binary number to its decimal equivalent.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">binary_to_decimal</span>(<span class="hljs-params">binary</span>):</span>
    decimal, i = <span class="hljs-number">0</span>, <span class="hljs-number">0</span>
    <span class="hljs-keyword">while</span>(binary != <span class="hljs-number">0</span>):
        dec = binary % <span class="hljs-number">10</span>
        decimal = decimal + dec * pow(<span class="hljs-number">2</span>, i)
        binary = binary//<span class="hljs-number">10</span>
        i += <span class="hljs-number">1</span>
    <span class="hljs-keyword">return</span> decimal
</code></pre>
<h3 id="heading-code-explanation-1">Code explanation:</h3>
<p>In the above code, we define a function <code>binary_to_decimal</code> that takes a <code>binary</code> number as a parameter. We then initialized the variables <code>decimal</code> and <code>i</code> to <code>0</code>.</p>
<p>The variable <code>decimal</code> is used to store the resulting decimal value and the variable <code>i</code> represents the current position when processing a binary number, starting from <code>0</code>.</p>
<p>We loop through each binary digit until all digits of the binary number become <code>0</code>.</p>
<pre><code class="lang-python"><span class="hljs-keyword">while</span> binary != <span class="hljs-number">0</span>:
</code></pre>
<p>Now, we extract the least significant digit of the current binary number using the modulus operator.</p>
<pre><code class="lang-python">dec = binary % <span class="hljs-number">10</span>
</code></pre>
<p>And then we convert the extracted digit to its decimal equivalent by multiplying it by 2 power raised to <code>i</code>.</p>
<pre><code class="lang-python">decimal = decimal + dec * pow(<span class="hljs-number">2</span>, i)
</code></pre>
<p>Then we remove the processed digit:</p>
<pre><code class="lang-python">Binary = binary // <span class="hljs-number">10</span>
</code></pre>
<p>And increment the position <code>i</code> to process the next binary digit:</p>
<pre><code class="lang-python">i += <span class="hljs-number">1</span>
</code></pre>
<p>Finally, we return the calculated decimal value.</p>
<h2 id="heading-python-challenge-3-loves-me-loves-me-not">Python Challenge #3: Loves Me, Loves Me Not</h2>
<p>The challenge: Given an integer n, print a string that alternates between the phrases "Loves me" and "Loves me not" for each number from 1 to n.</p>
<p>The sequence should start with "Loves me" and alternate accordingly.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">phrase_loves_me_not</span>(<span class="hljs-params">n</span>):</span>
    phrases = []
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">1</span>,n+<span class="hljs-number">1</span>):
        <span class="hljs-keyword">if</span> i % <span class="hljs-number">2</span> != <span class="hljs-number">0</span>:
            phrases.append(<span class="hljs-string">"Loves me"</span>)
        <span class="hljs-keyword">else</span>:
            phrases.append(<span class="hljs-string">"Loves me not"</span>)
    <span class="hljs-keyword">return</span> <span class="hljs-string">", "</span>.join(phrases)
</code></pre>
<h3 id="heading-code-explanation-2">Code explanation:</h3>
<p>We define a function <code>phrase_loves_me_not</code> that takes a single parameter <code>n</code>.</p>
<p>Then, we initialize an empty list, <code>phrases</code>, which stores the result for each number from <code>1</code> to <code>n</code>.</p>
<p>We iterate from <code>1</code> to <code>n</code> inclusive:</p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">1</span>, n+<span class="hljs-number">1</span>):
</code></pre>
<p>We then check for odd indices. If the number is odd, we append “Loves me” to the list ‘phrases’.</p>
<pre><code class="lang-python"><span class="hljs-keyword">if</span> i % <span class="hljs-number">2</span> != <span class="hljs-number">0</span>:
    phrases.append(<span class="hljs-string">"Loves me"</span>)
</code></pre>
<p>For even indices, we append “Loves me not” in the list ‘phrases’.</p>
<pre><code class="lang-python"><span class="hljs-keyword">else</span>:
    phrases.append(<span class="hljs-string">"Loves me not"</span>)
</code></pre>
<p>We then use the <code>join</code> method to concatenate all the elements in the ‘phrases’ list into a single string and return that string.</p>
<p>Finally we return the resulting string.</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> <span class="hljs-string">", "</span>.join(phrases)
</code></pre>
<h2 id="heading-python-challenge-4-the-tribonacci-sequence-challenge">Python Challenge #4: The Tribonacci Sequence Challenge</h2>
<p>The "Tribonacci sequence" challenge is a twist on the famous Fibonacci sequence, where each number is the sum of the preceding three numbers.</p>
<p>For example, 0, 1, 1, 2, 4, 7 …</p>
<p>The challenge: Write a function that returns the nth number in the Tribonacci sequence.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">find_nth_tribonacci</span>(<span class="hljs-params">n</span>):</span>
    <span class="hljs-comment"># Base cases for n = 0, 1, 2</span>
    <span class="hljs-keyword">if</span> n == <span class="hljs-number">0</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>
    <span class="hljs-keyword">elif</span> n == <span class="hljs-number">1</span> <span class="hljs-keyword">or</span> n == <span class="hljs-number">2</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>
    <span class="hljs-comment"># Initialize the first three terms of the Tribonacci sequence</span>
    a, b, c = <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">3</span>, n + <span class="hljs-number">1</span>):
        next_term = a + b + c
        a, b, c = b, c, next_term
    <span class="hljs-keyword">return</span> c
</code></pre>
<h3 id="heading-code-explanation-3">Code explanation:</h3>
<p>First, we define a function named <code>find_nth_tribonacci</code> which takes a number <code>n</code> as a parameter.</p>
<p>We then define base cases as:</p>
<ul>
<li>If <code>n</code> is <code>0</code>, the function returns <code>0</code>.</li>
<li>If <code>n</code> is <code>1</code> or <code>2</code>, the function returns <code>1</code>.</li>
</ul>
<p>Note<em>:</em> These conditions handle the starting values of the Tribonacci sequence.</p>
<p>We then initialize the first three values of the Tribonacci sequence, from <code>n</code> = <code>0</code> to <code>n</code> = <code>2</code>.</p>
<pre><code class="lang-python">a, b, c = <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>
</code></pre>
<p>Then, we iterate from <code>3</code> to the number <code>n</code>, where we calculate the next term by summing the three preceding terms (<code>a</code>, <code>b</code>, and <code>c</code>). We also update the values of <code>a</code>, <code>b</code>, and <code>c</code> to the next set of three terms in the sequence.</p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">3</span>, n + <span class="hljs-number">1</span>):
    next_term = a + b + c
    a, b, c = b, c, next_term
</code></pre>
<p>At the end of the loop, <code>c</code> holds the value of the nth term in the Tribonacci sequence, so we return <code>c</code>.</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> c
</code></pre>
<h2 id="heading-python-challenge-5-hide-a-credit-card-number">Python Challenge #5: Hide a Credit Card Number</h2>
<p>Write a function that takes a credit card number and transforms it into a string where all digits except the last four are replaced with asterisks.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">mask_credit_card</span>(<span class="hljs-params">card_number</span>):</span>
    card=str(card_number)
    <span class="hljs-keyword">return</span> <span class="hljs-string">"*"</span>*(len(card) - <span class="hljs-number">4</span>) + (card[<span class="hljs-number">-4</span>:])
</code></pre>
<h3 id="heading-code-explanation-4">Code explanation:</h3>
<p>We define a function <code>mask_credit_card</code> that takes <code>card_number</code> as a parameter.</p>
<p>First, we convert the number into a string.</p>
<pre><code class="lang-python">card = str(card_number)
</code></pre>
<p>Then to mask the card_number, we generate a string of asterisks with a length equal to the total number of digits in the credit card minus four. This masks all digits except the last four digits.</p>
<pre><code class="lang-python"><span class="hljs-string">"*"</span>*(len(card) - <span class="hljs-number">4</span>)
</code></pre>
<p>Then, we use the slice operation to retrieve the last four digits of the credit card number.</p>
<pre><code class="lang-python">card[<span class="hljs-number">-4</span>:]
</code></pre>
<p>Finally, we return the concatenated result of the asterisk string and the last four digits of the card number.</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> <span class="hljs-string">"*"</span>*(len(card) - <span class="hljs-number">4</span>) + card[<span class="hljs-number">-4</span>:]
</code></pre>
<h2 id="heading-python-challenge-6-spongecase">Python Challenge #6: SpongeCase</h2>
<p>SpongeCase is a style of text where letters alternately appear in lower and upper case. For example, the word in spongeCase would be sPoNgEcAsE.</p>
<p>The challenge: Write a function that converts the given string into spongcase.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">to_spongecase</span>(<span class="hljs-params">text</span>):</span>
    result = []
    i = <span class="hljs-number">0</span>
    <span class="hljs-keyword">for</span> char <span class="hljs-keyword">in</span> text:
        <span class="hljs-keyword">if</span> char.isalpha():
            <span class="hljs-keyword">if</span> i % <span class="hljs-number">2</span> == <span class="hljs-number">0</span>:
                result.append(char.lower())
            <span class="hljs-keyword">else</span>:
                result.append(char.upper())
            i += <span class="hljs-number">1</span>
        <span class="hljs-keyword">else</span>:
            result.append(char)

    <span class="hljs-keyword">return</span> <span class="hljs-string">""</span>.join(result)
</code></pre>
<h3 id="heading-code-explanation-5">Code explanation:</h3>
<p>We define a function <code>to_spongecase</code> that takes a string <code>text</code> as a parameter.</p>
<p>Then we initialize an empty list result, and counter <code>i</code> to <code>0</code>.  </p>
<p>We iterate the function over each character char in the input string and check if the current character is alphabetic. </p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> char <span class="hljs-keyword">in</span> text:
    <span class="hljs-keyword">if</span> char.isalpha():
</code></pre>
<p>If the character at index <code>i</code> (adjusted for only alphabetic characters) is even, we append the result with the character converted to lowercase.</p>
<pre><code class="lang-python"><span class="hljs-keyword">if</span> i % <span class="hljs-number">2</span> == <span class="hljs-number">0</span>:
    result.append(char.lower())
</code></pre>
<p>If the index is odd, we append the result with the character converted to uppercase.</p>
<pre><code class="lang-python"><span class="hljs-keyword">else</span>:
    result.append(char.upper())
</code></pre>
<p>After processing an alphabetic character, the index <code>i</code> is incremented.</p>
<p>In case of non-alphabetic characters, append them to the result list as they appear, without alternating their case.</p>
<p>After all characters have been processed, we combine them back into a string using <code>join</code> .</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> <span class="hljs-string">""</span>.join(result)
</code></pre>
<h2 id="heading-python-challenge-7-caesar-encryption">Python Challenge #7: Caesar Encryption</h2>
<p>Caesar Encryption (also known as the Caesar Cipher) is a simple encryption technique that works by shifting the letters in the plaintext message by a certain number of positions.</p>
<p>The challenge: Create a function that has two parameters – a string to be encoded and an integer representing the number of positions each letter should be shifted.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">caesar_encryption</span>(<span class="hljs-params">text, shift</span>):</span>
    result = <span class="hljs-string">""</span>
    <span class="hljs-keyword">for</span> char <span class="hljs-keyword">in</span> text:
        <span class="hljs-keyword">if</span> char.isalpha():
            start = ord(<span class="hljs-string">'A'</span>) <span class="hljs-keyword">if</span> char.isupper() <span class="hljs-keyword">else</span> ord(<span class="hljs-string">'a'</span>)
            shifted = (ord(char) - start + shift) % <span class="hljs-number">26</span> + start
            result += chr(shifted)
        <span class="hljs-keyword">else</span>:
            result += char
    <span class="hljs-keyword">return</span> result
</code></pre>
<h3 id="heading-code-explanation-6">Code explanation:</h3>
<p>We define a function <code>caesar_encryption</code> that takes two parameters: a string <code>text</code> and an integer <code>shift</code>.</p>
<p>Then we initialize an empty string to accumulate the encoded characters.</p>
<pre><code class="lang-python">result = <span class="hljs-string">""</span>
</code></pre>
<p>Next, we loop through each character in the input string text.</p>
<p>For alphabetic characters, we calculate the new character after applying the shift.</p>
<p>Then we add the non-alphabetic characters like numbers to the result unchanged.</p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> char <span class="hljs-keyword">in</span> text:
    <span class="hljs-keyword">if</span> char.isalpha():
        start = ord(<span class="hljs-string">'A'</span>) <span class="hljs-keyword">if</span> char.isupper() <span class="hljs-keyword">else</span> ord(<span class="hljs-string">'a'</span>)
    shifted = (ord(char) - start + shift) % <span class="hljs-number">26</span> + start
</code></pre>
<p>So how do we calculate the new character?</p>
<p>We determine the ASCII value of 'A' for uppercase or 'a' for lowercase letters.</p>
<p>First, convert the character to its ASCII code, normalize to a 0-25 range by subtracting the start and adding the shift, and then wrap it around using modulo 26 to ensure it stays within alphabet bounds.</p>
<p>Finally, we add the start back to map it to the correct ASCII range.</p>
<p>Convert the shifted value back to a character using <code>chr()</code> and add to the result.</p>
<pre><code class="lang-python">result += chr(shifted)
</code></pre>
<p>After all characters are processed, return the encoded string.</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> result
</code></pre>
<h2 id="heading-python-challenge-8-is-the-product-divisible-by-the-sum">Python Challenge #8: Is the Product Divisible by the Sum?</h2>
<p>The challenge: Create a function that takes a list of integers and returns whether the product of those integers is divisible by their sum or not.</p>
<p>The function should return <code>True</code> if the product of all the integers in the list is divisible by their sum and <code>False</code> otherwise.</p>
<p>Here's the code solution:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">is_product_divisible_by_sum</span>(<span class="hljs-params">numbers</span>):</span>
    <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> numbers:
        <span class="hljs-keyword">return</span> <span class="hljs-literal">False</span>

    product = <span class="hljs-number">1</span>
    summation = <span class="hljs-number">0</span>
    <span class="hljs-keyword">for</span> num <span class="hljs-keyword">in</span> numbers:
        product *= num
        summation += num

    <span class="hljs-keyword">if</span> summation == <span class="hljs-number">0</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-literal">False</span>

    <span class="hljs-keyword">return</span> product % summation == <span class="hljs-number">0</span>
</code></pre>
<h3 id="heading-code-explanation-7">Code explanation:</h3>
<p>First, we define a function <code>is_product_divisible_by_sum</code>, which takes a list of integers, <code>numbers</code>, as a parameter.</p>
<p>Then, we check if the input list <code>numbers</code> is empty. If it is empty, return <code>False</code>.</p>
<pre><code class="lang-python"><span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> numbers:
    <span class="hljs-keyword">return</span> <span class="hljs-literal">False</span>
</code></pre>
<p>Else, initialize two variables: <code>product</code> to <code>1</code> and <code>summation</code> to <code>0</code>.</p>
<pre><code class="lang-python">product = <span class="hljs-number">1</span>
summation = <span class="hljs-number">0</span>
</code></pre>
<p>Iterate over each number in the list to calculate the total product and sum of all numbers in the list.</p>
<pre><code class="lang-python"><span class="hljs-keyword">for</span> num <span class="hljs-keyword">in</span> numbers:
    product *= num
    summation += num
</code></pre>
<p>After calculating the sum, check if the sum is zero. Dividing by zero is undefined in mathematics and would raise an error in programming, so return <code>False</code>.</p>
<pre><code class="lang-python"><span class="hljs-keyword">if</span> summation == <span class="hljs-number">0</span>:
    <span class="hljs-keyword">return</span> <span class="hljs-literal">False</span>
</code></pre>
<p>Finally, check if the product is divisible by the sum using the modulus operator <code>%</code>.</p>
<p>Here, if the remainder is zero, that is the product is perfectly divisible by the sum, return <code>True</code>. Otherwise, return <code>False</code>.</p>
<pre><code class="lang-python"><span class="hljs-keyword">return</span> product % summation == <span class="hljs-number">0</span>
</code></pre>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>These are just a few challenges that can help you build your problem-solving skills. I would suggest you try these challenges on your own.</p>
<p>If you want to solve more challenges, you can try out the following platforms:</p>
<ul>
<li><a target="_blank" href="https://leetcode.com/">Leetcode</a></li>
<li><a target="_blank" href="https://app.programiz.pro/community-challenges">Programiz PRO Community Challenges</a></li>
<li>Exercism</li>
</ul>
<p>They are free and help you build your logical skills with hands-on experience.</p>
<p>Happy Coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Most Popular Coding Challenge Websites ]]>
                </title>
                <description>
                    <![CDATA[ If you want to improve your analytical skills, there's no better way to do that than solving problems.  If you are a programmer, then this is something you should do for yourself. Programmers need to deal with all sorts of problems almost every day. ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-most-popular-coding-challenge-websites/</link>
                <guid isPermaLink="false">66b90316941d2f900bad52aa</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview questions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interviewing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Hunting ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Md. Fahim Bin Amin ]]>
                </dc:creator>
                <pubDate>Wed, 15 Jun 2022 22:23:18 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/06/fCC-Banner.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you want to improve your analytical skills, there's no better way to do that than solving problems. </p>
<p>If you are a programmer, then this is something you should do for yourself. Programmers need to deal with all sorts of problems almost every day. </p>
<p>Most importantly, solving problems in an efficient manner can make you much more productive. And solving challenging problems helps us do that.</p>
<h2 id="heading-you-can-watch-this-complete-video-on-youtube-as-well-if-you-like">You can watch this complete video on YouTube as well if you like 🎥</h2>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/45wrQ-RAefI" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-why-should-you-develop-your-problem-solving-skills">Why Should You Develop Your Problem-Solving Skills?</h2>
<p>These days, technology is developing rapidly, and we are seeing some amazing changes and improvements almost every day. </p>
<p>Whenever we talk about technology, a buzzword appears in our mind – and that is coding or programming. Now, coding/programming isn't just about solving different kinds of problems using different programming languages, but it's a large part of what you'll do as a developer.</p>
<p>The fields of Web development, Machine Learning, Artificial Intelligence, Augmented Reality, App Development, and many others require strong problem-solving skills. </p>
<p>There are many popular websites that help you do that by providing various types of problems where you need to apply your analytical and mathematical skills to solve each problem using programming languages.</p>
<p>I am going to provide you with a list of coding challenge websites that will help you become more advanced day by day. </p>
<p>Keep in mind that these websites are useful for everybody, whether you are new to coding challenges or you are a professional programmer and so on.</p>
<h1 id="heading-contents">Contents</h1>
<ol>
<li><a class="post-section-overview" href="#heading-1-beecrowd-formerly-uri-1">beecrowd</a></li>
<li><a class="post-section-overview" href="#heading-2-hackerrank-2">HackerRank</a></li>
<li><a class="post-section-overview" href="#heading-3-codeforces-1">Codeforces</a></li>
<li><a class="post-section-overview" href="#heading-4-leetcode-1">LeetCode</a></li>
<li><a class="post-section-overview" href="#heading-5-kaggle-1">Kaggle</a></li>
<li><a class="post-section-overview" href="#heading-6-codechef-1">CodeChef</a></li>
<li><a class="post-section-overview" href="#heading-7-atcoder-1">AtCoder</a></li>
<li><a class="post-section-overview" href="#heading-8-topcoder">Topcoder</a></li>
<li><a class="post-section-overview" href="#heading-9-coderbyte">Coderbyte</a></li>
<li><a class="post-section-overview" href="#heading-10-project-euler">Project Euler</a></li>
<li><a class="post-section-overview" href="#heading-11-codewars">Codewars</a></li>
<li><a class="post-section-overview" href="#heading-12-spoj">SPOJ</a></li>
<li><a class="post-section-overview" href="#heading-13-codingame">CodinGame</a></li>
<li><a class="post-section-overview" href="#heading-14-geeksforgeeks-popularly-known-as-gfg-1">GeeksforGeeks</a></li>
<li><a class="post-section-overview" href="#heading-15-toph">Toph</a></li>
<li><a class="post-section-overview" href="#heading-16-lightoj-1">LightOJ</a></li>
<li><a class="post-section-overview" href="#heading-17-exercism">Exercism</a></li>
<li><a class="post-section-overview" href="#heading-18-online-judge-commonly-known-as-uva">Online Judge</a></li>
<li><a class="post-section-overview" href="#heading-19-hackerearth">HackerEarth</a></li>
<li><a class="post-section-overview" href="#heading-20-code-jam-googles-coding-competitions-1">Code Jam - Google's Coding Competitions</a></li>
<li><a class="post-section-overview" href="#heading-21-icpc-international-collegiate-programming-contest-1">ICPC</a></li>
</ol>
<h1 id="heading-best-coding-challenge-websites">Best Coding Challenge Websites</h1>
<h2 id="heading-1-beecrowdhttpswwwbeecrowdcombrjudgeenlogin-formerly-uri">1. <a target="_blank" href="https://www.beecrowd.com.br/judge/en/login">beecrowd</a> (Formerly URI)</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/zwnoz97xawck4unafkbz.png" alt="beecrowd banner" width="600" height="400" loading="lazy"></p>
<p>beecrowd is perfect for those who have just started solving coding challenges and are looking for a beginner-friendly website. It used to be named <strong>URI</strong>, so there is a chance that you are already familiar with this site as URI.</p>
<p>If you want to solve problems in a specific category, then you're in luck as this website also offers that.</p>
<figure>
  <img src="https://www.freecodecamp.org/news/content/images/2022/07/chodi765ql8li7b9yia6-resized.jpeg" class="kg-image" alt="A dropdown showing the different challenge categories on beercrowd" width="600" height="400" loading="lazy">
</figure>

<p>Here is an image of a <strong>Strings</strong> problem set. You can also filter the problems by the ID (#), name (NAME), Subject (SUBJECT), solved (SOLVED), and so on. Beginners like these features very much.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/2afljp6rrtm1c4co62vr.png" alt="2afljp6rrtm1c4co62vr" width="600" height="400" loading="lazy"></p>
<p>On this website, you can also take part in different programming contests, and check your global ranking, country-wide ranking, and university-wide ranking.</p>
<p>Also, you can check your progress, how many days have passed after signing up, how many problems you have solved, how many points you have got, and more.</p>
<p>You will also get a nice profile page that looks beautiful as well. 😊 I used to practice solving problems on this website when I was just starting out my CP (Competitive Programming) journey. Not to mention, I got the 3rd position among 1250 students back then at my university. 🎉 </p>
<p>You can also check out my <a target="_blank" href="https://www.beecrowd.com.br/judge/en/profile/436965">beecrowd profile here</a>.</p>
<h2 id="heading-2-hackerrankhttpswwwhackerrankcom">2. <a target="_blank" href="https://www.hackerrank.com/">HackerRank</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/wla1ho0uoz9xuvp5iuwi.png" alt="wla1ho0uoz9xuvp5iuwi" width="600" height="400" loading="lazy"></p>
<p>HackerRank is one of the most popular coding practice websites out there. This is a nice platform for everyone, especially beginners. </p>
<p>The website looks nice and polished, and the users who come here the first time don't struggle when navigating throughout the website, so that is definitely a positive thing here.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/wr0o61pq2ngfwil3ys9d.png" alt="Login page" width="600" height="400" loading="lazy"></p>
<p>HackerRank offers different portals for companies and developers. If you are learning to solve problems, then you will choose the <strong>For Developers</strong> section.</p>
<p>If you want to learn any specific topics or programming languages, then this website is the perfect place to get started in that. You can prepare yourself by topics. You can also take their certification exam and stand out from the crowd. I have already passed their Python (Basic) certification exam.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/k3j4sfp9tovx9ifphf0a.png" alt="Prep" width="600" height="400" loading="lazy"></p>
<p>You can also choose preparation kits from there, and prepare yourself before your interview if you want. Moreover, you can take part in programming contests.</p>
<p>Here, you will also get a nice personal profile page. You can check out my profile from HackerRank <a target="_blank" href="https://www.hackerrank.com/FahimFBA">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/sfp2rcqtx9b4fs8wv3m8.png" alt="My HackerRank profile" width="600" height="400" loading="lazy"></p>
<h2 id="heading-3-codeforceshttpscodeforcescom">3. <a target="_blank" href="https://codeforces.com/">Codeforces</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/8wtc4xnpohe9yr6j2eij.png" alt="Codeforces Banner" width="600" height="400" loading="lazy"></p>
<p>Codeforces is one of the most used and well-known coding challenge and practice websites in the world, and it is sponsored by Telegram. Especially if you know about CP (Competitive Programming), then there is a high chance you have heard a lot about this website.</p>
<p>Although the website might look a little bit different to newcomers, you won't need much time to get used to it. You can train yourself by solving problems of different categories, difficulty levels, and so on. </p>
<p>Competitive programmers have ranks based on their successful results in programming contests. If you have heard about the <strong>RED</strong> coder / <strong>PURPLE</strong> coder, etc, then it is definitely from Codeforces.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/17fansawmwowcvhyc639.png" alt="Codeforces Ranking System" width="600" height="400" loading="lazy"></p>
<p>You can get the idea of the ranking system on Codeforces from the image above. For more details, you can check out <a target="_blank" href="https://codeforces.com/blog/entry/68288">this blog entry</a>.</p>
<p>Codeforces arranges contests regularly each week, and they are categorized into div 1, div 2, div 3 and div 4. They also arrange global round and educational round contests. You can get the timeline of the contests directly from <a target="_blank" href="https://codeforces.com/contests">here</a>.</p>
<p>Codeforces also provides a nice user profile on their website. You can check mine <a target="_blank" href="https://codeforces.com/profile/FahimFBA">here</a> as well.</p>
<h2 id="heading-4-leetcodehttpsleetcodecom">4. <a target="_blank" href="https://leetcode.com/">LeetCode</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/jk9l09bi3ku5d0op2x7j.png" alt="Leetcode banner" width="600" height="400" loading="lazy"></p>
<p>If you are familiar with the <strong>FAANG</strong> (Facebook, Apple, Amazon, Netflix, Google) buzzword, then you should definitely know about this website! If you want to practice for your coding interview for the big giant tech companies like FAANG, then they all do <strong>leetcoding</strong>.</p>
<p>You might think that I have made a typo in the above paragraph. No, I didn't. LeetCode has become this popular among people who target FAANG and those who are working on their problem solving skills. Taking part in contests on LeetCode has become common, and people call it leetcoding! </p>
<p>Here, you can solve a lot of problems, and filter the problems by the lists, difficulty levels, status, and tags.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/tphf8k817fbz0vsge9d3.png" alt="LeetCode ProblemSet1" width="600" height="400" loading="lazy"></p>
<p>You can also choose problems regarding Arrays, Strings, Hash Tables, Dynamic Programming, and many other categories.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/0y0ov1fxzvxwiv5bglri.png" alt="LeetCode ProblemSet2" width="600" height="400" loading="lazy"></p>
<p>As I mentioned above, you can also take part in programming contests. The only thing that makes LeetCode different is that it is based on Algorithm practice. Yeah, LeetCode is not like any other coding website, because it focuses on algorithm practice alone. </p>
<p>You do not need to provide the full code for solving a problem here, you just need to crack the solution by providing a valid algorithm using any popular language that can solve the problem.</p>
<p>You also get to see how your code performs among others, how much space and time it takes, and so on. </p>
<p>Most importantly, LeetCode has an amazing discussion group where people talk about their problems, solutions, how to improve their algorithms, how to improve the efficiency of their code, and so on. This is one of the most powerful features of LeetCode.</p>
<p>One sad part about LeetCode is that you will not get every feature for free! Yeah, it's true. You have to pay for it monthly or yearly to unlock all its features. There are a lot of problems you will find locked on the website. You can not unlock them if you do not purchase the premium plan.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/tvww5ogj3eq5qw23ss8m.png" alt="LeetCode pricing" width="600" height="400" loading="lazy"></p>
<p>If you are just starting your algorithm journey on LeetCode, then actually you don't need to worry about their premium plans as the free version will be more than enough for you. </p>
<p>Later, if you want to become more serious, then paying for their premium subscription will be a big deal actually as you'll get a ton more features. This is very much helpful, and includes things like top interview questions, top FAANG questions, video explanations, and more.</p>
<p>You also get a nice profile page on LeetCode. You can check out mine <a target="_blank" href="https://leetcode.com/FBA/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/7rv0yyw75le21sndymru.png" alt="My LeetCode profile" width="600" height="400" loading="lazy"></p>
<h2 id="heading-5-kagglehttpswwwkagglecom">5. <a target="_blank" href="https://www.kaggle.com/">Kaggle</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/28oqgu17gaiczlsv0k2t.png" alt="Kaggle banner" width="600" height="400" loading="lazy"></p>
<p>I was pretty confused before writing this section, as Kaggle is not a typical website for coding practice. This website is basically for Data Science, and it's one of the most popular websites out there for this. </p>
<blockquote>
<p>Kaggle is an online community platform for data scientists and machine learning enthusiasts. </p>
<p>It is a popular crowd-sourced platform to attract, nurture, train, and challenge Data Science and Machine Learning enthusiasts from all around the world to come together and solve numerous Data Science, Predictive Analytics, and Machine Learning problems.</p>
</blockquote>
<p>So if you are interested in Data Science, then you should check this website. Here you can check others' notebooks, submit your notebook, join in the contests, improve datasets, and so on.</p>
<blockquote>
<p>Kaggle allows users to collaborate with other users, find and publish datasets, use GPU integrated notebooks, and compete with other data scientists to solve data science challenges.</p>
</blockquote>
<p>Also, if you are interested in data science, but don't know where to start, then don't worry! Kaggle has got you covered. You can check their <a target="_blank" href="https://www.kaggle.com/learn">learning section</a> where they have many free courses which will teach you a lot of stuff from the beginning.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/b2jgodslps0qrx6txu59.png" alt="kaggle free courses" width="600" height="400" loading="lazy"></p>
<p>✨ BONUS: If you want to learn more then I'd suggest that you complete the <a target="_blank" href="https://www.youtube.com/playlist?list=PLWKjhJtqVAblQe2CCWqV4Zy3LY01Z8aF1">data science playlist</a> from freeCodeCamp's YouTube channel.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/voyp7nxuepo7azxw6syk.png" alt="fcc courses" width="600" height="400" loading="lazy"></p>
<p>Kaggle also provides rankings and a nice user profile. You can check out my profile <a target="_blank" href="https://www.kaggle.com/mdfahimbinamin">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/lqcwsixdumi4bxc670s9.png" alt="FBA kaggle" width="600" height="400" loading="lazy"></p>
<h2 id="heading-6-codechefhttpswwwcodechefcom">6. <a target="_blank" href="https://www.codechef.com/">CodeChef</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/8ma2hdum4nd1eo8zmjek.png" alt="CodeChef banner image" width="600" height="400" loading="lazy"></p>
<p>CodeChef is another popular Indian website like <a class="post-section-overview" href="#heading-2-hackerrank-2">HackerRank</a> where you can solve a lot of problems, take part in contests, and so on.</p>
<p>You can filter the problems based on different categories and solve them using any of the most popular programming languages. </p>
<p>They also have a learning section on their website where you can learn how to solve problems in a systematic way. This is super helpful, especially for beginners.</p>
<p>In their learning section, you can choose self-learning, mentored learning, and doubt support. Some of them are free of charge, but in some courses, you have to pay before you can start them.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/qyfzttpt7eq78zdqkdt9.png" alt="mentor price" width="600" height="400" loading="lazy"></p>
<p>This website also provides user ranking including the global ranking and country-wide ranking. They also provide a user profile on their website. You can check out mine <a target="_blank" href="https://www.codechef.com/users/fahimfba">here</a> although I am not active on most of the websites right now. 😅</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/vhq0agb1ijtdbsj3s7gu.png" alt="codechef fba" width="600" height="400" loading="lazy"></p>
<h2 id="heading-7-atcoderhttpsatcoderjp">7. <a target="_blank" href="https://atcoder.jp/">AtCoder</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/rqsw6hjecf5fqpqoxowp.png" alt="AtCoder banner image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p>AtCoder is a programming contest website based in Japan. Makoto Soejima (rng_58) who is one of the former admins and problem writers from Topcoder is a founding member of AtCoder.</p>
</blockquote>
<p>On this website, you can take part in different programming contests. They held regular programming contests on Saturdays and Sundays. Also, you can solve problems from previously held programming contests. </p>
<p>I have seen a lot of people regularly participate in the programming contests and solve problems previously used in the contests regularly by solving problems on AtCoder. I also tried that for a while to check the efficiency, and truth to be told, it was really effective.</p>
<p>Here you can also check the global ranking. Here you will also get your own profile page where you and others can see your global ranking and so on.</p>
<h2 id="heading-8-topcoderhttpswwwtopcodercom">8. <a target="_blank" href="https://www.topcoder.com/">Topcoder</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/89rcnewgpzfxbsb37inz.png" alt="Topcoder banner image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p>Topcoder (formerly TopCoder) is a crowdsourcing company with an open global community of designers, developers, data scientists, and competitive programmers. Topcoder pays community members for their work on the projects and sells community services to corporate, mid-size, and small-business clients.</p>
</blockquote>
<p>Here you can earn, learn, and do a lot more in their MVP program. For earning, you can participate in five different tracks, become a copilot, become a reviewer, and also get a freelance contract gig through <a target="_blank" href="https://www.topcoder.com/community/member-programs/gigs">Topcoder Gig Work</a>.</p>
<p>Personally, I feel this website is a little bit overwhelming for beginners. You can get more details in the YouTube videos I have made for you.</p>
<h2 id="heading-9-coderbytehttpscoderbytecom">9. <a target="_blank" href="https://coderbyte.com/">Coderbyte</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/5vm2yrbrsuhfi6lvsc1c.png" alt="Coderbyte banner image" width="600" height="400" loading="lazy"></p>
<p>Coderbyte has a huge collection of problems that you can solve. They also offer a challenging library, starter courses, interview kits, career resources and so on. </p>
<p>To get all the features, you need to buy a subscription plan from them. I personally liked their interview kit a lot.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/qnrvl8ja8rqwb6zun4e0.png" alt="Interview kits" width="600" height="400" loading="lazy"></p>
<p>Here you will also get a personal profile page.</p>
<h2 id="heading-10-project-eulerhttpsprojecteulernet">10. <a target="_blank" href="https://projecteuler.net/">Project Euler</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/howuvtc16ehu8lqbw520.png" alt="Project Euler banner image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p>Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.</p>
</blockquote>
<p>Project Euler is a great website for solving mathematical challenging problems. But solving a problem on this website requires more than just simple mathematical knowledge. </p>
<p>If you want to solve mathematical problems in a more analytical way, then this website will come in handy.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/94mguaui3nj6s7pcw942.png" alt="Problem set" width="600" height="400" loading="lazy"></p>
<h2 id="heading-11-codewarshttpswwwcodewarscom">11. <a target="_blank" href="https://www.codewars.com/">Codewars</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/ygf3uzjmuiycbu34fv5l.png" alt="Codewars banner image" width="600" height="400" loading="lazy"></p>
<p>Codewars is a coding challenge website for people of all programming levels. It claims to have a community of over 3 million developers. </p>
<p>One of the biggest benefits of this website is that it is highly focused on algorithms like LeetCode. Moreover, if your goal is to get very good at writing clean and efficient programs, then this website can be a great asset to you.</p>
<p>In Codewars, you will see <strong>Kata</strong> and <strong>Kyu</strong> a lot. </p>
<blockquote>
<p>Kyu (or Kyū) indicates the number of degrees away from master level (Dan). This is why they count downward. Once you reach master level, we count upward. Black belts in martial arts are Dan level.</p>
<p>On Codewars, kata are code challenges focused on improving skill and technique. Some train programming fundamentals, while others focus on complex problem solving. Others are puzzles meant to test your creative problem solving, while others are based on real world coding scenarios.</p>
</blockquote>
<p>If you want to know more about how the ranking system works on Codewars, then simply check their docs <a target="_blank" href="https://docs.codewars.com/gamification/ranks/">here</a>.</p>
<p>On Codewars you will also get a nice profile page like <a target="_blank" href="https://www.codewars.com/users/FBA">mine</a>. Keep in mind that I haven't solved that much on this website; therefore my profile page would seem empty. 😅</p>
<p>Additionally, I find their <a target="_blank" href="https://www.codewars.com/users/leaderboard">leaderboard page</a> quite amusing.</p>
<h2 id="heading-12-spojhttpswwwspojcom">12. <a target="_blank" href="https://www.spoj.com/">SPOJ</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/4awf6fpql913onx0111u.png" alt="SPOJ banner image" width="600" height="400" loading="lazy"></p>
<p>SPOJ is a website that contains huge problems for solving. It claims to have 315,000 registered users and over 20,000 problems.</p>
<p>According to GFG,</p>
<blockquote>
<p>You can start solving problems with maximum submission and follow or check the submission of good coders here. Once you solved around 50-70 problems and build some confidence, you can participate in different contests.</p>
</blockquote>
<p>Their problem set is also quite amusing.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/tm5g46f3qie8kr9aizwk.png" alt="SPOJ problem set" width="600" height="400" loading="lazy"></p>
<p>You will also get a nice user profile page here which you can use to showcase your problem solve skills.</p>
<h2 id="heading-13-codingamehttpswwwcodingamecom">13. <a target="_blank" href="https://www.codingame.com/">CodinGame</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/ybatrql4wgi7l45v0j57.png" alt="CodinGame banner image" width="600" height="400" loading="lazy"></p>
<p>In CodinGame, you can improve your coding skills with fun exercises in more than 25 programming languages. </p>
<p>It is a good website for intermediate and advanced software engineers to have fun while continuing to keep their skills sharp. Also, the challenges are gamified and the multiplayer access means that users can challenge friends and coworkers.</p>
<h2 id="heading-14-geeksforgeekshttpswwwgeeksforgeeksorg-popularly-known-as-gfg">14. <a target="_blank" href="https://www.geeksforgeeks.org/">GeeksforGeeks</a> (Popularly known as GFG)</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/wo3e2tzi15abavql5c9w.png" alt="GeeksforGeeks banner Image" width="600" height="400" loading="lazy"></p>
<p>You might wonder why I am including GFG in this article as it only provides algorithms, tutorials, and so on. </p>
<p>Well, that's not all they offer. Yes, GFG is pretty popular for its tutorials, algorithms, and so on, but they also provide a nice problem-solving platform <a target="_blank" href="https://practice.geeksforgeeks.org/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/m8g6z50xvemt64t4pwvw.png" alt="practice GFG" width="600" height="400" loading="lazy"></p>
<p>You can also filter the problems as you see fit for yourself.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/iyajkn39wvqiqzpk52ba.png" alt="GFG filter" width="600" height="400" loading="lazy"></p>
<p>You will also get your profile page where you can show your progress in problem solving on the GFG website.</p>
<h2 id="heading-15-tophhttpstophco">15. <a target="_blank" href="https://toph.co/">Toph</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/5x4jgisa0oeaso2h2lu4.png" alt="Toph banner image" width="600" height="400" loading="lazy"></p>
<p>Competitive programmers participate in programming contests and solve many problems on this website. This website is kind of special to the Bangladeshi people as the Bangladeshi universities arrange many programming contests through it.</p>
<p>You can solve problems in different categories on this website, and they also offer you a nice profile page. They also provide rankings based on your performance in the programming contests.</p>
<p>If you are a complete beginner in problem solving, then this website can help you a lot in starting your problem solving journey.</p>
<h2 id="heading-16-lightojhttpslightojcom">16. <a target="_blank" href="https://lightoj.com/">LightOJ</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/anla94vgv2zsjw4a4woy.png" alt="LightOJ banner image" width="600" height="400" loading="lazy"></p>
<p>In LightOJ, you can solve a lot of categorized problems. It is highly based on solving algorithmic problems. Their problems are categorized as below:</p>
<ul>
<li>LightOJ Volumes</li>
<li>Warm-Up</li>
<li>Advanced Search Techniques</li>
<li>Database</li>
<li>Data Structures</li>
<li>Divide And Conquer</li>
<li>Dynamic Programming</li>
<li>Fast Fourier Transform</li>
<li>Flow/Matching</li>
<li>Game Theory</li>
<li>Geometry</li>
<li>Graph Theory</li>
<li>Greedy</li>
<li>Math</li>
<li>Matrix</li>
<li>Parsing/Grammar</li>
<li>Recursion/Branch and Bound</li>
<li>String</li>
</ul>
<p>They also provide you with a nice profile page where you can see your activities. It might seem odd, but sometimes I find this website better than LeetCode in some cases. Moreover, everything you do on this website is completely free of cost!</p>
<h2 id="heading-17-exercismhttpsexercismorg">17. <a target="_blank" href="https://exercism.org/">Exercism</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/mik6ovwsb4vsej25gtfg.png" alt="Exercism banner image" width="600" height="400" loading="lazy"></p>
<p>You can develop your programming fluency in 57 different programming languages with their unique blend of learning, practice and mentoring. </p>
<p>Exercism is completely free of cost, and it's built by people like us. You can also contribute or donate to them to support their amazing service for free.</p>
<p>They also provide a very nice user profile page which also shows everything you have done on their website, starting from publishing to maintaining.</p>
<p>On their <a target="_blank" href="https://exercism.org/tracks">tracks</a> page, you will get a list of 57 different programming languages where you can start your practice. </p>
<p>Solving problems on their website seems super fun to me. I really liked the way they manage their website.</p>
<h2 id="heading-18-online-judgehttpsonlinejudgeorg-commonly-known-as-uva">18. <a target="_blank" href="https://onlinejudge.org/">Online Judge</a> (Commonly known as UVa)</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/fat4pnmszr5xo5yqus73.png" alt="Online Judge banner image" width="600" height="400" loading="lazy"></p>
<p>This is one of the oldest websites out there for solving programming-related problems. I still find it to be a very hard website for beginners. The UI and navigation of the website are also very old. </p>
<p>All of the questions come with a PDF here. You need to download the PDF file of the problem if you want to solve problems as they do not offer a direct preview of the questions.</p>
<p>They have a lot of problemsets on their <a target="_blank" href="https://onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8">website</a>. I still find a lot of users using this website nowadays. Therefore, I mentioned it here.</p>
<h2 id="heading-19-hackerearthhttpswwwhackerearthcom">19. <a target="_blank" href="https://www.hackerearth.com/">HackerEarth</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/xm0bhrc4ephex78tddj5.png" alt="HackerEarth banner image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p>HackerEarth is an Indian software company headquartered in San Francisco, US, that provides enterprise software that helps organisations with their technical hiring needs. HackerEarth is used by organizations for technical skill assessment and remote video interviewing.</p>
</blockquote>
<p>You can practice your problem solving skills from their <a target="_blank" href="https://www.hackerearth.com/practice/">practice</a> page. Also, you can participate in programming challenges and hackathons from their <a target="_blank" href="https://www.hackerearth.com/challenges/">challenges</a> page.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/fj62qgttmbqgatvcbdzt.png" alt="HackerEarth challenges page" width="600" height="400" loading="lazy"></p>
<p>Their <a target="_blank" href="https://www.hackerearth.com/practice/interviews/">interview prep</a> section is quite amazing. You can take part in the mock assessments for the Adobe Coding Test, Facebook Coding Test, and Amazon Coding Test.</p>
<p>They also provide a nice user profile for everyone.</p>
<h2 id="heading-20-code-jam-googles-coding-competitionshttpscodingcompetitionswithgooglecomcodejam">20. <a target="_blank" href="https://codingcompetitions.withgoogle.com/codejam">Code Jam - Google's Coding Competitions</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/m8l89xfpsqt1yak0d94c.png" alt="Code Jam banner image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p>Google Code Jam is an international programming competition hosted and administered by Google. The competition began in 2003. The competition consists of a set of algorithmic problems which must be solved in a fixed amount of time.</p>
</blockquote>
<p>If you are interested in taking part in the Code Jam contests, then their <a target="_blank" href="https://codingcompetitions.withgoogle.com/codejam/archive">archive section</a> is full of amazing resources for you where you can get the earlier questions and practice them. </p>
<p>They also offer a lot of prize money in their contests. An example can be:</p>
<blockquote>
<p>Out of thousands of participants, only the top 25 will head to the World Finals to compete for the title of World Champion and cash prizes of up to $15,000. And there will be plenty of other prizes to go around — the top 1,000 competitors will win an exclusive Code Jam 2022 t-shirt.</p>
</blockquote>
<h2 id="heading-21-icpchttpsicpcglobal-international-collegiate-programming-contest">21. <a target="_blank" href="https://icpc.global/">ICPC</a> - International Collegiate Programming Contest</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/m8w6ezori7cpgiytzxmi.png" alt="ICPC banner image" width="600" height="400" loading="lazy"></p>
<p>ICPC is one of the most prestigious programming contests in the world.</p>
<blockquote>
<p>The International Collegiate Programming Contest, known as the ICPC, is an annual multi-tiered competitive programming competition among the universities of the world.</p>
</blockquote>
<p>Who is eligible for ICPC?</p>
<blockquote>
<p>ACM/ICPC is a team-based competition with certain requirements to the participants: only post-secondary students and first-year post-graduate students no older than 24 are eligible; each team consists of three members. One can participate in the finals no more than twice and in the regionals no more than five times.</p>
</blockquote>
<h1 id="heading-personal-opinion">Personal Opinion</h1>
<p>If you are a complete beginner, then start with <a class="post-section-overview" href="#1beecrowdformerlyuri">beecrowd</a>. If you want to start problem solving along with learning a specific programming language, then start with <a class="post-section-overview" href="#heading-2-hackerrank-2">HackerRank</a>. </p>
<p>After solving almost 50+ problems on beecrowd or HackerRank, start solving problems on <a class="post-section-overview" href="#heading-3-codeforces-1">Codeforces</a>. The first time, you won't be able to do that well in the programming contests on Codeforces, and that is completely okay – it is natural. You just need to try regularly. The questions might seem pretty hard to you, but it'll become easier day by day after solving problems continuously. </p>
<p>You can participate in <a class="post-section-overview" href="#7atcoder">AtCoder</a> the day you start solving problems on Codeforces. You can also try <a class="post-section-overview" href="#heading-6-codechef-1">CodeChef</a>, but I find Codeforces is enough in this case. </p>
<p>This will prepare you for the <a class="post-section-overview" href="#21icpcinternationalcollegiateprogrammingcontest">ICPC</a> and <a class="post-section-overview" href="#heading-20-code-jam-googles-coding-competitions-1">Code Jam</a>. Don't forget to solve the earlier questions on Code Jam.</p>
<p>If you want to gain expertise in Data Science, then simply go for <a class="post-section-overview" href="#heading-5-kaggle-1">Kaggle</a>.</p>
<p>If you want to gain expertise in Algorithms, then <a class="post-section-overview" href="#4leetcode">LeetCode</a>, and <a class="post-section-overview" href="#16lightoj">LightOJ</a> are your only places. <a class="post-section-overview" href="#heading-14-geeksforgeeks-popularly-known-as-gfg-1">GeeksforGeeoks</a> will also help you in this aspect. </p>
<p>For LeetCode, get some help from <a target="_blank" href="https://twitter.com/nicholaswwhite">Nick White</a>. His <a target="_blank" href="https://www.youtube.com/playlist?list=PLU_sdQYzUj2keVENTP0a5rdykRSgg9Wp-">LeetCode Solution</a> playlist has 189 videos as of today, and you will learn a lot from him, trust me! </p>
<p>Another good resource is <a target="_blank" href="https://neetcode.io/">Neetcode</a> where you can get curated problems and their solutions from LeetCode. The official <a target="_blank" href="https://www.youtube.com/c/NeetCode/featured">YouTube channel of Neetcode</a> is also a great channel.</p>
<h1 id="heading-additional-websites">Additional Websites</h1>
<p>You might find the websites below useful too!</p>
<h2 id="heading-stopstalkhttpswwwstopstalkcom">⭐ <a target="_blank" href="https://www.stopstalk.com/">StopStalk</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/6ixwem6zdmrn6bw29d32.png" alt="StopStalk banner image" width="600" height="400" loading="lazy"></p>
<p>This website retrieves your friends' recent submissions from various competitive websites (Such as Codeforces, SPOJ, HackerRank, Timus, and so on) and shows all of them in one place. You can check my StopStalk profile from <a target="_blank" href="https://www.stopstalk.com/user/profile/FBA">here</a>.</p>
<h2 id="heading-codersrankhttpscodersrankio">⭐ <a target="_blank" href="https://codersrank.io/">CodersRank</a></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/06/83l29mbplkwx2pf535bi.png" alt="CodersRank banner image" width="600" height="400" loading="lazy"></p>
<p>This is a platform made to help developers in job-seeking and professional growth. Here, your CodersRank profile serves as a proven track record of your coding knowledge. </p>
<p>You have to connect your private and public repositories here from GitHub to generate your true CodersRank profile. You can also check my CodersRank profile from <a target="_blank" href="https://profile.codersrank.io/user/fahimfba/">here</a>.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>Thanks for reading the entire article. If it helps you then you can also check out other articles of mine at <a target="_blank" href="https://www.freecodecamp.org/news/author/fahimbinamin/">freeCodeCamp</a>.</p>
<p>If you want to get in touch with me, then you can do so using <a target="_blank" href="https://twitter.com/Fahim_FBA">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>, and <a target="_blank" href="https://github.com/FahimFBA">GitHub</a>. </p>
<p>You can also <a target="_blank" href="https://www.youtube.com/@FahimAmin?sub_confirmation=1">SUBSCRIBE to my YouTube channel</a> (Code With FahimFBA) if you want to learn various kinds of programming languages with a lot of practical examples regularly.</p>
<p>If you want to check out my highlights, then you can do so at my <a target="_blank" href="https://www.polywork.com/fahimbinamin">Polywork timeline</a>.</p>
<p>You can also <a target="_blank" href="https://fahimbinamin.com/">visit my website</a> to learn more about me and what I'm working on.</p>
<p>Thanks a bunch!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Build a 100 Days of Code Discord Bot with TypeScript, MongoDB, and Discord.js 13 ]]>
                </title>
                <description>
                    <![CDATA[ The 100 Days of Code challenge is very popular among new coders and developers looking to level up their skills. It's so popular that our Discord server has an entire channel dedicated to it. By popular demand, we built a Discord bot that helps peopl... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-a-100-days-of-code-discord-bot-with-typescript-mongodb-and-discord-js-13/</link>
                <guid isPermaLink="false">66ac7eac11cd6758aec202a8</guid>
                
                    <category>
                        <![CDATA[ 100DaysOfCode ]]>
                    </category>
                
                    <category>
                        <![CDATA[ bots ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ discord ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Naomi Carrigan ]]>
                </dc:creator>
                <pubDate>Mon, 31 Jan 2022 21:41:05 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/pexels-kindel-media-8566473.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The <a target="_blank" href="https://www.freecodecamp.org/news/the-crazy-history-of-the-100daysofcode-challenge-and-why-you-should-try-it-for-2018-6c89a76e298d/">100 Days of Code challenge</a> is very popular among new coders and developers looking to level up their skills. It's so popular that our <a target="_blank" href="https://www.freecodecamp.org/news/freecodecamp-discord-chat-room-server/">Discord server</a> has an entire channel dedicated to it.</p>
<p>By popular demand, we built a Discord bot that helps people track their progress in the challenge.</p>
<p>Today I am going to show you how to build your own 100 Days of Code bot.</p>
<blockquote>
<p>Note that discord.js has released version 14, which includes breaking changes. For compatibility with this tutorial, you will want to ensure you are using discord.js 13 - you can install this with <code>npm install discord.js@13</code>. If you have any questions, feel free to join my <a target="_blank" href="https://chat.nhcarrigan.com">discord server</a>. </p>
</blockquote>
<details>
    <summary>Contents</summary>
    <ul>
        <li>
            <a href="#create-a-discord-bot-application">Create a Discord Bot Application</a>
        </li>
        <li>
            <a href="#set-up-your-project">Set Up Your Project</a>
        </li>
        <li>
            <a href="#create-the-discord-bot">Create the Discord Bot</a>
        </li>
        <li>
            <a href="#gateway-events-in-discord">Gateway Events in Discord</a>
        </li>
        <li>
            <a href="#connect-to-the-database">Connect to the Database</a>
        </li>
        <li>
            <a href="#environment-variable-validation">Environment Variable Validation</a>
        </li>
        <li>
            <a href="#the-interaction-event">The "interaction" Event</a>
        </li>
        <li>
            <a href="#prepare-for-commands">Prepare for Commands</a>
        </li>
        <li>
            <a href="#database-model">Database Model</a>
        </li>
        <li>
            <a href="#write-bot-commands">Write Bot Commands</a>
        </li>
    </ul>
</details>

<h2 id="heading-create-a-discord-bot-application">Create a Discord Bot Application</h2>
<p>Your first step is to set up a Discord bot application. Head over to the <a target="_blank" href="https://discord.dev">Discord Developer Portal</a>, sign in if needed, and select "Applications" from the sidebar.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-76.png" alt="Image" width="600" height="400" loading="lazy">
<em>Screenshot of the Developer Portal. If this is your first bot, you will not have any applications here.</em></p>
<p>Click the "New Application" button. Give it a name, and set it as a "Personal" application. You will now be taken to the application's settings. Here you can change the name, or give it an avatar.</p>
<p>Select "Bot" from the side bar, then click the "Add Bot" button. This will create a Discord Bot account for your application.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-77.png" alt="Image" width="600" height="400" loading="lazy">
<em>Screenshot of the Bot settings page. If you did not set an avatar, you will see a default based on your bot's name.</em></p>
<p>This is the screen where you will get the bot token. It is <em>very</em> important to keep this token secret, as the token allows your code to connect to your bot. Keep it safe and do not share it with anyone.</p>
<p>Now you need to add the bot to a server to interact with it. Click the "OAuth2" option on the sidebar, then select "URL Generator".</p>
<p>Under "Scopes", select <code>bot</code> and <code>application.commands</code>. The <code>bot</code> scope allows your bot account to join the server, and the <code>application.commands</code> scope allows you to update the slash commands (more on this later).</p>
<p>When you select <code>bot</code>, a new section for "Bot Permissions" will appear. Select the following permissions:</p>
<ul>
<li>Send Messages</li>
<li>Embed Links</li>
<li>Read Messages/View Channels</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-78.png" alt="Image" width="600" height="400" loading="lazy">
<em>Screenshot of the OAuth screen with the required settings.</em></p>
<p>Copy the generated URL, and paste it into your browser. This will take you through Discord's process to add your new bot to a server. </p>
<p>Note that you must have the Manage Server permission in the server you want to add the bot to. If you do not have this permission, you can create a server to test your bot in.</p>
<p>Now you are ready to write some code!</p>
<h2 id="heading-set-up-your-project">Set Up Your Project</h2>
<p>You will first need to set up the infrastructure and tooling for your project.</p>
<p>Ensure that you have Node.js <strong>version 16</strong> and <code>npm</code> installed. Note that the packages you will use do not support earlier versions of Node.</p>
<h3 id="heading-prepare-the-packagejson">Prepare the <code>package.json</code></h3>
<p>Create a directory, or folder, for your project. Open your terminal pointing to that new folder. Run the command <code>npm init</code> to set up your <code>package.json</code> file. For this tutorial, the default values are sufficient, but feel free to edit them as you wish.</p>
<p>You should end up with a <code>package.json</code> similar to this:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"name"</span>: <span class="hljs-string">"100doc-tutorial"</span>,
  <span class="hljs-attr">"version"</span>: <span class="hljs-string">"1.0.0"</span>,
  <span class="hljs-attr">"description"</span>: <span class="hljs-string">""</span>,
  <span class="hljs-attr">"main"</span>: <span class="hljs-string">"index.js"</span>,
  <span class="hljs-attr">"scripts"</span>: {
    <span class="hljs-attr">"test"</span>: <span class="hljs-string">"echo \"Error: no test specified\" &amp;&amp; exit 1"</span>
  },
  <span class="hljs-attr">"author"</span>: <span class="hljs-string">""</span>,
  <span class="hljs-attr">"license"</span>: <span class="hljs-string">"ISC"</span>
}
</code></pre>
<p>Now you need to make a couple of changes to get ready for the TypeScript implementation.</p>
<p>First, replace the <code>main</code> value of <code>index.js</code> with <code>./prod/index.js</code> – you will be setting your TypeScript to compile to a <code>prod</code> directory.</p>
<p>Then remove the <code>test</code> script and add the following two scripts:</p>
<pre><code class="lang-json"><span class="hljs-string">"build"</span>: <span class="hljs-string">"tsc"</span>,
<span class="hljs-string">"start"</span>: <span class="hljs-string">"node -r dotenv/config ./prod/index.js"</span>
</code></pre>
<p>The <code>build</code> script will compile your TypeScript into JavaScript so Node can run it, and the <code>start</code> script will run the <code>index.js</code> entrypoint file.</p>
<p>Adding the <code>-r dotenv/config</code> here will dynamically import and run the <code>config</code> method in the <code>dotenv</code> package, which loads your environment variables from the <code>.env</code> file.</p>
<p>Speaking of packages, your next step is to install dependencies. Using <code>npm install</code>, install these dependencies:</p>
<ul>
<li><code>discord.js</code> – this is the library that will handle connecting to the gateway and managing the Discord API calls.</li>
<li><code>@discordjs/builders</code> – the discord.js package for constructing application commands</li>
<li><code>@discordjs/rest</code> – a custom API client for interacting with the Discord REST API.</li>
<li><code>discord-api-types</code> – Type definitions and handlers for the Discord REST API.</li>
<li><code>dotenv</code> – a package that loads <code>.env</code> values into the Node process.</li>
<li><code>mongoose</code> – A wrapper for the MongoDB connection which offers tools for structuring your data.</li>
</ul>
<p>Finally, install the development dependencies with <code>npm install --save-dev</code>. Development dependencies are packages that are required for working on your project in a development environment, but not required for running the codebase in production.</p>
<ul>
<li><code>typescript</code> – This is the package for the TypeScript language, which includes everything needed to write code in TypeScript and compile it into JavaScript.</li>
<li><code>@types/node</code> – TypeScript relies on type definitions to understand the code you write. This package defines the types for the Node.js runtime environment, such as the <code>process.env</code> object.</li>
</ul>
<p>With these packages installed, you should now have a <code>package.json</code> similar to this:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"name"</span>: <span class="hljs-string">"100doc-tutorial"</span>,
  <span class="hljs-attr">"version"</span>: <span class="hljs-string">"1.0.0"</span>,
  <span class="hljs-attr">"description"</span>: <span class="hljs-string">""</span>,
  <span class="hljs-attr">"main"</span>: <span class="hljs-string">"./prod/index.js"</span>,
  <span class="hljs-attr">"scripts"</span>: {
    <span class="hljs-attr">"build"</span>: <span class="hljs-string">"tsc"</span>,
    <span class="hljs-attr">"start"</span>: <span class="hljs-string">"node -r dotenv/config ./prod/index.js"</span>
  },
  <span class="hljs-attr">"author"</span>: <span class="hljs-string">""</span>,
  <span class="hljs-attr">"license"</span>: <span class="hljs-string">"ISC"</span>,
  <span class="hljs-attr">"dependencies"</span>: {
    <span class="hljs-attr">"@discordjs/builders"</span>: <span class="hljs-string">"^0.11.0"</span>,
    <span class="hljs-attr">"@discordjs/rest"</span>: <span class="hljs-string">"^0.2.0-canary.0"</span>,
    <span class="hljs-attr">"discord.js"</span>: <span class="hljs-string">"^13.6.0"</span>,
    <span class="hljs-attr">"dotenv"</span>: <span class="hljs-string">"^14.2.0"</span>,
    <span class="hljs-attr">"mongoose"</span>: <span class="hljs-string">"^6.1.7"</span>
  },
  <span class="hljs-attr">"devDependencies"</span>: {
    <span class="hljs-attr">"@types/node"</span>: <span class="hljs-string">"^17.0.10"</span>,
    <span class="hljs-attr">"typescript"</span>: <span class="hljs-string">"^4.5.4"</span>
  }
}
</code></pre>
<h3 id="heading-prepare-typescript">Prepare TypeScript</h3>
<p>TypeScript's compiler offers a number of different settings to maximise your control over the resulting JavaScript.</p>
<p>You can typically modify the compiler settings through a <code>tsconfig.json</code> file at the root of your project. You can generate the default boilerplate for this file with <code>npx tsc --init</code>, use an existing one if you set one up in another project, or even write one from scratch.</p>
<p>Because the compiler settings can significantly change the behaviour of TypeScript, it is best to use the same settings when following this tutorial. Here are the settings you should use:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"compilerOptions"</span>: {
    <span class="hljs-attr">"target"</span>: <span class="hljs-string">"ES6"</span>,
    <span class="hljs-attr">"module"</span>: <span class="hljs-string">"CommonJS"</span>,
    <span class="hljs-attr">"rootDir"</span>: <span class="hljs-string">"./src"</span>,
    <span class="hljs-attr">"outDir"</span>: <span class="hljs-string">"./prod"</span>,
    <span class="hljs-attr">"strict"</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">"esModuleInterop"</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">"skipLibCheck"</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">"forceConsistentCasingInFileNames"</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">"resolveJsonModule"</span>: <span class="hljs-literal">true</span>
  }
}
</code></pre>
<p>The most important settings here are the <code>rootDir</code> and <code>outDir</code> settings. These tell the compiler that all of your code will be in the <code>src</code> directory, and the resulting JavaScript should go in the <code>prod</code> directory.</p>
<p>If you would like to test your settings, create a <code>src</code> directory and place an <code>index.ts</code> file inside. Write some code (such as a <code>console.log</code> statement) and run <code>npm run build</code> in your terminal. You should see a <code>prod</code> directory get created, with an <code>index.js</code> containing your compiled code.</p>
<h3 id="heading-additional-setup-notes">Additional Setup Notes</h3>
<p>If you are using <code>git</code> as a version control, you want to avoid pushing secrets and unnecessary code to your repository. Create a <code>.gitignore</code> file in your root project directory, and add the following content:</p>
<pre><code class="lang-txt">/node_modules/
/prod/
.env
</code></pre>
<p>The <code>.gitignore</code> file tells <code>git</code> not to track files/folders that match the patterns you enter. Ignoring the <code>node_modules</code> folder keeps your repository from becoming bloated.</p>
<p>Pushing the compiled JavaScript is also unnecessary, as your project is typically compiled in production before runtime. <code>.env</code> files contain secret values, such as API keys and tokens, so they should not be committed to a repository.</p>
<h2 id="heading-create-the-discord-bot">Create the Discord Bot</h2>
<p>Your next step is to prepare the initial bot connection. If you did not do so earlier, create a <code>src</code> directory and an <code>index.ts</code> file within.</p>
<p>Start with an anonymous immediately-invoked function expression (IIFE) to allow for top-level <code>await</code> use:</p>
<pre><code class="lang-ts">(<span class="hljs-keyword">async</span> () =&gt; {

})();
</code></pre>
<p>Within this function you are going to instantiate your Discord bot. At the top of the file, import the <code>Client</code> class with <code>import { Client } from "discord.js";</code>. The <code>Client</code> class represents your Discord bot's session.</p>
<p>Inside your function, construct a new <code>Client</code> instance and assign it to a <code>BOT</code> variable with <code>const BOT = new Client();</code>. Now the <code>BOT</code> variable will represent your bot.</p>
<p>To connect your bot to the Discord gateway and begin receiving events, you will need to use the <code>.login()</code> method on your bot instance. The <code>.login()</code> method takes a single argument, which is the token for the bot application you created earlier.</p>
<p>Many of the methods in <code>discord.js</code> are asynchronous, so you will need to use <code>await</code> here. Add the line <code>await BOT.login(process.env.BOT_TOKEN);</code> to your IIFE.</p>
<p>Your <code>index.ts</code> file should now look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

(<span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">const</span> BOT = <span class="hljs-keyword">new</span> Client();

  <span class="hljs-keyword">await</span> BOT.login(process.env.BOT_TOKEN);
})();
</code></pre>
<p>If you try to run <code>npm run build</code>, you will see an error: <code>An argument for 'options' was not provided.</code></p>
<p>In discord.js 13, you are required to specify Gateway Intents when you instantiate your bot. Gateway Intents tell Discord what events your bot should receive.</p>
<p>In your <code>src</code> folder, create a <code>config</code> folder - then in <code>config</code>, create an <code>IntentOptions.ts</code> file.</p>
<p>Within that new file, add the line <code>export const IntentOptions = ["GUILDS"]</code>. This will tell Discord your bot should receive the Guild events.</p>
<p>Then, back in your <code>index.ts</code> file, add an argument to your <code>new Client()</code> call: <code>new Client({intents: IntentOptions})</code>. You'll need to import it at the top of your file with <code>import { IntentOptions } from "./config/IntentOptions;</code>. </p>
<p>It seems you still have an error: <code>Type 'string' is not assignable to type 'number |</code>${bigint}<code>| IntentsString | Readonly&lt;BitField&lt;IntentsString, number&gt;&gt; | RecursiveReadonlyArray&lt;number |</code>${bigint}<code>| IntentsString | Readonly&lt;...&gt;&gt;'.</code></p>
<p>TypeScript is inferring your <code>IntentOptions</code> array as a string, but the <code>Client</code> constructor is expecting more specific types. </p>
<p>Head back to your <code>config/IntentOptions.ts</code> file and add another import: <code>import { IntentsString } from "discord.js"</code>. Then update your variable with the new type definition: <code>export const IntentOptions: IntentsString[] = ["GUILDS"];</code>.</p>
<p>Now <code>npm run build</code> should be successful. If you have added your new bot to a Discord server, running <code>npm start</code> will show your bot come online in that server. However, the bot is not going to respond to anything yet, because you have not started listening to events.</p>
<h2 id="heading-gateway-events-in-discord">Gateway Events in Discord</h2>
<p>Gateway "events" are generated when an action happens on Discord, and are typically sent to clients (including your bot) as JSON payloads. You can listen to those events with the <code>.on()</code> method, allowing you to write logic for your bot to follow when specific events occur.</p>
<p>The first event to listen to is the "ready" event. This event fires when your bot has connected to the gateway and is <em>ready</em> to process events. Above your <code>.login()</code> call, add <code>BOT.on("ready", () =&gt; console.log("Connected to Discord!"));</code>. </p>
<p>For your changes to take effect, use <code>npm run build</code> again to compile the new code. Now if you try <code>npm run start</code>, you should see "Connected to Discord!" print in your terminal.</p>
<h2 id="heading-connect-to-the-database">Connect to the Database</h2>
<p>You'll be using the <code>mongoose</code> package to connect to a MongoDB instance. If you prefer, you can run MongoDB locally, or you can use the MongoDB Atlas free tier for a cloud-based solution. </p>
<p>If you do not have a MongoDB Atlas account, freeCodeCamp has a <a target="_blank" href="https://www.freecodecamp.org/news/get-started-with-mongodb-atlas/">great tutorial on setting one up</a>.</p>
<p>Grab your connection string for your database and add it to your <code>.env</code> file as <code>MONGO_URI=""</code>, with the connection string going between the quotes. For the database name, use <code>oneHundredDays</code>.</p>
<p>Create a directory called <code>database</code> to hold the files that contain your database logic. Within that directory, create a file called <code>connectDatabase.ts</code>. You will be writing your logic to initiate the database connection here.</p>
<p>Start with an exported function declaration:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> connectDatabase = <span class="hljs-keyword">async</span> () =&gt; {

}
</code></pre>
<p><code>mongoose</code> offers a <code>connect</code> method for connecting to the database. Import it with <code>import { connect } from "mongoose";</code> at the top of your file.</p>
<p>Then use the method inside your function with <code>await connect(process.env.MONGO_URI);</code>. Add a <code>console.log</code> statement after that so you can identify that your bot has connected to the database. </p>
<p>Your <code>connectDatabase.ts</code> file should now look something like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { connect } <span class="hljs-keyword">from</span> <span class="hljs-string">"mongoose"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> connectDatabase = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">await</span> connect(process.env.MONGO_URI);
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Database Connected!"</span>)
}
</code></pre>
<p>Now, within your <code>index.ts</code> file, import this function with <code>import { connectDatabase } from "./database/connectDatabase"</code> and add <code>await connectDatabase()</code> to your IIFE, just before the <code>.login()</code> method. Go ahead and run <code>npm run build</code> again.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/06/image-157.png" alt="Image" width="600" height="400" loading="lazy">
<em>A compiler error, indicating that: Argument of type string or undefined is not assignable to parameter of type string.</em></p>
<p>Oh no – an error!</p>
<h2 id="heading-environment-variable-validation">Environment Variable Validation</h2>
<p>The problem with environment variables is that they can all be <code>undefined</code>. This often happens if you make a typo in your environment variable name, or mix the name up with another name (a mistake I made when writing this tutorial, using <code>TOKEN</code> instead of <code>BOT_TOKEN</code> in some places).</p>
<p>TypeScript is warning you that the <code>connect</code> method takes a string, and that an <code>undefined</code> value will break things. You can fix this, but first you will want to write a function to handle validating your environment variables.</p>
<p>Within your <code>src</code> directory, create a <code>utils</code> directory to contain your utility functions. Add a <code>validateEnv.ts</code> file there.</p>
<p>Create a function in the file called <code>validateEnv</code>. This function will be synchronous and does not need the <code>async</code> keyword. Within that function, add conditions to check for your two environment variables. If either one is missing, return <code>false</code>. Otherwise, return <code>true</code>.</p>
<p>Your code might look something like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> validateEnv = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">if</span> (!process.env.BOT_TOKEN) {
    <span class="hljs-built_in">console</span>.warn(<span class="hljs-string">"Missing Discord bot token."</span>);
    <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
  }

  <span class="hljs-keyword">if</span> (!process.env.MONGO_URI) {
    <span class="hljs-built_in">console</span>.warn(<span class="hljs-string">"Missing MongoDB connection."</span>);
    <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
  }
  <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
};
</code></pre>
<p>Head back to your <code>index.ts</code> file and import this validation function with <code>import { validateEnv } from "./utils/validateEnv"</code>. Then at the beginning of your IIFE, use an if statement to return early if the function returns false. Your <code>index.ts</code> should look like:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { connectDatabase } <span class="hljs-keyword">from</span> <span class="hljs-string">"./database/connectDatabase"</span>;
<span class="hljs-keyword">import</span> { validateEnv } <span class="hljs-keyword">from</span> <span class="hljs-string">"./utils/validateEnv"</span>;

(<span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">if</span> (!validateEnv()) <span class="hljs-keyword">return</span>;

  <span class="hljs-keyword">const</span> BOT = <span class="hljs-keyword">new</span> Client();

  BOT.on(<span class="hljs-string">"ready"</span>, <span class="hljs-function">() =&gt;</span> <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Connected to Discord!"</span>));

  <span class="hljs-keyword">await</span> connectDatabase();

  <span class="hljs-keyword">await</span> BOT.login(process.env.BOT_TOKEN);
})();
</code></pre>
<p>If you try <code>npm run build</code> again, you will see the same error message as before. This is because while we know the environment variable exists, TypeScript still cannot infer it. The validation function is set up to exit the process if the environment variable is missing, so we are going to tell TypeScript that it is definitely a string.</p>
<p>Back in your <code>connectDatabase.ts</code> file, within the <code>connect</code> function use <code>process.env.MONGO_URI as string</code> to coerce the type into <code>string</code>. The error should go away, and you can now run <code>npm run build</code> and <code>npm start</code>. </p>
<p>You should see the messages you wrote for both the Discord and MongoDB connections print in your terminal.</p>
<h2 id="heading-the-interaction-event">The "interaction" Event</h2>
<p>While you are making great progress on your bot, it still does not <em>do</em> anything. In order to receive commands, you will need to create another event listener.</p>
<p>Discord rolled out slash commands, featuring a new UI and a new gateway event. The <code>interactionCreate</code> event is triggered when someone uses a slash command with your bot. This is the event you will want to listen to. Because the logic is a bit more complicated than the <code>ready</code> event, you will want to create a separate file.</p>
<p>Within your <code>src</code> directory, create an <code>events</code> directory, and an <code>onInteraction.ts</code> file in there. Start by defining an exported function <code>onInteraction</code>. This should be an asynchronous function, with a single parameter called <code>interaction</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onInteraction = <span class="hljs-keyword">async</span> (interaction) =&gt; {

};
</code></pre>
<p>To provide a type definition for your parameter, import the <code>Interaction</code> type from <code>discord.js</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Interaction } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onInteraction = <span class="hljs-keyword">async</span> (interaction: Interaction) =&gt; {

};
</code></pre>
<p>The <code>interaction</code> event actually triggers on any command interaction, which includes things like button clicks and select menus, as well as the slash commands we want. </p>
<p>Because you will only be writing slash commands for this bot, you can filter out any other interaction type and help TypeScript understand the data you are working with.</p>
<p>In your new function, add a condition to check <code>interaction.isCommand()</code>. You will be writing logic within this block later.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Interaction } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onInteraction = <span class="hljs-keyword">async</span> (interaction: Interaction) =&gt; {
  <span class="hljs-keyword">if</span> (interaction.isCommand()) {
  }
};
</code></pre>
<p>Now, back in your <code>index.ts</code> file, you can mount another listener. Next to your <code>.on("ready")</code> listener, add a <code>BOT.on("interactionCreate")</code> listener. For this event, the callback takes an <code>interaction</code> argument which you can pass to your new <code>onInteraction</code> function.</p>
<pre><code class="lang-ts">  BOT.on(
    <span class="hljs-string">"interactionCreate"</span>,
    <span class="hljs-keyword">async</span> (interaction) =&gt; <span class="hljs-keyword">await</span> onInteraction(interaction)
  );
</code></pre>
<p>Great! You can run <code>npm run build</code> to confirm that TypeScript doesn't throw any errors, but without actual commands to use you can't quite test this code yet.</p>
<h2 id="heading-prepare-for-commands">Prepare for Commands</h2>
<p>I maintain a few Discord bots, and one thing I've discovered that helps keep code maintainable and readable is making the components modular.</p>
<h3 id="heading-define-an-interface">Define an Interface</h3>
<p>You will first need to define a common structure for your commands. Create an <code>interfaces</code> folder in <code>src</code>. Then inside <code>interfaces</code> create a file called <code>Command.ts</code>.</p>
<p>Now you are going to create an interface. In TypeScript, an interface is often used to define the structure of an object, and is one of many tools available for declaring a variable's type.</p>
<p>In your <code>Command.ts</code> file, create an exported interface called <code>Command</code>:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> Command {

}
</code></pre>
<p>Your interface will have two properties – <code>data</code>, which will hold the command data to send to Discord, and <code>run</code>, which will hold the callback function and command logic.</p>
<p>For the <code>data</code> property, import <code>SlashCommandBuilder</code> and <code>SlashCommandSubcommandsOnlyBuilder</code> from <code>@discordjs/builders</code>. Define the <code>data</code> property as either one of those two types.</p>
<p>For the <code>run</code> property, import the <code>CommandInteraction</code> type from <code>discord.js</code>. Define <code>run</code> as a function which takes a <code>CommandInteraction</code> typed parameter and returns a <code>void</code> Promise.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> {
  SlashCommandBuilder,
  SlashCommandSubcommandsOnlyBuilder,
} <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { CommandInteraction } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> CommandInt {
  data: SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder;
  run: <span class="hljs-function">(<span class="hljs-params">interaction: CommandInteraction</span>) =&gt;</span> <span class="hljs-built_in">Promise</span>&lt;<span class="hljs-built_in">void</span>&gt;;
}
</code></pre>
<h3 id="heading-create-a-command-list">Create a Command List</h3>
<p>Next you need a place to store all of your commands. Create a folder called <code>commands</code> in the <code>src</code> directory, and add a file called <code>_CommandList.ts</code>. The underscore here will keep this file at the top of the list.</p>
<p>The <code>_CommandList.ts</code> file will need two lines. First, import your <code>Command</code> interface, then declare a <code>CommandList</code> array. The array will be empty for now, but give it a <code>Command[]</code> type so TypeScript knows it will eventually hold your command objects. The file should look like:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> CommandList: Command[] = [];
</code></pre>
<p>The purpose of this file is to create an array of your bot's commands which you will iterate over in the interaction event listener. <a target="_blank" href="https://github.com/BeccaLyria/discord-bot/blob/main/src/utils/readDirectory.ts">There are ways to automate this</a>, but they tend to be unnecessarily complex for smaller bots.</p>
<h3 id="heading-check-for-commands">Check for Commands</h3>
<p>Back in your <code>onInteraction.ts</code> file, you should start working on the logic for finding and running a command.</p>
<p>In your <code>interaction.isCommand()</code> condition block, loop through the <code>CommandList</code> array (remember to import it!) with a <code>for...of</code> loop. </p>
<pre><code class="lang-ts"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> Command <span class="hljs-keyword">of</span> CommandList) {

}
</code></pre>
<p>The interaction payload received from Discord includes a <code>commandName</code> property, which you can use to find the command that a user has selected. To check this, compare <code>interaction.commandName</code> with the <code>Command.data.name</code> property.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">if</span> (interaction.commandName === Command.data.name) {

}
</code></pre>
<p>Now, if you have found the command the user has chosen, you need to run the logic for that command. This is achieved with a <code>Command.run(interaction)</code> call – passing the interaction payload into the command.</p>
<p>Your final file should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Interaction } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { CommandList } <span class="hljs-keyword">from</span> <span class="hljs-string">"../commands/_CommandList"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onInteraction = <span class="hljs-keyword">async</span> (interaction: Interaction) =&gt; {
  <span class="hljs-keyword">if</span> (interaction.isCommand()) {
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> Command <span class="hljs-keyword">of</span> CommandList) {
      <span class="hljs-keyword">if</span> (interaction.commandName === Command.data.name) {
        <span class="hljs-keyword">await</span> Command.run(interaction);
        <span class="hljs-keyword">break</span>;
      }
    }
  }
};
</code></pre>
<h2 id="heading-database-model">Database Model</h2>
<p>There's one more step before you are ready to start writing commands. This bot will track your community members' 100 Days of Code progress. And you need to store that progress in the database.</p>
<p><code>mongoose</code> helps structure your MongoDB records to prevent you from passing malformed or incomplete data into your database.</p>
<p>Start by creating a <code>models</code> folder in your <code>database</code> directory. In that <code>models</code> folder, create a <code>CamperModel.ts</code> file. This will be your structure for the user objects.</p>
<p>You first need to import the necessary values from the <code>mongoose</code> library. Add <code>import { Document, model, Schema } from "mongoose";</code> at the top of the file.</p>
<p>Because you are using TypeScript, you need to create a type definition for your database objects. Create another interface, like you did for your commands, named <code>CamperInt</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> CamperInt <span class="hljs-keyword">extends</span> Document {

}
</code></pre>
<p>Your database model will have four properties. Add these to your interface:</p>
<ul>
<li><code>discordId: string;</code> – Every user object in Discord has a unique identifier, called a Snowflake, which is used to distinguish them from other users. Unlike a username or discriminator (the four digit number after the username), the <code>id</code> value cannot be changed. This makes it the ideal value for linking your stored data to a Discord user.</li>
<li><code>round: number;</code> – This will represent the "round" the user is on in the challenge. When someone completes 100 days of the challenge, they may choose to undertake the challenge again. When they do, they often refer to it as "round 2", for example. </li>
<li><code>day: number;</code> – This represents the day the user is on in the challenge.</li>
<li><code>timestamp: number;</code> – You will use this value to track when the user last submitted a 100 Days of Code post.</li>
</ul>
<p>Great! Now you need to define the Schema for your database entries. <code>mongoose</code> uses a Schema object to define the shape of the documents that go in to your database collection. The <code>Schema</code> import has a constructor, which you will assign to a variable.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> Camper = <span class="hljs-keyword">new</span> Schema();
</code></pre>
<p>This constructor takes an object as its argument, and that object defines the database keys and types. Go ahead and pass in an object similar to what your interface looks like.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> Camper = <span class="hljs-keyword">new</span> Schema({
    discordId: <span class="hljs-built_in">String</span>,
    round: <span class="hljs-built_in">Number</span>,
    day: <span class="hljs-built_in">Number</span>,
    timestamp: <span class="hljs-built_in">Number</span>,
})
</code></pre>
<p>Next you need to create the <code>model</code>. In <code>mongoose</code>, the <code>model</code> object serves to create, read, and update your documents in the MongoDB database. Add <code>export default model();</code> at the bottom of your file.</p>
<p>The <code>model</code> function takes a few parameters. The first is a string, and is the name to use for the documents in your database. For this collection, use <code>"camper"</code>. The second argument is the schema to use for the data – use your <code>Camper</code> schema there.</p>
<p>By default, <code>mongoose</code> will use the plural version of your <code>model</code> name for the collection. In our case, that would be "campers". If you want to change that, you can pass in a third argument of <code>{ collection: "name" }</code> to set the collection to <code>name</code>.</p>
<p>If you were using JavaScript, this would be enough to get your database model set up. However, because you are using TypeScript, you should take advantage of the type safety. <code>model()</code> by default returns a <code>Document</code> type of <code>any</code>. </p>
<p>To resolve this, you can pass a generic type into the <code>model</code> function. Generic types serve as variables for type definitions, in a sense. You need to set the generic type for your <code>model</code> to use your interface. Add the generic type by changing <code>model</code> to <code>model&lt;CamperInt&gt;</code>.</p>
<p>Just one more step here. Your <code>CamperInt</code> interface only defines the properties you set in the MongoDB document, but doesn't include the standard properties. </p>
<p>Change your <code>export interface CamperInt</code> to <code>export interface CamperInt extends Document</code>. This tells TypeScript that your type definition is an extension of the existing <code>Document</code> type definition – you are essentially adding properties to that structure.</p>
<p>Your final file should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Document, model, Schema } <span class="hljs-keyword">from</span> <span class="hljs-string">"mongoose"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> CamperInt {
  discordId: <span class="hljs-built_in">string</span>;
  round: <span class="hljs-built_in">number</span>;
  day: <span class="hljs-built_in">number</span>;
  timestamp: <span class="hljs-built_in">number</span>;
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> Camper = <span class="hljs-keyword">new</span> Schema({
  discordId: <span class="hljs-built_in">String</span>,
  round: <span class="hljs-built_in">Number</span>,
  day: <span class="hljs-built_in">Number</span>,
  timestamp: <span class="hljs-built_in">Number</span>,
});

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> model&lt;CamperInt&gt;(<span class="hljs-string">"camper"</span>, Camper);
</code></pre>
<p>As a safety check, use <code>npm run build</code> again. You should not see any errors in the terminal.</p>
<h2 id="heading-write-bot-commands">Write Bot Commands</h2>
<p>You are finally ready to start writing some commands! As this is a 100 Days of Code bot, you should start with the command for creating a 100 Days of Code update.</p>
<h3 id="heading-100-command">100 Command</h3>
<p>Within your <code>commands</code> folder, create a <code>oneHundred.ts</code> file. This will hold your 100 Days of Code command. Import your command interface with <code>import { Command } from "../interfaces/Command;</code>.</p>
<p>Now declare an exported variable <code>oneHundred</code> and give it the <code>Command</code> type:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {

};
</code></pre>
<p>First, create the <code>data</code> property. You will be using the <code>@discordjs/builders</code> package to build a slash command.</p>
<p>Start by importing the <code>SlashCommandBuilder()</code> from the <code>@discordjs/builders</code> package. Then, construct a new instance in the <code>data</code> property with <code>new SlashCommandBuilder()</code>. You're going to chain some methods here to pass the information you want into the builder.</p>
<p>The <code>.setName()</code> method allows you to set the name of your slash command. Set the name to <code>"100"</code>. The <code>setDescription()</code> option allows you to display a description of the command in Discord's UI. Set the description to <code>"Check in for the 100 Days of Code challenge."</code>.</p>
<p>Slash commands can also accept <code>option</code> values. These are used to take arguments from the user, and come in various types. For this command, you'll want a string option with the <code>addStringOption()</code> method. Option methods take a callback function, with an <code>option</code> parameter.</p>
<p>You can then chain methods on the <code>option</code> parameter to configure the information for the argument. Use the <code>.setName()</code> method to give the option a name of <code>"message"</code>, and the <code>.setDescription()</code> method to give it a description of <code>"The message to go in your 100 Days of Code update."</code>. Finally, use the <code>.setRequired()</code> method to set the option to be required.</p>
<p>Here's what you should have now:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"100"</span>)
    .setDescription(<span class="hljs-string">"Check in for the 100 Days of Code challenge."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
};
</code></pre>
<p>If you are coding in an IDE with Intellisense enabled, you may have noticed that this will throw a type error on the <code>data</code> property. This is because the <code>SlashCommandBuilder</code> actually returns an <code>Omit</code> type! An <code>Omit</code> type is used to tell TypeScript that the type is <em>almost</em> the same as another type, but with specific properties removed.</p>
<p>Head over to your <code>interfaces/Command.ts</code> file to update the type. Replace the <code>SlashCommandBuilder</code> type with <code>Omit&lt;SlashCommandBuilder, "addSubcommandGroup" | "addSubcommand"&gt;</code>. This will tell TypeScript that <code>data</code> should be a <code>SlashCommandBuilder</code>, but without those two specific properties.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> {
  SlashCommandBuilder,
  SlashCommandSubcommandsOnlyBuilder,
} <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { CommandInteraction } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> Command {
  data:
    | Omit&lt;SlashCommandBuilder, <span class="hljs-string">"addSubcommandGroup"</span> | <span class="hljs-string">"addSubcommand"</span>&gt;
    | SlashCommandSubcommandsOnlyBuilder;
  run: <span class="hljs-function">(<span class="hljs-params">interaction: CommandInteraction</span>) =&gt;</span> <span class="hljs-built_in">Promise</span>&lt;<span class="hljs-built_in">void</span>&gt;;
}
</code></pre>
<p>Great! Now that your type error is resolved, head back over to your <code>oneHundred.ts</code> command file – it is time to write the command logic.</p>
<p>All of your bot's logic for responding to the command will go in the <code>run</code> property. As you did in your interface, start by creating an async function which takes an <code>interaction</code> argument. Then, let the first line of your function be <code>await interaction.deferReply();</code>.</p>
<p>Discord expects a bot to respond to a command within three seconds. Because this command may take longer to process, using the <code>.deferReply()</code> method sends an acknowledgement response that gives you a full 15 minutes to send the actual response.</p>
<p>Next, you need to extract some data from the command. First, destructure the <code>user</code> object out of the interaction payload with <code>const { user } = interaction;</code>. The <code>user</code> object represents the Discord user that called the command. </p>
<p>Then get the <code>message</code> option you sent with <code>const text = interaction.options.getString("message", true);</code>. With this line, you are accessing the <code>options</code> property of the interaction. The <code>.getString()</code> method specifically grabs a string option (remember that you created the option in <code>data</code>), and <code>"message"</code> is the <strong>name</strong> of the option. The <code>true</code> argument indicates that this is a required option, so TypeScript won't consider it nullable.</p>
<p>Your file should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"100"</span>)
    .setDescription(<span class="hljs-string">"Check in for the 100 Days of Code challenge."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { user } = interaction;
    <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);
  },
};
</code></pre>
<p>The next step in this command would be to fetch data from your database. Because many of your commands will need to do this, you should create a module for it.</p>
<h3 id="heading-handling-the-database-logic">Handling the Database Logic</h3>
<p>Create a <code>src/modules</code> directory, and add a <code>getCamperData.ts</code> file within. Create an exported async function named <code>getCamperData</code>, and give it a string parameter named <code>id</code>. Then, within the function, you can query the database.</p>
<p>Import your <code>CamperModel</code> from the <code>database</code> directory, and use the <code>findOne()</code> method to query by the camper's <code>id</code>: <code>const camperData = await CamperModel.findOne({ discordId: id });</code>. </p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> CamperModel <span class="hljs-keyword">from</span> <span class="hljs-string">"../database/models/CamperModel"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> getCamperData = <span class="hljs-keyword">async</span> (id: <span class="hljs-built_in">string</span>) =&gt; {
  <span class="hljs-keyword">const</span> camperData = <span class="hljs-keyword">await</span> CamperModel.findOne({ id });
};
</code></pre>
<p>We still have one more step here. If the camper has not used the bot before, they won't have an existing database record. <code>findOne()</code> would return <code>null</code> in this case – so you can add a fallback value.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> CamperModel <span class="hljs-keyword">from</span> <span class="hljs-string">"../database/models/CamperModel"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> getCamperData = <span class="hljs-keyword">async</span> (id: <span class="hljs-built_in">string</span>) =&gt; {
  <span class="hljs-keyword">const</span> camperData =
    (<span class="hljs-keyword">await</span> CamperModel.findOne({ discordId: id })) ||
    (<span class="hljs-keyword">await</span> CamperModel.create({
      discordId: id,
      round: <span class="hljs-number">1</span>,
      day: <span class="hljs-number">0</span>,
      date: <span class="hljs-built_in">Date</span>.now(),
    }));
};
</code></pre>
<p>Finally, you need to <code>return</code> your data. Add <code>return camperData</code> at the end of the function. For extra type safety, define the return type of your function as <code>Promise&lt;CamperData&gt;</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> CamperModel, { CamperInt } <span class="hljs-keyword">from</span> <span class="hljs-string">"../database/models/CamperModel"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> getCamperData = <span class="hljs-keyword">async</span> (id: <span class="hljs-built_in">string</span>): <span class="hljs-built_in">Promise</span>&lt;CamperInt&gt; =&gt; {
  <span class="hljs-keyword">const</span> camperData =
    (<span class="hljs-keyword">await</span> CamperModel.findOne({ discordId: id })) ||
    (<span class="hljs-keyword">await</span> CamperModel.create({
      discordId: id,
      round: <span class="hljs-number">1</span>,
      day: <span class="hljs-number">0</span>,
      date: <span class="hljs-built_in">Date</span>.now(),
    }));
  <span class="hljs-keyword">return</span> camperData;
};
</code></pre>
<p>You now have a way to get camper data from the database, but you need a way to update it as well. Create another file in your <code>/src/modules</code> directory called <code>updateCamperData.ts</code>. This will handle the logic to increment a camper's progress.</p>
<p>Start with an exported async function called <code>updateCamperData</code>. It should take a <code>Camper</code> parameter, which would be the data you fetch from MongoDB.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { CamperInt } <span class="hljs-keyword">from</span> <span class="hljs-string">"../database/models/CamperModel"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> updateCamperData = <span class="hljs-keyword">async</span> (Camper: CamperInt) =&gt; {

};
</code></pre>
<p>The only time you will update data is within the <code>/100</code> command – where you'll want to increment the camper's day count, check if they have started a new round, and update the timestamp.</p>
<p>First, increment the day count with <code>Camper.day++;</code>. With the way the 100 Days of Code challenge works, if a camper has passed day 100 then they have started a new "round". You'll need a condition to check if <code>Camper.day &gt; 100</code>, and if so, reset the day to 1 and increment the round. </p>
<p>After that condition, update the timestamp with <code>Camper.timestamp = Date.now();</code> and save the data with <code>await Camper.save();</code>. Finally, return the modified data object so you can use it in the command.</p>
<p>Your final file should look like:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { CamperInt } <span class="hljs-keyword">from</span> <span class="hljs-string">"../database/models/CamperModel"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> updateCamperData = <span class="hljs-keyword">async</span> (Camper: CamperInt) =&gt; {
  Camper.day++;
  <span class="hljs-keyword">if</span> (Camper.day &gt; <span class="hljs-number">100</span>) {
    Camper.day = <span class="hljs-number">1</span>;
    Camper.round++;
  }
  Camper.timestamp = <span class="hljs-built_in">Date</span>.now();
  <span class="hljs-keyword">await</span> Camper.save();
  <span class="hljs-keyword">return</span> Camper;
};
</code></pre>
<h3 id="heading-100-command-continued">100 Command Continued</h3>
<p>Now that your database logic is ready, return to your <code>oneHundred.ts</code> file. As a reminder, that file should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"100"</span>)
    .setDescription(<span class="hljs-string">"Check in for the 100 Days of Code challenge."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { user } = interaction;
    <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);
  },
};
</code></pre>
<p>Import your two new modules at the top of the file. Then, after your logic that extracts the values from the interaction object, fetch the camper's data from the database with <code>const targetCamper = await getCamperData(user.id);</code>. Update the data with <code>const updatedCamper = await updateCamperData(targetCamper);</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;
<span class="hljs-keyword">import</span> { getCamperData } <span class="hljs-keyword">from</span> <span class="hljs-string">"../modules/getCamperData"</span>;
<span class="hljs-keyword">import</span> { updateCamperData } <span class="hljs-keyword">from</span> <span class="hljs-string">"../modules/updateCamperData"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"100"</span>)
    .setDescription(<span class="hljs-string">"Check in for the 100 Days of Code challenge."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { user } = interaction;
    <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);

    <span class="hljs-keyword">const</span> targetCamper = <span class="hljs-keyword">await</span> getCamperData(user.id);
    <span class="hljs-keyword">const</span> updatedCamper = <span class="hljs-keyword">await</span> updateCamperData(targetCamper);
  },
};
</code></pre>
<p>Now you need to construct the response to send back to the camper when they use the command. </p>
<p>For this, you'll be using Discord's message embed feature. Start by importing the <code>MessageEmbed</code> constructor from discord.js, and creating a new embed with <code>const oneHundredEmbed = new MessageEmbed();</code>. The <code>MessageEmbed</code> class has a few methods to use for building the content of the embed.</p>
<p>Use the <code>.setTitle()</code> method to set the title of the embed to <code>"100 Days of Code"</code>. </p>
<p>Use the <code>.setDescription()</code> method to set the description of the embed to the message the camper provided in the command (remember that you extracted this to the <code>text</code> variable earlier). The author of the embed can be set, and will display at the top of the embed. </p>
<p>Use the <code>.setAuthor()</code> method to pass an object with a <code>name</code> property set to <code>user.tag</code> (which will display the camper's username and discriminator, like <code>nhcarrigan#0001</code>), and an <code>iconURL</code> property set to <code>user.displayAvatarUrl()</code> (which will attach the camper's avatar to the embed).</p>
<p>Embeds also accept fields, which are smaller blocks of text that have their own title and description. The <code>.addField()</code> method takes two or three arguments, the first being the field title, the second being the field description, and the third being an optional boolean to set the field as inline. </p>
<p>Use the <code>.addField()</code> method to add two fields. The first should have the title set to <code>"Round"</code> and the description set to <code>updatedCamper.round.toString()</code>. The second should have the title set to <code>"Day"</code> and the description set to <code>updatedCamper.day.toString()</code>. Both fields should be inline.</p>
<p>For the last part of your embed, use the <code>.setFooter()</code> method to add small footer text. Pass an object with a <code>text</code> property set to <code>"Day completed: " + new Date(updatedCamer.timestamp).toLocaleDateString()</code> to show the time the camper reported their progress.</p>
<p>Finally, you need to send this new embed back to the camper. Because you have already sent a response with the <code>interaction.deferReply()</code> call, you cannot send another response. Instead, you need to edit the one you sent.</p>
<p>Use <code>await interaction.editReply()</code> to edit the response. The <code>.editReply()</code> method takes an object with various properties – in this case, you are sending an embed. Pass an object with an <code>embeds</code> property set to <code>[oneHundredEmbed]</code>. </p>
<p>Note that this is an array containing your embed. Discord messages can contain up to 10 embeds, and the API expects an array of embed objects to match.</p>
<p>Your final command file should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { MessageEmbed } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;
<span class="hljs-keyword">import</span> { getCamperData } <span class="hljs-keyword">from</span> <span class="hljs-string">"../modules/getCamperData"</span>;
<span class="hljs-keyword">import</span> { updateCamperData } <span class="hljs-keyword">from</span> <span class="hljs-string">"../modules/updateCamperData"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> oneHundred: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"100"</span>)
    .setDescription(<span class="hljs-string">"Check in for the 100 Days of Code challenge."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { user } = interaction;
    <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);

    <span class="hljs-keyword">const</span> targetCamper = <span class="hljs-keyword">await</span> getCamperData(user.id);
    <span class="hljs-keyword">const</span> updatedCamper = <span class="hljs-keyword">await</span> updateCamperData(targetCamper);

    <span class="hljs-keyword">const</span> oneHundredEmbed = <span class="hljs-keyword">new</span> MessageEmbed();
    oneHundredEmbed.setTitle(<span class="hljs-string">"100 Days of Code"</span>);
    oneHundredEmbed.setDescription(text);
    oneHundredEmbed.setAuthor({
      name: user.tag,
      iconURL: user.displayAvatarURL(),
    });
    oneHundredEmbed.addField(<span class="hljs-string">"Round"</span>, updatedCamper.round.toString(), <span class="hljs-literal">true</span>);
    oneHundredEmbed.addField(<span class="hljs-string">"Day"</span>, updatedCamper.day.toString(), <span class="hljs-literal">true</span>);
    oneHundredEmbed.setFooter({
      text:
        <span class="hljs-string">"Day completed: "</span> +
        <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(updatedCamper.timestamp).toLocaleDateString(),
    });

    <span class="hljs-keyword">await</span> interaction.editReply({ embeds: [oneHundredEmbed] });
  },
};
</code></pre>
<h3 id="heading-registering-commands">Registering Commands</h3>
<p>If you run <code>npm run build</code> and <code>npm start</code>, everything starts up – but you have no way to actually use your new command. This is because Discord requires that commands be registered so they are made available in the application UI. There are a few steps we'll need to take to do this.</p>
<p>First, head over to your <code>_CommandList.ts</code> file and import your <code>oneHundred</code> command. Add this to your <code>CommandList</code> array so it's available elsewhere. </p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;
<span class="hljs-keyword">import</span> { oneHundred } <span class="hljs-keyword">from</span> <span class="hljs-string">"./oneHundred"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> CommandList: Command[] = [oneHundred];
</code></pre>
<p>Now it is time to add the logic to send the command information to Discord. In your <code>src/events</code> directory, add an <code>onReady.ts</code> file. We'll be using this with the <code>"ready"</code> event.</p>
<p>Create an exported async function named <code>onReady</code>, and give it a single parameter called <code>BOT</code>. Import the <code>Client</code> type from discord.js and set the <code>BOT</code> typedef to <code>Client</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onReady = <span class="hljs-keyword">async</span> (BOT: Client) =&gt; {};
</code></pre>
<p>Now import the <code>REST</code> module from <code>@discordjs/rest</code>. This will allow you to instantiate an API client, which you'll use to send the commands. Construct a new instance with <code>const rest = new REST();</code>. </p>
<p>There are a couple of things you'll need to configure with your REST client. First, pass an object into the <code>REST()</code> constructor with a <code>version</code> property set to <code>"9"</code>. This tells the client to use version 9 of Discord's API, which is currently the latest version. </p>
<p>Then, chain a <code>.setToken()</code> call on the constructor to set the API token to <code>process.env.BOT_TOKEN</code> – you'll have to coerce this to a <code>string</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { REST } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/rest"</span>;
<span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onReady = <span class="hljs-keyword">async</span> (BOT: Client) =&gt; {
  <span class="hljs-keyword">const</span> rest = <span class="hljs-keyword">new</span> REST({ version: <span class="hljs-string">"9"</span> }).setToken(
    process.env.BOT_TOKEN <span class="hljs-keyword">as</span> <span class="hljs-built_in">string</span>
  );
};
</code></pre>
<p>The API expects command data to be sent in a specific JSON format, but thankfully the slash command builder we are using has a method just for that. Import your <code>CommandList</code>, then create a new array and map your command data.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">const</span> commandData = CommandList.map(<span class="hljs-function">(<span class="hljs-params">command</span>) =&gt;</span> command.data.toJSON());
</code></pre>
<p>Before you send the commands to Discord, it's important to note that there are two types of commands. "Global Commands" are available everywhere your bot is used, but take about an hour to update. "Guild Commands" are available only in a single server, but update immediately. Because this bot is designed to run in a single server, we're going to use guild commands.</p>
<p>You'll need to get the ID of the server you are using the bot in. To do this, make sure you have enabled developer mode in your Discord application, then right click on your server icon and select "Copy ID". In your <code>.env</code> file, add a <code>GUILD_ID</code> variable and assign it the ID you copied. It should look something like <code>GUILD_ID="778130114772598785"</code>.</p>
<p>Back in your <code>onReady.ts</code> file, start your API call with <code>await rest.put()</code>. Sending a <code>PUT</code> request will update any existing commands, where a <code>POST</code> will attempt to create new commands and error if commands share a name. Import <code>Routes</code> from <code>discord-api-types/v9</code>, and within the <code>rest.put()</code> call pass a <code>Routes.applicationGuildCommands()</code> call. This will be used to construct the API endpoint to send the commands to.</p>
<p>The <code>applicationGuildCommands()</code> call will take two arguments. </p>
<p>The first is the application ID to associate the commands with. You can get this from the <code>BOT.user.id</code> value – but <code>user</code> is potentially undefined, so you'll need to optionally chain it. Use <code>BOT.user?.id || "missing id"</code> to add a fallback value that will error out – this will allow us to know if the bot's ID is missing. </p>
<p>The second argument is the server ID, which you set up as <code>process.env.GUILD_ID</code> (remember to coerce the type!).</p>
<p>The <code>.put()</code> call needs a second argument as well, which is the data you want to send. Pass this as <code>{ body: commandData }</code> to match the expected format. </p>
<p>Finally, add a <code>console.log("Discord ready!")</code> at the end of the file to indicate your bot is online.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { REST } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/rest"</span>;
<span class="hljs-keyword">import</span> { Routes } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord-api-types/v9"</span>;
<span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { CommandList } <span class="hljs-keyword">from</span> <span class="hljs-string">"../commands/_CommandList"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> onReady = <span class="hljs-keyword">async</span> (BOT: Client) =&gt; {
  <span class="hljs-keyword">const</span> rest = <span class="hljs-keyword">new</span> REST({ version: <span class="hljs-string">"9"</span> }).setToken(
    process.env.BOT_TOKEN <span class="hljs-keyword">as</span> <span class="hljs-built_in">string</span>
  );

  <span class="hljs-keyword">const</span> commandData = CommandList.map(<span class="hljs-function">(<span class="hljs-params">command</span>) =&gt;</span> command.data.toJSON());

  <span class="hljs-keyword">await</span> rest.put(
    Routes.applicationGuildCommands(
      BOT.user?.id || <span class="hljs-string">"missing id"</span>,
      process.env.GUILD_ID <span class="hljs-keyword">as</span> <span class="hljs-built_in">string</span>
    ),
    { body: commandData }
  );

  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Discord ready!"</span>);
};
</code></pre>
<p>Switch to your <code>index.ts</code> file and locate your <code>"ready"</code> event listener. Replace the <code>console.log</code> call with your new <code>onReady</code> function – remember to import it, and make the callback asynchronous.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { IntentOptions } <span class="hljs-keyword">from</span> <span class="hljs-string">"./config/IntentOptions"</span>;
<span class="hljs-keyword">import</span> { connectDatabase } <span class="hljs-keyword">from</span> <span class="hljs-string">"./database/connectDatabase"</span>;
<span class="hljs-keyword">import</span> { onInteraction } <span class="hljs-keyword">from</span> <span class="hljs-string">"./events/onInteraction"</span>;
<span class="hljs-keyword">import</span> { onReady } <span class="hljs-keyword">from</span> <span class="hljs-string">"./events/onReady"</span>;
<span class="hljs-keyword">import</span> { validateEnv } <span class="hljs-keyword">from</span> <span class="hljs-string">"./utils/validateEnv"</span>;

(<span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">if</span> (!validateEnv()) <span class="hljs-keyword">return</span>;
  <span class="hljs-keyword">const</span> BOT = <span class="hljs-keyword">new</span> Client({ intents: IntentOptions });

  BOT.on(<span class="hljs-string">"ready"</span>, <span class="hljs-keyword">async</span> () =&gt; <span class="hljs-keyword">await</span> onReady(BOT));

  BOT.on(
    <span class="hljs-string">"interactionCreate"</span>,
    <span class="hljs-keyword">async</span> (interaction) =&gt; <span class="hljs-keyword">await</span> onInteraction(interaction)
  );

  <span class="hljs-keyword">await</span> connectDatabase();

  <span class="hljs-keyword">await</span> BOT.login(process.env.BOT_TOKEN);
})();
</code></pre>
<p>Now run <code>npm run build</code> and <code>npm start</code>, and head to your server in Discord. If you type <code>/</code> you should see your new <code>/100</code> command show up. Try using the command and checking the response.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-122.png" alt="Image" width="600" height="400" loading="lazy">
<em>If you see this response, then you've successfully created your first command!</em></p>
<p>Congratulations! You have your first successful command. With all of the infrastructure you've built, adding additional commands will be much smoother. Let's go ahead and do that now.</p>
<h3 id="heading-edit-command">Edit Command</h3>
<p>What happens if a camper makes a typo in their <code>/100</code> message? Because the bot sends the response, the camper cannot edit it (Discord does not allow you to edit messages you did not send). You should create a command that will allow a camper to do this.</p>
<p>Create an <code>edit.ts</code> file in your <code>src/commands</code> directory. Like you did with the <code>/100</code> command, import your <code>SlashCommandBuilder</code> and <code>Command</code> interface, and export an <code>edit</code> object with the <code>Command</code> type.</p>
<p>Use the <code>SlashCommandBuilder</code> to prepare the <code>data</code> property. Give the command the name <code>edit</code> and the description <code>Edit a previous 100 days of code post.</code>, then add two string options. The first string option should have a name <code>embed-id</code> and a description of <code>ID of the message to edit.</code>, and the second should have a name of <code>message</code> and a description of <code>The message to go in your 100 Days of Code update.</code>. Both options should be required.</p>
<p>Your code should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> edit: Command = {
    data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"edit"</span>)
    .setDescription(<span class="hljs-string">"Edit a previous 100 days of code post."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"embed-id"</span>)
        .setDescription(<span class="hljs-string">"ID of the message to edit."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    )
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
}
</code></pre>
<p>Create your <code>run</code> property with an async function and an <code>interaction</code> parameter. Destructure the <code>channel</code> and <code>user</code> from the interaction, and grab the <code>embed-id</code> and <code>message</code> options. Don't forget to defer the response!</p>
<pre><code class="lang-js">    run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
        <span class="hljs-keyword">await</span> interaction.deferReply();
        <span class="hljs-keyword">const</span> { channel, user } = interaction;
        <span class="hljs-keyword">const</span> targetId = interaction.options.getString(<span class="hljs-string">"embed-id"</span>, <span class="hljs-literal">true</span>);
        <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);
    }
</code></pre>
<p>The <code>channel</code> property is nullable (in cases where an interaction is sent via a DM, for example), so you'll want to check that it exists. If it does not, respond with a message that the command is missing parameters.</p>
<pre><code class="lang-ts">    <span class="hljs-keyword">if</span> (!channel) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content: <span class="hljs-string">"Missing channel parameter."</span>,
      });
      <span class="hljs-keyword">return</span>;
    }
</code></pre>
<p>Now that you know the channel exists, you can fetch the message that the camper wants to edit based on the ID they provided. Use <code>channel.messages.fetch()</code> to do this, passing in the <code>targetId</code> as the argument.</p>
<p>Because it is possible that the target message does not exist, you need to account for that in your code. Add a condition that checks for this, and if the message is not found respond with an explanation.</p>
<pre><code class="lang-ts">    <span class="hljs-keyword">const</span> targetMessage = <span class="hljs-keyword">await</span> channel.messages.fetch(targetId);

    <span class="hljs-keyword">if</span> (!targetMessage) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content:
          <span class="hljs-string">"That does not appear to be a valid message ID. Be sure that you are using this command in the same channel as the message."</span>,
      });
      <span class="hljs-keyword">return</span>;
    }
</code></pre>
<p>The last thing you need to check is that the message the camper is editing actually belongs to them. You can access the embed with the <code>.embeds</code> property – much like how you sent it, the property is returned as an array of embed objects.</p>
<p>Grab the first embed from the array, and then check that the embed author matches the user's tag. If not, let them know they cannot edit this post.</p>
<pre><code class="lang-ts">    <span class="hljs-keyword">const</span> targetEmbed = targetMessage.embeds[<span class="hljs-number">0</span>];

    <span class="hljs-keyword">if</span> (targetEmbed.author?.name !== user.tag) {
        <span class="hljs-keyword">await</span> interaction.editReply({
            content: <span class="hljs-string">"This does not appear to be your 100 Days of Code post. You cannot edit it."</span>
        })
    }
</code></pre>
<p>Now that you have confirmed everything is correct, you can use <code>.setDescription()</code> on the embed to update the text. Then, edit the message with the new embed, and respond to the interaction with a confirmation.</p>
<p>Your full code should look like this:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> edit: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"edit"</span>)
    .setDescription(<span class="hljs-string">"Edit a previous 100 days of code post."</span>)
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"embed-id"</span>)
        .setDescription(<span class="hljs-string">"ID of the message to edit."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    )
    .addStringOption(<span class="hljs-function">(<span class="hljs-params">option</span>) =&gt;</span>
      option
        .setName(<span class="hljs-string">"message"</span>)
        .setDescription(<span class="hljs-string">"The message to go in your 100 Days of Code update."</span>)
        .setRequired(<span class="hljs-literal">true</span>)
    ),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { channel, user } = interaction;
    <span class="hljs-keyword">const</span> targetId = interaction.options.getString(<span class="hljs-string">"embed-id"</span>, <span class="hljs-literal">true</span>);
    <span class="hljs-keyword">const</span> text = interaction.options.getString(<span class="hljs-string">"message"</span>, <span class="hljs-literal">true</span>);

    <span class="hljs-keyword">if</span> (!channel) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content: <span class="hljs-string">"Missing channel parameter."</span>,
      });
      <span class="hljs-keyword">return</span>;
    }

    <span class="hljs-keyword">const</span> targetMessage = <span class="hljs-keyword">await</span> channel.messages.fetch(targetId);

    <span class="hljs-keyword">if</span> (!targetMessage) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content:
          <span class="hljs-string">"That does not appear to be a valid message ID. Be sure that you are using this command in the same channel as the message."</span>,
      });
      <span class="hljs-keyword">return</span>;
    }

    <span class="hljs-keyword">const</span> targetEmbed = targetMessage.embeds[<span class="hljs-number">0</span>];

    <span class="hljs-keyword">if</span> (targetEmbed.author?.name !== user.tag) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content:
          <span class="hljs-string">"This does not appear to be your 100 Days of Code post. You cannot edit it."</span>,
      });
    }

    targetEmbed.setDescription(text);
    <span class="hljs-keyword">await</span> targetMessage.edit({ embeds: [targetEmbed] });
    <span class="hljs-keyword">await</span> interaction.editReply({ content: <span class="hljs-string">"Updated!"</span> });
  },
};
</code></pre>
<p>Add your new <code>edit</code> command to your <code>CommandList</code> array, then build and run your bot and you should see the new command. Try editing the embed you sent earlier.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-123.png" alt="Image" width="600" height="400" loading="lazy">
<em>You should see your embed update, and a confirmation from the bot!</em></p>
<h3 id="heading-view-command">View Command</h3>
<p>Campers should have a way to view their current progress, so we'll need to create a command to do so. By now, you should be comfortable with the command structure – we encourage you to follow these instructions but attempt to write the code without looking at the final result.</p>
<p>Create a <code>view.ts</code> file in your commands directory, and set up your command variable. Create the <code>data</code> property with a command that has the name <code>view</code> and the description <code>Shows your latest 100 days of code check in.</code> This command does not need any options.</p>
<p>Set up your async function in the <code>run</code> property, and defer the interaction response. Extract the <code>user</code> object from the interaction. Use your <code>getCamperData</code> module to fetch the camper's data from the database. Then, check if the data's <code>day</code> property has a non-zero value. If it does not, let the camper know that they have not started the 100 Days of Code challenge, and can do so with the <code>/100</code> command.</p>
<p>Create an embed with a title set to <code>My 100DoC Progress</code>. Set the description to <code>Here is my 100 Days of Code progress. I last reported an update on:</code> and add the camper's timestamp. Add a <code>Round</code> and <code>Day</code> field, and set the author for the embed. Then send the embed in the interaction response.</p>
<p>Remember to add your new command to the <code>CommandList</code>, then try building and starting your bot. You should see the command available, and be able to get a response from it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-125.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If you did not get the response, here is what your code should look like.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { MessageEmbed } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;
<span class="hljs-keyword">import</span> { getCamperData } <span class="hljs-keyword">from</span> <span class="hljs-string">"../modules/getCamperData"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> view: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"view"</span>)
    .setDescription(<span class="hljs-string">"Shows your latest 100 Days of Code check in."</span>),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> { user } = interaction;
    <span class="hljs-keyword">const</span> targetCamper = <span class="hljs-keyword">await</span> getCamperData(user.id);

    <span class="hljs-keyword">if</span> (!targetCamper.day) {
      <span class="hljs-keyword">await</span> interaction.editReply({
        content:
          <span class="hljs-string">"It looks like you have not started the 100 Days of Code challenge yet. Use `/100` and add your message to report your first day!"</span>,
      });
      <span class="hljs-keyword">return</span>;
    }

    <span class="hljs-keyword">const</span> camperEmbed = <span class="hljs-keyword">new</span> MessageEmbed();
    camperEmbed.setTitle(<span class="hljs-string">"My 100DoC Progress"</span>);
    camperEmbed.setDescription(
      <span class="hljs-string">`Here is my 100 Days of Code progress. I last reported an update on <span class="hljs-subst">${<span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(
        targetCamper.timestamp
      ).toLocaleDateString()}</span>.`</span>
    );
    camperEmbed.addField(<span class="hljs-string">"Round"</span>, targetCamper.round.toString(), <span class="hljs-literal">true</span>);
    camperEmbed.addField(<span class="hljs-string">"Day"</span>, targetCamper.day.toString(), <span class="hljs-literal">true</span>);
    camperEmbed.setAuthor({
      name: user.tag,
      iconURL: user.displayAvatarURL(),
    });

    <span class="hljs-keyword">await</span> interaction.editReply({ embeds: [camperEmbed] });
  },
};
</code></pre>
<h3 id="heading-help-command">Help Command</h3>
<p>The last thing you need to build is a help command, which will explain how campers can interact with the bot. </p>
<p>Create your <code>help.ts</code> file in the command directory, and create your <code>data</code> property. Give the command the name <code>help</code> and the description <code>Provides information on using this bot.</code></p>
<p>Set up your <code>run</code> property with the async function, and remember to defer the reply. Create an embed, and use the description and fields to provide the information you would like to share with your campers. Send the embed in the interaction response. </p>
<p>Load your new help command into the <code>CommandList</code>, and build + start your bot to test it. You should see a response with the embed you created.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-126.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Your embed might look different, depending on what information you chose to share. Here's the code that we used for the above embed:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { SlashCommandBuilder } <span class="hljs-keyword">from</span> <span class="hljs-string">"@discordjs/builders"</span>;
<span class="hljs-keyword">import</span> { MessageEmbed } <span class="hljs-keyword">from</span> <span class="hljs-string">"discord.js"</span>;
<span class="hljs-keyword">import</span> { Command } <span class="hljs-keyword">from</span> <span class="hljs-string">"../interfaces/Command"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> help: Command = {
  data: <span class="hljs-keyword">new</span> SlashCommandBuilder()
    .setName(<span class="hljs-string">"help"</span>)
    .setDescription(<span class="hljs-string">"Provides information on using this bot."</span>),
  run: <span class="hljs-keyword">async</span> (interaction) =&gt; {
    <span class="hljs-keyword">await</span> interaction.deferReply();
    <span class="hljs-keyword">const</span> helpEmbed = <span class="hljs-keyword">new</span> MessageEmbed();
    helpEmbed.setTitle(<span class="hljs-string">"100 Days of Code Bot!"</span>);
    helpEmbed.setDescription(
      <span class="hljs-string">"This discord bot is designed to help you track and share your 100 Days of Code progress."</span>
    );
    helpEmbed.addField(
      <span class="hljs-string">"Create today's update"</span>,
      <span class="hljs-string">"Use the `/100` command to create your update for today. The `message` will be displayed in your embed."</span>
    );
    helpEmbed.addField(
      <span class="hljs-string">"Edit today's update"</span>,
      <span class="hljs-string">"Do you see a typo in your embed? Right click it and copy the ID (you may need developer mode on for this), and use the `/edit` command to update that embed with a new message."</span>
    );
    helpEmbed.addField(
      <span class="hljs-string">"Show your progress"</span>,
      <span class="hljs-string">"To see your current progress in the challenge, and the day you last checked in, use `/view`."</span>
    );
    helpEmbed.setFooter({ text: <span class="hljs-string">`Version <span class="hljs-subst">${process.env.npm_package_version}</span>`</span> });
    <span class="hljs-keyword">await</span> interaction.editReply({ embeds: [helpEmbed] });
    <span class="hljs-keyword">return</span>;
  },
};
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Congratulations! You have successfully built a Discord bot for the 100 Days of Code challenge.</p>
<p>If you are interested in exploring further, you can view <a target="_blank" href="https://github.com/nhcarrigan/100-days-of-code-bot">the source code</a> for the live bot that inspired this tutorial, which includes custom error logging, external error reporting, and a documentation site.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Solve Coding Problems with a Simple Four Step Method ]]>
                </title>
                <description>
                    <![CDATA[ By Madison Kanna I had fifteen minutes left, and I knew I was going to fail. I had spent two months studying for my first technical interview.  I thought I was prepared, but as the interview came to a close, it hit me: I had no idea how to ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-solve-coding-problems/</link>
                <guid isPermaLink="false">66d8518c62a291dea89878dc</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interview tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Problem Solving ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 04 Feb 2021 18:33:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/01/iStock-527234840.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Madison Kanna</p>
<p>I had fifteen minutes left, and I knew I was going to fail.</p>
<p>I had spent two months studying for my first technical interview. </p>
<p>I thought I was prepared, but as the interview came to a close, it hit me: I had no idea how to solve coding problems. </p>
<p>Of all the tutorials I had taken when I was learning to code, not one of them had included an approach to solving coding problems. </p>
<p>I had to find a method for problem-solving—my career as a developer depended on it.</p>
<p>I immediately began researching methods. And I found one. In fact, what I uncovered was an invaluable strategy. It was a time-tested four-step method that was somehow under the radar in the developer ecosystem.</p>
<p>In this article, I’ll go over this four-step problem-solving method that you can use to start confidently solving coding problems. </p>
<p>Solving coding problems is not only part of the developer job interview process—it’s what a developer does all day. After all, <em>writing code is problem-solving.</em></p>
<h2 id="heading-a-method-for-solving-problems">A method for solving problems</h2>
<p>This method is from the book <em>How to Solve It</em> by George Pólya. It originally came out in 1945 and has sold over one million copies. </p>
<p>His problem-solving method has been used and taught by many programmers, from computer science professors (see Udacity’s Intro to CS course taught by professor David Evans) to modern web development teachers like Colt Steele.</p>
<p>Let’s walk through solving a simple coding problem using the four-step problem-solving method. This allows us to see the method in action as we learn it. We'll use JavaScript as our language of choice. Here’s the problem:</p>
<p>Create a function that adds together two numbers and returns that value.  </p>
<p>There are four steps to the problem-solving method:</p>
<ol>
<li>Understand the problem.</li>
<li>Devise a plan.</li>
<li>Carry out the plan.</li>
<li>Look back. </li>
</ol>
<p>Let’s get started with step one.</p>
<h2 id="heading-step-1-understand-the-problem">Step 1: Understand the problem.</h2>
<p>When given a coding problem in an interview, it’s tempting to rush into coding. This is hard to avoid, especially if you have a time limit. </p>
<p>However, try to resist this urge. Make sure you actually understand the problem before you get started with solving it.</p>
<p>Read through the problem. If you’re in an interview, you could read through the problem out loud if that helps you slow down. </p>
<p>As you read through the problem, clarify any part of it you do not understand. If you’re in an interview, you can do this by asking your interviewer questions about the problem description. If you’re on your own, think through and/or Google parts of the question you might not understand.</p>
<p><strong>This first step is vital as we often don’t take the time to fully understand the problem. When you don’t fully understand the problem, you’ll have a much harder time solving it.</strong></p>
<p>To help you better understand the problem, ask yourself:</p>
<h3 id="heading-what-are-the-inputs">What are the inputs?</h3>
<p>What kinds of inputs will go into this problem? In this example, the inputs are the arguments that our function will take. </p>
<p>Just from reading the problem description so far, we know that the inputs will be numbers. But to be more specific about what the inputs will be, we can ask:</p>
<p>Will the inputs always be just two numbers? What should happen if our function receives as input <em>three</em> numbers? </p>
<p>Here we could ask the interviewer for clarification, or look at the problem description further. </p>
<p>The coding problem might have a note saying, “You should only ever expect two inputs into the function.” If so, you know how to proceed. You can get more specific, as you’ll likely realize that you need to ask more questions on what kinds of inputs you might be receiving.</p>
<p>Will the inputs always be numbers? What should our function do if we receive the inputs “a” and “b”? Clarify whether or not our function will always take in numbers.</p>
<p>Optionally, you could write down possible inputs in a code comment to get a sense of what they’ll look like: </p>
<p><code>//inputs: 2, 4</code></p>
<p>Next, ask:</p>
<h3 id="heading-what-are-the-outputs">What are the outputs?</h3>
<p>What will this function return? In this case, the output will be one number that is the result of the two number inputs. Make sure you understand what your outputs will be.</p>
<h3 id="heading-create-some-examples">Create some examples.</h3>
<p>Once you have a grasp of the problem and know the possible inputs and outputs, you can start working on some concrete examples.</p>
<p>Examples can also be used as sanity checks to test your eventual problem. Most code challenge editors that you’ll work in (whether it’s in an interview or just using a site like Codewars or HackerRank) have examples or test cases already written for you. Even so, writing out your own examples can help you cement your understanding of the problem.</p>
<p>Start with a simple example or two of possible inputs and outputs. Let's return to our addition function.</p>
<p>Let’s call our function “add.”</p>
<p>What’s an example input? Example input might be:</p>
<p><code>// add(2, 3)</code> </p>
<p>What is the output to this? To write the example output, we can write: </p>
<p><code>// add(2, 3) ---&gt; 5</code></p>
<p>This indicates that our function will take in an input of 2 and 3 and return 5 as its output.</p>
<h3 id="heading-create-complex-examples">Create complex examples.</h3>
<p>By walking through more complex examples, you can take the time to look for edge cases you might need to account for.</p>
<p>For example, what should we do if our inputs are strings instead of numbers? What if we have as input two strings, for example, add('a', 'b')?</p>
<p>Your interviewer might possibly tell you to return an error message if there are any inputs that are not numbers. If so, you can add a code comment to handle this case if it helps you remember you need to do this.</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// return error if inputs are not numbers.</span>
</code></pre>
<p>Your interviewer might also tell you to assume that your inputs will always be numbers, in which case you don’t need to write any extra code to handle this particular input edge case.</p>
<p>If you don’t have an interviewer and you’re just solving this problem, the problem might say what happens when you enter invalid inputs. </p>
<p>For example, some problems will say, “If there are zero inputs, return undefined.” For cases like this, you can optionally write a comment.</p>
<p><code>// check if there are no inputs.</code></p>
<p><code>// If no inputs, return undefined.</code></p>
<p>For our purposes, we’ll assume that our inputs will always be numbers. But generally, it’s good to think about edge cases. </p>
<p>Computer science professor Evans says to write what developers call <em>defensive</em> code. Think about what could go wrong and how your code could defend against possible errors.  </p>
<p>Before we move on to step 2, let’s summarize step 1, understand the problem: </p>
<p><code>-Read through the problem.</code></p>
<p><code>-What are the inputs?</code></p>
<p><code>-What are the outputs?</code></p>
<p><code>Create simple examples, then create more complex ones.</code></p>
<h2 id="heading-2-devise-a-plan-for-solving-the-problem">2. Devise a plan for solving the problem.</h2>
<p>Next, devise a plan for how you’ll solve the problem. As you devise a plan, write it out in pseudocode. </p>
<p>Pseudocode is a plain language description of the steps in an algorithm. In other words, your pseudocode is your step-by-step plan for how to solve the problem.</p>
<p>Write out the steps you need to take to solve the problem. For a more complicated problem, you’d have more steps. For this problem, you could write:</p>
<p><code>// Create a sum variable.</code></p>
<p><code>Add the first input to the second input using the addition operator</code>.</p>
<p><code>// Store value of both inputs into sum variable.</code></p>
<p><code>// Return as output the sum variable.</code>  </p>
<p>Now you have your step-by-step plan to solve the problem.  </p>
<p>For more complex problems, professor Evans notes, “Consider systematically how a human solves the problem.” That is, forget about how your code might solve the problem for a moment, and think about how <em>you</em> would solve it as a human. This can help you see the steps more clearly.</p>
<h2 id="heading-3-carry-out-the-plan-solve-the-problem">3. Carry out the plan (Solve the problem!)</h2>
<p><img src="https://cdn.pixabay.com/photo/2017/04/06/15/02/hand-2208491_960_720.jpg" alt="Hand, Rubik, Cube, Puzzle, Game, Rubik Cube" width="960" height="540" loading="lazy"></p>
<p>The next step in the problem-solving strategy is to solve the problem. Using your pseudocode as your guide, write out your actual code. </p>
<p>Professor Evans suggests focusing on a simple, mechanical solution. The easier and simpler your solution is, the more likely you can program it correctly.</p>
<p>Taking our pseudocode, we could now write this:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span>(<span class="hljs-params">a, b</span>) </span>{
 <span class="hljs-keyword">const</span> sum = a + b;
 <span class="hljs-keyword">return</span> sum;
}
</code></pre>
<p>Professor Evans adds, remember not to <em>prematurely optimize.</em> That is, you might be tempted to start saying, “Wait, I’m doing this and it’s going to be inefficient code!”</p>
<p>First, just get out your simple, mechanical solution.</p>
<p>What if you can’t solve the entire problem? What if there's a part of it you still don't know how to solve? </p>
<p>Colt Steele gives great advice here: If you can’t solve part of the problem, ignore that hard part that’s tripping you up. Instead, focus on everything else that you can start writing. </p>
<p>Temporarily ignore that difficult part of the problem you don’t quite understand and write out the other parts. Once this is done, come back to the harder part.</p>
<p>This allows you to get at least <em>some</em> of the problem finished. And often, you’ll realize how to tackle that harder part of the problem once you come back to it.</p>
<h2 id="heading-step-4-look-back-over-what-youve-done">Step 4: Look back over what you've done.</h2>
<p>Once your solution is working, take the time to reflect on it and figure out how to make improvements. This might be the time you refactor your solution into a more efficient one. </p>
<p>As you look at your work, here are some questions Colt Steele suggests you ask yourself to figure out how you can improve your solution:</p>
<ul>
<li>Can you derive the result differently? What other approaches are there that are viable?</li>
<li>Can you understand it at a glance? Does it make sense?</li>
<li>Can you use the result or method for some other problem?</li>
<li>Can you improve the performance of your solution?</li>
<li>Can you think of other ways to refactor?</li>
<li>How have other people solved this problem?</li>
</ul>
<p>One way we might refactor our problem to make our code more concise: removing our variable and using an implicit return:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span>(<span class="hljs-params">a, b</span>) </span>{
 <span class="hljs-keyword">return</span> a + b;
}
</code></pre>
<p>With step 4, your problem might never feel finished. Even great developers still write code that they later look at and want to change. These are guiding questions that can help you.</p>
<p>If you still have time in an interview, you can go through this step and make your solution better. If you are coding on your own, take the time to go over these steps. </p>
<p>When I’m practicing coding on my own, I almost always look at the solutions out there that are more elegant or effective than what I’ve come up with. </p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>In this post, we’ve gone over the four-step problem-solving strategy for solving coding problems. </p>
<p>Let's review them here:</p>
<ul>
<li>Step 1: <strong>understand the problem.</strong> </li>
<li>Step 2: <strong>create a step-by-step plan for how you’ll solve it</strong>. </li>
<li>Step 3: <strong>carry out the plan</strong> and write the actual code. </li>
<li>Step 4: <strong>look back</strong> and possibly refactor your solution if it could be better.</li>
</ul>
<p>Practicing this problem-solving method has immensely helped me in my technical interviews and in my job as a developer.  </p>
<p>If you don't feel confident when it comes to solving coding problems, just remember that problem-solving is a skill that anyone can get better at with time and practice.</p>
<p>Good luck!</p>
<h3 id="heading-if-you-enjoyed-this-post-join-my-coding-clubhttpsmadisonkannaus14list-managecomsubscribepostu323fd92759e9e0b8d4083d008ampid033dfeb98f-where-we-tackle-coding-challenges-together-every-sunday-and-support-each-other-as-we-learn-new-technologies">If you enjoyed this post, join my <a target="_blank" href="https://madisonkanna.us14.list-manage.com/subscribe/post?u=323fd92759e9e0b8d4083d008&amp;id=033dfeb98f">coding club</a>, where we tackle coding challenges together every Sunday and support each other as we learn new technologies.</h3>
<h3 id="heading-if-you-have-feedback-or-questions-on-this-post-feel-free-to-tweet-me-madisonkannahttpstwittercommadisonkanna">If you have feedback or questions on this post, feel free to Tweet me <a target="_blank" href="https://twitter.com/Madisonkanna">@madisonkanna</a>.</h3>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Find the Additive Inverse of Each Number in JavaScript [CodeWars Challenge Solved] ]]>
                </title>
                <description>
                    <![CDATA[ By Madison Kanna In this tutorial, we'll go over how to solve the CodeWars invert values problem in JavaScript.  Instead of just diving into the code, we'll first read through the problem and make sure we understand it. Next we'll write pseudocode th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/find-the-additive-inverse-of-numbers-javascript/</link>
                <guid isPermaLink="false">66d8517d8da7a7c34f4c9219</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview questions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Math ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 12 Jan 2021 20:20:50 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/01/volkan-olmez-aG-pvyMsbis-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Madison Kanna</p>
<p>In this tutorial, we'll go over how to solve the CodeWars <a target="_blank" href="https://www.codewars.com/kata/5899dc03bc95b1bf1b0000ad/train/javascript">invert values</a> problem in JavaScript. </p>
<p>Instead of just diving into the code, we'll first read through the problem and make sure we understand it. Next we'll write pseudocode that we'll use as our guide to solve the problem. Lastly, we'll write the code itself. </p>
<p>Let's get started!</p>
<h2 id="heading-first-read-through-the-problem">First, Read Through the Problem</h2>
<p>Here's the problem description:</p>
<p><strong>Given a set of numbers, return the additive inverse of each. Each positive becomes negative, and the negatives become positives.</strong></p>
<p><strong>You can assume that all values are integers. Do not mutate the input array/list.</strong></p>
<p>To solve this problem, first we need to make sure we understand it. Let's go over some questions we can ask ourselves to help us understand this problem.</p>
<h2 id="heading-what-are-the-inputs">What are the inputs?</h2>
<p>What are the possible inputs to this problem? What will this function receive?</p>
<p>The problem description says, '<em>given a set of numbers.</em>' This tells us that our inputs are a set of numbers. </p>
<p>The problem also tells us to assume that all of these numbers will be integers. </p>
<p>Lastly, from the examples the problem gives, we can see that the set of numbers will be inside of an array:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Gathering this information, we can say that our input will be an array of integers.</p>
<h2 id="heading-what-are-the-outputs">What are the outputs?</h2>
<p>Next we can ask ourselves, what are the outputs?  What will this function return?</p>
<p>We can see from the problem's example that our output is an array with each number changed to its additive inverse.  </p>
<p>Now we know the inputs and output. Next we'll go over a few examples of the problem.</p>
<h2 id="heading-what-are-some-examples-of-the-inputs-and-outputs">What are some examples of the inputs and outputs?</h2>
<p>We already have examples of the inputs and outputs from the problem above, but sometimes it can be helpful to write out a few on your own to get a better grasp of what the problem is asking you to do. Here's one example output and input:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">//input</span>
[<span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">-4</span>]

<span class="hljs-comment">//ouput</span>
[<span class="hljs-number">-2</span>, <span class="hljs-number">-3</span>, <span class="hljs-number">4</span>]
</code></pre>
<p>Now we know our inputs and outputs, and we have some examples of them.</p>
<p>Now we're ready to move on to writing our pseudocode, the final step before we code out our solution. pseudocode is a plain language description of the steps in an algorithm. Pseudocode will help us create a plan for how we’ll solve this challenge. </p>
<p>To write our pseudocode, let's first break the problem down step by step.</p>
<h2 id="heading-how-to-break-the-problem-down">How to Break the Problem Down</h2>
<p>We need to be able to look at and do something to each number in the input array. We also want to return a new array with each number changed. </p>
<p>To do this, we can use the <code>map</code> method in JavaScript, which returns a new array populated with the results of calling a provided function on every element in the calling array.</p>
<p> We'll write this out in pseudocode as our step one: </p>
<pre><code class="lang-javascript"><span class="hljs-comment">//step one: go through each number in the array using map method</span>
</code></pre>
<p>For each number in the array, we want to change it to its additive inverse. We need to understand what this means, so we'll clarify the definition of an additive inverse:</p>
<p>In mathematics, the <strong>additive inverse</strong> of a number a is the number that, when added to a, yields zero. Here are a few examples:</p>
<p>The additive inverse of −10 is +10, because −10 + 10 = 0</p>
<p>The additive inverse of −2 is +2, because −2 + 2 = 0</p>
<p>To get the additive inverse of a number, we can multiply it by -1. We can test this with some examples:</p>
<p><code>10 * -1 = -10</code></p>
<p><code>-2 * -1 = 2</code></p>
<p>We now know that if we multiply each number by -1, we'll get that number's additive inverse. We can add this to our pseudocode:</p>
<pre><code><span class="hljs-comment">/* 
step one: go through each number in the array using the map method
step two: multiply each number by -1
*/</span>
</code></pre><p>Lastly, we need to return our new array. </p>
<pre><code><span class="hljs-comment">/* 
step one: go through each number in the array using the map method
step two: multiply each number by -1
step three: return new array
*/</span>
</code></pre><h2 id="heading-how-to-code-the-solution">How to Code the Solution</h2>
<p>Now that we've written our pseudocode, we can code our solution using it as our guide.</p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">invert</span>(<span class="hljs-params">array</span>) </span>{
   <span class="hljs-keyword">return</span> array.map(<span class="hljs-function"><span class="hljs-params">num</span> =&gt;</span>   {
     <span class="hljs-keyword">return</span> num * <span class="hljs-number">-1</span>
   })
}
</code></pre><p>When we test our solution on CodeWars, it works! We create our function, <code>invert</code>, that accepts an array of numbers. We map over our array, and for each number in it, we multiply it by -1. Then we return our new array.</p>
<p>We can see that it passes all tests. If we'd like to make our solution look a bit neater, we can do an implicit return and remove the inner curly brackets and inner <code>return</code> keyword. </p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">invert</span>(<span class="hljs-params">array</span>) </span>{
   <span class="hljs-keyword">return</span> array.map(<span class="hljs-function"><span class="hljs-params">num</span> =&gt;</span> num * <span class="hljs-number">-1</span>)
}
</code></pre><p>That's it! Now we've completed our invert values problem. We made sure we understood the problem first, wrote out our steps for completing the problem in pseudocode, and then coded the solution.</p>
<p>To check out the other solutions to this problem, you can see them <a target="_blank" href="https://www.codewars.com/kata/5899dc03bc95b1bf1b0000ad/solutions/javascript">here.</a> </p>
<h3 id="heading-thank-you-for-reading"><strong>Thank you for reading!</strong></h3>
<p>If you enjoyed this post, sign up for <a target="_blank" href="https://madisonkanna.us14.list-manage.com/subscribe/post?u=323fd92759e9e0b8d4083d008&amp;id=033dfeb98f">my email list</a> where I send out my latest articles and announce meetings for my coding book club.</p>
<p>If you have feedback or questions on this post, feel free to Tweet me @<a target="_blank" href="https://twitter.com/Madisonkanna">madisonkanna.</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Best Code Interview Prep Platforms in 2020 ]]>
                </title>
                <description>
                    <![CDATA[ By Daniel Borowski Software developer interviews are rapidly evolving. Years ago, mastering data structures and common algorithms was enough to ace an interview and get a job. Today though, employers want candidates with real-world experience and ski... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-best-code-interview-prep-platforms-in-2020/</link>
                <guid isPermaLink="false">66d45e087df3a1f32ee7f805</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview questions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interviewing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Interview ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 10 Jun 2020 16:22:31 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/06/interviewprepcover.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Daniel Borowski</p>
<p>Software developer interviews are rapidly evolving. Years ago, mastering data structures and common algorithms was enough to ace an interview and get a job. Today though, employers want candidates with real-world experience and skills. </p>
<p>That’s why many interviewers won’t even ask data structure or algorithm questions at all. Instead, they'll focus on proficiencies with full-stack technologies and collaboration skills. </p>
<p>Job seekers would be wise to practice code challenges and take mock interviews to make sure they’re prepared. There are countless books and resources, such as <a target="_blank" href="https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850">Cracking The Coding Interview</a>, and <a target="_blank" href="https://www.freecodecamp.org/news/the-8-most-popular-coding-challenge-websites-of-2020/">popular online code challenge websites</a>. </p>
<p>In addition to those resources, here are the best code interview prep platforms for developer candidates.</p>
<h2 id="heading-coderbyte">Coderbyte</h2>
<p>Helpful links: <a target="_blank" href="https://coderbyte.com/">Website</a> | <a target="_blank" href="https://coderbyte.com/#courses">Interview Prep</a> | <a target="_blank" href="https://medium.com/coderbyte">Blog</a> | <a target="_blank" href="https://coderbyte.com/member">Pricing</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Coderbyte-Interview-Kit.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Coderbyte, my website, is the only site to offer full-stack coding challenges, interview prep courses, and mock interviews. With 500+ challenges, articles, and videos across algorithm, front-end, and even database technologies, you can quickly assess and refine your skills for any role. We also showcase user-submitted and official solutions for all challenges.</p>
<h2 id="heading-interview-cake">Interview Cake</h2>
<p>Helpful links: <a target="_blank" href="https://www.interviewcake.com/">Website</a> | <a target="_blank" href="https://www.interviewcake.com/table-of-contents">Interview Prep</a> | <a target="_blank" href="https://www.interviewcake.com/coding-interview-beginner-faq">Blog</a> | <a target="_blank" href="https://www.interviewcake.com/upgrade">Pricing</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-9.04.01-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Frequently considered the best source for interview articles, tips, and content, Interview Cake is a crash course in getting a software development job. </p>
<p>They offer courses that are specific to leading technology companies, and provide guidance beyond solving coding problems, such as advice on how to effectively communicate with interviewers even when you don’t know the answer.</p>
<h2 id="heading-algoexpert">AlgoExpert</h2>
<p>Helpful links: <a target="_blank" href="https://www.algoexpert.io/product">Website</a> | <a target="_blank" href="https://www.algoexpert.io/questions">Interview Prep</a> | <a target="_blank" href="https://www.algoexpert.io/blog">Blog</a> | <a target="_blank" href="https://www.algoexpert.io/purchase">Pricing</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-9.06.42-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>AlgoExpert is one of the original coding challenge websites. The site offers tons of video tutorials, certifications, and interview tips. Their interview prep includes a selection of 100 challenges across all types of technologies and roles.</p>
<h2 id="heading-interviewingio">Interviewing.io</h2>
<p>Helpful links: <a target="_blank" href="https://interviewing.io/">Website</a> | <a target="_blank" href="https://interviewing.io/recordings">Interview Prep</a> | <a target="_blank" href="https://blog.interviewing.io/">Blog</a> | <a target="_blank" href="https://interviewing.io/faq/">Pricing</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-9.08.44-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Interviewing.io takes a very unique approach to coding interview prep. Rather than providing content and practice coding challenges, Interviewing.io has a library of actual video interviews that you can watch, and you can pay to anonymously take a mock interview with an engineering hiring manager. </p>
<p>You may still need to practice coding on another site, but this is a great investment to get actionable feedback.</p>
<h2 id="heading-leetcode">Leetcode</h2>
<p>Helpful links: <a target="_blank" href="https://leetcode.com/">Website</a> | <a target="_blank" href="https://leetcode.com/interview/">Interview Prep</a> | <a target="_blank" href="https://leetcode.com/articles/">Blog</a> | <a target="_blank" href="https://leetcode.com/subscribe/">Pricing</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-8.59.53-PM.png" alt="Leetcode platform" width="600" height="400" loading="lazy"></p>
<p>Like Coderbyte and AlgoExpert, Leetcode is one of the original coding challenge websites. They offer many interview prep courses for tech companies and roles, and display the average scores for different cohorts of developers so you can easily benchmark.</p>
<h2 id="heading-hackerearth">HackerEarth</h2>
<p>Helpful links: <a target="_blank" href="https://www.hackerearth.com/for-developers">Website</a> | <a target="_blank" href="https://www.hackerearth.com/practice/interviews/">Interview Prep</a> | <a target="_blank" href="https://www.hackerearth.com/blog/developers/">Blog</a> | Pricing: all content free</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-8.57.52-PM.png" alt="HackerEarth platform" width="600" height="400" loading="lazy"></p>
<p>Famous for their coding competitions and hackathons, HackerEarth recently launched a feature for mock interviews. </p>
<p>They have a massive community of international developers and companies, so this is a great site if you are also looking to connect with a potential employer.</p>
<h2 id="heading-hackerrank">HackerRank</h2>
<p>Helpful links: <a target="_blank" href="https://www.hackerrank.com/dashboard">Website</a> | <a target="_blank" href="https://www.hackerrank.com/interview/interview-preparation-kit">Interview Prep</a> | <a target="_blank" href="https://blog.hackerrank.com/">Blog</a> | Pricing: all content free</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screen-Shot-2020-06-07-at-9.04.51-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Known for their recruiting tools, HackerRank also offers code challenges and interview prep for developers. There's no premium version, so you can access their strong library of challenges for free. It’s a good place to start for a job seeker that isn’t sure yet if they are ready to invest in premium interview prep.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The 8 Best Coding Challenge Websites to Help You Level Up Your Skills in 2020 ]]>
                </title>
                <description>
                    <![CDATA[ By Daniel Borowski Despite the lowest unemployment rate in decades, analysts expect technology hiring to continue growing steadily into the 2020s.  That’s great news for recent computer science graduates and developers currently working in the field,... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-8-most-popular-coding-challenge-websites-of-2020/</link>
                <guid isPermaLink="false">66d45e067df3a1f32ee7f801</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 20 May 2020 11:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/codingchallenge2020.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Daniel Borowski</p>
<p>Despite the lowest unemployment rate in decades, <a target="_blank" href="https://www.techrepublic.com/article/tech-jobs-will-see-steady-growth-through-2023/">analysts expect</a> technology hiring to continue growing steadily into the 2020s. </p>
<p>That’s great news for recent computer science graduates and developers currently working in the field, but that doesn’t mean ambitious engineers can get complacent. </p>
<p>While there will likely be growth opportunities in the market overall, there are still significant changes happening all the time, and a sense of urgency to keep up with the latest trends.</p>
<p>Today, there are more types of technical roles than ever before, and a continued proliferation of new languages, frameworks, and technologies. Technical employees that want to get ahead should routinely test and refine their skills. </p>
<p>To that end, I’ve put together the following list of platforms where you can level up your skills for any number of roles, from data science to developer operations.</p>
<h1 id="heading-1-freecodecamp"><strong>1. freeCodeCamp</strong></h1>
<p>Helpful links: <a target="_blank" href="https://www.freecodecamp.org/learn">Website</a> | <a target="_blank" href="https://www.freecodecamp.org/forum/">Forum</a> | <a target="_blank" href="https://www.freecodecamp.org/learn/coding-interview-prep/data-structures/typed-arrays">Challenges</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/freecodecamp-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's begin with freeCodeCamp, which is a great website for beginners who are just getting into coding. They offer all sorts of resources on learning syntax, practicing coding, building projects, and preparing for interviews. </p>
<p>They don’t have as many interactive coding challenges as other sites, but they do offer some fun <a target="_blank" href="https://www.freecodecamp.org/learn/">challenges</a> and interview prep for beginners learning JavaScript.</p>
<h3 id="heading-great-for">Great for</h3>
<p>Novices who are just learning to code for the first time. It’s a great place to learn HTML, CSS, and JavaScript in a fun, interactive way.</p>
<h3 id="heading-pricing-premium-content">Pricing / Premium content</h3>
<p>freeCodeCamp is completely free.</p>
<h1 id="heading-2-coderbyte"><strong>2. Coderbyte</strong></h1>
<p>Helpful links: <a target="_blank" href="https://coderbyte.com/">Website</a>| <a target="_blank" href="https://medium.com/coderbyte">Blog</a> | <a target="_blank" href="https://dev.to/coderbyte">Dev.to</a> | <a target="_blank" href="https://coderbyte.com/challenges">Free Challenges</a> | <a target="_blank" href="https://coderbyte.com/member">Premium</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/coderbyte-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>My platform, Coderbyte, provides 300+ coding challenges you can solve in an online editor using 10 different programming languages. You can then access official solutions, over 1.5 million user solutions, and read articles on how to efficiently solve the challenges. </p>
<p>Coderbyte is recommended by the top <a target="_blank" href="https://getcoding.hackreactor.com/coderbyte/">coding bootcamps</a> and companies because of its collection of interview prep challenges.</p>
<h3 id="heading-great-for-1">Great for</h3>
<p>Coderbyte is perfect for people in the beginner-to-intermediate phase of their careers who are preparing for interviews. There is a library of harder challenges as well for those who like to solve coding problems for fun, but this isn’t primarily a site for competitive programmers.</p>
<h3 id="heading-pricing-premium-content-1">Pricing / Premium content</h3>
<p>There are a handful of free challenges on Coderbyte, and then there are hundreds of premium challenges and over 1 million user solutions that are available to <a target="_blank" href="https://coderbyte.com/member">members</a>.</p>
<h1 id="heading-3-leetcode"><strong>3. LeetCode</strong></h1>
<p>Helpful links: <a target="_blank" href="https://leetcode.com/">Website</a> | <a target="_blank" href="https://leetcode.com/discuss/interview-question?currentPage=1&amp;orderBy=hot&amp;query=">Discussion</a> | <a target="_blank" href="https://leetcode.com/problemset/all/">Free Challenges</a> | <a target="_blank" href="https://leetcode.com/subscribe/">Premium</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/leetcode-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>LeetCode has a collection of some of the best algorithm challenges online today. The topics they cover require knowledge of data structures such as binary trees, heaps, linked lists, and so on, which is why their challenges are a bit more advanced than some other websites. But the challenges are great if used to prepare for a software engineering interview.</p>
<p>They also have a <a target="_blank" href="https://leetcode.com/interview/">Mock Interview</a> section that is specifically for job interview preparation. They also host their own <a target="_blank" href="https://leetcode.com/contest/">coding contests</a>, and they have a great <a target="_blank" href="https://leetcode.com/discuss/interview-question?currentPage=1&amp;orderBy=hot&amp;query=">discussion board</a> where people talk about interview questions, jobs, compensation, and other topics related to engineering.</p>
<h3 id="heading-great-for-2">Great for</h3>
<p>LeetCode is great for intermediate-to-advanced programmers. It might not be the best suited for brand new coders who don’t know how to write basic loops yet, but once you learn the fundamentals this is a great site to practice coding.</p>
<h3 id="heading-pricing-premium-content-2">Pricing / Premium content</h3>
<p>There are free challenges available on LeetCode, and they also have a <a target="_blank" href="https://leetcode.com/subscribe/">premium</a> subscription which gets you access to more challenges and other features of the platform.</p>
<h1 id="heading-4-edabit"><strong>4. Edabit</strong></h1>
<p>Helpful links: <a target="_blank" href="https://edabit.com/">Website</a> | <a target="_blank" href="https://dev.to/edabit">Blog</a> | <a target="_blank" href="https://edabit.com/challenges">Challenges</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/edabit-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is the first time Edabit is appearing on our top sites list (<a target="_blank" href="https://medium.com/coderbyte/the-10-best-coding-challenge-websites-for-2018-12b57645b654">2018 list</a>, <a target="_blank" href="https://www.freecodecamp.org/news/the-10-most-popular-coding-challenge-websites-of-2016-fb8a5672d22f/">2017 list</a>)! It has grown in popularity over the last year, and developers seem to really enjoy the challenges. They offer a large collection of over 4,000 challenges that can be solved online in one of several languages. </p>
<p>The site currently only offers online interactive coding challenges — there aren’t any discussion boards, articles, user solutions, or mock interviews like other sites offer, but over time they might be adding some of these.</p>
<h3 id="heading-great-for-3">Great for</h3>
<p>Edabit is great for beginners looking to practice their coding skills daily by solving bite-sized challenges. Once you reach the intermediate stage, other sites provide harder challenges and more content geared towards competitive programming and job interviews.</p>
<h3 id="heading-pricing-premium-content-3">Pricing / Premium content</h3>
<p>All the challenges on Edabit are free, and there is no premium pricing option.</p>
<h1 id="heading-5-codewars"><strong>5. Codewars</strong></h1>
<p>Helpful links: <a target="_blank" href="https://www.codewars.com/">Website</a> | <a target="_blank" href="https://medium.com/@Codewars">Blog</a> | <a target="_blank" href="https://www.codewars.com/kata/latest/my-languages">Free Challenges</a> | <a target="_blank" href="https://www.codewars.com/subscribe">Premium</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/codewars-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Codewars provides a large collection of coding challenges submitted and edited by their own community. You can solve the challenges directly online in their editor using 20+ programming languages. You can view a discussion for each challenge as well as user solutions. You can earn points and climb the rankings by solving their challenges.</p>
<h3 id="heading-great-for-4">Great for</h3>
<p>Codewars is great for people in the beginner-to-intermediate phase. The challenges are created by the community so you get exposed to a lot of different types of coding challenges.</p>
<h3 id="heading-pricing-premium-content-4">Pricing / Premium content</h3>
<p>They offer all of their challenges created by the community for free, and their <a target="_blank" href="https://www.codewars.com/subscribe">premium</a> subscription gets you access to some cool features on their platform.</p>
<h1 id="heading-6-hackerrank"><strong>6. HackerRank</strong></h1>
<p>Helpful links: <a target="_blank" href="https://www.hackerrank.com/">Website</a> | <a target="_blank" href="https://blog.hackerrank.com/">Blog</a> | <a target="_blank" href="https://www.hackerrank.com/dashboard">Challenges</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/hackerrank-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>HackerRank has a large collection of coding challenges tailored towards algorithms and data structures, along with interview prep material, a discussion board for each challenge, and a list of top user solutions. They have challenges for other topics as well like functional programming, AI, Shell, SQL, and more.</p>
<h3 id="heading-great-for-5">Great for</h3>
<p>HackerRank is great for intermediate-to-advanced programmers who have already picked up the basics of a language and are ready to solve more complicated problems. The challenges are written with mathematical notation and can sometimes be a little confusing, which is why it might not be so great for beginner developers.</p>
<h3 id="heading-pricing-premium-content-5">Pricing / Premium content</h3>
<p>All the challenges on HackerRank are free, and there is no premium pricing option.</p>
<h1 id="heading-7-topcoder"><strong>7. TopCoder</strong></h1>
<p>Helpful links: <a target="_blank" href="https://www.topcoder.com/">Website</a> | <a target="_blank" href="https://www.topcoder.com/blog/">Blog</a> | <a target="_blank" href="https://www.topcoder.com/challenges">Challenges</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/topcoder-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>TopCoder is one of the original platforms for competitive programming online. It provides a list of algorithmic <a target="_blank" href="https://www.topcoder.com/challenges">challenges</a> from past competitions that you can complete on your own directly online using their code editor. </p>
<p>Their popular Single Round Matches are offered a few times per month at a specific time where you compete against others to solve challenges. Here are some <a target="_blank" href="https://www.topcoder.com/community/competitive-programming/tutorials/">topics</a> that their challenges may cover.</p>
<p>Aside from solving challenges for fun online, they offer <a target="_blank" href="https://www.topcoder.com/challenges/30111105">sponsored</a> competitions where you can win prizes for writing the best solution.</p>
<h3 id="heading-great-for-6">Great for</h3>
<p>TopCoder is better suited for advanced programmers who are comfortable solving algorithm challenges dealing with advanced topics like graph search and number theory.</p>
<h3 id="heading-pricing-premium-content-6">Pricing / Premium content</h3>
<p>All the challenges on TopCoder are free, and there is no premium pricing option.</p>
<h1 id="heading-8-codeforces"><strong>8. Codeforces</strong></h1>
<p>Helpful links: <a target="_blank" href="https://codeforces.com/">Website</a> | <a target="_blank" href="https://codeforces.com/groups">Discussion</a> | <a target="_blank" href="https://codeforces.com/problemset">Challenges</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/codeforces-hero.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Codeforces is now probably the top competitive programming website (a few years ago TopCoder was where most competitive programmers spent their time). </p>
<p>There are <a target="_blank" href="https://codeforces.com/problemset">problems</a> that you can solve online to practice, but there’s no online editor. Rather, you write your solution in your own editor and then upload it to their system which then tests your code against a suite of test cases.</p>
<p>They also frequently hold <a target="_blank" href="https://codeforces.com/contests">contests</a> where the best competitive programmers take part in.</p>
<h3 id="heading-great-for-7">Great for</h3>
<p>Advanced and competitive programmers who truly enjoy solving difficult algorithm challenges.</p>
<h3 id="heading-pricing-premium-content-7">Pricing / Premium content</h3>
<p>All the challenges on Codeforces are free, there is no premium pricing option.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Want to Improve Your Coding Skills? Join the #7Days7Websites Coding Challenge ]]>
                </title>
                <description>
                    <![CDATA[ By Florin Pop I believe that one of the best ways to improve your coding skills is to CODE MORE! For that I have the perfect challenge for you! ? It's called: #7Days7Websites The main rule is simple: build one website, every day, for a week. Here is ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-7days7websites-coding-challenge/</link>
                <guid isPermaLink="false">66d45f1738f2dc3808b7909b</guid>
                
                    <category>
                        <![CDATA[ 7Days7Websites ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 27 Mar 2020 09:12:31 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/03/Build-7-Websites-in-7-Day.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Florin Pop</p>
<p>I believe that one of the best ways to improve your coding skills is to CODE MORE!</p>
<p>For that I have the perfect challenge for you! ?</p>
<p>It's called: <strong>#7Days7Websites</strong></p>
<p>The main rule is simple: build one website, every day, for a week.</p>
<p>Here is a short video I made to explain everything in more detail:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/CBs47S91ofM" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>You can find the official website <a target="_blank" href="https://7days7websites.glitch.me/">here</a>.</p>
<h2 id="heading-rules">Rules</h2>
<ul>
<li>Create a website every day for a week.</li>
<li>You can use any programming language and/or any framework you want.</li>
<li>The website can be on any topic.</li>
<li>Submit your entries on the <a target="_blank" href="https://7days7websites.glitch.me/submit">submit</a> page.</li>
<li>Share your progress on Social Media using the <strong>#7Days7Websites</strong> hashtag.</li>
</ul>
<h2 id="heading-live-streams">Live Streams</h2>
<p>I'm also going to attempt this challenge in a series of Live Streams on my <a target="_blank" href="https://youtube.com/florinpop">YouTube Channel</a>. Subscribe if you want to get notified when I go live.</p>
<h2 id="heading-suggestions">Suggestions</h2>
<p>Anyone is free to build anything they want, but if you don't have an idea or you want some inspiration, here are some of the websites that could help:</p>
<ul>
<li><a target="_blank" href="https://frontendmentor.io/?ref=florinpop">Frontend Mentor</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/">freeCodeCamp</a></li>
<li><a target="_blank" href="https://github.com/florinpop17/app-ideas">App Ideas Repository</a></li>
</ul>
<h2 id="heading-showcase">Showcase</h2>
<p>At the end of these 7 days I'm going to make a <strong>Special</strong> Live Stream where I'm going to showcase the best submissions.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope this challenge will get the best out of you and it will help you improve your coding skills! ?</p>
<p>Happy Coding! ?</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ I Finished the Entire freeCodeCamp Curriculum in 1 Month (and Recorded Everything) ]]>
                </title>
                <description>
                    <![CDATA[ By Florin Pop One month ago I embarked on a challenge that many people told me was insane. I set out to conquer the entire freeCodeCamp curriculum. All while live streaming everything on my YouTube channel. 29 days, 56 Live Streams and 72 hours of li... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/i-completed-the-entire-freecodecamp-curriculum-in-a-month-while-recording-everything/</link>
                <guid isPermaLink="false">66d45f07706b9fb1c166b93d</guid>
                
                    <category>
                        <![CDATA[ challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 17 Mar 2020 05:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/03/max-duzij-qAjJk-un3BI-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Florin Pop</p>
<p>One month ago I embarked on a challenge that many people told me was insane. I set out to conquer the entire freeCodeCamp curriculum. All while live streaming everything on my <a target="_blank" href="https://youtube.com/florinpop?sub_confirmation=1">YouTube channel</a>.</p>
<p><strong>29 days</strong>, <a target="_blank" href="https://www.youtube.com/playlist?list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH"><strong>56 Live Streams</strong></a> and <strong>72 hours of live streams</strong> later...</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/florinpop1705/status/1239243340358520832"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h2 id="heading-first-a-disclaimer">First a Disclaimer</h2>
<p>I'm a professional software engineer. I've been coding since 2013. And I had previous experience working with all of the technologies covered in freeCodeCamp's curriculum. </p>
<p>So this was easier for me than it would be for people who are just starting out. Most people spend months or even years earning these certifications.</p>
<p>Remember: It's not about how much time it takes you to complete freeCodeCamp's curriculum – it's about what you are learning along the way.</p>
<p>I created this series as a guide for anyone who gets stuck during the curriculum, and wants to watch how a relatively experienced software engineer would solve challenges and build projects.</p>
<p>This series of 72 hours of video covers the following topics:</p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>Flexbox</li>
<li>CSS Grid</li>
<li>JavaScript</li>
<li>Bootstrap</li>
<li>React</li>
<li>Redux</li>
<li>NodeJS</li>
<li>Express</li>
<li>MongoDB</li>
<li>Mongoose</li>
<li>and more... </li>
</ul>
<p>And I also build <strong>30 projects</strong> along the way. </p>
<p>Below you'll find a list with all the videos nicely structured by certifications. ?</p>
<h1 id="heading-how-did-this-crazy-month-of-my-life-get-started">How did this crazy month of my life get started?</h1>
<p>I've been planning to do this challenge for a while now. But it always seemed to be a HUGE one, which would take a lot of time to complete.</p>
<p>Apparently it didn't take months, as I initially thought. (And I'll tell you why in a moment.)</p>
<p>Before I started this challenge I ran the idea by freeCodeCamp's founder <a target="_blank" href="https://twitter.com/ossia">Quincy Larson</a> to see whether he thought that this was something that could benefit the developer community. He was very encouraging. </p>
<p>freeCodeCamp has a "learn in public" culture, and a lot of people post their projects on the forum and on GitHub for feedback. And an increasing number of people live-stream themselves building these projects, too.</p>
<p>Quincy said not to worry about "spoiling" any of the challenges or projects. These are all the equivalent of "open notes tests." Students must write their own code, but they can look at other people's solutions for inspiration if they want.</p>
<h1 id="heading-why-did-i-choose-freecodecamps-certifications-for-this-challenge">Why Did I Choose freeCodeCamp's Certifications for This Challenge?</h1>
<p>I have always recommended freeCodeCamp's curriculum to people who want to start learning web development.</p>
<p>Why? Well, the answer is very simple: it's the <strong>best free resource</strong> to get up and running with web development, in my opinion.</p>
<p>Now, even though it's a very good resource, people tend to quit along the way because they start to hit different roadblocks... and that's sad. ?</p>
<p>We want more people to finish the curriculum!</p>
<p>And here is where the <a target="_blank" href="https://www.youtube.com/playlist?list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH">Conquering freeCodeCamp's Curriculum challenge</a> starts to shine. It gives everyone a <a target="_blank" href="https://www.youtube.com/playlist?list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH">follow-along playlist</a> of videos in which I personally go through the entire curriculum, explaining what I'm thinking with each step I take. I also added my own comments and "bonus" explanations.</p>
<p>Every section on freeCodeCamp is covered in a single video. There are a total of 56 videos. (See below for a list of all the videos.)</p>
<h1 id="heading-my-background-and-experience">My background and experience</h1>
<p>I started learning how to code back in 2013. Since then I've worked as a freelance developer and held multiple software engineering jobs.</p>
<p>Last year I started to write articles <a target="_blank" href="https://florin-pop.com">on my blog</a>. I also started creating <a target="_blank" href="https://youtube.com/florinpop?sub_confirmation=1">YouTube coding tutorials</a>. <em> Feel free to subscribe if you like these type of videos </em> ?.</p>
<p>It is safe to say that I already knew most of what you would learn on the platform, which gave me an advantage on conquering the curriculum in a month.</p>
<p>But, don't let this intimidate you. No matter your experience – no matter if it takes you years to finish the curriculum, just do it. I promise that you won't regret doing it.</p>
<p>I also worked A LOT to put out these Live Streams. Some days I recorded more than 5 hours. One day I even did 8 live streams and ended up completing an entire certification just in that day. ?</p>
<p>Why did I do that?</p>
<p>Well... most people would say that I'm either crazy or a robot.</p>
<p>I'm not a robot. But maybe a bit crazy? Yes. ?</p>
<p>The reason I pushed so hard was because I had plans to go on a vacation. And I wanted to have this all out before going. (Well... the vacation got canceled due to the Coronavirus outbreak. But I'm still happy to have gotten all this done.)</p>
<p>Also probably because I was excited about setting a new world record by finishing the whole curriculum in a single month.</p>
<h1 id="heading-conquering-freecodecamp-all-the-recordings">Conquering freeCodeCamp - All the Recordings</h1>
<p>Below you can find a list with all of the recordings – 56 in total.</p>
<p>Keep in mind that all of these were recorded in a series of live streams, so you might hear me answer questions received during the live stream from the chat. I also take breaks to do some deep thinking and even struggle to figure out some of the solutions (I'm not a robot after all ?). </p>
<p>All of this is perfectly normal for software developers. When devs get stuck, they often get up and take a break for a few hours – even a day. This can help you re-approach the problem with a fresh perspective.</p>
<p>I built all the projects on live streams (instead of just pre-recording) because I wanted it to be as close to real life as possible. I think this will be of greater value to you than me just walking you through my solutions.</p>
<p>I also created a <a target="_blank" href="https://discord.gg/qSse3Ey">Discord</a> chat room server if you want to socialize with other people who are attempting this same freeCodeCamp curriculum challenge.</p>
<p>All right, enough talk. Here are all of the recordings. Enjoy! ?</p>
<h2 id="heading-responsive-web-design-certification">Responsive Web Design Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=pACOweChpEU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=2&amp;t=0s">Basic HTML and HTML5 - Live Stream #1</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=8qmpMXqImds&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=3&amp;t=0s">Basic CSS - Live Stream #2</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=YBCSKVczKak&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=4&amp;t=0s">Applied Visual Design - Live Stream #3</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=WYokBX7rS8U&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=5&amp;t=0s">Accessibility and RWD Principles - Live Stream #4</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=39EI97boIDo&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=6&amp;t=0s">Flexbox and CSS Grid - Live Stream #5</a></p>
<h3 id="heading-projects">Projects</h3>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=Xph-t4XguJU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=7&amp;t=0s">Build a Tribute Page (for Brad Traversy) - Live Stream #6</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=8KF-IDkraNk&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=8&amp;t=0s">Build a Survey Form - Live Stream #7</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=fQ67kd4uEwc&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=9&amp;t=0s">Build a Product Landing Page - Live Stream #8</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=Nc7IWgXyFn0&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=10&amp;t=0s">Build a Technical Documentation Page - Live Stream #9</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=OY5ISdymgiY&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=11&amp;t=0s">Build a Personal Portfolio Webpage - Live Stream #10</a></p>
<h2 id="heading-javascript-algorithms-and-data-structures-certification">JavaScript Algorithms and Data Structures Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=ZCZ2u14xsS4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=12&amp;t=0s">Basic JavaScript (Part 1) - Live Stream #11</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=lkOXlVgKHYM&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=13&amp;t=0s">Basic JavaScript (Part 2) - Live Stream #12</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=BGhLIJbRHEg&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=14&amp;t=0s">JavaScript ES6 - Live Stream #13</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=plHUh4WkTl4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=15&amp;t=0s">Regular Expressions - Live Stream #14</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=wnLxONk3STk&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=16&amp;t=0s">JavaScript Debugging - Live Stream #15</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=SApcu0UdaUc&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=17&amp;t=0s">JavaScript Basic Data Structures - Live Stream #16</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=lRLFPrfieg4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=18&amp;t=0s">JavaScript Basic Algorithm Scripting - Live Stream #17</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=V4dysk2KHZc&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=19&amp;t=0s">JavaScript OOP - Live Stream #18</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=sphWyHUEcDk&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=20&amp;t=0s">JavaScript Functional Programming - Live Stream #19</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=jSWT8myUYEY&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=21&amp;t=0s">JavaScript Intermediate Algorithm Scripting (Part 1) - Live Stream #20</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=M94XFUfu2zk&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=22&amp;t=0s">JavaScript Intermediate Algorithm Scripting (Part 2) - Live Stream #21</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=V6NQurpvBfs&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=23&amp;t=0s">JavaScript Algorithms and Data Structures Projects - Live Stream #22</a></p>
<h2 id="heading-front-end-libraries-certification">Front End Libraries Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=ceI6TN_fuWI&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=24&amp;t=0s">CSS Bootstrap - Live Stream #23</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=njzRS5j9khg&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=25&amp;t=0s">jQuery - Live Stream #24</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=aBuu4JOVulM&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=26&amp;t=0s">SASS - Live Stream #25</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=e0tYvYjXWcM&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=27&amp;t=0s">ReactJS - Live Stream #26</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=ox5Jwcl6Yn8&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=28&amp;t=0s">Redux - Live Stream #27</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=Ari-W0aAF_E&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=29&amp;t=0s">React and Redux - Live Stream #28</a></p>
<h3 id="heading-projects-1">Projects</h3>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=iGWei_0EJIc&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=30&amp;t=0s">Build a Random Quote Machine - Live Stream #29</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=CJt7uZD_iK0&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=31&amp;t=0s">Build a Markdown Previewer - Live Stream #30</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=gXUshKPc-_g&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=32&amp;t=0s">Build a Drum Machine - Live Stream #31</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=NGOzAaJRPQU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=33&amp;t=0s">Build a Calculator - Live Stream #32</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=5rz6XbrCqt0&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=34&amp;t=0s">Build a Pomodoro Clock - Live Stream #33</a></p>
<h2 id="heading-data-visualization-certification">Data Visualization Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=0A13fmfi1VA&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=35&amp;t=0s">Data Visualization with D3 - Live Stream #34</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=wT7OYkXtU5s&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=36&amp;t=0s">JSON APIs and Ajax - Live Stream #35</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=sKZVaqCEvNE&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=37&amp;t=0s">Visualize Data with a Bar Chart - Live Stream #36</a></p>
<h3 id="heading-projects-2">Projects</h3>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=eSd47rSgfJw&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=38&amp;t=0s">Visualize Data with a Scatterplot Graph - Live Stream #37</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=ugboq8WA7O4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=39&amp;t=0s">Visualize Data with a Heat Map - Live Stream #38</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=j2UdrV8-3yw&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=40&amp;t=0s">Visualize Data with a Choropleth Map - Live Stream #39</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=DB_DunPM7wU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=41&amp;t=0s">Visualize Data with a Treemap Diagram - Live Stream #40</a></p>
<h2 id="heading-apis-and-microservices-certification">APIs and Microservices Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=yMvflePvMzs&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=42&amp;t=0s">Managing Packages with NPM - Live Stream #41</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=JdptOCfUV-I&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=43&amp;t=0s">Basic Node and Express - Live Stream #42</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=0p6cwefbBEU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=44&amp;t=0s">Mongo and Mongoose - Live Stream #43</a></p>
<h3 id="heading-projects-3">Projects</h3>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=iUgzevvlyi4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=45&amp;t=0s">Timestamp Microservice - Live Stream #44</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=hXD4k1Dk__M&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=46&amp;t=0s">Request Header Parser Microservice - Live Stream #45</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=rrju_1XH8Z8&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=47&amp;t=0s">URL Shortener Microservice - Live Stream #46</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=E68FWyktDwA&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=48&amp;t=0s">Exercise Tracker - Live Stream #47</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=cyZNFdfoM-o&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=49&amp;t=0s">File Metadata Microservice - Live Stream #48</a></p>
<h2 id="heading-information-security-and-quality-assurance-certification">Information Security and Quality Assurance Certification</h2>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=4Oa5re46jyM&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=50&amp;t=0s">Information Security with HelmetJS - Live Stream #49</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=AQiF3KBsmCs&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=51&amp;t=0s">Quality Assurance and Testing with Chai - Live Stream #50</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=1AzzAv8YU6Q&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=52&amp;t=0s">Advanced Node and Express - Live Stream #51</a></p>
<h3 id="heading-projects-4">Projects</h3>
<p>  <a target="_blank" href="https://www.youtube.com/watch?v=9lTxnyv3WCc&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=53&amp;t=0s">Metric-Imperial Converter - Live Stream #52</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=FW5X8SyGzaE&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=54&amp;t=0s">Issue Tracker - Live Stream #53</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=6wIYBmhA8i4&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=55&amp;t=0s">Personal Library - Live Stream #54</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=mi7PBL2AiOU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=56&amp;t=0s">Stock Price Checker - Live Stream #55</a>
  <a target="_blank" href="https://www.youtube.com/watch?v=0Xwt3ExBODU&amp;list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH&amp;index=57&amp;t=0s">Anonymous Message Board - Live Stream #56</a></p>
<h1 id="heading-whats-next-for-me">What's next for me?</h1>
<p>I will continue to create coding tutorials on my <a target="_blank" href="https://youtube.com/florinpop">YouTube Channel</a>. One of my main goals for 2020 is to reach 100,000 subscribers. (A crazy goal, I know, but... I think it's possible. What do you think? ?)</p>
<p>I'm also waiting for freeCodeCamp to release <a target="_blank" href="https://www.freecodecamp.org/news/python-curriculum/">the 4 new Python certifications</a>. Then I will work through those as a series of live streams, too.</p>
<p>Along with these, you'll also find me doing other live coding series.<br>My latest series is called <a target="_blank" href="https://www.youtube.com/playlist?list=PLgBH1CvjOA606dw0WEeRayWo1OYYdA6f1">CodeWars.js</a>. If you want to learn more about how to solve different coding challenges using JavaScript, this is for you!</p>
<p>Feel free to subscribe to my YouTube channel if you want to follow along with my journey. You can also <a target="_blank" href="https://twitter.com/florinpop1705">follow me on Twitter</a>. I'm pretty active there.</p>
<p>I hope you found this article interesting.</p>
<p>Happy Coding! ?</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I Plan to Conquer the freeCodeCamp Curriculum ]]>
                </title>
                <description>
                    <![CDATA[ By Florin Pop I Love Challenges! They keep me going. They motivate me. They help me become a better version of myself! Over the past 2 years I've been doing multiple "crazy" challenges.    I started in September 2018 with the run everyday for 365 day... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/conquering-the-freecodecamp-curriculum/</link>
                <guid isPermaLink="false">66d45eddc7632f8bfbf1e42a</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 25 Feb 2020 19:07:41 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9c67740569d1a4ca31f5.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Florin Pop</p>
<p>I Love Challenges! They keep me going. They motivate me. They help me become a better version of myself!</p>
<p>Over the past 2 years I've been doing multiple "crazy" challenges.   </p>
<p>I started in September 2018 with the <strong>run everyday for 365 days</strong> challenge. I completed this challenge and even did a little extra, ending up with <strong>422 consecutive days of running</strong>! I also uploaded a photo to my personal Facebook page every day. Social proof - this helped me to keep going.</p>
<p>Last year, considering that I'm also a programmer, I thought to do some sort of programming challenge. #100DaysOfCode is cool but it wasn't at the level I was looking for... I wanted something bigger! So...  </p>
<p>I started and completed the <strong><a target="_blank" href="https://www.florin-pop.com/blog/2019/09/100-days-100-projects">#100Days100Projects</a></strong> challenge, creating one project every single day for 100 days. People really enjoyed it! ?  </p>
<p>Then, I started <a target="_blank" href="https://youtube.com/florinpop">my YouTube channel</a> and I planned to "go big or go home" with it. So I thought... ?</p>
<p>"I have to find something big. Something interesting...<br>I have to create content. A LOT of content!"<br>(at this point you are probably used to my way of thinking already ?)  </p>
<p>So... This year on Jan 1st I started the <strong><a target="_blank" href="https://www.florin-pop.com/blog/created-a-video-a-day-for-a-month/">#31Days31Videos</a></strong> challenge and alongside the 31 videos that I created, I also did <strong>11 Live Streams</strong> bringing the total up to 42 videos in a month.  </p>
<p>Pretty crazy. But fun, a lot of fun! ?</p>
<h3 id="heading-the-next-challenge">The next challenge</h3>
<p>So as you can see... I love challenges! ?  </p>
<p>And now I've been thinking...   </p>
<p>"What should I do next? Something bigger... Something crazier...<br>I want to help the developer community more. I want to create more content!" ?</p>
<p>And then it hit me. ?</p>
<p>What if...  </p>
<p>...wait for it...  </p>
<p>...wait for it...  </p>
<p>What if I'll go over <strong>freeCodeCamp's entire curriculum</strong> in a <strong>series of Live Streams</strong> on <a target="_blank" href="https://youtube.com/florinpop">my YouTube channel</a>? ?</p>
<p>That'll be amazing, right? (And crazy at the same time! ?)</p>
<p>Let me explain this idea to you.</p>
<p>There are currently <strong>6 certifications</strong> in the freeCodeCamp curriculum:</p>
<ol>
<li>Responsive Web Design</li>
<li>JavaScript Algorithms and Data Structures</li>
<li>Front End Libraries</li>
<li>Data Visualization</li>
<li>APIs and Microservices</li>
<li>Information Security and Quality Assurance</li>
</ol>
<p>My plan is to start from scratch (with a clean freeCodeCamp profile) and go through the entire curriculum, conquering one certification at a time.</p>
<p>It will all be done in a series of Live Streams. At the end the videos will be uploaded to the channel for those who missed the Live Streams or for those you want to rewatch them later.</p>
<p>I already created a <a target="_blank" href="https://www.youtube.com/playlist?list=PLgBH1CvjOA62oNEVgz-dECiCZCE_Q3ZFH">playlist</a> where I'm going to add all the recorded Live Streams. Also there you'll be able to find the planned ones for the future in case you want to follow along.  </p>
<p>I'm also going to announce everything on Twitter so make sure you <a target="_blank" href="https://twitter.com/florinpop1705">follow me</a> there if you want stay up-to-date with my progress.  </p>
<p>I also have a <a target="_blank" href="https://discord.gg/qSse3Ey">Discord server</a> where you can join if you want to follow along and chat with others which are doing the challenge too.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Introducing The #ProjectEuler100 Challenge: the "Dark Souls" of Coding Achievements ]]>
                </title>
                <description>
                    <![CDATA[ People often ask me "how can I get into competitive programming?" My answer has always been simple: practice as many algorithm and data structures problems as you can. But today, I have something more concrete for you. A challenge that will expand yo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/projecteuler100-coding-challenge-competitive-programming/</link>
                <guid isPermaLink="false">66b8d53cce55d3ba4d935981</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Fri, 03 Jan 2020 18:19:26 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9e46740569d1a4ca3c43.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>People often ask me "how can I get into competitive programming?"</p>
<p>My answer has always been simple: practice as many algorithm and data structures problems as you can.</p>
<p>But today, I have something more concrete for you. A challenge that will expand your computer science and math knowledge – all while giving you a ton of programming practice.</p>
<p>It's called #ProjectEuler100. And a lot of people have already publicly accepted the challenge.</p>
<p>The challenge is named after Leonhard Euler, one of the most prolific mathematicians in history.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/01/Leonhard_Euler-1.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Leonhard Euler - the 16th century Swiss mathematician this challenge is named after.</em></p>
<p>It represents learning on hard mode. Finishing this challenge will demand creativity and problem solving skills you didn't even know you had. It will turn you into an incredibly resourceful developer. It will give you the confidence to tackle the most ambitious projects.</p>
<p>In short, the #ProjectEuler100 challenge will be a crucible where your Super Saiyan self is forged, ready to unleash your latent engineering genius on the world.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/01/8XEM-1.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Goku going super saiyan.</em></p>
<h2 id="heading-what-is-project-euler">What is Project Euler?</h2>
<p>Project Euler is a website created back in 2001. It hosts a collection of around 600 different algorithm problems that get progressively harder, to the point where even people with math PhD's still struggle with them.</p>
<p>This said, the first 100 problems are totally do-able by a new developer. Thousands of people have completed the first 100 Project Euler problems over the years.</p>
<p>It's just brutally hard. Like... Dark Souls hard.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/01/Dark_Souls__Prepare_to_Die_Edition_Box_Shot_for_PC_-_GameFAQs.png" alt="Image" width="600" height="400" loading="lazy">
<em>Dark Souls is a video game famous for being ridiculously hard. But it becomes much easier with consistent practice - just like these algorithm problems.</em></p>
<p>I love the Project Euler problems. I used them extensively when I was first learning to code. I love these so much that we've added these Project Euler problems to <a target="_blank" href="https://www.freecodecamp.org/learn/coding-interview-prep/project-euler/">freeCodeCamp's Interview Preparation section</a>.</p>
<p>These will really wrack your brain. But they will be rewarding. They are hard, but fair. And if you're willing to swallow your pride and go down a few Wikipedia rabbit holes, you can solve them, too.</p>
<p><a target="_blank" href="https://twitter.com/ossia">Embedded content</a></p>
<p>So what do you think. Are you up for solving the first 100 Project Euler problems? Here are the rules.</p>
<h2 id="heading-the-rules-of-the-projecteuler100-challenge">The Rules of the #ProjectEuler100 Challenge</h2>
<p>I've boiled everything down to these 6 simple rules all participants must follow.</p>
<ol>
<li>Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.</li>
<li>Create a GitHub repository.</li>
<li>Each time you complete a challenge, add your solution to your GitHub repository and tweet a link to it using the #ProjectEuler100 hashtag.</li>
<li>Then scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.</li>
<li>Move on to the next Project Euler challenge. You can't skip ahead. You have to complete all 100 problems in order. But you can use any programming language you want to solve these.</li>
<li>Once you've finished all 100 of them, tweet out a celebration photo of yourself with your laptop open to your GitHub repo.</li>
</ol>
<h2 id="heading-where-do-i-do-my-coding">Where do I do my coding?</h2>
<p>You can use the 20-year-old Project Euler website itself.</p>
<p>Or you can use <a target="_blank" href="https://www.freecodecamp.org/learn/coding-interview-prep/project-euler/">the freeCodeCamp.org version</a> - which lets you code right in your browser, and has built-in tests.</p>
<p>Or if you're feeling spicy, you can build your own website for solving these challenges. (All of the Project Euler problems are Creative Commons-licensed and are free for non-commercial use.)</p>
<h2 id="heading-why-do-i-need-to-put-my-solutions-on-github">Why do I need to put my solutions on GitHub?</h2>
<p>Putting your solutions into GitHub (Or GitLab or BitBucket) accomplishes several things:</p>
<ol>
<li>It gives you a nice public record of your progress that you can share with other people.</li>
<li>It will make your GitHub profile look super active for any employers / clients looking to hire you.</li>
<li>It gives you something you can show to your grandkids.</li>
</ol>
<h2 id="heading-can-i-look-at-other-peoples-solutions">Can I look at other people's solutions?</h2>
<p>You can look at other people's solutions for problems that you yourself have already solved.</p>
<p>Each challenge can be solved in many different ways - some more elegant than others. And you can compliment other people on their approaches.</p>
<p>This said, it's 2020. The reality is that solutions to these problems are already peppered across the web. You may accidentally stumble upon a solution if you're searching for hints. </p>
<p>If you are exposed to the solution of a challenge that you have not yet completed yourself, you absolutely should not use the code you see there. You need to come up with code solutions for each of these problems yourself.</p>
<h2 id="heading-can-i-live-stream-my-attempts">Can I live stream my attempts?</h2>
<p>Yes. By all means. As I said, the solutions to these problems are already all over the web. And many of the people who would tune in on Twitch or YouTube won't be doing the challenge - they'll just enjoy watching programming streams in general.</p>
<p>So don't worry about "spoiling" anything during your live streams.</p>
<p>We will be live streaming #ProjectEuler100 attempts on <a target="_blank" href="https://www.youtube.com/freecodecamp">freeCodeCamp's YouTube channel</a>.</p>
<p>This said, if you are creating video guides or articles that people would use as a reference to these problems, I encourage you to include spoiler warnings. People want hints so they can get unstuck - not full solutions.</p>
<h2 id="heading-how-fast-do-i-need-to-solve-these">How fast do I need to solve these?</h2>
<p>To quote a great man:</p>
<blockquote>
<p>"It does not matter how slowly you go as long as you do not stop." - Leonhard Euler</p>
</blockquote>
<p>(OK, that quote is commonly attributed to Confucius. But all kinds of quotes get mis-attributed to Confucius, so I'm misattributing this quote to my boy Euler. ?)</p>
<p>The first few problems are relatively easy. But they rapidly increase with difficulty. By the time you get to the final 20 or 30, you may be spending days to solve a single problem. </p>
<p>So don't make the mistake of saying "I'm going to finish these in 100 days" or something like that. Just keep working on these a little bit every day. You've got an entire community around you to help you make it past the finish line.</p>
<h2 id="heading-the-community-is-here-to-support-you">The community is here to support you</h2>
<p>We are all in this together. We're huddled around the #ProjectEuler100 hashtag on Twitter. This is baked right into the challenge rules. ("Rule #4: Scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.")</p>
<p>You will support other developers embarking on this challenge. And they will be there to support you.</p>
<p>I also encourage you to <a target="_blank" href="https://discord.gg/d8C3HbG">join our #ProjectEuler100 Discord chat room</a> where you can chat about the challenge and get help.</p>
<p>And you can <a target="_blank" href="https://twitter.com/projecteuler100">follow our #ProjectEuler100 Twitter bot</a>.</p>
<p>So if you're ready, take the first step. Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.</p>
<p>You've got this.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I built 100 Projects in 100 Days ]]>
                </title>
                <description>
                    <![CDATA[ By Florin Pop I finished the #100Days100Projects challenge ? In this article I’m going to cover my experience doing this challenge and I’m also going to answer some of the questions that I received on Twitter about this. It will be an “ask and answer... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-i-built-100-projects-in-100-days/</link>
                <guid isPermaLink="false">66d45eec264384a65d5a951e</guid>
                
                    <category>
                        <![CDATA[ 100Days100Projects ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 100DaysOfCode ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 27 Dec 2019 11:17:27 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/12/Overview--100Days100Projects.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Florin Pop</p>
<p>I finished the <a target="_blank" href="https://www.florin-pop.com/blog/2019/09/100-days-100-projects">#100Days100Projects</a> challenge ? In this article I’m going to cover my experience doing this challenge and I’m also going to answer some of the questions that I received on <a target="_blank" href="https://twitter.com/florinpop1705">Twitter</a> about this.</p>
<p>It will be an “ask and answer” type of article, so I hope you enjoy it! ?</p>
<h2 id="heading-what-is-this-challenge-about">What is this challenge about?</h2>
<p>The main purpose of this challenge is to build a project every single day for 100 days in a row. You can read more about the rules <a target="_blank" href="https://www.florin-pop.com/blog/2019/09/100-days-100-projects">here</a>. (Note: there is also an easier variant: #30Days30Projects, in case you are interested for something lighter ?)</p>
<p>I started this challenge on <strong>17 September 2019</strong> and finished on <strong>25 December 2019</strong>.</p>
<h2 id="heading-what-projects-have-you-built-during-the-challenge">What projects have you built during the challenge?</h2>
<p>In the last project (#100) I added all the projects that I’ve built during the challenge, so if you want to check them out click <a target="_blank" href="https://codepen.io/FlorinPop17/full/VwYWMOa">here</a>.</p>
<p>All of the projects were web based - frontend mostly (HTML, CSS, JavaScript), and some of them had a little bit of NodeJS for the backend.</p>
<p>I used all sorts of APIs, some JS libraries (ReactJS, p5js - for working with the canvas), but most of the projects were done with Vanilla JS and CSS.</p>
<h2 id="heading-how-do-you-come-up-with-so-many-ideas">How do you come up with so many ideas?</h2>
<p>Apparently a lot of people have asked me this question over these 100 days.</p>
<p>It’s simple: I am a <strong>genius</strong>. ?</p>
<p>Just kidding ?... I’m far from being that.</p>
<p>The truth is that I gathered a lot of resources over the past year because I needed inspiration for my <a target="_blank" href="https://www.florin-pop.com/blog">articles</a>, <a target="_blank" href="https://www.youtube.com/channel/UCeU-1X402kT-JlLdAitxSMA">videos</a>, etc, and I’ve used them to get inspiration for these projects also.</p>
<p>Also, doing this creative process over and over and over, you end up eventually getting ideas from all the things around you. There are some projects that I did because I saw a need in my day-to-day life (Drink Water app, Random Picker Visualizer, Countdown, Password Generator, etc…).</p>
<p>Let’s not forget also that some of the projects were suggested by my <a target="_blank" href="https://twitter.com/florinpop1705">followers</a>. (Thank you guys ?)</p>
<p><strong>The resources that I’ve used mostly for inspiration</strong>:</p>
<ul>
<li><a target="_blank" href="https://dribbble.com">Dribbble</a></li>
<li><a target="_blank" href="https://codepen.io">CodePen</a></li>
<li><a target="_blank" href="http://collectui.com/designs">CollectUI</a></li>
</ul>
<h2 id="heading-did-you-have-a-plan-for-a-longer-period-of-time-or-did-you-do-it-spontaneously">Did you have a plan for a longer period of time or did you do it spontaneously?</h2>
<p>Out of the 100 projects, I think that only 2 or 3 were “planned” beforehand - like a day before. ?</p>
<p>The rest of them were just done spontaneously.</p>
<p>But I wouldn’t recommend doing that. It’s much better to have things planned out - it gets rid of the headache you might get when you have to come up with an idea right away.</p>
<h2 id="heading-why-did-you-do-it">Why did you do it?</h2>
<p><strong>I LOVE CHALLENGES</strong>! ?</p>
<p>As simple as that.</p>
<p>I love pushing my limits and this challenge looked like one that could do that (and it did!). Also, I’ve noticed that if I publicly announce that I’m doing something, I end up actually doing it - maybe because of the shame that I would feel if I fail. I don’t know. Haven’t failed a challenge yet. ?</p>
<p>The first challenge I did was a 365 days of running challenge. I publicly declared on Facebook that I was going to do it and I posted a picture daily with me after my runs. This gave me the strength to finish it (actually ended up doing 422 days). I couldn’t fail my followers, right? ?</p>
<p>And on the other hand, I knew that if I was going to post daily I would inspire others. I wanted to show people that even ordinary people like us can do stuff if we set our minds to it. We have a powerful mind, we just don’t use it at its full capacity!</p>
<p>Yes. I am an ordinary guy. Nothing special here. So if I did it, you can do it too!</p>
<h2 id="heading-how-much-work-did-it-take-to-create-a-project">How much work did it take to create a project?</h2>
<p>Some of the projects I did in under 30 minutes, a couple took me 6-8 hours and 1 or 2 I had to “postpone” to the 2nd day because I couldn’t finish them. Although I postponed these projects to the next day, I recreated them from scratch - only using the gained knowledge. This turned out to be a good way to get "unstuck". Just redo it from scratch.</p>
<p>I would say that I needed around 1-1.5 hours on average per day. This includes: idea + execution + social media.</p>
<p>Keep in mind that I’ve been coding since 2013, so maybe someone with less experience would need a little more time, but it really depends on the project difficulty.</p>
<h2 id="heading-what-motivated-you-to-keep-going">What motivated you to keep going?</h2>
<p>As I mentioned above, I think that the shame of failing kept me moving, considering that I publicly committed to the challenge. I can’t fail my audience!</p>
<p>I had a \$25 “punishment fee” which I would have to pay for the failing days, but I don’t think that I ever thought about it after I started.</p>
<p>I added the money aspect because I knew that it would be engaging for people to have it and some of them would want me to fail (sneaky you! ?) so they would check in daily - which ended up giving me a small boost of views on my posts ?.</p>
<h2 id="heading-what-have-you-learned-during-the-challenge">What have you learned during the challenge?</h2>
<p>I’ve learned a couple of things:</p>
<ul>
<li>Learned how to “sketch” and plan a project structure</li>
<li>Learned and played around with some technology and APIs that I haven’t used before</li>
<li>Learned more about CSS properties (positioning, animation, etc)</li>
<li>Learned more on how to work with the JS DOM API</li>
</ul>
<p>It ended up helping me solidify my vanilla JS and CSS skills!</p>
<h2 id="heading-what-would-you-do-differently">What would you do differently?</h2>
<p>One thing that I’ve noticed is that there were more <em>simpler</em> projects that I initially planned. I expected to have more apps with multiple functionalities, but considering the fact that this challenge wasn’t the only thing that I had going, I ended up doing more simple projects (like just a design implementation with HTML/CSS, no JavaScript).</p>
<p>If I would ever do this challenge again, I would either:</p>
<ul>
<li>Do fewer days (30 or 50) or</li>
<li>Focus 100% on the challenge (no more client work or other projects, etc)</li>
</ul>
<p>This way I could do more <em>“sophisticated”</em> apps.</p>
<p>Nevertheless, I’m happy with the projects that I’ve done considering the given situation.</p>
<p>Also, I ended up spending a lot of time posting on social media (Twitter, LinkedIn, Facebook, Instagram - for which I created a new image every time).</p>
<p>Maybe a good system to “share everywhere” would help to speed up the process.</p>
<p>Don’t get me wrong, posting on SM is important and I wouldn’t drop it, but I would speed it up if possible.</p>
<h2 id="heading-should-people-do-this-challenge">Should people do this challenge?</h2>
<p>If you want a good challenge. Yes.<br>
If you want to learn new things. Yes.<br>
If you want to create engagement with your audience. Yes.<br></p>
<p>Should you do 100 days? Depends.<br>
Do you have the time? Then do it. Otherwise I would only do the 30 days variant.</p>
<h2 id="heading-whats-next-for-you">What’s next for you?</h2>
<p>Another challenge. ?</p>
<p>For 2020 I’m planning to go all-in on <a target="_blank" href="https://www.youtube.com/channel/UCeU-1X402kT-JlLdAitxSMA">YouTube</a> so I’m going to start the year with a 31 days 31 videos challenge (more about it coming soon). I want to have a solid backlog of videos for my YouTube channel, so this challenge goes very well for that.</p>
<p>Who knows… maybe I’ll keep doing it if everything goes well.</p>
<p><a target="_blank" href="https://www.youtube.com/channel/UCeU-1X402kT-JlLdAitxSMA">Subscribe</a> if you want to follow my progress! ?</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>If you have any other questions, let me know and I’ll be happy to answer and update the article!</p>
<p>I hope this was helpful for you!</p>
<p>Thank you for reading! ?</p>
<p>Read more of my articles on my <a target="_blank" href="https://www.florin-pop.com/blog/built-100-projects-in-100-days/">blog</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to conquer job interview code challenges v2.0: creating a front-end web app ]]>
                </title>
                <description>
                    <![CDATA[ By Jonathan Sexton As many of you know, I landed my first developer job at the end of June and I thought it would be great to use the challenge I was given as the subject of today's article. It is important to note that I used React to build ]]>
                </description>
                <link>https://www.freecodecamp.org/news/conquering-job-interview-code-challenges-v2-0/</link>
                <guid isPermaLink="false">66d45f6638f2dc3808b790b9</guid>
                
                    <category>
                        <![CDATA[ challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ code challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Hunting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning to code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 19 Aug 2019 13:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/lou-levit-B4op5oZ4x5Q-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jonathan Sexton</p>
<p>As many of you know, I <a target="_blank" href="https://jonathansexton.me/blog/landing-my-first-development-job-what-a-crazy-journey/">landed my first developer job</a> at the end of June and I thought it would be great to use the challenge I was given as the subject of today's article.</p>
<p>It is important to note that I used React to build my project, but this could have been completed with any front end framework or 'vanilla JavaScript'.</p>
<p>Below is a list of topics we'll go over:</p>
<ul>
<li>Accessing the <a target="_blank" href="https://quip.com/dev/automation/documentation#token-endpoint">Quip Automation API</a></li>
<li>Creating spreadsheets/documents with the Quip API</li>
<li>Installing and using the <a target="_blank" href="https://github.com/axios/axios">Axios</a> library (this is optional and you can make API requests without it but I like the syntax)</li>
<li>Using <a target="_blank" href="https://www.npmjs.com/package/qs">qs package</a> to stringify requests (this is not a requirement but I wanted to try something new and if it didn't work I always had the fallback of knowing Axios will stringify my requests by default)</li>
<li>Making <a target="_blank" href="https://en.wikipedia.org/wiki/POST_(HTTP)">POST</a> and <a target="_blank" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods">GET</a> requests</li>
</ul>
<p>For context, here is a snippet of the requirements as I received them:</p>
<p>"<em>Create a front-end web app that interacts with the Quip API in the following ways:</em></p>
<ul>
<li><em>Create a spreadsheet (bonus points to import data into the newly created spreadsheet).</em></li>
<li><em>By import data, I mean upload an Excel spreadsheet, or copy and paste data into Quip spreadsheet.</em></li>
<li><em>Export a Quip spreadsheet to .xlsx</em></li>
<li><em>Download (backup) a folder/multiple documents.</em></li>
</ul>
<p><em>Create the UI for the page in whatever way you see fit (buttons, dialog boxes, etc).</em>"</p>
<p>I was a little worried when I read the requirements as I wasn't exactly sure where to begin. So, I dug into the API docs and started soaking up information. Thankfully, no time limit was given to me but I wanted to be done with this as soon as possible to see where I stood in the interview process.</p>
<p>To start, I designed a prototype of the finished product in Figma so I'd have a road map to go off of. This is not a required step, but it does make your project building experience run much smoother.</p>
<p>Alright, let's dig in!</p>
<h2 id="heading-getting-started">Getting Started</h2>
<p>I built my Nav, Footer, and Content components so I'd have a solid foundation for my app.</p>
<p>Each of these components return some basic JSX and there isn't much to them (If you'd like to see the code for each you can check out the project's <a target="_blank" href="https://github.com/JS-goose/gibson-code-challenge">GitHub repo</a>).</p>
<p>I decided the majority of the requests would be split between the <em><code>App.js</code></em> and <em><code>CenterContent.js</code></em> files.</p>
<p>For reference, here is my project structure:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image.png" alt="react code showing a project structure" width="600" height="400" loading="lazy">
<em>My project structure</em></p>
<p>You'll see me reference POST and GET requests throughout this post.  If you aren't familiar with those now is a good time to do some research on those.  I'll be honest in that I wasn't 100% on them when starting this project and had to go through some resources myself.</p>
<p>In a nutshell, a POST request is when we ask the server to <strong><em>accept</em></strong> some incoming data (that we are sending) - in our case that data comes in the form of creating a new spreadsheet file.</p>
<p>A GET request is when we ask the server to <strong><em>send</em></strong> us data from a specified resource on the server.</p>
<p>I used the <a target="_blank" href="https://insomnia.rest/">Insomnia REST Client</a> to help debug issues with my requests. I'm working on a beginner's guide for it so stay tuned for that!</p>
<h2 id="heading-using-the-quip-api">Using the Quip API</h2>
<p>If you're like me, you've never heard of the Quip API and had no idea what it does. At its core, Quip is an automation tool that allows you to integrate with tools like <a target="_blank" href="https://www.salesforce.com/">SalesForce</a> to make your sales team more collaborative.</p>
<p>For our purposes, we will be using it to create Excel spreadsheets on my Quip account (if you want to replicate this project you'll need to create a Quip account - it is free to do so).</p>
<p>You'll also need to create a personal developer token in order to make requests. You can do that <a target="_blank" href="https://quip.com/dev/token">here</a> (requires an account). Once you have your token, keep it in a safe spot because we'll be making use of it soon.</p>
<p>To start, I installed Axios into my project by running <code>npm install axios</code> and then I import it into the files where I need to make my requests with <code>import axios from "axios";</code></p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-1.png" alt="a code snippet of react import statements" width="600" height="400" loading="lazy">
<em>My import statements for required packages</em></p>
<h2 id="heading-authentication">Authentication</h2>
<p>Before making any kind of requests to the server, I needed to authenticate with my credentials. I decided to put this in the <code>App.js</code> file inside a <code>componentDidMount</code> <a target="_blank" href="https://reactjs.org/docs/state-and-lifecycle.html">lifecycle method</a> so it would load every time the page loads:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-4.png" alt="some react code showing an authentication call to an outside API" width="600" height="400" loading="lazy">
<em>My authentication function</em></p>
<p>So I built my function, I called my function and for a moment thought all is well, until I ran into this dreaded error:</p>
<pre><code><span class="hljs-string">"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at $websiteName"</span>
</code></pre><p>Noooooooo!!! The dreaded <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors">CORS</a> monster rears it's mighty head!  (CORS is actually a useful intermediary between me and the server but can be annoying to deal with if you've never seen this error before).  </p>
<p><em><em>Side note - if you've never seen this error before don't worry!  I still don't fully understand it but I know enough to debug it. If you get stuck, check out the link above for some helpful info or look below for a quick work around.</em></em></p>
<p>An easy way to get around this is to use a proxy like the <a target="_blank" href="https://cors-anywhere.herokuapp.com/">CORS Anywhere</a> free resource. Essentially, place this link <code>https://cors-anywhere.herokuapp.com/</code> in front of your end point URL and it'll resolve the problem, for now.</p>
<p>This handy tool will allow you to make your requests <strong><em>while developing on localhost</em></strong>. If I were you, I would do some research before using this approach in production. Full disclaimer, I don't know enough about this little trick to tell you if it's safe to use in production or not.</p>
<p>So, after some tweaking of the authentication function I got the desired result to log to the console. Time to move on to making requests!</p>
<h2 id="heading-making-requests">Making Requests</h2>
<p>Now that my authentication is working, we're ready to make some requests. I knew I was going to make a POST request whenever I wanted to create a new document and that I also wanted to tie that action to the click of a button. So, below is my POST function:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-3.png" alt="a POST function call to an outside API" width="600" height="400" loading="lazy">
<em>My POST function</em></p>
<p>You'll notice this is where our <code>qs</code> package I mentioned at the beginning of this article comes into play. I'm not an expert but from what I gleaned after reading the docs on it, this package turns my request into a string to be sent to the server. If you prefer not to use this package that's no problem as <code>Axios</code> will do this by default. I know that  <code>qs</code> offers more than just stringifying data but I'm unfamiliar with the full range of its capabilities.</p>
<p>Now, I want this function to fire when clicking a button. Thus, a basic button came to life!</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-5-1024x96.png" alt="some react code for a simple button" width="600" height="400" loading="lazy">
<em>A simple React button with an on click method</em></p>
<p>My POST function has been built, my button has been built, and the method tied to it.  It's time to cross my fingers and see what my function spat out into the console:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-6.png" alt="a console log statement from an outside API call" width="600" height="400" loading="lazy">
<em>The result of my server request - it works!</em></p>
<p>At this point I'm over the moon! I'm beyond excited that I've gotten this API call to not only work but to return something as well. Now the real test...does this show up as a new spreadsheet on my Quip account?</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/07/image-7.png" alt="a quip account showing the creating of a spreadsheet" width="600" height="400" loading="lazy"></p>
<p>I have the console statement and the confirmation from my Quip account showing that I have successfully created a new spreadsheet - this is awesome!  I'm ecstatic and I literally jumped out of my chair and yelled "YEEEEEEESSSSSS!!!" once I got both of these.</p>
<p>That feeling of getting something to work after struggling with it is like nothing else I've experienced in my professional life.  I tell myself that I have to keep riding this wave of enthusiasm and elation so I push on to the next item on the list.</p>
<h2 id="heading-import-data-into-the-newly-created-spreadsheet">Import Data Into the Newly Created Spreadsheet</h2>
<p>I had some great ideas for this section of the "assignment" but at this point it has been almost two weeks since I started this project and I'm anxious that the interviewer will have forgotten about it (i.e. me) or is getting impatient with me.</p>
<p>So, I scrap those grand plans and opt for something of a more simple nature so I can get this project turned in ASAP.</p>
<p>I built a small function to at least attach to the upload button so that I would have some type of functionality for it. At it's core, this function waits until a file has been uploaded, sets the state to the first element in the event target array, then creates headers based off of that information, with the eventual goal being it posts to my Quip account with that information.</p>
<p>However, you can tell by the comment at the top of this function block that I was unable to get it to work properly. However, I did not have time (at least I thought I didn't) to dig deep into this problem and get it fixed.</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image-3.png" alt="a snippet of react code showing an upload function" width="600" height="400" loading="lazy">
<em>My import function that never quite worked properly :)</em></p>
<p>At this point, I've been working on this project after work and at night for over two weeks. I decide that it's time to turn it in without the other parts working (import, export, and downloading data).</p>
<h2 id="heading-the-final-touches">The Final Touches</h2>
<p>I know my project is unfinished and I'm beating myself up pretty hard about it. But, as an added bonus I decide that I'm going to design something in <a target="_blank" href="https://www.figma.com/">Figma</a> as an added touch to help my chances of getting a call back.</p>
<p>Here is the finished product modeled off of their current colors/font/theme:</p>
<p><img src="https://jonathansexton.me/blog/wp-content/uploads/2019/08/image-4-1024x731.png" alt="a react app showing database table data" width="600" height="400" loading="lazy"></p>
<h2 id="heading-and-thats-a-wrap">And That's A Wrap</h2>
<p>With my project not finished but at a stopping point, I'm feeling not so good about my progress and my timing but I package everything up and throw it on GitHub. I throw in the above image and schedule an e-mail to go out the next morning at 9AM to the interviewer.  </p>
<p>I waited nearly 2 days with bated breath hoping to get some type of call back - something. It finally came as I was driving into work. The interviewer had gotten my project and wanted me to come in for another meeting with his lead developer.</p>
<p>I was terrified and excited all at the same time because I was thinking they wanted to bring me in to make fun of my code or to ask me what the hell I was thinking when I built this monstrosity. But that wasn't the case at all. I ended up getting a job offer from this project!</p>
<p>If you'd like the whole story about that, it can be found in my previous blog <a target="_blank" href="https://jonathansexton.me/blog/landing-my-first-development-job-what-a-crazy-journey/">post about landing my first developer job.</a></p>
<p>I hope you've found some value out of this post. If you have let me know on <a target="_blank" href="https://twitter.com/jj_goose">Twitter</a> or any of the other platforms I post on :D</p>
<p>Also, I cross post most of my articles on great platforms like <a target="_blank" href="https://dev.to/jsgoose">Dev.to</a> and <a target="_blank" href="https://medium.com/@joncsexton">Medium</a> so you can find my work there as well!</p>
<p>While you’re here why not sign up for my <strong>Newsletter</strong> –  you can do that at the top right of the page on my <a target="_blank" href="https://jonathansexton.me/blog">blog</a>. I promise I’ll never  spam your inbox and your information will not be shared with  anyone/site. I like to occasionally send out interesting resources I find, articles about web development, and a list of my newest posts.</p>
<p>Have an awesome day filled with love, joy, and coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I Landed My First Developer Job - What a Crazy Journey ]]>
                </title>
                <description>
                    <![CDATA[ By Jonathan Sexton You read the title right!  I was offered a development position with a  company and after some negotiating I accepted their very generous offer! I am beyond blown away, excited, happy, and (if I'm being 100% honest) terrified - in ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/landing-my-first-development-job-what-a-crazy-journey/</link>
                <guid isPermaLink="false">66d45f77706b9fb1c166b999</guid>
                
                    <category>
                        <![CDATA[ coding challenge ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Change ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Hunting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Job Interview ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 11 Jul 2019 15:31:56 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/07/japheth-mast-Ls3yexjyRpk-unsplash-2.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jonathan Sexton</p>
<p>You read the title right!  I was offered a development position with a  company and after some negotiating I accepted their very generous offer!</p>
<p>I am beyond blown away, excited, happy, and (if I'm being 100% honest) terrified - in a good way though.  I'm still in disbelief that this is really happening but ecstatic to start working on production code.</p>
<p>I've had a lot of people ask me to distill my journey into an article to share and help others.  So, buckle up because here we go.</p>
<hr>
<h2 id="heading-getting-started">Getting Started</h2>
<p>I've always been interested in computers, tech, etc. Like many people my age, I got to 'cut my teeth' with development by creating a <a target="_blank" href="https://en.wikipedia.org/wiki/Yahoo!_GeoCities">GeoCities</a> site and later by personalizing my MySpace page with some basic CSS.</p>
<p>I didn't know it at the time but this was development, a crude version of it but still development nonetheless. At that time, I didn't know that people would pay for this kind of work or I might have stuck with it. So, I went to college and got a degree in nothing tech related - psychology. Not a useless degree, but one I ultimately never put into professional use.</p>
<h2 id="heading-finding-my-calling">Finding My Calling</h2>
<p>Fast forward to the summer time in 2016 where I found myself with an abundance of free time on my hands outside of work.  I had always wanted to teach myself to code/program and decided now was the time - no more delay.  With the amount of free and accessible resources online to teach myself how to code it was the perfect time to jump in.</p>
<p>I started by searching for resources and came across Codecademy. I took handwritten notes by copying the entire question, answer, and result into a notebook.  I wrote down everything thinking that I would need it. I came back to these notes from time to time to review them. It's also interesting to look back on them and compare what I considered difficult then to what I consider difficult now. ?</p>
<p>A friend introduced me to <a target="_blank" href="https://freecodecamp.org">freeCodeCamp</a> because he knew I was self teaching and told me this platform was built for people like me.  I had planned to check it out, maybe do one or two lessons and then go to bed.  I finished the entire section on HTML that night!  I was hooked.</p>
<p>The more I learned the more questions I had.  I felt this urge, this pull to find answers to those questions.  So I continued on working through the lessons and projects.  I finished 2 projects before the curriculum was overhauled and revamped on freeCodeCamp.</p>
<p>I was finding any excuse to learn and work on projects.  While I was standing in any line waiting for something I would pull out my phone and instead of looking at social media, I began to read web development articles or watch a development related video.</p>
<p>I feel like this was a major shift in the way I viewed downtime as compared to previously where "mindless consumption" ruled my time. _(_If you enjoy social media or funny animal videos I'm not calling you mindless, I'm simply saying that type of consumption typically doesn't require you to be engaged.  It's the type of consumption that you can do on auto pilot and frankly I still do it from time to time.)</p>
<p>During that time I had bounced around the various different sources and was like a kid in a candy store.  At one point I had a folder that had roughly 300 links to material I had planned to work through.  I now know that finding a resource and sticking with it is far better than hoping from one resource to another.</p>
<p>I was doing all of this at night when my wife and daughter were asleep.  I was staying up until 12:30 AM sometimes as late as 2:00 AM and then having to get up at 6:00AM to do my normal day job.  At first, when the topics weren't as mentally taxing this was not an issue.  But as I started moving into JavaScript, learning the basics of networking, servers, accessibility, etc I noticed that the later it got, the more difficult it became to keep my brain engaged.</p>
<p>Needless to say, this routine only lasted a few months before having to change it.</p>
<p>I didn't want to stop working on projects/learning but I needed to alter my schedule in order to benefit my well being.  That's when I decided to go to the other end of the work day spectrum.</p>
<p>I started getting up at 4:00 AM, instead of staying up late, to learn and work on projects before going to the gym then starting my day.  I must say, this was a pivotal moment in my journey because I started to retain more of the information I was learning and that ultimately helped me move forward with more projects/material.</p>
<p>Also, this is the time when I started to buy up every resource I could find (Udemy courses and books mostly) dealing with any aspect of web development.  I can tell you that this isn't a wise (or financially sound) choice to make.  If you find a resource you like and that you're learning from then stick with that resource until it's exhausted.  The last thing you want to be doing is jumping to the new resource each time you find one like I did.</p>
<h2 id="heading-grow-with-google-amp-udacity-scholarship">Grow With Google &amp; Udacity Scholarship</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/GrowWithGoogleDeveloperChallengeScholarship.png" alt="Image" width="600" height="400" loading="lazy">
<em>The image that came with my acceptance e-mail</em></p>
<p>In January 2018 I applied for and was awarded a scholarship to Udacity's Front-End Nanodegree program.  This was not only an awesome opportunity to help propel me towards my goal but a humbling experience as well.</p>
<p>I came into this program with a basic knowledge of HTML, CSS, and a small portion of JavaScript in the vanilla flavor.  In this course I was introduced to <a target="_blank" href="https://jquery.com/">jQuery</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Functional_programming">functional programming</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented programming</a> (OOP), <a target="_blank" href="https://en.wikipedia.org/wiki/Test-driven_development">test driven development</a> (TDD), <a target="_blank" href="https://en.wikipedia.org/wiki/Accessibility">accessibility</a>, servers, <a target="_blank" href="https://en.wikipedia.org/wiki/Application_programming_interface">API's</a>, basic networking, <a target="_blank" href="https://reactjs.org/">React</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Ajax_%28programming%29">AJAX</a>, and so many more facets of web development that I hadn't previously been exposed to.</p>
<p>I'll be honest, it wasn't always easy or fun and there were times I seriously considered dropping out.  I felt like I would never learn these concepts and that I was in over my head.</p>
<p>I'm happy that I didn't quit because no one ever accomplished their goals by quitting - first and only cliche statement I promise :D</p>
<p>I had the chance to build many awesome projects like the <a target="_blank" href="https://github.com/JS-goose/card-matching-game">Card Matching Game</a>, <a target="_blank" href="https://github.com/JS-goose/frontend-nanodegree-arcade-game">Arcade Game Replica</a>, <a target="_blank" href="https://github.com/JS-goose/mws-restaurant-stage-1">Restaurant Review App</a>, and the <a target="_blank" href="https://github.com/JS-goose/neighborhood-map-react">Neighborhood Map App</a>.  More than the projects though, I got to meet many great people and valuable experience collaborating with other developers in the course.</p>
<p>Without this course, I can truly and honestly say that I would not be where I am today.  I gained many valuable experiences and lessons in this 9 month course.</p>
<h2 id="heading-job-huntingdun-dun-duuuuunnn">Job Hunting...dun dun duuuuunnn!</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/sven-mieke-fteR0e2BzKo-unsplash-1024x683.jpg" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@sxoxm?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Sven Mieke on &lt;a href="https://unsplash.com/search/photos/job-search?utm_source=unsplash&amp;utm_medium=referral&amp;utm<em>content=creditCopyText)</em></p>
<p>At this point I had been working diligently (sometimes slacking off as well) for about two years.  I did not feel as though I was job ready but a friend who became my mentor told me that I'll never feel ready.  He said that I should apply and if I get interviews then let them tell me I'm not ready if that's the case but to not exclude myself from an opportunity.</p>
<p>So, with a metric ton of fear, anxiety, and doubt I decided to start applying for jobs.</p>
<p>At first, I was only applying for jobs where I met the majority of the qualifications.  I can tell you now that this is not the way to do it, however, at the time I was terrified that someone would actually call me about an interview. (<em>Later down the road I was applying for anything that interested me.  Senior developer - sure, I applied for that.  Front-end ninja with React skills - yep, threw in an application for that as well.  API developer with SQL experience - oh yeah!  I applied for that one as well.  I did this because you never know what will come of your application.  Maybe you don't get hired for that senior role but maybe they like you and your personality so much that they ask you to interview for their junior role.</em>)</p>
<p>That's exactly what happened after I'd been applying for about 3 months.  I got a call for my first interview!  I was so happy and scared at the same time.  Now the pressure was really on.</p>
<p>I read articles, brushed up on my interviewing skills, read books, asked my wife to quiz me on topics, and tried to run through different scenarios that I thought would come up in the interview.  I also prepared questions for interviewer because I wanted to know what it was like to work at this company.</p>
<p>Ultimately, I did what I wasn't supposed to do; I convinced myself that this was the perfect job and I wanted it.  I wanted it more than anything I could ever remember wanting.  I built it up as something that I had to have.</p>
<p>The day of the interview came and to say I was nervous is an understatement.  I was sweating bullets.  I answered all of the questions and when it was my turn I asked the questions I had prepared.  After it was over I left feeling like the interview went well.</p>
<p>Ultimately, I didn't get the position and I was crushed.  I felt like everything went like it should have but for some reason the stars just didn't align.  Little did I know that this would be a common pattern among my interviews.</p>
<p>I decided not to let these disappointments define or destroy my confidence.  I started working harder, learning more, using that disappointment I felt to fuel my passion.  I would do whatever it took to ensure that one of these interviews would end with a full time offer.</p>
<p>Here are some metrics about my job search:</p>
<ul>
<li>Applications submitted across all platforms: <strong>271</strong></li>
<li>Any form of contact from company after application: <strong>28</strong></li>
<li>Phone Interviews: <strong>7</strong></li>
<li>In person interviews: <strong>8</strong></li>
<li>Job offers: <strong>3</strong> (one was contract with the (small) possibility for full time, one a part time freelance gig, and the eventual offer that I took for a full time position</li>
<li>Companies that ignored me after expressing interest: <strong>Too many to count</strong></li>
</ul>
<p>If you are applying for jobs, in any field, don't let the numbers discourage you!  Yes it is disheartening, yes it can be daunting, yes it stinks to fill out an application and never hear anything back, but don't quit!  You can do this!  I'm proof!</p>
<h2 id="heading-my-advice-on-your-job-search">My Advice on Your Job Search</h2>
<p>This is by no means an exhaustive list of tips/tricks but below are some pieces of advice I've picked up along my journey to getting a job in development:</p>
<ul>
<li>Develop thick skin - it's a must!  Companies will disappoint you</li>
<li>Apply for anything you're interested in</li>
<li>Apply even if you don't meet all of the requirements (this is what I did and also how I landed my first developer job)</li>
<li>Spend time perfecting your resume</li>
<li>Just because companies turn you down doesn't mean you're a failure</li>
<li>Show companies you can do the work by building projects outside of tutorials</li>
<li>Ask for help if you need it (this was a hard one for me to learn)</li>
<li>Apply for jobs on all of the major platforms but don't forget that platforms like <a target="_blank" href="https://jobs.github.com/">GitHub jobs</a> also exist</li>
<li>Ensure you take care of yourself - get enough sleep, exercise, eat healthy (it's important for overall health!)</li>
<li>Don't be afraid to take breaks</li>
<li>Don't compare yourself, your job search, your situation, or your skills to others</li>
<li>If it takes you 3 months or 3 years (like me) remember, this is not a race</li>
<li>Work hard, learn well, and never give up!</li>
</ul>
<hr>
<p>As always, I wish you nothing but the best in all you do.  If you need advice or help I'd be glad to do what I can.  Connect with me on <a target="_blank" href="https://twitter.com/jj_goose">Twitter</a> or <a target="_blank" href="https://www.linkedin.com/in/jj-goose/">LinkedIn</a>.  I'm always willing to help and I love meeting new people!</p>
<p>I also run a personal <a target="_blank" href="https://jonathansexton.me/blog">blog</a> where I write articles related to web development.  While you're there consider signing up for my newsletter that I send out once a month with articles and great finds from around the web. </p>
<p>Have an amazing day and happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
