<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[The Digital Drop]]></title><description><![CDATA[The Digital drop is your weekly dose of the tech industry, without having to wade through digital ocean of information. Come learn about the tech industry bit b]]></description><link>https://blog.thejohnadamsjr.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1645144158028/TcRQpRnz7.png</url><title>The Digital Drop</title><link>https://blog.thejohnadamsjr.com</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 14:09:03 GMT</lastBuildDate><atom:link href="https://blog.thejohnadamsjr.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Learning Test-Driven Development & Why It's Useful]]></title><description><![CDATA[Introduction
As a self-taught developer, you may have heard of Test-Driven Development or TDD and wonder what it is. A lot of the tutorials that are out there do not talk about TDD and how you can use it to complete your projects. Often tests are ove...]]></description><link>https://blog.thejohnadamsjr.com/learning-test-driven-development-and-why-its-useful</link><guid isPermaLink="true">https://blog.thejohnadamsjr.com/learning-test-driven-development-and-why-its-useful</guid><category><![CDATA[TDD (Test-driven development)]]></category><category><![CDATA[Python]]></category><category><![CDATA[software development]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[John Adams Jr]]></dc:creator><pubDate>Tue, 08 Feb 2022 23:02:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/npxXWgQ33ZQ/upload/v1644347729601/lk7yjdOkD.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>As a self-taught developer, you may have heard of Test-Driven Development or TDD and wonder what it is. A lot of the tutorials that are out there do not talk about TDD and how you can use it to complete your projects. Often tests are overlooked as an item of completion for self-taught developers because many say TDD is dead and often we want to get directly to the tasks at hand and have a completed project under our belt. However, in production code, tests are very important to make sure that the product delivered to the customer works as intended. Learning Test-Driven Development is a great way to show employers that you're not just a weekend warrior coder, but you deliver thoughout code and add value to the business.</p>
<h3 id="heading-what-is-test-driven-development">What is Test Driven Development?</h3>
<p>Test-Driven Development is the process of writing unit tests prior to writing your code. Developers create small test cases for each feature of the application, then create the code for the features of the application. According to Wikipedia Test-Driven Development </p>
<blockquote>
<p>"is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases." - Wikipedia</p>
</blockquote>
<h3 id="heading-what-companies-use-tdd">What Companies use TDD?</h3>
<p>TDD is a methodology derived from Agile and Extreme Programming frameworks. So it is a safe bet to say that any companies that implement these development strategies will use some form of TDD.  However, it is often said that most companies do not use the practice of TDD as it is designed. This is because of deadlines, having more code to write, and the possibility of constantly adding and updating tests. Despite this, many claim TDD is still alive and well and has its uses in specific projects, in particular, algorithmic features and stable applications. </p>
<h3 id="heading-how-tdd-can-help-you-in-your-coding">How TDD Can help you in your coding.</h3>
<p>TDD can help you produce production-level code, all the while gaining practice in the software development cycle. These tests allow you to develop code quickly and prevent any new code that you add from breaking your application. This is a practice essential to learn as a self-taught developer, as it is a skill that can be used in industry. </p>
<h3 id="heading-how-to-implement-tdd-in-your-projects">How to implement TDD in your projects.</h3>
<p>For this implementation, we will focus on python and a basic project of a calculator. The source code for this calculator can be found here on my <a target="_blank" href="https://github.com/jadams32/day-10">Github</a>. TDD uses a total of four steps. </p>
<ol>
<li>Understanding the final product you are looking to produce including all its features. </li>
<li>Write unit tests based on each feature needed. </li>
<li>Implement feature in code, until tests pass. </li>
<li>Refractor code and repeat.</li>
</ol>
<p>For python, we will implement this using the library unittest, you can find the documentation for unittest <a target="_blank" href="https://docs.python.org/3/library/unittest.html">here</a>.</p>
<p>So with this code already being written, I will just show the implementation of unittest. We will be implementing this for all four functions of addition, multiplication, subtraction, and division. So we must first understand what we would like each of these functions to do, which in our case is fairly simple. We then can create unit tests to make sure these functions work as intended and pass our unit tests. </p>
<p>Here are the functions we will be testing. </p>
<pre><code><span class="hljs-comment"># Addition</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">add</span>(<span class="hljs-params">first_number, second_number</span>):</span>
    <span class="hljs-string">"""Adds two given numbers together"""</span>
    total = first_number + second_number
    <span class="hljs-keyword">return</span> total

<span class="hljs-comment"># Subtraction</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">subtract</span>(<span class="hljs-params">first_number, second_number</span>):</span>
    <span class="hljs-string">"""Subtracts two given numbers"""</span>
    total = first_number - second_number
    <span class="hljs-keyword">return</span> total

<span class="hljs-comment"># Multipliication</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">multi</span>(<span class="hljs-params">first_number, second_number</span>):</span>
    <span class="hljs-string">"""Multiplies two given numbers together"""</span>
    total = first_number * second_number
    <span class="hljs-keyword">return</span> total

<span class="hljs-comment"># Division</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">division</span>(<span class="hljs-params">first_number, second_number</span>):</span>
    <span class="hljs-string">"""Divides two given numbers"""</span>
    total = first_number / second_number
    <span class="hljs-keyword">return</span> total
</code></pre><p>These basic functions from the calculator. py file will allow us to test and understand how to use unittest without worrying about the complication of the individual function. </p>
<p>To test these functions we will import the unittest library and the calculator. py file to be tested. If you notice at the bottom of the file we have the <code>unittest.main()</code> running if the file is called to be run. This prevents us from calling the entire function <code>python -m unittest test_calculator.py</code> in the CLI when we are ready to test. Instead, we can just call the file name as <code>python test_calculator.py</code></p>
<pre><code><span class="hljs-keyword">import</span> <span class="hljs-title">unittest</span>
<span class="hljs-title"><span class="hljs-keyword">import</span></span> <span class="hljs-title">calculator</span>



<span class="hljs-title"><span class="hljs-keyword">if</span></span> <span class="hljs-title">__name__</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'__main__'</span>:
    <span class="hljs-title">unittest</span>.<span class="hljs-title">main</span>()
</code></pre><p>We will then add our test cases in between those lines of code. Start by creating a class that will inherit from the unittest.Testcase class. We will then test our functions starting with the addition function by using assertEqual and passing it the add function from our original calculator. py file. We want to use numbers that we know are correct to ensure the function is working properly. We also want to add any edge cases we can think of like the addition of negatives, floating-point numbers, or zeros. This ensures we fully test the functionality of each function, and we can raise errors when needed. </p>
<pre><code>
<span class="hljs-attribute">import</span> unittest
<span class="hljs-attribute">import</span> calculator


<span class="hljs-attribute">class</span> TestCalculator(unittest.TestCase):

    <span class="hljs-attribute">def</span> test_add(self):
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), <span class="hljs-number">100</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(-<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), -<span class="hljs-number">20</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(<span class="hljs-number">60</span>.<span class="hljs-number">5</span>, <span class="hljs-number">40</span>), <span class="hljs-number">100</span>.<span class="hljs-number">5</span>)


<span class="hljs-attribute">if</span> __name__ == '__main__':
    <span class="hljs-attribute">unittest</span>.main()
</code></pre><p>We can then do this for each of our functions writing test cases for each in the same class. This will show a total of four tests, because unittest views each function as one test. </p>
<pre><code><span class="hljs-attribute">import</span> unittest
<span class="hljs-attribute">import</span> calculator


<span class="hljs-attribute">class</span> TestCalculator(unittest.TestCase):

    <span class="hljs-attribute">def</span> test_add(self):
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), <span class="hljs-number">100</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(-<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), -<span class="hljs-number">20</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.add(<span class="hljs-number">60</span>.<span class="hljs-number">5</span>, <span class="hljs-number">40</span>), <span class="hljs-number">100</span>.<span class="hljs-number">5</span>)

    <span class="hljs-attribute">def</span> test_subtract(self):
        <span class="hljs-attribute">self</span>.assertEqual(calculator.subtract(<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), <span class="hljs-number">20</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.subtract(-<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), -<span class="hljs-number">100</span>.<span class="hljs-number">0</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.subtract(<span class="hljs-number">60</span>.<span class="hljs-number">5</span>, <span class="hljs-number">40</span>), <span class="hljs-number">20</span>.<span class="hljs-number">5</span>)

    <span class="hljs-attribute">def</span> test_multiply(self):
        <span class="hljs-attribute">self</span>.assertEqual(calculator.multi(<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), <span class="hljs-number">2400</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.multi(-<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), -<span class="hljs-number">2400</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.multi(<span class="hljs-number">60</span>.<span class="hljs-number">5</span>, <span class="hljs-number">40</span>), <span class="hljs-number">2420</span>)

    <span class="hljs-attribute">def</span> test_division(self):
        <span class="hljs-attribute">self</span>.assertEqual(calculator.division(<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), <span class="hljs-number">1</span>.<span class="hljs-number">5</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.division(-<span class="hljs-number">60</span>, <span class="hljs-number">40</span>), -<span class="hljs-number">1</span>.<span class="hljs-number">5</span>)
        <span class="hljs-attribute">self</span>.assertEqual(calculator.division(<span class="hljs-number">60</span>.<span class="hljs-number">5</span>, <span class="hljs-number">40</span>), <span class="hljs-number">1</span>.<span class="hljs-number">5125</span>)


<span class="hljs-attribute">if</span> __name__ == '__main__':
    <span class="hljs-attribute">unittest</span>.main()
</code></pre><p>If everything works correctly in our application you should see something like this showing that the tests have passed. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1644356557777/MnfM7XsIM.png" alt="Screen Shot 2022-02-08 at 2.40.43 PM.png" /></p>
<p>Although this is a very basic application and set of tests, we can see how if we start by designing these tests, if we make any mistakes during coding or addition of code to our codebase. These tests will throw an error, and immediately point us to the location to look to fix the code. This is extremely valuable and allows for faster implementation of features, especially very complicated ones. </p>
<h3 id="heading-in-conclusion">In Conclusion</h3>
<p>Learning test-driven development most likely will not be the sole reason that you do not get a position at a software company. Most likely you will learn the development cycle and practices that a particular company uses during training. However, as you can see learning TDD will help you implement better code to your projects and help you produce higher-level code. This allows you to stand out from the crowd and show that you're thinking about the entire process of software development. </p>
]]></content:encoded></item><item><title><![CDATA[Why I Decided To Become A Software Engineer, & Why You Should Too!]]></title><description><![CDATA[Working overnights, being on call, dead-end jobs, or doing something you hate. I think we all at some point have had a job we didn’t like or a career that turns out to not be what we expected. According to a survey done by Zippia.

"50% of workers di...]]></description><link>https://blog.thejohnadamsjr.com/why-i-decided-to-become-a-software-engineer-and-why-you-should-too</link><guid isPermaLink="true">https://blog.thejohnadamsjr.com/why-i-decided-to-become-a-software-engineer-and-why-you-should-too</guid><category><![CDATA[Software Engineering]]></category><category><![CDATA[Junior developer ]]></category><category><![CDATA[learn coding]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[John Adams Jr]]></dc:creator><pubDate>Fri, 21 Jan 2022 03:57:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1642727824310/NLfSWz_8B.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Working overnights, being on call, dead-end jobs, or doing something you hate. I think we all at some point have had a job we didn’t like or a career that turns out to not be what we expected. According to a survey done by Zippia.</p>
<blockquote>
<p>"50% of workers dislike their job. Of course since how we spend our days is how we spend our lives, that means a lot of workers also don't like their lives."</p>
</blockquote>
<p>Employees citied unfair pay, and underappreciation as the leading factors. I believe it doesn't have to be this way, I was in the same scenario before I discovered software engineering. I found that I loved the industry and most importantly loved creating new things through code.</p>
<p>The tech industry is glamorized in movies and pop culture as one with many perks unprecedented to the corporate world. These perks are the things that people gravitate to and contribute to a lot of great talent pushing the industry forward. Because of this many see the tech industry as something that's out of reach and only available to the smartest of humans. I'm here to tell you that this is not the case! I started my journey as a mechanical engineering graduate with little software experience. Sure we worked with some software as students, but nothing close to creating software that enterprises could use. So while I had some basic knowledge I still had a lot to learn before developing even my first hello world print.
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1642728697385/Ng5NWldI21.jpeg" alt="alexander-shatov-DHl49oyrn7Y-unsplash (1).jpg" /></p>
<h2 id="heading-learning-software-development-is-a-superpower">Learning Software Development Is A Superpower!</h2>
<p>The ability to create things from nothing is an in-demand trait. The Tech industry has a high demand for software developers, and the industry is only growing.</p>
<blockquote>
<p>"The employment of software developers is projected to grow 22% between 2019 and 2029." -Bureau of Labor Statistics</p>
</blockquote>
<p>What I have learned in becoming a developer has given me the ability to better solve problems in both industry and everyday life. The ability to take something cumbersome or an issue and solve it with technology is empowering. Not only that but you can take that empowerment to the marketplace and be compensated for what you know! Companies are willing to hire developers that can showcase their abilities, without the need for an ivy level degree. Software development can change the trajectory of your life, it surely is a superpower!</p>
<h2 id="heading-tech-industry-culture">Tech Industry Culture.</h2>
<p>The amazing thing is, software development is something that is accessible to anyone to learn. Many of the resources out there are available for free! Even the paid resources are very affordable! This lends to almost anyone with the drive and passion to be able to break into the tech industry. Taking their career in a direction that best suits them. I've come to learn that the tech industry is very welcoming to people from all walks of life. Plenty of projects are open source, meaning the original source code is made freely available and may be redistributed and modified. So you can learn collaboration and development for large projects, in almost any area of software you are interested in! This can give you industry experience without being employed by a company, and the ability to use the software in personal projects. This is one of the few industries that I have seen this type of collaboration and is one of the reasons technology has been able to grow at insane rates.</p>
<h2 id="heading-industry-pay-perks-andamp-advancement">Industry Pay, Perks, &amp; Advancement.</h2>
<p>Now to the good stuff, the things that the movies and pop culture glamorize. The tech industry has a reputation for being highly paid, this is because devs solve difficult problems that ultimately end in the advancement of the world.</p>
<blockquote>
<p>"The average salary for a software engineer is $117,948 per year in the United States." - Indeed</p>
</blockquote>
<p>For reference the average salary of a household in America was $67,521 in 2020. That's an decrease of almost half (42%) of what you can earn as a software developer. While achievable this will take some work, software development is a taxing role. Problem-solving is a major component of developing solutions to the problems that the world face. The good thing is this is a skill that can be learned like any other and creates a dynamic of each day being a new challenge. There are many things to be learned to become a better developer, and for me, that makes my work exciting!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1642730890621/5CLfAq0Te.jpeg" alt="toa-heftiba-6bKpHAun4d8-unsplash (1).jpg" /></p>
<p>Many companies have great benefits packages, 401k match, gyms, free lunch, the ability to work from home, stock packages, and more. This makes for a fun work environment and allows for much-needed rest if a tough problem comes your way and your brain needs a break. This also fosters collaboration and camaraderie between employees, allowing for better more efficient solutions to the problems faced each day.
The main factor for me is the ability to advance one's career in ways I never thought possible. One can go from not knowing anything about software to being chief technology officer. While working doing much of the things that first brought them to software. This is something I've always wanted to be able to do but has always seemed out of reach. Now while it is surely a large goal involving lots of hard work and dedication, there is a path, and that is inspiring! Even if your goal isn't to become a chief officer, the paths for career advancement are many, this is no dead-end career!</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Software development, if for you, can be a very rewarding career. It is a career path that I have chosen to take to fulfill a lifelong dream of becoming an executive for innovative products. From the perks, pay, and advancements, to the ability to create almost anything, software development could very well be your path to satisfaction in life. I hope this gives you some clarification on if this can be a path for you. If you need a friend along your journey feel free to connect with me on <a target="_blank" href="https://hashnode.com/@CodingRobot">Hashnode</a> or <a target="_blank" href="https://www.linkedin.com/in/john-adamsjr/">Linkedin</a>. I look forward to meeting you out in the community and seeing what amazing projects you might build!</p>
]]></content:encoded></item></channel></rss>