<?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 John Walter Munene Njeru on Medium]]></title>
        <description><![CDATA[Stories by John Walter Munene Njeru on Medium]]></description>
        <link>https://medium.com/@Munene254_?source=rss-d4f06cfc77cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KBwe5RwutF6quP3BJJKcRQ.jpeg</url>
            <title>Stories by John Walter Munene Njeru on Medium</title>
            <link>https://medium.com/@Munene254_?source=rss-d4f06cfc77cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:19:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Munene254_/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[Building Something of My Own: The Story Behind The Expertise Wins]]></title>
            <link>https://medium.com/@Munene254_/building-something-of-my-own-the-story-behind-the-expertise-wins-ad3bfcaab70e?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad3bfcaab70e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 22:02:03 GMT</pubDate>
            <atom:updated>2026-10-31T05:48:28.308Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Building The Expertise Wins from scratch: a self-taught developer’s journey through coding, AI, entrepreneurship, setbacks, and the pursuit of owning a lasting product.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*YTASInOkvabAfyBCvPZ22Q.png" /><figcaption>The Expertise Wins Landing Page</figcaption></figure><p>It’s been roughly three months since I finished all the core lessons of The Odin Project’s full-stack web developer curriculum. I didn’t do the three final projects because I felt they would only let me practice all the skills I have been learning across the entire curriculum, but I wanted to work on a real-world project.</p><p>During that time, I worked on an interesting sports prediction project and secured a software development internship. I’ve also immersed myself in new tools like Docker and can run several application developments in parallel without even installing a database on my PC. I’ve worked with two new frameworks, Next.js and Nest.js, learned how to structure large-scale apps, and written a few articles around web scraping.</p><p>All these activities have been interesting, but I’m mostly intrigued by The Expertise Wins, as it’s a project I pulled off against all the odds, even in the face of discouragement from top sites that give football tips not to tip or write. Yet I’m proud of what I’ve built.</p><p>While I still haven’t hosted the project or put it out to market, I have found joy and excitement in working through this challenge. Building in the current era requires adoption of AI, so I must express the role AI played in bringing The Expertise Wins to life.</p><p>Welcome to the story of my first full-stack project, which I use in daily life and that helps some of my friends who like to wager on sports.</p><h3>A New Phase in My Journey as a Programmer: Systems</h3><p>Before I talk about how I built The Expertise Wins, I have to say that today is the last day of my first month as a software developer intern at AppKings Solutions LTD. My time at AppKings and the near launch of my product have really changed how I relate to and think about programming. I’ve begun to see code from a different, deeper perspective.</p><p>I see products and think about the architecture behind them, and how much effort has been put into putting together much of the reusable software out here. I’m no longer seeing coding as just learning technologies and completing exercises. I’m thinking about systems, modules, maintenance, long-term market survival, security, and evolution.</p><p>Most importantly, I’m surprised by how much effort it takes to pull together a usable product, build the software’s core pillars, and separate and organize code. And different ways to think about a product, including possible business models for it. Work has had me thinking about enterprise software from a different perspective.</p><h3>The Idea Behind The Expertise Wins: Provide Sport Tips</h3><p>When I was on campus, I sold sports tips by analyzing SofaScore data and identifying the best wagers — basketball was my favorite. In the first month of building The Expertise Wins community, I did not lose a single prediction. This led me to a few subscriptions for these tips and a vibrant community. Somehow the business collapsed. Rebuilding it…</p><p>Now that I had learned how to code, it was a bit interesting to turn these skills into money by working on something. After finishing the lessons from Odin, I opted to start my job search as I was building. The Expertise Wins, as part of a larger product whose PR was lost, somehow evolved into its own project.</p><p>The idea was to automate the manual work I used to do to find valuable, accurate tips. If I were to automate the process by scraping SofaScore in a web browser, it’d be a lot of work, and I’d need a repeatable process. There are ready-made scraper APIs like those made for SofaScore by Apify.</p><p>But why struggle analyzing that data when someone is already providing public tips for free? I settled on scraping one website well and getting the best out of it. One thing I had identified was that they had tips with a high win rate, but much of their work is embedded in long articles that take time to consume. No one has this time, really! The Expertise Wins was originally developed as an API (in mind) to deliver these tips.</p><h3>Building With Uncertainty: No Job, Bills to Pay, and a Product to Create</h3><p>Amid the challenges, I have bills to pay and no job, so some parts of the project were planned in “panic mode” as I tried to survive the hard economic times I’m facing in Kenya right now. In the middle of September, I spun up an MVP for the project, which was just a web scraper that fetched a few pages and logged the output to my console.</p><p>This was also at a time when I worked for an Indian startup named ZITO Tech Africa, and the founder did not remunerate me, with incomplete project documentation as the leading cause of the delayed funding. Will the bills remain unpaid, no likely. In the middle of it, I decided to refine The Expertise Wins into a usable command-line application that logs data in organized group tiers, both free and paid.</p><p>I brought in my experience from past manual tips, emphasizing that people want data they can rely on and that is easy to interpret and work with. My biggest problem was making the data simple to interpret and easy to use while keeping it in a consistent, unique format. This was the sword I drew for this project.</p><h3>Designing The Expertise Wins: Turning an Idea into a System</h3><p>When I first built the command-line application, it was grouped into scrapers, normalizers, an orchestrator, services, and tests, each performing a task, as the names suggest. The scraper would fetch pages. The normalizer would convert the scraped data into a predictable format, and the orchestrator would initiate all this in an orderly sequence. The services would group the data into appropriate tiers, and the tests would log the successful outcomes in the orchestrator. This version logged useful data.</p><p>After several code refactors due to the lack of a blueprint for this project, I was able to fine-tune my scraper into a more stable scraper and pretty printer. Now that I’m able to get these tips, what is the first thing I’d want to do? Keep the data, so I added a directory to take these JSON dumps.</p><p>JSON is easy to work with and is returned in many APIs. Experimenting with it at this stage was still a viable option. Updating JSON is easy, so the next thing I added to the application was a way to store and update dumps from the immediately previous day.</p><p><strong><em>This meant that the workflow would be to scrape today’s tips, sleep on them, wake up tomorrow, look for yesterday’s outcomes, settle yesterday’s tips, scrape the day’s tips… repeat, repetitively.</em></strong></p><p>Because this was a small project and I do not have the funds to pay for an API that I can use to settle tips, I opted to settle the tips manually on Telegram, then use the update outcomes text to settle yesterday’s tips. In subsequent iterations, I was sure that the engine of my application was running and that business was running around it on the Telegram channel; only a web presence would be needed.</p><p>This was when I scaffolded the project into a three-part application: a frontend users use to access the data, a backend API that powers the frontend and stores the data, and a CLI application that serves as the source of this data.</p><p>I started by designing my backend API into models that would be easy to consume on the frontend, so I came up with the following core routes: admin, authentication, products, subscriptions, tips, and stats. I designed a few core pages: a landing page, a tips page, an archive, a stats view, and an about page, and I also included an admin page to consume my API.</p><p>I used AI to fine-tune my logic when writing the API routes, controllers, and database access, as I did in reviewing the frontend appearance. One of my past employers had posted on LinkedIn that they give a year’s subscription for all AI models in a single place after reposting and commenting. I used Sparkian by Geekflare to review and polish my files.</p><p>As I kept iterating on The Expertise Wins’ source code, I also kept updating the project documentation to track how the project has evolved since its inception. I’ve received an offer letter to join a software development company, so I Dockerized my application to ensure it wouldn’t crash on those at work. If they were colliding, it’d be on competing for my computing resources, which I can control by working on each service at a time.</p><p>I have since added more important pages, including privacy, terms and conditions, contributions, project support, and a blog that will serve as an educational resource for users. I have also added an administration interface that can manage subscriptions, review application usage, update, and settle tips. As I polish this application, I’m ready to go live, but there have been blockers along the way.</p><h3>The Challenges That Shaped the Build: Workarounds</h3><p>One of the most difficult parts of building The Expertise Wins was developing stable, reliable web scrapers. Building a do-it-yourself scraper wasn’t easy, but there is no money to pay for a web scraper API like Bright Data. What option do I have, though? I use Google AI Studio to polish up my scrapers.</p><p>Also, the target website I was working with has deployed Cloudflare turnstiles, which means I must use a real browser to access the pages. I used Puppeteer for this, and it worked. While this workaround works, I cannot deploy this section of my application, so I decided to create a normalized sync script that can be used both locally and to seed data for every scraper into the production database. Is this reliable and secure in the long term?</p><p>Another challenge was that I had no clear blueprint to follow, and I was building features as I thought I needed them. The advantage of this was that I could focus on the most important features. Still, the overall long-term architecture was also shaping and reshaping itself across the scraper, frontend, and backend. Designing a good API was also a challenging and interesting section of this project.</p><p>There are also no clear requirements defining a version that would hit the market, and no clear direction for what would succeed this version. Coming up with these separations was not easy either. I just kept going, and somehow the application has evolved into a usable product worth iteration. I don’t have funds to host or market it.</p><h3>From Codebase to Product: Getting The Expertise Wins Ready for Launch</h3><p>In the last month, I haven’t added new features. I’m getting feedback from a few developers as I test the project and fix bugs and other broken functionality. This is also why I will not add any additional photos from the app for interested developers to test the application locally until I go live, after which I may go private.</p><p>I have caught many bugs, and I have also fine-tuned all the features I consider core of the application. I have also added a rich footer with links to key pages that help people understand what I’m building. Only two developers have tested out the application, and their feedback was that I was giving a casino-like experience. I’m also looking to get a paid GitHub Copilot to review and polish my work before trying to get it out there.</p><p>At this time, The Expertise Wins has been reporting daily tips to Telegram, and the results have been amazing. On the revenue front, I’ve only earned 5,000 Ksh, which is a good sign that folks are interested in and seeing value in my work. I still need to rethink my strategies, especially around distribution, hosting, and deployment, and how to launch smoothly as well as continue building while supporting active users. I’m excited to see how it turns out.</p><h3>The Journey Is Far From Over: We Are Just Getting Started</h3><p>Building The Expertise Wins has been one of my most interesting projects, for I have built a system that powers a real community, and a software project that I use every day, on which other developers can contribute to and make the sport’s life for every bettor out there better. I have also learned a few things about delivering full-stack applications.</p><p>While this project is far from over, I already have a real application that users have paid for, even while it’s still in development. I have also learned something about believing in the path and waiting to see what turns out of a vision if you choose to pursue it. I’m also looking to see The Expertise Wins project sustain itself through reliability so it can grow exponentially.</p><p>I have also designed the tier prices with an African Market’s first approach in mind so that I can help my fellow citizens and Kingsmen firsthand. The Expertise Wins is built for a Kenyan-first ecosystem, but it is also designed to be a first-class application globally.</p><p>My long-term interest is to bring this application to the world and continue expanding it to higher levels. It has also given me some confidence as I enter the world to work with other software engineers at the enterprise level.</p><p>Having been self-taught, I want to have something out there that demonstrates that I can build stuff. I also want to own a codebase of mine for a long time, one that I shape, evolve, and learn from. This is what The Expertise Wins has given me. I want to make it better based on users’ responses and continue building with intention. Should we sell it as a package that others can rehost, or as a license where I own the database? As a dev API?</p><p>I know you’re interested in where this one goes. Does it survive the test of time? Will it grow? Here’s the link to <a href="https://github.com/john-walter-munene/The-Expertise-Wins-API">The Expertise Wins API on GitHub</a>. Review it!</p><p>If you’d like to work with me on an interesting project, shoot me an email at <a href="/service/mailto:midwaymaster10@gmail.com">midwaymaster10@gmail.com</a>, and let’s work on something great together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad3bfcaab70e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Frontend Debugging in Production Is So Hard and What Teams Miss]]></title>
            <link>https://javascript.plainenglish.io/why-frontend-debugging-in-production-is-so-hard-and-what-teams-miss-e72384046c35?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e72384046c35</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 01:52:13 GMT</pubDate>
            <atom:updated>2026-09-17T01:52:13.749Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why is frontend debugging so hard in production? Explore common JavaScript production issues, observability gaps, and practical debugging strategies teams often miss</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Mtcf3-l1ic6Ew_-BnekuVA.png" /></figure><p>Ever since I became a full-stack JavaScript developer, I have seen a massive shift in how programming is learned and how production software is built. I had a lot of context for how JavaScript works, with no exposure to production software development paradigms and workflows.</p><p>When I made my first open-source contributions, it was on a Web3 company blog built with NextJS, TypeScript, and Markdown that all authors would use to publish new content. Before committing to GitHub, I’d ensure that my code passed all tests and worked on my PC. Whenever I opened a pull request, the project lead would run the tests before merging it into main. Huge bravo!</p><p>At one point, my work was merged into production, and for some reason, all the images embedded in the blogs weren’t rendering, even after double-checking everything. It took me three days to figure out why. I was building in a Windows environment while the project was being deployed to a Linux Server (server-side rendered (SSR app), and it turns out that image naming conventions are case-insensitive on Windows, but Linux isn’t as forgiving.</p><p>I have come to realize that JavaScript errors are easy to reproduce until they reach production. This article explains why modern JavaScript applications have become easier to build but harder to debug in production. I will draw on my experience and what I have seen work at most development teams, with a focus on frontend debugging of production issues.</p><h3>1. Production Bugs Behave Differently from Local Bugs</h3><p>The development environment is often isolated and controlled, while users experience a chaotic one with production debugging challenges. In development, you’ll often envision a natural, predictable workflow, while users will open interfaces in strangely unpredictable orders based on the parts of your application they care about.</p><p>While you, the developer, will work with the latest browsers and stable connections, a user may have an outdated browser and a poor connection. Test databases are populated with predictable data, but application usage introduces diverse data types. Timing problems are only visible under load if background processes pile up faster than the workers process them.</p><p>During the build phase, many external APIs are stable, whilst in deployment, you might have to deal with constraints such as a limited number of requests (<a href="https://medium.com/javascript-in-plain-english/what-are-the-best-practices-for-api-security-a-complete-guide-to-securing-modern-apis-0ed7a3f04b6a">api rate limiting and throttling</a>). Other limitations include memory and resources, which you can’t assume end users of your web app have. Do you often examine the time and space complexities of your code? Doubtful.</p><p>Console logs are a good development tool, but in production, debugging with them rarely provides the context for which a functionality fails, and in many cases, how can you log what you aren’t expecting? Testing indicates the presence of bugs, but never their absence, production telling the truth. Dan Luu, a senior hardware and software engineer explains it in the title, <a href="https://danluu.com/testing/">how to test software</a>. Let’s chat specifics.</p><h3>2. Modern Frontends Have Too Many Moving Parts</h3><p>When developers opted to use frameworks to make their work easier, I couldn’t help but appreciate the intentional effort that goes into a library like ReactJS. As for whether frontend complexity is essential or accidental, I will not answer yet…</p><p>One thing I’m confident about is that every developer working with a popular library (taking React as an example) will need to know JSX, functional components and passing data between them, rendering techniques, keys, state, side effects and how to deal with them, class based components ( and the component life cycle), type checking with Props or TypeScript, routers, data fetching, the context API, reducing state, Refs, and memoization, to build. Assuming that they are in this case they have a solid grasp on the fundamentals of JavaScript, taking the minimalistic and simplicity approach (we have not touched on third party packages, but soon).</p><p>Even though I’ve used React as an example here, most frameworks will have the same functionality, with slightly different syntax and execution models. Note that these are just the building blocks for simple sites, there is a lack of authentication for secure apps, content delivery networks (CDNs) that drop-ship external functionality, feature flags, edge infrastructure, and, by extension, analytics from observability software.</p><p>The above blocks are only the tip of the iceberg of basic abstractions, assuming you’re not yet well-developed enough to venture into design patterns, architecture, and microframeworks built on React, which lie at the core of complex software in modern development. One broken dependency can cascade. If unclear yet, modern apps are distributed systems known as websites.</p><h3>3. Why Browser DevTools Often Lie in Production</h3><p>It’s difficult to reproduce end-user performance issues, such as race conditions, memory pressure, and user timing, without real session history. An accurate way to reproduce the issue is to have the user outline the steps and then reproduce the workflow, which, in most cases, is unlikely to be reported. This is where many teams will <a href="https://medium.com/@Munene254_/how-to-profile-node-js-apps-a-complete-guide-for-efficient-performance-a720c5afa847">integrate software observability tools</a>.</p><p>Local dev tools often expose web applications on an ideal network, with a clean browser state, and on powerful development hardware. Every release of new software versions risks a performance regression. At scale, your team can merge over 100 commits, and now there are too many additions to pinpoint exactly which ones caused the regression. It also makes it difficult to identify optimization opportunities. Tip: always commit often!</p><p><a href="https://freedium-mirror.cfd/https:/yc.prosetech.com/why-chromes-developer-console-sometimes-lies-9487e45e91ae">Chrome developer console can sometimes show misleading values for objects and arrays</a> because it uses lazy evaluation. When you log an array or object, Chrome stores a reference to the object rather than a snapshot of its contents. If the object changes later, expanding the logged object in the interactive console shows the latest value, not what it had when the log was called.</p><p>The above challenge occurs if the console is closed when the code for arrays runs, and if the console is already open for nested objects within arrays. You can avoid this problem by logging primitive values directly, creating snapshots when logging objects or using structured clones on modern browsers. The environment you debug is often not the environment users experience. Got it?</p><h3>4. Third-Party Scripts Break More Than Teams Admit</h3><p>Third-party code solutions have a good way to augment existing functionality (instead of building your own). This approach offsets much development work across analytics, ads, chat widgets, icons, personalized content, fonts, and payments etc. Each outsourced code speeds up the development progress and process, at the cost of adding extra work to the browser.</p><p>Many times your application’s code will be reasonably optimized but have users complaining of slow performance (if you are writing React and follow the best practices there’s no need for optimizations). When you look at the network tab on local host, everything looks fine. Often, three specific problems show up: <strong>third-party API competing for the main thread against interactive modules</strong>, <strong>render blocking requests</strong> loaded without the async or defer block parsing.</p><p>While we can adopt the <a href="https://www.patterns.dev/">design patterns and architecture on the frontend</a> to handle third party code integrations, we do not always have complete control of the network requests in production. The reality is that different hardware firmware, operating systems, and browsers get us out of control over load order, failures, and updates, with side-effects varying from one device to another.</p><p>Debugging third-party scripts doesn’t have to be hefty if you can list out common sources for failure in third-party scripts. These include <strong>network issues</strong>, <strong>rate limits</strong>, <strong>script errors</strong>, <strong>compatibility issues</strong>, and <strong>version updates</strong>. For each of the above problems, we can <a href="https://blog.pixelfreestudio.com/when-third-party-scripts-fail-strategies-for-debugging/">adopt a proactive approach to programming</a>.</p><p>Sequentially, work through with third-party code by analyzing site dependencies, documenting their integration points, debugging using browser dev tools (network tab, console errors, and inspecting script execution), implementing error handling fallbacks, using timeouts on slow-loading scripts, monitoring dependency updates, implementing monitoring and logging, and optimizing with asynchronous loading.</p><h3>5. Frontend Errors Rarely Tell the Full Story</h3><p>Although we can log JavaScript errors, both on the browser console and even push them to the server for visibility, or even use them to fire alerts, error monitoring catches the symptoms and likely not the causes. For example, you may have an error “<strong>Cannot read property of undefined</strong>”, and with probably some short context about the source page. This points us to the source of the bug, but somehow not the actual workflows and user actions that lead the application there.</p><p>The missing context is bound to user behaviour, state transitions, network conditions, and timing sequence. What page did the user click before the error? Are the forms with some data that is getting lost on state updates? Did a background request fail? Are there side effects causing infinite re-renders? Did another state update happen between two operations?</p><p>These details matter because the same JavaScript error can be produced by completely different workflows. If you’re only concerned with looking at the stack trace, there’s a chance you know where the application fails without knowing why and how the failing state is reached.</p><p>Frontend monitoring at this point moves from error collection towards observability. Rather than asking what errors are occurring in the applications, you start to seek enough information to reconstruct the error-bringing events. Simply put visibility into event errors, network requests, hardware access, and the user-journey around failure. Enter observability tools.</p><h3>6. Instrumentation Beats Guesswork: Debugging Tools</h3><p>Where the traditional developer starts with console log statements that have a few statements, the technique only works in predictable failure. Production bugs are rarely that cooperative. Instrumentation changes the debugging process by collecting much richer signals.</p><p>Modern debugging has evolved further and comes with built-in session replays that show the sequence of interactions preceding a bug or failure. Most modern debugging and monitoring tools will have performance traces that reveal the cause of bugs for example: slow renders, long task, or even network requests. And they’ll also come with dashboards to review logs, metrics, user details, their client details, and journeys. The benefits of using software observability tools are plenty, and there’s little work involved in wiring them.</p><p>So far, I have tested out two tools Middleware and Raah. When I first <a href="https://middleware.io/blog/debug-live-production-issues/">worked with Middleware in debugging frontend production issues</a>, I realized that the tool was an alternative backup storage for data. For instance, in failing forms when added to the payload. But it also took some effort to integrate it. When <a href="https://raah.dev/">I tried out Raah</a> for my friends at Studio1, I had a whole new experience. By simply adding their SDK in the index file of my website, I could access everything. What matters is that you get actionable signals, correlation, prioritization, and full context.</p><p>But there’s a catch! Am I comfortable with letting other teams have access into my software? No. Does that make my software any special? Another no. Of course most of these tools are compliant with privacy and data regulations. But I’m not comfortable sharing my software with others. If I’m only building software for myself, or for a startup, and there may not be enough resources (revenue) yet to justify paying for the cost, I can’t keep hoping on from tool to tool.</p><h3>7. What High-Performing Teams Do Differently</h3><p>While there’s no better way to test your application than manually using all features, many teams approach their builds by writing UI tests. Beyond logic testing, UI tests assert to us that the web application contains the right content and behaves as the developer intends.</p><p>On the evolution of your data structures within the application as needs change, tests are a good way to tell when components don’t satisfy the requirements. As you server more interactivity in your applications, the value of good tests both UI, and non UI increases.</p><p>If your team has the resources to onboard and support a Q&amp;A team for the project, then you can be sure that they’ll thoroughly test out all the features and report the bugs in a ticket tracking workflow upon which you can act on and resolve them before pushing your latest build to production.</p><p>In my first software development work, I joined as a Q&amp;A persons, despite the technical skills. Luckily, this has given a complete understanding of the software inside out from a users’ perspective. Even without directly working on the code, I can map out the relation between data on the backend based on the functionality on the frontend. We are testing in production staging environments, instrumenting key workflows for third-party libraries such as payments, and monitoring the performance of the application closely through logs on the admin portal. The dashboard is usable even by non-technical team members who can engage engineers at an urgent time of need.</p><h3>Modern JavaScript Complexity Outpaced Debugging Practices</h3><p>Zooming out to see the broader picture, I see that JavaScript frameworks have evolved quickly. We have moved from relatively simple pages to component libraries, state management APIs like Redux, authentication, feature flags, content delivery networks, and, in the longest time, moved to TypeScript (which I have deliberately chosen to keep out of scope). I’m still getting the hang of it, but I know it helps catch bugs during development.</p><p>While the progression is rapid, and isn’t slowing, somewhere somehow, our debugging practices are yet to catch up in speed. Errors show where there are failures. Stack traces point us towards where the failure is. Tests can help us assert that our workflows are behaving as expected or not. When it comes to debugging in production, we need to understand the whole context that leads to a failure.</p><p>As such, frontend debugging in product leans towards visibility rather than simple reproduction of errors. While browser developer tools, logs and tests aren’t going anywhere, they’ll need to be augmented with instrumentation, and manual Q&amp;As for the best product results with respect to user workflows.</p><p>My own experience has taught me that the hardest production bugs can stem from simple things, such as the difference between operating systems, timing, state, dependencies, and network conditions or even interactions that were not part of the developer’s original mental model. The goal isn’t to eliminate complexity, but to make the complexity observable enough to debug.</p><p><em>If your company builds developer tooling, observability software, frontend infrastructure, or engineering products and needs technical content for experienced developers, I occasionally work with teams on engineering-focused writing. </em><a href="/service/mailto:midwaymaster10@gmail.com"><em>Drop me an email</em></a><em>. Happy Coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e72384046c35" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/why-frontend-debugging-in-production-is-so-hard-and-what-teams-miss-e72384046c35">Why Frontend Debugging in Production Is So Hard and What Teams Miss</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Are the Best Practices for API Security? A Complete Guide to Securing Modern APIs]]></title>
            <link>https://javascript.plainenglish.io/what-are-the-best-practices-for-api-security-a-complete-guide-to-securing-modern-apis-0ed7a3f04b6a?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ed7a3f04b6a</guid>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 08:47:48 GMT</pubDate>
            <atom:updated>2026-08-12T12:33:31.930Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Use this repository as a reference guide throughout your software development life cycle, whether you are releasing a new build, applying a patch, or updating your source code. Regularly implementing these checks will help address security vulnerabilities in APIs before they become huge problems.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CKQVp1YFhSbMY9FxzyBB_g.png" /><figcaption><a href="https://www.istockphoto.com/video/api-application-programming-interface-software-development-tool-business-modern-gm1308456656-398434626?searchscope=image%2Cfilm"><em>Image Source</em></a></figcaption></figure><p>Most modern software and applications rely on application programming interfaces APIs to integrate new functionalities into their existing codebase in a simple way. As such, we are seeing many API-first products, with <a href="https://www.giiresearch.com/report/tbrc1984908-application-programming-interface-api-economy.html">the overall economy estimated at around $20 billion</a> in 2026.</p><p>With the increasing reliance on APIs for application development, it’s crucial to prioritize API security. This points out the need to protect sensitive data, safeguard user privacy, and avoid attacks on critical business logic. API security ought to be part of service level agreements (SLAs).</p><p>APIs enable communication between systems and ease development by providing ready, reusable code. However, they also serve as an entry point for attackers. By the numbers, 74% of data breaches involved APIs, according to <a href="https://www.traceable.ai/2023-state-of-api-security">Traceable’s 2023 security report</a>.</p><p>This comprehensive guide delves into the best practices for fortifying your APIs against potential vulnerabilities. Whether you are a software developer, IT professional, or security expert at any level involved in designing, developing, and maintaining APIs, I’ll guide you in an easy-to-grasp manner regardless of your technical expertise.</p><h3>Why API Security Matters</h3><p>In many companies, APIs often handle sensitive information, such as identity platforms that store personal details and financial data, and support other communication processes. If someone accesses an API without permission, they can corrupt the data or abuse your services.</p><p>When data breaches occur in APIs, companies risk financial losses, loss of customer trust, and non-compliance with data protection regulations. API security is every tech product team’s responsibility for safeguarding data and maintaining customer trust. I’d begin with knowing the standards.</p><h3>API Security Standards and Frameworks</h3><p><strong>API Security standards</strong> are collections of formal specifications, protocols, guidelines, and established frameworks that you should apply across the API software development life cycle (SDLC) to ensure consistent security measures against potential vulnerabilities. The common API security standards are:</p><p>· <strong>OWASP API Security Top 10:</strong> is a roundup of the most critical risks in APIs maintained by the Open Web Application Security Project (OWASP). It offers wide coverage, including server-side request forgery, unrestricted resource consumption, and broken object-level authorization.</p><p>· <strong>OAuth (2.0 and 2.1):</strong> provides delegated authorization, allowing clients to access resources on a user’s behalf without requiring passwords. Access tokens are the primary means of access, with clearly defined scopes and continuity via refresh tokens.</p><p>· <strong>OpenID Connect (OIDC):</strong> builds on OAuth by defining how clients validate tokens issued by a server. It supports single sign-on and is often used by identity providers, for example, retrieving profile attributes.</p><p>· <strong>JSON Web Tokens (JWTs):</strong> are a widely used, industry-standard format for signing and verifying tokens before transmitting data. JWTs differ from cookies in that they store necessary user information within the token.</p><p>· <strong>Transport Layer Security (TLS):</strong> is a cryptographic communication protocol that secures data sharing over a computer network. Its key features are encryption, authentication of communication parties, and data integrity.</p><p>· <strong>Zero Trust:</strong> involves security tools that gate network access by treating every entity and user as a threat until proven otherwise. This approach builds on explicit verification, the principle of least privilege, and the assumption of a breach.</p><p>· <strong>NIST Cybersecurity Framework:</strong> provides guidelines for securing APIs in cloud and microservice architectures, with an emphasis on authentication, authorization, and data protection.</p><p>· <strong>Financial-grade profiles (FAPI):</strong> a specification for high-stakes APIs in banking, fintech, or regulated data. It is based on client authentication, simplified request/responses, and sender-specific tokens to prevent fraud and ensure interoperability.</p><p>These frameworks provide a solid foundation worth exploration, but they are not the only ones available.</p><h3>Common Types of API Security Threats</h3><p>The top API security vulnerabilities include:</p><ol><li><strong>Broken Authentication </strong>— When an API lacks proper authentication, session management data such as cookies can be stolen and used to access services.</li><li><strong>Broken Object Level Authorization (BOLA) </strong>— With broken authorization, object access failures give unrestricted access to crucial internal workflows, which may be critical to your business.</li><li><strong>SQL Injection </strong>— Within requests, an attacker may inject SQL code to trigger access to the database. Most database access tooling has an explicit escape mechanism to pass parameters defensively.</li><li><strong>Command Injection </strong>— An application takes untrusted user inputs from an API request. It runs them in a server’s system shell or command processor, allowing the attacker to execute unauthorized commands with full privileges.</li><li><strong>Cross-site Scripting </strong>— A web vulnerability that may allow one person to compromise the interactions a user may have while accessing your API and instead access data as if they were the original user, bypassing the cross-origin policy.</li><li><strong>Security Misconfiguration </strong>— API keys and environment variables, when exposed or compromised, can be used to access your API or purchased external services.</li><li><strong>Excessive/Sensitive Data Exposure </strong>— During authentication, you may forget to explicitly return a status code and instead return the full object pushed to the database. Because the response is cached or stored in local storage, the data is accessed or even visible on the network requests tab.</li><li><strong>Distributed Denial of Service </strong>— Many API requests can be flooded to compromise your server’s integrity or, in the worst case, make your API unavailable.</li><li><strong>Third-party dependencies </strong>— Because even APIs are clients of other APIs, each outsourced service extends the application’s attack surface if any is breached or experiences an outage.</li></ol><p>For each vulnerability mentioned, there’s a better programming approach we can take to make your API more secure.</p><p><em>These next sections focus on practical steps and examples to implement API security practices with a focus on JavaScript as the programming language of choice:</em></p><h3>1. Implement authentication best practices</h3><p>Every API should require the client (user) to prove their identity before attempting to connect, for example, by logging in with a username and password or verifying an API key if a security token is not used. Authentication is needed in APIs to let users prove their identity before accessing protected applications, networks, and services.</p><p>Despite the many API authentication methods, they generally fall into five categories: <strong>username and password</strong>, <strong>multi-factor auth</strong>, <strong>token-based auth</strong>, <strong>certificate-based auth,</strong> and <strong>biometric auth</strong>. In the past, sessions were only a nice option, but the web browser used cookies as the only client. With JSON Web Tokens, you can’t verify a password.</p><p>Let’s build a hybrid authentication flow that authenticates users with a username and password, issues a JWT upon successful login, and uses that token to secure protected API routes. This approach separates credential verification and API authentication, reducing the need for credentials in every request.</p><p>In Node.js, using Express as an excellent framework, you can use the passport library, which supports both local and JWT authentication strategies. In three steps:</p><p>I. <strong>Configure Passport Local and JWT in app.js or as a middleware:</strong> the first strategy is for authentication at login time, while the second strategy authenticates every subsequent request.</p><pre>const passport = require(&quot;passport&quot;);<br>const LocalStrategy = require(&quot;passport-local&quot;).Strategy;<br>const { Strategy: JwtStrategy, ExtractJwt } = require(&quot;passport-jwt&quot;);<br><br>// Local Strategy: Verify username and password during login.<br>passport.use(<br>  new LocalStrategy(<br>    { usernameField: &quot;email&quot;, passwordField: &quot;password&quot; },<br>    async (email, password, done) =&gt; {<br>      // Find the user and compare the hashed password.<br>      // If valid, return the user.<br>    }<br>  )<br>);<br><br>// JWT Strategy: Verify the token on protected requests.<br>passport.use(<br>  new JwtStrategy(<br>    {<br>      jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),<br>      secretOrKey: process.env.JWT_SECRET,<br>    },<br>    async (payload, done) =&gt; {<br>      // Find the user referenced in the token.<br>    }<br>  )<br>);<br><br>// Middleware<br>const authenticateJWT = passport.authenticate(&quot;jwt&quot;, { session: false, });<br><br>module.exports = { passport, authenticateJWT, };</pre><p>II. <strong>Authenticate the user and issue a JWT:</strong> during login, validate a user’s email address (or username/phone number) and passcode, then issue a JWT that the client uses on subsequent requests.</p><pre>const jwt = require(&quot;jsonwebtoken&quot;);<br>const passport = require(&quot;passport&quot;);<br><br>const login = (req, res, next) =&gt; {<br>  passport.authenticate(&quot;local&quot;, { session: false }, (err, user, info) =&gt; {<br>    if (err) return next(err);<br>    if (!user) return res.status(401).json({ message: info.message, });<br><br>    // Issue a signed JWT after successful authentication.<br>    const token = jwt.sign(<br>      { id: user.id, role: user.role,},<br>      process.env.JWT_SECRET,<br>      { expiresIn: process.env.JWT_EXPIRES_IN || &quot;2h&quot;,}<br>    );<br><br>    return res.status(200).json({ message: &quot;Login successful.&quot;, token, user,});<br>  })(req, res, next);<br>};</pre><p>III. <strong>Protect API routes with Passport JWT:</strong> all protected routes can now be gated at the API routing definition level by placing the guard before the services/controller.</p><pre>const {  Router } = require(&quot;express&quot;);<br>const authRouter = Router();<br><br>// Get auth middleware and sample prorected controller<br>const authController = require(&quot;../controllers/auth.controller&quot;);<br>const { authenticateJWT } = require(&quot;../middleware/authentication&quot;);<br><br>// Use JWT as a guard to protect certain routes<br>authRouter.get(&quot;/me&quot;, authenticateJWT, authController.me);<br>authRouter.patch(&quot;/password&quot;, authenticateJWT, authController.updatePassword);</pre><p>Alternatively, the JWT guard can be supplied within the controller’s middleware chain level to keep routers simple.</p><h3>2. Enforce authorization best practices</h3><p>Authorization is the mechanism that decides what users can access and interact within a system. In its absence, anyone could access sensitive data or invoke unauthorized actions within an API. Because it often occurs after authentication, authorization ensures that each identity interacting with the API undergoes an access control evaluation to grant or deny access.</p><p>There are several authorization methods, including:</p><p>· <strong>Role-Based Access Control (RBAC)</strong> — A foundational model that handles management by assigning permissions to roles; for example, in a blog API, we have the admin, editor, and viewer at the high level. Best suited for static job functions or groups, such as enterprise apps.</p><p>· <strong>Attribute-Based Access Control (ABAC)</strong> — A dynamic policy that evaluates the attributes of the user, requested resource, and request environment to give or deny access. In ideal, it is suited for APIs with complex auth decisions that are highly contextual or dynamic.</p><p>· <strong>Relationship-Based Access Control (ReBAC)</strong> — Authorization whose basis is relationships and ownership between a user and the specific resource. The API uses graph traversal to check explicit relationships, such as ownership or membership, to grant or deny access. ReBAC is a good fit for collaborative systems such as social media or document-sharing apps.</p><p>Implementing authorization yourself is a great way to build your intuition on its intricacies, but many production APIs will delegate this to a third-party identity management solution.</p><p>For example, once you register your API with a service like Microsoft Entra ID and configure it to use bearer tokens, sensitive endpoints validate them for scope and role before executing the request. All protected API endpoints send a 401 Unauthorized response if the bearer token is invalid or the required permissions are absent. Typical usage in Express on the same setup:</p><pre>app.get(<br>  &quot;/api/orders&quot;,<br>  passport.authenticate(&quot;oauth-bearer&quot;, { session: false }),<br>  (req, res) =&gt; {<br>    res.json({ message: &quot;Protected resource.&quot; });<br>  }<br>);</pre><p><em>While authentication verifies who the user is, authorization determines what the authenticated user can access. You’ll want to protect your API using industry-standard protocols such as OAuth 2.0, OpenID Connect, and SAML. You could implement auth flows yourself or delegate to a third-party identity provider like Ping Identity, Okta, Microsoft Entra ID, AWS, IBM Security verify, and more.</em></p><h3>3. Encryption to Protect Data</h3><p>Encryption converts readable data into unreadable formats during transmission and even at rest (in the database). Where Transport Layer Security secures data in transit, most sensitive systems will deploy both. In the absence of encryption, sensitive data, such as financial credentials, can be intercepted and used to compromise APIs.</p><p>There are several key encryption mechanisms, each with their pros and cons:</p><p>· <strong>Symmetric Encryption</strong> — Extremely fast, efficient, and good for large datasets. Best for encrypting data at rest and API payloads, but both parties must securely share a secret key.</p><p>· <strong>Asymmetric Encryption</strong> — No shared secrets; only public/private secure key exchanges, but it is slower than symmetric encryption and not an ideal fit for large payloads.</p><p>· <strong>Hybrid Encryption</strong> — A dual that combines the speed of symmetric and asymmetric encryption techniques for optimal security and performance.</p><p>Express allows you to implement <strong>symmetric encryption </strong>alongside well-known algorithms such as <strong>AES-256-GCM</strong>. In the example below, we’ll use Node’s built-in crypto module to encrypt data before it is stored or transmitted.</p><pre>const crypto = require(&quot;crypto&quot;);<br><br>const algorithm = &quot;aes-256-gcm&quot;;<br>const key = Buffer.from(process.env.ENCRYPTION_KEY, &quot;hex&quot;);<br><br>app.post(&quot;/api/orders&quot;, (req, res) =&gt; {<br>  const iv = crypto.randomBytes(12);<br><br>  const cipher = crypto.createCipheriv(algorithm, key, iv);<br><br>  const encrypted = Buffer.concat([<br>    cipher.update(JSON.stringify(req.body), &quot;utf8&quot;),<br>    cipher.final(),<br>  ]);<br><br>  const payload = {<br>    iv: iv.toString(&quot;hex&quot;),<br>    tag: cipher.getAuthTag().toString(&quot;hex&quot;),<br>    data: encrypted.toString(&quot;hex&quot;),<br>  };<br><br>  // Store or transmit the encrypted payload<br>  res.json(payload);<br>});</pre><p><strong>Asymmetric encryption </strong>can be enacted when pushing data into the database using Node’s crypto module. Only a corresponding key can decrypt the encrypted message. In usage, the above snippet would only need a slight update:</p><pre>const crypto = require(&quot;crypto&quot;);<br><br>const encrypted = crypto.publicEncrypt(<br>  publicKey,<br>  Buffer.from(&quot;Sensitive API data&quot;)<br>);</pre><p>A hybrid approach workflow would be to generate a temporary AES encryption key, encrypt the API load using an algorithm, encrypt the AES key using the client’s RSA public key, and send the encrypted payload together with encrypted payload together with the encrypted AES key; the client decrypts the AES key using the private key before decrypting the payload. Your API doesn’t need all this, but it’s worth looking into.</p><h3>4. Proper Input Validation and Sanitization</h3><p>As your API starts working with externally provided client data, you have no idea what inputs will be sent to your services. A good way to protect the API is to ensure there are no malformed requests, no SQL injection, and no openings for cross-site scripting.</p><p>Validation helps reject inputs that fail to meet the defined structural and semantic rules. Sanitization strips dangerous content from validated input, transforming it into safe formats for API use.</p><p>The first step in working with inputs is to enforce the correct <strong>content formats</strong> at the global, router, or specific-endpoint level. For example, here’s how to enforce content rules:</p><pre>const requireContentType = (type) =&gt; (req, res, next) =&gt; {<br>  if (!req.is(type)) {<br>    return res.status(415).json({ error: &quot;Unsupported Media Type&quot;, });<br>  }<br><br>  next();<br>};<br><br>app.post(&quot;/api/users&quot;, requireContentType(&quot;application/json&quot;),<br>  (req, res) =&gt; {<br>    res.json({ message: &quot;User created.&quot; });<br>  }<br>);</pre><p>Now that the API is guarded to only work with specific data formats, it’s time to enforce proper request formation through <strong>custom validation</strong>, working with the <strong>express validator</strong> for this demo:</p><ol><li>Build a custom validator for a production-grade app in a dedicated file:</li></ol><pre>const { body } = require(&quot;express-validator&quot;);<br>const { getUserEmail } = require(&quot;../db/queries&quot;);<br><br>const validateRegistration = [<br>  body(&quot;email&quot;)<br>    .isEmail()<br>    .withMessage(&quot;Invalid email format&quot;)<br>    .custom(async (value) =&gt; {<br>      if (await getUserEmail(value)) {<br>        throw new Error(&quot;Email is already in use&quot;);<br>      }<br>      return true;<br>    }),<br><br>  body(&quot;password&quot;)<br>    .isLength({ min: 8 })<br>    .withMessage(&quot;Password must be at least 8 characters long&quot;),<br>];<br><br>module.exports = { validateRegistration }</pre><p>2. Use the validator when handling a request:</p><pre>const { validationResult } = require(&quot;express-validator&quot;);<br>const { validateRegistration } = require(&quot;../validators/userValidator&quot;);<br><br>app.post(&quot;/api/register&quot;, validateRegistration, (req, res) =&gt; {<br>  const errors = validationResult(req);<br><br>  if (!errors.isEmpty()) {<br>    return res.status(400).json({ errors: errors.array() });<br>  }<br><br>  res.json({ message: &quot;Registration successful.&quot; });<br>});</pre><p>After the data is validated, you can sanitize it before pushing it to the appropriate handlers. Following the middleware chaining in Express, we can insert the sanitizer after validation.</p><pre>const sanitizeRegistration = [<br>  body(&quot;firstName&quot;).trim().escape(),<br>  body(&quot;email&quot;).normalizeEmail(),<br>];<br><br>app.post(<br>  &quot;/api/register&quot;,<br>  validateRegistration,<br>  sanitizeRegistration,<br>  (req, res) =&gt; {<br>    const errors = validationResult(req);<br><br>    if (!errors.isEmpty()) {<br>      return res.status(400).json({ errors: errors.array() });<br>    }<br><br>    res.json({ message: &quot;Registration successful.&quot; });<br>  }<br>);</pre><p>Rather than working with raw SQL queries that directly consume user input, using a database module provides a safety net. <strong>Parameterized queries</strong> ensure that inputs are treated as data rather than executable SQL. Using one of JavaScript’s most popular libraries for accessing the database, <strong>pg and Prisma</strong>, among others, is a quick way to use parameterized queries:</p><p>For example, with pg in an Express API, all you have to do is configure a connection pool and then export it for use in the database modules. Example configurations in pg:</p><pre>const { Pool } = require(&quot;pg&quot;);<br><br>const pool = new Pool({<br>  connectionString: process.env.DATABASE_URL,<br>});<br><br>module.exports = pool;</pre><p>Then use the configured pool when making a database query operation. For example, a create looks like:</p><pre>app.post(&quot;/api/users&quot;, async (req, res) =&gt; {<br>  const { email, name } = req.body;<br><br>  await pool.query(<br>    &quot;INSERT INTO users (email, name) VALUES ($1, $2)&quot;,<br>    [email, name]<br>  );<br><br>  res.status(201).json({ message: &quot;User created.&quot; });<br>});</pre><p>Notice how the Express validator allows customized validators that can be isolated as independent units for your API and used as a middleware function with access to errors for each failed validation. Parameterized queries make it safer to work with the database.</p><h3>5. Implement API rate-limiting and throttling techniques.</h3><p><strong>API rate limiting</strong> entails setting up the number of requests a user can make within a defined timeframe. It is needed not only to prevent a client from abusing your API but also to ensure that everyone gets fair access to your resources.</p><p>API developers enforce different rate limiting through several methods:</p><p>· <strong>User rate limiting </strong>— A client’s number of requests is tracked through their API key or IP address. If the threshold is exceeded, they contact the provider for more or paid access.</p><p>· <strong>Geographical rate limiting </strong>— APIs can be served by allowing clients to access more requests within certain time zones and time frames to block suspicious traffic.</p><p>· <strong>Server rate limiting</strong> — Alternatively, developers can have some parts of the API use specific servers to handle dedicated parts of an application, for instance, limited background workers.</p><p>Many rate limiting algorithms exist for use in any API, but you don’t always have the time for looking into every technique. Borrowing a native module, <strong>express-rate-limit</strong> is a quick option to restrict access using an IP address by default:</p><pre>const rateLimit = require(&quot;express-rate-limit&quot;);<br><br>// Apply to all API routes<br>const apiLimiter = rateLimit({<br>  windowMs: 15 * 60 * 1000, // 15 minutes<br>  max: 100,<br>});<br><br>// Apply stricter limits to authentication endpoints<br>const loginLimiter = rateLimit({<br>  windowMs: 5 * 60 * 1000, // 5 minutes<br>  max: 5,<br>  message: &quot;Too many login attempts. Please try again later.&quot;,<br>});<br><br>app.use(&quot;/api&quot;, apiLimiter);<br><br>app.post(&quot;/api/login&quot;, loginLimiter, (req, res) =&gt; {<br>  res.json({ message: &quot;Login successful.&quot; });<br>});</pre><p>To limit a client using a token, all you have to do is pass it on to the limiter, as is the practice in many public APIs where everyone has their key.</p><pre>const rateLimit = require(&quot;express-rate-limit&quot;);<br><br>const apiKeyLimiter = rateLimit({<br>  windowMs: 15 * 60 * 1000,<br>  max: 1000,<br>  keyGenerator: (req) =&gt; req.get(&quot;X-API-Key&quot;),<br>});<br><br>app.use(&quot;/api&quot;, apiKeyLimiter);</pre><p><strong>Throttling</strong> can be used to balance security and performance. Throttling controls the speed at which requests are processed by introducing delays to prevent sudden high traffic, e.g.,</p><pre>const rateLimit = require(&quot;express-rate-limit&quot;);<br><br>// Throttle all API requests<br>const apiThrottle = rateLimit({<br>  windowMs: 1000, // 1 second<br>  max: 10, // Allow up to 10 requests per second<br>});<br><br>// Apply a stricter throttle to resource-intensive endpoints<br>const searchThrottle = rateLimit({<br>  windowMs: 2000, // 2 seconds<br>  max: 1, // Allow 1 request every 2 seconds<br>  message: &quot;Please wait before sending another search request.&quot;,<br>});<br><br>app.use(&quot;/api&quot;, apiThrottle);<br><br>app.get(&quot;/api/search&quot;, searchThrottle, (req, res) =&gt; {<br>  res.json({ results: [] });<br>});</pre><p>In the example above, a general throttle is applied across the entire API, allowing each resource to be requested up to 10 times per second. A stricter throttle protects the search endpoint, which is more resource-intensive, and it can only be called by each client once every 2 seconds.</p><h3>6. Logging, monitoring, and Incident detection</h3><p><strong>API logging </strong>involves recording requests and responses, along with their metadata, payloads, context, response times, and error codes. In production, these logs can be used to troubleshoot, audit, and understand how APIs are being used.</p><p><strong>API monitoring</strong> entails observing API activity in real time to detect anomalies and track key performance indicators (KPIs), such as response times, error rates, and overall API throughput. Monitoring APIs allows you to uncover actionable insights into how the API is performing, whether it meets service-level agreements, and whether it has vulnerabilities.</p><p>Here’s a brief slug on the different logging and monitoring methods and their pros and cons:</p><p>· <strong>Request logging</strong> — Capture incoming HTTP requests, with tools such as Morgan, Express middleware, in a lightweight module at the cost of no way to capture system health.</p><p>· <strong>Application logging</strong> — Record application events such as authentication, database operations, and errors using <strong>Winston</strong>, <strong>Pino</strong>, or <strong>Bunyan</strong>, at the cost of requiring structured logging and centralized storage for larger applications.</p><p>· <strong>Metrics Logging</strong> — Track API performance, request rates, latency, CPU, memory usage, and error rates with <strong>Prometheus</strong> and <strong>Grafana</strong>, at the cost of providing aggregated metrics without detailed request-level diagnostics.</p><p>· <strong>Centralized Log Management</strong> — Aggregate logs from multiple services into platforms such as the <strong>ELK Stack</strong>, <strong>OpenSearch</strong>, <strong>Splunk</strong>, or <strong>CloudWatch</strong>, at the cost of additional infrastructure and operational overhead.</p><p>· <strong>Application performance monitoring</strong> — Monitor application performance through logs, metrics, traces, and alerts using platforms such as <strong>Datadog</strong>, <strong>New Relic</strong>, or <strong>Dynatrace</strong>, at the cost of higher licensing costs and added platform complexity.</p><p>In Express, you can use any of the above tools to implement any logging. For example:</p><ol><li>Basic request logging (Morgan)</li></ol><pre>const express = require(&quot;express&quot;);<br>const morgan = require(&quot;morgan&quot;);<br><br>const app = express();<br><br>// Log every incoming request<br>app.use(morgan(&quot;combined&quot;));<br><br>app.get(&quot;/api/users&quot;, (req, res) =&gt; {<br>  res.json({ message: &quot;Users retrieved successfully.&quot; });<br>});</pre><p>2. Structured application logging (Winston)</p><pre>const winston = require(&quot;winston&quot;);<br><br>const logger = winston.createLogger({<br>  transports: [<br>    new winston.transports.Console(),<br>  ],<br>});<br><br>app.post(&quot;/api/orders&quot;, (req, res) =&gt; {<br>  logger.info(&quot;Order created&quot;, {<br>    userId: req.user.id,<br>    orderId: req.body.id,<br>  });<br><br>  res.status(201).json({ message: &quot;Order created.&quot; });<br>});</pre><p>3. Error Logging in every API route accessed with an error</p><pre>app.use((err, req, res, next) =&gt; {<br>/* Logger is built as an independent module or class */<br>  logger.error(err.message, {<br>    path: req.originalUrl,<br>    method: req.method,<br>  });<br><br>  res.status(500).json({<br>    error: &quot;Internal Server Error&quot;,<br>  });<br>});</pre><p>4. Monitoring</p><pre>const client = require(&quot;prom-client&quot;);<br><br>client.collectDefaultMetrics();<br><br>app.get(&quot;/metrics&quot;, async (req, res) =&gt; {<br>  res.set(&quot;Content-Type&quot;, client.register.contentType);<br>  res.end(await client.register.metrics());<br>});</pre><p>Note that if you opt to use a framework to build your backend, such as NestJS, it includes a native logging and monitoring tool for every API endpoint. With unopinionated frameworks like Express, you’ll have to implement logging structurally, for instance, using middleware before responding to a request. To report an incident, you just need to add push notifications to your app as an extension of the logs.</p><h3>Building Secure APIs Is a Continuous Process</h3><p>Although the scope of protecting our applications in general doesn’t stop here, you can always cross-check that your API meets a minimum of the following programming practices:</p><p>· HTTPS enforced</p><p>· OAuth configured</p><p>· JWT expiration enabled</p><p>· Rate limiting enabled</p><p>· Input validation complete</p><p>· SQL injection tested</p><p>· Authorization tested</p><p>· Secrets secured</p><p>· Logging enabled</p><p>· Monitoring configured</p><p>· Security headers present</p><p>· Error messages sanitized</p><p>· Dependencies updated</p><p>Although this article chose ExpressJS for demonstration, most backend development frameworks will either have native integration with the tools mentioned here or provide native methods. For example, NestJS provides data transfer objects for backend data validation. A quick search using your framework should help guide you as you look at the documentation.</p><p>Securing APIs requires a tactical and procedural approach that combines best practices across authentication, input validation, access control through authorization and rate limiting, and close monitoring once APIs are pushed to production.</p><p>As applications move toward the cloud, these principles serve as a baseline that they extend to cloud-native environments such as Azure, Google Cloud, and AWS. While we will have to author a specialized piece on cloud API best security practices, following the outlined techniques will go a long way toward getting your APIs a step closer to being production-ready for security review.</p><p>By the way, if you’d like to secure your application’s frontend, I authored an article on <a href="https://medium.com/@Munene254_/the-biggest-security-risks-in-modern-react-apps-and-how-to-fix-them-402223cc071c">React security vulnerabilities and how to fix them</a>.</p><h3>Before you go</h3><ul><li>Please take a moment to like the post and follow the writer!</li><li>Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute <a href="https://plainenglish.io/write-for-us">here</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ed7a3f04b6a" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/what-are-the-best-practices-for-api-security-a-complete-guide-to-securing-modern-apis-0ed7a3f04b6a">What Are the Best Practices for API Security? A Complete Guide to Securing Modern APIs</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three Years with The Odin Project: How Learning Backend Development Changed the Way I Build…]]></title>
            <link>https://medium.com/@Munene254_/three-years-with-the-odin-project-how-learning-backend-development-changed-the-way-i-build-4df8e6dada92?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/4df8e6dada92</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[the-odin-project]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 11:32:38 GMT</pubDate>
            <atom:updated>2026-07-14T22:58:11.894Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Three Years with The Odin Project: How Learning Backend Development Changed the Way I Build Software</strong></h3><p><em>Three years after starting The Odin Project, I reflect on learning backend development, building APIs, and becoming a full-stack developer.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*GPP4wpdHyFMobGn9V6TuLw.png" /></figure><p>It’s exactly three years since I began taking The Odin Project’s full-stack JavaScript web development curriculum. When I started, I had little to no knowledge about programming, but after consistent efforts, here we are.</p><p>In case you missed the starting part of the journey, I have written about it:</p><p>· <strong><em>Part 1</em></strong><em> — </em><a href="https://medium.com/@Munene254_/from-beginner-to-builder-my-journey-learning-javascript-with-the-odin-project-4662a7e699aa"><em>From Beginner to Builder: My Journey Learning JavaScript with The Odin Project</em></a></p><p>· <strong><em>Part 2</em></strong><em> — </em><a href="https://medium.com/@Munene254_/from-javascript-to-react-building-real-projects-with-the-odin-project-368dab35fb5f"><em>From JavaScript to React: Building Real Projects with The Odin Project</em></a></p><p>As of this writing, I’ve just finished all of Odin Project’s Lessons in the Database and Node.js course, and it’s right before working on the three final full-stack projects.</p><p>I’m writing to share my experience on this journey with anyone curious about what full-stack development looks like, especially if you’re already involved in web development. <br> <br>In that light, I’ve been consistently writing on this blog, and it’s only just that I share something personal about what I’ve been into since getting into React with The Odin Project.</p><h3><strong>Why I Decided to Learn Backend Development</strong></h3><p>I started learning programming because I wanted to write software for software engineers. Much of the most complex technical writing in software development centers on API and developer documentation.</p><p>As simple as it sounds, you can document APIs and Software best when you’re well conversant with industry terms and are actually using APIs. I wanted to satisfy my curiosity about how backend applications and APIs work by building some.</p><p>After finishing the React course, most of the applications I built could only run on the client (browser) and were not persistent unless I used local storage. Whenever a user opened the application on another device, they’d never get the data they saved on their first one. I needed to add a stable layer that worked for my app, and taking the backend course was the best step.</p><p>With React under my belt, I only knew one half of web development. With Node.js in the toolbox, I now had a foundation that set me up to get into the other half of web development — the backend. As I write this, I can now call myself a full-stack developer. Another reason was that by using Node.js I’d have another chance to use JavaScript and, in turn, become a stronger developer by using one language end-to-end.</p><h3><strong>The Odin Project’s NodeJS Course Was Different Than I Expected</strong></h3><p>Unlike the past courses, I’ve progressed relatively quickly in this Node.js course, and it has also been the most challenging part of this curriculum, yet the most balanced in terms of tutorials and projects. After every few lessons, a project to tie everything up by solving a problem.</p><p>Backend development at Odin begins with a strong introduction to SQL Databases. During this database course, I learned to create SQL databases and define primary keys and foreign keys; to create schemas; and to use various select statements, clauses, and functions, as well as the difference between WHERE and HAVING. After learning these, I spent some time reading the docs on SQL databases, working with complex queries, and exploring complex relationships.</p><p>Actual backend development took place next. I’d get introduced to Node.js, how to debug it, and then build a basic information site that serves different HTML files. I later learned about environment variables, which help in securing application secrets. Next in line was an intro to Express.</p><p>On learning basic Express request-response patterns, I’d then refactor my basic information to use Express instead of Node. Express helps reduce much of the boilerplate code I’d otherwise have to write by hand using Node.js. The next learning items would be routes, controllers, and views to complete the MVC pattern. After finishing these topics, the next project was a mini-message board built using Express MVC and EJS. This would be my first fully CRUD server-side rendered (SSR) application.</p><p>At this time, I’m still using mock functions because I haven’t connected any application to a real database yet. I learned how to deploy a backend application using Render. The next lessons covered forms and data handling, installing PostgreSQL, and using it with my backend. I ended up building an inventory application that uses PostgreSQL and deployed it.</p><p>What followed were authentication basics using PassportJS and building a members-only application that would allow users to see messages posted with hidden names for comments if they’re not authenticated members. Once you are authenticated and have joined the club, you can also view more stuff like who the members are and even comment on it, and so much more, like seeing the user dashboard admin.</p><p>The next item was to use database modules like pg and an object-relational mapper to simplify database work. I got into the <strong>PRISMA ORM</strong> tool by reading its documentation and worked on a File Uploader Project. Before working on an explicit one, I read more about API development patterns, particularly RESTful ones, and about securing my APIs with JSON Web Tokens (JWTs).</p><p>The last lessons focused on testing my application routes and controllers, as well as database operations. It took some time to get the flow of writing unit tests, integration tests, and overall end-to-end tests. The toughest part was getting the actual perspective of the differences between them. There aren’t any more lessons in terms of the course; only three final projects are left. But new packages have been introduced and are intended for use in different projects.</p><p>This doesn’t mean I know everything or that learning stops here. On the contrary, I think I’ve only scratched the surface of programming, but I understand application end-to-end development, and I’m able to build some of my own. The best part is that by understanding applications by building, I have built a good foundation in web development.</p><h3><strong>Building Real Full-Stack Projects Changed Everything</strong></h3><p>Looking at the skill progression, for each application I’ve built in the course, I’ve had a chance to learn new skills across the web development process. The mini message board was the first to teach me about validation, how to organize a CRUD application, and to get a feel for the flow of data from a user to the database through a backend. It was also the first backend project that I deployed.</p><h4><strong>Inventory Application</strong></h4><p>Fast forward to the inventory application, we are talking about a CRUD app with a few more items to CRUD and a different data representation. Notice how I first encountered the Multer package for file handling and how to add seed data into an application’s live database, which, of course, I had to scrape from a live game-data API and clean up into usable formats for my application. The most challenging part was organizing the functionality for filtering my games in my views; consuming it on the backend and filtering at the database level were relatively easy.</p><p><strong><em>Repository: </em></strong><a href="https://github.com/john-walter-munene/Inventory-Application"><strong><em>https://github.com/john-walter-munene/Inventory-Application</em></strong></a></p><h4><strong>Members only</strong></h4><p>Members Only was the first application to test authentication and authorization. While doing CRUD operations for messages is a quick task, reasoning about the functionality I wanted to expose based on whether the user is a guest, an authenticated user, or a clubhouse member was an important skill I would carry forward into future applications.</p><p><strong><em>Repository: </em></strong><a href="https://github.com/john-walter-munene/Members-Only"><strong><em>https://github.com/john-walter-munene/Members-Only</em></strong></a></p><h4><strong>File Uploader</strong></h4><p>A step further into the file uploader application, I was now flexing the use of Object-Relational mappers and handling even more complicated table relationships. I really appreciate this project as I was building a stripped-down version of Google Drive where one could upload and CRUD files, then share expiring links.</p><p>Instead of storing images by having them navigate complex folder hierarchies using recursion, I opted to store files and folders as data in tables, linking only to parent-child relationships as part of the table content! I’d later navigate the relationship traversal using recursion and note that while the browser is limited to 1000 call stacks, the server can go further, as I’m now using native resources. Read my <a href="https://medium.com/@Munene254_/definitive-guide-to-recursive-programming-2a28ca4f3ec5">guide on recursive programming here.</a></p><p>Sharing files would use randomly generated tokens referenced for access, with an expiration time attribute that the query would use to invalidate the token in the database. Interesting, right!? And now, think about integrating file storage with Supabase. As projects grew in complexity and requirements, so did the amount of code I wrote.</p><p><strong><em>Repository: </em></strong><a href="https://github.com/john-walter-munene/File-Uploader"><strong><em>https://github.com/john-walter-munene/File-Uploader</em></strong></a></p><h4><strong>Blog API</strong></h4><p>The blog API is a backend application I’m developing to be consumed by two different frontend applications. Having gained some fluency in backend development and added two authentication strategies (Passport Local Strategy and JSON Web Tokens), I had a lot of fun designing a larger API. This is primarily a backend application, but as we chat about it, I’m actually writing two clients for it: one to view and comment on blogs, and the other as a dedicated administrator or editor client for the same API.</p><p><strong><em>Repository: </em></strong><a href="https://github.com/john-walter-munene/Blog-API"><strong><em>https://github.com/john-walter-munene/Blog-API</em></strong></a></p><h3><strong>Full-Stack Development Isn’t Just Frontend Plus Backend</strong></h3><p>Building a full-stack web project is not only interesting but also challenging. Depending on the type of application you’re building, you’ll need to consider different approaches, such as a client-API architecture or even server-side rendered web apps. Each will have its own benefits, trade-offs, and even development patterns.</p><p>One thing I appreciate is that there are many ways to get your application running, starting either from the Database, the backend API, or even the frontend. It is important to note that, regardless of the method you choose, you’ll need to explicitly consider API architecture, authentication, authorization, database design, deployment, debugging, and security.</p><p>Instead of thinking of each technology as an isolated unit, you’ll need to get each piece working on specific tasks and all of them working in tandem. I’ve found working with full-stack SSR applications easy to build and iterate on. However, I’ve found a cleaner architecture with a client-API approach because the frontend and backend can evolve independently as long as we maintain standardized API contracts.</p><p>When working with SSR, all I have to do is serve my template and pass the right data through local variables. I do not have to think about the state, but note how my views are in tight contact with the controllers.</p><p>Where you might think of straightforward ways to minimize backend code by using fewer tables, you face the interesting challenge of creating explicit relationships and reasoning about them (think about the file uploader project).</p><p>Now, while I have an easy way to build with templates, I’m facing the problem of standardizing my styling approach, which means handling many CSS files. In cases where React gives me different ways to style my apps using CSS Modules, vanilla CSS, CSS-in-JS, and/or frameworks like Tailwind, SSR apps lock me into vanilla CSS.</p><p>While template-based applications rely on the server to handle identity, using React-based patterns means I have to work with local storage to persist an authenticated user. In places where React gives a better way to define intuitive interfaces, I have to write a dedicated API contract rather than having every useEffect track its own requests for uniformity and better testing.</p><p>Not that any approach is better than the others, but the right balance needs to be struck and the right trade-offs made. I’ll pen an article on the differences between building applications using server-side rendering and client-side API architectures in the future.</p><h3><strong>Technical Interviews Have Started Coming My Way</strong></h3><p>As I approach the end of The Odin Project’s full-stack web development curriculum, I’ve created a simple cover letter, a two-page CV, an updated LinkedIn profile, and an active GitHub profile for web development job applications. I have to say that I’m receiving interviews every once in a while, it feels nice to chat about how my skills can be used and translated into business value.</p><p>I have taken a technical test for frontend development with VectorShift AI. While I may not have been invited to the next stage of the interview process, it is truly spectacular to see myself working with new codebases and expanding them to the best of my abilities.</p><p>I have also been hacked along the way, which has made me more cautious about tech job posts. Someone created a full weather SaaS API that, when making requests, would drop ransomware, yet the responses were JSON, and I lost a Telegram account.</p><p>My most recent interview was with another developer from India, and together we reviewed my web development skills, touched on specific repos, and asked very technical questions about my architectural designs. Questions revolved around my approach and its benefits, for instance. In the file uploader, why store image details in the database while keeping the files on the server?</p><p>After the software engineering skills assessment, he asked me about my educational background and bombarded me with course-specific questions, such as the difference between a microprocessor and a microcontroller. The components I used in my final project on campus and what it was about (I built a CPR-guiding device that would train users on the correct way to perform CPR based on the patient).</p><p>After the interview, I called my peer developer, Brian, with whom I studied on campus, and told him I had been asked about electronics. Actually, the part that excited me the most was that the dev told me I knew what I was doing, and that I would hear from him in the coming days. Fingers crossed, hoping we nail our first paid role and ship something others use or rely on to make their lives easier.</p><h3><strong>What Three Years of Learning Actually Taught Me</strong></h3><p>One thing I have learned is that even the biggest mountains can be climbed. Programming as a whole sounds complicated until you start taking things bit by bit, topic by topic, and task after task. When I was starting, conversations were about the principles of programming, functions, etc., making small things work, organizing small bits of code, and just getting things to work.</p><p>Further along, I’ve moved into JavaScript frameworks and written larger applications, serving as the sole architect from scratch. The experience I have gained from building hands-on projects cannot be gained by working through independent tutorials.</p><p>At first, it feels like you are not moving; then, as time passes, your capability grows, and with it, so does your confidence as more work comes your way. In terms of learning, I’m now working my way through design patterns and frontend architecture, and much of the learning happens by putting all the different pieces of the build together.</p><p>I have read a lot of documentation, and I’m at a point where I’m looking to study the React, Express, and Node documentation end-to-end to understand better the technologies and why they work the way they do. While at it, I have also learned to be patient while learning to approach new problems with confidence.</p><p>By far the most important lesson is to break down a problem into actionable steps I can implement in JavaScript code. And the most exciting thing is that I can now call myself a full-stack developer, with actual projects to back up my claim. I’m not claiming to be the best out there, but it’s amazing to look back at the progress. Started from the bottom, now I’m here.</p><h3><strong>Where I’m Going Next: API Documentation</strong></h3><p>Much I have not said, as it is honestly difficult to distill three years of intentional knowledge-seeking, skill acquisition, challenges, and progression into a single piece. I’ll still finish up the three remaining projects, as they are a good part of my portfolio and they incrementally challenge my skills without burning out.</p><p>I’ve already hinted about my desire to read the documentation for the tools I’ll be using to build full-stack web applications. And while I’ll be doing it as I also build applications, I’ll be moving on to my next challenge: learning how to write API documentation. By now, I’ve already built some, and I’m also well-versed in industry terms.</p><p>I’m also actively searching for companies that are seeking my skills and would be good places to apply my experience whilst also offering opportunities to grow and expand further. If you are starting, I can assure you it will not be easy, but it will be so rewarding that you won’t regret a single day of learning.</p><p>If you’re a senior developer reading through my journey, I’d appreciate the chance to be mentored even through side projects. And for curious developers, I’d always appreciate a <a href="https://github.com/john-walter-munene">look at my work on GitHub</a> and some thoughts on how I can become a stronger developer. If you are a founder or want to work with me, <a href="https://medium.com/midwaymaster10@gmail.com">shoot me an email at midwaymaster10@gmail.com</a>. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4df8e6dada92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 AI Tools That Help Technical Professionals Explain Complex Ideas Better]]></title>
            <link>https://medium.com/@Munene254_/10-ai-tools-that-help-technical-professionals-explain-complex-ideas-better-9f31bbebfaea?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f31bbebfaea</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[presentations]]></category>
            <category><![CDATA[presentation-design]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 03:24:18 GMT</pubDate>
            <atom:updated>2026-08-30T07:05:45.005Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Explore 10 AI tools that help developers, analysts, and technical teams turn complex ideas into clear, engaging presentations.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hwahhQLXnEhlvj0f_h3IXg.png" /><figcaption>Presentation Generators Cover Image — Credit to Decksy AI</figcaption></figure><p>As a developer, much of my work involves writing code. However, an equally significant portion of it is explaining what I do: presenting ideas and technical diagrams, sharing the rationale behind my choices, and aligning with other engineering teams.</p><p>While I enjoy problem-solving, I’ve always struggled with presentations and visual demonstrations, and I’ve only been lucky when working with teams that care about GitHub contributions. Technical skills alone are no longer enough in any modern workplace.</p><p>It’s no different for business analysts, data engineers, solution architects, product managers, founders, consultants, and designers who want to pitch projects internally or even give updates to non-technical stakeholders.</p><p>If you’ve struggled with visual storytelling at work, or dislike creating presentations, I’ve been there many times. I’m happy to pass along a bunch of AI presentation tools that can help improve your productivity.</p><h3><strong>Why Communication Has Become as Important as Execution in Technical Careers</strong></h3><p>Many times I’m stuck between knowing a technical concept (out of my own expertise, or even after doing lots of research, hence the most knowledgeable person on the subject) and knowing how to explain it visually at a high level. Communication is key.</p><p>There are many reasons why communication is an essential skill for IT professionals:</p><ul><li><strong>Technical work is increasingly collaborative</strong> — Work in tech revolves around building complex projects, solving problems with new technologies, and working with large teams. The advent of remote work collaboration has even raised the bar.</li><li><strong>High-quality work relies on clear communication</strong> — Digital product requirements are rarely a thing to get right on the first attempt. To understand what customers and clients seek requires a lot of collaboration and communication.</li><li><strong>Career progressions require communication</strong> — Good work alone is not enough to get you promoted to leadership or seniority levels. You need the aptitude to interact with clients, vendors, business teams, and others to drive your success.</li><li><strong>Great ideas often fail when poorly presented</strong> — Many project ideas often fail not because they are bad, but when product proposals are unclear, architectural decisions are vague, and data findings are invisible.</li></ul><p>If visual design is outside your expertise, preparing slides to simplify the presentation can feel harder and take as much time as the work itself. This is where the art of communication comes in, with a large portion of it dictated by the tools you use at work.</p><h3><strong>The Best AI Tools for Creating Clearer Professional Presentations</strong></h3><p>To rank these AI tools for presentations, I evaluated them individually. The decision-making criteria are based on how each tool:</p><ul><li>Helps structure ideas clearly</li><li>Reduces design effort</li><li>Supports visual storytelling</li><li>Saves time</li><li>Makes communication feel easier for non-designers</li><li>Helps technical professionals explain ideas to broader audiences</li></ul><p>Here are the strongest candidates you can adopt for work. Note that prices are as of the time of writing and may be subject to change.</p><h3><strong>1. Decksy — For Turning Complex Ideas into Clear Presentations Fast</strong></h3><p><em>Decksy AI presentation generator removes all the manual work of creating technical presentations by using AI to turn text, prompts, or even predefined outlines into fully formatted slide decks. Decksy automatically handles the structure, layout, and visual flow, ideally letting you focus on the message rather than on how it is presented.</em></p><p>Ah, yes, Decksy AI presentation generator is one of the tools every developer <a href="https://decksyai.com/">holds </a>on to after using it at least once. Why? As highlighted in the snapshot below, simple steps will get you ready decks…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WSQGhqiY_wxIGzbHqFDQ5Q.png" /><figcaption>Decky AI Generating a presentation for this article</figcaption></figure><p><strong>Decksy Core Features</strong>:</p><ul><li><strong>Prompt-to-presentation </strong>— A fast and reliable way to move from ideation to finale. Decksy breaks ideas into logical sections, with slides for each, and ensures clear content from titles to bullet points.</li><li><strong>Outline-based slide creation </strong>— An existing outline can be provided to Decksy (e.g., from a meeting or sketch notes), and it’ll be converted into clean slides while preserving your original structure.</li><li><strong>Built-in templates </strong>— A large library of templates is open to use for different use cases depending on the context you are operating from. Templates adhere to predefined structures, consistent fonts and colours.</li><li><strong>Smart slide structuring </strong>— Another differentiating feature of Decksy is its ability to split content into multiple slides, keeping ideas in a clear logical order and readable formats.</li><li><strong>Fast editing and regeneration </strong>— And when you have multiple iterations moving quickly, Decksy offers options to edit the text directly or even regenerate based on improved prompts.</li><li><strong>Export and sharing options </strong>— A final flexibility of Decksy is the ability to use presentations wherever you want via exports in PDF and PPTx formats.</li></ul><p><strong>Workflow, Integrations, and Workspace</strong> — A single platform that supports team collaboration throughout drafting and editing in real time is available on Decksy.</p><p><strong>Why I chose to use Decksy in my daily routines</strong></p><p>Often, when I need to give presentations, I want to move through the slide creation process quickly so I can focus on the parts of my work that matter. Decksy made it easy with a smooth learning curve because the interface guides the process in simple steps.</p><p>Regarding the quality of the output, I found Decksy to require little to no manual input for production-ready presentations. It is a great fit for startup environments, sales coordination, consultancy, and marketing. Decksy plays a key role when I need to pitch new projects.</p><p><em>Pricing models for Decksy are balanced, breaking down as follows: $2 for 7 days, $19.99 for monthly access, and $9.99 for monthly access on the yearly plan, for a total of $119.88.</em></p><p><strong>Every day, Decksy AI presentation generator gives you one free presentation, so you can try it yourself and see exactly what it offers.</strong></p><h3>2. Gamma — For Fast, Narrative-Driven Presentations</h3><p><em>Use Gamma AI to generate presentations, websites, documents, and social posts from uploaded files, pasted text, or even prompts. It follows a card-native content layout, making it dynamic across different devices.</em></p><p><a href="https://gamma.app/about">Gamma AI</a> offers a suite of features, organized for ease and speed when creating early-stage presentations. It allows you to create themes, update logos, and modify colors and fonts. An analytics dashboard has been built-in for tracking user-centric metrics.</p><p>Gamma AI supports embedded content types and holds a wide variety of export options. On the note of alignment, Gamma AI is a fit for marketing teams, educators, and founders who make standalone presentations.</p><p><strong>Pros:</strong></p><ul><li>Quick and iterable draft generation</li><li>Link-based sharing of presentations</li><li>Collaboration support for teams</li><li>Modern designs from a card-based layout approach</li><li>Interactive elements such as polls, charts, and GIFs</li><li>Chat-based interface for content updates</li></ul><p><strong>Cons:</strong></p><ul><li>Limited brand control</li><li>Collaboration support at the enterprise level is still in development</li><li>Exports to PowerPoint occasionally break</li><li>Limited support for features in offline mode</li><li>A stiff learning curve for keyboard shortcuts</li></ul><p><em>Pricing for Gamma AI starts at $9/month for individual use, $18/month for small- to medium-sized enterprises, and $90/month for larger companies.</em></p><h3>3. Beautiful.ai — For Professionals Who Want Better Design Without Design Skills</h3><p><em>BeautifulAI can be used to build slides by working with predefined template layouts that automatically adjust to the content. It holds a large repository of usable designs rather than requiring you to start from scratch.</em></p><p><a href="https://www.beautiful.ai/?">Beautiful AI</a> is a good fit for diverse business presentations, such as sales updates and reports. One reason for its popularity is that it is cloud-native and supports collaboration. Beautiful AI includes visualization elements to create charts from simple datasets. It also has an AI-presentation generator where quick drafts can be prompted and iterated on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*vLTK4cTFBVE3YaZFx-WvqA.png" /><figcaption>Beautiful AI Landing Page</figcaption></figure><p><strong>Pros:</strong></p><ul><li>Removed design work as you’re working with templates.</li><li>Easy to adopt across teams as there’s no learning curve</li><li>Creates consistent presentations that align with brands</li><li>Exports presentations to PDF or PowerPoint format</li><li>Version history to roll back in time (much like Git)</li><li>Extensive slide library of business-oriented templates</li></ul><p><strong>Cons:</strong></p><ul><li>Limited flexibility as dealing with templates (less control than traditional tools)</li><li>A template-driven app means less uniquenes</li><li>Limited offline functionality</li><li>Occasionally lags with large presentations</li><li>Struggles with heavy and complex data presentations</li></ul><p><em>The pricing for Beautiful AI starts at $12 per month for individuals and $40 per month for teams, with custom pricing based on the need for support, security, and control. You may complete one-time projects for $45</em></p><h3>4. Tome — For Visual Storytelling and Idea Exploration</h3><p><em>Tome application is targeted at narrative-driven presentations done in a modern aesthetic. Use its AI to develop presentations from existing templates, personalized to specific tasks and roles through prompts.</em></p><p><a href="https://www.tomeapp.com/">Core features that make Tome appealing</a> are a diverse collection of templates that adapt to different technical needs, a balanced set of editing tools that keep the process simple, content-oriented designs, and robust guided structures in presentation development.</p><p><strong>Pros:</strong></p><ul><li>An easy-to-use, intuitive user interface</li><li>AI storytelling to polish your content with visual suggestions</li><li>Content priority over design, keeping the process seamless</li><li>Modern templates and layouts for creative folks</li><li>Role-based templates for different business needs</li></ul><p><strong>Cons:</strong></p><ul><li>AI-generated layouts aren’t open to extensive customization</li><li>Limited export support for the PDF document format</li><li>Some core features are only accessible in premium tiers</li></ul><p><em>Tome’s pricing is $10 per device per month and $7 annually, with up to 6 devices per account, a 33% discount on other tools in their suite, and monthly webinars from the core team.</em></p><h3>5. Canva Magic Design — For Accessible Visual Communication</h3><p><em>Create slide decks and graphics in Canva, drawing from a library of templates, AI-driven chat-based design assistance, and a drag-and-drop visual editor. Canva presentations are created from a description of your topic.</em></p><p><a href="https://www.canva.com/presentations/">Canva presentations</a> are part of the Canva design platform, which already supports brand kits, shared team designs, and web-based editing without software installation. An AI-generated shortcut is usable alongside manual designs, making it suitable for students in technical studies, marketers preparing quick pitches, and users familiar with the Canva platform.</p><p><strong>Pros:</strong></p><ul><li>Makes designs accessible and is effortless to use</li><li>AI-chat-based interactions for less friction when in use</li><li>An intuitive and fast editor</li><li>Support for many content formats</li><li>Good collaboration for teams</li></ul><p><strong>Cons:</strong></p><ul><li>There’s a limit to customization, unlike advanced design tools</li><li>Complex content presentations like data-based take effort</li><li>More design focused as opposed to content structure</li><li>Brand consistency depends on the ability to customize</li><li>AI outputs aren’t fully ready and must be refined</li><li>Without enough customization, templates feel repetitive</li></ul><p><em>Canva premium features are charged at $53/year for individuals and $116/year for businesses, as ordered. A custom pricing option is available for large enterprise models that want advanced features such as large storage and priority support.</em></p><h3>6. Pitch — For Collaborative Team Presentations</h3><p><em>When your work relies on collaborative workflows, Pitch AI’s modern workflow tools feel like Google Workspace’s. It is good for designing presentations from scratch using AI prompts and is responsive in UI across all devices.</em></p><p><a href="https://pitch.com/">Pitch offers rich features</a> beyond ordinary deck software, including brand tools for style creation, an extensive template repository, sticker support, and code-generation tools. It is the tool with the most integrations, spanning Google Suite, charts, CRM systems, software design tools, files, forms, images, product demos, scheduling, and video creation.</p><p>It is ideal for a variety of professional contexts, such as startups, sales, creative and design agencies, and boards/executives who deliver frequent presentations in the business space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*S8zXuKTZLwRWba854tK8GA.png" /><figcaption>Pitch AI</figcaption></figure><p><strong>Pros:</strong></p><ul><li>A creative but minimalistic design style</li><li>Presentation analytics</li><li>Great for large teams that collaborate on presentations</li><li>Strong support for offline operation mode</li><li>Import PowerPoints that you can enhance</li><li>Version control and history access</li><li>Comment/assign style for joint work</li></ul><p><strong>Cons:</strong></p><ul><li>Importing PowerPoints has issues and leaves out icons</li><li>Few shapes and charts when working with data layers</li><li>Only supports the English language</li><li>Lack of support for resizing slides</li><li>Little support for creating flow diagrams</li></ul><p><em>Prices for premium tiers at Pitch are $10, $15, and $20/month, respectively, targeting individuals, small teams, and large teams. You may request a custom plan per your needs.</em></p><h3>7. Notion AI — For Structuring Ideas Before Presenting Them</h3><p><em>Got rough work notes or messy thinking? Notion AI helps turn scattered technical content and ideas into structured communication before you design a presentation.</em></p><p><a href="https://www.notion.com/product">Use Notion AI to summarize notes</a>, convert long technical documentation into concise explanation snippets, generate meeting takeaways, and organize ideas. If your team is using Notion to manage work through its boards, there’s a nice integration with existing flows.</p><p><strong>Pros:</strong></p><p>● Excellent for turning messy thinking into organized communication</p><p>● Strong summarization for technical notes and documentation</p><p>● Useful for converting meetings into actionable presentation points</p><p>● Works well with existing Notion workflows</p><p>● Flexible for research, planning, documentation, and presentations alike</p><p>● Good collaboration when working with a team</p><p><strong>Cons:</strong></p><p>● AI assistance works best if your workspace is already well organized</p><p>● Heavy users may find premium plans expensive for teams</p><p>● Formatting occasionally needs manual cleanup after AI outputs</p><p>● Less visually oriented than dedicated presentation tools</p><p>● Some advanced AI functionality sits behind higher-tier pricing</p><p><em>Notion premium charges $10/month for access to all features, and business plans are capped at $20 per user per month.</em></p><h3>8. SlidesAI — For Quickly Converting Notes into Slides</h3><p><em>Turn any text into presentation slides with SlidesAI. Note that SlidesAI is an add-on for Google Slides and Microsoft PowerPoint, not a standalone application.</em></p><p><a href="https://www.slidesai.io/">SlidesAI’s outstanding features</a> include text-to-presentation generation, a topic operation model with a presentation outline, support for over 100 languages, a rich library of over 1.5 million images, and an AI writer for editing, shortening, and translating prose.</p><p><strong>Pros:</strong></p><ul><li>Creates presentations at speed from an accessible process</li><li>Room for creative customizations in slides</li><li>Support for collaborative projects</li><li>Branding and theming features</li><li>Smooth integrations with Google Slides and PowerPoint</li></ul><p><strong>Cons:</strong></p><ul><li>Bugs in core functionality, for example, subscription cancellation</li><li>Outputs are more generic instead of being in-depth</li><li>Only supports the online mode, no offline support yet</li><li>Customer support is less responsive</li></ul><p><em>SlidesAI pricing is broken into two offers: $10/month for students and $20.83/month for educators and professionals. Both tiers are billed annually at $120 and $250, respectively.</em></p><h3>9. Visme — For Explaining Data and Processes Visually</h3><p><em>Use Visme to create diverse visual content across presentations, infographics, social media posters, and graphics. Generate polished images without needing design skills.</em></p><p><a href="https://www.visme.co/">Visme is an AI-native collaborative</a> tool for design and writing operations. Beyond AI assistance, it houses a collection of design tools; hence, best suited for professionals with some design background. Visme has a brand kit functionality and predesigned templates designed for visual clarity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OoWcwVCfuhCyYb9nFO-qvw.png" /><figcaption>Visme</figcaption></figure><p><strong>Pros:</strong></p><ul><li>Rich template library across reports, infographic layouts, and general slides</li><li>Strong visual content creation tools including dashboards, icons, charts</li><li>A flexible drag-and-drop editor that is easy to use</li><li>Interactive presentations with clickable menus and embedded media</li><li>Export multiple document formats: PDF, PPT, PNG, and JPG</li><li>Basic brand management suite: store logos, colors, fonts</li><li>Integration with many tools: Google Sheets, Mailchimp, YouTube, and Unsplash</li><li>Real-time collaboration when working with teams</li></ul><p><strong>Cons:</strong></p><ul><li>No downloads in the free plan and 500 MB storage</li><li>A lack of support for offline mode</li><li>Visme is not accessible using a mobile phone</li><li>Limited AI slide generation: template approach mostly</li><li>Brand management has few features</li><li>It is a design-first tool: narrative structures require manual effort</li><li>Complex presentations take time to refine, especially with large data sets</li></ul><p><em>Visme premium options start at $12.25/month for individual use and $24.75/month for teams. Get custom pricing if you are working with at least 10 people.</em></p><h3>10. Miro AI — For Mapping Complex Ideas Before Presenting Them</h3><p><em>Where technical details are difficult to explain due to the complexity of visualization, Miro AI translates systems thinking, architectural decision workflows, and complex dependencies into visual maps, then into polished slides.</em></p><p><a href="https://miro.com/index/">Miro AI is like an online whiteboard</a> that helps generate diagrams, concise summaries, cluster ideas, create repeatable workflows, organize cluster notes and ideas, and arrange large chunks of info into structured maps. Its core strengths are collaboration across engineering teams, product developers, and business teams through a shared visual workspace.</p><p><strong>Pros:</strong></p><ul><li>Excellent for brainstorming and simplifying complex workflows</li><li>Great collaboration experience for distributed teams</li><li>Useful for architecture diagrams, mind maps, and process flows</li><li>AI-assisted clustering and summarization of ideas</li><li>Large template library for planning and monthly workshops</li></ul><p><strong>Cons:</strong></p><ul><li>Overwhelming features for newbies</li><li>Less suited for polished final presentations compared to slide-first tools</li><li>Large boards occasionally become cluttered or difficult to navigate</li><li>Requires some manual cleanup for polished visuals</li></ul><p><em>Paid options for Miro start at $8/month for an individual to access private boards, and $20/month per member for businesses, with advanced features and security available.</em></p><h3>Which AI Presentation Tool Should You Choose?</h3><p>I cannot stress the role of clear communication in modern work environments enough, as the benefits are self-evident: career leverage, visual storytelling with clarity, and a natural influence that comes from explanations rather than just technical expertise. Most tech workers lean towards accuracy and execution, leaving out communication.</p><p>There are many, many other tools dedicated to creating online presentations. The tools in this list are convincing due to their transparent, fair (in the context of free tiers) pricing model (if you’re in the commercial space) and smooth functionality that integrates with most technical professionals’ workflows.</p><p>While the list has been expressive and detailed based on my own experience, I want to highlight that I’ve found joy at work ever since I started working with Decksy. I’ve now found presentations fun, as I spend less time designing and more time on my work. I’m also excited about teams that use standups and give frequent presentations.</p><p>By the way, if you want to have more leverage at work, <a href="https://decksyai.com/">check out Decksy AI to save time</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f31bbebfaea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Biggest Security Risks in Modern React Apps and How to Fix Them]]></title>
            <link>https://medium.com/@Munene254_/the-biggest-security-risks-in-modern-react-apps-and-how-to-fix-them-402223cc071c?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/402223cc071c</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-security]]></category>
            <category><![CDATA[frontend-security]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Sat, 23 May 2026 01:45:56 GMT</pubDate>
            <atom:updated>2026-05-23T01:45:56.573Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Learn the biggest security risks in modern React apps — from XSS and token storage to API security and dependency risks — and how to fix them.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*mW5ApE_LBYKwvKl0iem7Dg.png" /></figure><p>React is the most popular library for building frontend applications. Most developers love it for its simple learning curve, good performance if you follow the best practices, a smooth learning curve backed by a large ecosystem of resources, a vibrant community, its scalability, and the ability to extend it with other libraries, tools and plugins.</p><p>For these <a href="https://adactio.medium.com/why-use-react-8ccd2ab4fea7">reasons (and others)</a>, React powers both small and large projects, including Facebook, Shopify, HubSpot, Stripe, and recently GitHub migrated to it. According to the 2025 Statista report, React ranks second after Node with a share of 44% in the overall ecosystem. Despite its popularity, React security is often overlooked, as seen in the <a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components">recent vulnerability with server components</a>.</p><p>This article puts together the most common security issues you’ll experience when building with web applications using the React library and practical steps to addressing them. Whether you’re new to building with React or you’re a seasoned builder, this piece should be helpful in your development.</p><h3>Understanding React’s Built-in Protections and Their Limits</h3><p>Before proceeding, it is worthy of note that the React library does not create any vulnerabilities. But when developers enable some options at the time of implementing their solutions, they make web applications vulnerable. These configurations work directly with browser APIs that aren’t safe for use.</p><p>By design, React was built with a security-first approach against cross-site scripting. First, the JSX syntax allows you to write HTML within JavaScript, that is then compiled into plain JavaScript. Compiled JavaScript code is in turn rendered using a React’s virtual DOM, adding a layer of abstraction and a safe gateway to interact with the document object model (DOM).</p><p>To ensure injected data is treated as plain data, React escapes all values in the JSX before passing the over to the DOM. Special characters such as <strong>&lt;</strong>, <strong>&gt;</strong>, and <strong>&amp;</strong> (among others) are escaped into the their respective HTML element entities (e,g., <strong>&amp;lt;</strong>, <strong>&amp;gt;</strong>) which would otherwise cause code injection to the browser. When handling dynamic content from the user, React escapes it automatically.</p><p>React does not prevent backend issues, so you’re bound to ensure that you secure them servers as well. Again, if you are using third-party packages in your applications, it’s an entirely different task to audit them. That known, we can now get down to React vulnerabilities and how to handle them.</p><h3>Preventing Cross-Site Scripting (XSS) in React</h3><p>In any development environment, input (or injection) attacks are by far the most common vulnerabilities. An attacker inserts malicious JavaScript code to the users of your application when they visit your site and the browser executes it. When working with user inputs, you must properly sanitize it to ensure that it is safe before being processed within the application. The same rule applies to working with client-side routing libraries that use dynamic segments to conditionally render content — it must be unescaped.</p><p>Avoid using functions like <strong>eval()</strong>, <strong>innerHTML</strong>, or <strong>document.write() </strong>in untrusted data as it exposes the data XSS vulnerability. Using the <strong>dangerouslySetInnerHTML</strong> property has React treating inputs as HTML and executes code in it if there’s a script aattached. This property bypasses React’s built-in escaping. If a need arises for which you must modify the DOM using this attribute, consider sanitizing it before render. The <a href="https://github.com/cure53/dompurify">DOMPurify is an open-source tool</a> available for rescue in such cases.</p><p><strong><em>The dangerouslySetInnerHTML attribute is still supported for unique cases where content must be displayed from a CMS or rendering HTML-Formatted markdown.</em></strong></p><p>For better development practices that prevent XSS in React, I advocate for:</p><p>· <strong>Web application firewall</strong> — If it is within your resources to afford a web application firewall, deploy it to filter and restrict cross-site attacks. In turn, no adversary script can run.</p><p>· <strong>Parse HTML markup</strong> — Many programming languages have the support for parsing HTML text, use them on the server-side to protect React apps from XSS.</p><p>· <strong>Content-security policies</strong> — A technique that allows developers to control the loading of external and inline scripts.</p><p>· <strong>Cross-Origin Resource Sharing (CORS)</strong> — Adding a security check in every header to ensure that the browser blocks resources originating from a different source.</p><p>In addition to the above strategies, you can also disable mark-up or perform blacklist validation with URL parsing for frontend XSS protection.</p><h3>Secure Authentication: Storing Tokens Safely in React</h3><p>There are many ways to handle storage of authentication tokens in React including, local storage, state variables, and cookies. Each comes with its own set of problems. Using <strong>local storage</strong> is often discouraged because it is accessible using JavaScript. Any script running on your browser has access to local storage and can read tokens stored in it.</p><p>React <strong>state</strong> variables is another way to store auth tokens but there are limitations. When state is updated in React, it triggers a re-render to update the application’s user interface. If the page is refreshed, state variables are reset and we end up losing the stored tokens. Because React state is an allocation of data into memory, it is safer than local storage. However, it is not an ideal solution to keep users authenticated in the long run, unless your app targets short sessions.</p><p>React authentication security so far can be approached better by storing tokens in memory for temporary use and storing refresh tokens in HTTP-only cookies. Authenticating users and using a <strong>cookie</strong> to store session-based information is a better approach. It can also be coupled with configurations such as the<strong> HttpOnly</strong> and <strong>SameSite</strong> attributes for security enhancement. Cookies are a good option because they are transmitted in an encrypted form over HTTPS, are subject to the same-origin policy, and have a small storage capacity of 4 kilobytes (not much data can be stored in them).</p><h3>Avoid Leaking Secrets in React Applications</h3><p>React applications run on the browser, which is a public environment. Client-side code, no matter how preprocessed by bundlers, can be inspected in the browser console, exposing network requests, source maps, and even interactions with browser APIs such as local storage. This single principle makes many secrets leak.</p><p>A common mistake many developers make is storing API keys directly in components or utility files, assuming users will never see them. The problem is that even when using environment variables on frontend development, once bundled and injected into the production build, they become visible in the compiled JavaScript. It could also be the case that you call an internal service directly from the front end, exposing your backend architecture.</p><p>Avoid leaking secrets in React applications by building sensitive application processes on the backend. Where a React application calls a third-party service provider with an API key, replace that call with a call to your backend, which securely handles the request. As such, the backend serves as a controlled intermediary that keeps credentials hidden while validating request sources. If you are using environment variables, they should best be deployed to expose application configuration rather than as a means of protection.</p><h3>Managing Dependency Risks in React Projects</h3><p>Building React applications has never been busy as it is today. For nearly any problem you’ll encounter there’s probably an existing library package that can be added to a React project instead of implementing a do-it-yourself (DIY) solution. While third party packages are a good way to save time, they give an outsider an entry window into your application. On the worst case, a package can send valuable application details (such as authentication credentials) to a third party.</p><p>React package vulnerabilities can be mitigated by secure development practices where your project only uses well-maintained dependencies, regular audits of the dependencies, and updating vulnerable ones if secure versions are published. If they aren’t published yet, the most viable solution is to seek a credible alternative.</p><p>Managing dependency risks in React can also be approached using <strong>static application security testing (SAST) </strong>tools which scan and inspect the application’s source code, byte code, and binaries to uncover security risks. When possible, it is recommended to keep your dependencies at a minimum.</p><h3>Securing API Interactions in React Applications</h3><p>React applications are only as secure as the APIs they interact with. Like many other client-side development frameworks, React operates in isolation, relying on APIs to interact with other systems for authentication, payments, dashboards, and real-time data. At the browser, API requests are visible on developers’ tools and can be analyzed and tampered with. Never trust requests simply because they come from your React frontend.</p><p>Hiding an admin button from the user does not prevent them from manually calling the admin endpoint. If authorization checks are only implemented on the client, the user could initiate admin operations. Another common problem is a lack of validation of data in the backend. Frontend validation is powerful for guiding the user on the data entry process. However, they can entirely bypass it by disabling JavaScript on their client.</p><p>React backend interactions must therefore validate all user input before processing it. While the input may not be of wary or a cause of concern in the context of the database, if passed back to the user, it only proceeds with the instigated attack. Another way to secure React apps is to enforce authentication and authorization using token-based sessions and ensure backend endpoints validate permissions on the server. Depending on the underlying backend operation, you may want to rate-limit the API access.</p><h3>Building Secure React Applications: Key Takeaways</h3><p>Like any other web development framework, it is important to use the latest React libraries. The React Foundation is consistently updating its software with bug fixes, best development practices, and feature enhancements. Check new releases by tracking the React changelog, and make updates as soon as published.</p><p>A simple checklist you can have for React applications is:</p><p>· A review of cross site scripting opportunities in code</p><p>· Implementation of secure authentication</p><p>· Using environment variable only for configuration</p><p>· Auding React third-party dependencies</p><p>· Secure API interactions</p><p>Additionally, do not rely on modified versions of the React library as it makes it impossible to upgrade to newer libraries. By following these tips, you can keep your React applications secure. Happy coding!</p><p>If you’re building a React application security testing tool and would like it to be covered in a similar article, <a href="/service/mailto:midwaymaster10@gmail.com">send me an email to discuss the possibility of collaboration</a>. You may also <a href="https://github.com/john-walter-munene">keep up with my web projects development on GitHub!</a> See you in the next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=402223cc071c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Profile Node.js Apps: A Complete Guide for Efficient Performance]]></title>
            <link>https://medium.com/@Munene254_/how-to-profile-node-js-apps-a-complete-guide-for-efficient-performance-a720c5afa847?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a720c5afa847</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[node-js-performance]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-performance]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 09:28:44 GMT</pubDate>
            <atom:updated>2026-03-26T09:28:44.001Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Complete guide to Node.js profiling: analyze CPU usage, memory leaks, and event loop delays using built-in Node tools and third-party monitoring tools.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PfsC94eDRc3MAVYiIFMt6A.png" /></figure><p>Node.js powers countless web applications, from startups to enterprise solutions. The numbers have it that Node.js is the most used web development framework, with a share of 49% according to the <a href="https://www.statista.com/statistics/1124699/worldwide-developer-survey-most-used-frameworks-web/?srsltid=AfmBOorzChnoCQmkZMZ_h_Z7StCrtxUwhmBF5ehEaQ_wWTwXwzdBZGZw">Statista report for the year 2025</a>. Even though modern web development comes with lots of built-in optimizations, it is every developer’s interest to know how to assess an application’s performance.</p><p>Profiling is all about intentional analysis of applications to identify performance bottlenecks with an end goal of optimizing for scalability. Because Node.js runs a single-threaded event loop, it is well-suited for input/output operations. However, this comes at the cost of new challenges, such as blocking operations, memory leaks, garbage-collection overhead, and inefficient code paths.</p><p>From the application user’s point of view, they could get stuck in unresponsive pages. Over to the business context, this is a loss of revenue, and if this is not the case, you’re incurring extra costs with skyrocketing billing from your cloud provider if all you have to do is throw more servers. If you look closely, modern tooling doesn’t break your code, it impedes the ability to run it at scale. The heck?</p><p>This article is a guide to Node.js profiling. I’ll introduce profiling, start with built-in Node.js profiling tools, expand to third-party alternatives, highlight performance bottlenecks in Node, and explain how to fix them. I’ll wrap up with a case study and some fine-tuned techniques for effective profiling.</p><h3><strong>What is Profiling in Node.js, and What Types are Available?</strong></h3><p>Profiling a Node.js application entails collecting data while it is running, including CPU, memory, and other metrics, to ensure maximum efficiency, responsiveness, and scalability. There are different types of profiling in Node.js. These include:</p><p>· <strong>CPU profiling</strong> — Tracking which functions the CPU spends most time on.</p><p>· <strong>Memory profiling</strong> — Detecting when the program fails to release memory allocations when they are no longer needed, and where it allocates more memory than needed.</p><p>· <strong>Event Loop profiling</strong> — Analyzing the efficiency at which the event loop is processing tasks.</p><p>· <strong>Async profiling</strong> — Understanding the impact of asynchronous operation delays on the overall performance.</p><p>Application profiling can be done in different software development stages. During development, profiling identifies performance issues such as blocking code. In the testing and quality assurance stage, profiling checks for CPU-intensive tasks, which ought to benefit from optimization before deployment.</p><p>Moreover, when you release the first version of your product, it’s important to establish a baseline for which performance metrics are considered to operate normally. In the future, this baseline will serve as a reference if performance degrades unexpectedly upon entering production or after introducing new features.</p><h3><strong>Always Start with Built-in Node.js Profiling Tools</strong></h3><p>Before bringing third-party tools into your development flow (which may come with a learning curve for each tool), consider using built-in Node.js profiling tools that inspect runtime behavior without the need for installing any packages. The most common tools are the <strong>Node.js inspector</strong>, <strong>V8 profiling utilities</strong>, and the <strong>CPU profiler</strong>. We’ll walk through each method.</p><h4><strong>Node.js Inspector ( — inspect and Chrome DevTools)</strong></h4><p>On older versions of Node, you needed the V8 source code to access profiling tools, but they’ve since been exposed in version 4.4.0 onwards as a series of ticks, hence the alternative name tick profiler. The Node inspector is built on the V8 Inspector protocol and allows you to connect Chrome DevTools to a running Node process.</p><p>In turn, this allows you to inspect CPU usage and memory allocations alongside execution timelines. The quickest way to use this is to run a node application with the inspector flag (prefix) applied, as shown below.</p><pre>node --inspect app.js</pre><p>If you’re in a production environment, then specify that using environment variables as shown:</p><pre>NODE_ENV=production node --prof app.js</pre><p>Once your application instance is running, it’s expected that you have an output on the network console, and that could be:</p><pre>Debugger listening on ws://127.0.0.1:9229/...</pre><p>Then, open: `chrome://inspect`. While on the Chrome browser, click “<strong>Open dedicated DevTools for Node</strong>”. If you want the program to pause upon startup, use:</p><pre>node --inspect-brk app.js</pre><p>The command above is useful for debugging initialization logic. Great start! If you’re onto checking a CPU-heavy operation, you can profile it as shown in the example below:</p><pre>// cpu-test.js<br>function slowFunction() {<br>  let total = 0;<br><br>  for (let i = 0; i &lt; 1e8; i++) {<br>    total += Math.sqrt(i);<br>  }<br><br>  return total;<br>}<br><br>console.time(&quot;slow&quot;);<br>slowFunction();<br>console.timeEnd(&quot;slow&quot;);</pre><p>For the above sample, run the code test as….</p><pre>node --inspect cpu-test.js</pre><p>While on the Chrome DevTools, particularly the performance tab:</p><p>1. Click <strong>Record</strong></p><p>2. Run the function</p><p>3. Stop recoding</p><p>This allows you to view the call stack frame chart, which shows exactly where time is spent. Worthy of note is that this method requires no dependencies, is built directly into Node, and also lets you work with Chrome’s rich UI. It supports CPU profiling, memory snapshots, and timeline analysis.</p><p>Some additional non-trivial use cases include event-loop debugging, async stack trace inspection, and memory leak investigation. However, everything needs to be done manually, and there’s a runtime overhead, which makes it less ideal for production environments.</p><h4><strong>Node — prof and node — prof-process</strong></h4><p>In addition, Node provides a lower-level CPU profiler for V8 execution statistics. Unlike the inspector interface, this tool generates logs that can be processed into a readable report. To start profiling, you must generate the report by:</p><ol><li>Running your application with the ` — prof` flag.</li></ol><pre>node --prof app.js</pre><p>Once the program exits, node writes a log file named like `<strong>isolate-0x102800000-v8.log`</strong> that contains detailed information about where the CPU spent time during execution.</p><p>2. Processing the file into a readable format is next in line to make it accessible. Command:</p><pre>node --prof-process isolate-0x102800000-v8.log &gt; profile.txt</pre><p>Upon execution, the command line will now display a summary of CPU activity, including how each appears in the execution stack. Below is a sample excerpt showing that the majority of CPU time is spent on slowFunction.</p><pre>[Summary]:<br> ticks  total  nonlib   name<br> 1200   65%    60%      slowFunction</pre><p>Consider the function below:</p><pre>function expensiveOperation() {<br>  const arr = [];<br><br>  for (let i = 0; i &lt; 500000; i++) {<br>    arr.push(Math.random() * Math.random());<br>  }<br><br>  return arr.sort();<br>}<br><br>expensiveOperation();</pre><p>Profile this function, and your computer will agree with me that much of the time in this function block is spent in the <strong>Array.sort() </strong>call.</p><p>Often, this profiling method is useful for analyzing scripts or batch jobs that do not require a graphical debugger. Simply, use this when reviewing code that calls several functions, and you want an ideal checkpoint for which refactors would be most appropriate.</p><h4><strong>V8 Built-in Tools</strong></h4><p>Lastly, Node inherits powerful memory diagnostics from the V8 engine. It means we have access to two valuable techniques: <strong>heap snapshots</strong> and <strong>allocation tracking</strong>. This operation is somewhat similar to the first one.</p><p><strong>Heap Snapshots</strong></p><p>A heap snapshot captures the current state of memory in your Node process. It shows all allocated objects, their references, and how much memory they occupy. To capture a snapshot, start Node with the inspector flag, navigate to the Chrome memory tab, and click Take Heap Snapshot. The snapshot allows you to inspect retained objects and identify memory leaks.</p><p>An example of a memory leak is the code snippet below that continually stores data.</p><pre>const data = [];<br>function leakMemory() {<br>  data.push(new Array(10000).fill(&quot;leak&quot;));<br>}<br><br>setInterval(leakMemory, 100);</pre><p>Because the array retains the objects, but never releases the references, memory grows indefinitely. Taking heap snapshots over time will show the array expanding, making the leak easy to identify.</p><p><strong>Allocation Tracking</strong></p><p>Allocation tracking provides insight into which parts of your code allocate the most memory during execution. You can access this feature from the memory tab in the previous step. To use it, select the <strong>allocation instrumentation on timeline, start recording,</strong> and run the workload. DevTools will highlight allocation hotspots, helping you determine which functions are responsible for excessive memory usage.</p><p><strong><em>Why start with built-in profiling tools?</em></strong></p><p><em>Third-party tools can be extremely powerful, but they all rely on the underlying V8 profiling capabilities exposed by Node. Starting with built-in tools will help you better understand how Node operations consume memory and CPU. This is somewhat similar to reading a framework’s source code to understand better how it works. And again, it’s also the quickest way to access insights firsthand while in development mode. You can always expand to using external tools later.</em></p><h3><strong>Then, Reach out to Third-Party Profiling Tools for Node.js</strong></h3><p>You are now well-equipped with profiling techniques for Node.js applications. But you’ve also been doing it manually, and given the size of your services, the gap between the amount of code you need to review and your developers’ productivity has grown wide. At this point, reaching out to third-party tools is probably the best route to get the value for your developer’s time. Here’s an incomplete list of tools worth trying, ranked in no particular order:</p><h4><strong>1. AppMetrics</strong></h4><p><a href="https://appmetrics.info/">AppMetrics</a> is a powerful monitoring and reporting tool for Node.js applications. It tracks metrics such as CPU, incoming HTTPs requests, HTTPs throughput, average response times, memory, Heap, event loop times, environment variables, and even custom metrics. Besides visualizing these metrics in a dashboard, AppMetrics also integrates well with external services such as Graphite and InfluxDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*B0aHquPgwFocdAOlAwFz-Q.png" /></figure><p><strong>Pros:</strong></p><p>· Provides real-time metrics and visual dashboards.</p><p>· Supports custom metrics, including business KPIs.</p><p>· Easy integration with Node.js apps via middleware.</p><p>· Can export metrics to Graphite, InfluxDB, or Prometheus.</p><p><strong>Cons:</strong></p><p>· Dashboard setup requires extra configuration.</p><p>· Can add minor overhead to the app in high-performance scenarios.</p><p>· Some advanced features require familiarity with metric backends.</p><h4><strong>2. Clinic.js</strong></h4><p><a href="https://clinicjs.org/">Clinic.js</a> offers a suite of profiling and monitoring tools for the Node.js ecosystem. These include: Clinic Doctor, Clinic Flame, and Clinic Bubbleprof. This tool targets memory leaks, event loop delays, CPU bottlenecks, top-of-stack frequency, and operation latency. It also offers recommendations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*N-pkHCqLGSH8OUGjUofO1g.png" /></figure><p><strong>Pros:</strong></p><p>· Intuitive visual reports that are easy to interpret.</p><p>· Helps diagnose complex performance issues in production or development.</p><p>· Supports event loop, memory, and CPU profiling.</p><p>· Lightweight and CLI-friendly.</p><p><strong>Cons:</strong></p><p>· Requires Node.js applications to be run with the profiling tool attached.</p><p>· Some graphs might be overwhelming for beginners.</p><p>· Analysis is mostly post-run; real-time monitoring is limited.</p><h4><strong>3. AppSignal</strong></h4><p><a href="https://www.appsignal.com/">AppSignal</a> is a commercial monitoring and performance evaluation tool. It stands out in the Node.js community for providing real-time performance insights, error tracking, memory usage, and detailed metrics on request and operation response times. AppSignal also integrates with alerting services to notify you when issues occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*mvYhF8KqX1MPJEsGt7e43A.png" /></figure><p><strong>Pros:</strong></p><p>· Real-time monitoring with minimal setup.</p><p>· Automatic error tracking and performance insights.</p><p>· Supports tracing for slow requests and database queries.</p><p>· Beautiful, intuitive dashboards for quick diagnostics.</p><p>· Integrates with Node.js, Ruby, and Elixir applications.</p><p><strong>Cons:</strong></p><p>· Commercial product — free tier is limited.</p><p>· Access to the full feature set requires a paid subscription.</p><p>· Slight performance overhead for very high-traffic apps.</p><h4><strong>4. PM2</strong></h4><p><a href="https://pm2.keymetrics.io/">PM2</a> is a popular process manager for Node.js applications in production with built-in monitoring and profiling capabilities. Beyond oversight of auto-restart and load-balancing operations, PM2 provides real-time metrics for CUP and memory usage, request counts, and cluster performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4hs36Ajk6HevoJ95lrW2cQ.png" /></figure><p><strong>Pros:</strong></p><p>· Easy to deploy and manage Node.js processes.</p><p>· Built-in monitoring dashboard (PM2 Plus / Key metrics).</p><p>· Supports clustering and process scaling out of the box.</p><p>· Integrates with logging, metrics, and alerts.</p><p><strong>Cons:</strong></p><p>· Full monitoring features require PM2 Plus (commercial).</p><p>· Overhead may be noticeable for very lightweight apps.</p><p>· Some features are redundant if you use dedicated profiling tools.</p><h4><strong>5. Middleware</strong></h4><p>As the name suggests, Middleware involves adding a “middleware” layer to Node.js applications to monitor request/response cycles, execution time, memory usage, and database query times. Some popular middleware packages include `morgan`, `express-status-monitor`, and custom middleware for detailed metrics. It also comes with built-in dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*0Teig0a-pW4ivrm9rk3Zzg.png" /></figure><p><strong>Pros:</strong></p><p>· Lightweight and highly customizable.</p><p>· Can monitor individual requests, route performance, and API latency.</p><p>· Real-time insights for production traffic.</p><p>· Integrates with logging and metric pipelines easily.</p><p><strong>Cons:</strong></p><p>· Only tracks metrics within the request lifecycle</p><p>· CPU-heavy tasks outside requests may be missed.</p><p>· Adds minimal overhead to every request.</p><p>· Requires manual setup for advanced metrics or visualizations.</p><p>Of all these tools, I’ve personally worked with Middleware, and I actually wrote <a href="https://middleware.io/blog/debug-live-production-issues/">a guide to using Middleware to debug frontend applications in production</a>. It’s one of the easiest tools to get started with and still ranks #1 on the subject.</p><h3><strong>Common Node.js Performance Issues and How to Fix Them</strong></h3><p>Now that you know how to profile Node.js applications, let’s shift our attention towards the key areas you can watch out for to optimize for reliability. For each bottleneck, I’ll suggest a solution to it:</p><ol><li><strong>Blocking the event loop</strong> — Node.js is designed to operate asynchronously, even though it supports running code synchronously. File system operations often block operations. In high-traffic situations, dynamically loading config files based on user inputs adds significant delays that aggregate into noticeable latency (delay). The best approach is to load all modules during startup, cache configurations with a refresh mechanism, and use worker threads for CPU-intensive tasks. Node.js docs also provide an efficient way to read large files. Emulate the solution.</li><li><strong>Inefficient database queries and misconfigurations </strong>— Poorly written queries to the database are one way to have slow applications. Using connection pools seems right and easy until traffic spikes, and then you realize there are database connection issues. The solutions here are to optimize queries by indexing, using pagination, or caching. When using connection pools, separate pools by query type, dynamically size pools based on connection latency, and use circuit breaker patterns to prevent cascading failures.</li><li><strong>Memory leaks from global variables or closures</strong> — JavaScript closures seem like an abstract concept when you’re learning programming. Unlike languages such as Rust, which have automatic garbage collection, Node.js requires careful memory management. In development, this might not be visible. In contrast, production failures are common when event listeners are attached to user sessions but aren’t removed when those sessions end (consider a thousand concurrent users who accumulate many of them). Review your code architecture.</li><li><strong>JSON Processing Overhead</strong> — JSON operations use more resources than you’ll likely realize. If an application supports thousands of users, and a rough estimate is that 30% of CPU time is spent on parsing and serialization, hidden costs grow linearly with traffic. There’s no need to have an endpoint that returns many fields while the client seeks a handful. To fix this, use a minimalist approach to field selection at the database level, cache schema validation, and compress JSON responses to reduce load.</li></ol><p>A common blind spot for many developers is the use of standard tools to monitor CPU usage and memory consumption. While these tools give a holistic overview of server performance, they are limited. Rarely will they track application-specific metrics to point out areas that need oversight.</p><h3><strong>Real-World Examples: Where Profiling Exposed Problems</strong></h3><p>On the note of relatability, there have been instances where profiling exposed issues or led to better results. This section is dedicated to exposing such instances.</p><p>The first such case is <a href="https://medium.com/@adesh.barve20/memory-leaks-in-node-js-how-i-found-a-2gb-leak-in-production-8c9032866bd6">a record by Webstack of 2GB leaks in production that crashed servers</a>. In his findings, Webstack used a global variable (an array in this case) to cache user data and generate service reports faster. The only problem was that he forgot to empty the array after generating reports. As long as the server was running, the variable stayed alive. A lesson we can take from this is that if you don’t need data for the duration of the application, store it in a function so it’s popped from the stack after use. Alternatively, a “weak map” is a viable option.</p><p>The second <a href="https://www.shopify.com/partners/blog/shopify-storefronts-have-gotten-faster">Node.js performance study has been put out by Shopify</a>, where they reduced product checkout workflow response times by 35%. How they did this was by profiling transport layer security (TLS) and socket delays, render-blocking in JS/CSS resources, and lazy-loading inefficiencies. Shopify resolved these problems by using same-domain hosting, well-thought-out dynamic injection, intelligent lazy loading, and global infrastructure improvements. Design patterns and architecture are a way to close this gap if you suspect this might be a problem you’re facing.</p><h3><strong>Node.js Optimization Recap: Where to Go from Here</strong></h3><p>In this article, I introduced profiling in Node.js and outlined a workflow for profiling using built-in tools in the Node.js runtime. I’ve also listed out some tools worth checking out if you need production-ready third-party developer tools when you’re handling large code bases. I also listed the common performance issues, how to resolve them, and closed out with some real-world examples. Most importantly, adopt profiling as part of your development routine.</p><p>As you might anticipate, it is important to approach this process with care. Start small with profile-specific modules and functions. Often, you’ll want a list of the metrics you want to optimize. Once the metrics are listed, tackle each individually, like the way you build software, step-by-step, ensuring that when an issue is deemed satisfactory, you move forward to the next one.</p><p>After each evaluation, compare the results of your scrutiny to see the before-and-after for realistic progress. Note that some tools integrate with your code flow in the CI/CD pipeline. For example, Middleware can even be used as a backup in case of failures, once set up correctly, and you might even benefit from AI-suggested code optimizations. This isn’t an advocate for their product, though. I’m just speaking from my experience.</p><p>While there’s much that goes into profiling and Node.js optimization, this article was just a starting point and was meant to expose you to this field. In the future, I’m inclined to share more on the topic as I’m currently tinkering with Express.js on Node for backend development. Much will be coming, so don’t forget to follow me and subscribe to read directly in your email.</p><p>If you’re a developer tool, I write guides to help in the adoption of exciting solutions. <a href="/service/mailto:%20midwaymaster10@gmail.com">Drop me an email</a> to start working together, or even <a href="https://x.com/munene254_">start a conversation on X for a genuine review of your product</a>. Happy Coding! Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a720c5afa847" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From JavaScript to React: Building Real Projects with The Odin Project]]></title>
            <link>https://medium.com/@Munene254_/from-javascript-to-react-building-real-projects-with-the-odin-project-368dab35fb5f?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/368dab35fb5f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[the-odin-project]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 11:48:28 GMT</pubDate>
            <atom:updated>2026-02-13T11:48:28.560Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From JavaScript to React, I share how building real projects with The Odin Project helped me grow from learner to confident React developer.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FLG0A5lQDQGyOnm-SRZ6Vw.png" /></figure><p>I’ve recently finished The React Course at The Odin Project and I wanted to step back, reflect on my experience and progress in web development. When I started The Odin project, I had prior basic programming skills from my Electrical and Electronics Engineering classes with little to show of it for I couldn’t build anything working let alone the thoughts of production. Now that I have been hacking my way into programming through The Odin Project, I wanted to inform anyone about what they can expect and how my journey has been uniquely rewarding.</p><p>When I first finished the JavaScript course, I wrote a title named “<a href="https://medium.com/@Munene254_/from-beginner-to-builder-my-journey-learning-javascript-with-the-odin-project-4662a7e699aa"><strong><em>From Beginner to Builder: My Journey Learning JavaScript with The Odin Project</em></strong></a>”, which has brought me many visitors and a small community here on Medium. I’m thankful to everyone who has been following me since, so this will be a follow up of my progress since then. While this article won’t cover all of my explicit challenges and “aha” moments, it should help you have a holistic overview of what a structured progression from writing JavaScript to React feels like. Let’s dive in!</p><h3>Looking Back: From JavaScript to React</h3><p>When I started to learn programming on a serious level, I only wanted to get how things work, and not feel left out in conversation about software development, although writing in the space was my main goal. I had a year’s toil understanding how JavaScript works under the hood, as in the syntax and the browser operation model (well explained if you have read about the journey in the linked article).</p><p>I had built a few applications using Vanilla JavaScript and was starting to feel proud of my progress as a programmer. Even though I hadn’t built any fancy or modern websites, I had a comprehensive suite under my belt. In the JavaScript course, I had built a few projects such as a Weather app, a battleship game, and even played around with some basic data structures and algorithms. The Battleship game was the ultimate project and with it, I had tinkered with Test Driven Development but I had no idea on how to test my UI, apart form running it myself with lost of hassle on the context of debugging, console log statements being the savior.</p><p>On finishing the Project I wanted to continue this learning so I didn’t halt at that checkpoint. Rather I extended my efforts and started learning ReactJS, the most popular library for building user interfaces to take my frontend skills to a whole new level.</p><h3>Why React Felt Different</h3><p>At first, React felt like I was fighting programming. This isn’t because of learning a new syntax for writing HTML and JavaScript in a single file is hard to grasp, but because it’s a complete shift into a new programming paradigm. My adventure began with an introduction to React, setting up a React environment, writing JSX, rendering techniques, the concept of keys in React and passing data between components. I the proceeded to state in programming, and then did a deep dive into it on the scope of managing it and adding interactivity.</p><p>The lessons on Odin give a good introduction on all of the above topics. Instead of just reading through the lessons, I went ahead to read through all of the linked resources into the React documentation. When I got to the CV application project, the first one in the curriculum, I had spent so much time reading all about state management, and my mentals on writing JSX and the preceding topics had sort of faded into the winds and so I redid the intro lessons once more, this time with a clean focus on the basics as I had done a deep dive. This was meant to bring step back and bring things into perspective as I was well equipped with what is down the state management rabbit hole.</p><p>To mention of a few things about state, your application could take any shape, and based on how you want the product to behave, and thus interactions are the ones dictating what shape your state takes. Note that this doesn’t come automatically as you’ll need to have spent some time with React to internalize the building model, and you’ll also need to understand the least changing data in your application as it goes without saying, it’s what gets tucked into state. Since, I struggled a lot in my first days, I kept close kin, the title “<a href="https://react.dev/learn/thinking-in-react"><strong><em>Thinking in React</em></strong></a>” which is a detailed guide on how to solve problems in React. This was an article I read many times whenever I was stuck or needed to touch an application I was writing. In this case it was my CV application.</p><h3>Thinking in Components: The Shift That Changed Everything</h3><p>After finishing my CV application, I went further to delve deeply into dealing with side effects in React, a way to synchronize your application (DOM) with external activities or procedures. Similar to the state bits, this was another interestingly deep rabbit hole with much to learn that in the end the documentation cautions on when to use state to handle interactions, the appropriate way to use effects, and a note of side effect events, and when to opt for either based on your needs. Things were a bit confusing but on taking note that they side effects are a way of React applications to interact with the outside world I was good to go. In fact, the best lesson learned on this was that I should explicitly separate application specific events in terms of user interaction in contrast with system specific events.</p><p>I wrapped up my effects lessons with a nice memory card project which too, in my development was influenced so much by the Thinking in React guidelines. It was not until I a completion of this project that I felt the state and effects click. By the end of this project, I had developed a good intuition on what a good effect looked like, and while at it I had made the use of the Giphy API SDKs, and had my state well structured. Being my second project and seeing it come to life filled me with much joy looking back that when I started programming, I really struggled with writing loops.</p><p>When I had a working model of the memory card game, I refactored my methods to move them from child elements to a parent to reduce the recreation for methods on every item. While this isn’t a worry for small applications, knowing when something should be defined in the parent rather than the child was something important that I learned. This is a concept that goes hand in hand with the worry about where state should live in your application. I had my friend Sam check my solutions for this project and he signaled that I was progressing relatively well. In the light of looking at lessons learned, this project helped me learn about managing state while working on a real game project. My first CV project was ugly, but my memory card game was better, both in terms of code and final output. Nevertheless, I had working applications.</p><p>Completing this project and seeing work came with a rejuvenation and the urge to proceed forward to learn more about React. Next-in-line was class-based components. While these are relatively used in older code bases, they helped give a different understanding of side effects and how to reason about them. This section was also about explicit handling of effects using classes and through a slightly different syntax even though the end results are the same. From the development learning point of view, these were meant to equip on handling older code bases suppose you met one along the programming journey.</p><p>So far, I was getting deep into the React ecosystem but I hadn’t felt like I was doing much. I had a simple flow of walkthrough through type checking with prototypes for better development, and to have an explicit alert when a function didn’t use the correct props. All this changed when I started using the React router and there were suddenly some extra things to pick on like defining routes, using outlets, exporting routes in their files, and organizing the code around routers.</p><p>While these weren’t really hard, they braced me to get further and I was now working on how to test React applications. Well, here came an interesting challenge where testing in React is slightly different from writing Jest logic tests yet the mental model around the testing of the syntax remained the same. Snapshot tests were now a new way to test modern codebases but the though of getting false positives and negatives had me steering away towards writing actual tests that asserted what I aimed out of the application.</p><p>The Odin Project had shallow details in regards to testing, and so I decided to supplement my knowledge on testing by looking at the React Testing lessons from Full stack Open. I finally got a solid idea and was now ready to work on my final React project, a working shopping cart, a project that challenged me the most but also stitched everything into context around how React works. I also ended up looking at styling React application methods and opted to use CSS modules on moving forward. I didn’t want to use Tailwind as Odin warns on early adoption of frameworks without solid and comprehensive knowledge of CSS. Other options like CSS-IN-JS looked appealing but I’m a lover of clean syntax, and so modules were my final choice, a step better than vanilla itself, with little or no difference from it, only by scoping as the new rule.</p><h3>Shopping Cart: The Project That Stretched Me the Most</h3><p>I had now been somehow deep into React and this project came at an appropriate time that I had to step back and put everything I had learned into practice. Because The Odin Project has a very good encouragement on taking final projects on a course seriously, I resolved to work on something worthwhile in terms of what my code and output would look like. Odin has well described steps or approaching a project and this was no different. The only exception was, I have to architecture my whole application from scratch making all the design decisions.</p><p>This time, I did not need to look at the Thinking in React as I had acquired my own ways of approaching applications. While the docs will talk about the top to bottom and bottom to top ways of building react applications, I have come to conclude that the best way is a dual mode where you think of the top as pages, but then fall back to the bottom and build gradually to the top. There’s now straight separation of the two. Instead, it’s a back and forth.</p><p>As usual, I adopted my application into three static pages, the home page, the shop page and the cart pages. I started by populating my home page, ensuring my shop page handles the errors, and loading states, correctly, move forward to the population with cards and thus wrote some effects, and then I proceeded to the cart page. Worthy of note is that the development of these pages came after writing my navigation bar which I had to refactor when writing shop and cart pages to include some extra information while at them.</p><p>An important thing to mention is that while working on these pages, you are also forced to think about the minimalistic changing data in the application (which is the state) and where to put it. I was forced to think about using outlets to render my home and carts but straight out realized that it’d be a bad practice if I’m handling conditional rendering in routes in the absence of things like authentication. I opted to define my state in the App.jsx component as well as the routes, passing state down and it’s updaters to the correct components. That way my application’s pages could be tested in isolation, and if in any case, when each page updated it’s parent state correctly, the other pages wouldn’t have to worry about them only consuming the updated state.</p><p>While working on the specifics of my shop and cart pages, I tried implementing methods both on children and parent components so that I could have a look at how each programming pattern would have an effect on how I’d approach my tests. On getting my tests to pass for all my components, and testing the UI with a skeleton on running build, I was sure that minimally my application was working and all I needed was to style it. Using CSS modules was really easy to style my app as there were no worries about conflicting rules even if there was a need to have clear layout defined at the component level. I this app I leverage the composition programming pattern, which I wasn’t aware of, yet it still adapted naturally to my coding style. This project really frustrated me.</p><h3>Debugging, Deployment, and Testing Frustrations</h3><p>Even if no one says it out, I found it tough to debug tests and to get them pass. Note that unlikt in jest where we assert logic, here we are actually testing the behavior of the UI by waiting for actions to be called and then testing the DOM changes for expectations. It’s not that testing is difficult, but there’s a learning curve to have your tests passing correctly. Again, some lessons aren’t taught during tutorials but can only be felt on hands on experience. I’ll give an example for context.</p><p>If you opt to write tests using query selectors for classes, it’s easy to get them working real quick. The only problem is that when you switch to using CSS modules, the class names are hashed and now unavailable in the tests. This means that some time had to be spent refactoring my project to pick elements using the right queries and some weird quirks had to be resolved. For example, the testing documentation doesn’t outrightly state that async operations using ‘<strong>forEach</strong>’ are a bit tricky and do not await callbacks forcing tests to fail. Instead, I had to use the ‘<strong>for…of</strong>’ or the regular ‘<strong>for</strong>’, or while loops for sequential operations. Again, if you have utility functions in your components, they’ll need to be called inside the tests to ensure congruence in results.</p><p>Another thing that I couldn’t fix was the fact that when I installed my router, the linter rules were now changed the propTypes stopped working. When I was writing tests for my router, to check that navigation clicks worked, I was forced to install a slightly different package and work with it — as in react-router for the app, and react-router-dom for testing with the React Testing Library. Again it is also worthy of note that testing the application had nearly an equal amount of code to that of the application itself.</p><p>Getting tests to pass was one thing, and now that my application was styled and working, the final bit was deployment. I chose to work with Vercel but had lots of trouble for some inconsistent naming of exports and imports. In this case, React is forgiving that when you run “<strong>npm run dev</strong>” it works well on local host but won’t build on pulling my repo to Vercel. To fix this, I read the Vercel docs that guided on making local builds (like with webpack) run is the right step to getting the application run and deploy of vercel. I struggled my way out by cleaning up the application naming, using some simple bash scripts to automate the figuring out of which parts differ. When my build worked, I run my tests once more before using Vercel deployment commands locally. In this case the command line was really a close tool to work with. I’ve finally <a href="https://shopping-cart-two-indol.vercel.app/">deployed my shopping cart</a> (no media queries as of this writing), and here is the <a href="https://github.com/john-walter-munene/Shopping-Cart">source code</a>. Here’s the look of the cart page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XxFKVIG4CbZ6Hvt5CkZQfw.png" /></figure><p><strong>This final project is something I’m proud of as I built everything from an empty page to some nice working project. I’ve finally finished the course and I’m optimistic that I can now take on any frontend development project no matter the complexity.</strong></p><h3>What The Odin Project Gets Right About Learning React</h3><p>Just like I said in my other article about how The Odin Project teaching how to program by equipping you with the necessary skills to tackle any problem, this has still been the format. I’m in love with the teaching method where you take on some lessons before projects and that they are well structured in incrementally increase the load. The only truth I have realized if you read through all the lessons and grasp all what is required no project will be impossible. The projects aren’t simple, but they are doable based on preceding knowledge.</p><p>If you’re still wondering if it’s the best way to learn React, then you’re at the right place. One, the learning is structured and self-paced so you don’t have any pressure, and you move at your own pace on the expectations that you’re self-aware of your learning goals. Second, The Odin Project teaches through following many unique tutorials, and finally combining them with a project so you can build with confidence. Nothing beats project exposure. Learning through tutorials feels productive as you are making steps, but working on a project tests all the learned concepts in a single sling that you have to make use of everything to create a working web application.</p><p>The final thing to keep in mind is that learning by documentation feels slow and deep but the benefits are crystal clear. The docs give in-depth guides around a topic and text is easily updated with the rolling out of new features, both in React and the JavaScript or Browser updates which are not easy to adapt into content if you’re on videos. This is not trashing videos as a way to learn but I have found videos more resourceful when taken to explore different examples and as a supplement to documentation. Would I still recommend Odin, a triple yes as usual. Give it a shot!</p><h3>Lessons I Didn’t Expect to Learn</h3><p>There are many lessons that I’ve picked up along the way like how programming is easy with React and how it gets you building projects faster and in an easy way. So far, I’d recommend learning React topics in this order: JSX, Rendering Techniques, Keys in React, Passing Data Between Components, state, side effects, class-based components, component life cycle methods, testing (spend some extra time on this one), react router, type checking, fetching data, and styling applications. With a good grasp of these, you can build nearly any project provided that you use each tool for what it’s meant for.</p><p>Again, React does a good job at testing your fundamentals of JavaScript. Had my understanding of JavaScript been shallow, I wouldn’t have made it through this course. I have also learned that getting a working project teaches more than any independent lesson in isolation. Where each tutorial is meant to hold your hand through solving a particular problem, a project forces you think about the whole application in terms of expected output, how you make your architecture suite the application and translating your thoughts into working code. Many people will tell you once you get the sytax you’ll be good to go but learning how to solve problems is equally important. And this, if I must stress on harder, can’t be taught by following blindly following tutorials, but rather by intentional learning.</p><p>In addition, a lot of resilience is needed to get through this course. I have also realized that I do not need lots of hand holding and I’m naturally knowing when to reach out for specific tools, and where to find them. My own code solutions for React were really ugly but they have also really improved by the third project and I can’t really wait to know what lies ahead of where I am at. A lot of research is also needed to make working solutions as there’s nearly a solution for every specific problem in JavaScript, but knowing how to stitch them to work together and correctly is the real labor around programming.</p><h3>What’s Next in My Developer Journey</h3><p>I’m writing this as I close the first phase of my development journey now that I can say at least the frontend is covered. Looking forward, I’m at a point where I can start reading about design patterns and architecture, and I’m now going to be confidently matching into backend development. I will only proceed further by learning better programming patterns on frontend development as I simultaneously hack my way into the backend.</p><p>My take is that it has not been easy but it has been a suitable and challenging journey with lots of learning and humility needed. When I shared my final project to a working full-stack developer for review, I’ve received lots of positive criticism that will force me to go back to my project and to make improvements. I can’t help but admit that following the comments I received, I have moved from wondering how to make it work to how best should this look and work alike. This means that we are talking of designs in the UI/UX and how they can be improved unlike how do I center a div or write my first program.</p><p>Not only has the journey been a little faster when I compare it to what it took to complete the JavaScript course. By the numbers React has taken me six months to have it flowing while JavaScript took me a whole year. This is by far the biggest indicator that I’m learning and my pace is taking quicker revolutions in terms of speed. I’m still on the path to becoming a full-stack developer and so I will be proceeding to Databases, and finally the Node.js course. I had started learning API documentation and I pause this to embark on it once I build my first API so this is something I’m hopeful I can do in the coming months.</p><p>That said, I happy to progress and call myself a frontend developer with hope that in due time, I will be a full stack developer writing about JavaScript while getting paid to learn in a role or at least building my own projects that actually translate to a better bank account. Till, then, I’ll keep Reacting to it in JavaScript, and hope to Node it down as well. If you’d like to chat me more or even offer an opportunity, I’m available on all social platforms.</p><p>Please <a href="/service/mailto:%20midwaymaster10@gmail.com">send me an email</a>, <a href="https://x.com/munene254_">shoot me a DM on X (formerly Twitter),</a> or even <a href="https://github.com/john-walter-munene">review my code on GitHub</a>. Better still, if you’d like to collaborate, <a href="https://www.linkedin.com/in/john-walter-munene-njeru-285909171/">my LinkedIn is open to new networks</a>. Cheers and happy coding! See you in the next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=368dab35fb5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Definitive Guide to Recursive Programming]]></title>
            <link>https://medium.com/@Munene254_/definitive-guide-to-recursive-programming-2a28ca4f3ec5?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a28ca4f3ec5</guid>
            <category><![CDATA[recursive-function]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[recursion]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 13:31:20 GMT</pubDate>
            <atom:updated>2025-12-17T13:32:03.608Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Learn recursion, use it to solve simple programming problems, build on your knowledge by tackling data structures, common pitfalls to avoid, compare it with iteration, and get ready for coding interviews.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ef_JzG5AhrflqnLqZQm68A.png" /></figure><p>Nearly every programmer has faced a nightmare in their first encounter with recursion in code development, learning, or even their professional journey. This is often because there aren’t many resources out there that guide without overwhelming, and a common fear haphazardly instilled in developer communities that leads to hesitation around the topic.</p><p>However, this is just a misconception that ought to be discarded in the world of software development since recursion is such a pivotal concept in programming, especially if you’re to become successful in building complex software that revolves around directory structures, programs themselves, the DOM, and trees, among other areas.</p><p>When I first encountered recursive methods, the idea was simply absurd, as the idea of a function calling itself was all there was to it, and I could not make sense of the topic. Fast forward, deep into computer science, I cannot help but appreciate the role of recursion in programming, particularly in laying the foundation for complex algorithms and problem-solving. I’ll demystify it for you today.</p><p>In this article, I’ll introduce recursive functions and explain the anatomy behind them. Once you understand how they work, I walk through from simple, classic examples to advanced concepts you’ll often find in algorithmic interviews. I’ll also expound on common recursion programming mistakes and compare the ideal to the iteration-counter approach.</p><p>By the end, you should be able to walk confidently into any interview or adapt it to the appropriate situations in your programming endeavors. Let’s delve in!</p><h3><strong>Understanding Recursion: Transforming an Iterative Function</strong></h3><p>In computer science, recursion is all about a function calling itself. Where a big problem in programming exists, recursion breaks it down into small problems and smaller pieces that can be solved, then it recombines their solutions to build up the solution to the main problem. This criterion is often referred to as the divide-and-conquer approach, one transferable to other programming areas alike. It has been, and still is, an important player in algorithm design paradigms based on the concept of multi-branching.</p><p>The best way to build a solid perspective is to shift to functions for our baseline. A function solves a task by running the code inside its body. Through the process of execution, it could call many other functions as described by the code in its body, and one of the possible cases is when a function calls itself. This is the analogy of recursion. Note that it doesn’t matter what programming language you use. The core is the same.</p><p>We’ll illustrate by moving from an iterative function to a recursive one using JavaScript as the language of choice in this tutorial. If you understand programming from a different language, then all you’ll need to do is tailor the syntax to your ideal choice of software development.</p><h4><strong>An Iterative Function that Calculates the Power of a Number</strong></h4><p>Here’s an iterative function that calculates the solution of a base number x raised to its natural power by value y. Simply put, it multiplies x by itself y times. This would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KDiFpaQFviduIbVL7eQrvA.png" /></figure><h4><strong>A Recursive Function that Calculates the Power of a Number</strong></h4><p>Notice how the recursive function is fundamentally different. In short, simplify the task by having the function call itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5_-MtblJ1VgN0a_kFYy1hw.png" /></figure><p>When `<strong><em>getPowerRecursive</em></strong>` is called, its execution splits into two distinct branches:</p><p>· If y === 1 return x, and</p><p>· Else if y !== 1 multiply x by the results of a function call, only this time with its arguments being x, and a value y — 1.</p><p>There are some subtle points to note. If y equals one, return the value of x, which is obvious, and this is called the base case because it produces the results immediately. As in: `<strong><em>getPowerRecursive(x, 1)</em></strong>` gives x. The other bit is that if y isn’t 1, we transform the task into a simpler one by calling the same function with a smaller value of y (which is y — 1). The subsequent steps would follow the same sequence to simplify it further until we reach the base case identified above, where y equals 1.</p><p>To put it another way, we can say that `<strong><em>getPowerRecursive</em></strong>` recursively calls itself until the value of y is 1. For instance, to calculate `<strong><em>getPowerRecursive(2, 3)</em></strong>` follows the following steps:</p><p>· <strong><em>getPowerRecursive(2, 3) </em></strong>which is `<strong><em>2 * getPowerRecursive(2, 2)</em></strong>`,</p><p>· <strong><em>getPowerRecursive(2, 2) </em></strong>which is `<strong><em>2 * getPowerRecursive(2, 1)</em></strong>`,</p><p>· <strong><em>getPowerRecursive(2, 1) </em></strong>which is `<strong><em>2 </em></strong>`.</p><p>What recursion does here is simplify the function call until we reach the most obvious result. Note that as simplification proceeds, we build a chain of function calls, often called the <strong>call stack</strong>.</p><p>This stack is what the program uses to keep track of the steps, and once the base case is reached, the chain unwinds back by passing results from the final call (the base case) to its preceding call and so on, up to the initial function call. For our simple function, we are now traversing inversely, and this means:</p><p>· base case result: `<strong><em>getPowerRecursive(2, 1)</em></strong>` = 2, then pass results to,</p><p>· <strong><em>getPowerRecursive(2, 2) </em></strong>which is `<strong><em>2 * getPowerRecursive(2, 1)</em></strong>` = 2 * 2 = 4, then pass result to,</p><p>· <strong><em>getPowerRecursive(2, 3) </em></strong>which is `<strong><em>2 * getPowerRecursive(2, 2)</em></strong>`, = 2 * 4 = 8</p><p>8 is the correct answer as it matches the iterative approach results. This is the order in which recursive functions work — create a chain of functions that simplify the problem, unchain back, and return results until we have the final answer.</p><p>The number of nested functions in the call stack, inclusive of the first one, is known as the recursion depth. In languages like JavaScript, it is important to distinguish the call stack from the recursion depth, as the former refers to the functions called in the execution context, and the latter to the number of recursive calls. For clarity:</p><p>· <strong>Recursion depth</strong>: number of <em>active recursive calls</em> until the base case.</p><p>· <strong>Call stack</strong>: the underlying program structure holding <em>all active function calls</em> — recursive or not.</p><p>In practice for a pure recursive function, the recursion depth equals the number of stack frames it creates — but conceptually, they’re different things.</p><p>If you prefer to write one-liner code solutions, the above could have been equally done as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*uo9VLPOAks_JtyFiPJIWdg.png" /></figure><h3><strong>Recursive Functions Anatomy: Execution Context and Stack</strong></h3><p>The operation model of recursive calls stems from how functions work under the hood. When a function is called in a programming language, all information about its processes is stored internally in a data structure called the <strong>execution context</strong>. Information in the execution context includes, but is not limited to, where the control flow is (if there are conditionals running in the program as of that time), the current variables and their data, the value of <strong>this</strong> (which we’ll skip for now), among other internal details.</p><p>Each function call has exactly one execution context tied to it. Whenever a function makes a nested call, the current function is paused, its execution context is stored in the internal special data structure called the <strong>execution context stack</strong>, and the nested call executes by creating its own execution context on top of its underlying function. Once the nested call completes, its execution context is deleted, and it follows that, subsequently, the old execution context is popped (retrieved and removed) from the stack, and the outer function proceeds from where it was stopped (paused).</p><p>Worthy of mention is that the maximum recursion depth (which is the number of nested calls) will vary from one language to another, depending on the program runtime engine. In JavaScript, the depth is up to 10,000 calls in most engines, with some supporting up to 100,000. Beyond this number, your program encounters a <strong>stack overflow</strong> error — not the website!</p><p>While there are optimizations, such as <strong>tail call optimization</strong>, to help move beyond this limit, they are only available in simple cases and aren’t supported everywhere as of this writing. This limits the application to which you can use recursion. We’ll expound on this later.</p><h3><strong>Classic Recursion Examples Explained</strong></h3><p>Let’s build on our understanding of the recursive function model by exploring simple classic examples that require less mental strain. Now, before exploring these, it is key to remember that recursion works like normal loops, although you’ll need an exit condition that jumps you out of the recursion so that the function stops calling itself all over time and again until you’ve reached the stack overflow upon which your software breaks.</p><p>What makes recursion difficult is that you have to keep track of all the previous calls in the recursion stack while working around the recursive function. This section is all about converting simple iterative functions to recursive ones, so that you know the difference between the two, and to learn to visualize what’s going on. If there’s a section that requires keen attention, it’s this one, as it’ll help you understand the steps of writing recursive methods. Below are some common solutions for simple programming problems.</p><h4><strong>A Count Down Timer</strong></h4><p>There are many scenarios for which you’d need a countdown timer in programming. Some of the most common ones include authentication token expiry, since many systems issue them with a limited validity period, and a chess move timer, where each player has a time limit to make their next move. A real countdown will use a timer and is more complex than this, so we’ll keep it to numbers for simplicity.</p><p>Using iteration, this would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*2u7NhNVczn0-nYpGxtMrzg.png" /></figure><p>The function logs the current number each time through the loop, decrementing it each time, and when we get to zero, it logs “Hurray”.</p><p>In a recursive approach, instead of using a loop, remember that we’ll call the function again. The first step would be to identify the clause that would break out of the recursion. In the function above, the loop is valid only as long as the counter is greater than zero, meaning it breaks out of the loop when the counter is less than or equal to zero. Forgetting this leads to an infinite loop and eventually a stack overflow error.</p><p>Implementing the break-out condition calls for the use of a return statement (as you’d normally break out of loops). The loop’s iteration decrements the counter. So, in recursion, we decrement the actual number we pass to the function. By code, this would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*X47aXzKjQXyXAKN0YL3aSg.png" /></figure><p>We called the “<strong>Hurray</strong>” logger when hitting the exit condition, and we logged the current number before passing it to the next recursive call. The analogy is to find the exit condition (or base case) and the iteration pattern. Let’s proceed to another example that actually requires returning some value, as was the case in the power function.</p><h4><strong>The Sum of a Range</strong></h4><p>In real-world applications, it’s common to have software estimate the cost of items (or services) using a formula, for instance, where the cost of an item increases with the distance from its service location, ensuring delivery prices are accurate. Another scenario is a game where points are awarded with an increase per level.</p><p>This example uses summing the total numbers up to it. A real-world implementation would be complex than this. On taking an iterative approach:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SP-q8_h7QjbMBSqdK1Ku-Q.png" /></figure><p>The recursive solution would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cTBeqVG9dj4NusrtjliUGA.png" /></figure><p>We added a logger to check for equivalence, so you can test it out and confirm! How did we achieve this solution?</p><p>The approach here is that if the number of items is zero, we return a total of 0, and it’s the base case. For a case where the number is not zero, we call the function supplying it with its arguments as number less one (number — 1) and the total as the existing total plus the current number. If you look closely, it makes sense that in the event you’ve hit the end, where the number is 0, the program returns 0, and on unwinding, we have the function return zero plus the immediate next number, which is one.</p><p>This structure is set out to unwind, adding up the total until we exhaust the recursion depth. In most cases, this will be the part that would challenge you, figuring out how to pass over the results from the preceding function call to the next one. But if you look closely, it’s only a matter of knowing what needs to happen on every function call, which in other words represents the operation that needs to be done were it done iteratively.</p><p>As a general rule for writing recursive functions, identify the base case, then identify the recurring operation (which is otherwise the representation of the iterative counterpart), and then figure out how to pass over the data that needs to move through the function calls. Once you have the first two bits, the last one won’t be so obvious, but it’ll also not be far from the solution. At this point, you can try writing a recursive solution for solving the Fibonacci sequence.</p><h3><strong>Advanced Topics: Recursion in Data Structures</strong></h3><p>Let’s turn to some more advanced data structures to illustrate the power of recursion and how you’d approach the solutions.</p><p><strong><em>Recursive solutions are natural any time that a problem is most easily solved by reducing it to a smaller problem. For example, to sort a list, we can divide it into two smaller lists, sort those individually, then combine the results. This describes merge sort.</em></strong><em> — </em><a href="https://www.reddit.com/r/learnprogramming/comments/f04ps6/how_important_is_recursion/"><strong><em>Kered13 on Reddit, how important recursion is.</em></strong></a></p><h3><strong>The Merge Sort Algorithm</strong></h3><p>Much of your work in programming and computer science revolves around data workflows, particularly structuring it, converting it, and inevitably sorting it. The merge sort is one of the fastest sorting algorithms compared to others, such as the bubble sort, when applied to the right data sets. Essentially, merge sort employs “divide and conquer” by recursively traversing an array until it reaches its smallest subset of the array data (a single item). It then merges the items back together in a sorted manner.</p><p>How would you build a merge sort?</p><p>· Think about the base case</p><p>· Think about the behavior that’s happening time and again, and would be possible to delegate to someone else (to be specific, the same function).</p><p>If you figured this out, then great! If you didn’t:</p><p>· The base is a single array element, meaning we can’t split it further</p><p>· The recurring behavior is splitting the array into sub-elements until we hit the base case</p><p>· The trickiest part is implementing the</p><p>The solution is as shown below. Read through the code before heading over to the explanation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*T_dHakGDX0hYFBp-jNu_Tw.png" /></figure><p>The above code can be decomposed as:</p><h4><strong>1. Function Signature</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PCPLbey2ECT-ZW8zU8e7yA.png" /></figure><p>The parameters are:</p><p>· <strong>array</strong> — the array to sort</p><p>· <strong>low</strong> — start index of the portion being sorted</p><p>· <strong>high</strong> — end index of the portion being sorted</p><h4><strong>2. Base Condition</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*F1tOUBALs-aBchLd0q2XPg.png" /></figure><p>At this point, the low is 0, and the high is 9.</p><h4><strong>3. Find the Midpoint</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9DVAGLtiQMUtqhIOYQpRKw.png" /></figure><p>This bit splits the array into two halves: the left half is low to middle, and the right half is middle+1 to high.</p><h4><strong>4. Recursively Sort Each Half</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ojIZu-gU_oGJdXRfEVxPkA.png" /></figure><p>These calls recursively split the array into sub-arrays until each is an individual element.</p><h4><strong>5. Slice Out Left and Right Sub-arrays</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*0KY1qyuEcdhXzy3GD6osWw.png" /></figure><p>After both halves are individually sorted, the algorithm creates copies of each half(s). For example, if the array became [1, 3] and [2, 4], the step decomposes into left and right arrays, respectively.</p><h4><strong>6. Merge Step</strong></h4><p>This is the trickiest part and where the real magic happens. We’ll break it down into sections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*p72O9IbJ5xOn77A-BlX0xg.png" /></figure><p>The variables i and j are index counters for the left and right arrays, respectively, while k is the index in the original array where we write results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cqcCjmdUSEc3756g_3Q2vg.png" /></figure><p>The above snippet compares the smallest remaining elements from each half, and it picks the smaller one and writes it into the original array by `array[k++] = ….`. It builds a sorted list from left to right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*g2-8KCvnLg_NA1Us1QSCyA.png" /></figure><p>At some point, there may be some leftover elements in either of the halves, especially if your array had an odd number of items. Because you exit the loop in the preceding step when one of the halves is exhausted, only one of these loops actually runs.</p><p>Now, this may not be immediately obvious to wrap your head around, but you can watch this video to learn how the merge sort algorithm works, then revisit this breakdown once more.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmB5HXBb_HY8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmB5HXBb_HY8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmB5HXBb_HY8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/444ad20aaffb77ba25de004d25f1f067/href">https://medium.com/media/444ad20aaffb77ba25de004d25f1f067/href</a></iframe><h3><strong>A Binary Search Tree Traverser</strong></h3><p><a href="http://en.wikipedia.org/wiki/Binary_search_tree">Binary search trees</a> are all about turning a group of data into nodes where each left node is lower than the right node. While we won’t be diving into their internals (leaving that up to you), we’ll mention that you traverse them either by level, in-order, pre-order, or post-order. We’ll attach an iterative and recursive level order traverser for your reference.</p><p>An Iterative level order traverser is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*31ch3ocHMAIYDKc3E4l1Vg.png" /></figure><p>And the recursive function equivalent would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Q0exXjj7vyPZVMMVsVgpWQ.png" /></figure><p>After getting how the binary search trees work, this would be directly self-explanatory. Check out my <a href="https://github.com/john-walter-munene/Project-Binary-Search-Trees/blob/main/src/appTwo.js">full solution on the binary search tree on GitHub for full context</a>.</p><p>If you’re confident in your new skills now, consider building a linked list and using recursion to traverse it rather than following the iterative approach!</p><h3><strong>Recursion in Algorithmic Interviews</strong></h3><p>By now, you should be well aware of how to tackle, if not explicitly sure, recursive problems. In technical interviews, recursion is one of the most underused programming techniques that can set you apart by simplifying complex tasks. Although interviews will differ from one hiring tech company to another, you’d likely encounter them in the types of problems that would naturally take the divide-and-conquer approach to solving the problems.</p><p>Some of the most common examples are backtracking and dynamic programming. Backtracking entails recursively building paths as part of a larger solution while explicitly abandoning paths (backtracks) that don’t lead to a solution as soon as they’re discovered. For instance, it’d be a nice fit to explore and deepen your understanding of the topic if you use it as a foundation for a knight’s travails in a chess build test, if you’re interviewing for a game development role. In preparation for algorithmic interviews, check out this <a href="https://www.geeksforgeeks.org/dsa/top-50-interview-problems-on-recursion-algorithm/">list of 50 recursive algorithm problems</a>.</p><h3><strong>Common Recursion Pitfalls and How to Avoid Them</strong></h3><p>Once you start using recursive methods in your applications, there are some common recursion mistakes to avoid getting build errors. These include missing a base case (the exit condition), which can put your program at risk of an infinite loop. In React, an infinite useEffect loop is conceptually similar to a recursive function with no base case; the effect updates state, the state update triggers a re-render, and the re-render re-runs the effect. In this case, the base case would be that the effect only runs on the update of certain dependencies.</p><p>In addition to the lack of an exit condition, the stack overflow error is one you’re likely to encounter when handling recursive functions. The only way to be sure that your recursion depth does not exceed the maximum call stack is to use this technique on the right data set. It’d be wrong to use a recursive function to traverse a data set with a million items while the limit is around 100k function calls.</p><p>Another point of concern is the performance overhead. If you’ve been writing applications at a production level, you’re aware that the tradeoff in programming revolves around time and space complexities. Always choose the solution with the best performance. If there are multiple branching conditions, recursions can make debugging difficult. On other occasions, recursions can add unnecessary complexity, which brings us to the next point: when to choose recursion over iteration, and vice versa.</p><h3><strong>Recursion vs Iteration: Choosing the Right Approach</strong></h3><p>When choosing between iteration and recursion in programming, there are subtle points to ponder. These include the impact of your choice on performance, memory usage, code clarity, and the appropriate use case for each. From a performance perspective, some frameworks, such as ExtJS, can be slow when working with large lists. In contrast, building on ExtJS relies heavily on iterative methods.</p><p>For memory-constrained applications, recursion is discouraged because each function call creates a new frame on the call stack. Iterative solutions would be best implemented in such environments at the expense of longer time frames, though most modern devices will have sufficient computing power. The good thing is that on launching products, the number of users and their devices should drive your final decision on the best approach. There’s no problem with using code on demand depending on user devices.</p><p>Each development team will have its own standards and code conventions based on its tech stack. Most JavaScript frameworks will have recursive methods offering elegant solutions with clear, readable code for complex problems. However, note that it may introduce inherent complexity in debugging such code compared to straightforward iterative code.</p><h3><strong>Practical Tips for Mastering Recursion</strong></h3><p>Because recursive methods won’t click naturally, it would be best to have a convention that you should adopt when using them in your code. As has been shown in the early bits of this article, here’s what to do:</p><p>1. <strong>Use the iterative approach first</strong> — Iterations are applicable in most cases. By working out an iterative solution, this approach allows you to have a clear picture of the exit conditions and the repetitive operation that is being performed. Even if you can’t clearly map out the solution, this is a good step to visualize the problem and gain a holistic view.</p><p>2. <strong>Extract the parameters of your function</strong> — From step one, it’ll be clear to you which parts of your problem are recursive and which will be your base conditions (as it’s not always that there will be one). Once you have the view of the problem, extract the information you’ll need to proceed to the next step. Refer to the sum range example for context.</p><p>3. <strong>Deduct the minimal problem instance</strong> — Once you have identified the function parameters from the above step, it’s logical that you find the minimalistic instance of the problem based on the parameters. For instance, in the power function, the minimal instance was the case where the power of an element with a natural number of one returned the exact number.</p><p>4. <strong>Add the solution to the minimal problem instance</strong> — With the minimal problem instance defined, the recursive part will already be clear, and it’s time to define your base case such that you’ll be sure your function has an explicit way of breaking out of the loop. Remember, a recursive solution is just a loop, only that it’s the function calling itself, and the base case is its end.</p><p>5. <strong>Expand your function</strong> — This is the step where the recursion actually happens. In some problems, this will be the trickiest part, figuring out how to pass the current data being operated on from each function call to the next. Think of recursion as unrolling a problem instance while carrying its data over, and rolling it back to find the final solution.</p><p>The key thing to note is that these steps may overlap or even depend on how you understand your approach to recursion. All that matters is the base case, a data carrier, and the repetitive breakdown.</p><h3><strong>Bringing it All Together with Recursive Programming</strong></h3><p>In this article, we have discussed recursive methods using practical examples of simple cases, examined the anatomy of this programming technique, and presented solutions for some advanced data structures. While we cannot emphasize the importance of recursion in becoming a good programmer, only consistent practice moving from simple to advanced problems will pay dividends.</p><p>If I were you, I’d start small, trace all examples manually, and convert most of my working solutions from iteration to recursion. And the best approach is to use debugging and print statements to understand call stacks. As a rule of thumb, there are some guidelines you can adopt when deciding when choosing between recursion and iteration: analyze the problem structure, assess the depth of recursion, check for readability and maintainability, and review the impact on performance. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a28ca4f3ec5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Mining vs Data Analysis: key Differences and When to Use Each]]></title>
            <link>https://medium.com/@Munene254_/data-mining-vs-data-analysis-key-differences-and-when-to-use-each-ed5dcfcae201?source=rss-d4f06cfc77cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed5dcfcae201</guid>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[John Walter Munene Njeru]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 15:30:00 GMT</pubDate>
            <atom:updated>2025-11-20T15:31:44.308Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Understand the key differences between data mining and data analysis, their goals, methods, and when to use each for impactful, data-driven decisions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*bJWH3Rze0uVGXS7qSRfw6Q.png" /></figure><p>Data mining and data analysis are words that you’ll often find used interchangeably in organizations dealing with big data. Certain (informed) decisions are needed in most companies, and they aren’t straightforward. Instead, they require transforming raw data into actionable insights. While both techniques are integral to the whole process, each serves a different purpose in the data workflow.</p><p>Data analysis and data mining fall under an interdisciplinary field called data science, which involves the use of mathematical, statistical, and computational techniques for extracting insights and in-depth knowledge from data. In practice, since one interprets data to point out patterns and trends (analysis), and the other (mining) extracts valuable information from larger data sets, they differ in goals, tools, and the overall approach. One is also a subset of the other.</p><p>When deciding which data operation to execute in your industry, be it finance, marketing, or even healthcare, how do you determine which one best meets your current business needs? Let’s explore the differences between the two. We aim to clarify terms and methods, providing a baseline for when to use each. We’ll begin by looking at what it’s like to engage in data science by describing both data mining and data analysis.</p><h3><strong>What is Data Analysis?</strong></h3><p><a href="https://www.quadratichq.com/blog/data-analytics-modernization-moving-beyond-legacy-spreadsheets">Data analysis</a> entails acquisition, cleaning, transformation, modeling, and visualizing results to extract valuable information, which, in turn, is used to draw meaningful conclusions or influence decisions. This is just a guided, systematic inspection of datasets, all to interpret their data, upon which insights from the analysis inspire data-driven decisions.</p><p>Data analysis takes different forms: <strong>exploratory</strong>, to understand what’s happening, <strong>confirmatory</strong>, to validate a thesis or theory and understand why it’s happening, or <strong>action-oriented</strong>, to inspire the actions to be taken. Often, these forms align with broader categories of analytics: <strong>descriptive </strong>(what happened), <strong>predictive</strong> (what’s likely to happen), and <strong>prescriptive</strong> (what action should be taken). The terms represent how data analysis evolves to shape outcomes, but they aren’t exactly synonyms, even though conceptually related.</p><h4><strong>What are the Stages of Data Analysis?</strong></h4><p>In practice, data analysis involves the following stages:</p><ol><li><strong>Discovery: </strong>A stage where the data analyst questions the problem at hand, identifies measurable parameters, and, of course, how they are measured. It narrows down to establishing the context and scope of knowledge, and concludes with an examination of the data, particularly with a focus on the problem.</li></ol><p>2.<strong> Preparation: </strong>A series of steps where data is extracted, transformed, and updated to make it ready for the next-in-line steps. You’ll see companies use <a href="https://www.quadratichq.com/blog/what-is-automated-data-processing-a-primer-for-modern-analysts">automated data processing techniques</a> to handle this phase.</p><p>3. <strong>Modeling:</strong> A key milestone that develops datasets to cater to a wide array of objectives, such as training, testing, and even production. At this point, you discover correlations, outliers, and changes or variations based on the tools you’re using or methodology. It is also an appropriate stage to introduce AI and machine learning to translate the data into easy-to-understand graphical visuals, charts, for example.</p><p>4. <strong>Interpretation: </strong>A pause to reflect on whether the findings from the data effectively answer and resolve the queries in the original problem. Conclusions can be drawn, as well as their constraints.</p><p>5. <strong>Reports/Communication of outcomes:</strong> A close-out phase, post-analysis, where insights and how they have been acquired are documented, enabling further communication to relevant parties.</p><h3><strong>What is Data Mining?</strong></h3><p>As a subset of <a href="https://www.simplilearn.com/data-analysis-methods-process-types-article">data analysis</a>, data mining allows you to discover patterns, trends, and relations in large data sets, a process some will refer to as extraction. Where human analysts are limited, data mining exposes unknown information through pattern recognition. This subfield in data science is an interdisciplinary operation that combines statistics with computer science, specifically an intersection of machine learning, data, and database systems. Simply put, it’s knowledge discovery in databases.</p><p><a href="https://www.quadratichq.com/blog/path-analysis-101-mapping-relationships-for-advanced-insights">Data mining uses association rules to recognize new, valid, and valuable trends in data</a>. This is more of looking into stuff and acting on it, which could be solving issues. Connections, once established, can be fed into business intelligence and analytics systems where they help data experts comprehend and work with complicated datasets. From there, it could also be used to build machine learning models that artificial intelligence systems use</p><h4><strong>What are the Stages of Data Mining?</strong></h4><p>Data mining involves a series of steps as listed below:</p><ol><li><strong>Collection: </strong>A starting point relevant to the process, as it is where you identify and gather data. In big data environments where there’s a mix of structured and unstructured data, you typically <a href="https://www.quadratichq.com/blog/choosing-the-best-data-automation-software">work with data sources in multiple systems</a>, a data lake, or a data warehouse.</li></ol><p>2. <strong>Preparation: </strong>A series of sub-steps that turn raw data into a common (standardized) or unified format upon which further iterations can proceed. The steps include data exploration, data preprocessing, and data cleansing to correct and improve the working set, enacted in this particular order.</p><p>3. <strong>Extraction:</strong> A checkpoint where the data, once fully prepared, is drawn out using appropriate data mining algorithms. Mostly, these machine learning algorithms are run on sample datasets before using them in production environments.</p><p>4. <strong>Interpretation/Analysis: </strong>A final step that evaluates intriguing data relationships, examples being correlations, association rules, or sequential patterns, based on your particular research. Final results proceed to developing analytical models in support of decision-making, or are passed on to relevant personnel in visualizations or story-like methodologies.</p><h3>W<strong>hen to use Data Mining vs Data Analysis</strong></h3><p>Deciding which of these two techniques is needed in your business’s development comes down to a question of objective. If you aim to discover trends and predict the future, then data mining is your go-to option. For understanding some results, measuring impact, or summarizing performance, reach for data analysis.</p><p>Below are some questions to offer a better understanding of the context of choosing based on practical industrial use cases. While not exhaustive, they are good examples for apt comprehension.</p><p><strong>1. Retail:</strong></p><ul><li>Data mining — What buying patterns exist across seasons? (pattern discovery)</li><li>Data analysis — How did sales change month-over-month? (trend measurement)</li></ul><p><strong>2. Finance:</strong></p><ul><li>Data mining — Which users show early signs of loan default? (early detection of risk)</li><li>Data analysis — What’s the average loan performance by region? (performance evaluation)</li></ul><p><strong>3. Healthcare</strong></p><ul><li>Data mining — Which symptoms tend to co-occur with certain diseases?</li><li>Data analysis — How effective was Treatment A compared to Treatment B in the last quarter?</li></ul><p><strong>4. Marketing</strong>:</p><ul><li>Data mining — Which customer segments have the highest lifetime value?</li><li>Data analysis — How did last quarter’s campaign impact customer retention rates?</li></ul><p>Even though we didn’t explicitly cover all industrial use cases, this knowledge applies to any domain and is easily transferable or applicable. It matters a lot knowing what you want and how to actually get it.</p><h3><strong>Turning Raw Data into Action: Blending Analysis and Mining</strong></h3><p>This piece has laid out the differences between data mining and data analysis. In a modern, ever-evolving technology landscape, knowing when to use each is crucial, but the real superpower lies in combining data mining and data analysis. While both have distinct roles, they intersect in <a href="https://www.quadratichq.com/blog/data-science-vs-data-analytics-understanding-the-key-differences">modern data science techniques</a>, and when in action, they will complement each other in the most effective data strategies. How so?</p><p>You could start by using data mining to expose clusters and patterns in your datasets. Once patterns are set, switch context to analysis and use the organized data to understand actions, their causes, implications, and come up with suitable response actions. Lastly, iterate on your data strategy by leveraging insights from analysis to highlight new mining areas that could produce data points warranting deeper analysis. Not only does this hybrid approach empower business setups, it also redefines the way you approach data science workflows.</p><p>Fully equipped with the distinction between data analysis and data mining, you might want to experiment with a hands-on practice. That being so, tools like Quadratic support both techniques in an AI-powered collaborative spreadsheet interface. How can you get started?</p><ul><li><strong>Data analysis:</strong> Load a CSV, prompt AI for a statistical summary, and visualize results automatically.</li><li><strong>Data mining:</strong> Ask Quadratic to group users by activity (e.g., k-means clustering) and watch it generate code + plots for you.</li></ul><p>Curious to see how Quadratic could help you in your data analysis and data mining? No matter your technical expertise, Quadratic is easy and free to use. Head over to <a href="https://app.quadratichq.com/">the Quadratic application and get started with data mining and analysis with an AI assistant</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed5dcfcae201" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>