<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Tooba Jamal - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Tooba Jamal - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:29:46 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/toobaj/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Sustainable Open Source Contribution Routine ]]>
                </title>
                <description>
                    <![CDATA[ Contributing to open source sounds fun until life gets in the way. You get busy, you forget or you don’t know where to start again.  This is why having a routine is so important. Not just for the sake of ticking boxes, but because consistency has a g... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-build-a-sustainable-open-source-contribution-routine/</link>
                <guid isPermaLink="false">6877d242e9c372b3ae56fd21</guid>
                
                    <category>
                        <![CDATA[ Open Source ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Wed, 16 Jul 2025 16:24:34 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752683060753/4ce151ca-8f82-4df9-8328-f2e88676a205.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Contributing to open source sounds fun until life gets in the way. You get busy, you forget or you don’t know where to start again. </p>
<p>This is why having a routine is so important. Not just for the sake of ticking boxes, but because consistency has a great effect: one pull request builds into another, one comment turns into a conversation, one contribution creates an opening. </p>
<p>Let’s talk about how you can build a contribution habit that actually holds.</p>
<h3 id="heading-heres-what-well-cover">Here’s what we’ll cover:</h3>
<ul>
<li><p><a class="post-section-overview" href="#heading-how-to-build-an-open-source-contribution-routine">How to Build an Open Source Contribution Routine</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-1-define-your-motivation-and-goals">1. Define Your Motivation and Goals</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-2-choose-the-right-projects">2. Choose the Right Projects</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-3-create-a-consistent-schedule">3. Create a Consistent Schedule</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-4-engage-with-the-community">4. Engage With the Community</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-5-leverage-tools">5. Leverage Tools</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-6-take-it-to-the-next-level-with-structured-programs">6. Take It to the Next Level With Structured Programs</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-the-long-term-value-of-showing-up">The Long-Term Value of Showing Up</a></p>
</li>
</ul>
<h2 id="heading-how-to-build-an-open-source-contribution-routine">How to Build an Open Source Contribution Routine</h2>
<p>Starting to contribute to open source can feel overwhelming, but it becomes easier once you build a simple routine. With clear goals and steady habits, you’ll stay consistent and motivated. Here’s how to get started:</p>
<h3 id="heading-1-define-your-motivation-and-goals">1. Define Your Motivation and Goals</h3>
<p>Before you write your first line of code or fix your first typo, ask yourself: Why am I doing this?</p>
<p>People contribute to open source for many reasons. Some land new jobs, build businesses, or form partnerships with big companies. Others win prizes, gain recognition, or simply enjoy being part of a collaborative community.</p>
<p>For example, my friend <a target="_blank" href="https://www.linkedin.com/in/paramsiddharth/">Param</a> joined the MLH Fellowship to grow as a software engineer by working alongside mentors and peers. Since then, his career has taken off.</p>
<p>Maybe you want to sharpen your technical skills, find mentorship, or give back to a project that helped you grow. Whatever your reason is, write it down and be clear about it.</p>
<p>Writing down your reason gives you direction and keeps you motivated. Then, turn that “why” into a measurable goal:</p>
<ul>
<li><p>Make one contribution per week</p>
</li>
<li><p>Get comfortable with Python testing</p>
</li>
<li><p>Join a community call once a month</p>
</li>
</ul>
<p>Clear goals help you track progress and stay focused on your purpose.</p>
<h3 id="heading-2-choose-the-right-projects">2. Choose the Right Projects</h3>
<p>It’s often better to start small. Rather than submitting your first pull request to a large, complex project, begin with easier tasks like fixing a typo or improving documentation.</p>
<p>This approach helps you understand the contribution process and gives you confidence to take on more involved issues later.</p>
<p>To find beginner-friendly tasks, you can search for your preferred programming language in the GitHub search bar, then select <strong>Issues</strong> from the left sidebar. Here’s what that looks like:</p>
<p><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeg4C-_JHD5uzo-9UN_EXPKVObWKbQpuq8sEyb083_dchXQlrZ9HFzR2j0xtfAeNeY8JMqXiBc2ayCQ26PttfJTuGGi9LMgpwBbbhmKeW4jkoNmrdAgDAomiYo5kOH0MS0BAsK4PA?key=5pXEvcqHzwuwd-lKS3C88S61" alt="AD_4nXeg4C-_JHD5uzo-9UN_EXPKVObWKbQpuq8sEyb083_dchXQlrZ9HFzR2j0xtfAeNeY8JMqXiBc2ayCQ26PttfJTuGGi9LMgpwBbbhmKeW4jkoNmrdAgDAomiYo5kOH0MS0BAsK4PA?key=5pXEvcqHzwuwd-lKS3C88S61" width="1600" height="757" loading="lazy"></p>
<p>But manually checking each GitHub result for suitable issues can get overwhelming over time. To avoid burnout and save time, try using platforms like <a target="_blank" href="https://firstcontributions.github.io/">First Contributions</a>, <a target="_blank" href="https://up-for-grabs.net/">Up For Grabs</a>, or <a target="_blank" href="https://www.codetriage.com/">CodeTriage</a>. These platforms help you discover projects that are actively looking for contributors like you.</p>
<p>Here’s how each works:</p>
<table><tbody><tr><td><p><strong>Platform</strong></p></td><td><p><strong>How to Use It</strong></p></td></tr><tr><td><p><strong>First Contributions</strong></p></td><td><p>Browse the project library on the homepage, choose a project with your preferred language tag, and start contributing</p></td></tr><tr><td><p><strong>Up For Grabs</strong></p></td><td><p>Browse the project library, filter projects using tags, and start contributing</p></td></tr><tr><td><p><strong>CodeTriage</strong></p></td><td><p>Sign up on CodeTriage, filter projects by language, visit the project GitHub page and start contributing</p></td></tr></tbody></table>

<p>Some tips for beginners:</p>
<ul>
<li><p>Pick something you're genuinely interested in. You're more likely to stay engaged and push through challenges if the project aligns with your passions or long-term goals.</p>
</li>
<li><p>Choose projects that fit your current level but still offer room for growth. The sweet spot is where you're challenged enough to learn without feeling overwhelmed.</p>
</li>
<li><p>Check for clear and active contribution guidelines. A well-documented contributing guide, readme, and issue tracker show that the maintainers care about helping contributors succeed.</p>
</li>
<li><p>Look for projects that welcome newcomers. Explore how maintainers respond to issues and pull requests. A friendly, constructive tone in comments is a good sign that they value and support new contributors.</p>
</li>
</ul>
<h3 id="heading-3-create-a-consistent-schedule">3. Create a Consistent Schedule</h3>
<p>Open source doesn’t have to take over your nights or weekends. It just needs a dedicated time slot that fits your routine, whether it’s 30 minutes after dinner, Saturday mornings with coffee, or one task every Sunday night.</p>
<p>Even if you’re working on a big problem, you don’t have to spend hours in one go on it. Just keep track of it and do it at your own pace. There might also be a deadline for your issue, depending on how you found it.</p>
<p>Use time-blocking or the Pomodoro technique to stay focused during that time. Track your progress with a checklist, GitHub activity graph, or Notion board. A visible streak can keep your motivation strong and help you build lasting momentum.</p>
<h3 id="heading-4-engage-with-the-community">4. Engage With the Community</h3>
<p>At the end of the day, humans are running the open-source projects, from maintainers to contributors. The more you interact, the easier it becomes to navigate the project and find meaningful ways to contribute.</p>
<p>Join the project’s Discord, Slack, or mailing list to stay updated and get a feel for the team culture. Comment on issues, even if it's just to ask for clarification or thank someone for their work. Attend community calls or syncs when you can. </p>
<p>You can also join general open-source communities like <a target="_blank" href="https://www.reddit.com/r/opensource/">r/opensource on Reddit</a> or <a target="_blank" href="https://theprogrammershangout.com/">The Programmer’s Hangout</a>.</p>
<p>You don’t need to be the loudest voice. Being present, respectful, and curious is often enough to build trust. And if you’re stuck, ask. Many maintainers are open to guiding contributors who show initiative and a willingness to learn.</p>
<p>Ask for coffee chats to connect with experts and learn from their experience over a call. Keep an eye on opportunity channels to get job, scholarship, and feature opportunities.</p>
<p>If you have two coffee chats a week, that’s one hour. Add 15 minutes a day for messaging or helping others, which comes to 150 minutes. In total, you spend around 2 hours and 45 minutes each week on community building, and that small effort can create meaningful connections.</p>
<p>Here’s a sample message you can send to people you’ve been interacting with in communities to have a coffee chat:</p>
<p>Hi [Name],</p>
<p>I’ve really enjoyed your insights in the [community/project name] discussions, and I’d love to learn more about your open source journey. Would you be open to a 15–20 minute virtual coffee chat sometime this week or next?</p>
<h3 id="heading-5-leverage-tools">5. Leverage Tools</h3>
<p>Tools make your life easier, no matter what task you’re working on. Luckily, most of these tools are free and can act as your assistants. </p>
<p>Here are a few good tools (and a little bit of automation) that can really help.</p>
<h4 id="heading-tracking">Tracking</h4>
<p>Tools like GitHub’s contribution graph and a Notion checklist help you stay organized and avoid losing track of what you were working on. You can create a simple list of issues and update their status as you go, like "PR created," "PR reviewed," or "merged." Watching that list grow gives you a clear sense of progress, even when the steps feel small.</p>
<p>If your schedule is consistent, block a regular “Open Source Hour” on your calendar and link it to your active project list. This way, you always know what to work on next without having to think twice.</p>
<h4 id="heading-skip-the-setup-hassle">Skip the Setup Hassle</h4>
<p>Setting up your dev environment every time can feel like a chore, especially if you're switching between projects or working on a lightweight machine. Tools like GitPod and Codespaces make this easier by spinning up a ready-to-code environment in your browser. No installs, no messy configurations. Just click and get started.</p>
<h4 id="heading-stay-updated-without-the-tab-overload">Stay Updated Without the Tab Overload</h4>
<p>Keeping up with changelogs, release notes, and blog updates can get messy fast. Instead of jumping between tabs, use an RSS reader like Feedly. It pulls everything into one clean feed so you can stay in the loop without the noise.</p>
<h4 id="heading-level-up-with-your-own-dev-space">Level Up With Your Own Dev Space</h4>
<p>If you’re going deeper into open source and need to host a test version of your contribution, having your own environment makes things easier. A VPS (Virtual Private Server) gives you a clean, flexible space where you can:</p>
<ul>
<li><p>Host a test version of the project you're contributing to</p>
</li>
<li><p>Reproduce bugs without affecting your local setup</p>
</li>
<li><p>Set up your own CI pipelines or preview environments</p>
</li>
<li><p>Run a dashboard, webhook listener, or static site</p>
</li>
</ul>
<p>You don’t need anything fancy to start. Some of the most affordable and reliable VPS options include <a target="_blank" href="https://instancehost.com/">InstanceHost</a>, <a target="_blank" href="https://www.ovhcloud.com/asia/vps/">OVH</a>, and <a target="_blank" href="https://www.hostinger.com/">Hostinger</a>. They offer solid performance without burning through your wallet. There are plenty of other options out there, but I’ve personally used these three and can vouch for them.</p>
<h3 id="heading-6-take-it-to-the-next-level-with-structured-programs">6. Take It to the Next Level With Structured Programs</h3>
<p>If you're feeling motivated and ready to take on bigger goals, consider applying to open source programs that offer mentorship, structure, and real-world experience. Programs like <a target="_blank" href="https://www.onlydust.com/">OnlyDust</a>, <a target="_blank" href="https://www.outreachy.org/">Outreachy</a>, <a target="_blank" href="https://fellowship.mlh.io/">MLH Fellowship</a>, <a target="_blank" href="https://mentorship.kde.org/sok/">Season of KDE</a>, and <a target="_blank" href="https://codeheat.org/">FOSSASIA Codeheat</a> help you grow as a contributor while working on meaningful projects with experienced mentors.</p>
<p>These opportunities often lead to full-time roles. Many participants have landed jobs at top tech companies by showcasing the skills and contributions they built during these programs.</p>
<p>Here’s how each one works:</p>
<ul>
<li><p><strong>OnlyDust:</strong> OnlyDust’s "Wave" is a monthly program that connects thousands of developers with curated open source projects. As your contributions get merged, you earn recognition, climb the leaderboard, and build your reputation.</p>
</li>
<li><p><strong>Hacktoberfest:</strong> A month-long celebration of open source held every October. It encourages first-time contributors to make meaningful pull requests while engaging with the global open source community.</p>
</li>
<li><p><strong>Outreachy</strong>: A paid, remote internship for people from underrepresented backgrounds in tech. You work on an open source project for about three months with close mentorship.</p>
</li>
<li><p><strong>MLH Fellowship</strong>: A 12-week remote program where you collaborate with other fellows on open source projects. Partner companies like Meta, GitHub, and Amazon often sponsor teams.</p>
</li>
<li><p><strong>Season of KDE</strong>: A mentorship program focused on contributing to KDE projects. You work with KDE developers over a few months while building real features and getting feedback.</p>
</li>
<li><p><strong>FOSSASIA Codeheat</strong>: A global contest where contributors work on FOSSASIA projects. It’s open to everyone and includes mentorship, recognition, and sometimes job referrals.</p>
</li>
</ul>
<h2 id="heading-the-long-term-value-of-showing-up">The Long-Term Value of Showing Up</h2>
<p>Open source contributions might seem like free work at first, but in the long run, they can open doors to a successful career. It helps you grow your skills, build a network, and show what you’re capable of all in public. With the right routine, your small, consistent efforts can lead to big outcomes.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Write Documentation That Increases Sign-ups ]]>
                </title>
                <description>
                    <![CDATA[ Writing documentation looks easy, but it is one of the most critical parts of your customer support and growth strategy. Too often, teams treat it as an afterthought – just add a few code snippets and move on. But if you’re serious about product adop... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-write-documentation-that-increases-sign-ups/</link>
                <guid isPermaLink="false">68542e3585d4833f32068976</guid>
                
                    <category>
                        <![CDATA[ documentation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Technical writing  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Thu, 19 Jun 2025 15:35:17 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1750347297168/f873d57d-22e5-4cbb-bda9-ca24861db09d.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Writing documentation looks easy, but it is one of the most critical parts of your customer support and growth strategy. Too often, teams treat it as an afterthought – just add a few code snippets and move on.</p>
<p>But if you’re serious about product adoption, your docs need to do more than exist. They need to guide, support, and convert. In this tutorial, we’ll break down how to write documentation that actually helps users and gets them to stick around.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-whats-the-problem-with-most-documentation">What’s the Problem with Most Documentation?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-write-documentation-from-the-users-perspective">How to Write Documentation from the User’s Perspective</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-start-by-understanding-your-users">Start by Understanding Your Users</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-structure-around-the-four-documentation-types">Structure Around the Four Documentation Types</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-make-it-easy-to-reach-out">Make it Easy to Reach Out</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-keep-your-tech-team-in-the-loop">Keep Your Tech Team in the Loop</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-reuse-what-youve-already-written">Reuse What You’ve Already Written</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-get-ai-help-the-smart-way">Get AI Help (The Smart Way)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-get-feedback-early">Get Feedback Early</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-how-does-documentation-increase-sign-ups">How Does Documentation Increase Sign-ups?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-making-complex-documentation-accessible">Making Complex Documentation Accessible</a></p>
</li>
</ul>
<h2 id="heading-whats-the-problem-with-most-documentation">What’s the Problem with Most Documentation?</h2>
<p>The most common problem with documentation is that its authors believe their audience knows everything. This leads to the loss of many potential leads – causing people to abandon your platform before even fully understanding it.</p>
<p>Here’s why:</p>
<ul>
<li><p>It’s often dry and code-heavy, with snippets and vague bullet points.</p>
</li>
<li><p>It dumps information and expects the readers to figure it out.</p>
</li>
<li><p>It’s written from the developer’s point of view, not the user’s.</p>
</li>
<li><p>It rarely shows how the product fits into the user’s specific use case or workflow.</p>
</li>
<li><p>It combines different content types into a chaotic mess that’s difficult to follow or navigate.</p>
</li>
</ul>
<h2 id="heading-how-to-write-documentation-from-the-users-perspective">How to Write Documentation from the User’s Perspective</h2>
<p>Most documentation is written from a developer’s perspective: technical, feature-first, and dry. But at the end of the day, developers are also humans with problems like others, and when browsing your documentation, they are asking:</p>
<ul>
<li><p>“Can this solve my problem?”</p>
</li>
<li><p>“How do I get it working for my use case?”</p>
</li>
<li><p>“What happens if I get stuck?”</p>
</li>
</ul>
<p>Here’s how you can make people stay and come back to your documentation.</p>
<h3 id="heading-start-by-understanding-your-users">Start by Understanding Your Users</h3>
<p>Before writing a single line of documentation, pause and ask: What do our users actually care about? And it's more than just “connect an API to their client’s app”. It's the intangible benefits they’re seeking, such as two hours saved due to your tool while connecting the API or collecting payments from different clients with a single workflow.</p>
<p>This means that you need to listen before you write.</p>
<p>Dig into conversations happening around your product, not just within it. What questions do users consistently ask during sales calls? What pain points come up in Reddit threads or support tickets? What complaints are circulating on social media that haven’t been addressed yet?</p>
<p>Pay close attention to the words they use while referring to your product.</p>
<p>When you use their words, not yours, your documentation starts to sound like a helpful guide, not a technical manual. That shift alone can be the difference between “let me try this tool” and “I’ll figure it out later.”</p>
<p>Supabase is a good example of user-friendly docs. It begins by categorizing content by product, module, and client library. Each category includes comprehensive documentation with real-world examples, practical use cases, tutorials, and built-in feedback support.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750260785373/46bdc0af-3de8-42c3-bd36-02390db5df2d.png" alt="Screenshot from Supabase's docs" class="image--center mx-auto" width="1897" height="902" loading="lazy"></p>
<h3 id="heading-structure-around-the-four-documentation-types">Structure Around the Four Documentation Types</h3>
<p>Now that you know your customer, your job is to guide them to the correct answer fast. That’s hard to do if everything’s thrown together in one long page. Structure is what turns chaos into clarity.</p>
<p>The best documentation systems categorize information into four types, a <a target="_blank" href="https://docs.divio.com/documentation-system/">framework</a> originally proposed by Divio. Not just different sections, but completely different purposes. Each one meets your user at a different stage of their journey.</p>
<p>Let’s break them down:</p>
<h4 id="heading-1-quickstart">1. Quickstart</h4>
<p>This is the user’s first real experience with your product, and it’s where they decide whether to continue using it. So your job here isn’t to explain everything. It’s to walk them through one thing that works. Slowly. Clearly. And in their language.</p>
<p>Use examples. Don’t assume prior knowledge. Avoid jargon unless you’ve already explained it. The goal is to create that first “Oh, I get it now” moment. Because once they’ve had it, they’ll stick around for more.</p>
<p>For example, the <a target="_blank" href="https://react.dev/learn">React documentation</a> gives beginners a simple walkthrough, from creating a component to passing data between them. It avoids jargon, focuses on one working example, and explains each step clearly. This helps users quickly grasp how React works, creating that first “Oh, I get it now” moment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750243332841/7a1f98f2-24b1-400c-aadd-0534419b0379.png" alt="Screenshot of the React docs" class="image--center mx-auto" width="1895" height="853" loading="lazy"></p>
<h4 id="heading-2-how-to-guides">2. How-to Guides</h4>
<p>These are for users who already know the basics and just want to solve a problem. “How do I connect this to Slack?” “How do I export this as a CSV?” They’re not here to learn concepts. They just want to follow instructions and get something done.</p>
<p>Start by telling them exactly what the guide will help them do. List prerequisites up front if needed. Then walk them through the steps.</p>
<p>For example, the <a target="_blank" href="https://www.tensorflow.org/tutorials/images/cnn">TensorFlow documentation</a> includes a step-by-step guide on how to build a Convolutional Neural Network (CNN) to classify images. It’s task-focused and practical, so anyone trying to implement image classification with TensorFlow knows exactly where to go and what steps to follow.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750243604478/992a12b3-12fb-4c17-a5ec-713e67a49bae.png" alt="Screenshot from the TensorFlow docs" class="image--center mx-auto" width="1896" height="907" loading="lazy"></p>
<h4 id="heading-3-technical-reference">3. Technical Reference</h4>
<p>This is where the raw details live. Your endpoints, CLI commands, Parameter lists, what happens when something fails, and so on. Think of it like a glossary of your tool.</p>
<p>People scan this portion of your documentation, so make it easy to scan. Organize it so someone can jump to what they need. Use consistent formatting and avoid explanations here, but add links to the explanations sections.</p>
<p>For example, the <a target="_blank" href="https://kubernetes.io/docs/home/">Kubernetes documentation</a> includes a comprehensive API reference that lists all available resources, their fields, default values, and behaviors. It’s organized into categories like common parameters and workload resources, making it easy to navigate. Each section focuses on definitions and parameters, with links to related conceptual docs for deeper context.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750244073207/d6c7fddb-8bac-4c25-9fad-b83f2bf8fc72.png" alt="Screenshot from the Kubernetes docs" class="image--center mx-auto" width="1896" height="902" loading="lazy"></p>
<h4 id="heading-4-explanations">4. Explanations</h4>
<p>This is where you step back and explain the thinking behind your system. Why does your product rely on webhooks? Why did you structure your SDK a certain way? When should someone use one method over another?</p>
<p>This part differentiates your tool from the crowd and builds trust. Yet, many documentations miss this. Don’t forget to add a separate section on common errors beyond 404s here. The errors that people encounter when using your tool provide a straightforward solution to those errors.</p>
<p>For example, <a target="_blank" href="https://docs.divio.com/">Divio</a> has an explanation section in its documentation that covers each relevant concept in detail. It starts by explaining the concept itself, then shows how it works within Divio and what practical applications it has. This helps users understand the reasoning behind the system and how to use it effectively.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750244241171/f37e28f5-7c8b-4a2d-bf9b-bd99edf6fa9e.png" alt="Screenshot from the Divio docs" class="image--center mx-auto" width="1893" height="901" loading="lazy"></p>
<h3 id="heading-make-it-easy-to-reach-out">Make it Easy to Reach Out</h3>
<p>Even with perfect docs, users will get stuck. And the worst thing you can do now is make them hunt for help.</p>
<p>Make it ridiculously easy to reach out.</p>
<p>Add a simple “Was this helpful?” prompt at the end of each page. If the answer is no, give them a quick way to say why.</p>
<p>Drop in a link to report bugs, outdated steps, or confusing content. You’ll get real-time feedback from real users.</p>
<p>Invite them to contact support or drop a question in your community Slack or Discord. It’s not just about solving issues. It’s about showing them you’re listening.</p>
<h3 id="heading-keep-your-tech-team-in-the-loop">Keep Your Tech Team in the Loop</h3>
<p>You don’t need to know how every line of code works. But you <em>do</em> need a clear path to someone who does.</p>
<p>Set up a shared document, Notion page, or Slack thread where your development team can casually share technical decisions, temporary errors, important workarounds, and other relevant information. </p>
<p>Also, don’t be afraid to ask your devs directly. A 3-minute voice note or quick message like “Does this sound right to you?” can prevent a dozen user errors later..</p>
<h3 id="heading-reuse-what-youve-already-written">Reuse What You’ve Already Written</h3>
<p>Chances are, you've already explained 80% of what needs to go in your docs you just didn’t call it “documentation” at the time.</p>
<p>Start by digging through what’s already there:</p>
<ul>
<li><p>Sales or support Slack threads where you broke things down clearly</p>
</li>
<li><p>Onboarding emails that walk users through the first steps</p>
</li>
<li><p>Internal guides your team relies on</p>
</li>
<li><p>Blog posts where you’ve explained product decisions</p>
</li>
<li><p>FAQs your support team sends on repeat</p>
</li>
</ul>
<p>Copy-paste, trim, reframe, and you’ve got a doc draft in minutes.</p>
<h3 id="heading-get-ai-help-the-smart-way">Get AI Help (The Smart Way)</h3>
<p>AI tools can cut your documentation time in half, but only if you treat them like a collaborator. One powerful way to use them is by turning raw code into structured docs. </p>
<p>Just drop in a code snippet or feature file and prompt something like: “Write a reference doc for this API endpoint. Include usage, parameters, response structure, and a working example.” </p>
<p>Then take it a step further: “Now rewrite this for a non-technical product manager who’s using the tool for the first time.” This way, you get both the technical version and a plain-English explanation without switching tabs ten times.</p>
<p>I used AI to generate the documentation for the <code>user.updated</code> webhook event, and here’s what it came up with. While the generated doc is functional, I’d like to improve it further.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1750261767771/e9db912c-5a3c-47e9-82cb-6661b4506e92.png" alt="e9db912c-5a3c-47e9-82cb-6661b4506e92" class="image--center mx-auto" width="995" height="805" loading="lazy"></p>
<p>Here are my initial thoughts:</p>
<ul>
<li><p>Avoid starting with generic phrases like “This document describes...”</p>
</li>
<li><p>Jump straight into what the <code>user.updated</code> event does</p>
</li>
<li><p>Remove unnecessary passive voice to improve clarity</p>
</li>
<li><p><strong>For example, instead of:</strong><br>  <em>"The</em> <code>user.updated</code> event is triggered when a user's profile is updated in the system."<br>  <strong>use:</strong><br>  <em>"Whenever a user profile is updated in your system, the</em> <code>user.updated</code> event is triggered."</p>
</li>
</ul>
<p>If the generated text sounds robotic, you can use an <a target="_blank" href="https://humanizerpro.ai/">AI humanizer</a> to make it more natural. Then, give it a final review to remove unnecessary content, add your voice, and ensure accuracy.</p>
<h3 id="heading-get-feedback-early">Get Feedback Early</h3>
<p>Don’t wait for the “final version” before asking for input. Documentation needs to be useful, and it’s better to get clarity early in the process. When you ask real humans for feedback on your documentation, you get a reality check before a customer spreads negative feedback about you.</p>
<p>Instead, test your docs in real-world conversations:</p>
<ul>
<li><p>Drop a how-to guide in your support team’s Slack and ask, “Would you send this to a user?”</p>
</li>
<li><p>Ask a teammate or friend to follow your tutorial. Watch where they pause or get confused.</p>
</li>
<li><p>Run it by sales or customer success, they know exactly where users get stuck in onboarding.</p>
</li>
</ul>
<p>And if you're just a small team of two people, ask each other. Then ask each other's friends. You don’t need a formal process, just honest reactions from real people.</p>
<h2 id="heading-how-does-documentation-increase-sign-ups">How Does Documentation Increase Sign-ups?</h2>
<p>When a developer first arrives at your documentation page, they give it a few minutes to decide whether your tool is worth using, especially if they’re still exploring options.</p>
<p>If they’re required to use your tool for any reason, they’ll likely spend a day or two trying to figure things out. If they can’t find the right information, the frustration builds and often escalates to upper management. That’s when you risk not just losing a user, but losing a team or even a larger client.</p>
<p>Good documentation prevents that.</p>
<p>It is well-structured, speaks to users at all levels, and is easy to navigate. It keeps users on your page longer and encourages them to test your tool instead of bouncing to a competitor. If you also offer feedback channels or live support, users are more likely to reach out when they get stuck, and that support interaction can make all the difference.</p>
<p>Good documentation:</p>
<ul>
<li><p>Reduces support dependency, so users spend more time building and less time troubleshooting</p>
</li>
<li><p>Lowers frustration, which signals maturity and product quality</p>
</li>
<li><p>Builds trust by showing that your team has thought through user needs</p>
</li>
<li><p>Helps users get something working quickly, which often turns into a sign-up</p>
</li>
</ul>
<h2 id="heading-making-complex-documentation-accessible">Making Complex Documentation Accessible</h2>
<p>Writing good docs requires careful planning, collaboration, and a solid understanding of your users. Whether your developers are writing it or you're working with a technical copywriter, excellent documentation is rarely a solo job. It requires input from the people who developed the product and those who support its users daily.</p>
<p>When done right, your docs don’t just explain things – they make your product more straightforward to use, build trust with potential customers, and drive sign-ups.</p>
<p>Liked what you read? I help SaaS companies clarify their messaging and build authority through content. You can connect with me on <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">LinkedIn</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Become a Technical Writer – A Guide for Developers ]]>
                </title>
                <description>
                    <![CDATA[ Being a top-notch developer was my dream – until I realized I could combine my passion for writing with my technical knowledge to earn a living. That's right: I'm talking about becoming a technical writer. And if you're a developer, you may be in a g... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-become-a-technical-writer-guide-for-devs/</link>
                <guid isPermaLink="false">66bf4ac1be10d17622ff39fa</guid>
                
                    <category>
                        <![CDATA[ Career Change ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Thu, 20 Jun 2024 15:54:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/06/tech-writing.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Being a top-notch developer was my dream – until I realized I could combine my passion for writing with my technical knowledge to earn a living. That's right: I'm talking about becoming a technical writer.</p>
<p>And if you're a developer, you may be in a good position to get into technical writing if it's something that interests you.</p>
<p>Developers have a lot of knowledge about topics like Git, Markdown, programming languages, and IDEs that they can use to teach others. And since they have worked with these tools and technologies themselves, they can often write documentation with a user-centric approach. </p>
<p>It's also fairly lucrative to be a technical writer, with the average salary in the US being <a target="_blank" href="https://www.glassdoor.com/Salaries/technical-writer-salary-SRCH_KO0,16.htm">$76,432</a> per year. This makes it a viable career to support yourself and your family.</p>
<p>Luckily, I had technical writing samples to exhibit my writing skills when I decided to give it a chance. My love for writing offered me a ready-made technical writing portfolio and made my <a target="_blank" href="https://www.dreamsinscript.com/career-change/">career change</a> easier. </p>
<p>But this is not the case for everyone and people regularly ask me tips to start technical writing and earn through it. So I'm compiling all the things that helped me transition into technical writing in this article. </p>
<h2 id="heading-what-is-technical-writing">What is Technical Writing?</h2>
<p>Technical writing typically involves breaking down complex technical knowledge into simple words, making it easier for a non-technical audience to grasp technical concepts. The aim of technical writing is to ensure that users can effectively use a technology, which ultimately improves user satisfaction.</p>
<p>As a technical writer, you can write about a wide range of topics and write for different purposes and audiences. Some of the types of writing you may do will include: </p>
<ul>
<li>User manuals</li>
<li>Documentation</li>
<li>Detailed guides</li>
<li>Blog posts</li>
<li>White papers</li>
<li>SOPs</li>
</ul>
<p>and so on.</p>
<p>Accuracy, consistency, clarity, and conciseness are some of the crucial aspects of technical writing.</p>
<h2 id="heading-what-are-the-responsibilities-of-a-technical-writer">What are the Responsibilities of a Technical Writer?</h2>
<p>Technical writing requires extensive research, which can make the writing process longer. Technical writers stay in a loop with Subject Matter Experts (SMEs) to understand the technical details of client products/ services.</p>
<p>After gathering loads of information through expert interviews and research, technical writers compile relevant information into their writing. </p>
<p>After gaining some experience, technical writers might also have to edit and proofread others' writing. Proofreading and editing require patience, attention to detail, and empathy. </p>
<h2 id="heading-how-to-become-a-technical-writer">How to Become a Technical Writer</h2>
<h3 id="heading-share-your-knowledge">Share Your Knowledge</h3>
<p>Start writing tutorials, how-to guides, and share your experience with technology on an open publishing platform like Medium, Hashnode, or HackerNoon. These blog sites are easy to handle for beginners because they're free and some of their publications have a huge audience base. </p>
<p>If you're unsure about how to write technical articles, start reading a lot of them. This will start to give you the sense of how technical writers share their information in an approachable way, how they structure their articles, what topics they focus on, and so on.</p>
<p>Below are some beginner-friendly blog post ideas:</p>
<ul>
<li>How to do X in/ using Y (Example: How to build a portfolio website in WordPress)</li>
<li>X ways to do Y (Example: 3 ways to avoid overfitting in machine learning models)</li>
<li>What I learned in 10 days of working with X (Example: What I learned in 10 days of working in VSCode)</li>
<li>A guide to X: Everything you need to know (Example: A guide to AI Website builders: Everything you need to know) </li>
</ul>
<p>You can also read various publications' technical writing guides. These contain a lot of helpful hints and information about how to write good technical tutorials. <a target="_blank" href="https://www.digitalocean.com/community/tutorials/digitalocean-s-technical-writing-guidelines">Digital Ocean</a> has a pretty well-known one, and <a target="_blank" href="https://www.freecodecamp.org/news/developer-news-style-guide/">freeCodeCamp has their own</a> as well.</p>
<h3 id="heading-build-a-portfolio">Build a Portfolio</h3>
<p>Once you've got a few writing samples, you can help build your credibility by creating an online portfolio that contains all your writing samples. This is something you can share with potential employers or project maintainers.</p>
<p>You can share it on social media platforms, display it on LinkedIn featured section, and send to potential clients.</p>
<p>You can also try writing for publications. Well-known publications often have a huge following and they share contributor content on their social media platforms. This can help build your personal brand as a technical writer, grow your network, and motivate you to write more good stuff.  </p>
<p>Some publications that accept contributions from new writers are:</p>
<ul>
<li><strong>freeCodeCamp:</strong> freeCodeCamp expects you to have at least three writing samples when you submit a contributor application. The application process is a bit more rigorous than some, and they don't accept every application for various reasons. But if you don't hear from them and aren't accepted the first time, don't give up. You can keep improving your writing, and try again later – or try other publications. You can find the fCC contributor guidelines <a target="_blank" href="https://www.freecodecamp.org/news/how-to-write-for-freecodecamp/">here</a>.</li>
<li><strong>Towards Data Science:</strong> Towards Data Science accepts articles revolving around data science and machine learning. They expect you to submit well-structured, comprehensive, and up-to-date articles. Read the TDS contributor guidelines <a target="_blank" href="https://towardsdatascience.com/questions-96667b06af5">here</a>.</li>
<li><strong>Level Up Coding:</strong> Level Up Coding is an online publication focused on sharing technical knowledge to help software engineers learn and grow. They have an audience of developers, designers, and data scientists so they expect content that's useful to them. <a target="_blank" href="https://levelup.gitconnected.com/how-to-get-published-on-gitconnected-dac547ef556b">Here</a> are the contributing guidelines for Level Up Coding.</li>
</ul>
<p>Though all publications have contributing guidelines in place to help contributors write relevant samples, a few tips to make your pitch a success are:</p>
<ol>
<li><strong>Get familiar:</strong> Read at least 3-5 top-performing articles in the publication you want to contribute to. Pay attention to the tone of voice and the level of detail shared to understand their preferences. </li>
<li><strong>Create an outline:</strong> An outline is a structure for your content that keeps you on track while writing. You can create a good outline using top-performing content, AI tools, and your expertise.</li>
<li><strong>Drafting:</strong> Create a draft based on your outline and let it sit for at least two days. This gap helps you spot mistakes in your draft that you might overlook during or immediately after writing.</li>
<li><strong>Submit your draft:</strong> Finally, send your draft for review to the publication. They might edit your draft or ask you to make some changes before they publish it. Some publications also use AI content detectors, so if your publication does, make sure to verify your content using the same AI detector.</li>
</ol>
<h3 id="heading-share-your-work">Share Your Work</h3>
<p>While you're building your portfolio of technical articles, you can share them on LinkedIn (and other social media sites like Twitter) to let the world know about your new skills – and that you're writing about interesting technical topics.</p>
<p>You can also include a link to your LinkedIn profile in the articles you write, if the publication allows it, to help people find you. You'll be amazed to see how many people admire your work, and this will keep you going. You might also receive paid projects and job opportunities in your DMs.</p>
<h3 id="heading-upskill-to-documentation-writing">Upskill to Documentation Writing</h3>
<p>One great way to practice your technical writing (and help others along the way) is to contribute to documentation issues on GitHub open-source projects. This will expand your skillset and give you experience writing documentation and help you become more familiar with contributor guidelines. </p>
<p>Documentation writing is more focused on the product and, unlike blog posts, is usually concise. It follows a predefined structure, and the content format across pages is consistent. Accessibility, consistency, and clarity are the general best practices of writing documentation.</p>
<p>Pay attention to the editor's suggestions to develop a better understanding. There are usually two types of editor suggestions: objective and subjective. Objective suggestions are about general writing guidelines such as transition and clarity, whereas subjective suggestions are focused on company tone and preference. </p>
<p>Objective suggestions help you improve your writing skills and subjective suggestions guide you to align with company voice.</p>
<h3 id="heading-find-paid-projects">Find Paid Projects</h3>
<p>Once you're comfortable writing technical content and doing content research, start searching for paid work. Apply to entry level jobs or look for freelance projects on job boards and in your circle. Doing the real work will really help advance your technical writing journey. </p>
<p>Though freelance platforms have become competitive, you can still find paid projects there. <a target="_blank" href="https://sproutsocial.com/glossary/personal-brand/#:~:text=Personal%20branding%20is%20the%20process,and%20values%20that%20differentiate%20you.">Personal branding</a> works wonders in landing paid opportunities. Keep your GitHub and LinkedIn profiles updated, and share your achievements there to attract potential clients and stand out from the crowd.</p>
<h2 id="heading-how-to-learn-the-skills-for-technical-writing">How to Learn the Skills for Technical Writing</h2>
<p>You can find a lot of quality writing courses, but finding the right course can be a struggle. I've taken quite a few writing courses and I'd love to help you out by sharing the tips and courses that are worth your time:</p>
<ol>
<li>The <a target="_blank" href="https://www.udemy.com/course/secret-sauce-of-great-writing/">Secret Sauce of Great Writing by Shani Raja</a> is a perfect course for beginners. It covers the core aspects of good writing with practice exercises and lots of examples.</li>
<li><a target="_blank" href="https://www.devreluni.com/">DevRel Uni</a> is an online cohort-based program for people seeking to switch to developer relations. They've got a separate class on documentation writing where experts share the secrets of good documentation.</li>
<li>Whenever you secure your first external project, pay attention to editor suggestions. If it's a contributor article and they don't offer a one-to-one editing process, compare your submitted copy with the published article. Take notes of the changes they made. Editor suggestions are precious to make your writing better and if you take them seriously, you'll witness improvements in your writing soon.</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Though career change can be exciting, transitioning from development to technical writing isn't too daunting. You just need to <a target="_blank" href="https://www.dreamsinscript.com/overcome-career-change-anxiety/">manage your career change anxiety</a>, build a portfolio, and start cultivating your personal brand for a successful transition.</p>
<p>Still got questions? Feel free to reach out to me on <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal">LinkedIn</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Improve Your Communication Skills as a Developer ]]>
                </title>
                <description>
                    <![CDATA[ You built an application that solves a problem most business owners face. You registered yourself at a local event to speak about your product, but no one cares. You try selling it on social media groups, but don't receive more than "Wow, that's an i... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-improve-communication-skills/</link>
                <guid isPermaLink="false">66bf4ac482aa0e323269b452</guid>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ career advice ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career development  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ communication ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Mon, 12 Feb 2024 13:03:19 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/02/cover-photo.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>You built an application that solves a problem most business owners face. You registered yourself at a local event to speak about your product, but no one cares. You try selling it on social media groups, but don't receive more than "Wow, that's an interesting idea."</p>
<p>Do these sound familiar? I've been there when I worked on most of my tasks during an apprenticeship, but another member would take all the credit. Turns out, I wasn't clearly speaking about my contributions to the project and how they helped make our project a success.</p>
<p>I was trying to make my contributions count, not to sell any product or impress an employer.</p>
<p>Whether you want to land a new job or make your contributions count, effective communication goes a long way.</p>
<h2 id="heading-why-good-communication-is-important-for-developers">Why Good Communication is Important for Developers</h2>
<p>You might have seen developers who have the same level of technical skills as you being are more successful. And if you pay attention to their daily activities, you'll realize that they've mastered the art of clear communication.</p>
<p>One of the most common reasons behind unclear communication is the assumption that everyone else already knows what you know.</p>
<p>Developers often have to deliver their technical knowledge to their clients, colleagues, or bosses. And if you know the gist about speaking clearly, you'll unlock a lot of opportunities with the same level of technical skills.</p>
<h3 id="heading-interviews">Interviews</h3>
<p>My friend, just out of college, had an interview at a startup. The interview was extensive but he managed to make it. And when I asked him for the tips, he said, "Explain technical reasoning to them as if they are 10". This cannot happen without good communication skills.  </p>
<p>Today, companies also conduct behavioral interviews to gauge the non-technical skills of candidates and when you're good at speaking, you can easily nail them. </p>
<p>I have a detailed guide on <a target="_blank" href="https://www.dreamsinscript.com/cracking-the-behavioral-interview/">how to crack behavioral interviews in 3 easy steps</a> on my blog. The guide has the exact steps I took to crack every behavioral interview last year, regardless of the company culture.</p>
<h3 id="heading-networking">Networking</h3>
<p>Whether you have a large following on LinkedIn or people who praise you at local meetups, good communication skills go a long way.</p>
<p>Without knowing the art of communication, you can't have any of them because people are short on time and they can't stick around if you can't deliver value.</p>
<p>Also, having a network unlocks a lot of new opportunities.</p>
<h3 id="heading-client-communication">Client Communication</h3>
<p>While some clients also are not good at delivering their goals clearly, you can save yourself if you know how. </p>
<p>Whether it's connecting with clients emotionally, understanding requirements, or conveying your thoughts, effective communication does the job.</p>
<h3 id="heading-thought-processing">Thought Processing</h3>
<p>Knowing to speak effectively is knowing your thoughts at a deeper level. When your brain thinks, you can't speak clearly. It's in a rush to pack up every speaking session. The rush will keep you from processing your thoughts when it's time to impress others.   </p>
<p>Memorizing every sentence before a meeting and forgetting the script only does harm to your reputation. </p>
<p>When you develop communication skills, you can easily convey the ideas that come to your mind in the middle of having conversations. This builds credibility and offers you a competitive advantage.</p>
<h2 id="heading-how-to-improve-your-communication-skills">How to Improve Your Communication Skills</h2>
<p>Just like you build projects to master dev skills, communicating with humans is the key to improving your communication skills. </p>
<p>There is no shortcut to it. You can't communicate better by observing others, you have to do it yourself if you want growth.</p>
<p>I refined my speaking skills subconsciously, while I was looking for better opportunities. The impact it had on my way of expressing ideas was big enough that my mentors praised it during a cohort.</p>
<h3 id="heading-join-engaging-discord-groups">Join Engaging Discord Groups</h3>
<p>You might think that discord communities are time-demanding.  The thing is, you can chat for as little as ten minutes daily and still see a difference. One or two good communities work well if they've got a safe and active community.</p>
<p>Also, you can respond to messages throughout the day, just as you would with your friends.</p>
<p>Replying to others' wins, sharing your fears, and discussing daily errands or deadlines is a good ways to fine-tune your communication skills. Observe others' tone and try to be as clear as possible. You'll see a difference in your way of describing things in no time.</p>
<p>There is a voice and video call option too on Discord which can help enhance your speech.</p>
<h3 id="heading-github-contribution">GitHub Contribution</h3>
<p>Giving and receiving feedback without bias is one of the most important skills to learn. If you're still waiting to land your first developer job or find yourself taking feedback personally, GitHub contributions will teach you to not lose your cool every other day at work. </p>
<p>When you submit a pull request on GitHub, you're likely to receive feedback from the project maintainers. Think of that feedback as an opportunity to improve your tech skills. You'll soon realize how others' attention to detail helps you to think broadly and get better at your craft. Realizing this will help you accept feedback as a privilege to grow beyond limits.</p>
<h3 id="heading-find-a-mentor">Find a Mentor</h3>
<p>Good mentors will encourage you to speak more by asking more. I've had the privilege to find a mentor who'd ask a lot of questions regarding my project, daily life, pets, work, and so on. And that'd stimulate my thoughts and speech. He'd then tell me about his life and this cycle allowed me to notice things that I felt didn't matter. </p>
<p>Finding a mentor is easier than you think through social media. All it takes is a motivation to find like-minded people whose work you admire.</p>
<h3 id="heading-social-media">Social Media</h3>
<p>An active social media account speaks about your credibility. I found a mentor through Instagram who helped me find free resources and would ask me about my progress. </p>
<p>Start posting on social media today about your progress, your work or whatever you find valuable. Comment on other people's posts to engage with them and make new connections. Also, don't forget to send non-pushy, sweet messages to new connections telling them you like their work.</p>
<p>Social media will help you stay accountable and keep track of your progress.</p>
<h2 id="heading-how-to-improve-your-speaking-skills">How to Improve Your Speaking Skills</h2>
<p>If you're good at writing clearly but go blank when speaking, you're still behind in the game. Speaking more will refine your skills and you can start doing that even if you have no one to speak to.</p>
<h3 id="heading-the-collab-lab">The Collab Lab</h3>
<p><a target="_blank" href="https://the-collab-lab.codes/">The Collab Lab</a> is a cohort-based program focused on helping developers learn collaboration for free. </p>
<p>You'll work within a team of 4-5 software developers to build a project under the guidance of mentors. The mentors keep you on track and foster a safe communication environment.</p>
<h3 id="heading-topmate">Topmate</h3>
<p><a target="_blank" href="https://topmate.io/">Topmate</a> is a platform where professionals offer 1 on 1 sessions. From teachers sharing knowledge to therapists saving lives. </p>
<p>Over 10000 people use Topmate. The good thing is, some of them also offer free sessions and you just need to find them. The goal here is to improve your speaking skills.</p>
<h3 id="heading-linkedin">LinkedIn</h3>
<p>LinkedIn is a great place to ask people on a virtual coffee chat. They don't need to be experts as the goal is to develop stronger speaking skills. Schedule meetings to speak about work, side projects, hobbies or anything you like and witness your skills skyrocket.</p>
<h3 id="heading-discord-not-an-additional-point-but-an-extension-to-the-first-one">Discord (Not an additional point, but an extension to the first one 😉)</h3>
<p>Use the calling feature on Discord and speak to people you've already interacted with. Invite them to work on projects together or discuss anything you both find interesting.</p>
<h3 id="heading-last-words">Last Words</h3>
<p>According to K. Anders Ericsson in his book, Peak: Secrets from the New Science of Expertise, "The right sort of practice carried over a sufficient period of time leads to improvement. Nothing else."</p>
<p>Ericsson was a psychologist and the expert of experts. He presented the performance theory and said expertise is achieved outside your comfort zone.</p>
<p>So if you feel you aren't a good communicator or you don't want to speak in front of others, then you should know that only speaking can take you away from those doubts. </p>
<p>The methods I listed above helped me speak better English. However, I used to escape every English conversation at school.</p>
<p>Interested in becoming internet friends? You can hit me up on <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal">LinkedIn</a> or <a target="_blank" href="https://www.instagram.com/dreamsinscript/?igshid=eDdnYmN3OWgxMDd1">Instagram</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Props in React ]]>
                </title>
                <description>
                    <![CDATA[ When you're first learning React, props are often one of the most difficult topics to understand – especially when it comes to passing props across components. And when you need similar props in more than one component, things can get really tricky. ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/props-in-react/</link>
                <guid isPermaLink="false">66bf4ad17df110118a932075</guid>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Tue, 10 Jan 2023 16:01:03 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/01/all-about-props-in-react-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When you're first learning React, props are often one of the most difficult topics to understand – especially when it comes to passing props across components. And when you need similar props in more than one component, things can get really tricky.</p>
<p>In this guide, we will start by understanding what props are and what they do. We'll look at the different types of props, and how to use similar props in multiple components.</p>
<p>It is helpful if you <a target="_blank" href="https://beta.reactjs.org/learn/state-a-components-memory">understand React state</a> before diving into this guide.</p>
<h2 id="heading-what-are-props-in-react">What Are Props in React?</h2>
<p>Props stand for properties. They are read-only values that can be passed across components in order to display relevant data in your React apps. </p>
<p>Take an example of a simple JavaScript function. In it, we pass two parameters, a and b, to manipulate them inside the function and return the sum of both parameters.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span>(<span class="hljs-params">a, b</span>) </span>{
    <span class="hljs-keyword">const</span> sum = a + b
    <span class="hljs-keyword">return</span> sum
}
</code></pre>
<p>When we pass a prop to a component, the same thing happens inside the component. We take the props, manipulate them, and return something. See the example below:</p>
<pre><code class="lang-react.js">export default function App() {
    return &lt;DummyComponent name="Tooba" a={5} b={2} /&gt;
}

function DummyComponent(props) {
    const sum = props.a + props.b

    return (
        &lt;&gt;
            &lt;p&gt;My name is {props.name}&lt;/p&gt;
            &lt;p&gt;The sum of the numeric props I received is {sum}&lt;/p&gt;
        &lt;/&gt;
    )
}
</code></pre>
<p>In the React code above, we have an App component that returns DummyComponent and we have passed three props (properties) to this component: name, a, and b. </p>
<p>In DummyComponent, we receive those props as function parameters and perform a simple addition between a and b. Props are received as an object with properties equal to what we pass into our component. </p>
<p>The props object for our example would look like {name: "Tooba", a: 5, b: 2}. Therefore we need to grab the properties we need just as we do in regular JavaScript objects. </p>
<p><code>const sum = props.a + props.b</code> grabs a and b properties from our props object and stores its sum in the sum variable. Next, we return two </p><p> tags, one displaying our name prop and the other displaying the sum. The output rendered on the screen looks like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/reactss.png" alt="Image" width="600" height="400" loading="lazy">
<em>Screenshot showing the output rendered ("My name is Tooba / The sum of the numeric props I received is 7.")</em></p>
<p>And if I console.log the DummyComponent, I get a function having props passed as a parameter exactly as we discussed above. See the code below:</p>
<pre><code class="lang-react.js">export default function App() {
    console.log(DummyComponent)
    return &lt;DummyComponent name="Tooba" a={5} b={2} /&gt;
}

function DummyComponent(props) {
    const sum = props.a + props.b

    return (
        &lt;&gt;
            &lt;p&gt;My name is {props.name}&lt;/p&gt;
            &lt;p&gt;The sum of the numeric props I received is {sum}&lt;/p&gt;
        &lt;/&gt;
    )
}
</code></pre>
<p>The output rendered on console is:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/01/FunctionalComponent.png" alt="Output of the code logging DummyComponent to the console" width="600" height="400" loading="lazy">
<em>Output of the code logging DummyComponent to the console</em></p>
<h2 id="heading-how-props-are-shared-accross-components-in-react">How Props Are Shared Accross Components in React</h2>
<p>Props are usually passed from a parent component to a child component. A parent component is a component in which you import another component and pass props inside it. </p>
<p>In the example above, App is our parent component. So to pass props into the child component we need to import it in App.js first. Because of this, we imported DummyComponent in App.js and then passed the props we needed inside it <code>&lt;DummyComponent name="Tooba" a=5 b=2/&gt;</code>. </p>
<p>But the app is not always the only parent component of all the other components. </p>
<p>Suppose we have another component where we want to maintain some state and use it in another component. In such a situation, the component where we maintain the state to pass it to another component becomes the parent of the latter component and the app component becomes the grandparent. </p>
<p>See the example below to understand what I mean:</p>
<pre><code class="lang-react.js">import React from "react"

export default function App() {
    return &lt;DummyComponent name="Tooba" a={5} b={2}&gt;
}

function DummyComponent(props) {
    const sum = props.a + props.b

    return (
        &lt;&gt;
            &lt;p&gt;My name is {props.name}&lt;/p&gt;
            &lt;p&gt;The sum of the numeric props I recieved is {sum}&lt;/p&gt;
        &lt;/&gt;
    )
}

function Parent() {
  const [isParent, setIsParent] = React.useState(true)

  return (
    &lt;&gt;
      &lt;Child isParent={isParent}/&gt;
    &lt;/&gt;
  )
}

function Child(props) {
  return (
    &lt;&gt;
      &lt;h3&gt;{props.isParent 
      ? "I am the child component of Parent.js" 
      : "There might be a bug"}&lt;/h3&gt;
    &lt;/&gt;
  )
}
</code></pre>
<p>In the above code, we have added two new components. <code>Parent.js</code> is maintaining the <code>isParent</code> state. It indicates whether this is a parent component or not. If the state is true, we display "I am the child component of Parent.js" in the Child.js file. Otherwise we display "There might be a bug". </p>
<p>But to actually display this in the browser, we need to import Parent.js in App.js and return it inside the App function. The code is displayed in the browser like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/01/parent-component.png" alt="Output displayed on the browser based on the isParent prop passed from the parent to the child component" width="600" height="400" loading="lazy">
<em>Output displayed on the browser based on the isParent prop passed from the parent to the child component</em></p>
<p>No matter how big your React app becomes, the child components always need to be imported into the parent component and the parent component in the grandparent component (if it exists).</p>
<h2 id="heading-what-are-proptypes-in-react">What Are PropTypes in React?</h2>
<p>There is a library in React called "prop-types" that allows us to avoid errors caused by invalid data type issues. </p>
<p>Suppose you want a variable to be of datatype Number, but when you try to manipulate it mathematically, it throws errors. You might have encountered this problem numerous times in your coding journey. </p>
<p>But with propTypes in React, we can make sure that each prop is of a certain data type and nothing else. </p>
<p>Consider the DummyComponent from the example above:</p>
<pre><code class="lang-react.js">import { PropTypes } from "prop-types"

function DummyComponent(props) {
    const sum = props.a + props.b

    return (
        &lt;&gt;
            &lt;p&gt;My name is {props.name}&lt;/p&gt;
            &lt;p&gt;The sum of the numeric props I recieved is {sum}&lt;/p&gt;
        &lt;/&gt;
    )
}

DummyComponent.propTypes = {
        a: PropTypes.number,
        b: PropTypes.number
}
</code></pre>
<p>To use propTypes, we first import it and define <code>propTypes</code> with the name equal to our component. propTypes are objects with keys equal to our prop names and values equal to the datatype we want that prop to be. </p>
<p>We can also chain <code>propTypes</code> with <code>isRequired</code> which throws an error if the required prop is not provided to the component.</p>
<pre><code class="lang-react.js">DummyComponent.propTypes = {
        a: PropTypes.number,
        b: PropTypes.number.isRequired
}
</code></pre>
<p>The available data types for propTypes are String, Number, Boolean, Object, Function, and Symbol. </p>
<h2 id="heading-how-to-update-props-from-a-child-component">How to Update Props from a Child Component</h2>
<p>Even though props are usually passed down to child components and are read-only data items, we have a way to update a prop from the child component. And it is not as complicated as it might sound. Let's go through it step by step:</p>
<ol>
<li>Pass <code>setState</code> as a prop to child component</li>
<li>Add an event in the child component that triggers the <code>setState</code> function</li>
</ol>
<p>Let's have a look at the code that makes it work:</p>
<pre><code class="lang-react.js">function Parent() {
  const [isParent, setIsParent] = React.useState(true)

  return (
    &lt;&gt;
      &lt;Child isParent={isParent} 
      changeIsParent={isParent =&gt; 
      setIsParent(isParent =&gt; !isParent)}/&gt;
    &lt;/&gt;
  )
}

function Child(props) {
  return (
    &lt;&gt;
      &lt;h3&gt;{props.isParent 
      ? "I am the child component of Parent.js" 
      : "There might be a bug"}&lt;/h3&gt;
      &lt;button onClick={() =&gt; props.changeIsParent()}&gt;Click me&lt;/button&gt;
    &lt;/&gt;
  )
}
</code></pre>
<p>In the code above, we have passed a prop named <code>changeIsParent</code> that updates the <code>isParent</code> state using <code>setIsParent</code> function. </p>
<p>In the child component, we have added a button and passed an onClick event that runs the <code>changeIsParent</code> function on every click. Since <code>isParent</code>'s state is continuously changing on every click, the text inside the </p><h3 id="heading-tag-changes-accordingly"> tag changes accordingly. <p></p>
</h3><h2 id="heading-how-to-use-the-usecontext-hook-instead">How to Use the useContext Hook Instead</h2>
<p>When you start building bigger React apps, it becomes frustrating to pass props down in the React component hierarchy, especially when components with different parents need the same props. Let's have a look at the diagram below to understand this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/01/prop-hierarchy.png" alt="Image" width="600" height="400" loading="lazy">
<em>React app hierarchy sample</em></p>
<p>Let's suppose the middlemost child component in the diagram needs some props from its parent. We can cater for this need by maintaining a state in its parent component and passing it down to the child as a prop. </p>
<p>But, what if the leftmost parent component needs the same prop? We can define the same state in its parent (grandparent in the diagram) and pass it down to it as a prop. </p>
<p>Still, the right most grandparent component also needs the same prop. We can solve this issue by maintaining the state in the App component and passing it down through its children. </p>
<p>This approach might seem to work. But we need to pass props unnecessarily to each child component whether they need it or not. </p>
<p>The term prop drilling describes this problem of passing data through all the children whether they need it or not. Fortunately, you can use the useContext hook in React to solve this problem by maintaining a state globally and passing it to the components that need it. </p>
<p>Let's understand how to do this with useContext through a step-by-step approach:</p>
<ol>
<li>Create a Context.js file and create the context in it</li>
<li>Maintain a global state in the newly created Context component</li>
<li>Pass that state as a value to the Context provider</li>
<li>Wrap the App component or the lowest common parent component inside the Context provider</li>
<li>Access the global state through components that need it</li>
</ol>
<p>Now let's suppose we are building a game in React and need to toggle the user score display in multiple components. For this, we maintain a <code>showScore</code> state in the Context.js component like below</p>
<pre><code class="lang-react.js">import {useState, createContext} from "react"
const Context = createContext()

function ContextProvider(props) {
    const [showScore, setShowScore] = useState(false)

    function toggleScore() {
        setShowScore(!showScore)
    }

    return (
        &lt;Context.Provider value={{showScore, toggleScore}}&gt;
            {props.children}
        &lt;/Context.Provider&gt;
    )
}

export {ContextProvider, Context}
</code></pre>
<p>In the first line, we import the state and context from React. In line 2, we create a context named Context. In line 4, we create a function named <code>ContextProvider</code>. In line 5, we initiate the <code>showScore</code> state and in line 7, we define a function that toggles the <code>showScore</code> state. In line 12, this function returns the context provider that lets the children access its state and pass a value to it. </p>
<p>The value can be a single value or an object having multiple values. Since we have a state and a function to pass down the children, we use an object to define our value having both the state and the function that toggles the <code>showScore</code> state. </p>
<p>Lastly, we export the <code>ContextProvider</code> function and Context as named exports.</p>
<p>You might be wondering, why is our context component receiving props and why are we passing it to our context provider? We will get back to this in a moment – first let's see what our next step would be</p>
<p>To make our context accessible throughout our app, we need to wrap the App component inside the <code>ContextProvider</code> component in the <code>main.js</code>/ <code>index.js</code> file:</p>
<pre><code class="lang-react.js">import React from 'react'
import App from './App'
import { ContextProvider } from './Context'

ReactDOM.createRoot(document.getElementById('root')).render(
  &lt;ContextProvider&gt;
     &lt;App /&gt;
  &lt;/ContextProvider&gt;
)
</code></pre>
<p>In the code above, we import ContextProvider from the Context component and wrap <code>&lt;App /&gt;</code> inside it. Every child of the component that's wrapped inside the Context Provider can access the global context. We have passed <code>&lt;App /&gt;</code> inside <code>&lt;ContextProvider&gt;</code> so every child component of our app can access <code>showScore</code> and <code>toggleScore</code>. </p>
<p>Now that the context is available to be used throughout the app, let's see how we can use it:</p>
<pre><code class="lang-react.js">import { Context } from './Context'
import {useContext} from 'react'

function ScoreDisplay(props) {
    const {showScore} = useContext(Context)
    return (
        {showScore &amp;&amp; &lt;h3&gt;Your score is {props.score}&lt;/h3&gt;}
    )
}

function ScoreToggle() {
    const {toggleScore} = useContext(Context)
        return (
        &lt;button onClick={displayScore}&gt;Show Scores&lt;/button&gt;
    )
}
</code></pre>
<p>See how we just need to import Context from the Context component and access whatever value we need to use in any component. </p>
<p>In the ScoreDisplay component we destructure <code>showScore</code> from Context and display the score according to it. In the <code>ScoreToggle</code> function, we destructure <code>toggleScore</code> and pass it to the onClick event handler. </p>
<p>To recap, we created a separate context component and created a context using the <code>createContext</code> hook. Inside the component, we define the states and functions we want to maintain globally and return <code>Context.Provider</code> from the Context we created. Then we export the context component and the Context we created using <code>createContext</code> hook. </p>
<p><code>Context.Provider</code> takes in a value that can be an object having multiple key-value pairs. We passed both our state and toggle function to the value. We then wrapped the App component inside the <code>ContextProvider</code> in the <code>main.js</code>/ <code>index.js</code> file. </p>
<p>Next, we need to import the Context component and the useContext hook wherever we need the global state and destructure the value object according to our needs.</p>
<p>Now let's get back to the props our context component is receiving. See how in the second code example we are passing <code>&lt;App /&gt;</code> inside the <code>&lt;ContextProvider /&gt;</code> component as its child? In React, when we write a component with a corresponding closing tag, all the components passed as their children become its props. </p>
<pre><code class="lang-react.js">&lt;Context.Provider value={{showScore, toggleScore}}&gt;    
    {props.children}
&lt;/Context.Provider&gt;
</code></pre>
<p>So when we pass <code>props.children</code> inside <code>&lt;Context.Provider/&gt;</code> in the Context.js file, we are basically passing the App component inside it. This makes sure our App component has access to the context and it renders properly.</p>
<p>The Context API helps us totally get rid of the prop drilling problem. But we should avoid using it when the props are needed to be passed through certain levels. The reason is that whenever the context state updates, React re-renders every component that uses the state and it may cause performance issues. </p>
<p>In situations when you want to avoid prop drilling through some levels, the React docs have provided a reasonable solution for that called component composition. You can read more about it <a target="_blank" href="https://reactjs.org/docs/composition-vs-inheritance.html">here</a>.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Props is short for properties which are read-only data items that are passed through the components to be manipulated and displayed in the browser. </p>
<p>Props are shared down the hierarchy, that is from parent to child components. You can use the propTypes library to specify the data type of each prop in order to avoid data type-related issues.</p>
<p>Though props can only be passed from the parent component to the child component, we have a way to update props from a child component using an event handler that updates a state in the parent component.</p>
<p>To avoid the prop drilling problem, we may use Context API in React which helps us completely get rid of the problem.</p>
<p>Interested in connecting on LinkedIn? Hit me up at <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">Tooba Jamal</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is an API and How Does it Work? APIs for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ When I started learning to code, the term API would always haunt me. I couldn't make sense of what it actually meant because I would hear people talking about APIs in different contexts.  The biggest challenge was that I couldn't find resources to le... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-apis-work/</link>
                <guid isPermaLink="false">66bf4abd7df110118a93206e</guid>
                
                    <category>
                        <![CDATA[ api ]]>
                    </category>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Mon, 05 Dec 2022 22:56:35 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/12/api-article.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When I started learning to code, the term API would always haunt me. I couldn't make sense of what it actually meant because I would hear people talking about APIs in different contexts. </p>
<p>The biggest challenge was that I couldn't find resources to learn about APIs in simple terms. </p>
<p>Now that I know how APIs work, I decided to write this guide for any newbies out there who are struggling to make sense of this not-so-complicated but still confusing topic in web development and software engineering.</p>
<h2 id="heading-what-is-an-api">What is an API?</h2>
<p>API stands for Application Programming Interface. The application can be any software that performs a specific task and the interface is a point where two applications communicate. </p>
<p>One application acts as a client and the other acts as a server. A client asks for some resource, say for example a photo, and the server sends that photo to the client. </p>
<p>The client here can be your mobile phone, desktop or laptop computer, or any device you use to surf the internet. And the server is a bigger computer that stores the data you want (a photo in our case).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/unsplash-1.png" alt="Unsplash search example" width="600" height="400" loading="lazy"></p>
<p>Suppose I want a nature photograph to upload to my travel blog. I might go onto the Unsplash website, type "nature: in the search bar, and it would return a large number of nature photographs. </p>
<p>That's an API working behind the scenes to make the conversation between Unsplash and me happen.</p>
<h2 id="heading-how-do-apis-work">How Do APIs Work?</h2>
<p>Computers follow a protocol to communicate with each other. A protocol is nothing but a set of rules that computers follow to communicate. Any computer that doesn't follow the protocol breaks the communication thread. </p>
<p>You might have used Bluetooth to share data back in the day. Bluetooth is nothing but a protocol for mobile devices to communicate with each other at a shorter distance. </p>
<p>When you ask your friend to send you photos of their last trip, your device acts as a client, and your friend's device (the one that sends photos) is the server. </p>
<p>This is just an example of a protocol. We have a large number of protocols in the world of computer science – one for almost anything.</p>
<p>On the web, we use the HTTP protocol (which stands for Hyper Text Transfer Protocol). APIs available on the web use the HTTP protocol for a number of reasons - it's easy to use and it's popular, for example. </p>
<p>Communications that take place over the <strong>HTTP protocol</strong> are also known as the request-response cycle because this is exactly how the protocol works. The client sends a request to the server and the server responds to the client regarding that request. </p>
<p>Unlike humans, computers have to be rigid to communicate with each other or they break the communication. For this reason, a client (requesting computer/ device) needs a set of information to send with the request so the server responds accordingly. This information includes:</p>
<ol>
<li>URL – a web address where you want to make a request</li>
<li>Method – whether you want data already stored somewhere or want to save new data in a database</li>
<li>Header – all the relevant information about your request including in what format the client device expects to receive the data</li>
<li>Body – the body contains the actual request data </li>
</ol>
<p>In our Unsplash example, the URL is <a target="_blank" href="https://unsplash.com/s/photos/england">https://unsplash.com/s/photos/nature</a>. The method is GET because we want the server to get nature images back. The header includes information like the format our computer expects to get and accept – like language meaning, the language of the device, our operating system, and so on. The body includes the data we need to send to the server, the nature keyword for example.</p>
<p>There are four types of methods for HTTP requests which we will get back to in a moment. For now, just know that a method indicates what you want to do with the data available on the server. For example, whether you want that data as documents or you want to save a new entry in data saved somewhere.</p>
<p>When a client makes a request, the server responds to that request. The response might be the data the client requested or an error. </p>
<p>Just like a response, a request has a structure including a URL, status code, header and body. In a request, we have a method, which has four types. And in the response, we have a status code which indicates whether a request has been accepted or declined. </p>
<h3 id="heading-http-methods">HTTP methods</h3>
<p>There are four available HTTP methods, and each has its unique functionality.</p>
<ol>
<li>GET: as already discussed, this indicates that the client is requesting data to be sent from the server.</li>
<li>POST: this method tells the server that the client wants to create a new entry in a database. For example, saving a new blog post in a database of all previous blogs.</li>
<li>DELETE: as the name suggests, the client wants to delete a data record from a database.</li>
<li>PUT: this method is used when a client wants to update or edit a data record. For example, changing your Facebook password.</li>
</ol>
<h3 id="heading-http-status-codes">HTTP status codes</h3>
<p>There is a huge list of HTTP status codes, but let's look at a few of the most common:</p>
<ol>
<li>200 OK: this indicates that the request was successfully fulfilled by the server</li>
<li>201 CREATED: the data entry that you requested to create was created</li>
<li>404 NOT FOUND: this indicates that the resource you requested wasn't found by the server</li>
<li>500 INTERNAL SERVER ERROR: this means that an error occured at the server's end and it couldn't fulfill your request</li>
</ol>
<p>There is no need to memorize these status codes, as the list is huge and you will subconsciously learn them as you encounter them in your development journey.</p>
<p>Still, there is a range of status codes that indicates a generic response, as you can see here:</p>
<ol>
<li>100s: Informational responses, indicating the request's progress</li>
<li>200s: Success, indicating the request's success</li>
<li>300s: Redirection, indicating the request had to redirect somewhere else</li>
<li>400s: Client errors, indicating errors that occurred on the client side</li>
<li>500s: Server errors, when the server fails to respond to a valid client request</li>
</ol>
<h2 id="heading-types-of-apis">Types of APIs</h2>
<p>Remember how I told you that I got confused when people would talk about APIs in different contexts? That's because we have different types of APIs available as well. </p>
<p>The ones we talked about in this article are web APIs that use the HTTP protocol. Developers can use them to create a better user experience for their users. </p>
<p>Other types include internal APIs that are hidden from external users and that are used within a company only. </p>
<p>There are also open APIs that are available to be used by anyone for free (like the open weather map API). You can have partner APIs that are shared among business partners only to carry out their business tasks, and composite APIs that sequentially combine multiple API requests into a single API call to reduce server load and create a faster experience.</p>
<h3 id="heading-resources-to-learn-more-about-apis">Resources to learn more about APIs:</h3>
<p>If you want to learn more about how to design APIs, <a target="_blank" href="https://www.freecodecamp.org/news/rest-api-design-best-practices-build-a-rest-api/">here's a full book for you to get started</a>.</p>
<p>And you can learn more about <a target="_blank" href="https://www.freecodecamp.org/news/what-is-an-api-and-how-to-test-it/">types of APIs, testing tools, and documentation here</a>.</p>
<p>Here's a tutorial that'll <a target="_blank" href="https://www.freecodecamp.org/news/rest-api-tutorial-rest-client-rest-service-and-api-calls-explained-with-code-examples/">teach you all about REST APIs</a>.</p>
<p>And here's a <a target="_blank" href="https://www.freecodecamp.org/news/fetch-api-cheatsheet/">Fetch API cheatsheet</a> to get you started learning about Fetch.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>An API is an interface for two computers to communicate in order to carry out tasks on the internet. </p>
<p>APIs follow the HTTP protocol to communicate, which has a specific request and response structure. </p>
<p>Different methods exist to perform different tasks and numerous status codes are available that indicate whether the request is successful, declined, or in a pending state. </p>
<p>Interested in connecting on LinkedIn? Hit me up at <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">Tooba Jamal</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Improve Website Accessibility – 7 Helpful Tips ]]>
                </title>
                <description>
                    <![CDATA[ An accessible website is designed in such a way that anyone can use it without difficulty.  During the website development process, you want to make sure that the end user has the best user experience. And that includes people with disabilities or th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/improve-website-accessibility-with-these-tips/</link>
                <guid isPermaLink="false">66bf4acb7e26d55179bfa5e2</guid>
                
                    <category>
                        <![CDATA[ a11y ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Accessibility ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Wed, 26 Oct 2022 18:09:18 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/website_accessibility-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>An accessible website is designed in such a way that anyone can use it without difficulty. </p>
<p>During the website development process, you want to make sure that the end user has the best user experience. And that includes people with disabilities or those who faces challenges when using a website. </p>
<p>Unfortunately, there are still websites that don't use accessibility best practices. But you can make sure yours does.</p>
<p>If you keep a few things in mind during the web development process, you can improve the user experience for all users, including <a target="_blank" href="https://dictionary.cambridge.org/dictionary/english/differently-abled">differently abled</a> users.<br>Below are some helpful tips you can use to improve website accessibility.</p>
<h2 id="heading-add-alt-text-to-images">Add Alt Text to Images</h2>
<p>You might have heard about the importance of adding alt text on image tags in HTML5. So how do you use them? Do you provide alt text for every image on your webpage? </p>
<p>Image alt text makes it easier for people with visionary disabilities to understand the content of a webpage. But you should include the alt text only for informational images that aid in the understanding of the content. </p>
<p>Decorative images should have empty alt text. This tells screen readers that the information provided by the image is not important and might in fact detract from the user experience.</p>
<p><strong>Informational</strong> images are images that convey important information related to the content. You should be able to describe what they show in a few words of alt text. </p>
<p>Let's suppose we run a fitness blog and are working on creating an article about how to do a workout at home and we use the following image in our article.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/jonathan-borba-lrQPTQs7nQQ-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/ja/@jonathanborba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Jonathan Borba on &lt;a href="https://unsplash.com/s/photos/workout?utm_source=unsplash&amp;utm_medium=referral&amp;utm<em>content=creditCopyText)</em></p>
<p>This image is supposed to convey a message to the blog readers on things you need for a crunch exercise. The alt text for this image could be something like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"crunch_exercise.png"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"You must have a good quality exercise mat and workout clothing to avoid back injuries and skin allergies"</span>&gt;</span>
</code></pre>
<p>The alt text we provided for our image clearly tells visually impaired users the message our image conveys.</p>
<p><strong>Decorative</strong> images, on the other hand, serve the sole purpose of decoration on the webpage – maybe they just break up the content or complement general descriptions in the text. </p>
<p>Images used as icons are a great example of decorative images. The Airbnb homepage has a navigation bar with multiple icons (like the one in the red circle) indicating different types of living spaces available at Airbnb. The icons used in the navigation bar are for decoration purposes and we can leave their alt text empty.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/decorative_image.png" alt="Image" width="600" height="400" loading="lazy">
<em>Airbnb homepage</em></p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- Example of decorative image --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"decorative_img.png"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">""</span>&gt;</span>
</code></pre>
<h2 id="heading-maintain-heading-hierarchy">Maintain Heading Hierarchy</h2>
<p>If you don't use headings in the correct hierarchy (from </p><h1 id="heading-the-biggest-to"> – the biggest – to </h1><h6 id="heading-the-smallest-screen-readers-might-assume-theres-some-content-missing-because-of-this-it-is-best-to-use"> – the smallest), screen readers might assume there's some content missing. <p></p>
<p>Because of this, it is best to use </p></h6><h1 id="heading-for-the-main-title-only"> for the main title only, </h1><h2 id="heading-for-headings-that-come-after-the-title-h3-for-subheadings-and-so-on-consider-the-example-below-we-have-a-webpage-with-a-few-headings"> for headings that come after the title, h3 for subheadings, and so on. <p></p>
<p>Consider the example below: we have a webpage with a few headings. </p></h2><h1 id="heading-is-used-for-the-document-title"> is used for the document title, </h1><h2 id="heading-for-the-second-level-document-heading"> for the second level document heading, </h2><h3 id="heading-for-subheadings-and"> for subheadings and </h3><h4 id="heading-for-mini-headlines-headings-that-come-after"> for mini headlines (headings that come after </h4><h3 id="heading-heading-hierarchy-example-below-is-the-code-for-this-web-page-notice-the-different-heading-tags-in-it-facts-about-dogs-what-makes-a-dog-the-best-pet-dogs-are-everyones-favorite-and-there-are-numerous-science-backed-reasons-behind-it-mentioned-below-dogs-can-sense-a-lie-yup-you-read-it-right-dogs-are-smart-enough-to-tell-when-a-praise-is-sincere-they-have-a-pretty-sharp-mind-dogs-have-a-great-sense-of-smell-dogs-have-a-sense-of-small-thats-40x-better-than-ours-and-this-quality-plays-an-important-role-in-building-a-stronger-bond-between-a-human-and-a-dog-the-reasons-to-it-are-given-below-1-they-can-smell-a-stanger-sneaking-into-your-garage-dogs-can-spot-a-stranger-because-of-their-strong-sense-of-smell-and-save-you-from-theft-2-they-can-tell-you-whenever-you-forget-to-put-meat-in-the-fridge-after-a-grocery-run-dogs-might-make-you-give-them-a-half-of-the-meat-you-bought-from-the-supermarket-but-they-can-also-help-you-save-the-remaining-half-thanks-to-their-sense-of-smell">).<p></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/heading_hierarchy.png" alt="Image" width="600" height="400" loading="lazy">
<em>Heading hierarchy example</em></p>
<p>Below is the code for this web page. Notice the different heading tags in it:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Facts about dogs<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"dog.png"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"a cute dog resting under the sun"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>What makes a dog the best pet?<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Dogs are everyone's favorite and there are numerous science backed reasons behind it mentioned below<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>Dogs can sense a lie<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Yup! You read it right! Dogs are smart enough to tell when a praise is sincere. They have a pretty sharp mind.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>Dogs have a great sense of smell<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Dogs have a sense of small that's 40x better than ours and this quality plays an important role in building a stronger bond between a human and a dog. The reasons to it are given below<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h4</span>&gt;</span>1. They can smell a stanger sneaking into your garage<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Dogs can spot a stranger because of their strong sense of smell and save you from theft.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h4</span>&gt;</span>2. They can tell you whenever you forget to put meat in the fridge after a  grocery run<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Dogs might make you give them a half of the meat you bought from the supermarket but they can also help you save the remaining half. Thanks to their sense of smell!<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
</h3><h2 id="heading-use-the-aria-property-or-label-tag-for-input-fields">Use the Aria Property or Label Tag for Input Fields</h2>
<p>Aria labels or  tags tell screen readers what type of information an input field expects. Without them, screen readers would not know the purpose of an input field, which would provide a bad user experience to visually disabled users. </p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- Aria label example --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Enter your name"</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Enter your name"</span>&gt;</span>

<span class="hljs-comment">&lt;!-- Label tag example --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span>Full Name: <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Enter your name"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
</code></pre>
<p>Example one uses the aria property for screen readers to read what the user is expected to enter in the name input field. </p>
<p>Example two uses the  tag with text Full Name which is readable by screen readers.</p>
<h2 id="heading-provide-keyword-functionality">Provide Keyword Functionality</h2>
<p>Not all users can use a pointing device (mouse) yet a lot of websites do not provide keyboard functionality to users. This discourages users who only use the keyboard from returning to your website. </p>
<p>One simple example of this is adding a click event listener to the submit button of a form instead of making use of the onsubmit event (which requires a user to click to submit a form). Have a look at the example below:</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- Example one --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span>Full name: <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">""</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span>Email: <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"email"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">""</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onclick</span>=<span class="hljs-string">"handleSubmit&gt;Submit&lt;/button&gt;
&lt;/form&gt;

&lt;!-- Example two --&gt;
&lt;form&gt;
    &lt;label&gt;Full name: &lt;input type="</span><span class="hljs-attr">text</span>" <span class="hljs-attr">value</span>=<span class="hljs-string">""</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span>Email: <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"email"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">""</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>Submit<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">form</span>&gt;</span>
</code></pre>
<p>Example one uses a click event listener on the submit button. This means that pressing the enter key on a keyboard would not submit the form. </p>
<p>Example two uses the onsubmit event and assigns a JavaScript function to that event. This way a click or an enter button both run the handleSubmit function.</p>
<h2 id="heading-use-an-accessible-color-palette">Use an Accessible Color Palette</h2>
<p>Bad color contrasts ruin the overall experience for people without disabilities as well as for those with disabilities. So it's important to get the contrast and complementary colors correct when designing your site.</p>
<p>There are tools like <a target="_blank" href="https://webaim.org/resources/contrastchecker/">contrast checker</a> that help you understand whether your colors contrast enough to be properly visible. Accessible color contrast helps disabled people distinguish between elements on a web page. See below the examples of good and bad color combinations.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/color_combination.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of good and bad color combination</em></p>
<p>The first box has a dark blue background which makes the white easier to read. On the other hand, the second box has a green background with pink text that is not easy to read and causes eye strain.</p>
<h2 id="heading-provide-alternatives-for-audio-and-video-content">Provide Alternatives for Audio and Video Content</h2>
<p>Users who cannot hear or see well might find it difficult to access the audio and video content of a website. </p>
<p>To offer them a better experience, provide transcripts for any audio you use, and add easy-to-read captions on your video content.</p>
<h2 id="heading-make-sure-the-content-is-easy-to-understand">Make Sure the Content is Easy to Understand</h2>
<p>Easy to understand content is free of unexplained jargon and technical phrases. </p>
<p>Suppose you run an analytics firm and are an expert in the field of data science. But your users might include current or potential clients and job seekers. These people might not have enough technical knowledge to understand content stuffed with jargon. </p>
<blockquote>
<p>We are a team of analytics experts who are masters at aggregating data from all the available warehouses, detecting anomalies, performing batch processing on high volumes of data, and applying robust algorithms to solve your business needs.</p>
</blockquote>
<p>The above text is full of analytics jargon that not everyone can understand. This makes you lose your visitors – as why would they invest in you if they can't understand what you do? </p>
<p>Check out the below simplified version of the same text that uses more approachable terms everyone can understand:</p>
<blockquote>
<p>We are a team of experts who specialize in collecting data from all the available sources, identifying errors in that data, handling high volumes of data in less time with greater accuracy, and making predictions to solve your business needs.</p>
</blockquote>
<p>Make sure that your content delivers its purpose in language that everyone can easily understand.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Accessible websites are crucial for a good user experience. An accessible website can not only grab new users but it can also encourage old users return over and over again. </p>
<p>There is a lot more you can do when it comes to website accessibility. But with these tips and tricks, you can improve your site or app's UX significantly. </p>
<p>I hope these tips help you offer a better user experience in your upcoming projects.</p>
<p>Develop accessible websites and make the internet a better place for everyone!</p>
<p>Interested in connecting on LinkedIn? Hit me up at <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">Tooba Jamal</a> </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Web Storage Works – Local vs Session Storage Explained ]]>
                </title>
                <description>
                    <![CDATA[ Anyone who works with the web needs to store data for a later use. Backend developers have some powerful databases in their toolkit. But if you are a frontend developer, you can still store and process data using web storage. In this article, you'll ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-web-storage-works/</link>
                <guid isPermaLink="false">66bf4ac87df110118a932070</guid>
                
                    <category>
                        <![CDATA[ data ]]>
                    </category>
                
                    <category>
                        <![CDATA[ localstorage ]]>
                    </category>
                
                    <category>
                        <![CDATA[ storage ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Wed, 12 Oct 2022 14:08:46 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/webstorage-1-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Anyone who works with the web needs to store data for a later use. Backend developers have some powerful databases in their toolkit. But if you are a frontend developer, you can still store and process data using web storage.</p>
<p>In this article, you'll learn what is a web storage, the different types of web storage, and when to use each one of them.</p>
<h2 id="heading-what-is-web-storage">What is Web Storage?</h2>
<p>Web storage is an HTML5 feature that allows you to store data in key value pairs in the browser. This enables applications to store data in the client side so you can access it or manipulate it later. All data stored in web storage stays in the browser and is not transferred anywhere else.</p>
<h2 id="heading-types-of-web-storage">Types of web storage</h2>
<p>The two main types of web storage are‌‌ local storage‌‌ and session storage‌‌. Each one has its own unique characteristics. </p>
<p>But one thing they have in common is that they store the data in the particular browser the user uses to access the webpage. You won't be able to access the same data through another browser. </p>
<p>Now let's discuss both of them in detail.</p>
<h3 id="heading-local-storage">Local Storage</h3>
<p>Local storage can store 5MB of data per app for the lifetime of the app. Closing the browser will not affect the data in any way – it stays there unless you delete it. </p>
<p>You can only access the local storage object through <code>localStorage</code>. The methods you can use to perform operations on the localStorage object are:</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">localStorage</span> <span class="hljs-comment">// to access the localStorage object </span>
<span class="hljs-built_in">localStorage</span>.setItem(<span class="hljs-string">'name'</span>, <span class="hljs-string">'John'</span>) <span class="hljs-comment">// sets name equal to john localStorage.getItem('name') // "John" </span>
<span class="hljs-built_in">localStorage</span>.removeItem(<span class="hljs-string">'name'</span>) <span class="hljs-comment">// removes name from the localStorage localStorage.clear() // clears the localStorage</span>
</code></pre>
<p><code>localStorage.setItem()</code> takes a key and value as parameters and sets a new item in the local storage object equal to the given key value pair. </p>
<p><code>localStorage.getItem()</code> takes a key as a parameter and returns the value stored to that key in the storage. </p>
<p><code>localStorage.clear()</code> clears the whole localStorage object.</p>
<p><code>localStorage.removeItem()</code> takes in a key as a parameter and removes the corresponding key-value pair. ‌‌</p>
<p>Any item that you store in localStorage will be stored as a string. This means that you need to convert other data types such as arrays or objects to strings – otherwise you lose their structure. </p>
<p>See the example below:       </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> scores = [<span class="hljs-number">10</span>, <span class="hljs-number">8</span>, <span class="hljs-number">6</span>, <span class="hljs-number">3</span>, <span class="hljs-number">9</span>] 
<span class="hljs-keyword">const</span> scoresJSON = <span class="hljs-built_in">JSON</span>.stringify(scores) 
<span class="hljs-built_in">localStorage</span>.setItem(<span class="hljs-string">'scores'</span>, scoresJSON) 
<span class="hljs-built_in">localStorage</span> <span class="hljs-comment">// output &gt;&gt; {scores: '[10, 8, 6, 3, 9]', length: 1}</span>
</code></pre>
<p>In the example above, we first created an array score, then converted it into a string using JSON.stringify(), and finally saved the stringified scores array in localStorage. </p>
<p>Take your time to have a look at the output I get when I run the same code snippet in my browser console.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/localstorage-3.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example code in browser console</em></p>
<p>Note that the key scores has a value equal to our stringified scores array. But if we don't convert the scores array into a string, our array will loose it's structure and the items will be saved as a string like below:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> scores = [<span class="hljs-number">10</span>, <span class="hljs-number">8</span>, <span class="hljs-number">6</span>, <span class="hljs-number">3</span>, <span class="hljs-number">9</span>] 
<span class="hljs-built_in">localStorage</span>.setItem(<span class="hljs-string">'scores'</span>, scores) 
<span class="hljs-built_in">localStorage</span> <span class="hljs-comment">// output &gt;&gt; {scores: '10, 8, 6, 3, 9', length: 1}</span>
</code></pre>
<p>Let's also run the code in the browser console to see what is logs to the console:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/localstorage-2.png" alt="Image" width="600" height="400" loading="lazy">
<em>Saving an array without converting it into a string</em></p>
<p>See how our scores array is converted into a string when we do not convert it into a string using JSON.stringify()?</p>
<h3 id="heading-session-storage">Session Storage</h3>
<p>Session storage allows you to store data in the browser depending on the system memory and the data stored in the browser until the browser is closed. In other words, closing the browser will clear all the data stored in session storage. </p>
<p>Like localStorage, you can access session storage by typing sessionStorage in the browser console.</p>
<pre><code class="lang-javascript">sessionStorage <span class="hljs-comment">// access the session storage </span>
sessionStorage.setItem(<span class="hljs-string">'name'</span>, <span class="hljs-string">'John'</span>) <span class="hljs-comment">// add name to session storage with value john </span>
sessionStorage.getItem(<span class="hljs-string">'name'</span>) <span class="hljs-comment">// get the name item from session storage sessionStorage.removeItem('name') // remove name item from the session storage sessionStorage.clear() // clear the session storage</span>
</code></pre>
<p><code>sessionStorage.setItem()</code> takes a key and value as parameters and sets a new item in the local storage object equal to the given key value pair.</p>
<p><code>sessionStorage.getItem()</code> takes key as a parameter and returns the value stored to that key in the storage. </p>
<p><code>sessionStorage.removeItem()</code> takes in a key as parameter and removes the corresponding key-value pair. </p>
<p><code>sessionStorage.clear()</code> clears the whole localStorage object. ‌‌</p>
<p>Like localStorage, any item stored in sessionStorage will be stored as a string. This means we need to convert them into strings before storing in the sessionStorage.</p>
<h2 id="heading-web-storage-example-use-cases">Web Storage Example Use Cases</h2>
<p>You can use <strong>local storage</strong> when you want your data to be made available when the user revisits the web page, such as for a shopping cart or game/quiz score. Just keep in mind that the information saved in local storage should not be sensitive.‌‌</p>
<p>You can use <strong>session storage</strong> when the data that needs to be saved is sensitive. User authentication is an example of data that you would like to clear as soon as the user closes the tab.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, you have learned the modern ways of storing temporary data in the browser. I hope this has helped you understand how and when to use both types of web storage in your projects. </p>
<p>Interested in connecting on LinkedIn? Hit me up at <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">Tooba Jamal</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Turn Your Jupyter Notebook into a User-Friendly Web App ]]>
                </title>
                <description>
                    <![CDATA[ Being able to build predictive models is a superpower – but you can't make much of these models if users can't use them.  In this article, we will go through the process of building and deploying a machine learning web app using Flask and PythonAnywh... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/machine-learning-web-app-with-flask/</link>
                <guid isPermaLink="false">66bf4ace59320aaba9cc12e6</guid>
                
                    <category>
                        <![CDATA[ deployment ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Jupyter Notebook  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Machine Learning ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tooba Jamal ]]>
                </dc:creator>
                <pubDate>Mon, 03 Oct 2022 22:52:51 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/Purple-Illustrated-Technology-Blog-Banner-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Being able to build predictive models is a superpower – but you can't make much of these models if users can't use them. </p>
<p>In this article, we will go through the process of building and deploying a machine learning web app using Flask and PythonAnywhere. </p>
<p>Flask is a Python web framework which is easy to work with, and PythonAnyWhere is a web hosting service provided by Anaconda.</p>
<h2 id="heading-how-to-build-a-machine-learning-web-app">How to Build a Machine Learning Web App</h2>
<p>The idea of turning your predictive models into a web app can feel overwhelming. But I promise you it's relatively easy and straightforward. </p>
<p>Here are the steps we'll need to take to do this:</p>
<ol>
<li>Save the machine learning model</li>
<li>Build a web page using HTML</li>
<li>Build a backend using Flask </li>
<li>Style it the way you want</li>
<li>Deploy it to the web</li>
</ol>
<p>I wanted to build a diabetes prediction web app and so I used <a target="_blank" href="https://archive.ics.uci.edu/ml/datasets/Early+stage+diabetes+risk+prediction+dataset.">this</a> dataset to do it. You can use any dataset you like, as the process will stay the same.</p>
<p>Before getting started, let's understand the directory structure we are going to follow. This will be helpful in keeping our files organized and making the deployment easy.</p>
<h3 id="heading-directory-structure">Directory structure</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Untitled-Workspace.png" alt="Image" width="600" height="400" loading="lazy">
<em>Directory structure we are going to follow</em></p>
<p>I have named my root directory diabetes_app, but you can name yours whatever you want. </p>
<p>We have three more directories and a Python file in diabetes_app (root directory). The Models directory will contain our trained model. The Static directory has two more directories, CSS will have all the stylesheets saved and script will have JavaScript files, if any. Lastly, the Templates folder will have HTML files saved and app.py is our Python file that has the backend (Flask) code.</p>
<p>Now that we have an organized file structure, let's get started.</p>
<h2 id="heading-how-to-save-the-machine-learning-model">How to Save the Machine Learning Model</h2>
<p>Saving the model is the easiest of all tasks. We will use the Python pickle library to do this. </p>
<p>Once you are done with training, testing, and hyperparameter tuning, save the best performing model in a variable. For me the best model was RandomForestsClassifier and I saved it like this:</p>
<pre><code class="lang-python">clf = RandomForestClassifier()
clf.fit(X_train.values, y_train)
</code></pre>
<p>Now <code>clf</code> has my trained RandomForestClassifier model which is ready to be saved in a file. For this, I will have to import the pickle library and save the clf like this: </p>
<pre><code><span class="hljs-keyword">import</span> pickle
pickle.dump(clf, open(<span class="hljs-string">'model.pkl'</span>, <span class="hljs-string">'wb'</span>))
</code></pre><p>pickle.dump() is a function used for saving models. The first parameter is the model name (that is clf in our case) and the second is another function that saves the model in disk. 'model.pkl' is the file name I want my model to be saved in and 'wb' refers to <em>write binary</em> which writes model data into the 'model.pkl' file.</p>
<p>After this step, you will have your model file saved in the same directory you are working in. Don't forget to copy the model.pkl file in the models folder in our project directory. And now that we have saved our model, we are ready to move ahead.</p>
<h2 id="heading-how-to-build-a-web-page-using-html">How to Build a Web Page using HTML</h2>
<p>The main functionality of any machine learning web app is to make predictions. And for that the user will most probably need to answer a few questions if you have not used unstructured data or uploaded some documents in other cases. </p>
<p>The early stage diabetes risk prediction dataset is in .csv form with 17 features (of which 16 are used as input). We will use HTML forms to create a form that a user can fill out to get their predictions. For example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">form</span> <span class="hljs-attr">action</span>=<span class="hljs-string">"{{ url_for('predict')}}"</span> <span class="hljs-attr">method</span>=<span class="hljs-string">"post"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>What is your age?<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"number"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Age"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Enter your age"</span>                       <span class="hljs-attr">required</span>=<span class="hljs-string">"required"</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span> 
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>What is your gender?<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Sex"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"1"</span> <span class="hljs-attr">required</span>=<span class="hljs-string">"required"</span>         /&gt;</span>Male<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">label</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Sex"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">required</span>=<span class="hljs-string">"required"</span>         /&gt;</span>Female<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"submit"</span>&gt;</span>Predict<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">form</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span> {{ prediction }} <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>Above, we have created a form with two questions. The action attribute on the form is set to <code>{{ url_for('predict') }}</code> which will render our prediction when the form is submitted. For age, we are providing the user with a number input field, and for gender, we have the radio buttons. </p>
<p>The value attribute contains the value for each radio button. Male has value 1 and female has value 0, which will be used as inputs for our prediction. Make sure each input field has matching value attributes as your final (processed/ ready for prediction) dataset. I had a binary encoded gender feature so I used the values 1 and 0 for gender. </p>
<p>The paragraph tag will display the prediction results. Prediction is a variable that will hold our prediction in the Python file which we will see in the next step.<br>You can add as many questions you want and whatever input type suits you – the functionality will remain the same.</p>
<h2 id="heading-how-to-build-the-backend-using-flask">How to Build the Backend using Flask</h2>
<p>We are on the most interesting step now, which is to build the backend. First have a look at the code and then we will go deeper in it.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask, request, render_template
<span class="hljs-keyword">import</span> pickle

app = Flask(__name__)

model = pickle.load(open(<span class="hljs-string">'models/model.pkl'</span>, <span class="hljs-string">'rb'</span>))

<span class="hljs-meta">@app.route('/')</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">home</span>():</span>
    <span class="hljs-keyword">return</span> render_template(<span class="hljs-string">'index.html'</span>)

<span class="hljs-meta">@app.route('/predict',methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">predict</span>():</span>
    int_features = [int(x) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> request.form.values()]
    features = [np.array(int_features)]  
    prediction = model.predict(features) 
    result = prediction[<span class="hljs-number">0</span>]

    <span class="hljs-keyword">return</span> render_template(<span class="hljs-string">'index.html'</span>, prediction=result)

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">"__main__"</span>:
    app.run(debug=<span class="hljs-literal">True</span>)
</code></pre>
<p>Start by importing the libraries we are going to need. We'll need NumPy for handling input values, Flask for making predictions, and pickel to load the model we saved in the first step.</p>
<p>First we create our app object which we will use throughout to build our backend. Secondly, we load our model using the pickel.load() function. This time we have replaced 'wb' with 'rb' which means <em>'read binary'</em>  which tells pickel to read the data. </p>
<p>@app.route('/') means when we are at the homepage of our app and we want to do something here. To do something, we define a function <code>home</code> which renders our HTML file we created in the previous step as our homepage.</p>
<p>@app.route('/predict',methods=['POST']) does the main job of allowing us to make predictions. /predict means we have moved to the predict page of our app. </p>
<p>We define a predict function here, inside which we first store all the input values in an array called int_features using request.form.values(). Once we have our input values, we convert it into a 2D array for prediction and make the prediction like we normally do. Lastly, we store the prediction in the prediction variable which we will use to render result on our web app. </p>
<p>render_template('index.html', prediction=result) tells Flask to assign the result to the prediction variable and render it in our index.html file. </p>
<p>Remember the action attribute set to predict in our HTML? That is the same predict function we have defined here. When the user submits the form, the predict function gets called. </p>
<p>Finally we run our app in the last two lines. debug=True is an optional argument (default is False) which reloads the web page automatically when you make changes to the code. It will be helpful when you do the styling of your app.</p>
<h2 id="heading-how-to-style-the-app-the-way-you-want">How to Style the App the Way You Want</h2>
<p>To keep things simple, I have showed you the simplest way to build a machine learning web app. But you can do a lot with it. </p>
<p>I styled my app into three separate web pages for home, form/ questions, and results. I also added a little bit of JavaScript to render random health related news from all over the globe to the homepage and a little bit of styling to make things look pretty. </p>
<p>The way to link CSS and JavaScript files when working with Flask is this:</p>
<pre><code> &lt;link rel=<span class="hljs-string">"stylesheet"</span> href=<span class="hljs-string">"{{ url_for('static',filename='css/style.css') }}"</span>&gt;
 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span> 
  <span class="hljs-attr">src</span>=<span class="hljs-string">"{{ url_for('static',filename='script/script.js') }}"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre><p>To add more than one web page, you just need to add more routes to the Python file like we did in the previous step. Let's suppose we want to add a separate results page to show predictions. The /predict route will look like this:</p>
<pre><code>@app.route(<span class="hljs-string">'/predict'</span>,methods=[<span class="hljs-string">'POST'</span>])
def predict():
    int_features = [int(x) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> request.form.values()]
    features = [np.array(int_features)]  
    prediction = model.predict(features)  
    result = prediction[<span class="hljs-number">0</span>]

    <span class="hljs-keyword">return</span> render_template(<span class="hljs-string">'results.html'</span>, prediction=result)
</code></pre><p>Instead of rendering index.html, we are rendering results.html with our prediction. You can structure and style your results.html file the way you want and add the prediction to it.</p>
<h2 id="heading-how-to-deploy-the-app-to-the-web">How to Deploy the App to the Web</h2>
<p>Now that we are done with styling, the app is ready to be pushed to the cloud. PythonAnywhere is easy to use and has a free plan to deploy Python applications. You will have to create an account first and choose the free plan. </p>
<p>Next, you will need to give your app a name and go to the files tab and delete the existing site there. Upload all your files in the same directory structure discussed above. Then go to the web tab and click the blue reload button. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/pythonanywhere.png" alt="Image" width="600" height="400" loading="lazy">
<em>Uploaded files</em></p>
<p>If you have CSS and JavaScript files in your project, you will need to define their URL and directory path in the static files section on the web tab. </p>
<p>The URL will be /static/ since we are serving static files and the directory will be /home/yourwebsitename/mysite/assets since our CSS and JavaScript files are saved in the static directory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/paw.png" alt="Image" width="600" height="400" loading="lazy">
<em>Static files section</em></p>
<p>Reload the website by clicking the blue reload button again and CONGRATULATIONS – you have deployed your machine learning web app to the cloud.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Deploying machine learning web apps is not as difficult as it might seem – not at least as learning machine learning theories. And if you have done that, deployment is just a breeze which can take you to greater heights. </p>
<p>I hope this article helped you understand how you can deploy your models and make them look prettier. The code for the diabetes risk assessment web app I built can be found on my <a target="_blank" href="https://github.com/ToobaJamal/diabetes_risk_assessment">GitHub</a>. </p>
<p>Deploy your models and show the world your superpower!</p>
<blockquote>
<p>Interested in connecting on LinkedIn? Hit me up at <a target="_blank" href="https://www.linkedin.com/in/tooba-jamal/">Tooba Jamal</a></p>
</blockquote>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
