<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Olajumoke Lawal on Medium]]></title>
        <description><![CDATA[Stories by Olajumoke Lawal on Medium]]></description>
        <link>https://medium.com/@ojmktechjrny?source=rss-28d220524893------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y8HRqhBfHOqgKGSu2w3B-Q.jpeg</url>
            <title>Stories by Olajumoke Lawal on Medium</title>
            <link>https://medium.com/@ojmktechjrny?source=rss-28d220524893------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:31:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ojmktechjrny/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CI/CD: The Backbone of Modern Software Delivery]]></title>
            <link>https://medium.com/@ojmktechjrny/ci-cd-the-backbone-of-modern-software-delivery-09811d727ee9?source=rss-28d220524893------2</link>
            <guid isPermaLink="false">https://medium.com/p/09811d727ee9</guid>
            <dc:creator><![CDATA[Olajumoke Lawal]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 11:49:49 GMT</pubDate>
            <atom:updated>2025-07-21T11:49:49.809Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>CI/CD: The Backbone of Modern Software Delivery</strong></p><p>In the fast-paced world of software development, releasing reliable and scalable applications quickly is no longer a luxury but a necessity. CI/CD, which stands for Continuous Integration and Continuous Delivery (or Deployment) have emerged as foundational practices for achieving this goal. Whether you’re working on a startup or scaling a microservices-based architecture, CI/CD pipelines are the glue that holds your development and operations together.</p><p><strong>What is CI/CD and why does it matter?</strong><br>CI/CD is a modern software development approach that emphasizes automation, speed, and reliability in delivering software changes. It replaces the traditional, sequential waterfall model with a more iterative and collaborative process.</p><p>Continuous Integration (CI) involves developers frequently merging their code changes into a shared repository, triggering automated builds and tests to quickly validate that new code doesn’t break existing functionality. This practice ensures early detection of bugs, smoother collaboration among team members, and rapid feedback. This not only improves code quality but also allows teams to maintain a steady and reliable release pace.</p><p>Continuous Delivery builds on Continuous Integration by ensuring that all code changes are automatically tested and packaged so they can be manually deployed to production at any time, while Continuous Deployment pushes those changes to production environments automatically after passing all tests.</p><p><strong>How it works?</strong></p><p><strong>1.Code Commit and Integration (CI)</strong></p><p>The CI/CD process begins when a developer commits code to a version control system like Git (e.g., GitHub, GitLab, Bitbucket). In Continuous Integration (CI), developers frequently push code changes to the shared repository, usually merging into a main branch. Every time code is merged, an automated process is triggered by a CI tool (like Jenkins, GitHub Actions, GitLab CI, CircleCI, or Harness CI). The CI server pulls the latest code and performs code quality checks to verify that new changes don’t break existing functionality.</p><p>This step provides immediate feedback to developers. If a build fails or tests don’t pass, the process stops and alerts the team, allowing quick fixes. The main goal here is to maintain a codebase that is always in a deployable state.</p><p><strong>2.Automated Testing</strong></p><p>After successful integration, automated testing plays a critical role in verifying that the software behaves as expected. This includes unit tests for individual components, integration tests to ensure components work together, smoke tests to check basic application functionality and optional security, performance, or UI tests depending on the pipeline.</p><p>Automated testing increases confidence in the code and catches issues early, reducing the risk of bugs reaching production.</p><p><strong>3.Continuous Delivery (CD)</strong></p><p>Once the code passes testing, it’s packaged and moved through additional environments like Integration, Staging, Pre-production. At each stage, more advanced tests like end-to-end and user acceptance tests, may run. Continuous Delivery ensures that the application is always in a release-ready state, though the actual release to production is typically done manually or on a schedule.</p><p><strong>4.Finally, Continuous Deployment</strong> (Optional)</p><p>Continuous Deployment takes automation a step further. Once code passes all required tests and quality gates, it is automatically deployed to the production environment without manual intervention. This phase includes:</p><p>· Deployment to live users</p><p>· Real-time monitoring for performance and error tracking</p><p>· Automated rollback mechanisms in case of failures</p><p>Continuous Deployment accelerates delivery and allows organizations to release new features, bug fixes, and improvements quickly and continuously.</p><p><strong>Benefits of CICD</strong></p><p><strong>1. Faster Product Delivery:</strong> CI/CD automates the build, test, and deployment process, enabling frequent and rapid software releases. This allows teams to respond quickly to market demands, user feedback, and security requirements.</p><p><strong>2. Improved Software Quality:</strong> Automated testing ensures every code change is verified early and often, reducing bugs in production and maintaining high code quality throughout the development lifecycle.</p><p><strong>3. Reduced Risk and Easier Rollbacks:</strong> Frequent testing and deployment make it easier to catch issues early. If problems do occur, CI/CD systems support quick rollbacks to previous stable versions, minimizing downtime and user impact.</p><p><strong>4. Increased Developer Productivity:</strong> By automating repetitive tasks and reducing manual errors, CI/CD frees developers to focus on writing and improving code. This leads to a more efficient and motivated engineering team.</p><p><strong>5. Cost-Effectiveness:</strong> Early detection of bugs, reduced manual processes, and faster release cycles all contribute to lower development costs and a higher return on investment (ROI).</p><p>All these benefits compound over time, leading to a more agile, resilient, and successful software development process.</p><p><strong>Best Practices for CI/CD</strong></p><p>1. Keep pipelines fast — Optimize your builds and run tests in parallel.</p><p>2. Use feature flags — Deploy your code without exposing unfinished features.</p><p>3. Test everything — Unit, integration, security, and load tests, are all vital.</p><p>4. Monitor post-deploy — Use observability tools to catch issues early.</p><p>5. Rollback readiness — Always be prepared to revert a failed release.</p><p><strong>Challenges to Watch Out For</strong></p><p>While CI/CD offers significant advantages, it also comes with its share of challenges. One common issue is pipeline complexity. If not thoughtfully designed, pipelines can become fragile or overly complicated, making them difficult to maintain. There are also security concerns, particularly around the handling of secrets and credentials, which must be managed with care to avoid exposing sensitive data. Additionally, adopting CI/CD often requires a cultural shift within teams. This change in mindset and collaboration practices can be met with resistance, especially in organizations used to traditional development workflows. However, with the right tools, proper training, and a willingness to adapt, these challenges can be successfully overcome.</p><p><strong>Conclusion</strong></p><p>CI/CD is a transformative approach to software development that automates the entire delivery pipeline from code integration to testing and deployment. It enables faster, more reliable software releases, improves code quality, and enhances team collaboration. While there are challenges like pipeline complexity and cultural adaptation, the long-term benefits make it a valuable investment.</p><p><strong>Olajumoke Olayinka LAWAL<br>DevOps Engineer</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09811d727ee9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Testing: What, Why, and How?]]></title>
            <link>https://medium.com/@ojmktechjrny/unit-testing-what-why-and-how-d322524cb9e3?source=rss-28d220524893------2</link>
            <guid isPermaLink="false">https://medium.com/p/d322524cb9e3</guid>
            <dc:creator><![CDATA[Olajumoke Lawal]]></dc:creator>
            <pubDate>Tue, 17 Jun 2025 09:00:07 GMT</pubDate>
            <atom:updated>2025-06-17T09:00:07.641Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of software development, quality assurance isn’t optional but essential. One of the foundational pillars of writing reliable and maintainable software is unit testing. Whether you’re working on a small script or a large-scale enterprise application, unit testing is your first line of defense against bugs.</p><p>In this article, we’ll break down what unit testing is, why it’s important, how to write good unit tests, and explore some examples in Python using pytest.<br> <br><strong>What is Unit Testing?<br> <br></strong>Unit testing is a software testing technique in which individual components or units of a program are tested in isolation to verify that they function as expected. A unit can be a function, method, or class, and the goal is to ensure that each of these smallest parts of the application behaves correctly when provided with known inputs and produces the expected outputs.</p><p>This process is typically performed by developers and involves writing and running tests that target specific units of code. The tests are executed independently and automatically, often during the development phase, to check the correctness of each code segment. If a test fails, it immediately highlights which part of the code is malfunctioning, making it easier to locate and fix the issue.</p><p>Unit tests are designed to be quick, clear, and concise. They are run frequently, either one at a time or as a group, and usually before integration testing begins. These tests must be easy to read and maintain, even when dealing with complex logic or multiple variables. By isolating and validating individual components, unit testing ensures that each part of the software works correctly on its own before being integrated with other parts of the system.<br> <br><strong>Why Unit Testing Matters<br> <br></strong>Before diving into the how, it’s helpful to frame why unit testing deserves a dedicated focus in any development process. The following list outlines the key advantages you’ll gain by adopting unit testing, from catching bugs early to empowering a more modular and maintainable codebase.</p><p><strong>1.</strong> <strong>Early Bug Detection:</strong> Catch defects immediately as you write code, before they propagate into larger, harder-to-find issues.</p><p><strong>2. Safe Refactoring: </strong>Verify that behavior remains correct when you restructure or optimize code, giving you confidence to improve internals.</p><p><strong>3. Executable Documentation:</strong> Serve as live examples of how each unit is intended to work, making it easier for new team members to understand expected behavior.</p><p><strong>4. Isolated Debugging:</strong> Pinpoint failures to a single function or method, drastically reducing the time spent tracing through integrated modules.</p><p><strong>5. Modular Design Enforcement:</strong> Encourage developers to write loosely coupled, single-responsibility units, since tightly coupled code is harder to test in isolation.</p><p><strong>6. Regression Prevention:</strong> Automatically guard against previously fixed bugs reappearing when you add features or make other changes.</p><p><strong>7. Faster Feedback Loop:</strong> Run small, focused tests in milliseconds, so you can get instant validation without waiting for full-system or manual tests.</p><p><strong>8. Cost Savings Over Time:</strong> Resolve defects early, when they’re cheapest to fix rather than during expensive later stages like system or acceptance testing.</p><p><strong>9. Supports Continuous Integration:</strong> Integrate tests into automated pipelines so that commits are verified immediately, preventing broken builds from reaching shared branches.</p><p><strong>10. Facilitates Parallel Development:</strong> Different team members can confidently work on separate units, knowing their changes won’t unknowingly break others’ code.</p><p><strong>How to Unit Test</strong></p><p>Different programming languages come with their own unit-testing frameworks. Here are some common ones:</p><p>· Python: unittest, pytest, nose</p><p>· JavaScript: Jest, Mocha</p><p>· Java: Junit</p><p>· C#: NUnit, xUnit</p><p>· Go: Built-in testing package</p><p>But for this explanation, we’ll focus on Python using pytest.</p><p>A well-written unit test follows the <strong>AAA Pattern</strong>, Arrange–Act–Assert.</p><p>· Arrange: Set up the test environment, including any necessary data or mocks.</p><p>· Act: Call the function or method under test.</p><p>· Assert: Check that the result is what you expect.</p><p><strong>Example:<br></strong>Suppose you have a simple function that adds two numbers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*njhot-7ehmQcu7MFH7wQXA.png" /></figure><p>Here’s how you can write a unit test for it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*DgJ10kvgOCBK_k1bvzIDUg.png" /></figure><p>You can run this test with the command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*8ovjyUJDVx0y1nnx-PGBVA.png" /></figure><p><strong>Mocking with unittest.mock</strong></p><p>If your code talks to APIs, databases, or external services, use unittest.mock to simulate those dependencies.</p><p><strong>Example:<br></strong>Say you have a simple register_user function that handles user registration. You want to test it without calling a real database.</p><p><strong>Assumption:</strong></p><p>· You have a function called get_user_by_email to look up existing users.</p><p>· You have a function called save_user_to_db to save a new user.</p><p>Module to test: register.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*lc4D1NYc6ODWRukmI9hogw.png" /></figure><p>Test file: test_register.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*UFVo-iO361uELfN6QlkJBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*c1zuT9lLaqK_8-b6OyY5_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*9CqI5cDJAT2DU9tINYar-A.png" /></figure><p>To run the above test, first ensure you have installed pytest using this command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*LiNT2wiixecWoAD1zeXdCg.png" /></figure><p>Then run the command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*Ytpte1iS_8Qlo6pi_pzuFw.png" /></figure><p>This will run all three test cases and use mocks to safely simulate interactions with the database functions.</p><p><strong>Conclusion</strong></p><p>Unit testing is an essential part of software development. It ensures individual components of your code work correctly and remain stable during changes. By using structured approach that helps you plan, write, run, and analyze your function, you can catch bugs early and build more reliable applications.</p><p><strong>Olajumoke O. Lawal<br>DevOps Engineer</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d322524cb9e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>