<?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 Peter Okorafor on Medium]]></title>
        <description><![CDATA[Stories by Peter Okorafor on Medium]]></description>
        <link>https://medium.com/@peterdtitan?source=rss-d2a2b27eebf6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vn8QLkTAOiCD7V3gRM2g9A.jpeg</url>
            <title>Stories by Peter Okorafor on Medium</title>
            <link>https://medium.com/@peterdtitan?source=rss-d2a2b27eebf6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:52:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterdtitan/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[Create-React-App is Dead. What Next?]]></title>
            <link>https://medium.com/@peterdtitan/create-react-app-is-dead-what-next-f05aec3dd2d5?source=rss-d2a2b27eebf6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f05aec3dd2d5</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Peter Okorafor]]></dc:creator>
            <pubDate>Wed, 31 May 2023 09:22:09 GMT</pubDate>
            <atom:updated>2023-05-31T09:22:09.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KipFkeYu-kn_nPPm" /><figcaption>Photo by <a href="https://unsplash.com/fr/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the past, create-react-app (CRA) was a popular choice for starting React projects due to its simplicity and ease of use. However, React’s new documentation, released on March 16, 2023, no longer recommends CRA as the go-to solution for creating React applications. Let’s delve into the problems associated with CRA and explore alternative options that React now recommends.</p><h3>Doesn’t CRA Work Just Fine?</h3><p>Well, for the most part, CRA used to be just perfect, but as technologies advance and the need to be dynamic increases, CRA had a lot of issues building up to it slowly being deprecated. Let’s explore some of these.</p><ol><li><strong>Performance:</strong> One of the main issues with CRA is its large dependency size. By default, it comes with over <strong>200 MBs </strong>of dependencies in the <strong><em>node_modules </em></strong>folder, which can negatively impact performance. Alternatives like <strong>Vite </strong>offer a much smaller dependency size of only about 30–34MBs. The smaller dependency size translates to faster updates during development, quicker server startup, faster builds (leading to lower CI costs), and improved user experience. A smaller bundle size is particularly crucial for better conversion rates, user experience, and SEO metrics like First Contentful Paint (FCP) or Largest Contentful Paint (LCP).</li><li><strong>Polyfilling core Node.js modules:</strong> CRA used to include polyfills for core Node.js and these polyfills were designed to make these modules work in the browser, but it was an inappropriate pattern since these modules were originally intended for server-side JavaScript. Although in create-react-app v5 these polyfills were removed, older repositories may still contain these problematic patterns.</li><li><strong>Custom configuration limitations:</strong> CRA imposes certain limitations on custom configurations, such as the inability to override the PostCSS configuration. To overcome these limitations, users would have to perform an “eject,” which essentially involves removing all the configuration files, such as Babel, Webpack, and node_modules, from CRA and taking control of the configuration themselves. This process introduces complexities and maintenance nightmares. Tools like Craco (Create React App Configuration Override) were introduced to help manage the overridden CRA configuration. However, maintaining a project in this manner can still be challenging, as every change in CRA necessitates corresponding adjustments in Craco.</li></ol><h3>Exploring Alternatives To CRA</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iTa_CpmtXDsiXTIjNM_5g.png" /><figcaption>Advantages of Next.js, <a href="https://graffersid.com/what-is-nextjs/">https://graffersid.com/what-is-nextjs/</a></figcaption></figure><h4><strong>Next.js</strong></h4><p>Next.js is a full-stack React framework that not only facilitates building user interfaces but also enables the creation of APIs. Maintained by Vercel, Next.js offers seamless deployment services on their platform. It simplifies the process of deploying Next.js applications and provides a robust solution for front-end development with API capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBAd1UzEjiLt-GKeBlrVsg.jpeg" /><figcaption>Remix Framework</figcaption></figure><h4><strong>Remix</strong></h4><p>Remix is another full-stack React framework. It offers features like nested routes, which can be beneficial for parallel fetching, improving user experience by fetching multiple data sources simultaneously. Remix empowers developers to build powerful and efficient full-stack applications with React.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIbqFNve0TBgVJfZ7JjgxA.png" /><figcaption>Gatsby for headless web</figcaption></figure><h4><strong>Gatsby</strong></h4><p>Gatsby is primarily focused on integrating applications with content management systems (CMS). It excels at creating static sites with a rich GraphQL data layer, allowing easy integration of content, APIs, and various services. Gatsby simplifies the process of building highly performant and scalable React applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*w3vXzhzpMVTjU31G4mCYtQ.jpeg" /><figcaption>Vite JS 2.0</figcaption></figure><h4><strong>Vite</strong> <strong><em>(not recommended by React docs but worth mentioning)</em></strong></h4><p>While Vite is not explicitly recommended in React’s new documentation, it is similar to CRA in terms of supporting client-side rendering. Vite is a development tool that provides advanced features like hot module replacement (HMR), the fast server starts, native TypeScript support, and more. It offers a streamlined development experience for React projects and is particularly useful for frontend-only applications.</p><p>By considering alternatives like Next.js, Remix, Gatsby, and even Vite, developers can benefit from frameworks that offer improved performance, enhanced development capabilities, and streamlined workflows. Making informed choices based on project requirements and considering the recommendations in React’s new documentation will ensure that developers can create React applications that are optimized, efficient, and provide excellent user experiences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f05aec3dd2d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing for Failure in Software Development and Testing]]></title>
            <link>https://medium.com/@peterdtitan/designing-for-failure-in-software-development-and-testing-9f3f2d0bbd7b?source=rss-d2a2b27eebf6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f3f2d0bbd7b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Peter Okorafor]]></dc:creator>
            <pubDate>Tue, 02 May 2023 15:34:02 GMT</pubDate>
            <atom:updated>2023-05-02T15:34:02.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0AeSt8jPDvVFoLRd" /><figcaption>Photo by <a href="https://unsplash.com/pt-br/@nublson?utm_source=medium&amp;utm_medium=referral">Nubelson Fernandes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As software becomes more complex, it is increasingly important to design systems with failure in mind. In the past, it was common to design software assuming that everything would work as intended and that any failures would be rare and easily recoverable. However, this approach is no longer sufficient, as even the smallest failure can have significant consequences.</p><blockquote><strong>This is one of the reasons DevOps measurements moved from “mean time to failure” to “mean time to recovery.” It’s not about trying not to fail.</strong></blockquote><p>Designing for failure means acknowledging that failures will happen, and building systems that are resilient to those failures. This approach involves identifying potential points of failure, designing systems to minimize the impact of those failures, and implementing testing strategies that simulate failures to ensure that the system can recover from them.</p><p>Building resilient applications is a critical aspect of software development. Resilient applications are designed to handle failures gracefully and recover quickly when things go wrong. This is important in today’s fast-paced world, where downtime can lead to significant financial losses and reputational damage. In this article, we will discuss four patterns that are important strategies for designing for failure and building resilient applications.</p><h4><strong>1. Circuit Breaker Pattern</strong></h4><p>The circuit breaker pattern is a well-known design pattern that is commonly used in modern software development. The circuit breaker pattern is used to prevent cascading failures in a distributed system. It works by wrapping calls to remote services with a circuit breaker object that monitors the number of failures. When the number of failures exceeds a certain threshold, the circuit breaker trips and redirects calls to a fallback service or a cached response. This pattern helps prevent a single point of failure from bringing down an entire system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*U0Sx4vR6B9Fu6iVKRq9lFg.png" /><figcaption>Image credits: <a href="http://twitter.com/dineshchandgr">@dineshchandg</a>r</figcaption></figure><h4>2. Retry Pattern</h4><p>The retry pattern is used to handle transient failures that occur when calling remote services. Transient failures are temporary failures that can be resolved by retrying the operation. The retry pattern involves retrying the operation a certain number of times before giving up and returning an error. This pattern can be used to handle network outages, timeouts, and other transient errors that may occur when calling remote services.</p><blockquote><strong>For example, I have heard developers say “You have to deploy the database first because my app expects it to be already provisioned and running.” This is not a good design pattern</strong></blockquote><p>The key is to improve the number of retries exponentially.</p><h4>3. Bulkhead Pattern</h4><p>The bulkhead pattern is used to isolate failures in a system by dividing it into smaller, independent components or partitions. Each partition has its own thread pool, database connection pool, and other resources. This pattern helps prevent a single point of failure from bringing down an entire system by limiting the impact of failures to a specific partition. This pattern is commonly used in microservices architecture and is an effective way to improve resilience in distributed systems.</p><p>Imagine you are building an e-commerce website that consists of multiple services, such as a product catalog service, a shopping cart service, a payment service, and a shipping service. Each service runs in its own container or virtual machine, and each service has its own thread pool, database connection pool, and other resources.</p><p>If the website experiences a sudden surge in traffic, the product catalog service might become overwhelmed and start to fail. Without the bulkhead pattern, this failure could cause the entire website to crash or become unavailable, even if the other services are still functioning normally.</p><blockquote>With the bulkhead pattern, however, the product catalog service is isolated from the other services, and its failure is contained within its own partition. The other services continue to operate normally, and the website remains available to users.</blockquote><h4>4. Graceful Degradation Pattern</h4><p>The graceful degradation pattern is used to handle situations where the system is under heavy load or experiencing failures. Instead of returning an error or crashing, the system degrades gracefully by disabling non-critical functionality or reducing the quality of service. This pattern helps maintain the availability of the system under adverse conditions and ensures that critical functionality remains available.</p><p>Another scenario — imagine you are building a ride-sharing app that allows users to request rides from nearby drivers. The app relies on a number of services, including a user authentication service, a ride-matching service, a payment service, and a driver tracking service.</p><p>If the ride-matching service experiences a heavy load or is otherwise unavailable, the app could become unresponsive or crash, preventing users from requesting rides and potentially leading to lost business.</p><p>To prevent this, you can implement the graceful degradation pattern. When the ride-matching service is under heavy load or experiencing failures, the app can gracefully degrade by disabling non-critical functionality, such as the ability to view driver ratings or request premium features, and reducing the quality of service, such as increasing the estimated wait time for a ride.</p><p>By degrading gracefully, the app can continue to function and provide basic ride-hailing functionality, such as matching users with nearby drivers and allowing them to request rides. This helps maintain the availability of the system under adverse conditions and ensures that critical functionality remains available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n6xoilagbxBIM8b8" /><figcaption>Photo by <a href="https://unsplash.com/@leoncooper?utm_source=medium&amp;utm_medium=referral">Leon Liu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In today’s complex and rapidly changing software landscape, designing for failure is essential to building resilient applications that can handle unexpected challenges and recover quickly. The circuit breaker pattern, retry pattern, bulkhead pattern, and graceful degradation pattern are all proven strategies for designing for failure and improving the resilience of modern software applications. By incorporating these patterns into your software design and testing strategies, you can create applications that are better equipped to handle the challenges of today’s fast-paced, highly interconnected world, and provide a better user experience for your customers. Remember, designing for failure isn’t just about preventing downtime, it’s about building applications that can withstand and recover from any failure or unexpected event, ensuring that your systems continue to operate smoothly and reliably in the face of adversity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f3f2d0bbd7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Advent of AI in Software Engineering: Pros and Cons]]></title>
            <link>https://medium.com/@peterdtitan/the-advent-of-ai-in-software-engineering-pros-and-cons-7e0f66c506fe?source=rss-d2a2b27eebf6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e0f66c506fe</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Peter Okorafor]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 17:40:54 GMT</pubDate>
            <atom:updated>2023-04-28T17:40:54.679Z</atom:updated>
            <content:encoded><![CDATA[<p>The emergence of artificial intelligence (AI) has brought about a revolution in software engineering. AI has the potential to automate several repetitive and tedious tasks in the software development lifecycle, such as testing, debugging, and code generation. The use of AI in software engineering has led to faster software development, higher-quality code, and increased productivity. However, like any new technology, AI has its pros and cons. In this article, we will discuss the pros and cons of the advent of AI in software engineering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xhFljnxfxOBZ6UPJPcRFvA.png" /><figcaption>AgentGPT describes tasks to take over the roles of traditional engineers.</figcaption></figure><p>Pros:</p><p>1. Automation of repetitive tasks: AI can automate several repetitive and tedious tasks, such as testing and debugging. Automated testing can be much faster and more efficient than manual testing, freeing up time for developers to focus on more critical tasks.</p><p>2. Improved code quality: AI can analyze large amounts of code to identify patterns and anomalies that may be missed by human developers. AI can also help identify potential security vulnerabilities and suggest ways to fix them.</p><p>3. Increased productivity: AI can help developers work more efficiently by automating time-consuming tasks, reducing the time it takes to complete a project. This increased productivity can lead to faster time-to-market and reduced development costs.</p><p>4. Predictive maintenance: AI can be used to monitor software systems and predict potential failures before they occur. This can help prevent downtime and ensure that the software is always available and functioning correctly.</p><p>Cons:</p><p>1. Lack of creativity: While AI can automate many repetitive tasks, it cannot replace the creativity and problem-solving skills of human developers. Developers still need to be involved in the design and implementation of software systems to ensure that they meet the needs of users.</p><p>2. Bias and errors: AI algorithms can be biased or contain errors, leading to incorrect or incomplete results. This can be a significant concern when it comes to software systems that affect people’s lives, such as healthcare or transportation systems.</p><p>3. Job displacement: The automation of certain tasks may lead to job displacement for some developers. However, it is important to note that AI will create new job opportunities, such as data scientists and machine learning engineers.</p><p>4. Dependency on AI: Over-reliance on AI may lead to a lack of understanding of the underlying systems and algorithms. Developers need to understand how AI works to ensure that they can create and maintain software systems effectively.</p><p>In conclusion, the advent of AI in software engineering has both advantages and disadvantages. While it offers numerous benefits, it also poses challenges that must be addressed. The role of human developers is still essential in software engineering, and AI should be viewed as a tool to aid them, rather than a complete replacement. By utilizing the strengths of both AI and human developers, we can create software systems that are efficient, high-quality, and meet the needs of users while being mindful of the potential risks and limitations of AI. As AI continues to evolve, it is important to remain informed and adaptable, recognizing both its potential and its limitations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e0f66c506fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>