<?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[ Oleh Romanyuk - 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[ Oleh Romanyuk - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:29:39 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/OlehRomanyuk/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Automate Form UX Audits: Errors, Hints, and Keyboard Flows ]]>
                </title>
                <description>
                    <![CDATA[ Forms are often the gatekeepers to conversions on a site or application. Abandoned carts, partially signed-up users, and users who stop engaging with your app are often thanks to friction with forms.  ]]>
                </description>
                <link>https://www.freecodecamp.org/news/automate-form-ux-audits-handbook/</link>
                <guid isPermaLink="false">69bc38cfb238fd45a3231433</guid>
                
                    <category>
                        <![CDATA[ UX ]]>
                    </category>
                
                    <category>
                        <![CDATA[ user experience ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UIUX ]]>
                    </category>
                
                    <category>
                        <![CDATA[ handbook ]]>
                    </category>
                
                    <category>
                        <![CDATA[ forms ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Thu, 19 Mar 2026 17:56:31 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/uploads/covers/5e1e335a7a1d3fcc59028c64/5bf2b730-1a9f-46e9-9809-b63926589f00.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Forms are often the gatekeepers to conversions on a site or application. Abandoned carts, partially signed-up users, and users who stop engaging with your app are often thanks to friction with forms.</p>
<p>People will also abandon a site when they don’t understand an error message, can’t navigate through fields easily, or can’t get the help they need right away.</p>
<p>This guide will show you how to create automated systems that detect these issues before your users do. Together, we'll write code that systematically checks your forms so you don’t have to go through each field by hand in the hopes of finding problems.</p>
<p>Here's what we'll build together:</p>
<ul>
<li><p>Scripts that confirm your error messages are helpful and specific rather than generic and annoying.</p>
</li>
<li><p>Automated checks that guarantee the hint text appears in the appropriate location and at the appropriate time.</p>
</li>
<li><p>Tests to ensure keyboard users can navigate your forms without becoming lost or stuck.</p>
</li>
<li><p>A comprehensive audit system that performs these checks automatically and provides you with a list of fixes ranked in order of priority.</p>
</li>
<li><p>Integration with your development process so that each time you make a code change, these checks are performed.</p>
</li>
</ul>
<p>By the end of this handbook, you'll know how to:</p>
<ul>
<li><p>Configure automated audits for any application form.</p>
</li>
<li><p>Verify error messages against accessibility guidelines and usability best practices.</p>
</li>
<li><p>Make sure the hint text aids users rather than confounds them.</p>
</li>
<li><p>Verify that all users can finish your forms by testing the keyboard navigation.</p>
</li>
<li><p>Link audit findings to actual business metrics, such as conversion rates.</p>
</li>
<li><p>As part of your deployment procedure, run these audits automatically.</p>
</li>
</ul>
<p>You can run the functional JavaScript code in each section right away. Because the examples use vanilla JavaScript, they can be used with any framework, including React, Vue, Angular, or simply HTML. Although you don't have to be an expert, you should be able to follow along with JavaScript to get this most out of this guide.</p>
<h2 id="heading-table-of-contents"><strong>Table of Contents</strong></h2>
<ol>
<li><p><a href="#heading-why-should-you-automate-form-audits-in-the-first-place">Why Should You Automate Form Audits in the First Place?</a></p>
</li>
<li><p><a href="#heading-how-to-define-concise-objectives-and-scope">How to Define Concise Objectives and Scope</a></p>
</li>
<li><p><a href="#heading-how-to-scope-audit-boundaries">How to Scope Audit Boundaries</a></p>
</li>
<li><p><a href="#heading-how-to-incorporate-heuristic-evaluation-and-quantitative-data">How to Incorporate Heuristic Evaluation and Quantitative Data</a></p>
</li>
<li><p><a href="#heading-how-to-define-automated-test-cases-for-form-components">How to Define Automated Test Cases for Form Components</a></p>
</li>
<li><p><a href="#heading-how-to-consistently-confirm-keyboard-navigation-flows">How to Consistently Confirm Keyboard Navigation Flows</a></p>
</li>
<li><p><a href="#heading-aiinformed-navigation-pattern-detection">AI-Informed Navigation Pattern Detection</a></p>
</li>
<li><p><a href="#heading-conclusion">Conclusion</a></p>
</li>
</ol>
<h2 id="heading-why-should-you-automate-form-audits-in-the-first-place">Why Should You Automate Form Audits in the First Place?</h2>
<p>Manual testing will typically find easy problems. But it may miss the systematic issues with forms across your entire application. You know the type of errors I’m talking about – those that don’t state incorrect values, missing keyboard support for fields, or hints that don’t have a clear place for help based on static design.</p>
<p>Research on user experience design shows that an effective UX can be strategically built, refined, or designed by using continuous feedback loops (Source: <a href="https://www.researchgate.net/publication/382804453_Assessment_of_User_Experience_UX_Design_Trends_in_Mobile_Applications">Okonkwo, Research Gate</a>). Automated audits are a good way of putting this into practice, as they can help you find issues at scale before you release your product.</p>
<p>The key advantage here is coverage. You can prepare form UX audit basics so you and your teammates can check every form field, validation rule, and keyboard interaction in a systematic way.</p>
<h3 id="heading-key-form-components-to-audit"><strong>Key Form Components to Audit</strong></h3>
<p>Before we create our roadmap for the UX audit, let’s talk about the three main elements of forms that typically have issues:</p>
<ul>
<li><p><strong>Error states</strong> indicate what went wrong, as well as how to fix it. The clearer they are, the better: the confusion of generic messages like "Invalid input" frustrates users. In contrast, specific feedback like "Email must contain @ symbol" is specific enough to help them get things completed.</p>
</li>
<li><p><strong>Hint text</strong> helps prevent errors before users can input anything. Proactive guidance like "Password must contain 8+ characters" provides realistic expectations. Placing hint text in the right location and conveying its message at the appropriate time also determines how useful the hint text will be.</p>
</li>
<li><p><strong>Keyboard flows</strong> distinguish accessible forms from broken forms. Tab order, focus order, and keyboard shortcuts dictate whether a user can complete their form without a mouse.</p>
</li>
</ul>
<p>To guide you through the audit workflow for each component, we’ll focus on three user flows: a sign-up form, checkout, and a contact form. All of these affect the conversion rate of a product’s users. And each of these elements maps to multiple metrics you can track.</p>
<p>We’ll use Nielsen Norman Group's 10 usability heuristics (Source: <a href="https://www.nngroup.com/articles/ten-usability-heuristics/">Jakob Nielsen, NNgroup</a>) as a foundation while incorporating any data indicators. These heuristics are:</p>
<ul>
<li><p><strong>System status visibility</strong>: Users should always be aware of what's going on thanks to prompt feedback</p>
</li>
<li><p><strong>System and real-world match</strong>: Use the user's language instead of technical terms</p>
</li>
<li><p><strong>User freedom and control</strong>: Enable users to quickly correct errors</p>
</li>
<li><p><strong>Consistency and standards</strong>: Adhere to platform norms so users don't have to question whether various terms or behaviors have the same meaning.</p>
</li>
<li><p><strong>Error prevention</strong>: Design to stop issues before they start</p>
</li>
<li><p><strong>Recognition rather than recall</strong>: Show options rather than making users memorize details.</p>
</li>
<li><p><strong>Flexibility and efficiency of use</strong>: Provide shortcuts for experienced users while keeping things simple for beginners.</p>
</li>
<li><p><strong>Aesthetic and minimalist design</strong>: Don't clutter interfaces with irrelevant information.</p>
</li>
<li><p><strong>Help users recognize, diagnose, and recover from errors</strong>: Error messages should clearly explain the problem and suggest a solution.</p>
</li>
<li><p><strong>Help and documentation</strong>: Provide easy-to-search help when needed.</p>
</li>
</ul>
<p>For form audits, we'll focus especially on heuristics #5 (error prevention through hint text), #6 (making requirements visible), and #9 (clear error recovery). These directly affect whether users can complete forms successfully.</p>
<p>There’s one more important thing to note before we proceed. For each component, you’ll want to identify what tests you can automate as part of your test case. For each form component, start building checks programmatically for several criteria:</p>
<ul>
<li><p><strong>Accessibility</strong> – for contrast ratios, ARIA labels, and focus indicators.</p>
</li>
<li><p><strong>Performance</strong> – for the time it takes to validate fields and render error messages.</p>
</li>
<li><p><strong>Visual consistency</strong> – for error state styling, hint text patterns, and keyboard focus.</p>
</li>
</ul>
<p>We’ll prioritize fixes with a high impact that will help prevent users from abandoning a form. Also, each audit will produce actionable information along with a line of code, acceptance criteria, and example code for fixes.</p>
<p>Now, let’s start building our form UX audit workflow.</p>
<h2 id="heading-how-to-define-concise-objectives-and-scope">How to Define Concise Objectives and Scope</h2>
<p>Before you even put your fingers to the keyboard, you'll want to determine what exactly you’re measuring and for what purpose. There’s a golden rule: ambiguous statements will yield ambiguous results. Having specific objectives linked to user behavior and business metrics is what creates actionable audits.</p>
<h3 id="heading-identifying-form-types-and-objectives">Identifying Form Types and Objectives</h3>
<p>First, you need to know what form you’re going to audit. Let’s start by mapping the three forms that have the greatest direct impact on the success of your application and defining the nuances and objectives of each one.</p>
<h4 id="heading-1-a-signup-forms-key-goal-is-user-acquisition">1. A signup form’s key goal is user acquisition.</h4>
<p>Every friction point - like poorly defined password requirements, vague expectations for email formats, and a lack of field labels - means a user will likely abandon the signup process. Your audit must identify these user flows.</p>
<h4 id="heading-2-checkout-forms-are-aimed-at-bringing-revenue">2. Checkout forms are aimed at bringing revenue</h4>
<p>User engagement improves significantly when applications use user-centered design principles – shocking, right? (Source: <a href="https://www.researchgate.net/publication/382804453_Assessment_of_User_Experience_UX_Design_Trends_in_Mobile_Applications">Okonkwo, ResearchGate</a>). In checkout flows, this means that error messages appear inline, hints show requirements before a user can type, and keyboard navigation follows the expected tab order from shipping to payment fields.</p>
<h4 id="heading-3-contact-forms-have-the-objective-of-establishing-communication">3. Contact forms have the objective of establishing communication</h4>
<p>Often, devs pay less attention to contact forms than to transactional forms. But contact forms are crucial for proposal requests, customer support requests, collaboration requests, and so on. A broken contact form can mean lost business.</p>
<p>Now that you’ve identified the type of form and its key objective, let’s do something equally important: link these high-level objectives to specific, measurable metrics.</p>
<h3 id="heading-connecting-objectives-and-metrics-to-track">Connecting Objectives and Metrics to Track</h3>
<p>Every objective for the audit maps to a set of measurements. Here’s how to build this continuum:</p>
<h4 id="heading-error-message-metrics">Error message metrics</h4>
<p>Your audit should evaluate whether error messages fulfill three criteria:</p>
<ol>
<li><p>Specificity (Does the message indicate what the problem is?),</p>
</li>
<li><p>Timing (In what context will the user see the error?), and</p>
</li>
<li><p>Actionable (Does the message explain what the user should do to recover?).</p>
</li>
</ol>
<p>For example, "password too weak" does not provide actionable information and isn’t specific enough, while "Password must have at least one uppercase character, one number, and one special character" is highly actionable and provides clear information on what the user needs to do.</p>
<p><strong>You can measure this by tracking two things:</strong> what percentage of your error messages mention the specific field name, and how many errors show up immediately when users leave a field versus only appearing after they hit submit.</p>
<h4 id="heading-hints-can-reduce-user-errors-before-they-occur-your-audit-should-validate">Hints can reduce user errors before they occur. Your audit should validate:</h4>
<ul>
<li><p>Whether a hint’s positioning is proactive (for instance, is the hint text located before users engage the provided input field?).</p>
</li>
<li><p>Visual proximity (Is the hint text next to the input field?).</p>
</li>
<li><p>Accessibility (for example, are the hints connected to the fields programmatically using aria-describedby?)</p>
</li>
</ul>
<p>The latter is especially important, as screen readers require explicit connections to announce hints at the correct time. You’ll want to measure these using metrics like the time to display a hint (immediate vs delayed) and the number of ARIA-associated hint elements.</p>
<h4 id="heading-keyboard-flow-metrics-are-also-directly-connected-to-accessibility">Keyboard flow metrics are also directly connected to accessibility</h4>
<p>Your audit should define if there is a correct order logic. Do fields follow the visual layout? When the tabindex jumps around sporadically across the screen, users lose context.</p>
<p>It should also determine if the focus visibility is the current field and if that’s clearly indicated. When the focus is invisible or subtle, you end up making your users guess where they are.</p>
<p>Keyboard shortcuts let users submit forms, clear fields, or jump between sections without touching their mouse. Everyone benefits from this, not just people using screen readers or other assistive technology.</p>
<p>You will want to measure these with the tabindex sequence alignment to the visual layout, focus indicator contrast ratios, and by defining if there are keyboard shortcuts for submitting, clearing, and moving about the forms.</p>
<p>Now that you have outlined the key metrics and principles applicable to the form you’re auditing, it’s time to define the specific area you want to focus on.</p>
<h2 id="heading-how-to-scope-audit-boundaries">How to Scope Audit Boundaries</h2>
<p>You’ll need to define exactly what forms and fields your audit will cover. You’ll want to start small in order to build working automations and then slowly expand.</p>
<h3 id="heading-setting-the-initial-scope">Setting the Initial Scope</h3>
<p>You should start with forms in your application’s critical user paths. We’ll use the below JavaScript snippet as an example. Paste this configuration object into your audit automation tool or script:</p>
<pre><code class="language-python">const auditScope = {
  signupForm: {
    url: '/signup',
    fields: ['email', 'password', 'confirmPassword'],
    priority: 'critical'
  },
  checkoutForm: {
    url: '/checkout',
    fields: ['cardNumber', 'expiryDate', 'cvv', 'billingZip'],
    priority: 'critical'
  },
  contactForm: {
    url: '/contact',
    fields: ['name', 'email', 'subject', 'message'],
    priority: 'high'
  }
};
</code></pre>
<p>In the code above, the auditScope object lists critical forms (signup, checkout, and contact forms), specifies their URLs along with important fields to check (such as email, password, cardNumber), and lists their priority level. This helps the auditing system see what resources to prioritize.</p>
<p>The priority property allows your audit system to prioritize high-impact forms first when protocol limits the resources available. Such a method prevents your system from being overwhelmed with too broad a scope.</p>
<h3 id="heading-setting-the-audit-execution-plan">Setting the Audit Execution Plan</h3>
<p>Your objectives dictate how the audit system will act. After you have defined the scope, you can divide the workflow into several definite phases.</p>
<ul>
<li><p><strong>Phase 1:</strong> Static analysis will address the structure of the HTML document and verify the ARIA attributes, tab indices, and markup patterns for semantic use. This can discover structural issues that require no user interaction.</p>
</li>
<li><p><strong>Phase 2:</strong> Dynamic testing simulates user interactions to identify the occurrence of errors, when hints are displayed, and when a keyboard user would navigate to which elements. This can identify runtime problems that were not revealed through static analysis.</p>
</li>
<li><p><strong>Phase 3:</strong> Visual verification measures spacing, contrast ratios, or positioning of elements, but using visually computed styles. This allows us to examine the visual design in relation to meeting either UX or UI objectives.</p>
</li>
</ul>
<p>Each phase will result in findings that continually tie back to your defined objectives. In the case of a failed check, the audit report will show which objective contributed to the finding, the current state of the component, the target states, and recommendations for the solution.</p>
<h3 id="heading-field-level-objectives">Field-level objectives</h3>
<p>For each field, you should tell the script or the automated tool what the audit is actually checking. Each check is a specific automated test. When the audit is executed, every check is confirmed for every field, and failures are noted.</p>
<p>For instance, in the following snippet, for each field we provide (like "email" or "password"), we list three categories of checks: errorChecks, hintChecks, and keyboardChecks. When you link this object to your audit automation system (for example, UI testing frameworks, accessibility checkers), your audit automation system runs all these tests on every field. It will report any test failures so you can see which part of the input is broken or missing.</p>
<pre><code class="language-python">const fieldObjectives = {
  email: {
    errorChecks: [
      'hasInlineValidation',
      'errorMessageSpecific',
      'showsValidFormatExample'
    ],
    hintChecks: [
      'hintVisibleBeforeInteraction',
      'hintExplainsFormat',
      'hintAccessible'
    ],
    keyboardChecks: [
      'tabOrderCorrect',
      'focusVisible',
      'supportsAutocomplete'
    ]
  },
  password: {
    errorChecks: [
      'hasInlineValidation',
      'listsAllRequirements',
      'showsProgressIndicator'
    ],
    hintChecks: [
      'hintListsRequirements',
      'hintVisibleBeforeTyping',
      'hintPersistsDuringTyping'
    ],
    keyboardChecks: [
      'tabOrderCorrect',
      'focusVisible',
      'supportsPasswordManagers'
    ]
  }
};
</code></pre>
<p>This leads to a very granular, consistent, and repeatable test of important user input components so you can validate usability, accessibility, and correctness of the form.</p>
<h3 id="heading-linking-objectives-to-business-kpis">Linking Objectives to Business KPIs</h3>
<p>The findings of the audit should link back to business impact. Let’s look at how our objectives map to key performance indicators.</p>
<p>The impact on conversion rate should be direct and specific. For instance, improved error messages directly impact the form completion rate:</p>
<ul>
<li><p><strong>Baseline</strong>. The current abandonment rate for forms.</p>
</li>
<li><p><strong>Target</strong>. Decrease abandonment by 15% due to clear error messages.</p>
</li>
<li><p><strong>Audit validation.</strong> 100% of error messages are clear and specific.</p>
</li>
</ul>
<p>Reducing support tickets is another priority. In this case, better hint text provides less confusion:</p>
<ul>
<li><p><strong>Baseline</strong>. Volume of support requests related to forms currently.</p>
</li>
<li><p><strong>Target</strong>. Decrease the number of support tickets by 25%.</p>
</li>
<li><p><strong>Audit validation.</strong> 100% of complex fields have proactive hints.</p>
</li>
</ul>
<p>Accessibility compliance is another important goal. Keyboard navigation has a direct impact on the legal compliance and reach of a wider base of users. The example of the KPIs here can be the following:</p>
<ul>
<li><p><strong>Baseline</strong>. Current level of WCAG conformance.</p>
</li>
<li><p><strong>Target</strong>. All forms to be WCAG 2.1 AA compliant.</p>
</li>
<li><p><strong>Audit validation.</strong> 100% of fields work with a keyboard only.</p>
</li>
</ul>
<p>After you create such measurable criteria for success, you should actually give them as thresholds to your system. Here’s an example of how you can provide defined measures for passing and failing for the automated audit:</p>
<pre><code class="language-python">const auditThresholds = {
  errorMessages: {
    specificityScore: 0.9,  // 90% must include field-specific details
    inlineValidationPercentage: 1.0,  // 100% must show inline errors
    actionabilityScore: 0.85  // 85% must include fix instructions
  },
  hintText: {
    proactiveDisplayPercentage: 1.0,  // 100% must appear before interaction
    proximityMaxPixels: 8,  // Hints must be within 8px of fields
    ariaAssociationPercentage: 1.0  // 100% must have aria-describedby
  },
  keyboardFlow: {
    tabOrderCorrectnessScore: 1.0,  // 100% must follow visual layout
    focusContrastRatio: 3.0,  // Minimum 3:1 contrast for focus indicators
    shortcutCoveragePercentage: 0.8  // 80% of actions must have shortcuts
  }
};
</code></pre>
<p>As you can see, under errorMessages, the specificityScore of 0.9 states that 90% of error messages must include details specific to each field. Also, within the hintText directions, the proactiveDisplayPercentage of 1.0 demands that the hints appear before the user starts typing, not after, for the test to be passed.</p>
<h3 id="heading-the-5cs-framework-for-audit-documentation">The 5Cs Framework for Audit Documentation</h3>
<p>When you document your audit results, use the 5Cs framework to make sure your reports are actually useful:</p>
<ul>
<li><p><strong>Coverage</strong>: Which forms and fields did you test? Be specific about the scope.</p>
</li>
<li><p><strong>Completion</strong>: Did you run all the planned checks? Note any that were skipped and why.</p>
</li>
<li><p><strong>Consistency</strong>: Do your results use the same format and terminology throughout? This makes reports easier to scan.</p>
</li>
<li><p><strong>Clarity</strong>: Can a developer read the failure report and know exactly what to fix? Include the current state, expected state, and code examples.</p>
</li>
<li><p><strong>Correctness</strong>: Are your checks testing the right things? Validate that failures match real user problems, not just technical violations.</p>
</li>
</ul>
<p>This framework helps both designers and developers understand audit results and take action quickly.</p>
<h2 id="heading-how-to-incorporate-heuristic-evaluation-and-quantitative-data">How to Incorporate Heuristic Evaluation and Quantitative Data</h2>
<p>Once you've established objectives, you’ll want to base your audit on the usability principles and behavior patterns of users. This combination of established usability heuristics along with quantitative data can help you verify that your automated checks are surfacing issues that users actually experience – and not fictional edge cases (Source: <a href="https://www.nngroup.com/articles/ten-usability-heuristics/">Jakob Nielsen, NNgroup</a>).</p>
<p>The best way to do this is to map the issues to the common standard of the Web Content Accessibility Guidelines and use that as the basis for your audit (Source: <a href="https://www.w3.org/TR/WCAG21/">WCAG 2.1, W3C Recommendation</a>). For every identified problem, identify the WCAG success criteria that the issue violates. This will give you clear requirements that you can use as an automated check and that should be commonly understood by everyone working on the audits.</p>
<p>In the automated script, you can use the following code to map these guidelines:</p>
<pre><code class="language-python">const wcagMapping = {
  errorIdentification: {
    criterion: '3.3.1',
    level: 'A',
    requirement: 'Error messages must identify the item in error',
    testFunction: 'checkErrorIdentification'
  },
  errorSuggestion: {
    criterion: '3.3.3',
    level: 'AA',
    requirement: 'Error messages must provide suggestions for correction',
    testFunction: 'checkErrorSuggestions'
  },
  labelInName: {
    criterion: '2.5.3',
    level: 'A',
    requirement: 'Accessible name must contain visible label text',
    testFunction: 'checkLabelInName'
  },
  focusOrder: {
    criterion: '2.4.3',
    level: 'A',
    requirement: 'Focus order must preserve meaning and operability',
    testFunction: 'checkFocusOrder'
  }
};
</code></pre>
<p>If any part of the form violates WCAG 3.3.1 – perhaps it doesn’t identify the field when it provides an error – your audit report can document it as follows:</p>
<p>"The error message displayed on the email field said 'Invalid input' but didn’t identify the requirement it didn't meet. WCAG 3.3.1 states that the error must identify the field with the error (potential fix: 'Email must have an @ symbol'). 3.3.1 is the mapped criteria."</p>
<p>Nielsen's heuristics tell you what good usability looks like. But tools like Google Analytics and Hotjar show you what users actually do on your forms. When you combine both – usability principles and real user behavior data – you make better decisions about which problems to fix first.</p>
<p>Research shows this combined approach catches more real issues than either method alone (Sources: <a href="https://www.researchgate.net/publication/334385231_User_Experience_Evaluation_Using_Mouse_Tracking_and_Artificial_Intelligence">Souza and others, IEEE Access</a>). Use both types of data to prioritize what your automated audits should check.</p>
<h3 id="heading-define-binary-passfail-criteria">Define Binary Pass/Fail Criteria</h3>
<p>Automation requires clear results. Your audit must document whether a component passed or failed its WCAG criteria. The process must yield binary results – yes/no, positive/negative.</p>
<p>For instance, the following code incorporates a definite, binary audit check to verify whether a form field is compliant with WCAG 3.3.1 criteria for error identification (Source: <a href="https://www.w3.org/TR/WCAG21/">WCAG 2.1, W3C Recommendation</a>):</p>
<pre><code class="language-python">function checkErrorIdentification(field) {
  const errorElement = field.querySelector('[role="alert"], .error-message');
  
  if (!errorElement) {
    return {
      pass: false,
      wcag: '3.3.1',
      severity: 'critical',
      message: `Field "${field.name}" lacks error message element`,
      fix: 'Add aria-describedby pointing to error container'
    };
  }
  
  const errorText = errorElement.textContent.trim();
  const hasFieldReference = errorText.toLowerCase().includes(field.name.toLowerCase()) 
    || errorText.toLowerCase().includes(field.labels[0]?.textContent.toLowerCase());
  
  if (!hasFieldReference) {
    return {
      pass: false,
      wcag: '3.3.1',
      severity: 'major',
      message: `Error message "${errorText}" doesn't identify field`,
      fix: `Include field name in error: "\({field.labels[0]?.textContent} \){errorText}"`
    };
  }
  
  return { pass: true, wcag: '3.3.1' };
}
</code></pre>
<p>The error message identified the error, and each component definitively passes or fails the criterion. There’s no room for interpretation or doubt.</p>
<h3 id="heading-standardize-error-messages-and-hint-messages">Standardize Error Messages and Hint Messages</h3>
<p>Keep in mind that automated functions require familiarity and consistency. You can create centralized repositories with libraries of accepted usage patterns and approval that developers can refer to, and your tests can check that your forms are using standardized messages.</p>
<p>For example, in the following snippet, the errorLibrary object provides a single source of truth for every acceptable error message your application will display for specific fields. For each field, there are appropriately defined message strings for common validation issues (like empty, invalid, duplicate). Similarly, the hintLibrary object provides a single source of truth for every hint text that prefaces user input.</p>
<pre><code class="language-python">const errorLibrary = {
  email: {
    empty: 'Email address is required',
    invalid: 'Email must include @ symbol and domain (example: user@domain.com)',
    duplicate: 'This email is already registered. Try signing in instead.'
  },
  password: {
    empty: 'Password is required',
    tooShort: 'Password must be at least 8 characters',
    missingUppercase: 'Password must include at least one uppercase letter',
    missingNumber: 'Password must include at least one number',
    missingSpecial: 'Password must include at least one special character (!@#$%^&amp;*)'
  }
};

const hintLibrary = {
  email: 'Enter your email address (example: name@company.com)',
  password: 'Create a password with 8+ characters, including uppercase, number, and special character',
  phone: 'Enter 10-digit phone number without dashes (example: 5551234567)'
};
</code></pre>
<p>By having a single source of these patterns, you won’t run the risk of writing duplicate or misaligned messages in different areas across the app, increasing maintainability.</p>
<h3 id="heading-utilize-definite-aria-identifiers">Utilize Definite ARIA Identifiers</h3>
<p>If you use consistent ARIA attributes, you can automate checks. As an example, in the following snippet, we explicitly define which ARIA attributes connect error messages, hints, and fields. The auditARIAImplementation function checks whether each field has an accessible label (either an HTML element or an aria-label attribute) to meet WCAG 1.3.1. Without it, users will likely find it hard to identify the purpose of the input.</p>
<pre><code class="language-python">function auditARIAImplementation(field) {
  const checks = {
    hasLabel: !!field.labels?.length || !!field.getAttribute('aria-label'),
    hasDescription: !!field.getAttribute('aria-describedby'),
    hasErrorMessage: !!field.getAttribute('aria-errormessage'),
    hasRequired: field.hasAttribute('required') || field.getAttribute('aria-required') === 'true'
  };
  
  const failures = [];
  
  if (!checks.hasLabel) {
    failures.push({
      wcag: '1.3.1',
      message: `Field "${field.name}" lacks accessible label`,
      fix: 'Add &lt;label&gt; element or aria-label attribute'
    });
  }
  
  if (!checks.hasDescription) {
    failures.push({
      wcag: '3.3.2',
      message: `Field "${field.name}" lacks hint text association`,
      fix: 'Add aria-describedby pointing to hint element ID'
    });
  }
  
  if (field.dataset.validatable &amp;&amp; !checks.hasErrorMessage) {
    failures.push({
      wcag: '3.3.1',
      message: `Validatable field "${field.name}" lacks aria-errormessage`,
      fix: 'Add aria-errormessage attribute pointing to error container ID'
    });
  }
  
  return {
    pass: failures.length === 0,
    failures
  };
}
</code></pre>
<p>This function checks for specific ARIA-tied patterns that your design system prescribes. The great thing is that you can check the code in CI/CD pipelines to maintain implementation standards.</p>
<p>The next section will help you identify specific automated test cases for errors, hints, and keyboard flows.</p>
<h2 id="heading-how-to-define-automated-test-cases-for-form-components">How to Define Automated Test Cases for Form Components</h2>
<p>Now that you've established a baseline with WCAG standards, heuristics, and user data, you can create specific automated test cases. Each test case targets a measurable quality for the error messages, hint text, or keyboard navigation functionality of each form component. The following sections will provide concrete ways to automate these checks for each form component.</p>
<h3 id="heading-automated-error-message-checks">Automated Error Message Checks</h3>
<p>Error messages are crucial conversion points. Your automated checks should ensure that each error message meets the specificity, timing, and actionability criteria. Every error message must convey what exactly has gone wrong. Generic error messages don’t pass this quality check.</p>
<p>For automation, your checks can provide insight as to whether the error message references the specific construction of the field. For instance, in the following snippet, the method verifies that every error message that appears in a form serves to pinpoint the input problem, not use a vague general expression.</p>
<pre><code class="language-python">function auditErrorSpecificity(formId) {
  const form = document.getElementById(formId);
  const fields = form.querySelectorAll('input, textarea, select');
  const failures = [];
  
  fields.forEach(field =&gt; {
    const errorElement = document.querySelector(`[aria-describedby="${field.id}-error"]`);
    if (errorElement) {
      const errorText = errorElement.textContent.toLowerCase();
      const genericTerms = ['invalid', 'error', 'wrong', 'incorrect'];
      const isGeneric = genericTerms.some(term =&gt; 
        errorText.includes(term) &amp;&amp; errorText.split(' ').length &lt; 4
      );
      
      if (isGeneric) {
        failures.push({
          field: field.id,
          message: errorText,
          issue: 'Generic error message lacks specificity',
          wcag: '3.3.1 Error Identification'
        });
      }
    }
  });
  
  return failures;
}
</code></pre>
<p>It looks through field-specific error messages and flags any that use common generic terms in a short, vague message, as ambiguous messages don’t serve the purposes of WCAG 3.3.1 since they don’t provide an actionable correction for user input (Source: <a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-identified.html">WCAG 3.3.1, WC3</a>).</p>
<h3 id="heading-validation-timing-of-inline-messages">Validation Timing of Inline Messages</h3>
<p>Error messages should show the message when the user leaves the field and not just at submission. Research demonstrates that even just the timing of the feedback alone significantly disrupts user performance. Your automation should check whether errors are displayed inline (Source: <a href="https://www.researchgate.net/publication/282715275_Soft_Keyboard_UX_Evaluation_An_Eye_Tracking_Study">Al-Khalifa and others, ResearchGate</a>).</p>
<p>This code verifies that error messages appear immediately when a user leaves a required input field on blur, as opposed to only showing errors after submitting the entire form.</p>
<pre><code class="language-python">function auditErrorTiming(formId) {
  const form = document.getElementById(formId);
  const fields = form.querySelectorAll('input[required], textarea[required]');
  const failures = [];
  
  fields.forEach(field =&gt; {
    let hasBlurValidation = false;
    let hasInputValidation = false;
    
    // Check for blur event listeners
    const blurListeners = getEventListeners(field).blur || [];
    hasBlurValidation = blurListeners.length &gt; 0;
    
    // Check for input event listeners
    const inputListeners = getEventListeners(field).input || [];
    hasInputValidation = inputListeners.length &gt; 0;
    
    if (!hasBlurValidation &amp;&amp; !hasInputValidation) {
      failures.push({
        field: field.id,
        issue: 'No inline validation detected',
        recommendation: 'Add blur or input event validation',
        wcag: '3.3.1 Error Identification'
      });
    }
  });
  
  return failures;
}
</code></pre>
<p>This audit verifies that an event handler which runs against an inline validator is in place for blur and input events on input fields. It also checks that it flags any that fail to have these interactions as a failure under the WCAG 3.3.1 Error Identification guideline (Source: <a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-identified.html">WCAG 3.3.1, WC3</a>).</p>
<h3 id="heading-confirm-actionable-recovery-guidance">Confirm Actionable Recovery Guidance</h3>
<p>Error messages must clarify how to recover from any faults or issues. "Password too weak" fails the user. In contrast, the error message "Password must be 8+ characters, contain at least 1 upper case letter, and one numeric character" gives the user enough information to make the proper adjustment.</p>
<p>Let’s take an example of some code that audits password fields to ensure that the error message includes specific actionable recovery instructions outlining character types or character length and clearly guides users on how to correct input errors (Source: <a href="https://www.w3.org/WAI/WCAG21/Understanding/error-suggestion.html">WCAG 3.3.3, WC3</a>).</p>
<pre><code class="language-python">function auditErrorActionability(formId) {
  const form = document.getElementById(formId);
  const failures = [];
  const passwordFields = form.querySelectorAll('input[type="password"]');
  
  passwordFields.forEach(field =&gt; {
    const errorElement = document.getElementById(`${field.id}-error`);
    if (errorElement) {
      const errorText = errorElement.textContent;
      const hasSpecificRequirements = /\d+/.test(errorText) || 
        /uppercase|lowercase|special|character|digit/.test(errorText.toLowerCase());
      
      if (!hasSpecificRequirements) {
        failures.push({
          field: field.id,
          message: errorText,
          issue: 'Error lacks specific recovery guidance',
          wcag: '3.3.3 Error Suggestion'
        });
      }
    }
  });
  
  return failures;
}
</code></pre>
<p>If the error message doesn’t contain these characters or meet the length requirement, the function will flag the instance as a failure with a corresponding WCAG reference.</p>
<h3 id="heading-automated-rich-hint-text-auditing">Automated Rich Hint Text Auditing</h3>
<p>Rich text hints help prevent errors (and hopefully the need for an error message). Research suggests that users who are given proactive guidance improve form completion by up to 23% (Source: <a href="https://www.researchgate.net/publication/382804453_Assessment_of_User_Experience_UX_Design_Trends_in_Mobile_Applications">Okonkwo, ResearchGate</a>). Your automation should confirm that the right hints appear at the right time, in the right places, with appropriate accessible information and presentation.</p>
<p>This function audits form fields to ensure that hint text is seen before the user interacts with the form, helping avoid user errors while filling out the form.</p>
<pre><code class="language-python">function auditHintTiming(formId) {
  const form = document.getElementById(formId);
  const complexFields = form.querySelectorAll('input[type="password"], input[pattern]');
  const failures = [];
  
  complexFields.forEach(field =&gt; {
    const hintElement = document.querySelector(`[id="${field.getAttribute('aria-describedby')}"]`);
    
    if (!hintElement) {
      failures.push({
        field: field.id,
        issue: 'Complex field missing proactive hint text',
        wcag: '3.3.2 Labels or Instructions'
      });
    } else {
      // Check if hint is visible before interaction
      const computedStyle = window.getComputedStyle(hintElement);
      const isVisible = computedStyle.display !== 'none' &amp;&amp; 
        computedStyle.visibility !== 'hidden';
      
      if (!isVisible) {
        failures.push({
          field: field.id,
          issue: 'Hint text hidden until interaction',
          wcag: '3.3.2 Labels or Instructions'
        });
      }
    }
  });
  
  return failures;
}
</code></pre>
<p>If the hint doesn't exist or doesn’t show until after the user interacts with the form, the function will flag it as a failure to satisfy WCAG 3.3.2 Labels or Instructions for a generally consistent and user-friendly form design (Source: <a href="https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions.html">WCAG 3.3.3, WC3</a>).</p>
<h2 id="heading-how-to-consistently-confirm-keyboard-navigation-flows">How to Consistently Confirm Keyboard Navigation Flows</h2>
<p>Keyboard accessibility is required for WCAG compliance, and you can automate most of the testing with code. When people can't use your forms with just a keyboard, they often give up and leave. This directly hurts your conversion rates.</p>
<p>When you document how keyboard navigation should work, you can write automated tests to check if it actually works that way.</p>
<h3 id="heading-outlining-the-interactions">Outlining the Interactions</h3>
<p>Your audit should document expected keyboard interactions for each component. If there's a modal dialog, note that Tab will cycle through the elements within the modal, Escape closes the modal, and the focus returns to the element that opened the modal.</p>
<p>For forms, note that Tab advances through the fields in visual order, Shift+Tab will go back, and Enter will submit the form from the submit button only.</p>
<p>You should document these flows in a data-driven way. A structured format with columns for "Component," "Keystroke," "Expected Action," and "Relevant WCAG" will make both human review and automated parsing much easier:</p>
<pre><code class="language-python">const keyboardPatterns = {
  'modal-dialog': {
    tab: 'Focus next element within modal',
    shiftTab: 'Focus previous element within modal',
    escape: 'Close modal and return focus',
    wcag: '2.1.1 Keyboard, 2.4.3 Focus Order'
  },
  'form-field': {
    tab: 'Move to next field in visual order',
    shiftTab: 'Move to previous field',
    enter: 'Submit only from submit button',
    wcag: '2.1.1 Keyboard, 2.4.3 Focus Order'
  },
  'dropdown-select': {
    space: 'Open dropdown menu',
    arrowDown: 'Navigate to next option',
    arrowUp: 'Navigate to previous option',
    enter: 'Select current option',
    escape: 'Close dropdown without selection',
    wcag: '2.1.1 Keyboard, 4.1.2 Name, Role, Value'
  }
};
</code></pre>
<p>This code aligns these patterns with WCAG guidelines 2.1.1 (Keyboard Accessibility), 2.4.3 (Focus Order), and 4.1.2 (Name, Role, Value) to support users who rely on keyboard inputs (Source: <a href="https://www.w3.org/WAI/WCAG21/Understanding/">WCAG Understanding Docs, WC3</a>).</p>
<h3 id="heading-automated-tab-order-validation">Automated Tab Order Validation</h3>
<p>Tab order should follow the visual layout of the page. When focus jumps around randomly, users get lost. The code below checks that focus moves through fields in the order people expect – top to bottom, left to right. It catches cases where focus skips around even when the tabindex values look correct.</p>
<pre><code class="language-python">function auditTabOrder(formId) {
  const form = document.getElementById(formId);
  const focusableElements = form.querySelectorAll(
    'input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'
  );
  const failures = [];
  
  const elements = Array.from(focusableElements).map(el =&gt; ({
    element: el,
    position: el.getBoundingClientRect(),
    tabindex: parseInt(el.getAttribute('tabindex')) || 0
  }));
  
  for (let i = 1; i &lt; elements.length; i++) {
    const prev = elements[i - 1];
    const curr = elements[i];
    
    // Check if tab order follows visual top-to-bottom, left-to-right
    const visuallyBefore = prev.position.top &lt; curr.position.top || 
      (prev.position.top === curr.position.top &amp;&amp; prev.position.left &lt; curr.position.left);
    
    if (!visuallyBefore &amp;&amp; prev.tabindex === curr.tabindex) {
      failures.push({
        field: curr.element.id,
        issue: 'Tab order does not match visual layout',
        wcag: '2.4.3 Focus Order'
      });
    }
  }
  
  return failures;
}
</code></pre>
<p>In essence, the audit identifies failures to adhere to WCAG 2.4.3 Focus Order while preserving context and the ability to interact with keyboard users as they interact with form fields (Source: <a href="https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html">WCAG 2.4.3, WC3</a>).</p>
<h3 id="heading-verify-focus-visibility">Verify Focus Visibility</h3>
<p>Focus indicators need to be clearly identifiable. According to research, visible focus indicators improved typing and reduced errors significantly (Source: <a href="https://www.researchgate.net/publication/392950031_Enhancing_User_Experience_of_Virtual_Keyboard_Through_Collaborative_and_Speed-Adaptive_Auditory-Vibrotactile_Feedback">Liu and others, ResearchGate</a>).</p>
<p>For instance, focus styles can include an outline, border, or shadow, but they must have enough contrast against the background (at least 3:1) to satisfy WCAG 2.4.7 Focus Visible and 1.4.11 Non-text Contrast (Source: <a href="https://www.w3.org/WAI/WCAG21/Understanding/">WCAG Understanding Docs, WC3</a>). Consider the following example:</p>
<pre><code class="language-python">function auditFocusVisibility(formId) {
  const form = document.getElementById(formId);
  const focusableElements = form.querySelectorAll('input, select, textarea, button');
  const failures = [];
  
  focusableElements.forEach(element =&gt; {
    element.focus();
    const computedStyle = window.getComputedStyle(element);
    
    // Check for visible focus indicator
    const hasOutline = computedStyle.outline !== 'none' &amp;&amp; 
      computedStyle.outlineWidth !== '0px';
    const hasBorder = computedStyle.borderStyle !== 'none';
    const hasBoxShadow = computedStyle.boxShadow !== 'none';
    
    // Check contrast ratio for focus indicator
    const outlineColor = computedStyle.outlineColor;
    const backgroundColor = computedStyle.backgroundColor;
    const contrastRatio = calculateContrastRatio(outlineColor, backgroundColor);
    
    if (!hasOutline &amp;&amp; !hasBorder &amp;&amp; !hasBoxShadow) {
      failures.push({
        field: element.id,
        issue: 'No visible focus indicator',
        wcag: '2.4.7 Focus Visible'
      });
    } else if (contrastRatio &lt; 3) {
      failures.push({
        field: element.id,
        contrastRatio: contrastRatio.toFixed(2),
        issue: 'Focus indicator contrast ratio below 3:1',
        wcag: '1.4.11 Non-text Contrast'
      });
    }
  });
  
  return failures;
}
</code></pre>
<p>Good focus styling helps keyboard users see where they are on the page. This code checks that focus indicators are visible and have enough contrast against the background so users can tell which field they're currently in.</p>
<h3 id="heading-using-automated-testing-tools">Using Automated Testing Tools</h3>
<p>To speed up and automate audits even more efficiently, you can use tools such as <a href="https://developer.chrome.com/docs/lighthouse/overview">Google Lighthouse</a>, <a href="https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd">axe-core</a>, and <a href="https://www.cypress.io/">Cypress</a>. You can also combine these tools to be even more powerful – for example, using axe-core in conjunction with Cypress is the most comprehensive test suite I can suggest.</p>
<p>Here is a workflow you can follow:</p>
<pre><code class="language-python">async function runAccessibilityAudit(formId) {
  const form = document.getElementById(formId);
  const results = await axe.run(form, {
    rules: {
      'label': { enabled: true },
      'aria-required-attr': { enabled: true },
      'aria-valid-attr-value': { enabled: true },
      'keyboard-navigation': { enabled: true },
      'focus-order-semantics': { enabled: true }
    }
  });
  
  const violations = results.violations.map(violation =&gt; ({
    rule: violation.id,
    impact: violation.impact,
    description: violation.description,
    wcag: violation.tags.filter(tag =&gt; tag.startsWith('wcag')),
    elements: violation.nodes.map(node =&gt; node.target)
  }));
  
  return violations;
}
</code></pre>
<p>When you document keyboard patterns and automate the checks, you make sure everyone can complete your forms – whether they use a mouse, keyboard, or screen reader. Run these checks in your CI/CD pipeline to catch problems before they go live.</p>
<h2 id="heading-ai-informed-navigation-pattern-detection">AI-Informed Navigation Pattern Detection</h2>
<p>Machine learning models can help identify strange keyboard navigation sequences that signal potential usability challenges. Combining mouse tracking with artificial intelligence can give you insights into user behavior that aren't possible using traditional strategies (Sources: <a href="https://www.researchgate.net/publication/334385231_User_Experience_Evaluation_Using_Mouse_Tracking_and_Artificial_Intelligence">Souza and others, IEEE Access</a>).</p>
<p>The logic could similarly be applied to keyboard navigation studies, as AI models can be trained on typical successful navigation patterns to signal when users are struggling in their keyboard flows.</p>
<h3 id="heading-pattern-detection-for-navigation-using-ai">Pattern Detection for Navigation Using AI</h3>
<p>AI tools can assess keyboard navigation to find non-compliant actions during testing. For instance, through machine learning, the code sample below captures, evaluates, and categorizes unusual or problematic keyboard navigation behavior on web forms and detects unique keyboard navigation or k-action sequences that are likely indicative of usability concerns.</p>
<pre><code class="language-python">async function detectNavigationAnomalies(formId) {
  const navigationData = captureKeyboardSequence(formId);
  const features = extractNavigationFeatures(navigationData);
  
  // Use machine learning to classify navigation patterns
  const model = await loadTrainedModel('keyboard-anomaly-detection');
  const predictions = await model.predict(features);
  
  const anomalies = predictions.filter(p =&gt; p.confidence &gt; 0.8).map(p =&gt; ({
    sequence: p.keystrokes,
    anomalyType: p.classification,
    severity: p.confidence,
    recommendation: generateRecommendation(p.classification)
  }));
  
  return anomalies;
}

function extractNavigationFeatures(data) {
  return {
    tabSequenceLength: data.tabs.length,
    backtrackCount: countBacktracks(data.tabs),
    focusTrapIndicators: detectFocusTraps(data),
    averageTimePerElement: calculateAverageTime(data),
    sequenceDeviation: measureSequenceDeviation(data)
  };
}
</code></pre>
<p>The code structure captures the user's keyboard navigation actions on specified forms using <code>captureKeyboardSequence(formId)</code>, which means that the user has entered keystrokes, such as tabbing and focusing between fields.</p>
<p>Using <code>extractNavigationFeatures(data)</code>, the code processes the Raw keyboard navigation sequence by calculating metrics. Lastly, the code loads a previously-trained ML model and provides the extracted features to the model to be classified into their respective categories along with a confidence score.</p>
<p>Any keyboard navigation anomalies detected with a confidence score of 0.8 or higher will be filtered. The detected keystroke sequences, type of anomaly, severity, and specific suggestions will be included in the final results report for later review by the user.</p>
<h3 id="heading-fuzzy-logic-paradigm-for-navigation-performance-scoring">Fuzzy Logic Paradigm for Navigation-Performance Scoring</h3>
<p>Collaborative feedback systems can help improve the virtual keyboard user experience. Fuzzy logic lets you combine multiple measurements – like focus visibility and tab order – into a single score that better reflects the actual user experience. (Source: <a href="https://www.researchgate.net/publication/392950031_Enhancing_User_Experience_of_Virtual_Keyboard_Through_Collaborative_and_Speed-Adaptive_Auditory-Vibrotactile_Feedback">Liu and others, ResearchGate</a>).</p>
<p>For example, the following code creates a fuzzy inference system that evaluates two inputs: Focus Visibility and Tab Order Logic. These two inputs are evaluated using fuzzy logic and associated rules to arrive at a single score representing the total efficiency of keyboard navigation for a given application.</p>
<pre><code class="language-python">function createKeyboardNavigationFuzzySystem() {
  // Define fuzzy variables
  const focusVisibility = new FuzzyVariable('focusVisibility', 0, 100);
  focusVisibility.addTerm('poor', new TriangularMF(0, 0, 40));
  focusVisibility.addTerm('adequate', new TriangularMF(30, 50, 70));
  focusVisibility.addTerm('excellent', new TriangularMF(60, 100, 100));
  
  const tabOrderLogic = new FuzzyVariable('tabOrderLogic', 0, 100);
  tabOrderLogic.addTerm('confusing', new TriangularMF(0, 0, 40));
  tabOrderLogic.addTerm('acceptable', new TriangularMF(30, 50, 70));
  tabOrderLogic.addTerm('intuitive', new TriangularMF(60, 100, 100));
  
  const navigationEfficiency = new FuzzyVariable('navigationEfficiency', 0, 100);
  navigationEfficiency.addTerm('inefficient', new TriangularMF(0, 0, 40));
  navigationEfficiency.addTerm('moderate', new TriangularMF(30, 50, 70));
  navigationEfficiency.addTerm('efficient', new TriangularMF(60, 100, 100));
  
  // Define fuzzy rules
  const rules = [
    'IF focusVisibility IS excellent AND tabOrderLogic IS intuitive THEN navigationEfficiency IS efficient',
    'IF focusVisibility IS poor OR tabOrderLogic IS confusing THEN navigationEfficiency IS inefficient',
    'IF focusVisibility IS adequate AND tabOrderLogic IS acceptable THEN navigationEfficiency IS moderate'
  ];
  
  return new FuzzyInferenceSystem([focusVisibility, tabOrderLogic], navigationEfficiency, rules);
}
</code></pre>
<p>The resulting score is meant to be more representative of a user’s experience with the keyboard navigation system than other existing methods of measuring user satisfaction. This fuzzy inference system assesses keyboard navigation quality based on multiple dimensions at the same time, yielding scores in a similar range to user-reported satisfaction measurements (Source: <a href="https://www.researchgate.net/publication/392950031_Enhancing_User_Experience_of_Virtual_Keyboard_Through_Collaborative_and_Speed-Adaptive_Auditory-Vibrotactile_Feedback">Liu and others, ResearchGate</a>).</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>This article has given you the tools and resources you’ll need to automate a UX audit of your app’s forms – from the initial setup through continuous integration.</p>
<p>You’ve learned:</p>
<ul>
<li><p>Three essential components of forms and the importance of addressing each component systematically.</p>
</li>
<li><p>How to link objectives directly with business KPIs and user outcomes.</p>
</li>
<li><p>How to set up automated testing for the specificity of errors, the timing of validation, and the direction for the next actionable step after an error.</p>
</li>
<li><p>How to review the hint text on your forms: proactive display, proximity to the field it assists, and accessibility.</p>
</li>
<li><p>How to validate keyboard navigation through verification of tab order, testing focus visibility, and using ARIA tags.</p>
</li>
<li><p>How to incorporate WCAG criteria into your automated tests and to incorporate Nielsen's 10 Heuristics.</p>
</li>
<li><p>How to prepare documentation for the handoff between Design and Development, using the "5Cs": Coverage, Completion, Consistency, Clarity, and Correctness.</p>
</li>
</ul>
<p><strong>Next steps:</strong></p>
<ul>
<li><p>Begin with a single high-impact form in your application (signup or checkout) and run the basic automated checks on error messages and keyboard flows.</p>
</li>
<li><p>Integrate one or two audit functions into your existing test suite to see how they surface issues you might have missed manually.</p>
</li>
<li><p>Create a centralized error and hint message library for your most critical forms to ensure consistency.</p>
</li>
<li><p>Gradually expand your audit coverage to additional forms and fields as you refine your automation approach.</p>
</li>
<li><p>Add these checks to your CI/CD pipeline so they run automatically on every pull request, catching regressions before they reach users.</p>
</li>
<li><p>Experiment with AI-powered anomaly detection for keyboard navigation patterns once your foundational audits are stable.</p>
</li>
</ul>
<p>Most importantly, remember that form UX optimization is an ongoing practice, not a one-time fix. Start with the forms that directly impact your conversion metrics, validate that your automated checks catch real user problems, and expand your coverage systematically. Your goal should be to build a reliable system that continuously protects your users from friction.</p>
<h3 id="heading-about-the-author">About the author</h3>
<p>Hope you enjoyed the article and found it helpful. I’ve been a contributor to freeCodeCamp for more than 8 years, and to make this piece more precise and detailed, I used some expert help.</p>
<p>I sincerely thank skilled designers from <a href="https://coaxsoft.com/">COAX Software</a> for the UX and accessibility guidelines, and the developers who provided the audit automation code snippets (who both wished to stay anonymous). The company has a deep expertise in <a href="https://coaxsoft.com/services/ux-audit-services">UI/UX design</a>.</p>
<p>To find out more about me and read more content on tech and digital, visit <a href="https://www.linkedin.com/in/oleg-romanyuk/">https://www.linkedin.com/in/oleg-romanyuk/</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use NLP Techniques and Tools in Your Projects [Full Handbook] ]]>
                </title>
                <description>
                    <![CDATA[ Nowadays, computers can comprehend and produce human-like language thanks to Natural Language Processing. And this opens up numerous opportunities for you as a developer. This guide will teach you how to create NLP projects from scratch. It includes ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-nlp-techniques-and-tools-in-your-projects-full-handbook/</link>
                <guid isPermaLink="false">692096d4afb994c2aecc26e9</guid>
                
                    <category>
                        <![CDATA[ nlp ]]>
                    </category>
                
                    <category>
                        <![CDATA[ natural language processing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ handbook ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Machine Learning ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Fri, 21 Nov 2025 16:44:04 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1763743424066/393a4384-ce7a-4ff8-9e98-1edaaa322bc6.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Nowadays, computers can comprehend and produce human-like language thanks to Natural Language Processing. And this opens up numerous opportunities for you as a developer.</p>
<p>This guide will teach you how to create NLP projects from scratch. It includes details on how to organize your workflow, utilize the appropriate tools, and perform typical NLP tasks.</p>
<p>After reading this article, you will understand how to:</p>
<ul>
<li><p>Configure your environment for NLP development.</p>
</li>
<li><p>Select the appropriate frameworks and libraries for your project.</p>
</li>
<li><p>Execute fundamental NLP tasks such as sentiment analysis and text classification.</p>
</li>
<li><p>Create and implement a functional NLP application.</p>
</li>
<li><p>Diagnose and fix common problems in NLP projects.</p>
</li>
</ul>
<p>Before beginning, you should have some basics at hand already. They include a solid understanding of Python programming and knowledge of the general ideas of machine learning. You should also know how to build algorithms and data structures. Finally, your system should have Python 3.8 or higher installed so you can try running the example snippets.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-natural-language-processing">What is Natural Language Processing?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-nlp-systems-interpret-speech">How NLP Systems Interpret Speech</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-typical-nlp-tasks">Typical NLP tasks</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conventional-machine-learning-methods-for-nlp">Conventional Machine Learning Methods for NLP</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-use-nlp-in-various-industries">How to Use NLP in Various Industries</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-choose-the-most-effective-nlp-tools-and-libraries">How to Choose the Most Effective NLP Tools and Libraries</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-prepare-and-train-nlp-systems">How to Prepare and Train NLP systems</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-establishing-and-labeling-datasets">Establishing and Labeling Datasets</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-what-is-natural-language-processing">What is Natural Language Processing?</h2>
<p>NLP (natural language processing) is a set of methodologies that allow computers to learn to comprehend human language and produce relevant outputs. </p>
<p>NLP manages the intricacy of human communication. In contrast to conventional machine learning, which operates with structured data only, NLP handles unstructured text data.</p>
<p>Specifically, to more accurately comprehend language, NLP systems simultaneously analyze the syntax (which is the arrangement of words and grammar), the semantics (the meanings of specific words and phrases), and interpret context (how adjacent information affects meaning). This allows them to differentiate between various interpretations of identical words, grasp implied messages, and produce responses as relevant as possible.</p>
<p>The ability of machines to process language was demonstrated by early experiments such as the Georgetown-IBM translation in 1954 and the ELIZA chatbot in 1966 (Sources: <a target="_blank" href="https://www.mdpi.com/2078-2489/15/8/443">Szmurlo and Akhtar, MDPI; Hutchins, ResearchGate</a>). With today's tools, any developer can access and use the capabilities of NLP tools.</p>
<p>So why is this important for you? In 2025, the market for NLP, which currently powers chatbots, translation software, and content creation platforms, has reached $42.47 billion. (Source: <a target="_blank" href="https://www.precedenceresearch.com/natural-language-processing-market">Precedence Research</a>)</p>
<p>The growth is only accelerating. By 2030, the global NLP market is expected to grow to $439.85 billion. (Source: <a target="_blank" href="https://www.grandviewresearch.com/industry-analysis/natural-language-processing-market-report#:~:text=The%20global%20natural%20language%20processing,38.7%25%20from%202025%20to%202030.">GrandviewResearch</a>). </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762161849212/b2e0b1b5-8b91-4061-a647-2488a7396548.png" alt="NLP market size" class="image--center mx-auto" width="1200" height="630" loading="lazy"></p>
<h3 id="heading-important-nlp-concepts-to-know">Important NLP Concepts to Know</h3>
<p>Five interconnected layers generally make up NLP systems. Every layer addresses a distinct language processing problem. (Source: <a target="_blank" href="https://www.researchgate.net/publication/350058919_Natural_Language_Processing_History_Evolution_Application_and_Future_Work">Khatri and others, ResearchGate).</a></p>
<ul>
<li><p><a target="_blank" href="https://www.researchgate.net/publication/350058919_Natural_Language_Processing_History_Evolution_Application_and_Future_Work"><strong>Analysis of morphology</strong></a> is where you break down words into their most meaningful components by this layer. Words will be broken down into prefixes, roots, and suffixes. For instance, "working" becomes "work" plus "ing." This makes it easier for your system to comprehend word relationships even when they change form.</p>
</li>
<li><p><strong>Analysis of syntactic structure</strong> is where you use grammar rules to determine sentence structure. Here, you construct parse trees that map the grammatical relationships between words. Individual words are represented as leaves, phrases as intermediate nodes, and sentences as roots in the tree.</p>
</li>
<li><p><strong>Analysis of semantics</strong> is where, from the parsed structure, you derive the true meaning.</p>
</li>
<li><p>You deal with synonyms, antonyms, and homophones as well as word ambiguity. This transforms grammatical structure into meaning.</p>
</li>
<li><p><strong>Analysis of</strong> <strong>discourse</strong> is where you connect sentences within longer text structures. You'll observe how ideas flow from one paragraph to the next and spot recurring themes. This connects meaning at the sentence level to meaning at the document level.</p>
</li>
<li><p><strong>Analysis of</strong> <strong>pragmatics</strong> is where you decipher intent and context. You will be able to resolve references, comprehend dialogue structure, and decipher implied meanings. You can process sarcasm, cultural background, and other aspects of everyday communication at this layer.</p>
</li>
</ul>
<p>Understanding these layers gives you the ability to build NLP systems that can manage challenging language tasks in a variety of contexts.</p>
<h2 id="heading-how-nlp-systems-interpret-speech">How NLP Systems Interpret Speech</h2>
<p>NLP systems use a pipeline to convert raw text into computational meaning. Each step builds on its predecessor, allowing for better analysis of unstructured language data. In this section, I’ll provide real snippets of code you can insert into an editor for training.</p>
<h3 id="heading-step-1-text-input">Step 1: Text Input</h3>
<p>To start, your system will take in raw text that can come in various forms. Potential sources for raw input include emails, social media posts, articles, documents, or transcripts of speeches. The raw data will contain misspellings, crude language, and grammatical mistakes you'll need to circumvent.</p>
<h3 id="heading-step-2-text-preprocessing">Step 2: Text Preprocessing</h3>
<p>Next, you’ll need to clean and standardize the input text before your system analyzes it. Your pre-process will likely include some or all of these steps:</p>
<ul>
<li><p>Tokenizing text into single words or subwords</p>
</li>
<li><p>Removing punctuation marks from the text</p>
</li>
<li><p>Lower casing all the text</p>
</li>
<li><p>Removing stop words like "the", "and," and "is."</p>
</li>
</ul>
<p>For example, you can accomplish such a simple form of NLP using Python, but note that you need to import specific libraries (we will discuss them later):</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> nltk
<span class="hljs-keyword">from</span> nltk.corpus <span class="hljs-keyword">import</span> stopwords
<span class="hljs-keyword">from</span> nltk.tokenize <span class="hljs-keyword">import</span> word_tokenize

<span class="hljs-comment"># Download required NLTK data</span>
nltk.download(<span class="hljs-string">'punkt'</span>)
nltk.download(<span class="hljs-string">'stopwords'</span>)

<span class="hljs-comment"># Raw text input</span>
text = <span class="hljs-string">"The quick brown fox jumps over the lazy dog!"</span>

<span class="hljs-comment"># Tokenization</span>
tokens = word_tokenize(text.lower())

<span class="hljs-comment"># Remove punctuation and stop words</span>
stop_words = set(stopwords.words(<span class="hljs-string">'english'</span>))
filtered_tokens = [word <span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">if</span> word.isalnum() <span class="hljs-keyword">and</span> word <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> stop_words]

print(filtered_tokens)
<span class="hljs-comment"># Output: ['quick', 'brown', 'fox', 'jumps', 'lazy', 'dog']</span>
</code></pre>
<h3 id="heading-step-3-syntactic-parsing-and-analysis">Step 3: Syntactic Parsing and Analysis</h3>
<p>After cleaning, you’ll analyze the text’s grammatical structure by constructing parse trees. While parse trees can vary in complexity, they map the relationships between words, phrases, and clauses. You can leverage part-of-speech tagging information to assign grammatical roles (noun, verb, adjective, and so on) to words, and dependency parsing to learn how related words are linked syntactically.</p>
<p>For example, the code below illustrates how to perform part-of-speech tagging with spaCy, which determines the grammatical function of each word within a sentence.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> spacy

<span class="hljs-comment"># Load English language model</span>
nlp = spacy.load(<span class="hljs-string">"en_core_web_sm"</span>)

<span class="hljs-comment"># Process text</span>
doc = nlp(<span class="hljs-string">"The cat sat on the mat"</span>)

<span class="hljs-comment"># Part-of-speech tagging</span>
<span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> doc:
    print(<span class="hljs-string">f"<span class="hljs-subst">{token.text}</span>: <span class="hljs-subst">{token.pos_}</span>"</span>)

<span class="hljs-comment"># Output:</span>
<span class="hljs-comment"># The: DET</span>
<span class="hljs-comment"># cat: NOUN</span>
<span class="hljs-comment"># sat: VERB</span>
<span class="hljs-comment"># on: ADP</span>
<span class="hljs-comment"># the: DET</span>
<span class="hljs-comment"># mat: NOUN</span>
</code></pre>
<h3 id="heading-step-4-feature-engineering-and-text-representation">Step 4: Feature Engineering and Text Representation</h3>
<p>Here, you convert words into numerical vectors that computers can parse using embedding or transformer-based techniques to capture similarities and semantic relationships between terms. For instance, this allows your system to understand that the words "kid" and "child" are similar in meaning.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sentence_transformers <span class="hljs-keyword">import</span> SentenceTransformer

<span class="hljs-comment"># Load pre-trained model</span>
model = SentenceTransformer(<span class="hljs-string">'all-MiniLM-L6-v2'</span>)

<span class="hljs-comment"># Convert sentences to embeddings</span>
sentences = [<span class="hljs-string">"The cat sits on the mat"</span>, <span class="hljs-string">"The feline rests on the rug"</span>]
embeddings = model.encode(sentences)

print(<span class="hljs-string">f"Embedding shape: <span class="hljs-subst">{embeddings.shape}</span>"</span>)
<span class="hljs-comment"># Output: Embedding shape: (2, 384)</span>
</code></pre>
<h3 id="heading-step-5-modeling-and-pattern-recognition">Step 5: Modeling and Pattern Recognition</h3>
<p>In this part of the process, you’ll use machine learning algorithms to identify patterns from vectorized text. You may use either a traditional machine learning representation or one of the deep learning methods, such as transformers. Your models will learn about patterns in the language, classify the content presented, or extract entities in the text.</p>
<p>To understand this method, let’s see a straightforward example of a text classification model that uses transformers to identify sentiments.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Load a pre-trained sentiment analysis model</span>
classifier = pipeline(<span class="hljs-string">"sentiment-analysis"</span>)

<span class="hljs-comment"># Classify text sentiment</span>
texts = [<span class="hljs-string">"I love this product!"</span>, <span class="hljs-string">"This is terrible and disappointing"</span>]
results = classifier(texts)

<span class="hljs-keyword">for</span> text, result <span class="hljs-keyword">in</span> zip(texts, results):
    print(<span class="hljs-string">f"Text: <span class="hljs-subst">{text}</span>"</span>)
    print(<span class="hljs-string">f"Sentiment: <span class="hljs-subst">{result[<span class="hljs-string">'label'</span>]}</span>, Confidence: <span class="hljs-subst">{result[<span class="hljs-string">'score'</span>]:<span class="hljs-number">.2</span>f}</span>\n"</span>)

<span class="hljs-comment"># Output:</span>
<span class="hljs-comment"># Text: I love this product!</span>
<span class="hljs-comment"># Sentiment: POSITIVE, Confidence: 0.99</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Text: This is terrible and disappointing</span>
<span class="hljs-comment"># Sentiment: NEGATIVE, Confidence: 0.99</span>
</code></pre>
<p>This illustrates how the model detects linguistic patterns for sentiment categorization, which is a typical task in NLP. In subsequent sections, we’ll delve into more specialized modeling techniques tailored for various NLP applications.</p>
<h3 id="heading-step-6-evaluation-and-deployment">Step 6: Evaluation and Deployment</h3>
<p>Next, you will evaluate your model from metrics such as precision, recall, and F1 scores. After evaluation, you will deploy your model to production, and the model will continue to learn from data produced from real-world text. Here’s an example of how it’s done:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.metrics <span class="hljs-keyword">import</span> classification_report

<span class="hljs-comment"># Example predictions vs actual labels</span>
y_true = [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>]
y_pred = [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>]

<span class="hljs-comment"># Generate evaluation metrics</span>
print(classification_report(y_true, y_pred))
</code></pre>
<h2 id="heading-typical-nlp-tasks">Typical NLP Tasks</h2>
<h3 id="heading-natural-language-understanding-nlu-tasks">Natural Language Understanding (NLU) tasks</h3>
<p>Natural Language Understanding (NLU) tasks deal with actually understanding what people are communicating about. There are several elements involved in this process.</p>
<h4 id="heading-sentiment-analysis-and-text-classification">Sentiment analysis and text classification</h4>
<p>Here, you recognize and categorize documents according to emotion. Your engine identifies whether the text conveys a positive, negative, or neutral sentiment. Then, it autonomously filters content across digital platforms. Consider this example:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Load sentiment analysis pipeline</span>
classifier = pipeline(<span class="hljs-string">"sentiment-analysis"</span>)

<span class="hljs-comment"># Analyze sentiment</span>
result = classifier(<span class="hljs-string">"I love this product! It works great."</span>)
print(result)
<span class="hljs-comment"># Output: [{'label': 'POSITIVE', 'score': 0.9998}]</span>
</code></pre>
<h4 id="heading-named-entity-recognition-ner">Named Entity Recognition (NER)</h4>
<p>NER is a pipeline that involves automatically identifying and classifying distinct pieces of information within a body of text. This includes names of people, locations, organizations, dates, and monetary figures.</p>
<p>Your NER system analyzes unstructured text to accurately label these entities, converting raw data into a structured format that can be easily analyzed. Your algorithm can also uncover relationships among these entities, allowing you to gain valuable insights from extensive amounts of text.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> spacy

nlp = spacy.load(<span class="hljs-string">"en_core_web_sm"</span>)
doc = nlp(<span class="hljs-string">"Apple Inc. was founded by Steve Jobs in Cupertino, California."</span>)

<span class="hljs-keyword">for</span> ent <span class="hljs-keyword">in</span> doc.ents:
     print(<span class="hljs-string">f"<span class="hljs-subst">{ent.text}</span>: <span class="hljs-subst">{ent.label_}</span>"</span>)

<span class="hljs-comment"># Output:</span>
<span class="hljs-comment"># Apple Inc.: ORG</span>
<span class="hljs-comment"># Steve Jobs: PERSON</span>
<span class="hljs-comment"># Cupertino: GPE</span>
<span class="hljs-comment"># California: GPE</span>
</code></pre>
<h4 id="heading-question-answering">Question answering</h4>
<p>You can create systems that consume natural language questions and retrieve appropriate answers. Your system can also use entailment and contradiction detection to analyze the logical relationships between text blocks. </p>
<h4 id="heading-intent-recognition">Intent recognition</h4>
<p>You can recognize user intentions in conversational domains. Your dialog systems are conscious of the user’s goals, allowing buttons or voices to respond in kind. </p>
<p>Now, let’s move on to some general natural language-related tasks.</p>
<h3 id="heading-general-natural-language-tasks">General Natural Language Tasks</h3>
<p>This class of tasks pulls together some aspects of understanding while dealing with generation as well.</p>
<h4 id="heading-machine-translation">Machine translation</h4>
<p>You can translate text across multiple languages while preserving context and meaning. Neural networks use encoder-decoder architectures to create linguistic outputs in the target language.</p>
<p>Let’s see how it’s done with the MarianMTModel and MarianTokenizer models:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarianMTModel, MarianTokenizer

<span class="hljs-comment"># Load translation model</span>
model_name = <span class="hljs-string">'Helsinki-NLP/opus-mt-en-es'</span>
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)

<span class="hljs-comment"># Translate English to German</span>
text = <span class="hljs-string">"Hello, how are you?"</span>
translated = model.generate(**tokenizer(text, return_tensors=<span class="hljs-string">"pt"</span>, padding=<span class="hljs-literal">True</span>))
print(tokenizer.decode(translated[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))
<span class="hljs-comment"># Output: Hallo, wie geht's dir?</span>
</code></pre>
<h4 id="heading-text-summarization">Text summarization</h4>
<p>Often you’ll need to shorten a long document into a more accessible summary – this is text summarization, and it’s a common NLP task. Your system retains key details and coherence while reducing the length of a document.</p>
<h4 id="heading-speech-recognition-and-text-to-speech">Speech recognition and text-to-speech</h4>
<p>Using these techniques, you can turn speech into text (speech recognition) or text into natural audio (text-to-speech). These tasks close the gap between text and audio modalities. </p>
<h4 id="heading-syntactic-parsing">Syntactic parsing</h4>
<p>Here, you examine the grammatical construction to determine the syntactic relationships between words in the sentence. This critical task gives a structural analysis of the text to support more complex understanding tasks.</p>
<p>These tasks, when combined, create powerful applications for different industries and use cases in Natural Language Processing.</p>
<h2 id="heading-conventional-machine-learning-methods-for-nlp">Conventional Machine Learning Methods for NLP</h2>
<p>Instead of relying on manually created linguistic rules (where programmers specify patterns like "if a word ends with '-ing', it is likely a verb" or "sentences containing 'not' followed by positive words suggest negative sentiment"), ML approaches apply statistical methods to discover patterns automatically within the data.</p>
<p>These methods learn through examples and don’t require human experts to define every potential language structure explicitly. As a result, they are more scalable and adaptable across different languages and fields. Let’s look at some of them now.</p>
<h3 id="heading-logistic-regression">Logistic Regression</h3>
<p>For tasks involving binary classification, you can use logistic regression. Based on input features, it predicts event probability by learning linear decision boundaries. Consider the following example:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.feature_extraction.text <span class="hljs-keyword">import</span> TfidfVectorizer
<span class="hljs-keyword">from</span> sklearn.linear_model <span class="hljs-keyword">import</span> LogisticRegression
<span class="hljs-keyword">from</span> sklearn.model_selection <span class="hljs-keyword">import</span> train_test_split

<span class="hljs-comment"># Sample data</span>
texts = [<span class="hljs-string">"This is spam"</span>, <span class="hljs-string">"Normal email"</span>, <span class="hljs-string">"Buy now!"</span>, <span class="hljs-string">"Meeting tomorrow"</span>]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]  <span class="hljs-comment"># 1 = spam, 0 = not spam</span>

<span class="hljs-comment"># Convert text to features</span>
vectorizer = TfidfVectorizer()
X = vectorizer.fit_transform(texts)

<span class="hljs-comment"># Train model</span>
X_train, X_test, y_train, y_test = train_test_split(X, labels, test_size=<span class="hljs-number">0.25</span>)
model = LogisticRegression()
model.fit(X_train, y_train)

<span class="hljs-comment"># Predict</span>
new_text = vectorizer.transform([<span class="hljs-string">"Free money now"</span>])
prediction = model.predict(new_text)
print(<span class="hljs-string">f"Prediction: <span class="hljs-subst">{<span class="hljs-string">'Spam'</span> <span class="hljs-keyword">if</span> prediction[<span class="hljs-number">0</span>] == <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-string">'Not Spam'</span>}</span>"</span>)
</code></pre>
<p>Typical uses include toxicity classification, sentiment analysis, and spam detection.</p>
<h3 id="heading-naive-bayes">Naive Bayes</h3>
<p>Using the premise that words are independent, <a target="_blank" href="https://www.freecodecamp.org/news/how-naive-bayes-classifiers-work/">Naive Bayes</a> applies <a target="_blank" href="https://www.freecodecamp.org/news/bayes-rule-explained/">Bayes' Theorem</a>.</p>
<p>To classify documents, it computes:</p>
<p>$$P(label|text) = P(label) × P(text|label) / P(text)$$</p><pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.naive_bayes <span class="hljs-keyword">import</span> MultinomialNB
<span class="hljs-keyword">from</span> sklearn.feature_extraction.text <span class="hljs-keyword">import</span> CountVectorizer

<span class="hljs-comment"># Training data</span>
texts = [<span class="hljs-string">"I love this product"</span>, <span class="hljs-string">"Terrible service"</span>, <span class="hljs-string">"Amazing quality"</span>, <span class="hljs-string">"Waste of money"</span>]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]  <span class="hljs-comment"># 1 = positive, 0 = negative</span>

<span class="hljs-comment"># Vectorize text</span>
vectorizer = CountVectorizer()
X = vectorizer.fit_transform(texts)

<span class="hljs-comment"># Train Naive Bayes</span>
clf = MultinomialNB()
clf.fit(X, labels)

<span class="hljs-comment"># Predict sentiment</span>
new_review = vectorizer.transform([<span class="hljs-string">"Great purchase"</span>])
print(<span class="hljs-string">f"Sentiment: <span class="hljs-subst">{<span class="hljs-string">'Positive'</span> <span class="hljs-keyword">if</span> clf.predict(new_review)[<span class="hljs-number">0</span>] == <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-string">'Negative'</span>}</span>"</span>)
</code></pre>
<p>Common uses for this algorithm that you can try are spam detection and bug detection in software.</p>
<h3 id="heading-decision-trees">Decision Trees</h3>
<p>Decision trees partition data sets recursively by choosing the feature that maximizes information gain at each split in a way that builds interpretable, tree-like models. Each internal node is a decision (on a feature), each branch is an outcome of the decision, and each leaf node is a classification.</p>
<p>Decision trees are especially useful for text classification and feature selection because the decision tree allows you to trace exactly how the model made the predicted classification. </p>
<p>Let’s see a code example that shows how the decision tree learns which words, converted to TF-IDF features, predict whether the sentiment of the text in question is positive or negative:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.tree <span class="hljs-keyword">import</span> DecisionTreeClassifier
<span class="hljs-keyword">from</span> sklearn.feature_extraction.text <span class="hljs-keyword">import</span> TfidfVectorizer
<span class="hljs-keyword">from</span> sklearn.model_selection <span class="hljs-keyword">import</span> train_test_split

<span class="hljs-comment"># Sample text data with labels</span>
texts = [
    <span class="hljs-string">"I love this movie, it's fantastic"</span>,
    <span class="hljs-string">"Terrible film, waste of time"</span>,
    <span class="hljs-string">"Amazing performance and great story"</span>,
    <span class="hljs-string">"Boring and disappointing"</span>,
    <span class="hljs-string">"Excellent cinematography and acting"</span>,
    <span class="hljs-string">"Awful, would not recommend"</span>
]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]  <span class="hljs-comment"># 1 = positive, 0 = negative</span>

<span class="hljs-comment"># Convert text to TF-IDF features</span>
vectorizer = TfidfVectorizer(max_features=<span class="hljs-number">20</span>)
X = vectorizer.fit_transform(texts)

<span class="hljs-comment"># Split data</span>
X_train, X_test, y_train, y_test = train_test_split(X, labels, test_size=<span class="hljs-number">0.3</span>, random_state=<span class="hljs-number">42</span>)

<span class="hljs-comment"># Train decision tree</span>
clf = DecisionTreeClassifier(max_depth=<span class="hljs-number">3</span>, random_state=<span class="hljs-number">42</span>)
clf.fit(X_train, y_train)

<span class="hljs-comment"># Make predictions</span>
test_text = [<span class="hljs-string">"This movie is wonderful"</span>]
test_vector = vectorizer.transform(test_text)
prediction = clf.predict(test_vector)

print(<span class="hljs-string">f"Text: <span class="hljs-subst">{test_text[<span class="hljs-number">0</span>]}</span>"</span>)
print(<span class="hljs-string">f"Predicted sentiment: <span class="hljs-subst">{<span class="hljs-string">'Positive'</span> <span class="hljs-keyword">if</span> prediction[<span class="hljs-number">0</span>] == <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-string">'Negative'</span>}</span>"</span>)
print(<span class="hljs-string">f"Model accuracy: <span class="hljs-subst">{clf.score(X_test, y_test):<span class="hljs-number">.2</span>f}</span>"</span>)
</code></pre>
<p>At each node, the decision tree asks a question: "Does the text have a high TF-IDF score for 'wonderful'?" Then the tree will branch accordingly based on the answer to the question until reaching a classification.</p>
<p>One key parameter in the above code is <code>max_depth=3</code> – without it, the tree may become too complex and overfit. The parameter limits the complexity of the tree.</p>
<h3 id="heading-latent-dirichlet-allocation-lda">Latent Dirichlet Allocation (LDA)</h3>
<p>Latent Dirichlet Allocation (LDA) automatically determines thematic structures in large collections of texts by treating documents as probabilistic mixtures of topics, and topics as distributions over words. This discovery approach uses unsupervised learning, which means that no labeled training data are needed to discover structured but hidden themes. LDA is suited for exploratory text analysis and organization of data in significant amounts of text.</p>
<p>Let’s see some code that generates a word frequency matrix from documents. In this code, LDA identifies two underlying topics based on patterns of word co-occurrence, a process that is a type of clustering analysis for text documents.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.decomposition <span class="hljs-keyword">import</span> LatentDirichletAllocation
<span class="hljs-keyword">from</span> sklearn.feature_extraction.text <span class="hljs-keyword">import</span> CountVectorizer

<span class="hljs-comment"># Document collection</span>
documents = [
    <span class="hljs-string">"Machine learning algorithms process data"</span>,
    <span class="hljs-string">"Deep learning uses neural networks"</span>,
    <span class="hljs-string">"Python is great for data science"</span>,
    <span class="hljs-string">"Neural networks learn from examples"</span>
]

<span class="hljs-comment"># Create document-term matrix</span>
vectorizer = CountVectorizer(max_features=<span class="hljs-number">50</span>)
doc_term_matrix = vectorizer.fit_transform(documents)

<span class="hljs-comment"># Train LDA model</span>
lda = LatentDirichletAllocation(n_components=<span class="hljs-number">2</span>, random_state=<span class="hljs-number">42</span>)
lda.fit(doc_term_matrix)

<span class="hljs-comment"># Display topics</span>
feature_names = vectorizer.get_feature_names_out()
<span class="hljs-keyword">for</span> topic_idx, topic <span class="hljs-keyword">in</span> enumerate(lda.components_):
    top_words_idx = topic.argsort()[<span class="hljs-number">-5</span>:]
    top_words = [feature_names[i] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> top_words_idx]
    print(<span class="hljs-string">f"Topic <span class="hljs-subst">{topic_idx}</span>: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(top_words)}</span>"</span>)
</code></pre>
<p>In this illustration, we could interpret Topic 0 as "data science and algorithms," and Topic 1 as "neural networks and deep learning." The LDA model will assign, in a mixed model fashion, a probability distribution of each document falling under the two topics. For instance, a document titled "neural networks for data processing" could be considered 60% Topic 1 and 40% Topic 0.</p>
<h3 id="heading-deep-learning-models">Deep Learning Models</h3>
<p>Deep learning models automatically extract hierarchical representations from raw text without manual feature engineering. Applying deep learning to language processing is important because language understanding requires modeling not just individual words, but also phrases, sentences, and the context as a whole.</p>
<p>A neural architecture achieves this modeling by learning multiple layers of abstraction and can interpret the sentences in more complex ways, such as sentiment, intent, or topic. </p>
<p>Let’s illustrate how it works with an example showing a simplified deep learning model that can be used for text classification using TensorFlow/Keras. This specific example uses an embedding layer to map words to dense vectors that capture their semantic meaning, as well as a Bidirectional LSTM layer which is able to capture information from the past and future of a sequence and outputs to a Dense layer for binary classification.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> tensorflow.keras.models <span class="hljs-keyword">import</span> Sequential
<span class="hljs-keyword">from</span> tensorflow.keras.layers <span class="hljs-keyword">import</span> Embedding, LSTM, Dense
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.text <span class="hljs-keyword">import</span> Tokenizer
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.sequence <span class="hljs-keyword">import</span> pad_sequences

<span class="hljs-comment"># Example sentences and labels</span>
texts = [<span class="hljs-string">"I like this movie"</span>, <span class="hljs-string">"I hate this movie"</span>]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>]  <span class="hljs-comment"># 1 = positive, 0 = negative</span>

<span class="hljs-comment"># Tokenize text and pad sequences</span>
tokenizer = Tokenizer(num_words=<span class="hljs-number">50</span>)
tokenizer.fit_on_texts(texts)
X = pad_sequences(tokenizer.texts_to_sequences(texts), maxlen=<span class="hljs-number">5</span>)

<span class="hljs-comment"># Simple model: embedding + LSTM + output</span>
model = Sequential([
    Embedding(input_dim=<span class="hljs-number">50</span>, output_dim=<span class="hljs-number">8</span>, input_length=<span class="hljs-number">5</span>),
    LSTM(<span class="hljs-number">4</span>),
    Dense(<span class="hljs-number">1</span>, activation=<span class="hljs-string">'sigmoid'</span>)
])

model.compile(optimizer=<span class="hljs-string">'adam'</span>, loss=<span class="hljs-string">'binary_crossentropy'</span>)
model.fit(X, labels, epochs=<span class="hljs-number">5</span>, verbose=<span class="hljs-number">0</span>)

<span class="hljs-comment"># Predict sentiment for new sentence</span>
test_text = [<span class="hljs-string">"I love this"</span>]
test_seq = pad_sequences(tokenizer.texts_to_sequences(test_text), maxlen=<span class="hljs-number">5</span>)
pred = model.predict(test_seq)[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]

print(<span class="hljs-string">f"Sentiment score: <span class="hljs-subst">{pred:<span class="hljs-number">.2</span>f}</span> (1=positive, 0=negative)"</span>)
</code></pre>
<p>The model learns these patterns from example sentences that have been labeled as positive or negative and then uses those learned patterns to predict the sentiment of new text input. This is an example of how deep learning models learn to automatically represent the text that is processed and then use that representation to interpret sequences of text for classification purposes, without any feature engineering.</p>
<h3 id="heading-convolutional-neural-networks-cnns">Convolutional Neural Networks (CNNs)</h3>
<p>CNNs apply the same pattern-detecting framework to the text as they do to image recognition. CNNs see documents as sequences, and when a convolutional filter is applied across the text, it detects patterns for various types of features, such as n-grams (sequences of symbols that are adjacent to one another), and meaningful phrases.</p>
<p>CNNs encompass multi-filter layers to detect different features. Each filter layer detects features that are continuously more abstract, going from simple combinations of words to capturing combinations of words that are consistently used in semantic patterns, creating an effective use for the text classification task. (Source: <a target="_blank" href="https://arxiv.org/abs/1408.5882">Yoon Kim</a>)</p>
<p>Here is an example of the convolutional layer scanning through the text using filters. It detects meaningful patterns established through previous learning, such as the word "excellent" or "terrible waste," learning to treat each combination of words as expressing a positive or negative sentiment during a final classification step.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-keyword">from</span> tensorflow.keras.layers <span class="hljs-keyword">import</span> Embedding, Conv1D, GlobalMaxPooling1D, Dense
<span class="hljs-keyword">from</span> tensorflow.keras.models <span class="hljs-keyword">import</span> Sequential
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.text <span class="hljs-keyword">import</span> Tokenizer
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.sequence <span class="hljs-keyword">import</span> pad_sequences

<span class="hljs-comment"># Sample training data</span>
texts = [
    <span class="hljs-string">"This movie is excellent and entertaining"</span>,
    <span class="hljs-string">"Terrible film, complete waste"</span>,
    <span class="hljs-string">"Amazing story and great acting"</span>,
    <span class="hljs-string">"Boring and poorly made"</span>
]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]  <span class="hljs-comment"># 1 = positive, 0 = negative</span>

<span class="hljs-comment"># Tokenize and pad sequences</span>
tokenizer = Tokenizer(num_words=<span class="hljs-number">100</span>)
tokenizer.fit_on_texts(texts)
sequences = tokenizer.texts_to_sequences(texts)
X = pad_sequences(sequences, maxlen=<span class="hljs-number">10</span>)

<span class="hljs-comment"># Build CNN model</span>
model = Sequential([
    Embedding(input_dim=<span class="hljs-number">100</span>, output_dim=<span class="hljs-number">32</span>, input_length=<span class="hljs-number">10</span>),  <span class="hljs-comment"># Convert words to dense vectors</span>
    Conv1D(filters=<span class="hljs-number">64</span>, kernel_size=<span class="hljs-number">3</span>, activation=<span class="hljs-string">'relu'</span>),  <span class="hljs-comment"># Detect 3-word patterns</span>
    GlobalMaxPooling1D(),  <span class="hljs-comment"># Extract most important features</span>
    Dense(<span class="hljs-number">1</span>, activation=<span class="hljs-string">'sigmoid'</span>)  <span class="hljs-comment"># Binary classification</span>
])

model.compile(optimizer=<span class="hljs-string">'adam'</span>, loss=<span class="hljs-string">'binary_crossentropy'</span>, metrics=[<span class="hljs-string">'accuracy'</span>])
model.fit(X, labels, epochs=<span class="hljs-number">10</span>, verbose=<span class="hljs-number">0</span>)

<span class="hljs-comment"># Test prediction</span>
test_text = [<span class="hljs-string">"wonderful movie with great plot"</span>]
test_seq = tokenizer.texts_to_sequences(test_text)
test_pad = pad_sequences(test_seq, maxlen=<span class="hljs-number">10</span>)
prediction = model.predict(test_pad)

print(<span class="hljs-string">f"Sentiment probability: <span class="hljs-subst">{prediction[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]:<span class="hljs-number">.2</span>f}</span>"</span>)
print(<span class="hljs-string">f"Classification: <span class="hljs-subst">{<span class="hljs-string">'Positive'</span> <span class="hljs-keyword">if</span> prediction[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>] &gt; <span class="hljs-number">0.5</span> <span class="hljs-keyword">else</span> <span class="hljs-string">'Negative'</span>}</span>"</span>)
</code></pre>
<p>The pooling layer analyzes this filtered text and brings forth the most substantial signals for measuring positive versus negative sentiments from the convolutional text features of the previous steps.</p>
<h3 id="heading-recurrent-neural-networks-rnns">Recurrent Neural Networks (RNNs)</h3>
<p>RNNs handle sequential data by tracking hidden states that reflect dependencies over time. At each time step, the RNN receives the current word and the previous hidden state as input and changes the hidden state, which reflects the accumulated context. </p>
<p>Here's a concrete example where, as the RNN reads the next word from left to right, it updates its hidden state to maintain the context. </p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-keyword">from</span> tensorflow.keras.layers <span class="hljs-keyword">import</span> Embedding, SimpleRNN, Dense
<span class="hljs-keyword">from</span> tensorflow.keras.models <span class="hljs-keyword">import</span> Sequential
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.text <span class="hljs-keyword">import</span> Tokenizer
<span class="hljs-keyword">from</span> tensorflow.keras.preprocessing.sequence <span class="hljs-keyword">import</span> pad_sequences

<span class="hljs-comment"># Training data</span>
texts = [
    <span class="hljs-string">"I really enjoyed this book"</span>,
    <span class="hljs-string">"The plot was confusing and dull"</span>,
    <span class="hljs-string">"Fantastic read, highly recommend"</span>,
    <span class="hljs-string">"Disappointing and poorly written"</span>
]
labels = [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]

<span class="hljs-comment"># Prepare data</span>
tokenizer = Tokenizer(num_words=<span class="hljs-number">100</span>)
tokenizer.fit_on_texts(texts)
sequences = tokenizer.texts_to_sequences(texts)
X = pad_sequences(sequences, maxlen=<span class="hljs-number">10</span>)

<span class="hljs-comment"># Build RNN model</span>
model = Sequential([
    Embedding(input_dim=<span class="hljs-number">100</span>, output_dim=<span class="hljs-number">32</span>, input_length=<span class="hljs-number">10</span>),
    SimpleRNN(units=<span class="hljs-number">64</span>, return_sequences=<span class="hljs-literal">False</span>),  <span class="hljs-comment"># Process sequence and maintain hidden state</span>
    Dense(<span class="hljs-number">1</span>, activation=<span class="hljs-string">'sigmoid'</span>)
])

model.compile(optimizer=<span class="hljs-string">'adam'</span>, loss=<span class="hljs-string">'binary_crossentropy'</span>, metrics=[<span class="hljs-string">'accuracy'</span>])
model.fit(X, labels, epochs=<span class="hljs-number">20</span>, verbose=<span class="hljs-number">0</span>)

<span class="hljs-comment"># Test</span>
test_text = [<span class="hljs-string">"amazing story highly engaging"</span>]
test_seq = tokenizer.texts_to_sequences(test_text)
test_pad = pad_sequences(test_seq, maxlen=<span class="hljs-number">10</span>)
prediction = model.predict(test_pad)

print(<span class="hljs-string">f"Sentiment probability: <span class="hljs-subst">{prediction[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]:<span class="hljs-number">.2</span>f}</span>"</span>)
</code></pre>
<p>Longer sentences are more complex because the information contained in the hidden state is lost over an ever-increasing number of time steps. That's the motivation for the more sophisticated architectures of long short-term memory (LSTM) and gated recurrent unit (GRU).</p>
<h3 id="heading-encoder-decoder-architectures">Encoder-Decoder Architectures</h3>
<p>These architectures have two neural networks which work together. The first encoder neural network takes the input text and reduces it to a dense, fixed-size representation but encodes the essential meaning. Then a second decoder network generates an output text based on the meaning representation.</p>
<p>These architectures learn a compressed representation of the input data, and they are often used for:</p>
<ul>
<li><p>Dimensionality reductions.</p>
</li>
<li><p>Feature learning.</p>
</li>
<li><p>Document clustering.</p>
</li>
<li><p>Sequence-to-sequence tasks (for example, translations or summarizations).</p>
</li>
</ul>
<p>The following example illustrates how to use a Text-to-Text Transfer Transformer (T5) encoder-decoder model to translate English into German. The encoder takes the input English sentence and builds its internal representation of the text, while the decoder generates the German translation based on the representation:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> T5Tokenizer, T5ForConditionalGeneration

<span class="hljs-comment"># Load T5 model for text generation</span>
tokenizer = T5Tokenizer.from_pretrained(<span class="hljs-string">"t5-small"</span>)
model = T5ForConditionalGeneration.from_pretrained(<span class="hljs-string">"t5-small"</span>)

<span class="hljs-comment"># Translate text</span>
input_text = <span class="hljs-string">"translate English to German: Hello, how are you?"</span>
input_ids = tokenizer(input_text, return_tensors=<span class="hljs-string">"pt"</span>).input_ids

<span class="hljs-comment"># Generate translation</span>
outputs = model.generate(input_ids)
translation = tokenizer.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
print(<span class="hljs-string">f"Translation: <span class="hljs-subst">{translation}</span>"</span>)
</code></pre>
<p>This architecture solves the issue of variable-length input and output in a very elegant way. The encoding neural network reduces the sentence to a fixed-size representation regardless of the input length. Subsequently, the decoder generates an output for whatever length it determines is appropriate based on the input length, whether it’s one sentence or six sentences.</p>
<h3 id="heading-transformer-models">Transformer Models</h3>
<p>Unlike RNNs, in which text is processed sequentially (one word at a time), transformers use a processing mechanism that evaluates the sequence in parallel. This means that the transformer can simultaneously consider all of the words in a sentence and directly compute relationships between any two words, even apart in distance.</p>
<p>In the example below, "The girl didn't go to school because she was ill," the model directly connects "she" with "girl" despite other words between these two. This brings a faster ability to train on information and helps avoid the degradation of information through time steps. (Source: <a target="_blank" href="https://papers.neurips.cc/paper/7181-attention-is-all-you-need.pdf">Vaswani and others).</a></p>
<p>In the example, BERT, one of the most well-known transformer models, performs sentiment classification on a text. Here’s how the transformer justifies text classification by understanding pre-trained language and only using minimal additional training:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertTokenizer, BertForSequenceClassification
<span class="hljs-keyword">import</span> torch

<span class="hljs-comment"># Load pre-trained BERT</span>
tokenizer = BertTokenizer.from_pretrained(<span class="hljs-string">'bert-base-uncased'</span>)
model = BertForSequenceClassification.from_pretrained(<span class="hljs-string">'bert-base-uncased'</span>)

<span class="hljs-comment"># Prepare input</span>
text = <span class="hljs-string">"This movie was fantastic!"</span>
inputs = tokenizer(text, return_tensors=<span class="hljs-string">"pt"</span>, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Get predictions</span>
<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=<span class="hljs-number">-1</span>)

print(<span class="hljs-string">f"Prediction scores: <span class="hljs-subst">{predictions}</span>"</span>)
</code></pre>
<p>In the above code, the tokenizer converts the sequence of text into numerical tokens (which BERT understands) and special tokens, such as [CLS] (for classification), at the beginning of the list of tokens. BERT then models the entire length of the sentence using multiple layers, where each layer is able to learn abstract representations of meaning in each layer.</p>
<h2 id="heading-how-to-use-nlp-in-various-industries">How to Use NLP in Various Industries</h2>
<p>You can use NLP to solve issues in almost any sector, and there are many sector-specific implementations. You can choose to try the snippets below depending on the area you’re most interested in.</p>
<h3 id="heading-tourism-and-hospitality">Tourism and Hospitality</h3>
<p>You can use NLP techniques to build intelligent booking systems that comprehend natural language requests from clients. Important uses you can apply:</p>
<ul>
<li><p><strong>Sentiment analysis</strong> monitors consumer feedback to spot patterns in satisfaction and problems with customer service.</p>
</li>
<li><p><strong>NER-enabled chatbots</strong> retrieve dates and locations from consumer inquiries such as "I need a flight to Paris next Tuesday."</p>
</li>
</ul>
<p>Here’s an example:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Load NER model</span>
ner = pipeline(<span class="hljs-string">"ner"</span>, grouped_entities=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Extract booking information</span>
query = <span class="hljs-string">"I need a hotel in London from December 15 to December 20"</span>
entities = ner(query)

<span class="hljs-keyword">for</span> entity <span class="hljs-keyword">in</span> entities:
    print(<span class="hljs-string">f"<span class="hljs-subst">{entity[<span class="hljs-string">'entity_group'</span>]}</span>: <span class="hljs-subst">{entity[<span class="hljs-string">'word'</span>]}</span>"</span>)
<span class="hljs-comment"># Output: LOC: London</span>
</code></pre>
<p>Through machine translation, you can provide multilingual support to your customers in various languages. And an intent classification model based on BERT automatically identifies how to route your customers for service or makes bookings automatically for them.</p>
<h3 id="heading-logistics-and-supply-chain">Logistics and Supply Chain</h3>
<p>You can automate document processing via NLP and optimize delivery routing using predictive algorithms. Let’s see the common areas of application:</p>
<ul>
<li><strong>You can use OCR to process documents</strong> to automatically extract shipping information from invoices and customs forms. Here’s an example:</li>
</ul>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> pytesseract
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-comment"># Extract text from shipping document</span>
image = Image.open(<span class="hljs-string">'invoice.png'</span>)
text = pytesseract.image_to_string(image)

<span class="hljs-comment"># Parse extracted information</span>
<span class="hljs-comment"># (Add parsing logic based on document structure)</span>
</code></pre>
<ul>
<li><p><strong>Text classification</strong> can place shipments into categories based on descriptions, allowing for recursive sorting of shipments for transport.</p>
</li>
<li><p><strong>Predictive routing models</strong> can use historical delivery data and weather reports to create delivery schedules.</p>
</li>
<li><p><strong>Natural Language Generation</strong> takes technical data across logistics to create user-friendly tracking updates.</p>
</li>
</ul>
<h3 id="heading-retail-and-ecommerce">Retail and eCommerce</h3>
<p>Within the eCommerse operations, you can personalize your customers’ shopping experience and optimize pricing with NLP techniques.</p>
<p>Some key applications that you can benefit from:</p>
<ul>
<li><strong>Recommendation engines</strong> utilize word embeddings to learn product descriptions and corresponding user reviews to suggest relevant items. Here’s how, for instance:</li>
</ul>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sentence_transformers <span class="hljs-keyword">import</span> SentenceTransformer, util

<span class="hljs-comment"># Load embedding model</span>
model = SentenceTransformer(<span class="hljs-string">'all-MiniLM-L6-v2'</span>)

<span class="hljs-comment"># Product descriptions</span>
products = [
    <span class="hljs-string">"Wireless Bluetooth headphones with noise cancellation"</span>,
    <span class="hljs-string">"USB-C charging cable for smartphones"</span>,
    <span class="hljs-string">"Noise-cancelling earbuds with long battery life"</span>
]

<span class="hljs-comment"># User query</span>
query = <span class="hljs-string">"I need headphones that block outside noise"</span>

<span class="hljs-comment"># Calculate similarities</span>
query_embedding = model.encode(query)
product_embeddings = model.encode(products)
similarities = util.cos_sim(query_embedding, product_embeddings)

<span class="hljs-comment"># Find best match</span>
best_match_idx = similarities.argmax()
print(<span class="hljs-string">f"Recommended product: <span class="hljs-subst">{products[best_match_idx]}</span>"</span>)
</code></pre>
<ul>
<li><p><strong>Chatbots that include dialogue management</strong> can respond to inquiries from customers about products, orders, and returns.</p>
</li>
<li><p><strong>Sentiment analysis</strong> on social media tracks brand health and customer sentiment in real-time. </p>
</li>
<li><p><strong>Price optimization algorithms</strong> analyze competitors' pricing and market signals to change prices in real-time.</p>
</li>
<li><p><strong>Demand forecasting</strong> analyzes news and social sentiment to predict inventory needs.</p>
</li>
</ul>
<h3 id="heading-healthcare">Healthcare</h3>
<p>Healthcare, with the great amount of data from patient records, is a natural area for NLP to optimize. You can support clinical decision-making and process medical records using specialized NLP systems. </p>
<p>Here are a few of the possible uses and an example:</p>
<ul>
<li><strong>Clinical NER</strong> identifies conditions, medications, and treatments mentioned in the clinicians' notes within electronic health records. For instance:</li>
</ul>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> spacy

<span class="hljs-comment"># Load medical NER model (requires installation of scispacy)</span>
<span class="hljs-comment"># pip install scispacy</span>
<span class="hljs-comment"># pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/en_core_sci_sm-0.5.1.tar.gz</span>

nlp = spacy.load(<span class="hljs-string">"en_core_sci_sm"</span>)

<span class="hljs-comment"># Process clinical note</span>
text = <span class="hljs-string">"Patient presents with hypertension and type 2 diabetes. Prescribed metformin 500mg."</span>
doc = nlp(text)

<span class="hljs-keyword">for</span> ent <span class="hljs-keyword">in</span> doc.ents:
    print(<span class="hljs-string">f"<span class="hljs-subst">{ent.text}</span>: <span class="hljs-subst">{ent.label_}</span>"</span>)
</code></pre>
<ul>
<li><p><strong>Clinical decision support systems</strong> scan descriptions of symptoms and provide suggestions for potential diagnoses to help a physician's decision-making.</p>
</li>
<li><p><strong>Literature mining</strong> scans clinical studies and identifies new treatment patterns or potential drug discovery targets.</p>
</li>
</ul>
<p>Of course, NLP can also be used in patient assistance chatbots, as they can comprehend natural language and its nuances.</p>
<h3 id="heading-financial-services">Financial Services</h3>
<p>In the finance sector, there are unique bottlenecks you might face. Financial data security gaps and the risks of fraud are among the most threatening ones, as well as the regulatory fines that come with these issues.</p>
<p>With NLP, you can improve security mechanisms and create systems for detecting fraud. </p>
<p>You can also detect phishing attacks with high accuracy with ML classifiers and NLP using CNNs and RNNs combined. (Source: <a target="_blank" href="https://www.researchgate.net/publication/385251725_ScienceDirect_Advancements_of_SMS_Spam_Detection_A_Comprehensive_Survey_of_NLP_and_ML_Techniques">Saidat and others, ResearchGate).</a></p>
<p>Some other use cases include:</p>
<ul>
<li><p><strong>Document analysis processes loans</strong> applications/contract to assess credit risk by automated analysis of documents. </p>
</li>
<li><p><strong>Fraud detection systems analyze transaction data</strong> and communication dat to identify suspicious activity. For example:</p>
</li>
</ul>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-comment"># Load zero-shot classification model</span>
classifier = pipeline(<span class="hljs-string">"zero-shot-classification"</span>)

<span class="hljs-comment"># Analyze transaction description</span>
description = <span class="hljs-string">"Wire transfer to offshore account for investment opportunity"</span>
candidate_labels = [<span class="hljs-string">"legitimate transaction"</span>, <span class="hljs-string">"potential fraud"</span>, <span class="hljs-string">"suspicious activity"</span>]

result = classifier(description, candidate_labels)
print(<span class="hljs-string">f"Classification: <span class="hljs-subst">{result[<span class="hljs-string">'labels'</span>][<span class="hljs-number">0</span>]}</span> (Score: <span class="hljs-subst">{result[<span class="hljs-string">'scores'</span>][<span class="hljs-number">0</span>]:<span class="hljs-number">.4</span>f}</span>)"</span>)
</code></pre>
<ul>
<li><p><strong>Automated compliance monitoring</strong> scans messages for adherence with regulations.</p>
</li>
<li><p><strong>Robo-advisors leverage natural language interfaces</strong> to engage with clients while providing investment advice.</p>
</li>
</ul>
<p>Apart from these uses, conventional chatbots also provide assistance by using NLP techniques. OCR algorithms are widely used for document analysis – but we’ve mentioned those other use cases, so we won’t discuss them further here.</p>
<h3 id="heading-legal-industry-and-compliance-regulations">Legal Industry and Compliance Regulations</h3>
<p>Even more than financial services, the legal sector depends on strict requirements, laws, and regulations. NLP techniques can help you improve safety, security, and efficiency in processing legal documents.</p>
<p>Key examples of how it can be applied:</p>
<ul>
<li><p><strong>Multimodal authentication</strong> is a secure identity verification process consisting of a combination of facial recognition, voice recognition, and natural language processing.</p>
</li>
<li><p><strong>Speaker recognition</strong> uses automatic speech-to-text encoding and intent recognition to process a verbal response to security questions.</p>
</li>
<li><p><strong>Contract analysis</strong> scans legal documents to identify key terms, deliverables, and dates, extracting that information automatically. As an example, you can try the following snippet with the spaCy library installed:</p>
</li>
</ul>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> spacy

nlp = spacy.load(<span class="hljs-string">"en_core_web_sm"</span>)

<span class="hljs-comment"># Extract dates and obligations from contract</span>
contract_text = <span class="hljs-string">"The agreement shall commence on January 1, 2026 and continue for a period of 12 months."</span>
doc = nlp(contract_text)

<span class="hljs-keyword">for</span> ent <span class="hljs-keyword">in</span> doc.ents:
    <span class="hljs-keyword">if</span> ent.label_ <span class="hljs-keyword">in</span> [<span class="hljs-string">"DATE"</span>, <span class="hljs-string">"CARDINAL"</span>]:
        print(<span class="hljs-string">f"<span class="hljs-subst">{ent.label_}</span>: <span class="hljs-subst">{ent.text}</span>"</span>)
</code></pre>
<ul>
<li><strong>Compliance monitoring</strong> looks for possible regulatory infractions in legal communications.</li>
</ul>
<p>These real-world examples show how NLP can be used to solve practical business issues and boost operational effectiveness. You can modify the samples to your case or discover other potential uses, but these are the most widespread ones for you to try.</p>
<h2 id="heading-how-to-choose-the-most-effective-nlp-tools-and-libraries">How to Choose the Most Effective NLP Tools and Libraries</h2>
<p>There is a great variety of tools and libraries that can help you learn how to use NLP or that you can use to implement NLP into a project. You should select the appropriate tools considering your project needs and background in the associated technologies.</p>
<p>Below are some popular tools you can choose to learn or check out, along with tips about when they’re most useful.</p>
<h3 id="heading-hugging-face-transformershttpshuggingfacecodocstransformersenindex"><a target="_blank" href="https://huggingface.co/docs/transformers/en/index">Hugging Face Transformers</a></h3>
<p>Hugging Face Transformers has thousands of pre-trained models for text generation, classification, and question answering. It gives you more than 100 languages supported and is compatible with PyTorch and TensorFlow.</p>
<p>It also provides model hosting and datasets, and allows collaboration with community members. It will assist you with deep learning NLP applications that require top-notch software to implement the algorithms. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762166821354/51df5644-2713-46c8-b24d-e0d7a51bd61d.png" alt="Hugging Face" class="image--center mx-auto" width="1200" height="630" loading="lazy"></p>
<h3 id="heading-nltkhttpswwwnltkorg-natural-language-toolkit"><a target="_blank" href="https://www.nltk.org/">NLTK</a> (Natural Language Toolkit)</h3>
<p>NLTK is the primary package in Python for education and research concerning NLP. Developed at the University of Pennsylvania, it provides extensive packages for your tokenizers, stemmers, parsers, and semantic reasoning. It’s a great choice if you need to get learning concepts in NLP or conduct research projects. </p>
<h3 id="heading-spacyhttpsspacyio"><a target="_blank" href="https://spacy.io/">spaCy</a></h3>
<p>spaCy is a Python library developed to be production-ready, and has the fastest syntactic parser. It’s constructed using Cython for optimal performance and offers excellent named entity recognition. It will fit well if you need strong dependency parsing and a developer-friendly API. It’s easy for you to use spaCy for quick prototyping.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762166854654/b563410d-b978-498a-a52e-9e6bc58f732c.png" alt="SpaCy" class="image--center mx-auto" width="1200" height="630" loading="lazy"></p>
<h3 id="heading-google-cloud-nlphttpscloudgooglecomnatural-language"><a target="_blank" href="https://cloud.google.com/natural-language">Google Cloud NLP</a></h3>
<p>Google Cloud NLP also offers enterprise-level API services. It will fit your project if you need sentiment analysis, entity recognition, syntax analysis, automatic language identification, and simple, trouble-free scaling. And if you’re already in the Google Cloud ecosystem working with big volumes of customer feedback, it’s just what you need.</p>
<h3 id="heading-amazon-comprehendhttpsawsamazoncomcomprehend"><a target="_blank" href="https://aws.amazon.com/comprehend/">Amazon Comprehend</a></h3>
<p>Comprehend is a fully-managed service from AWS for text analysis in the cloud. It supports the major functions you might want to cover: sentiment analysis, entity recognition, topic modeling, built-in protection of personally identifiable information (PII), and auto-scaling. And it’s perfect if you need a built-in integration with the AWS suite.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762167136170/6cc6a502-adbc-401f-a9e7-957d7facbe0c.png" alt="Amazon Comprehend" class="image--center mx-auto" width="1200" height="630" loading="lazy"></p>
<h3 id="heading-ibm-watsonhttpswwwibmcomdocsenwatsonxsaastopicscripts-watson-natural-language-processing"><a target="_blank" href="https://www.ibm.com/docs/en/watsonx/saas?topic=scripts-watson-natural-language-processing">IBM Watson</a></h3>
<p>Watson has NLP models specific to regulated industries (healthcare, finance, and so on). Its library offers pre-trained models in 20 programming languages. Its top features you can use are strong data controls, reliable REST API access, and truly compliance-ready outputs. These makes this tool a great choice if you’re in healthcare, finance, or legal industries.</p>
<h3 id="heading-textblobhttpstextblobreadthedocsio"><a target="_blank" href="https://textblob.readthedocs.io/">TextBlob</a></h3>
<p>TextBlob is a simplified library that’s a great option if you’re a beginner. It’s a user-friendly Python library for common NLP tasks. For your convenience, it offers a simplified API design, but still provides decent sentiment analysis, translation, spelling correction, and noun phrase extraction. Apart from beginner projects, it will fit your quick prototypes creation needs.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762167252639/9961064e-1311-4423-bb6c-57aa15b11fc4.png" alt="TextBlob" class="image--center mx-auto" width="1200" height="630" loading="lazy"></p>
<h2 id="heading-how-to-prepare-and-train-nlp-systems">How to Prepare and Train NLP Systems</h2>
<p>As you get ready to train your NLP model, you’ll need to prepare your data accurately to ensure its quality doesn’t hinder the outputs. Remember that poor quality data results in a poor performing model, so you’ll want to make sure you have solid data.</p>
<h3 id="heading-understanding-data-quality-and-preprocessing">Understanding Data Quality and Preprocessing</h3>
<p>Raw text data is messy and unstructured. It contains typos, slang, and irrelevant information that degrades the performance of your model. </p>
<p>Preprocessing is the operation that takes messy data and converts it into clean, structured text that models can accept as input. </p>
<p>Research shows that 85.4% of NLP research studies utilized some sort of restructuring/preprocessing to allow NLP models to process raw text. The key data quality components that were essential included accuracy (68.3%), relevance (34.1%) and comparability (31.7%). (Source: <a target="_blank" href="https://pmc.ncbi.nlm.nih.gov/articles/PMC10476151/">Nesca and others, NCBI).</a></p>
<p>Preprocessing comes down to a specific list of tasks you’ll need to perform. Let’s break them down.</p>
<h3 id="heading-text-cleaning">Text Cleaning</h3>
<p>Text cleaning is the process of standardizing the text format by removing anything that may affect model training. Raw text often contains extra elements (HTML tags, URLs, special characters, inconsistent use of capitalization, and excess whitespace) that add noise to your data.</p>
<p>The following example shows a cleaning pipeline that removes the above-mentioned elements. This function performs multiple steps of text cleaning:</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> re

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">clean_text</span>(<span class="hljs-params">text</span>):</span>
    <span class="hljs-comment"># Convert to lowercase</span>
    text = text.lower()

    <span class="hljs-comment"># Remove HTML tags</span>
    text = re.sub(<span class="hljs-string">r'&lt;[^&gt;]+&gt;'</span>, <span class="hljs-string">''</span>, text)    

    <span class="hljs-comment"># Remove URLs</span>
    text = re.sub(<span class="hljs-string">r'http\S+|www.\S+'</span>, <span class="hljs-string">''</span>, text)    

    <span class="hljs-comment"># Remove special characters and numbers</span>
    text = re.sub(<span class="hljs-string">r'[^a-zA-Z\s]'</span>, <span class="hljs-string">''</span>, text)    

    <span class="hljs-comment"># Remove extra whitespace</span>
    text = <span class="hljs-string">' '</span>.join(text.split())    

    <span class="hljs-keyword">return</span> text

<span class="hljs-comment"># Example</span>
raw_text = <span class="hljs-string">"Check out https://example.com! It's &lt;b&gt;AMAZING&lt;/b&gt; :-)"</span>
cleaned = clean_text(raw_text)
print(cleaned)
<span class="hljs-comment"># Output: check out its amazing</span>
</code></pre>
<p>The first step the model made was to convert everything to lower case for uniformity. Then it used regular expressions to parse the text to remove HTML tags, URLs, special characters, and numbers. Finally, it normalized whitespace by splitting and joining the text back together. The output is clean text, in a standardized format you can use for tokenization.</p>
<h3 id="heading-tokenization">Tokenization</h3>
<p>The next step is to divide the text into smaller digestible chunks that are easier for ML models to understand. These chunks are known as tokens.</p>
<p>Tokenization comes in three varieties:</p>
<ul>
<li><p><strong>Word tokenization</strong> separates text according to punctuation and whitespace.</p>
</li>
<li><p><strong>Sentence tokenization</strong> uses punctuation cues to divide text into sentences.</p>
</li>
<li><p><strong>Subword tokenization</strong> breaks words up into more manageable chunks.</p>
</li>
</ul>
<p>The example below addresses examples of word and sentence tokenizing by using NLTK (Natural Language Toolkit). </p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> nltk.tokenize <span class="hljs-keyword">import</span> word_tokenize, sent_tokenize

text = <span class="hljs-string">"Natural language processing is exciting! It helps computers understand text."</span>

<span class="hljs-comment"># Word tokenization</span>
words = word_tokenize(text)
print(<span class="hljs-string">f"Words: <span class="hljs-subst">{words}</span>"</span>)

<span class="hljs-comment"># Sentence tokenization</span>
sentences = sent_tokenize(text)
print(<span class="hljs-string">f"Sentences: <span class="hljs-subst">{sentences}</span>"</span>)
</code></pre>
<p>Notice that after word tokenization was performed, the punctuation marks '!' or '.' were considered individual tokens, as punctuation conveys meaning. Sentence tokenization correctly identified the boundaries of the two sentences, and despite the presence of an exclamation mark, it indicated that it had more complex rules beyond just splitting based on periods.</p>
<h3 id="heading-stop-word-removal">Stop Word Removal</h3>
<p>Here, you reduce the text to the meaning without any extra details. You can do this by removing the commonly used words that have little semantic value – the “stop words”. </p>
<p>Common stop words include articles, prepositions, pronouns, auxiliary verbs and conjunctions. Here’s how to do it:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> nltk.corpus <span class="hljs-keyword">import</span> stopwords
<span class="hljs-keyword">from</span> nltk.tokenize <span class="hljs-keyword">import</span> word_tokenize

nltk.download(<span class="hljs-string">'stopwords'</span>)

text = <span class="hljs-string">"The quick brown fox jumps over the lazy dog"</span>
tokens = word_tokenize(text.lower())

stop_words = set(stopwords.words(<span class="hljs-string">'english'</span>))
filtered_tokens = [word <span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">if</span> word <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> stop_words]

print(<span class="hljs-string">f"Original: <span class="hljs-subst">{tokens}</span>"</span>)
print(<span class="hljs-string">f"Filtered: <span class="hljs-subst">{filtered_tokens}</span>"</span>)
<span class="hljs-comment"># Output: ['quick', 'brown', 'fox', 'jumps', 'lazy', 'dog']</span>
</code></pre>
<h3 id="heading-stemming-and-lemmatization">Stemming and Lemmatization</h3>
<p>In this next step, you’ll process the text further by reducing words to their root form. This will treat words with similar variations as a single token.</p>
<ul>
<li><p>To be precise, <strong>stemming is simply using heuristic rules</strong> that remove the endings of words. For example (running|runs|run) → run.</p>
</li>
<li><p><strong>Lemmatization uses morphological analysis</strong> and vocabulary. For example, (children|mice) → child|mouse.</p>
</li>
</ul>
<p>Lemmatization typically gives better, more accurate outcomes (but calls for more computation at the same time).</p>
<p>Here’s how you can apply both:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> nltk.stem <span class="hljs-keyword">import</span> PorterStemmer, WordNetLemmatizer

stemmer = PorterStemmer()
lemmatizer = WordNetLemmatizer()

words = [<span class="hljs-string">"running"</span>, <span class="hljs-string">"runs"</span>, <span class="hljs-string">"ran"</span>, <span class="hljs-string">"children"</span>, <span class="hljs-string">"better"</span>]

print(<span class="hljs-string">"Stemming:"</span>)
<span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> words:
    print(<span class="hljs-string">f"<span class="hljs-subst">{word}</span> -&gt; <span class="hljs-subst">{stemmer.stem(word)}</span>"</span>)

print(<span class="hljs-string">"\nLemmatization:"</span>)
<span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> words:
    print(<span class="hljs-string">f"<span class="hljs-subst">{word}</span> -&gt; <span class="hljs-subst">{lemmatizer.lemmatize(word, pos=<span class="hljs-string">'v'</span>)}</span>"</span>)
</code></pre>
<h3 id="heading-expanding-contractions">Expanding Contractions</h3>
<p>AI systems need standardization. And “don’ts” and “you’res” are unacceptable for them. This is why, typically, you would want to expand the contraction to the real word for standardization. Here’s how you can do that:</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> contractions

text = <span class="hljs-string">"I can't believe it's already 2025. We'll see what happens."</span>
expanded = contractions.fix(text)
print(expanded)
<span class="hljs-comment"># Output: I cannot believe it is already 2025. We will see what happens.</span>
</code></pre>
<h3 id="heading-correcting-spelling-errors">Correcting Spelling Errors</h3>
<p>Orthographic, spelling, or grammar errors shouldn’t be in the data that you feed to your ML models. You can make corrections to these errors using statistical language models, which can predict the most likely intended word, edit distance algorithms that can find the closest valid word, or neural approaches that can learn patterns of common errors.</p>
<p>For example, let’s see how TextBlob, a library that uses a mix of a dictionary-based approach and contextual probability, detects and corrects misspellings.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> textblob <span class="hljs-keyword">import</span> TextBlob

text = <span class="hljs-string">"Natral languag procesing is powrful"</span>
corrected = TextBlob(text).correct()
print(<span class="hljs-string">f"Original: <span class="hljs-subst">{text}</span>"</span>)
print(<span class="hljs-string">f"Corrected: <span class="hljs-subst">{corrected}</span>"</span>)
</code></pre>
<p>TextBlob analyzes each word, identifies which ones are not in its dictionary, calculates edit distances, finds the most similar valid words, and selects corrections based on the frequency of word use in context.</p>
<h3 id="heading-parts-of-speech-tagging">Parts-of-Speech Tagging</h3>
<p>Parts-of-speech tagging (POS) refers to assigning grammatical classification to words based on their role in a sentence. This is important because the same word can function as a different part of speech depending on the context. For example, "walk" can be a noun (like "an evening walk") or a verb (like "I walk to the office").</p>
<p>POS taggers rely on statistical models trained to predict the most likely grammatical role for a word given the context. The following code shows POS tagging using NLTK, which applies a pre-trained model that will tag grammatical structure.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> nltk

text = <span class="hljs-string">"The cat sat on the mat"</span>
tokens = nltk.word_tokenize(text)
pos_tags = nltk.pos_tag(tokens)

<span class="hljs-keyword">for</span> word, tag <span class="hljs-keyword">in</span> pos_tags:
    print(<span class="hljs-string">f"<span class="hljs-subst">{word}</span>: <span class="hljs-subst">{tag}</span>"</span>)
<span class="hljs-comment"># Output:</span>
<span class="hljs-comment"># The: DT (Determiner)</span>
<span class="hljs-comment"># cat: NN (Noun)</span>
<span class="hljs-comment"># sat: VBD (Verb, past tense)</span>
</code></pre>
<p>The function pos_tag() assesses each token and assigns it a standardized notation. For example, DT indicates determiners (such as "the"), NN indicates singular nouns, VBD indicates past tense verbs, and IN indicates prepositions. The tagger can also use context to make these decisions: it can determine that "sat" is VBD and not NN because it appears after a noun and before a preposition, all of which are typical patterns of the English sentence.</p>
<h2 id="heading-establishing-and-labeling-datasets">Establishing and Labeling Datasets</h2>
<p>For supervised learning tasks such as sentiment analysis, NER, or classification, unlabeled data is useless. </p>
<p>This is why, to create training datasets, you must annotate raw data with relevant labels.  Models can learn patterns and make predictions thanks to this "ground truth." Let’s define the most common methods for labeling.</p>
<h3 id="heading-automated-labeling-based-on-libraries">Automated Labeling Based on Libraries</h3>
<p>You don’t always have to create labels from scratch. Libraries like TextBlob have built-in sentiment analysis models trained on large datasets that label text. They run a polarity score (a number that represents sentiment) and assign a categorical label.</p>
<p>For example, TextBlob sees a word choice, modifiers in particular (words like "very" or "not"), and grammatical patterns to run a polarity score from -1 (most negative) to +1 (most positive), with zero meaning a neutral sentiment.</p>
<p>In this example, we’re automatically labeling sentiments based on a pre-trained TextBlob sentiment analyzer:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> textblob <span class="hljs-keyword">import</span> TextBlob

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">label_sentiment</span>(<span class="hljs-params">text</span>):</span>
    blob = TextBlob(text)
    polarity = blob.sentiment.polarity

    <span class="hljs-keyword">if</span> polarity &lt; <span class="hljs-number">0</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-string">"negative"</span>
    <span class="hljs-keyword">elif</span> polarity == <span class="hljs-number">0</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-string">"neutral"</span>
    <span class="hljs-keyword">else</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-string">"positive"</span>

<span class="hljs-comment"># Example</span>
texts = [
    <span class="hljs-string">"I love this product!"</span>,
    <span class="hljs-string">"It's okay, nothing special"</span>,
    <span class="hljs-string">"Terrible experience, very disappointed"</span>
]

<span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> texts:
    label = label_sentiment(text)
    print(<span class="hljs-string">f"<span class="hljs-subst">{text}</span> -&gt; <span class="hljs-subst">{label}</span>"</span>)
</code></pre>
<h3 id="heading-manual-labeling">Manual Labeling</h3>
<p>In many cases, automated library-based labeling isn’t an option. For domain-specific standards, you should annotate your data by hand to ensure accuracy and relevance.</p>
<p><strong>For projects involving manual labeling:</strong></p>
<ul>
<li><p><strong>Establish precise labeling standards.</strong> Provide an annotation guideline that defines each label with clear criteria and edge cases. As an example, if annotating for customer support tickets, an example of potential criteria should be that "I need help resetting my password" is "Technical support," and another example is "When will my order arrive?" which is an example of "Order inquiry."</p>
</li>
<li><p><strong>For quality control, use several annotators</strong>. Have 2-3 people label the same data samples independently. For example, if annotating for medical symptoms, having multiple annotators better reduces the chance of bias from one person's labeling and may protect against clerical errors.</p>
</li>
<li><p><strong>Determine the inter-annotator agreement.</strong> Calculate <a target="_blank" href="https://numiqo.com/tutorial/cohens-kappa">Cohen's kappa</a> or <a target="_blank" href="https://numiqo.com/tutorial/fleiss-kappa">Fleiss' kappa</a> scores to measure the consistency of agreement among annotators. A score of above 0.80 would signify very good agreement, while a score below 0.60 would indicate that the labeling guidelines were not clear enough to the annotators.</p>
</li>
<li><p><strong>Give instructions and illustrations</strong>. Create a reference document with 20-30 examples you pre-labeled, showing examples of typical use cases and edge cases. For example, in a sentiment analysis, case you can provide examples of when a sentiment would be neutral, with an example such as "This product is fine, I guess," even though it may have seemed slightly negative. A sentiment is also classified as a good positive example even though it contains two negatives: "Not bad at all.”</p>
</li>
</ul>
<p>This is the gold standard for high-quality datasets, but it’s also time-consuming and expensive – labeling 10,000 customer reviews might take a week if done manually.</p>
<h3 id="heading-approaches-with-semi-supervision">Approaches with Semi-Supervision</h3>
<p>There are instances where you should combine the previous approaches. This semi-supervised method uses a small, manually labeled data set (high-quality data) and a large pool of unlabeled data (cheap, large amounts of data). </p>
<p>The method operates through iterative self-training, where you first train the model on your small dataset of signed data, then predict the labels on the unlabeled data using this model, then add the most confident predictions to your training data during training, and retrain. The self-training process is then repeated, improving and expanding your labeled data set gradually.</p>
<p>Here is an example of self-training in practice: this code demonstrates the semi-supervised workflow.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> sklearn.semi_supervised <span class="hljs-keyword">import</span> SelfTrainingClassifier
<span class="hljs-keyword">from</span> sklearn.svm <span class="hljs-keyword">import</span> SVC

<span class="hljs-comment"># Small labeled dataset + large unlabeled dataset</span>
X_labeled = [[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>], [<span class="hljs-number">3</span>, <span class="hljs-number">4</span>], [<span class="hljs-number">5</span>, <span class="hljs-number">6</span>]]
y_labeled = [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>]
X_unlabeled = [[<span class="hljs-number">2</span>, <span class="hljs-number">3</span>], [<span class="hljs-number">4</span>, <span class="hljs-number">5</span>], [<span class="hljs-number">6</span>, <span class="hljs-number">7</span>]]

<span class="hljs-comment"># Combine datasets (-1 represents unlabeled)</span>
X_train = X_labeled + X_unlabeled
y_train = y_labeled + [<span class="hljs-number">-1</span>, <span class="hljs-number">-1</span>, <span class="hljs-number">-1</span>]

<span class="hljs-comment"># Self-training classifier</span>
base_classifier = SVC(probability=<span class="hljs-literal">True</span>, gamma=<span class="hljs-string">'auto'</span>)
self_training = SelfTrainingClassifier(base_classifier)
self_training.fit(X_train, y_train)
</code></pre>
<p>The code shows a version of the SelfTrainingClassifier that first trains on the three labeled examples, then uses the model to predict inputs and labels for the unlabeled data. The classifier then selects predictions where it has high confidence (for example, predictions that are &gt;90% probability) while using them as newly signed data. The classifier then re-trains itself, and the process continues.</p>
<p>So how do you decide which approach will fit your needs? In most cases, the optimal one will depend on the following aspects:</p>
<ul>
<li><p>Available budget and time.</p>
</li>
<li><p>Desired accuracy.</p>
</li>
<li><p>Size of the dataset.</p>
</li>
<li><p>Complexity of the domain.</p>
</li>
</ul>
<p>As you see, approaches vary and can be mixed now and then. The key thing is to make sure the inputs for final pre-generation processing are cleaned, standardized, and labeled. Remember the key principle: “garbage in, garbage out”. Send gold instead, and good luck!</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>At this point, you should know the basics of working with NLP projects.</p>
<p><strong>Throughout this article, you've learned:</strong></p>
<ul>
<li><p>How to set up your NLP development environment using a set of tools and libraries.</p>
</li>
<li><p>The five parts of NLP systems and how they are used to process language.</p>
</li>
<li><p>How to conduct common tasks like NER, sentiment analysis, and text classification.</p>
</li>
<li><p>How to choose the library to use to accommodate your project needs.</p>
</li>
<li><p>How to prepare and label datasets for training.</p>
</li>
<li><p>How to find the key practical applications of NLP tailored to your industry and use case.</p>
</li>
</ul>
<h3 id="heading-next-steps">Next steps</h3>
<ul>
<li><p>Try to start with a simple project, like sentiment analysis, that uses pre-trained models.</p>
</li>
<li><p>Practice preprocessing methods with your own text data.</p>
</li>
<li><p>Use and try different libraries to see how to get the best output for your project.</p>
</li>
<li><p>Build a full pipeline from preparing text data to deploying models.</p>
</li>
<li><p>Continue to practice and see advanced applications like transformer models and fine-tuning.</p>
</li>
</ul>
<p>Most importantly, keep in mind that NLP is an iterative process. Start small, test appropriately to get it to work, and then build in complexity when you are more comfortable and sure of your abilities and familiarity with the practices.</p>
<h3 id="heading-about-the-author">About the author</h3>
<p>Hope you enjoyed the article and found it helpful. I’ve been a contributor to freeCodeCamp for more than 8 years, and to make this piece more precise and detailed, I used some expert help.</p>
<p>I’m grateful for the technical ideas of my co-workers at <a target="_blank" href="https://coaxsoft.com/">COAX Software</a> who wished to stay anonymous. The company is a well-regarded <a target="_blank" href="https://coaxsoft.com/services/ai-development-services">AI/ML development company.</a></p>
<p>To find out more about me and read more content on tech and digital, you can <a target="_blank" href="https://www.linkedin.com/in/oleg-romanyuk/">visit my LinkedIn page</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Write QA Documentation That Will Actually Work ]]>
                </title>
                <description>
                    <![CDATA[ Imagine developing a complex software product without taking any action to protect against errors. Human error and unexpected code combinations can cause a wide range of defects. This is where quality assurance (QA) documentation comes in.  Usually, ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-write-qa-documentation-that-will-actually-work/</link>
                <guid isPermaLink="false">66be14ba0c9c630f4d48debb</guid>
                
                    <category>
                        <![CDATA[ documentation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Quality Assurance ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Mon, 17 Jun 2024 18:29:07 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/05/How-to-Write-QA-Documentation-That-Will-Actually-Work.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Imagine developing a complex software product without taking any action to protect against errors. Human error and unexpected code combinations can cause a wide range of defects. This is where quality assurance (QA) documentation comes in. </p>
<p>Usually, a QA tester creates a report after discovering a bug. The next step is that they send a report to the bug handler. Basically, a bug handler is a developer that fixes a bug according to the detailed report. The bug handler ensures a clean and efficient QA process and makes it easier to have a clean conversation between the fixers and the testers. </p>
<p>But you might be wondering – why do we need QA documentation?</p>
<p>QA testing is essential in IT products today. Tight deadlines, unique skill sets within the organization, and the demand to develop products stress the need for a structured methodology. QA documentation guides testers through levels of clarity and overall coverage. </p>
<p>I've written this article to make your life a bit easier. So here it is, your ultimate guide on how to write software QA documentation that will work.</p>
<h3 id="heading-this-is-what-well-cover">This is what we'll cover:</h3>
<ul>
<li><a class="post-section-overview" href="#heading-make-a-test-plan-and-a-test-progress-report">Make a Test Plan and a Test Progress Report</a></li>
<li><a class="post-section-overview" href="#heading-create-test-cases">Create Test Cases</a></li>
<li><a class="post-section-overview" href="#heading-defect-reports">Defect Reports</a></li>
<li><a class="post-section-overview" href="#heading-useful-tips-for-defect-report-writing">Useful Tips for Defect Report Writing</a></li>
<li><a class="post-section-overview" href="#heading-submit-a-defect-report">Submit a Defect Report</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-make-a-test-plan-and-a-test-progress-report">Make a Test Plan and a Test Progress Report</h2>
<p>Developing great software requires a thorough and documented approach to testing. Everything begins in the development phase with a complete checkout plan as a template for the entire QA process. It outlines the general requirements, defines the followed route, identifies the necessary assets, and sets a simple timeline for achieving the objectives.</p>
<h3 id="heading-draw-up-a-roadmap-before-you-start">Draw up a roadmap before you start</h3>
<p>Before you start implementing your test plan, take some time to think about the big picture. Ask yourself:</p>
<p><em>What problem does this software solve?</em> As soon as you understand the main purpose of the software, you'll be able to manage the checkout process and identify the features that are most important to your goals. </p>
<p>I promise that once you see that you can do this, you quickly prioritize your efforts. They are based primarily on the importance of the functionality and its impact on the user.</p>
<h3 id="heading-create-a-plan">Create a plan</h3>
<p>The test plan is the central part of the QA technique. The test plan should contain the following key elements:</p>
<ul>
<li><strong>Imaginary test</strong>: Clearly identify the expected impact of the payment method. Will it confirm that core functionality is running smoothly, or will it alert you to capability gaps?</li>
<li><strong>Test method</strong>: Outline how the test will be performed. Will you do targeted testing, useless testing, or a mix of the two?</li>
<li><strong>Resource allocation</strong>: Identify the equipment and technology required to perform a complete control. What control framework will you use? Are specific hardware or software configurations required for proper control?</li>
<li><strong>Timetable and remaining dates</strong>: Establish a realistic timetable for the trial. Set clear deadlines to keep the project on track.</li>
</ul>
<h3 id="heading-understand-the-why-and-how">Understand the 'why' and 'how'</h3>
<p>A well-developed roadmap will ensure that key issues are addressed throughout the improvement approach:</p>
<ul>
<li><strong>Acceptance requirements</strong>: Clear fail/success criteria should be defined for all control cases. So, criteria allow the customer to understand that the product is high quality and ready for the end-user.</li>
<li><strong>Resource management</strong>: Identify the assets required for the testing. This includes preferred machines, copies of software in various forms, required expertise, and more.</li>
<li><strong>Team dynamics</strong>: Ensure that simple roles and tasks are defined within the test team. Who is responsible for particular test cases? Who documents bugs and who talks to developers?</li>
<li><strong>Time management</strong>: I advise setting realistic checkout times, taking into account project deadlines and the availability of useful help.</li>
</ul>
<p>The test progress report is another part of the QA documentation, similar to the test plan, but with additional data on current progress. This document allows you and your development team to monitor project progress and identify any organizational issues.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/test-plan-and-progress-report-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>A test plan and a progress report</em></p>
<h2 id="heading-create-test-cases">Create Test Cases</h2>
<p>Think of each test case as a detailed recipe for finding potential defects in the functionality of a software program. By following these "recipes" and evaluating the expected and actual results, defects can be accurately identified and addressed before preventive action is taken. </p>
<p>Each test case acts as an independent unit, outlining the steps required to evaluate a particular element of a software program. </p>
<p>Below is a breakdown of the key elements that make up a well-defined test case Here is my step-by-step guide for creating test cases:</p>
<ul>
<li><strong>ID</strong>: This is an identifier field to help distinguish between test cases and track them easily.</li>
<li><strong>Priority</strong>: This indicates the severity of the test case based on the functionality of the program and its impact on the normal overall performance of the known software program application.</li>
<li><strong>Test Requirements</strong>: These are requirements for testing software successfully, this can include reference documents also.</li>
<li><strong>Software Module</strong>: This shows the feature under testing. It also refers to the software requirements specifications (SRS) document explaining the software feature in detail.</li>
<li><strong>Test Context</strong>: This details the test plan to clarify how the daily tests will be carried out. It also identifies the test data required for a successful case study and includes unique and important statistical information.</li>
<li><strong>Expected Output</strong>: This describes the expected output to be displayed if the test is successful.</li>
<li><strong>Actual output</strong>: This indicates the actual result in the event of failure and shows the developer the errors in the application module of the software program.</li>
<li><strong>Comment</strong>: This is an optional section where the tester can give a description of the observations or add additional records.</li>
</ul>
<p>All QAs typically include the above elements, but can also be designed specifically for the task selected by the QA group. Also, each control case follows a lifecycle that defines the phases of creation, testing (pass, fail), completion, and so on. </p>
<p>In the next section, we’ll check out another important element of QA documentation: the defect report.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/test-cases.png" alt="Image" width="600" height="400" loading="lazy">
<em>Test cases</em></p>
<h2 id="heading-defect-reports">Defect Reports</h2>
<p>Defect reporting is an important element of QA documentation. Issue tracking is the detailed reporting of sudden problems that arise in a software product. Careful documentation of these issues lays the groundwork for a complex and bug-free final product. </p>
<p>Sounds simple, right? Yes, but only until you start documenting.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/bug-task.png" alt="Image" width="600" height="400" loading="lazy">
<em>A defect report</em></p>
<p>The bug report consists of the following sections: Identifier, Summary, Description, Steps to Reproduce, Reproducibility, Severity, Priority, Environment, and Attachments.</p>
<ul>
<li><strong>Identifier</strong>: Each software program problem is assigned a completely unique identifier that acts like a customized nameplate. This makes the QA documentation less complicated to navigate and allows verbal communication between the installer, tester, and project manager (PM).</li>
<li><strong>Summary:</strong> This is an opportunity to provide brief and informative answers to three basic questions: What was the problem? Where did the problem appear? Under what specific conditions did the problem appear?</li>
<li><strong>Explanation:</strong> Examine the failure log in more detail. Summarize the identified action (the result completed) and check it against the planned action (the predicted end result). Including a link to the app requirements of the software program can serve as a useful reference element.</li>
<li><strong>Reproduction method</strong> (STR): This phase should be considered as a step-by-step recipe for reproducing the defect. It should be strict and cover all the steps that caused the problem. Skipping critical steps can make it difficult for you to reproduce the problem and cause delays.</li>
<li><strong>Reproducibility:</strong> In this section, you clarify if the bug appears every time you follow the STR. You should use numbers to show approximate chances, for example, 7 times out of 10.</li>
<li><strong>Severity</strong>: Here you explain how much harm the bug may bring to the project. Essentially, this is a measure of the severity of the technical disruption that a bug will cause to the whole project. Remember that problems that are known to be minor can grow and cause you extreme problems throughout the software.</li>
<li><strong>Priority</strong>: Each error log assigns a problem priority that indicates its urgency. Common priorities are letters (A: highest priority, Z: highest priority), numbers (1: highest priority, 9: highest priority), or descriptive terms (high, medium, low).</li>
<li><strong>Environment</strong>: Specify the gadget or browser model in which the bug appeared. This will help you to put the problem in context and narrow down a valid cause.</li>
<li><strong>Attachments</strong>: If possible, enrich the documentation with screenshots, screen recordings, console log documents, and others. This will help to provide visual documentation of the error.</li>
</ul>
<p>My structure provides detailed information, so you can empower developers to effectively diagnose, address, and eliminate any software bugs. In this way, leading to more user-friendly and robust products. </p>
<p>Now, in the next section, we'll see some useful tips you can use for defect report writing.</p>
<h3 id="heading-useful-tips-for-defect-report-writing">Useful Tips for Defect Report Writing</h3>
<ol>
<li>Write a sufficient summary. It does not matter if it is long or short. What matters is that it should be clear.</li>
<li>Have a look at the summary and the description. Do they look pretty much the same? You must have forgotten to outline the expected and actual results in the description and to add the link to the requirements.</li>
<li>Capture the issue with the help of a screenshot. It may save you and the development team a lot of time. Sometimes one glance at the picture is just enough to understand the situation.</li>
<li>Before reporting the issue, try to reproduce it at least 3 times to be sure that it exists.</li>
<li>Report the issue ASAP and notify your project manager or product owner if the issue is major.</li>
<li>Check for grammar mistakes in your QA documentation so you're not taken down by the grammar police.</li>
<li>However comical it sounds, make sure that the issue is not a feature – review the documentation again!</li>
<li>Do not miss any important information in your Steps to Reproduce.</li>
</ol>
<h2 id="heading-submit-a-defect-report">Submit a Defect Report</h2>
<p>The final and one of the most important elements of QA documentation is the defect report. You may understand it covers the entire lifecycle of a problem, from its initial discovery to its final closure. </p>
<p>Let's now examine the key areas of this process:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/defect-report-lifecycle.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>a defect report lifecycle</em></p>
<p>We'll go over the defect report lifestyle piece by piece:</p>
<h3 id="heading-problem-reporting">Problem Reporting:</h3>
<p>This adventure begins with the careful compilation and submission of a report on the entire program. This serves as a roadmap for developers and provides a clear assessment of the problem.</p>
<h3 id="heading-triage-and-tasks">Triage and tasks:</h3>
<p>The task manager or technical lead takes on the role of gatekeeper at this stage. They carefully compare the files. If the file contains enough elements to work with, it is assigned to the developer and repaired. However, if the file is missing essential elements, it may be rejected for further improvement.</p>
<h3 id="heading-bug-fixing">Bug fixing:</h3>
<p>The assigned developer takes the initiative and works diligently to eliminate the annoying bug.</p>
<h3 id="heading-verification-and-completion">Verification and completion:</h3>
<p>Once the developer claims to have fixed the problem, it's your turn as QA. Carefully verify the fix by retesting the functionality in question. If everything works as it should, you are done. </p>
<p>The documentation has come to a happy end. Ideally, this will happen within a reasonable period of one to two weeks.</p>
<h3 id="heading-reboot-and-keep-going">Reboot and keep going:</h3>
<p>But it is not always that simple. If it is known that bugs are still being made in the validation system, there is no need to despair! </p>
<p>Re-open the bug documentation and send it to the developers for further attention. Sometimes the process of fixing bugs is repetitive and requires patience. But by being careful and effective, you can guarantee that all bug reports will eventually reach their final destination, resulting in a more polished and reliable software application product.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Quality Assurance is a process you simply cannot avoid. Each airplane prior to departure undergoes a technical check. If there is any issue, the aircraft is grounded until the problem is solved. The same goes for any software. </p>
<p>But QA documentation is not always "write and ignore". At some point in the software development lifecycle, QA documentation needs to be continually updated and improved as requirements change, new features are introduced, and feedback is received from deployment and production use.</p>
<p>There are also a growing number of styles that use synthetic intelligence and machine learning to partially automate the creation of QA documentation. </p>
<p>For example, natural language processing (NLP) is used to analyze requirements documents and generate draft control examples. Test bots can use NLP to interpret and routinely execute directed test cases. Predictive evaluation can also be used to identify the most dangerous areas of a software program that require more detailed control.</p>
<p>While these strategies are still new and not mature enough to replace human testers, they can help with growth and augment manual exploration, especially for large and complex builds. By making QA documentation a collaborative and ongoing hobby, your team can deliver better software faster and with fewer defects.</p>
<h3 id="heading-do-you-need-to-improve-the-quality-of-your-software">Do you need to improve the quality of your software?</h3>
<p>My company KeenEthics provides solid <a target="_blank" href="https://coventit.com/services/custom-software-development">development and quality assurance services</a>. In case you need an estimate for a similar project, feel free to <a target="_blank" href="https://coventit.com/contact-us">get in touch</a><em>.</em> </p>
<p>If you have enjoyed the article, you should continue with <a target="_blank" href="https://coventit.com/blog/How-IT-Outsourcing-Saves-Costs">How IT Outsourcing Saves Costs for Your Company</a> and <a target="_blank" href="https://coventit.com/blog/risks-of-it-outsourcing">Avoiding Pitfalls in IT Outsourcing: Tips for Minimizing Risks</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build an MVP for Your Project – and Why You Should Do It ]]>
                </title>
                <description>
                    <![CDATA[ Proof of concept, prototypes, wireframes, mockups… what actually constitutes a Minimum Viable Product (MVP)? Well, it's a product with just enough features to gather comprehensive qualitative feedback. In practice, it's as easy to understand the conc... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/minimum-viable-product-between-an-idea-and-the-product/</link>
                <guid isPermaLink="false">66be14c2b712ab343b0b912f</guid>
                
                    <category>
                        <![CDATA[ app development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mvp ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Fri, 24 May 2024 13:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/02/MVP-as-a-Bicyle.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Proof of concept, prototypes, wireframes, mockups… what actually constitutes a Minimum Viable Product (MVP)?</p>
<p>Well, it's a product with just enough features to gather comprehensive qualitative feedback.</p>
<p>In practice, it's as easy to understand the concept of an MVP as it is to ride a bicycle. Let's do it then.</p>
<p>In this article, I am going to explain:</p>
<ul>
<li><a class="post-section-overview" href="#heading-what-is-an-mvp">What is an MVP?</a></li>
<li><a class="post-section-overview" href="#heading-the-benefits-of-an-mvp">The benefits of an MVP</a></li>
<li><a class="post-section-overview" href="#how-mvp-software-development-is-conducted">How is an MVP developed?</a></li>
<li><a class="post-section-overview" href="#how-would-an-mvp-be-developed-if-it-was-a-bicycle">How would an MVP be developed if it was a bicycle?</a></li>
<li><a class="post-section-overview" href="#heading-why-is-an-mvp-important">Why is it important to build an MVP?</a></li>
<li><a class="post-section-overview" href="#heading-do-you-have-an-idea-for-an-mvp">Do you have an idea for an MVP?</a></li>
<li><a class="post-section-overview" href="#heading-faq">FAQ</a></li>
</ul>
<p>All your customers want to be heard and understood. In the world of software, there is a large number of apps and websites out there, but only a few get the attention and love of the users. So you can start by creating a minimum viable product to find out if your idea has a place in this competitive environment.</p>
<p>Building an MVP doesn’t really cost much. And it helps you investigate the market competition with minimum time and budget loss (in the worst case). You’ll discover the whole story, from benefits and prototype types to the common example of your future developed MVP. So…what are you waiting for?</p>
<h2 id="heading-what-is-an-mvp">What is an MVP?</h2>
<p>The most basic version of a product that can be released to test a business idea is called a minimum viable product (MVP). This concept was popularised by Eric Ries in The Lean Startup. It is part of the ethos of the <a target="_blank" href="https://theleanstartup.com/">Lean Startup</a> methodology. With minimal initial investment, this framework focuses on efficiency and learning from customer feedback.</p>
<p>An MVP is a perfect opportunity to let your potential users voice their opinions and test out a product before its final launch. Gathering and analyzing qualitative feedback is a primary task of MVP development. Based on these findings, you can modify your MVP and test it again.</p>
<p>This process turns into a cycle of MVP product development which takes place over and over again until the ultimate customer satisfaction is reached.</p>
<p>MVPs are all about testing product ideas, analyzing user feedback, and building a full product version based on what you learn. Experts say that it's not an MVP until you can sell it in the B2B world. However, before diving into the process of how to manage an MVP, let’s learn about its main benefits.</p>
<h2 id="heading-the-benefits-of-an-mvp">The Benefits of an MVP</h2>
<p>All these benefits demonstrate a strategic approach that goes far beyond just cost savings and speed to market. It's about smart, customer-centric development, where each iteration brings a product closer to the heart of what users want. </p>
<p>Here are some of the many benefits of building an MVP:</p>
<h3 id="heading-1-product-hypothesis-validation">1. Product Hypothesis Validation</h3>
<p>You can test hypotheses directly with MVPs. MVPs help test the market's response to a product by focusing on building core features. This process helps founders refine their business model with real-world insights rather than guesswork.</p>
<h3 id="heading-2-minimising-capital-investment">2. Minimising Capital Investment</h3>
<p>The development of an MVP requires less investment than the launch of a fully developed end product. This approach aligns with the Lean Startup methodology, which stresses the importance of using just enough features to demonstrate the concept without overburdening resources. It allows startups to allocate their budget more effectively and mitigate financial risks.</p>
<h3 id="heading-3-getting-investors-to-trust-and-get-funded">3. Getting Investors to Trust and Get Funded</h3>
<p>Presenting a well-developed MVP is often crucial to attracting investor interest and raising venture capital funding. The demonstration of a working MVP helps angel investors and venture capitalists visualize the potential of a business idea, making it easier to secure start-up funding.</p>
<h3 id="heading-4-refine-for-product-market-fit">4. Refine for Product-Market Fit</h3>
<p>An MVP is an ideal tool for refining product-market fit, which is a dynamic process. It allows startups to closely align their product with market needs, based on user feedback. This ensures that the final product is well-received by its target audience, increasing the potential for success.</p>
<h3 id="heading-5-gather-customer-feedback">5. Gather Customer Feedback</h3>
<p>The key to the success of any business is gathering feedback from customer research. An MVP provides a platform for engaging early adopters and gathering valuable feedback with a focus on core features.</p>
<p>Such user feedback is critical for startups to understand customer needs and preferences, prioritize the product roadmap, and develop the product for greater market penetration.</p>
<p>Now, you are ready to face the question: “How do you manage MVP software development?”.   </p>
<p><img src="https://lh7-us.googleusercontent.com/baDuR-1JR0cpX5OEJK2ZQL7XY5EK6NKqSDi2eM_MzY91XOscOxKH0BHxGSDbUKc5q_Hi4sWiSNcSm529yP3Vll5v4MDITVXy8iYWCtOvLz0GVutglkk5PD-mOfqZQliFTMgBae01DuaQPP9eC5n93uk" alt="Image" width="600" height="400" loading="lazy">
<em>Stages of MVP development</em></p>
<h2 id="heading-how-to-do-mvp-software-development">How to Do MVP Software Development</h2>
<p>Every product is different, and so is the process of its development. Before we jump into the details of how an MVP is created, I want to point out that it is an individual and iterative process.</p>
<h3 id="heading-product-discovery">Product Discovery</h3>
<p>Your first task is to make your idea come to life. You can start by running product discovery. You need to study the needs, interests, and demographic characteristics of the target audience. Also, analyze the strengths and weaknesses of competitors.</p>
<p>You will then need to go through all the features that can be implemented and select the essential ones. The next thing is to organize this information and present it during the workshops with the help of graphs, charts, tables, or any other form of visualization that you feel best represents the data.</p>
<p>Now, your idea should seem clearer but it is still not presentable.</p>
<h3 id="heading-proof-of-concept">Proof of Concept</h3>
<p>Next, you need to create a Proof of Concept. Basically, this is aimed at summarizing the discovery stage and verifying that your innovative idea can be implemented in real life.</p>
<p>Ok, you know that your idea is feasible and comprehensive. You know that it can be done – but how?</p>
<h3 id="heading-user-journey">User Journey</h3>
<p>Now you need to understand what the user wants to see once they open the application. One of the starting points for an MVP is having a strong sense of your customer. Startups should carefully build a target user profile, taking into account various factors that affect buying decisions and product usage. </p>
<p>To build this target user profile, you have to identify the following:</p>
<ul>
<li>Industry: the type of sector your product serves.</li>
<li>Pain problems: challenges your product aims to solve.</li>
<li>Buying decisions: How they make their decisions and what channels they prefer to use.</li>
<li>Contexts: In which way they would use your product.</li>
</ul>
<p>To do this, you need to map a user journey. User journeys are a visual representation of a potential user and their experience with your app. They cover everything from the moment the user realizes they need this service, to the moment they first find and click through to your app, to the moment they decide to make this service part of their lifestyle.</p>
<p>User journeys resemble a set of statements, which look something like this:</p>
<p><em>As a [user role], I want to do [functions] so that [goal].</em></p>
<p>For example, "As a website admin, I want to be able to add or remove users to keep the app free of spammers". Or, "As an unregistered user, I want to be able to open a menu so I can understand what the application offers before I sign up.”</p>
<h3 id="heading-prototype">Prototype</h3>
<p>After that, it's time to start prototyping. A prototype is a simplified version of the product. It demonstrates the final product design and navigation. Basically, it is a set of pictures of the interface of your future app. If it is clickable, you can navigate between screens by clicking buttons to understand user flows. </p>
<p>Prototypes may even look like a very basic version of your platform or mobile app. It is not a final product and not an MVP because you cannot show it to actual users.</p>
<p>Here, you have your idea implemented. Kind of. It can be shown to all the stakeholders but not to the end user as long as it is just a rough draft. </p>
<p>Now comes the most interesting part: you have to decide the type of MVP you’re going to use. We’ll take a look only at the 5 most popular types (but there are more). So, here we go:</p>
<h4 id="heading-wizard-of-oz-mvp">Wizard of Oz MVP</h4>
<p>This approach gives the user the illusion of a service or product that runs without any human interference – but in reality, behind the scenes, it's all done manually by people. </p>
<p>For example, for developing a digital assistant app, the staff will manually answer the customer instead of complex AI infrastructure. The MVP will allow you to check the standards and collect suggestions from users to make improvements without a big initial input.</p>
<h4 id="heading-concierge-mvp">Concierge MVP</h4>
<p>Similar to the Wizard of Oz MVP, the Concierge MVP is a front for the final automated response of a manually transformed customized service. </p>
<p>For example, if your startup is a food delivery app, you can start by doing order and delivery management manually, rather than building a highly automated platform from the beginning. This is particularly important in customer satisfaction in industries that derive value from personalization and a human touch.</p>
<h4 id="heading-single-feature-mvps">Single-feature MVPs</h4>
<p>In the beginning, you shouldn't try to put together a product with too many features. Instead, develop and release just a single core feature that solves a problem. This will allow you to quickly test the pricing proposition of the product and gather customer feedback for improvements. </p>
<p>In general, prioritizing central functions can speed up development and reduce the likelihood of building redundant skills.</p>
<h4 id="heading-pre-order-mvp">Pre-Order MVP</h4>
<p>This involves placing pre-orders before developing or producing an actual product. With interest and pre-order funding, early sales can be used to help generate visibility and improve the product. This method reduces the chance of developing something that is not going to fit into the market and is perfect for fast iterations based purely on real names.</p>
<h4 id="heading-minimum-viable-demos">Minimum Viable Demos</h4>
<p>You can also put something together that demonstrates your central price proposition but isn’t a totally functional product. This could be a model, a prototype, or an interactive presentation that shows what the product could do, rather than reserving funds for full improvements.</p>
<p>A basic live demo will allow you to make sales to traders, get initial stakeholder comments, and test the market functionality of your idea. This is a very strong way to test concepts before committing any resources to development.</p>
<p>As soon as you have all the info we can continue our journey. This is only a beginning. So, let’s take a look at the next phase.</p>
<h3 id="heading-minimum-viable-product-development">Minimum Viable Product Development</h3>
<p>At this stage, you need to make some ultimate decisions about the UI/UX and finalize the visual design. After that, it's time to start coding the minimum viable product. </p>
<p>The Minimum Viable Product looks like a final app and feels like a final app. But it has fewer features, the design or performance is not necessarily production quality, and the code quality may be lower. Your idea is presented, you've put in the code, and it's partially implemented – it's now ready to meet its first user.</p>
<h3 id="heading-minimum-viable-product-launch-and-testing">Minimum Viable Product Launch and Testing</h3>
<p>After you finish development and launch the MVP, you should present it to a sample set of actual users. Throughout the next few days or weeks, you'll gather customers’ feedback, analyze the results, and modify your MVP accordingly.</p>
<p>Once you see that your customers are fully satisfied, you can start implementing the final product.</p>
<h2 id="heading-example-of-developing-an-mvp-lets-build-a-bicycle">Example of Developing an MVP – Let's Build a Bicycle</h2>
<p>Let’s imagine that you want to create a bicycle. A cool, stylish, hardwearing, and sustainable bike. But what if a potential client can't figure out what you have in mind and you lose all your hard work? What if you need cash and you have to convince your investors that your idea is viable? Well, it's time to build an MVP.</p>
<p>The development process will be pretty similar to what I described earlier. So let's go through it with this example product to see how everything works.</p>
<h3 id="heading-product-discovery-1">Product Discovery:</h3>
<p>You conduct a discovery stage: learn about what a bike is, what parts it consists of, what bikes people like, and what riders complain about. How can you make your bike stand out? </p>
<p>Through studies and marketplace evaluation, you discover insights into customer alternatives and pain points, and lay the groundwork for using new techniques. After that, you answer the most important question: what you can do to make your bicycle stand out among all the others?</p>
<h3 id="heading-proof-of-concept-1">Proof of Concept:</h3>
<p>Let’s say you found out how to create a bicycle chain that never falls off the chain ring. Once you have a clear idea of how to do this, you create your mechanism: a chain, with a chainring and pedals – your proof of concept. </p>
<p>With a clean idea in hand, throw your concept out there to investors. You tell them more about your idea, and receive their approval and support to keep going with the project.</p>
<h3 id="heading-prototype-1">Prototype:</h3>
<p>But it's not quite time to build the final bicycle, as you have not seen it yet in its actual size. So now you create a full-scale copy of the bicycle, carefully choose all the colors and materials, and make it resemble a real product.</p>
<p>Still, the pedals won’t spin yet, and you won't be able to steer or actually ride it. This is your prototype – looks pretty impressive and realistic but does not work yet.</p>
<h3 id="heading-mvp-development">MVP Development:</h3>
<p>Your investors again review the idea and approve your design, but now they need to see the functionality. You again create a full-scale bicycle, and now it has working wheels, pedals, brakes, gears, and a seat. That is going to be your MVP.</p>
<p>At this point, you can let your users try it out. They get on a bike, test it, and share their opinion with you. The more people try it, the more complete your feedback is. Just be sure not to show your bicycle to people you do not trust, or they might leak your idea to a next-door producer who also makes bikes for a living.</p>
<h3 id="heading-mvp-testing">MVP Testing:</h3>
<p>Finally, you modify your product based on what your customers have to say until you are sure that you've got it right. Each improvement brings you closer to perfection, ensuring your bike meets and beats expectations. Through rigorous testing and iteration, you build a product that not only meets your goals but also delights with functionality and format.</p>
<h3 id="heading-final-product-development">Final Product Development:</h3>
<p>Only after all these steps, when you have received financial support from your investors and the approval of your customers, are you ready for the launch.</p>
<p>You change out the wooden seat for a cushioned one, install safety lights on your bicycle, lubricate the bicycle chain, put on stickers and a bell, and start selling your product. A strong advertising and promotional campaign announces the arrival of your product. The culmination of creativity and hard work marks the start of a new technology in the world of cycling.</p>
<h2 id="heading-why-is-an-mvp-important">Why is an MVP Important?</h2>
<p>A Minimum Viable Product has one main advantage, but it's a very important one: it allows you to test your future product in real-life settings with actual users.</p>
<p>This simple benefit has a lot of positive consequences:</p>
<ul>
<li>An MVP lets you adjust your product development plan before it's too late.</li>
<li>It serves as a warning for any mistakes you make or as confirmation for good business decisions.</li>
<li>This approach saves you a great deal of time, effort, and money by optimizing the planning process and reducing risks.</li>
<li>A Minimum Viable Product boosts motivation because the team knows that what they do matters.</li>
<li>MVP development offers a unique experience of testing the product idea, which will definitely come in handy in your professional life in the future.</li>
<li>The MVP approach can and should be used within industries of all sorts. While for manufacturers of traditional goods it's a long and strenuous process, for software developers it can be rather simple and accessible.</li>
</ul>
<p>Some businesses may choose to disregard the minimum viable product stage when creating something innovative – and that may be understandable in certain spaces. But in my opinion, for a software development company it's detrimental.</p>
<p>Once a team has launched a Minimum Viable Product, they can decide whether the venture is on the right track. The most important outcome of an MVP is to get valuable statistics from early users. It's the customers who provide information about the first-class performance of the project. The statistics you get can be used to plan future improvements and prioritize which features should be implemented first.</p>
<p>If you decide to take a risk and implement your idea before checking in with your target audience, you're potentially placing money, time, effort, energy, inspiration, and supporters on the line.</p>
<h2 id="heading-do-you-have-an-idea-for-an-mvp">Do you have an idea for an MVP?</h2>
<p>My company Covent IT is experienced in developing Minimum Viable Products. In case you need a free estimate for a similar project, feel free to <a target="_blank" href="https://keenethics.com/contacts?activeform=estimate">get in touch</a><em>.</em> </p>
<p>If you have enjoyed the article, you should continue with <a target="_blank" href="https://coventit.com/blog/How-IT-Outsourcing-Saves-Costs">How IT Outsourcing Saves Costs for Your Company</a> and <a target="_blank" href="https://coventit.com/blog/risks-of-it-outsourcing">Avoiding Pitfalls in IT Outsourcing: Tips for Minimizing Risks</a>.</p>
<h2 id="heading-faq">FAQ</h2>
<h3 id="heading-how-to-spend-fewer-resources">How to spend fewer resources</h3>
<p>Remember that you should create an MVP with a minimum of time, money, and effort. Think about how you can spend less and still effectively test your business idea. Discussing this question will usually help you choose the MVP functionality to implement in the early stages of new product development.</p>
<h3 id="heading-how-do-you-interact-with-users">How do you interact with users?</h3>
<p>One of the main goals of creating an MVP is to test your hypotheses and determine the need and value of the product. Feedback from the first users of the product helps you achieve this goal. In order not to miss any important information, think about how you will interact with the target audience: through reviews, surveys, direct interviews, and so on.</p>
<h3 id="heading-how-do-you-make-the-first-sales-of-a-product">How do you make the first sales of a product?</h3>
<p>The first sales of the product will give you the means to develop it further and to see if there is interest in your product. You could also consider organizing a pre-sale on a crowdfunding platform such as Kickstarter.</p>
<h3 id="heading-how-do-you-promote-a-product">How do you promote a product?</h3>
<p>Plan the promotion campaign and the channels you will use. Google Adwords is usually the main tool. Then choose social networks (Facebook, Instagram, and so on), create official pages, and start targeting. You can also collect feedback on social networks.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Flutter Tutorial – How to Develop an App with Flutter From Scratch ]]>
                </title>
                <description>
                    <![CDATA[ Recently, I've been working on a marketing strategy for a new app based on the Flutter framework. An entire development team has been teaching me the ins and outs of Flutter as a cross-platform technology.  And from what I've learned, I believe that ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-develop-a-flutter-app-from-scratch/</link>
                <guid isPermaLink="false">66be14b77448141502702273</guid>
                
                    <category>
                        <![CDATA[ Flutter ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Front-end Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Fri, 26 Apr 2024 18:11:29 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/04/1060---539.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Recently, I've been working on a marketing strategy for a new app based on the Flutter framework. An entire development team has been teaching me the ins and outs of Flutter as a cross-platform technology. </p>
<p>And from what I've learned, I believe that the framework is accessible to almost anyone, even those with few technical skills.</p>
<p>In this tutorial, you will learn how to build your first Flutter app, from developing the concept to publishing on the App Store. </p>
<p>I'll teach you how to properly set up your development environment and code with the main Flutter code language – Dart. Some key concepts like state management, UI construction, and widgets will prepare you to create and launch a polished app. I'll even guide you through publishing your app to the App Store</p>
<p>So find a comfortable seat and get ready, as we're about to dive in. </p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>First of all, you have to decide on an environment. I advise you to choose either Visual Studio Code or Android Studio. The first one is lightweight and is a nice option that works well across different kinds of operating systems. Android Studio is just as powerful, if you plan on building Android apps. </p>
<p>If you're a beginner, take a look at VS Code with the Flutter extension, as it offers a user-friendly experience and it's a really good starting point. Just make sure your PC meets the minimum system requirements for Flutter development, as mentioned in <a target="_blank" href="https://docs.flutter.dev/get-started/install/windows/desktop">the official Flutter documentation</a>.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><a class="post-section-overview" href="#heading-mobile-app-development-with-flutter">Mobile App Development with Flutter</a></li>
<li><a class="post-section-overview" href="#heading-11-simple-steps-to-create-your-first-flutter-app">11 Simple Steps to Create Your First Flutter App</a></li>
<li><a class="post-section-overview" href="#heading-step-1-start-with-an-idea-or-vision-for-your-future-app">Step 1: Start with an Idea or Vision for Your Future App</a></li>
<li><a class="post-section-overview" href="#heading-step-2-install-the-flutter-sdk-on-your-computer">Step 2: Install the Flutter SDK on Your Computer</a></li>
<li><a class="post-section-overview" href="#heading-step-3-install-libraries-and-plugins-to-make-coding-easier">Step 3: Install Libraries and Plugins to Make Coding Easier</a></li>
<li><a class="post-section-overview" href="#heading-step-4-time-to-code">Step 4: Time to Code!</a></li>
<li><a class="post-section-overview" href="#heading-step-5-organize-your-project">Step 5: Organize your Project</a></li>
<li><a class="post-section-overview" href="#heading-step-6-code-the-ui-elements-and-interactions-widgets">Step 6: Code the UI Elements and Interactions (Widgets)</a></li>
<li><a class="post-section-overview" href="#heading-step-7-do-splash-screenwriting">Step 7: Do Splash Screenwriting</a></li>
<li><a class="post-section-overview" href="#heading-step-8-demonstrating-changes">Step 8: Demonstrating Changes</a></li>
<li><a class="post-section-overview" href="#heading-step-9-test-your-app">Step 9: Test Your App</a></li>
<li><a class="post-section-overview" href="#heading-step-10-code-styles">Step 10: Code Styles</a></li>
<li><a class="post-section-overview" href="#heading-step-11-publish-your-app">Step 11: Publish Your App</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-mobile-app-development-with-flutter">Mobile App Development with Flutter</h2>
<p>Let's kick off with some useful information about our framework. Basically, Flutter is an open-source kit developed by Google that allows you to build mobile apps, as well as network and integrated apps. </p>
<p>The key thing to remember about Flutter is that once you write code, you can upload your app to Android, iOS, and the web. Then, you can install it on multiple systems, including a PC. This really saves you a lot of time and effort compared to building separate apps for each platform.</p>
<p>Before we get started, let's learn why Flutter is extremely useful for mobile development.</p>
<h3 id="heading-advantages-of-flutter">Advantages of Flutter</h3>
<p>As I already mentioned, Flutter works with multiple systems and platforms at once, covering Android and iOS as well as Windows, Linux, and MacOS. Imagine – it's a single code base that rules them all! </p>
<p>Another advantage is that Flutter has a low entry barrier because of its simple syntax. For example, if you want to display some text, you easily create a widget called "Text", assign a style and color, add some text – and there you have it. It sounds simple – and it is.</p>
<h3 id="heading-limitations-of-flutter">Limitations of Flutter</h3>
<p>Before you decide to use Flutter, you should understand the whole picture. There are native technologies like Kotlin and Swift that have their unique advantages. </p>
<p>The first is that they provide the lowest possible delay and the smoothest possible user experience. They're perfect for applications that require low response times, like financial trading apps.</p>
<p>The second benefit is excellent performance and optimization. You have no redundancy in these specific situations. But only in these situations. So if your application requires extensive use of the device's hardware, such as real-time 3D graphics or sensor integration, you should consider going native.</p>
<h3 id="heading-back-end-development-with-flutter">Back-end Development with Flutter</h3>
<p>But, if you've decided to go the Flutter way, there's an important thing to consider: Flutter is a front-end framework, and it requires a back-end framework for complex applications. In short, if your app has state that needs to be stored, you need additional back-end technology. </p>
<p>I prefer Node.js because it can be launched anywhere, but you may use any other viable service. For a startup, a good example is free Firebase Cloud Functions. And as I've already mentioned, Dart is the main code language of Flutter, so you can also write a back-end with its help.</p>
<p>But choosing a decent back-end for your Flutter app is a whole other topic. I recommend you read the article “<a target="_blank" href="https://www.dhiwise.com/post/decoding-the-art-of-choosing-the-perfect-flutter-backend">Decoding the Art of Choosing the Perfect Flutter Backend: A Guide for Developers</a>”.</p>
<p>Otherwise, feel free to join me in this tutorial – let's begin!</p>
<h2 id="heading-11-simple-steps-to-create-your-first-flutter-app">11 Simple Steps to Create Your First Flutter App</h2>
<h3 id="heading-step-1-start-with-an-idea-or-vision-for-your-future-app">Step 1: Start with an Idea or Vision for Your Future App</h3>
<p>Many tools can help you at this stage, but the one you choose will depend on your design skills. </p>
<p>You can find visual inspiration on Dribbble, Pinterest, and many other websites. But when it comes to creating a design, there are three ways to go:</p>
<p>If you have no design skills, consider using Canva for app design and MockFlow for wireframes.</p>
<p>If you have some skills, then jump into Figma and you'll enjoy its many functionalities. Create your wireframes, and only after careful consideration develop the full-blown design. </p>
<p>Note that you can also use plugins like <a target="_blank" href="https://www.figma.com/community/plugin/1110606481076006495/figma2flutter">Figma2Flutter</a> and <a target="_blank" href="https://www.figma.com/community/plugin/844008530039534144/figmatoflutter">FigmaToFlutter</a> to turn your design into working Flutter code. So, the first step can easily be the last in creating your first Flutter app. </p>
<p>But I encourage you to read on and get an idea of the whole process. The code auto-created by one of the plugins may have bugs, and you'll need to be able to fix them.</p>
<p><img src="https://lh7-us.googleusercontent.com/Ia_FGjqAIgXnhIgIektxVcy7Cz5tt0HIHPZUfYDmaaeEemW4-b85f-5l6gKNt-m4TlvAtvDgXHPtpuPoAzxZvpoOhqnV2wXyq2KLUTvsyVX1cReuL8StA-b0Ni7scnnkV8sQ93_UT3ORN7ZiLT1gjfU" alt="Image" width="600" height="400" loading="lazy">
<em>Figma2Flutter is a great source of plugins</em></p>
<p>And finally, if you're stuck, find a designer. It can be a professional freelancer, a design agency, or just a friend with design skills. Either way, you'll still have the option of transforming your design using the Figma2Flutter or FigmaToFlutter plugins.</p>
<h3 id="heading-step-2-install-the-flutter-sdk-on-your-computer">Step 2: Install the Flutter SDK on Your Computer</h3>
<p>This step is very easy. Follow the link to the <a target="_blank" href="https://docs.flutter.dev/get-started/install">Flutter download page</a>. Choose your operating system and platform. Don't forget to check the software requirements. </p>
<p>Here, you might need to get some better hardware or install some extra packages, but I think you can do it using the tutorial on the Flutter website.</p>
<p><a target="_blank" href="https://docs.flutter.dev/get-started/install/windows/desktop">The Flutter tutorial</a> provides different options for a text editor or an integrated development environment (IDE). So, install the one you prefer, such as Android Studio, and install the Flutter SDK. When you're done with the tutorial, come back here, and we'll continue.</p>
<h3 id="heading-step-3-install-libraries-and-plugins-to-make-coding-easier">Step 3: Install Libraries and Plugins to Make Coding Easier</h3>
<p>Flutter libraries are like toolkits that come with pre-built parts to help you create code faster and easier. They come packed with all sorts of useful things like buttons, forms, animations and more. You can use them for everything from designing user interfaces to managing data and handling interactions. </p>
<p>Now, let's talk about plugins in Flutter. They are like special tools that help your application do more. </p>
<p>These plugins connect your Flutter code to the native features of your device, such as the camera or GPS. You can also easily add extra functionality to your app without having to write all the code on your own. Just write some initial code, hit enter and you'll get several lines of code from the example.</p>
<p><img src="https://lh7-us.googleusercontent.com/90Szu_VCkBADwx-I817QjLhKju50Rcl5K5vdq_D0L6gAS-8L29_fflJjQof4l5hZAuOOzmiraI3TKefuHgJR4Zm3cBfg35NCL14t2B_t8174787S65ygVulzay9ffHAFzoNSiL7jiSLfDNRpnY-zRIQ" alt="Image" width="600" height="400" loading="lazy">
<em>Settings -&gt; Plugins</em></p>
<p>You can also find practical ideas for your app on <a target="_blank" href="https://flutterawesome.com/">Flutter Awesome</a> and <a target="_blank" href="https://pub.dev/">pub.dev</a> with official libraries and community support. These sites host third-party developers who build their libraries on <a target="_blank" href="https://github.com">GitHub</a> and share them here. They’ve been tested on real projects and include a wide range of features such as connecting to servers, using Bluetooth, and adding visual effects. </p>
<p>Also, libraries are rated according to their popularity and quality. A high rating increases the chances that the library you choose will have as few bugs as possible.</p>
<p>If you run into trouble, don't worry! You can turn to <a target="_blank" href="https://flutterawesome.com/">Flutter Awesome</a> and <a target="_blank" href="https://pub.dev/">pub.dev</a> for help. Since Flutter is open source, you'll be able to find the latest updates and get help from other Flutter developers. And if there's a new problem, it's likely to be fixed in the next Flutter update. Easy peasy!</p>
<h3 id="heading-step-4-time-to-code">Step 4: Time to Code!</h3>
<p>Flutter is built and translated into machine code using the Dart programming language. Host devices understand this code, ensuring fast and effective performance. It’s an open, object-oriented programming language developed by Google. </p>
<p>Here are some of the key features of Dart:</p>
<ul>
<li>Object-oriented with classes, inheritance, and mixins</li>
<li>Statically typed for early error detection</li>
<li>Supports both just-in-time (JIT) and ahead-of-time (AOT) compilation</li>
<li>Automatic memory management with garbage collection</li>
<li>Built-in asynchronous programming resource</li>
<li>Consistent and simple syntax</li>
</ul>
<p>Dart is a programming language that allows you to describe any logic in a mobile application in an easy-to-understand way. Its features, such as the reactive programming version and asynchronous features, make it suitable for building high-performance, responsive apps that can run on iOS and Android. </p>
<p>Though not as widely adopted as some other languages, Dart's tight integration with Flutter has made it increasingly popular for mobile app improvement.</p>
<p>Now, let’s get back to the code! Just create your project on a standard blank page with the ability to launch and test your app.</p>
<p>Here’s our simple Flutter app, which displays a "Hello, Flutter!" message. It demonstrates the basic form of a Flutter app, along with the main access aspect, defining a static widget, and building a MaterialApp with a Scaffold, AppBar, and a targeted Text widget:</p>
<pre><code class="lang-dart"><span class="hljs-keyword">import</span> <span class="hljs-string">'package:flutter/material.dart'</span>;

<span class="hljs-keyword">void</span> main() {
  runApp(MyApp());
}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyApp</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">StatelessWidget</span> </span>{
  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text(<span class="hljs-string">'My First Flutter App'</span>),
        ),
        body: Center(
          child: Text(
            <span class="hljs-string">'Hello, Flutter!'</span>,
            style: TextStyle(fontSize: <span class="hljs-number">24</span>),
          ),
        ),
      ),
    );
  }
}
</code></pre>
<p>I strongly advise you to break your code into logical parts:</p>
<ul>
<li>UI</li>
<li>server communication</li>
<li>business logic</li>
<li>images</li>
<li>translation and more</li>
</ul>
<p>The plan allows you to organize your code and structure it easily.  </p>
<p>The next step is no less important than the coding itself. Choosing the right state management is like the basics of Flutter app development. There, you’ll get to know different insights like factors, Model-View-ViewModel architecture, and the difference between two popular Flutter management patterns. </p>
<p>So, what are we waiting for, let’s get right to it.</p>
<h3 id="heading-step-5-organize-your-project">Step 5: Organize your Project</h3>
<h4 id="heading-choose-the-right-state-management-solution">Choose the right state management solution</h4>
<p>State management controls the state of user interface elements such as text fields, buttons, and checkboxes in a graphical user interface (UI). It ensures that the state of other UI controls affect the state of a particular UI control. This technique is critical to ensure a smooth user experience in your app </p>
<p>To choose the right state management, consider factors such as the complexity of your project, your familiarity with different state management solutions, and the specific needs of your project. Google recommends starting with something basic like Vanilla, which is simple and easy to use.</p>
<p>Now let's look at the Model-View-ViewModel (MVVM) architecture, which is an important part of state management. And you have to choose between Provider and BloC. The whole difference between these two popular Flutter state management patterns is the following: </p>
<ul>
<li>For smaller projects and short deadlines, you can use Provider MVVM. But beware: the tradeoff is slightly slower performance and lower scalability.</li>
<li>For mid-size and large projects, Google suggests using BLoC. Such an approach allows you to manage the flexibility and the scale of your code. </li>
</ul>
<p>If you haven’t decided what to use for your project yet, here are some pages with descriptions and examples from the official library documentation:</p>
<ol>
<li><a target="_blank" href="https://pub.dev/packages/flutter_bloc">https://pub.dev/packages/flutter_bloc</a></li>
<li><a target="_blank" href="https://pub.dev/packages/provider">https://pub.dev/packages/provider</a></li>
<li><a target="_blank" href="https://docs.flutter.dev/data-and-backend/state-mgmt">https://docs.flutter.dev/data-and-backend/state-mgmt</a></li>
</ol>
<p>So, choose a state management option that fits your app.</p>
<h4 id="heading-separate-folders-for-screens">Separate folders for screens</h4>
<p>You should keep your code clean. To do this, it's a good idea to create separate folders for each screen, where the code files are stored. </p>
<p>For example, you'd have one folder for the splash screen and another for the login screen. Also, keep the user interface code separate from the business logic code, in separate files.</p>
<p>Your prepared Directory Structure should look something like this:</p>
<p><img src="https://lh7-us.googleusercontent.com/U5DSbWDz5PicgCi690wdIzoxFlkUVz9p-z0jHq74AHs3Cvu18kIpiQ2eo47sMo4Bkbwwi4_kKcyv-EU-ZmuNt368IzJvoLC-VEGDjpoSBIdTHyf0-CBNzkJcHg-1IqoURIBHVXj8pci-2dBVJ3xkBsk" alt="Image" width="600" height="400" loading="lazy">
<em>My folder organization</em></p>
<h4 id="heading-highly-decomposed-system">Highly decomposed system</h4>
<p>When you start working with a screen, you should carefully break it down into small parts. For example, on the main screen, there is a list of goods. This element should be in a separate file and even a single element of a list should be in a different file. </p>
<p>The more your system is decomposed, the easier it will be for you in the future to change a piece of code, as well as support and scale your product. </p>
<p>Here are some tips on how can you break down a system into smaller components effectively:</p>
<ul>
<li>Start by defining the goals, features, potential users, and limitations of your system to set clear boundaries.</li>
<li>Divide the system into smaller, independent pieces for easier management.</li>
<li>Assign specific functionality and interfaces to each component and how they interact.</li>
<li>To achieve the system goals, test all components and their interactions.</li>
<li>To optimize performance, refine components based on feedback.</li>
</ul>
<h4 id="heading-colors-and-styles">Colors and styles</h4>
<p>When you have the screens' structure, you can code the basic transition between them and the styles of an app. Flutter makes it easy to manage all your styles in one place, like button colors, fonts, and icons, so you can customize them easily. You code them in one chosen style—a bright or dark style scheme.</p>
<p>The next step is to code simple transitions and patterns that will make your app fit your style choices. As you'll see in the code example below, Flutter makes it very easy to control styles. This allows you to test and customize the look and feel of your app as much as you want.</p>
<p><img src="https://lh7-us.googleusercontent.com/Kzimy6hu5i143WNcWPIPCkLkoB1wz9LpZCEmHZ-UJ-ByYiysAI5QG42YaqXjk0Icelxx-SdxmHGwoBDnvPMhnOTCniDnO_cA4Xxd5siib0dnXfMbyGCzNJ9hpBJBd1WZw5ZRj9cCut-wsFwbOgMpARo" alt="Image" width="600" height="400" loading="lazy">
<em>My file for managing themes</em></p>
<p>And here’s some useful code as an example, so you can experiment and try your own ideas to your heart's content.</p>
<pre><code class="lang-dart"><span class="hljs-meta">@override</span>
Widget build(BuildContext context) {
 <span class="hljs-keyword">return</span> TextField(
   controller: controller,
   focusNode: focusNode,
   style: AppStyles.getCitySearchTextStyle(),
   decoration: InputDecoration(
     hintText: context.tr().searchHint,
     hintStyle: AppStyles.getSearchHintStyle(),
     contentPadding: AppPaddings.horizontalPaddingM,
     isDense: <span class="hljs-keyword">true</span>,
     border: InputBorder.none,
     focusedBorder: InputBorder.none,
     enabledBorder: InputBorder.none,
     errorBorder: InputBorder.none,
     disabledBorder: InputBorder.none,
   ),
 );
}
</code></pre>
<h4 id="heading-setting-up-the-router">Setting up the router</h4>
<p>There is a robust navigation tool for managing transitions between specific monitors within the application. There are two main navigation techniques you can use in Flutter:</p>
<ul>
<li>Navigator: this is a navigation widget that is built into Flutter. It allows you to slide and lift the screen from the stack, providing a simple forward and backward navigation experience. You can use named and anonymous routes to understand the application's video display units.</li>
<li>Routing Library: you can use a library like go_router or auto_router if you need more complex navigation. This package provides features such as deep link analysis and fine-grained control of navigation stacks.</li>
</ul>
<p>Here’s also the <a target="_blank" href="https://docs.flutter.dev/cookbook/navigation">Flutter navigation documentation</a>, in case you need something.</p>
<p>Now you should set up the router as shown in the example on the screen and let me know if everything worked well for you:</p>
<h4 id="heading-simple-navigation-between-screens">Simple navigation between screens</h4>
<p>Using the <code>Navigator.Push</code> approach and <code>MaterialPageRoute</code>, this example shows a way to navigate between screens (or routes) in a Flutter app.</p>
<pre><code class="lang-dart">Navigator.push(
  context,
  MaterialPageRoute(builder: (context) =&gt; SecondScreen())
</code></pre>
<p><img src="https://lh7-us.googleusercontent.com/cv3qVAKCIT0XjdyyFJg9Lt6Vu9zLdENES21LD9_z9JJJSUV_rL6Wiu0kRakHjSR6jgzl77-0U45GQkgX9tUEQbAKTvCEawJp7o4HSjIUrJ1u0rWAfvIx3jELK2E64Eb9xBtDQYS-GFACr64SK0WLRLg" alt="Image" width="600" height="400" loading="lazy">
<em>My file for managing the router</em></p>
<p>So, now you can start setting up languages for your app because it’s as important as having the right UI elements in the project.</p>
<h4 id="heading-languages">Languages</h4>
<p>You'll want to localize your app, so that users can select different languages or have it automatically localized.</p>
<p>Google provides recommendations on the approach that best suits your needs and technical requirements which you can <a target="_blank" href="https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization">read more about here</a>.</p>
<p>Start by creating a file of translations for one language. If needed, you can add more languages later.</p>
<p><img src="https://lh7-us.googleusercontent.com/DOZzrnB6iANF95EyDh9EnlFeGJ057zLaudUk7Ej5pP-5z12SMT7W5Ceh3Laf10i7izm7mCloUz29goBSyh4G25LqTWeo8hu1kJXfLHU3baEAaWk0l3lcamLBlTZqkMYLIQzvxylphHh6fZKigPcTvaY" alt="Image" width="600" height="400" loading="lazy">
<em>My localization into Ukrainian</em></p>
<pre><code class="lang-dart"><span class="hljs-keyword">return</span> Center(
 child: Text(Localization.from(context).continueText),
)
</code></pre>
<p>Once you finish this part, you will have the basic elements of an app – styles, localization, screen structures, and transitions. And then, you can start programming each screen.</p>
<h3 id="heading-step-6-code-the-ui-elements-and-interactions-widgets">Step 6: Code the UI Elements and Interactions (Widgets)</h3>
<p>At this stage, you'll code the basic elements of a screen's UI and the logic that will control the UI. For example, you might develop a logic for browsing a list of products from a remote server by selecting an item from a goods list. Then you write code that converts a particular data model into an item.</p>
<p>Flutter uses ready-made widgets. In fact, Flutter is all about widgets. One of the innovative things about them is that they're reusable UI components that you can integrate directly into the app instead of building them from scratch. Compare this to different strategies that use exclusive objects (layouts, perspectives, controllers), where Flutter has a single, unique object model.</p>
<p>Every object in Flutter is a widget – from buttons to pads to text, and existing building blocks to the lowest levels of customization. You'll be using the same tools that the Flutter team uses to build theirs.</p>
<p>Widgets in Flutter are available for rendering but they can also cause a problem with the overall structure. You'll need to plan the form because large apps can require up to ten layers of code to create a primary element. For an excellent article with lots of ready-made widgets, check out <a target="_blank" href="https://proandroiddev.com/my-flutter-adventure-widgets-8ea08a7067eb">this guide</a>. </p>
<p>Otherwise, here's a short but useful list of must-have code elements for your basic app:</p>
<h4 id="heading-element-1-create-lists">Element 1: Create lists</h4>
<p>This part of the code demonstrates a way to create a list of items using <code>ListView.Builder</code>. It takes a list of items and generates <code>ListTile</code> widgets for each item, allowing you to address faucet events on the gadgets:</p>
<pre><code class="lang-dart">
  <span class="hljs-keyword">final</span> <span class="hljs-built_in">List</span>&lt;<span class="hljs-built_in">String</span>&gt; items =
      <span class="hljs-built_in">List</span>&lt;<span class="hljs-built_in">String</span>&gt;.generate(<span class="hljs-number">10</span>, (<span class="hljs-built_in">int</span> index) =&gt; <span class="hljs-string">"Item with number <span class="hljs-subst">$index</span>"</span>);

  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> Scaffold(
      body: ListView.builder(
        itemCount: items.length,
        itemBuilder: (BuildContext context, <span class="hljs-built_in">int</span> index) {
          <span class="hljs-keyword">return</span> ListTile(
            title: Text(items[index]),
            onTap: () {
              ScaffoldMessenger.of(context)
                  .showSnackBar(SnackBar(content: Text(<span class="hljs-string">'Item <span class="hljs-subst">$index</span> tapped!'</span>)));
            },
          );
        },
      ),
    );
  }
</code></pre>
<p>Here is how your list should look after coding:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/image-29.png" alt="Image" width="600" height="400" loading="lazy">
<em>View of the list</em></p>
<h4 id="heading-element-2-api-request">Element 2: API request</h4>
<p>This code shows how to get data from an API using the HTTP bundle. It makes a GET request to the desired URL and handles the response, processing any fetched records or managing errors:</p>
<pre><code class="lang-dart">Future&lt;<span class="hljs-keyword">void</span>&gt; fetchData() <span class="hljs-keyword">async</span> {
  <span class="hljs-keyword">final</span> response = <span class="hljs-keyword">await</span> http.<span class="hljs-keyword">get</span>(<span class="hljs-built_in">Uri</span>.parse(<span class="hljs-string">'https://api.example.com/data'</span>));
  <span class="hljs-keyword">if</span> (response.statusCode == <span class="hljs-number">200</span>) {
    <span class="hljs-keyword">final</span> data = json.decode(response.body);
    <span class="hljs-comment">// Process fetched data here</span>
    <span class="hljs-built_in">print</span>(data);
  } <span class="hljs-keyword">else</span> {
    <span class="hljs-comment">// Handle error</span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">'Failed to fetch data: <span class="hljs-subst">${response.statusCode}</span>'</span>);
  }
}
</code></pre>
<h4 id="heading-element-3-styling-text">Element 3: Styling text</h4>
<p>Here, you can see a demonstration of how to display two texts in column and style textual content in Flutter the usage of the <code>TextStyle</code> magnificence, which allows you to customize styles like coloring, font size, font weight and font style:</p>
<pre><code class="lang-dart">
  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">const</span> Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: &lt;Widget&gt;[
            Text(
              <span class="hljs-string">'Hello!'</span>,
              style: TextStyle(
                color: Colors.red,
                fontSize: <span class="hljs-number">36</span>,
                fontWeight: FontWeight.bold,
                fontStyle: FontStyle.italic,
              ),
            ),
            Text(
              <span class="hljs-string">'Flutter'</span>,
              style: TextStyle(
                color: Colors.blue,
                fontSize: <span class="hljs-number">18</span>,
                fontWeight: FontWeight.bold,
                fontStyle: FontStyle.italic,
              ),
            ),
          ],
        ),
      ),
    );
  }
</code></pre>
<p>The result looks great, doesn't it?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/image-30.png" alt="Image" width="600" height="400" loading="lazy">
<em>View of the styled text</em></p>
<h4 id="heading-element-4-custom-styled-buttons">Element 4: Custom-styled buttons</h4>
<p>This one shows a way to create a custom-styled button using the <code>MaterialButton</code> widget. It allows you to personalize properties such as height, top, shape, color and a widget (in this situation, a text widget with custom styling):</p>
<pre><code class="lang-dart">
  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> Scaffold(
      body: Center(
        child: MaterialButton(
          elevation: <span class="hljs-number">0</span>,
          height: <span class="hljs-number">50</span>,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(<span class="hljs-number">20</span>),
          ),
          color: Colors.blue,
          onPressed: () {
            ScaffoldMessenger.of(context)
                .showSnackBar(<span class="hljs-keyword">const</span> SnackBar(content: Text(<span class="hljs-string">"Button tapped!"</span>)));
          },
          child: <span class="hljs-keyword">const</span> Padding(
            padding: EdgeInsets.all(<span class="hljs-number">16</span>),
            child: Text(
              <span class="hljs-string">"Hello button"</span>,
              textAlign: TextAlign.center,
              style: TextStyle(
                color: Colors.white,
                fontSize: <span class="hljs-number">12</span>,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
        ),
      ),
    );
  }
</code></pre>
<p>Hello-button is ready!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/image-31.png" alt="Image" width="600" height="400" loading="lazy">
<em>View of the custom styled button</em></p>
<h4 id="heading-element-5-icons">Element 5: Icons</h4>
<p>This one suggests a way to display an icon (in this situation, a celebrity icon) in your Flutter app, allowing you to customize its color and length:</p>
<pre><code class="lang-dart">Icon(
  Icons.star,
  color: Colors.yellow,
  size: <span class="hljs-number">24</span>,
)
</code></pre>
<h4 id="heading-element-6-displaying-images-from-the-network">Element 6: Displaying images from the network</h4>
<p>By specifying the photo URL, width, top and health, this code demonstrates how to display a photo from a network URL using the <code>Image.Network</code> widget:</p>
<pre><code class="lang-dart">Image.network(
  <span class="hljs-string">'https://example.com/image.jpg'</span>,
  width: <span class="hljs-number">200</span>,
  height: <span class="hljs-number">200</span>,
  fit: BoxFit.cover,
)
</code></pre>
<h4 id="heading-element-7-simple-animated-container">Element 7: Simple animated container</h4>
<p>This code creates an active container that changes its size (width and top) when a true set (<code>_isExpanded</code>) is changed, with a smooth animation described using the required period and curve:</p>
<pre><code class="lang-dart">AnimatedContainer(
  width: _isExpanded ? <span class="hljs-number">200</span> : <span class="hljs-number">100</span>,
  height: _isExpanded ? <span class="hljs-number">200</span> : <span class="hljs-number">100</span>,
  color: Colors.blue,
  duration: <span class="hljs-built_in">Duration</span>(milliseconds: <span class="hljs-number">500</span>),
  curve: Curves.easeInOut,
)
</code></pre>
<h4 id="heading-element-8-handling-text-input">Element 8: Handling text input</h4>
<p>This code demonstrates how to take care of textual content input using the TextField widget, providing a callback property to handle text changes and such decorations (like label) to the data entry process:</p>
<pre><code class="lang-dart">
  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">const</span> Scaffold(
      body: Padding(
        padding: EdgeInsets.all(<span class="hljs-number">16.0</span>),
        child: TextField(
          decoration: InputDecoration(
            focusedBorder: OutlineInputBorder(
              borderSide: BorderSide(color: Colors.greenAccent, width: <span class="hljs-number">5.0</span>),
            ),
            enabledBorder: OutlineInputBorder(
              borderSide: BorderSide(color: Colors.red, width: <span class="hljs-number">5.0</span>),
            ),
            hintText: <span class="hljs-string">'Enter your name'</span>,
          ),
        ),
      ),
    );
  }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/image-32.png" alt="Image" width="600" height="400" loading="lazy">
<em>View of the text handling</em></p>
<h3 id="heading-step-7-do-splash-screenwriting">Step 7: Do Splash Screenwriting</h3>
<p>Each application starts with a splash screen that displays a logo or a loading indicator while the app is getting ready. After that, the app loads the necessary data and the splash screen appears.</p>
<p>So, let's create our first screen and things will get a lot easier from there. You already have a lot of widgets in your arsenal, but you can copy and paste some of the code below. You can see more of my code on the screen, but I'll leave the rest for you to improve.</p>
<p>Below, you can see my images for writing a splash screen:</p>
<p><img src="https://lh7-us.googleusercontent.com/tPabzLQbBRwNIBLaitdmqZdqbUGuGwiNVD_X-dgGiOKMZLUbv50BYL_bU1lLxHTtMI25xScW2QeQ9qRItt_aXp5w_C9xGj7xWLpjtE-rq5AN0pr5AqaI5UGaMd4e2FWS-ey_v2Od31wwBpSzvxamKDY" alt="Image" width="600" height="400" loading="lazy">
<em>My splash screen code</em></p>
<pre><code class="lang-dart">IntrinsicWidth(
 child: Column(
   mainAxisSize: MainAxisSize.min,
   children: [
     <span class="hljs-keyword">const</span> FlutterLogo(
       size: <span class="hljs-number">250</span>,
     ),
     <span class="hljs-keyword">const</span> Gap(AppSizes.sizeM),
     Container(
       padding: AppPaddings.allPaddingXS,
       decoration: <span class="hljs-keyword">const</span> BoxDecoration(
         color: AppColors.alabaster,
         borderRadius: AppBordersRadius.borderRadiusAll100,
       ),
       child: <span class="hljs-keyword">const</span> LinearProgressIndicator(
         backgroundColor: AppColors.alabaster,
         borderRadius: AppBordersRadius.borderRadiusAll100,
         minHeight: AppSizes.sizeSSM,
       ),
     )
   ],
 ),
)
</code></pre>
<p><img src="https://lh7-us.googleusercontent.com/OAsCqqs-qai8W6FMItKdWqdjCM_DaBW4jnBD02yvOVGRIGAIFoMmBTDTLg2H1atQQdwc8MOVos18GnJTBiHvL8RqVmYkk4T9jQiqzlPn9-sSr30ywM8TVCZR9M1H7Z-RkEFekHfDGrxxB5utONCbOYs" alt="Image" width="600" height="400" loading="lazy">
<em>This is how the screen looks from the previous code</em></p>
<h3 id="heading-step-8-demonstrating-changes">Step 8: Demonstrating Changes</h3>
<p>Once you finish a section of your code, press a button in Android Studio to quickly see the changes on your screen. </p>
<p>This is one of Flutter's key features. You don't have to restart your project or rebuild the entire application every time you make a change. With Flutter, you can use hot reload or hot restart. Press a button and your changes will appear on your phone or website in a second.</p>
<p>Here’s how your changes may look on your screen:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/IMG_1562.JPG" alt="Image" width="600" height="400" loading="lazy">
<em>Demonstrating changes</em></p>
<p>At the moment, your app is almost ready, but here are a few important steps left. One of them is testing. That’s the only way you can check that everything is working fine. And if it doesn’t – you can easily see the mistake and fix it.</p>
<h3 id="heading-step-9-test-your-app">Step 9: Test Your App</h3>
<p>To make sure your app works and everything is built correctly, you need to test it. For example, you might have programmed one feature and accidentally broken the other. Also, if you have any platform-dependent elements, such as Bluetooth or NFC, you’ll need to check how they work in your application.  </p>
<p>But testing can have positive and negative test cases. Positive cases should always be tested. For example, an app should work with a correct login and password. Negative cases are when a QA engineer tries to "break" a product by entering the wrong types of data (instead of email, we enter "11111111"). Negative cases are needed to minimize user errors and to write understandable check prompts ("Please, enter your email here").</p>
<p>As you can see, this underscores the importance of thorough testing. By simulating user errors, we can ensure our apps are working fine and deliver a smooth UX. </p>
<p>In the example below with a login, you can see the proper testing functionality:</p>
<pre><code class="lang-dart">  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">const</span> Scaffold(
      body: Padding(
        padding: <span class="hljs-keyword">const</span> EdgeInsets.all(<span class="hljs-number">16.0</span>),
        child: Column(
          children: [
           TextField(
            controller: textEditingController,
            decoration: <span class="hljs-keyword">const</span> InputDecoration(
             focusedBorder: OutlineInputBorder(
              borderSide: BorderSide(color: Colors.greenAccent, width: <span class="hljs-number">5.0</span>),
            ),
            enabledBorder: OutlineInputBorder(
              borderSide: BorderSide(color: Colors.red, width: <span class="hljs-number">5.0</span>),
                borderSide: BorderSide(color: Colors.red, width: <span class="hljs-number">5.0</span>),
            ),
            hintText: <span class="hljs-string">'Enter your name'</span>,
          ),
        ),
        <span class="hljs-keyword">const</span> SizedBox(
         height: <span class="hljs-number">16</span>,
        ),
        MaterialButton(
         elevation: <span class="hljs-number">0</span>,
         height:<span class="hljs-number">50</span>,
         shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(<span class="hljs-number">20</span>),
         ),
         color: Colors.blue,
         onPressed:(){
          <span class="hljs-keyword">if</span> (textEditingController.text.trim().isEmpty){
           ScaffoldMessenger.of(context).showSnackBar(
            <span class="hljs-keyword">const</span> SnackBar(
             content: Text(<span class="hljs-string">"You should enter your name"</span>),
            ),
           );
          }<span class="hljs-keyword">else</span>{
         ScaffoldMessenger.of(context).showSnackBar(
         SnackBar(
         content:Text(
         <span class="hljs-string">"Your name is <span class="hljs-subst">${textEditingController.text.trim()}</span>"</span>,
        ),
       ),
      );
     }
    },
    child: <span class="hljs-keyword">const</span> Padding(
     padding: EdgeInsets.all(<span class="hljs-number">16</span>),
     child: Text(
      <span class="hljs-string">"Display my name"</span>,
      textAlign: TextAlign.center,
      style: TextStyle(
       color: Colors.white,
       fontSize: <span class="hljs-number">12</span>
       fontWeight: FontWeight.bold,
      ),
     ),
    ),
   ),
  ],
 ),
),
);
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/image-33.png" alt="Image" width="600" height="400" loading="lazy">
<em>the testing view</em></p>
<h3 id="heading-step-10-code-styles">Step 10: Code Styles</h3>
<p>To maintain a consistent style, it's important to follow certain standards when coding. Google recommends a certain code style – a way of calling variables or methods and dimensions. Libraries and plugins (analyzers) for Android Studio mark up code and suggest changes as you write your code. </p>
<p>Here are a few of them I can recommend:</p>
<ul>
<li><a target="_blank" href="https://pub.dev/packages/dio">Dio</a> for network requests</li>
<li><a target="_blank" href="https://pub.dev/packages/bloc_concurrency">Flutter bloc + bloc + bloc</a> concurrency to use BLoC state management</li>
<li><a target="_blank" href="https://docs.flutter.dev/data-and-backend/state-mgmt/simple">Provider</a> to use Provider state management</li>
<li><a target="_blank" href="https://pub.dev/packages/auto_route">Auto_route</a> + <a target="_blank" href="https://pub.dev/packages/auto_route_generator">Auto Route Generator</a> for routing</li>
</ul>
<p>There are a lot more you can find, from plugins to cache any network image to native splash generations. Code styles are required to ensure code quality and future code support for the largest projects.</p>
<p>You can <a target="_blank" href="https://docs.flutter.dev/tools/formatting">read more in the Flutter docs here</a>.</p>
<h3 id="heading-step-11-publish-your-app">Step 11: Publish Your App</h3>
<p>When you’re done coding and testing your app, you should test its performance on the platforms where you plan to have it – iOS, Android, and Web. </p>
<p>The first step is to publish a developer account creation on each system. After that, you'll need to pay a certain amount of money (once a year in Apple's case) and then download the apps. Then, <a target="_blank" href="https://support.google.com/googleplay/android-developer/answer/9859152?hl=en">Google and Apple employees review the apps</a> for compliance with requirements, standards and laws. If all goes well, the application will be released.</p>
<p>After overcoming any challenges, remember that a successful launch is just the beginning. Take a look at the images below and make sure your app is ready to be discovered by users:</p>
<p><img src="https://lh7-us.googleusercontent.com/V7Dinp2-PzzMP_WXNlPyjiD8TmyWMRPlzH-NA_zPspEDSlCMFvF2hWNjenMg_pFNmY_w8trDKBNOKhTXDVhuVQ9NNcSlSNIPyW8qzFM38zRLLyY_aj-jCSpLabSkiFP7zHsmjDFsHL5INg1rvD1UD-w" alt="Image" width="600" height="400" loading="lazy">
<em>Google Play release dashboard</em></p>
<p><img src="https://lh7-us.googleusercontent.com/s0yHjjeKHt38vxojQONVe1FKAbh4RqjeFHFprV2kKkAcfiFYiF9UYr-FCrF8O1u3J1wyuo7eAMzfICA57wfbPEgmGEyRrHwuKuewICvsATNuxg6DZLV60mAhHrE8_IuNIM46-Nd4epEYZGAxoBRyJfI" alt="Image" width="600" height="400" loading="lazy">
<em>App Store release dashboard</em></p>
<p>To publish your Flutter app to the App Store, you have to complete a few steps. </p>
<p>First of all, register for the Apple Developer Program and upload certificates to sign your app. After that, create an App Store Connect account to manage your app. Now, using Xcode, upload your app for App Store distribution. When everything is done, your last step is to enter details such as screenshots, description, and pricing for your app. </p>
<p>Sounds pretty easy, doesn't it? If you are looking for more information, just visit the <a target="_blank" href="https://developer.apple.com/ios/submit/">Apple developer page</a> to learn more.</p>
<p>Almost the same goes for the Google Play Store. Sign up for a Google Play Developer account and link it to a Google Wallet Merchant Account for in-app purchases (if necessary). Then, just make sure that your app meets their technical requirements and guidelines. This includes things like app signing, privacy policy, and content rating. </p>
<p>During the third step, you have to fill in details about your app that users will see in the Play Store. Now, upload your app bundle or just an APK file and configure pricing and distribution settings. You may have to wait a little, as Google will take some time to review your app to ensure it fits their policies.</p>
<p>Once your app is approved, you can finally publish it to the Google Play Store and make it available for users! This was just an overview – so to learn more about the process, <a target="_blank" href="https://support.google.com/googleplay/android-developer/answer/9859751">visit the official page</a> and get as much information as you need.</p>
<p>Now, you're ready to take the world. Just make sure you carefully check all the settings before publishing your app. You can set a clear date and time for publishing your Flutter app, manage production releases, and more. To be honest with you, there are way more features than you can imagine, so I'll let you do it by yourself.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>All right, now your app is ready. In this tutorial, I've given you the fundamentals of building a basic Flutter mobile app. Don't be afraid to take your unique idea and to run with it. </p>
<p>As I’ve already told you, the Flutter community is a treasure of information, so, feel free to jump in and explore it! </p>
<p>By the way, here's another golden piece of advice from me to keep in your developer toolbox: start simple, keep your code clean and organized, and test as you build. With these basics and a bit of effort, you'll quickly build a great Flutter app!</p>
<p>I would also like to thank my development partner in crime Mikhailo, who was helping me all the time creating this guide for you. Without his technical expertise, I wouldn't even know how to properly tell you about all these instructions, thanks again!</p>
<h3 id="heading-do-you-have-an-idea-for-a-flutter-project">Do you have an idea for a Flutter project?</h3>
<p>My company Covent IT is an early adopter of the <a target="_blank" href="https://coventit.com/services/flutter-development">Flutter framework</a> and a well-established mobile app development company in general. In case you have a promising project in mind, feel free to <a target="_blank" href="https://coventit.com/contact-us">request a consultation for a Flutter project</a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why You Should Work With Meteor in 2020 ]]>
                </title>
                <description>
                    <![CDATA[ Meteor, an allegedly dead development platform, is still alive and can bring massive value to your everyday coding experience. Meteor appeared at the beginning of 2012, rocking the web development world. The possibility of bridging the gap between th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/should-i-work-with-meteor-in-2020/</link>
                <guid isPermaLink="false">66be14d1b712ab343b0b9133</guid>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Meteor ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Fri, 24 Apr 2020 19:40:56 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/04/work-with-meteor-in-2020.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p><em>Meteor, an allegedly dead development platform, is still alive and can bring massive value to your everyday coding experience.</em></p>
<p>Meteor appeared at the beginning of 2012, rocking the web development world. The possibility of bridging the gap between the server and client sides of a particular website or web app was genuinely tempting. </p>
<p>Many experts thought that this capability alone should have turned the platform into a mainstream industry standard. Nevertheless, eight years later, many people claim that Meteor is dead.</p>
<p>Is that so? And is there any rational justification for learning Meteor? This article will give you a definitive answer.</p>
<h2 id="heading-meteor-is-dead-long-live-meteor"><strong>Meteor is Dead! Long Live Meteor!</strong></h2>
<p>Many developers believe that Meteor is dead. The popular explanation is simple: being introduced in 2012, it already had a promising set of features in 2015 but failed to extend them significantly. </p>
<p>Some of you might have even heard of the problems with the funding of the development team, too. For many people, this fact alone is enough to forget about the platform once and for all.</p>
<p>However, the reality is much more optimistic than it may seem. Today, the developers of Meteor receive stable funding from Tiny, one of the most reliable investment funds in IT. The version history also shows that the development platform is far from being dead, with the most recent iterations having a proud 1.10.1 designation released in February 2020. </p>
<p>Thus, if you have always secretly liked Meteor but were afraid to choose the platform due to the constant reports of it being dead, now is the perfect opportunity to hop onto the hype train.</p>
<p><em>The reports of Meteor's death are greatly exaggerated, and the possibility of its success is greatly underestimated.</em></p>
<h2 id="heading-unprecedented-simplicity-the-key-features-of-meteor"><strong>Unprecedented Simplicity: The Key Features of Meteor</strong></h2>
<p>Now that we have clarified the status of Meteor, it is time to describe some of its killer features. Meteor is undoubtedly among the most feature-rich and, at the same time, easy-to-use JavaScript frameworks today.</p>
<h3 id="heading-killer-feature-1-unified-client-and-server-development"><strong>Killer Feature 1: Unified Client and Server Development</strong></h3>
<p>Meteor, as we have mentioned before, is notable for its ability to bridge the gap between the server and client sides of any project. Thus, every aspect of your website can be developed solely via JavaScript. </p>
<p>The benefits of this feature are boundless in the modern development world, and are valuable for both fledgling and the experienced developers.</p>
<p>Above all, this approach allows developers to create projects without experience with other programming languages.</p>
<p>Thus, a talented but inexperienced JavaScript programmer can easily maintain several Meteor projects without any problems. Experienced developers can go even further, maintaining whole ecosystems of services and products via the Meteor platform. </p>
<p>Consequently, the adoption of Meteor in your company can be an extraordinary boon for all involved parties.</p>
<ul>
<li>Your programmers will be able to develop more and spend less time on the exhausting process of learning additional frameworks and programming languages.</li>
<li>Your customers will enjoy lower pricing on services.</li>
<li>And you will reap higher profits after the adoption of the framework.</li>
</ul>
<p>Independent developers can also be the major benefactors of the development platform today. After all, the ability to use only one language for personal programs will give you an opportunity to take on more freelance projects.</p>
<h3 id="heading-killer-feature-2-transforming-web-applications-into-smartphone-programs"><strong>Killer Feature 2: Transforming Web Applications into Smartphone Programs</strong></h3>
<p>Every company that develops a specific web application seeks to have a smartphone version of its product. The benefits of such a strategy are rather obvious: after all, everyone has an Android or iOS phone today. </p>
<p>However, the businesses that seek smartphone versions of their apps often face the problem of massive development costs. The mobile versions of their web apps are often recreated from scratch. </p>
<p>If they are lucky, this process might only involve the client-side platforms. However, smartphone development frameworks are so divergent that sometimes both the client and the server have to be extended.</p>
<p>We are quite sure that you have seen frustrating situations in which certain web apps only have iOS or Android clients for smartphones. The lack of unity regarding frameworks is the main culprit in this case.</p>
<p>Meteor offers an elegant and extensible solution to this problem. Due to the potent integration of Meteor with Apache Cordova, you can quickly turn your web application into a smartphone app without any significant investment. </p>
<p>On the purely technical side, such a transition is possible due to the embedded container capabilities of Meteor and Cordova. All you would have to do is insert your web app into a pre-developed smartphone container.</p>
<p>Another critical design choice is the approach Meteor takes with data. Meteor uses data on the wire – the server doesn't send HTML but data, which is then rendered by the client. If the design of your web app is already touchscreen-friendly, you can immediately push your new program into the App Store or Google Play Market with Meteor.</p>
<p>If that is not the case, all you would have to do is slightly adjust the design using the JavaScript language. Essentially, the process would be similar to developing a mobile version of a website.</p>
<p>Once again, such an approach will save you unprecedented amounts of time and money. Instead of having to hire some dedicated smartphone developers, you will be able to fully concentrate on your web apps. This feature is also vital from a purely aesthetic standpoint. Meteor is one of the best tools when it comes to making the design of your products uniform.</p>
<p>The use of a unified platform will help you establish a professional standardized look in all business spheres.</p>
<h3 id="heading-killer-feature-3-real-time-updates"><strong>Killer Feature 3: Real-Time Updates</strong></h3>
<p>Meteor is also capable of real-time updates, or so-called "full-stack reactivity." The changes you make immediately appear across all databases and style templates. In this way, you would be immediately able to see critical bugs and double check the features without having to tediously update web pages and certain programs.</p>
<p>This feature is of vital importance when it comes to large teams. The immediate updates are visible to all team members, creating a perfect environment for collaborative development. Ultimately, your web apps and smartphone programs will significantly benefit from this feature as it makes bug fixing incredibly simple.</p>
<p>Without going into details, one way of implementing the feature is a publication/subscription functionality.</p>
<pre><code class="lang-js"><span class="hljs-comment">// Code on the server side</span>
<span class="hljs-keyword">const</span> MyAwesomeData = <span class="hljs-keyword">new</span> Mongo.Collection(<span class="hljs-string">'myAwesomeData'</span>);
Meteor.publish(<span class="hljs-string">'myAwesomeData'</span>, <span class="hljs-function">() =&gt;</span> {
<span class="hljs-keyword">return</span> MyAwesomeData.find() 
})
</code></pre>
<p>It creates a publication for everything in the collection <code>myAwesomeData</code>. This publish function is requested whenever a client subscribes to it. So, let's create a subscription.</p>
<pre><code class="lang-js"><span class="hljs-comment">// Code on the client side</span>
Meteor.subscribe(<span class="hljs-string">'myAwesomeData'</span>)
</code></pre>
<p>Now, all the subscribers will receive updates whenever a publication is requested. Also, we can receive data using a specific parameter.</p>
<pre><code class="lang-js"><span class="hljs-comment">// Code on the server side</span>
Meteor.publish(<span class="hljs-string">'myAwesomeData'</span>, <span class="hljs-function">(<span class="hljs-params">userName</span>) =&gt;</span> {
<span class="hljs-keyword">return</span> Comments.find({ <span class="hljs-attr">userName</span>: userName })
})
</code></pre>
<p>The last piece of code retrieves data using a specific user name:</p>
<pre><code class="lang-js"><span class="hljs-comment">// Code on the client side</span>
<span class="hljs-keyword">const</span> userName = <span class="hljs-string">'Jack Sparrow'</span>
Meteor.subscribe(<span class="hljs-string">'myAwesomeData'</span>, userName)
</code></pre>
<h3 id="heading-killer-feature-4-easy-package-management"><strong>Killer Feature 4: Easy Package Management</strong></h3>
<p>Often, the deployment of modified versions of development frameworks requires a significant expenditure of time and resources. Meteor, however, is extremely user-friendly in this regard, offering some of the best package management tools on the market.</p>
<p>Today, the community of the Meteor developers maintains a gargantuan database of extensions on the <a target="_blank" href="https://atmospherejs.com/">AtmosphereJs website</a>. Some of the popular extensions include tools for embedding ReactJS and Vulcan Bootstrap.</p>
<p>To install an Atmosphere package, you simply run the following command <code>meteor add nameOfThePackage</code>:</p>
<pre><code class="lang-js">meteor add react-meteor-data
</code></pre>
<p>And to delete a package:</p>
<pre><code>meteor remove react-meteor-data
</code></pre><p>To import and start using it in code, you should use the "meteor/" prefix:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { useTracker } <span class="hljs-keyword">from</span> <span class="hljs-string">'meteor/react-meteor-data'</span>;
</code></pre>
<p>More information can be found here: <a target="_blank" href="https://guide.meteor.com/using-atmosphere-packages.html#peer-npm-dependencies">https://guide.meteor.com/using-atmosphere-packages.html#peer-npm-dependencies</a></p>
<p>This feature is especially impressive considering its simplicity. The installation process only requires a set of simple commands that almost any advanced Windows or Linux user should already be comfortable with.</p>
<p>Even if you are an absolute beginner, you should have absolutely no problems with setting up a basis for even the most complex programs.</p>
<p>Thus, any person can swiftly create app prototypes and make them feature-rich by using this robust library of extensions and the advanced package management tools provided by some of the Meteor developers and the active community that surrounds the framework.</p>
<h3 id="heading-killer-feature-5-extensive-learning-resources-and-documentation">Killer Feature 5: Extensive Learning Resources and Documentation</h3>
<p>One of the key problems of many open-source projects is the complete lack of proper documentation. This problem led to the death of countless promising projects as outside developers were often forced to essentially reverse-engineer their features.</p>
<p>Do not worry – Meteor is unlikely to fall victim to this problem. After all, the website of the platform has a powerful set of tutorials for beginners and a whole subsection is dedicated to documentation.</p>
<p>We recommend these resources to both the beginners and the advanced users.</p>
<p>If you are new to web development, Meteor tutorials will help you create your first web apps (one of the highlights includes a Whatsapp clone).</p>
<p>If you are an advanced developer, the tutorials will quickly teach you the basics of Meteor. After that, you will just need to check the documentation from time to time to resolve some issues.</p>
<h3 id="heading-killer-feature-6-active-community">Killer Feature 6: Active Community</h3>
<p>If you fail to find information on the Meteor website, you can always resort to the robust forums.</p>
<p>We have spoken extensively about the death of Meteor in the first section of this article. Few facts defy this claim as much as the community of Meteor users.</p>
<p>As the massive extension library of Meteor proves, the framework receives active support not only from its developers but also from the community. </p>
<p>At the time of Meteor's presumed death, the interest from developers regarding the platform was seeing unprecedented growth. Consequently, the framework now has an incredibly passionate user base which is always ready to troubleshoot your problems. </p>
<p>Many people (including myself) know that Meteor’s community is among the nicest on the Internet. You are unlikely to meet any hostility there, and many active members are eager to help newcomers.</p>
<p>Since Meteor developers have received a significant financial boost from the Tiny Investment Fund, this community is likely to grow even more. Thus, your adoption of Meteor is likely to be very smooth as countless developers will be be ready to assist you.</p>
<p><img src="https://lh6.googleusercontent.com/9eJoT3zwUJddKFYwa2-6Bu9cVNiZqECb3JrcYw3w3--9D8Y0uqqpOAwITp9mVLDQfZtgw3j5wVSTd6eK6q92Zrh-751kyO37gePsWnuAMb81XWKrOWI3Bu1lJLhqH0sNzXxG0aI" alt="Image" width="600" height="400" loading="lazy">
<em>Info-graphic. The Popularity Levels of Meteor. Courtesy of BuiltWith Trends Service. Accurate as of April 2020. Link: [https://trends.builtwith.com/framework/Meteor](Infographic 1. The Popularity Levels of Meteor. Courtesy of BuiltWith Trends Service. Accurate as of April 2020. Link: https://trends.builtwith.com/framework/Meteor.).</em></p>
<h2 id="heading-conclusion-so-should-you-learn-meteor"><strong>Conclusion: So, Should You Learn Meteor?</strong></h2>
<p>The short answer is simple: yes, undoubtedly.</p>
<p>Knowledge of the Meteor platform is the perfect addition to any developer's portfolio.</p>
<ul>
<li>If you primarily develop with JavaScript, the platform will help you or your company cut time expenditures on creating separate client and server projects.</li>
<li>If you are an independent developer who uses C# or Ruby, Meteor can be a perfect entry point into JavaScript development. It will allow you to create independent web app projects with one programming language.</li>
<li>If you are an absolute beginner, the platform will help you create your first well-functioning apps after just a few weeks.</li>
<li>If you want to establish a startup, Meteor can be a perfect starting point for quickly creating a powerful prototype of your future web app. More importantly, the tool is robust enough to make any transition to other platforms unnecessary after prototyping.</li>
</ul>
<p>Essentially, with Meteor, only the sky is the limit. Modern development is becoming more and more web-centric. Meteor perfectly reflects this trend, offering an all-encompassing platform for web developers. </p>
<p>By using it, you will be able to create a seamless integration of web and mobile apps, both of which are the future of consumer-centric computing.</p>
<h2 id="heading-do-you-have-an-idea-for-a-javascript-project"><strong>Do you have an idea for a JavaScript project?</strong></h2>
<p>My company KeenEthics is an early adopter of the <a target="_blank" href="https://keenethics.com/services-web-development-meteor">Meteor framework</a> and a well-established JavaScript company in general. In case you have a promising project in mind, feel free to <a target="_blank" href="https://keenethics.com/contacts?activeform=estimate">request an estimate</a><em>.</em></p>
<p>If you have enjoyed the article, you should continue with <a target="_blank" href="https://keenethics.com/blog/what-are-the-advantages-of-node-js">What Are the Advantages of Node.JS?</a> and <a target="_blank" href="https://keenethics.com/blog/angular-vs-react-what-to-choose-for-your-app">Angular vs React: What to Choose for Your App?</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why You Should Refactor Your Code ]]>
                </title>
                <description>
                    <![CDATA[ Raise your hand if any of the following sounds familiar: Think about code formatting. Get rid of unnecessary <div>'s and <span>'s. Use functional React components. Try to avoid arrow function in render. And do not repeat yourself! Before I go straigh... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/why-you-should-refactor-your-code/</link>
                <guid isPermaLink="false">66be14d94acec4a9c337d05e</guid>
                
                    <category>
                        <![CDATA[ clean code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ refactoring ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Fri, 03 Apr 2020 20:00:25 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/04/refactor-your-react-code.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Raise your hand if any of the following sounds familiar: Think about code formatting. Get rid of unnecessary <code>&lt;div&gt;</code>'s and <code>&lt;span&gt;</code>'s. Use functional React components. Try to avoid arrow function in render. And do not repeat yourself!</p>
<p>Before I go straight to refactoring, I need you to answer one simple question: What does it mean to develop an application? Usually, this means producing a piece of software that meets requirements by implementing certain features. </p>
<p>And how do we do that? We collect customer requirements, estimate them, and develop features one by one, right? Almost.</p>
<h2 id="heading-do-not-forget-about-bugs"><strong>Do Not Forget About Bugs</strong></h2>
<p>Yes, errors do occur. Depending on the development process, software complexity, technical stack, and many other parameters, the number of bugs may vary. </p>
<p>A business cannot afford critical issues in production. To minimize problems, you should pay particular attention to the <a target="_blank" href="https://keenethics.com/blog/qa-documentation">QA process</a>. But QA theory claims that it is usually impossible to run 100% test coverage of your apps and prepare for all possible scenarios. </p>
<p>Still, to achieve optimal results, teams spend a lot of time testing software and fixing issues. This is a necessary part of the process that each customer should understand and prioritize.</p>
<h2 id="heading-mind-the-technical-debt"><strong>Mind the Technical Debt</strong></h2>
<p>Yet, this coin has a flip side. The longer the development and testing process takes, the more technical debt you incur. </p>
<p>So, what does "technical debt" mean? Technical debt refers to all the quality-related issues you have in your code. Issues which will require spending additional resources in the future. </p>
<p>You incur technical debt for a variety of reasons, such as:</p>
<ol>
<li>The business pushes to release new features faster.</li>
<li>Testing is insufficient.</li>
<li>The requirements are changing rapidly.</li>
<li>The developers are inexperienced.</li>
</ol>
<p>Technical debt should be documented. If you do not leave to-do's in the code, you will most likely forget about the issue. And even if you have time for it in the future, you will not remember to fix it.</p>
<h2 id="heading-understand-the-importance-of-refactoring"><strong>Understand the Importance of Refactoring</strong></h2>
<p>Usually, you need to spend some time refactoring the existing code in order to solve code quality issues and thus lower technical debt. </p>
<p>But what is refactoring? It is the process of restructuring the existing code without changing its external behavior. And that is actually something that might be difficult to understand for business people managing the project.</p>
<blockquote>
<p>– Will we get any new features?   </p>
<p>– No.   </p>
<p>– Will we at least fix some bugs?   </p>
<p>– Also no.    </p>
<p>– What will we get then?   </p>
<p>– …</p>
</blockquote>
<p>Working with technical debt helps to avoid bugs. And to add fixes or changes to the project, we always need to read the old code. </p>
<p>Therefore, refactoring and maintaining good code quality will help us keep development at a good pace. </p>
<p>Sometimes a business might not need it. For instance, if you're working on a prototype or <a target="_blank" href="https://keenethics.com/services-proof">Proof of Concept</a>, or if there are business priorities that cannot be adjusted, you can do without refactoring. </p>
<p>But in most cases, cutting out refactoring is not a wise thing to do. You might spend a huge amount of time on refactoring if your developers are perfectionists, but this makes no sense either. </p>
<p>Therefore, you need to strike a balance. You should not spend more time refactoring than you will save in the future.</p>
<h2 id="heading-how-to-start-refactoring-your-react-code"><strong>How to Start Refactoring Your React Code</strong></h2>
<h3 id="heading-think-about-code-formatting"><strong>Think about code formatting</strong></h3>
<p>Some people add trailing commas, and some don't. Some use single quotes, while others use double quotes for a string. </p>
<p>If you work in a team, maintaining the common code style can be really difficult. And inconsistency in code style can make your code look dirty and hard to read. </p>
<p>So if you haven’t thought about using code formatting tools before, it’s high time to do so. One of the most popular and easy-to-use React refactoring tools is <a target="_blank" href="https://prettier.io/">Prettier</a>. You can just add it to the project and it will take care of formatting for you. </p>
<p>Prettier has some default style settings, but you can change them according to your preferences by adding a <code>.prettierrc</code> file with your formatting rules. </p>
<p>A good setup of <code>.prettierrc</code> may look like this:</p>
<pre><code class="lang-js">{ <span class="hljs-string">"printWidth"</span>: <span class="hljs-number">120</span>,  <span class="hljs-string">"singleQuote"</span>: <span class="hljs-literal">true</span>, “trailingComma”: “none” }
</code></pre>
<p>You can also automatically reformat the code before committing with <a target="_blank" href="https://prettier.io/docs/en/precommit.html">pre-commit hooks</a>.</p>
<h3 id="heading-get-rid-of-unnecessary-s-and-s"><strong>Get rid of unnecessary <div>’s and <span>’s</span></div></strong></h3>
<p>When React 16.2 was released in November 2017, a lot of React developers sighed in relief. Prior to that, for a component to return a list of children, it was necessary to wrap the children in an extra element, such as <code>&lt;div&gt;</code> or <code>&lt;span&gt;</code>. </p>
<p>But with React 16.2 we received improved support for returning components’ children. Now developers can use so-called fragments. They look like empty JSX tags (<code>&lt;&gt; … &lt;/&gt;</code>). With the help of fragments, you can pass a list of children to the component without adding extra nodes to the DOM.</p>
<h3 id="heading-think-about-names"><strong>Think about names</strong></h3>
<p>Don’t be lazy when you're thinking about names for components and variables. Every name should be self-explanatory.</p>
<p>Have you ever seen code snippets like this?</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> modifyData = data.map(<span class="hljs-function"><span class="hljs-params">x</span> =&gt;</span> [x.a, x.b]))
</code></pre>
<p>What does it do? If you cannot understand the purpose of a variable from its name, it is time to rename it! </p>
<p>This will help you and your team understand the logic more easily. It will also eliminate the time spent making changes to existing components in the future.</p>
<h3 id="heading-dont-repeat-yourself"><strong>Don’t Repeat Yourself</strong></h3>
<p>The DRY principle was first formulated in the book <em>The Pragmatic Programmer</em>. It states that "every piece of knowledge must have a single, unambiguous, authoritative representation within a system". In other words, you need to put repetitive code blocks into separate reusable components. </p>
<p>Making your code DRY has a lot of benefits. It can save you a lot of time. If you need to change this code in the future, you will only do that in one place. Also, you will never have to worry that you forgot to make changes in some places. Furthermore, you will keep the components cleaner and increase the readability of code. </p>
<p>To keep your components DRY and small, you can follow two simple rules:</p>
<ol>
<li>If you use a code block more than two times, it’s time to extract it.</li>
<li>If you exceed a predefined number of lines in a component (e.g. 100 lines), there is probably logic that can be extracted. Divide it into smaller components by functionality.</li>
</ol>
<h3 id="heading-use-functional-over-class-components"><strong>Use functional over class components</strong></h3>
<p>With the introduction of Hooks in React 16.8, we received access to React class features in functional components. Hooks solve a bunch of problems frequently encountered by developers over the past few years. </p>
<p>For example, the <code>useEffect</code> hook, as the React docs suggest, allows us to group the component logic into small functions based on what pieces are related (instead of grouping the logic based on life-cycle methods). This helps us to better restructure our logic. </p>
<p>All in all, refactoring React components with the help of hooks makes the code cleaner and reduces the amount of code you need to write. </p>
<p>Here is a very basic example: fetching the data after the component has mounted and re-fetching it based on the updated props. </p>
<p>In a class component, we would write something like this:</p>
<pre><code class="lang-js"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookList</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
  componentDidMount() {
    <span class="hljs-built_in">this</span>.props.fetchBooks(<span class="hljs-built_in">this</span>.props.bookGenre);
  }
  componentDidUpdate(prevProps) {
    <span class="hljs-keyword">if</span> (prevProps.bookGenre !== <span class="hljs-built_in">this</span>.props.booksGenre) {
      <span class="hljs-built_in">this</span>.props.fetchBooks(<span class="hljs-built_in">this</span>.props.bookGenre);
    }
  } 
<span class="hljs-comment">// ... }</span>
</code></pre>
<p>With React hooks it will look like this:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> BookList = <span class="hljs-function">(<span class="hljs-params">{ bookGenre, fetchBooks }</span>) =&gt;</span> {
  useEffect(<span class="hljs-function">() =&gt;</span> {
    fetchBooks(bookGenre);
  }, [bookGenre]);
<span class="hljs-comment">// ... }</span>
</code></pre>
<p>The books fetching logic is now gathered in one place. The <code>useEffect</code> hook will run after mount each time the props <code>[bookGenre]</code> in square brackets change. Much cleaner, isn’t it? </p>
<p>Also, you can extract similar stateful logic and reuse it in different components by creating your custom hooks. You can read more about custom hooks in the official <a target="_blank" href="https://reactjs.org/docs/hooks-custom.html">React documentation</a>.</p>
<h3 id="heading-try-to-avoid-arrow-functions-in-render"><strong>Try to avoid arrow functions in render</strong></h3>
<p>Have you ever seen code like this?:</p>
<pre><code class="lang-js">render() {    
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> this.setState({ flag: true })} /&gt;
      ...      
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>    
  );  
}
</code></pre>
<p>Sure you have. What is the problem with it? Every time a component is rendered, a new instance of such a function is created. </p>
<p>It is not a big deal if the component is rendered one or two times. But in other cases, it can really affect performance. So, if you care about performance, declare the function before using it in render:</p>
<pre><code class="lang-js">changeFlag = <span class="hljs-function">() =&gt;</span> <span class="hljs-built_in">this</span>.setState({ <span class="hljs-attr">flag</span>: <span class="hljs-literal">true</span> })
render() {    
  <span class="hljs-keyword">return</span> (      
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span> 
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{this.changeFlag}</span> /&gt;</span>        
      ...      
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>    
  );  
}
</code></pre>
<h3 id="heading-make-the-bundle-smaller"><strong>Make the bundle smaller</strong></h3>
<p>If you are using a third-party library, you should not load the entire thing if it isn't necessary. Sometimes you can stumble upon an import which uses only one method from the library, such as:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> lodash form <span class="hljs-string">'lodash'</span>  
...  
const certainProps = lodash.pick(userObject, [<span class="hljs-string">'name'</span>, <span class="hljs-string">'email'</span>]);  ...
</code></pre>
<p>Instead, it is better to use the following:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> pick <span class="hljs-keyword">from</span> <span class="hljs-string">'lodash/pick'</span> 
... 
const certainProps = pick(userObject, [<span class="hljs-string">'name'</span>, <span class="hljs-string">'email'</span>]); ...
</code></pre>
<p>Now you do not load the whole library, just the method you need.</p>
<h2 id="heading-to-wrap-up"><strong>To Wrap Up</strong></h2>
<p>Let's review the steps you should take to refactor your React code:</p>
<ul>
<li>Think about code formatting</li>
<li>Get rid of unnecessary <code>&lt;div&gt;</code>'s and <code>&lt;span&gt;</code>'s</li>
<li>Think about names</li>
<li>Don’t Repeat Yourself</li>
<li>Use functional over class components</li>
<li>Try to avoid arrow functions in render</li>
<li>Make the bundle smaller</li>
</ul>
<p>Yet, ideal refactoring is refactoring that does not occur. As a developer and especially as a tech lead, you should think many steps ahead and try to produce high-quality code. You should also carry out regular code reviews, not only within one team but also between teams.</p>
<h2 id="heading-do-you-have-an-idea-for-a-react-project">Do you have an idea for a React project?</h2>
<p>My company KeenEthics is an experienced React <a target="_blank" href="https://keenethics.com/services-web-development">development company</a>. If you are ready to change the game with your software project, feel free to <a target="_blank" href="https://keenethics.com/services-web-development">request an estimate</a>.</p>
<p>You can read more similar articles on my Keen Blog. Allow me to suggest <a target="_blank" href="https://keenethics.com/blog/the-value-of-user-testing">The Value of User Testing</a> or <a target="_blank" href="https://keenethics.com/blog/angular-vs-react-what-to-choose-for-your-app">Angular vs React: What to Choose for Your App?</a></p>
<p>Most importantly, I would like to say "thank you" to Yaryna Korduba and Max Fedas, both outstanding React developers, for coauthoring this article as well as the readers for making it to the end!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Write QA Documentation That Will Actually Work ]]>
                </title>
                <description>
                    <![CDATA[ Imagine developing a complex software product without taking any action to protect against errors. Human error and unexpected code combinations can cause a wide range of defects. This is where quality assurance (QA) documentation comes in.  QA files ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-write-qa-documentation-that-will-work/</link>
                <guid isPermaLink="false">66be14bdb52e57dc7e9d5546</guid>
                
                    <category>
                        <![CDATA[ documentation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ QA ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 03 Mar 2020 15:24:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/03/oleg-s-article.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Imagine developing a complex software product without taking any action to protect against errors. Human error and unexpected code combinations can cause a wide range of defects. This is where quality assurance (QA) documentation comes in. </p>
<p>QA files are created in the direction of the bug handler to manage these defects confidentially. They serve us as a roadmap, ensuring a clean and efficient QA process and making it easier to have a clean conversation between the fixers and the testers. </p>
<p>But you might be wondering – why do we need QA documentation?</p>
<p>QA testing is essential in IT products today. Tight deadlines, unique skill sets within the organization, and the demand to develop products stress the need for a structured methodology. QA documentation guides testers through levels of clarity and overall coverage. </p>
<p>I've written this article to make your life a bit easier. So here it is, your ultimate guide on how to write software QA documentation that will work.</p>
<ul>
<li><a class="post-section-overview" href="#heading-make-a-test-plan-and-a-test-progress-report">Make a Test Plan and a Test Progress Report</a></li>
<li><a class="post-section-overview" href="#heading-create-test-cases">Create Test Cases</a></li>
<li><a class="post-section-overview" href="#heading-defect-reports">Defect Reports</a></li>
<li><a class="post-section-overview" href="#heading-useful-tips-for-defect-report-writing">Useful Tips for Defect Report Writing</a></li>
<li><a class="post-section-overview" href="#heading-submit-a-defect-report">Submit a Defect Report</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-make-a-test-plan-and-a-test-progress-report">Make a Test Plan and a Test Progress Report</h2>
<p>Developing great software requires a thorough and documented approach to testing. Everything begins in the development phase with a complete checkout plan as a template for the entire QA process. It outlines the general requirements, defines the followed route, identifies the necessary assets, and sets a simple timeline for achieving the objectives.</p>
<h3 id="heading-draw-up-a-roadmap-before-you-start">Draw up a roadmap before you start</h3>
<p>Before you start implementing your test plan, take some time to think about the big picture. Ask yourself:</p>
<p><em>What problem does this software solve?</em> As soon as you understand the main purpose of the software, you'll be able to manage the checkout process and identify the features that are most important to your goals. </p>
<p>I promise that once you see that you can do this, you quickly prioritize your efforts. They are based primarily on the importance of the functionality and its impact on the user.</p>
<h3 id="heading-create-a-plan">Create a plan</h3>
<p>The test plan is the central part of the QA technique. The test plan should contain the following key elements:</p>
<ul>
<li><strong>Imaginary test</strong>: Clearly identify the expected impact of the payment method. Will it confirm that core functionality is running smoothly, or will it alert you to capability gaps?</li>
<li><strong>Test method</strong>: Outline how the test will be performed. Will you do targeted testing, useless testing, or a mix of the two?</li>
<li><strong>Resource allocation</strong>: Identify the equipment and technology required to perform a complete control. What control framework will you use? Are specific hardware or software configurations required for proper control?</li>
<li><strong>Timetable and remaining dates</strong>: Establish a realistic timetable for the trial. Set clear deadlines to keep the project on track.</li>
</ul>
<h3 id="heading-understand-the-why-and-how">Understand the 'why' and 'how'</h3>
<p>A well-developed roadmap will ensure that key issues are addressed throughout the improvement approach:</p>
<ul>
<li><strong>Acceptance requirements</strong>: Clear fail/success criteria should be defined for all control cases. So, criteria allow the customer to understand that the product is high quality and ready for the end-user.</li>
<li><strong>Resource management</strong>: Identify the assets required for the testing. This includes preferred machines, copies of software in various forms, required expertise, and more.</li>
<li><strong>Team dynamics</strong>: Ensure that simple roles and tasks are defined within the test team. Who is responsible for particular test cases? Who documents bugs and who talks to developers?</li>
<li><strong>Time management</strong>: I advise setting realistic checkout times, taking into account project deadlines and the availability of useful help.</li>
</ul>
<p>The test progress report is another part of the QA documentation, similar to the test plan, but with additional data on current progress. This document allows you and your development team to monitor project progress and identify any organizational issues.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/test-plan-and-progress-report-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>A test plan and a progress report</em></p>
<h2 id="heading-create-test-cases">Create Test Cases</h2>
<p>Think of each test case as a detailed recipe for finding potential defects in the functionality of a software program. By following these "recipes" and evaluating the expected and actual results, defects can be accurately identified and addressed before preventive action is taken. </p>
<p>Each test case acts as an independent unit, outlining the steps required to evaluate a particular element of a software program. </p>
<p>Below is a breakdown of the key elements that make up a well-defined test case Here is my step-by-step guide for creating test cases:</p>
<ul>
<li><strong>ID</strong>: This is an identifier field to help distinguish between test cases and track them easily.</li>
<li><strong>Priority</strong>: This indicates the severity of the test case based on the functionality of the program and its impact on the normal overall performance of the known software program application.</li>
<li><strong>Test Requirements</strong>: These are requirements for testing software successfully, this can include reference documents also.</li>
<li><strong>Software Module</strong>: This shows the feature under testing. It also refers to the software requirements specifications (SRS) document explaining the software feature in detail.</li>
<li><strong>Test Context</strong>: This details the test plan to clarify how the daily tests will be carried out. It also identifies the test data required for a successful case study and includes unique and important statistical information.</li>
<li><strong>Expected Output</strong>: This describes the expected output to be displayed if the test is successful.</li>
<li><strong>Actual output</strong>: This indicates the actual result in the event of failure and shows the developer the errors in the application module of the software program.</li>
<li><strong>Comment</strong>: This is an optional section where the tester can give a description of the observations or add additional records.</li>
</ul>
<p>All QAs typically include the above elements, but can also be designed specifically for the task selected by the QA group. Also, each control case follows a lifecycle that defines the phases of creation, testing (pass, fail), completion, and so on. </p>
<p>In the next section, we’ll check out another important element of QA documentation: the defect report.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/test-cases.png" alt="Image" width="600" height="400" loading="lazy">
<em>Test cases</em></p>
<h2 id="heading-defect-reports">Defect Reports</h2>
<p>Defect reporting is an important element of QA documentation. Issue tracking is the detailed reporting of sudden problems that arise in a software product. Careful documentation of these issues lays the groundwork for a complex and bug-free final product. </p>
<p>Sounds simple, right? Yes, but only until you start documenting.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/bug-task.png" alt="Image" width="600" height="400" loading="lazy">
<em>A defect report</em></p>
<p>The bug report consists of the following sections: Identifier, Summary, Description, Steps to Reproduce, Reproducibility, Severity, Priority, Environment, and Attachments.</p>
<ul>
<li><strong>Identifier</strong>: Each software program problem is assigned a completely unique identifier that acts like a customized nameplate. This makes the QA documentation less complicated to navigate and allows verbal communication between the installer, tester, and project manager (PM).</li>
<li><strong>Summary:</strong> This is an opportunity to provide brief and informative answers to three basic questions: What was the problem? Where did the problem appear? Under what specific conditions did the problem appear?</li>
<li><strong>Explanation:</strong> Examine the failure log in more detail. Summarize the identified action (the result completed) and check it against the planned action (the predicted end result). Including a link to the app requirements of the software program can serve as a useful reference element.</li>
<li><strong>Reproduction method</strong> (STR): This phase should be considered as a step-by-step recipe for reproducing the defect. It should be strict and cover all the steps that caused the problem. Skipping critical steps can make it difficult for you to reproduce the problem and cause delays.</li>
<li><strong>Reproducibility:</strong> In this section, you clarify if the bug appears every time you follow the STR. You should use numbers to show approximate chances, for example, 7 times out of 10.</li>
<li><strong>Severity</strong>: Here you explain how much harm the bug may bring to the project. Essentially, this is a measure of the severity of the technical disruption that a bug will cause to the whole project. Remember that problems that are known to be minor can grow and cause you extreme problems throughout the software.</li>
<li><strong>Priority</strong>: Each error log assigns a problem priority that indicates its urgency. Common priorities are letters (A: highest priority, Z: highest priority), numbers (1: highest priority, 9: highest priority), or descriptive terms (high, medium, low).</li>
<li><strong>Environment</strong>: Specify the gadget or browser model in which the bug appeared. This will help you to put the problem in context and narrow down a valid cause.</li>
<li><strong>Attachments</strong>: If possible, enrich the documentation with screenshots, screen recordings, console log documents, and others. This will help to provide visual documentation of the error.</li>
</ul>
<p>My structure provides detailed information, so you can empower developers to effectively diagnose, address, and eliminate any software bugs. In this way, leading to more user-friendly and robust products. </p>
<p>Now, in the next section, we'll see some useful tips you can use for defect report writing.</p>
<h3 id="heading-useful-tips-for-defect-report-writing">Useful Tips for Defect Report Writing</h3>
<ol>
<li>Write a sufficient summary. It does not matter if it is long or short. What matters is that it should be clear.</li>
<li>Have a look at the summary and the description. Do they look pretty much the same? You must have forgotten to outline the expected and actual results in the description and to add the link to the requirements.</li>
<li>Capture the issue with the help of a screenshot. It may save you and the development team a lot of time. Sometimes one glance at the picture is just enough to understand the situation.</li>
<li>Before reporting the issue, try to reproduce it at least 3 times to be sure that it exists.</li>
<li>Report the issue ASAP and notify your project manager or product owner if the issue is major.</li>
<li>Check for grammar mistakes in your QA documentation so you're not taken down by the grammar police.</li>
<li>However comical it sounds, make sure that the issue is not a feature – review the documentation again!</li>
<li>Do not miss any important information in your Steps to Reproduce.</li>
</ol>
<h2 id="heading-submit-a-defect-report">Submit a Defect Report</h2>
<p>The final and one of the most important elements of QA documentation is the defect report. You may understand it covers the entire lifecycle of a problem, from its initial discovery to its final closure. </p>
<p>Let's now examine the key areas of this process:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/05/defect-report-lifecycle.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>a defect report lifecycle</em></p>
<p>We'll go over the defect report lifestyle piece by piece:</p>
<h3 id="heading-problem-reporting">Problem Reporting:</h3>
<p>This adventure begins with the careful compilation and submission of a report on the entire program. This serves as a roadmap for developers and provides a clear assessment of the problem.</p>
<h3 id="heading-triage-and-tasks">Triage and tasks:</h3>
<p>The task manager or technical lead takes on the role of gatekeeper at this stage. They carefully compare the files. If the file contains enough elements to work with, it is assigned to the developer and repaired. However, if the file is missing essential elements, it may be rejected for further improvement.</p>
<h3 id="heading-bug-fixing">Bug fixing:</h3>
<p>The assigned developer takes the initiative and works diligently to eliminate the annoying bug.</p>
<h3 id="heading-verification-and-completion">Verification and completion:</h3>
<p>Once the developer claims to have fixed the problem, it's your turn as QA. Carefully verify the fix by retesting the functionality in question. If everything works as it should, you are done. </p>
<p>The documentation has come to a happy end. Ideally, this will happen within a reasonable period of one to two weeks.</p>
<h3 id="heading-reboot-and-keep-going">Reboot and keep going:</h3>
<p>But it is not always that simple. If it is known that bugs are still being made in the validation system, there is no need to despair! </p>
<p>Re-open the bug documentation and send it to the developers for further attention. Sometimes the process of fixing bugs is repetitive and requires patience. But by being careful and effective, you can guarantee that all bug reports will eventually reach their final destination, resulting in a more polished and reliable software application product.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Quality Assurance is a process you simply cannot avoid. Each airplane prior to departure undergoes a technical check. If there is any issue, the aircraft is grounded until the problem is solved. The same goes for any software. </p>
<p>But QA documentation is not always "write and ignore". At some point in the software development lifecycle, QA documentation needs to be continually updated and improved as requirements change, new features are introduced, and feedback is received from deployment and production use.</p>
<p>There are also a growing number of styles that use synthetic intelligence and machine learning to partially automate the creation of QA documentation. </p>
<p>For example, natural language processing (NLP) is used to analyze requirements documents and generate draft control examples. Test bots can use NLP to interpret and routinely execute directed test cases. Predictive evaluation can also be used to identify the most dangerous areas of a software program that require more detailed control.</p>
<p>While these strategies are still new and not mature enough to replace human testers, they can help with growth and augment manual exploration, especially for large and complex builds. By making QA documentation a collaborative and ongoing hobby, your team can deliver better software faster and with fewer defects.</p>
<h3 id="heading-do-you-need-to-improve-the-quality-of-your-software">Do you need to improve the quality of your software?</h3>
<p>My company KeenEthics provides solid <a target="_blank" href="https://coventit.com/services/custom-software-development">development and quality assurance services</a>. In case you need an estimate for a similar project, feel free to <a target="_blank" href="https://coventit.com/contact-us">get in touch</a><em>.</em> If you have enjoyed the article, you should continue with <a target="_blank" href="https://coventit.com/blog/How-IT-Outsourcing-Saves-Costs">How IT Outsourcing Saves Costs for Your Company</a> and <a target="_blank" href="https://coventit.com/blog/risks-of-it-outsourcing">Avoiding Pitfalls in IT Outsourcing: Tips for Minimizing Risks</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How and Why You Should Build Internet of Things Devices with Node.js ]]>
                </title>
                <description>
                    <![CDATA[ In this article, we will discuss why and how you can use Node.js for the server-side of your Internet of Things (IoT) devices. Understand the business opportunity In 2019, the market revenue of IoT reached $212 billion. There are about 26.66 billion ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/iot-and-node-js-how-to-catch-the-opportunity/</link>
                <guid isPermaLink="false">66be14bf0c9c630f4d48debd</guid>
                
                    <category>
                        <![CDATA[ iot ]]>
                    </category>
                
                    <category>
                        <![CDATA[ node ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Node.js ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Thu, 13 Feb 2020 14:54:48 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/02/Title_Images__1_-min.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, we will discuss why and how you can use Node.js for the server-side of your Internet of Things (IoT) devices.</p>
<h2 id="heading-understand-the-business-opportunity">Understand the business opportunity</h2>
<p>In 2019, the <a target="_blank" href="https://www.statista.com/topics/2637/internet-of-things/">market revenue of IoT</a> reached $212 billion. There are about 26.66 billion connected IoT devices worldwide, and this number is set to reach 75.44 billion by 2025.  </p>
<p>The UN estimates that, in February 2020, the <a target="_blank" href="https://www.worldometers.info/world-population/">world population</a> is currently 7.7 billion people. Simple math tells us that the average person owns around 3 to 4 IoT devices. Do you have one? Maybe a smartwatch? A smart TV? Or a smart car?</p>
<p>Moving further, the population is expected to reach 8.1 billion people in 2025. The same math calculation shows us that, in 2025, an  average person will have from 9 to 10 smart devices in their possession. </p>
<p>Do you see where I am going with this? Do you want to join this lucrative market niche and make your IoT device one of these 9 to 10?</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/6WhTKrEU5mebpDRnrSEexi/064db656bf882e4da1aff24eedcc6095/mHealth_revenues_reached__23_billion_in_2017__3_.png?fm=png&amp;q=85&amp;w=1000" alt="Statistics retrieved from Statista and the United Nations." width="1000" height="1118" loading="lazy">
<em>Statistics retrieved from Statista and the United Nations.</em></p>
<h2 id="heading-choose-the-right-framework">Choose the right framework</h2>
<p>The client-side of an IoT device is represented by the hardware itself. It is programmed with C, C++, or Lua – low-level and difficult programming languages. But there is not much you can do about it because of hardware limitations. </p>
<p>Along with high performance, users of IoT devices prioritize low cost and energy-efficiency. Thus, at least for now, you should keep working with low-level languages.</p>
<p>On the other hand, the server side of IoT applications offers you more freedom of choice. Here, you are not limited by the hardware, so you can choose any coding language and framework you prefer. </p>
<p>I believe that the right one is Node.js. Here is why.</p>
<h3 id="heading-nodejs-is-fast-and-performant">Node.js is fast and performant</h3>
<p>First of all, any IoT device is constantly working with dynamically changing data. This means that you need a framework which can handle real-time applications and heavy data flows. </p>
<p>Node.js is built on Google’s V8 JS engine, which is highly effective and perfectly scalable. Thanks to this feature, <strong>Node.js is the number one framework to be used with real-time apps and platforms.</strong> Constantly changing data is not a challenge for it either.</p>
<h3 id="heading-nodejs-is-easy-to-integrate-with-iot-protocols">Node.js is easy to integrate with IoT protocols</h3>
<p>IoT applications actively use a publish-subscribe-based messaging protocol, MQTT. In turn, for transportation and encapsulation, this protocol uses WebSockets. <strong>Both MQTT and WebSockets are well-supported and easily integrated with Node.js.</strong></p>
<h3 id="heading-nodejs-modules-facilitate-iot-development">Node.js modules facilitate IoT development</h3>
<p><strong>Node.js is augmented with npm, the Node Package Manager, which features a lot of useful IoT modules.</strong> There are about 80 packages for Intel IoT Edison, Arduino, or Raspberry Pi. Also, it features over 30 packages for different sensors, beacons, and other tools. </p>
<p>This is why <a target="_blank" href="https://keenethics.com/services-internet-of-things">Internet of Things development</a> is simpler and faster with Node.js IoT modules.</p>
<h3 id="heading-nodejs-is-resource-efficient-and-scalable">Node.js is resource-efficient and scalable</h3>
<p>In general, developers prefer working with Node.js because it does not require a lot of resources. The CPU and RAM are not overloaded. </p>
<p>Also, Node.js is highly scalable, which is absolutely necessary for most modern companies.</p>
<h2 id="heading-beware-of-the-challenges">Beware of the challenges</h2>
<p>Entering the IoT niche can lead you down a path to success. No wonder, then, that there are a lot of challenges and traps awaiting you on your way – success is  never easy to achieve. And the first and foremost challenge you should be aware of is security. </p>
<p>Security is one of the top problems in IoT sphere, and one of the first pitfalls you will stumble upon. So what should you do?</p>
<h3 id="heading-secure-authentication">Secure authentication</h3>
<p>Let’s start with authentication. There are a lot of tools for authentication in Node.js: tokens, JSON web tokens, Auth0, and so on. Each has its advantages and disadvantages. To start, you should look at them from the perspective of IoT.</p>
<p><strong>On the one hand, tokens are effective but not 100 percent safe</strong>. They are a cool way to set up authentication as they let you identify a specific user and decide whether to grant or deny them access. A token can be encrypted with any algorithm. </p>
<p>However, the hardware (scanners, sensors, hubs, or other IoT things) should store this token or login/password data in firmware. This means that attackers can steal the token if they have physical access to the hardware. The same story goes for JWT or Auth0.</p>
<p><strong>On the other hand, we can use any tools for authentication on the server side.</strong> You can easily integrate any authentication tool on the Node.js platform. </p>
<p>There are a lot of npm packages which allow you to do this manually: Auth0, Passport, and JWT. There are also packages for integration with cloud IoT services: @azure-iot/authentication, aws-iot-device-sdk, and so on.</p>
<h3 id="heading-secure-http-requests">Secure HTTP requests</h3>
<p>Next, be careful with HTTP requests from your IoT devices. You should check if you get a request from a proper IoT device. </p>
<p>Firstly, you should implement HTTPS with your IoT devices. Hardware is not a browser and you should implement HTTPS manually on it. For the server-side, you can either do it manually or use hosting with HTTPS configuration and certificates. </p>
<p>In Node.js, it is quite easy to implement:</p>
<pre><code><span class="hljs-keyword">const</span> express = <span class="hljs-built_in">require</span>(<span class="hljs-string">'express'</span>);
<span class="hljs-keyword">const</span> https = <span class="hljs-built_in">require</span>(<span class="hljs-string">'https'</span>);
<span class="hljs-keyword">const</span> http = <span class="hljs-built_in">require</span>(<span class="hljs-string">'http'</span>);
<span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>);
<span class="hljs-keyword">const</span> options = {
  <span class="hljs-attr">key</span>: fs.readFileSync(<span class="hljs-string">'path/to/your/key.pem'</span>),
  <span class="hljs-attr">cert</span>: fs.readFileSync(path/to/your/certificate.cert<span class="hljs-string">')
};
const app = express();
http.createServer(app).listen(80);
https.createServer(options, app).listen(443);</span>
</code></pre><p>HTTPS uses SSL or TLS protocols for data encryption. However, to be sure that you have gotten a request from the necessary server or client, use additional data encryption. For example, this is how you can use a signature:</p>
<pre><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node-fetch'</span>);
<span class="hljs-keyword">const</span> verifier = crypto.createVerify(<span class="hljs-string">'RSA-SHA1'</span>)
<span class="hljs-keyword">const</span> SIGNATURE_FORMAT = <span class="hljs-string">'base64'</span>;
<span class="hljs-comment">//check if it trusted url for your certificate</span>
<span class="hljs-keyword">const</span> trustedUrl = ‘https:<span class="hljs-comment">//trustedUrl/’</span>
<span class="hljs-keyword">const</span> isTrustedUrl = trustedUrl.match(url);
If (isTrustedUrl) {
verifier.update(req.body, <span class="hljs-string">'utf8'</span>)
    fetch(isTrustedUrl)
    .then(<span class="hljs-function"><span class="hljs-params">certificate</span> =&gt;</span> {
    <span class="hljs-comment">// check signature</span>
<span class="hljs-keyword">const</span> isValidSignature = verifier.verify(certificate, reg.header.signature, SIGNATURE_FORMAT);
   })
    .catch(<span class="hljs-function"><span class="hljs-params">err</span> =&gt;</span> <span class="hljs-built_in">console</span>.log(err));
}
</code></pre><p>To wrap up this part:</p>
<ol>
<li>First, you have to check the trusted URL of your certificate.</li>
<li>Then, you sign a request body with the public key from your certificate.</li>
<li>Finally, you compare the signed body with the signature from headers.</li>
</ol>
<p>It is extremely important to know that you're getting requests from the proper devices and that you're not facing a middle attack.</p>
<h2 id="heading-check-out-these-examples">Check out these examples</h2>
<h3 id="heading-asamahttpsasamatechipseng-tracking-the-movement-of-your-employees"><a target="_blank" href="https://asama.tech/ips/eng">Asama</a> – tracking the movement of your employees</h3>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/3RxIwnrJoPHrRqGfleU4gT/4072f4db0e1214a3c3bd8088d9cd9ced/Screen_Shot_2019-10-23_at_3.25.42_PM.png?fm=png&amp;q=85&amp;w=1000" alt="asama" width="1000" height="723" loading="lazy"></p>
<p>Asama is a micro-location system, which uses smartwatches and Bluetooth beacons to track movement and activity of employees. Beacons transmit a regular signal. </p>
<p>According to these signals, the smartwatch defines the location of an employee. The smartwatch also analyzes whether the right person is wearing it and if the employee is sleeping or working.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/4PtS0ph8qnZrL8tENAIsqW/b82c319d1fd95b0e8c0cbd91e6ba7f85/Screen_Shot_2019-10-23_at_3.11.59_PM.png?fm=png&amp;q=85&amp;w=1000" alt="Asama beacon" width="1000" height="430" loading="lazy"></p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/3757frFf2tQj7UBhOJsgXJ/b5edeb696b4944f36e980fb24dc036ed/Screen_Shot_2019-10-23_at_3.12.09_PM.png?fm=png&amp;q=85&amp;w=1000" alt="asama tracker" width="1000" height="430" loading="lazy"></p>
<p>The data is then transmitted to the mobile app, which is installed and configured on the employer’s phone. The system is powered by Node.js in IoT.</p>
<p>This way, managers can track their employees in real time, find the person they need right away, and optimize the workspace. Also, at the end of the week the employer receives an extensive report on employee activity. All this helps to boost the company's performance and productivity.</p>
<p>This solution might not suit a business with a small office and flexible hours. Yet, it works perfectly for industrial plants, construction sites, factories, warehouses, shopping centers, supermarkets, hotels, security agencies, restaurants, or stores. </p>
<p>It's well-suited anywhere you as an employer need to know if employees are coming too late or leaving too early, being absent at the working place, not working actively throughout the day, or not following routes and schedules.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1uoPqMXKlAZ1gG27fiy41Y/f406960d98805a8f747f130de2f4c9bf/Screen_Shot_2019-10-23_at_3.34.51_PM.png?fm=png&amp;q=85&amp;w=1000" alt="asama clients" width="1000" height="295" loading="lazy"></p>
<h3 id="heading-preehttpskeenethicscomproject-pree-finding-your-belongings"><a target="_blank" href="https://keenethics.com/project-pree">PREE</a> – finding your belongings</h3>
<p>PREE  is a system of BLE beacons and mobile software which helps people stop losing their stuff. It is a lifesaver for those who often forget their phone, bag, keys, wallet, or any other valuable belongings. </p>
<p>The user can see the location of their item in real time and share it with trusted contacts. Once the item is out of range, they will get a notification, and so will their friends or family members. It doesn't spam others with notifications when they are not needed – for example, when at home, the user can mute them for a certain area.</p>
<p>This Internet of Things IoT system is built with <a target="_blank" href="https://keenethics.com/services-web-development-node">Node.js</a>, <a target="_blank" href="https://keenethics.com/tech-back-end-express">Express</a>, and <a target="_blank" href="https://keenethics.com/tech-data-base-mongo">Mongo</a> on the backend and Ionic with <a target="_blank" href="https://keenethics.com/tech-apps-cordova">Cordova</a> for the frontend. The combination of these frameworks ensures the best user experience.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/5egLeuuCpQFl0PFhtVdOn1/addd7e1d99ccd0b00dfe817db5c2c738/Screen_Shot_2019-10-23_at_3.42.38_PM.png?fm=png&amp;q=85&amp;w=1000" alt="PREE" width="1000" height="484" loading="lazy"></p>
<h2 id="heading-validate-your-idea">Validate your idea</h2>
<p>Once you have an idea for an IoT product, start with validating  it. You can do this in two ways:</p>
<ul>
<li>Hire an idea validation team, who will help you test the viability of your product before you invest in development, or</li>
<li>Hire a software design and development team, who will launch an extensive <a target="_blank" href="https://keenethics.com/blog/product-discovery">product discovery</a> process.</li>
</ul>
<h2 id="heading-postscript">Postscript</h2>
<p>I would like to send a huge thank you to Volodya Andrushchak, the IoT guru at KeenEthics, for contributing and basically breathing life into to this article.</p>
<p>If you have enjoyed the article, you should definitely read some more about Node.js: <a target="_blank" href="https://keenethics.com/blog/what-are-the-advantages-of-node-js">What are the Advantages of Node.JS?</a> or <a target="_blank" href="https://keenethics.com/blog/nodejs-vs-python">NodeJS vs Python: How to Choose the Best Technology to Develop Your Web App's Back End</a>.</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/iot-and-node-js">IoT and Node.JS: How to Catch the Opportunity?</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ PHP vs JavaScript: How to Choose the Best Language for Your Project ]]>
                </title>
                <description>
                    <![CDATA[ If someone says “JavaScript is only for front end development, and PHP is for back end” — do not listen. Before I jump into claiming that one language is better than the other, there is something I need to clarify. I don't want to turn the PHP vs Jav... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/php-vs-javascript-which-technology-will-suit-your-business-better/</link>
                <guid isPermaLink="false">66be14c72969640c348b568f</guid>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ PHP ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Thu, 30 Jan 2020 16:03:48 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/title_images__40_-min_720.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If someone says “JavaScript is only for front end development, and PHP is for back end” — do not listen.</p>
<p>Before I jump into claiming that one language is better than the other, there is something I need to clarify. I don't want to turn the PHP vs JavaScript discussion into comparing apples and oranges, so I should explain the main difference between JavaScript and PHP. </p>
<p>PHP is a programming language for back end development only. JavaScript, in turn, was initially designed as a front end development language. But with the introduction of Node.js in 2009, JavaScript became full stack.</p>
<p>The commonly cited claim that “JavaScript is only for front end development, and PHP is for back end” is just not true. Today, you can develop the entire app with JavaScript, both client side and server side. The question is, which language is more effective for your particular project?</p>
<p>Therefore, if you're trying to decide between PHP and JavaScript, the discussion is reduced to which language you want to use for back end development. And to help you make an informed decision, I will compare PHP vs JavaScript for web development based on the following criteria:</p>
<ol>
<li>Brief overview</li>
<li>Performance and speed</li>
<li>Extensibility</li>
<li>Universality</li>
<li>Community</li>
<li>Learning curve</li>
<li>Syntax</li>
<li>Apps it is best suited for</li>
</ol>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1k0mDgvXdPKsNgFkmgTp2z/72805ec55f221824a8b46e93694c9489/Angular_React-min.png?fm=png&amp;q=85&amp;w=1000" alt="php vs javascript" width="1000" height="1465" loading="lazy"></p>
<h2 id="heading-brief-overview">Brief overview</h2>
<h3 id="heading-javascript"><strong>JavaScript</strong></h3>
<p>JavaScript is a lightweight, multi-paradigm, high-level, interpreted or just-in-time-compiled, dynamic programming language. Introduced in 1995 by Brendan Eich, JavaScript is characterized by curly-bracket syntax, first-class functions, and prototype-based object orientation. </p>
<p>According to <a target="_blank" href="https://www.statista.com/statistics/869092/worldwide-software-developer-survey-languages-used/">Statista</a>, 69 % of developers worldwide use JavaScript and 5 % more plan to adopt this language. The report shows that it is the most popular programming language in the world as of late 2019.</p>
<h3 id="heading-php"><strong>PHP</strong></h3>
<p>PHP stands for Hypertext Preprocessor, and it is an open source scripting language for back end development. Developed in 1994 by Rasmus Lerdorf, the language received global recognition. According to <a target="_blank" href="https://w3techs.com/technologies/details/pl-php">the W3Tech survey</a>, 79% of all websites use PHP. Among the most popular ones, there are Facebook, Wikipedia, and, of course, WordPress.</p>
<p><strong>PHP vs JavaScript: 0 – 0</strong></p>
<h2 id="heading-performance-amp-speed">Performance &amp; Speed</h2>
<h3 id="heading-javascript-1"><strong>JavaScript</strong></h3>
<p>JavaScript is characterized by an event-driven, single-threaded, non-blocking I/O execution model. Such a model is ensured by the event loop and Node clustering. </p>
<p>The asynchronous nature of Node.js enables it to run through the entire code simultaneously without waiting for some functions to be executed. Thanks to that, JavaScript is the best solution for low latency applications, such as streaming platforms. Node.js is sped up even further by the V8 engine, constant server connection, and callback functions.</p>
<h3 id="heading-php-1"><strong>PHP</strong></h3>
<p>PHP is characterized by a multi-threaded, blocking I/O execution model. Unlike JavaScript, PHP is synchronous. The second line of code in PHP cannot be executed until the first one is, which makes it much slower than JavaScript. </p>
<p>While PHP undoubtedly loses in terms of speed, some say that it is more stable than JavaScript. Yet, this advantage is quite ambiguous and not a hundred percent proven.</p>
<p><em>The reliability and stability of both PHP and JavaScript are open to interpretation. But thanks to its outstanding speed, JavaScript wins a point</em>.</p>
<p><strong>PHP vs JavaScript: 0 – 1</strong></p>
<h2 id="heading-extensibility">Extensibility</h2>
<h3 id="heading-javascript-2"><strong>JavaScript</strong></h3>
<p>JavaScript can be combined with HTML, XML, and Ajax.</p>
<p>There are a number of great JavaScript frameworks, and one cannot even count them because new ones emerge quite often. </p>
<p>The most  popular front-end JS technologies are Vue, Angular, and React, but here at KeenEthics we also see a bright future for Svelte. </p>
<p>The most common server-side framework is <a target="_blank" href="https://keenethics.com/services-web-development-node">Node.js</a>. What framework you choose may define development speed and cost, performance, and other technical qualities of your future app.</p>
<p>As for package managers, Node.js comes with NPM (Node Package Manager) preinstalled. NPM greatly facilitates developers’ lives, and it is the largest software registry in the world.</p>
<h3 id="heading-php-2"><strong>PHP</strong></h3>
<p>PHP can be combined with HTML only.</p>
<p>Probably the greatest advantage of PHP is the availability of CMSs like WordPress or Drupal. These solutions may greatly facilitate and even make web development cheaper. PHP can also be extended with any LAMP stack technology and such server solutions as MySQL or PostgreSQL.</p>
<p>There are two package managers for PHP – PEAR and Composer. PEAR (PHP Extension and Application Repository) is a structured library of open source PHP code. Composer is a dependency management tool for PHP.</p>
<p><em>Overall, JavaScript offers more opportunities for extensibility, so it wins the point</em>.</p>
<p><strong>PHP vs JavaScript: 0 – 2</strong></p>
<h2 id="heading-universality">Universality</h2>
<p>JavaScript is cross-platform, and so is PHP. Both PHP and JavaScript are primarily aimed at developing web applications, even though both can be used for mobile app development.</p>
<h3 id="heading-javascript-3"><strong>JavaScript</strong></h3>
<p>The greatest advantage of JavaScript over PHP lies in the fact that JavaScript is a full-stack development language. Most JS vs PHP comparisons emphasize that JavaScript is front end only, but that is simply not true. You can develop an entire web or mobile app with no other technology than JavaScript. </p>
<p>The experience of KeenEthics proves it: as a JS-oriented company, we develop custom web and mobile solutions from scratch using only JavaScript.</p>
<h3 id="heading-php-3"><strong>PHP</strong></h3>
<p>PHP is a back end development language only. PHP belongs to the LAMP stack, which stands for Linux, Apache, MySQL, and PHP/Perl/Python. </p>
<p>To develop a web app with this technology stack, a software engineer needs to know four different syntax systems, as well as HTML and CSS. Switching between languages is neither convenient nor efficient, and it complicates the learning curve badly.</p>
<p><em>JavaScript development is full-stack development, which is the greatest advantage of it</em>.</p>
<p><strong>PHP vs JavaScript: 0 – 3</strong></p>
<h2 id="heading-community">Community</h2>
<h3 id="heading-javascript-4"><strong>JavaScript</strong></h3>
<p>According to <a target="_blank" href="https://stackshare.io/stackups/javascript-vs-php">stackshare.io</a>,  the main reasons why developers enjoy working with JavaScript are its universality ("Can be used on front end and back end"), popularity ("It is everywhere"), and extensibility ("there are a lot of great frameworks").</p>
<p>JavaScript is used by Netflix, LinkedIn, Trello, Uber, Airbnb, Instagram, eBay, NASA, and Medium.</p>
<p>Most JS frameworks are open source, but not JavaScript itself.</p>
<p>JavaScript is the most popular language on <a target="_blank" href="https://madnight.github.io/githut/#/pull_requests/2019/4">GitHub</a> with over a 20% share of pull requests.</p>
<h3 id="heading-php-4"><strong>PHP</strong></h3>
<p><a target="_blank" href="https://stackshare.io/stackups/javascript-vs-php">Stackshare.io</a> shows that the most beloved advantages of PHP are a large community, open source, and simple deployment.</p>
<p>PHP is used by such companies as Facebook, Lyft, Wikipedia, Slack, Tumblr, and 9 GAG.</p>
<p>PHP code is open source, which makes it more flexible and customizable.</p>
<p>On <a target="_blank" href="https://madnight.github.io/githut/#/pull_requests/2019/4">GitHub</a>, PHP takes only the eighth place with about 5 % of pull requests.</p>
<p><em>Both languages have huge support communities and are favored by large tech giants – both PHP and JavaScript earn a point</em>.</p>
<p><strong>PHP vs JavaScript: 1 – 4</strong></p>
<h2 id="heading-learning-curve">Learning curve</h2>
<h3 id="heading-php-5"><strong>PHP</strong></h3>
<p>PHP is much simpler to start learning than JavaScript. Setting up a server is as simple as creating a single .php  file, writing a few lines of code enclosed with <code>&lt;?php?&gt;</code> tags, and entering the URL into the browser tab. </p>
<p>Also, PHP peculiarities, such as inconsistent functions or return values, are easier to understand and master than the peculiarities of JavaScript and of certain JS frameworks.</p>
<h3 id="heading-javascript-5"><strong>JavaScript</strong></h3>
<p>Setting up JavaScript, namely Node.js, for server side is not that complicated. But it is more difficult than PHP. A beginning JS developer needs to have more knowledge than a beginning PHP developer. </p>
<p>However, the effort you put into learning JavaScript totally pays off. Since JavaScript is more universal than PHP, the learning effort brings much more value.</p>
<p><em>PHP wins a point for learning simplicity, beginning developers will definitely appreciate it</em>.</p>
<p><strong>PHP vs JavaScript: 2 – 4</strong></p>
<h2 id="heading-syntax">Syntax</h2>
<p>The syntax of a programming language, in most cases, is just a matter of personal preference. Therefore, neither of the languages win a point here.</p>
<p>Yet, I will provide a side-by-side comparison of JS and PHP syntax rules in case you are here thinking about which language to learn. Maybe some peculiarities of a certain language will work better for you, and this is how you will make your choice.</p>
<ul>
<li>Both PHP and JavaScript make use of brackets of different types, including curly, round, and square brackets.</li>
<li>In both PHP and JavaScript, variables can be of any type, they can change type, and you can check the type by calling a language-specific operator  – <em>typeof</em> in JS and <em>gettype</em> in PHP.</li>
<li>In both languages, arrays start with “0”.</li>
<li><em>for()</em> loop functions identically in both PHP and JavaScript, the difference is only in how the variable inside for-brackets is declared. <em>foreach()</em> loop, which is unique to PHP, can be easily transformed into JS <em>for()</em> loop.</li>
<li>In JS, variables are global by default unless declared local with <em>var</em>. A local variable is available for everything within this function or its subfunctions.</li>
<li>In JS, both addition and concatenation are done with “+”.</li>
<li>JS is case sensitive in variables and functions.</li>
<li>There are no associative arrays (key-value pairs) in JS, you should use JSON strings instead.</li>
<li>In JS, arrays and objects are very similar and often interchangeable. An object item can be referenced as an array item as well.</li>
<li>In JS, items in objects are referenced with a fullstop “.”.</li>
<li>PHP makes use of dollar signs “$” to denote variables,  whereas JS has no such sign. All variables are local by default unless declared global with <em>global</em>. A local variable will not be available in subfunctions unless you pass it in an argument.</li>
<li>In PHP, addition is done with “+”, and concatenation is done with “.”.</li>
<li>PHP is case sensitive only in variables.</li>
<li>PHP allows both numeric and associative arrays.</li>
<li>In PHP, arrays and objects are completely different things with different syntax.</li>
<li>In PHP, items in objects are referenced with an arrow “-&gt;”.</li>
</ul>
<p>These are some of the most basic differences that you should know about these languages. Check <a target="_blank" href="https://pixelloom.com/resources/syntax-table.php">this table</a> and <a target="_blank" href="https://engineering.carsguide.com.au/php-vs-javascript-syntax-5e11303239b8">this article</a> for some more syntax differences between PHP and JavaScript.</p>
<p><em>As I said, neither language wins a point here because the syntax is a matter of personal preference</em>.</p>
<p><strong>PHP vs JavaScript: 2 – 4</strong></p>
<h2 id="heading-apps-it-is-best-suited-for">Apps it is best suited for</h2>
<h3 id="heading-javascript-6"><strong>JavaScript</strong></h3>
<p>JavaScript has dedicated server hosting, which makes it perfectly suitable for large projects. It can be used to develop both the front end and back end of almost any software application type, including 3D games, AR/VR solutions, IoT products, and so on.</p>
<h3 id="heading-php-6"><strong>PHP</strong></h3>
<p>Although PHP is a general-purpose programming language, it is primarily used for developing dynamic web pages. Considering the availability of PHP-based content management systems such as Moodle and WordPress, PHP is the best solution for blogs, learning management systems, and e-commerce websites.</p>
<p><em>Once again, in terms of the apps it is best suitable for, each language is different but neither better nor worse than the competitor. Both PHP and JavaScript are quite universal, so both get a point</em>.</p>
<p><strong>PHP vs JavaScript: 3 – 5</strong></p>
<h2 id="heading-to-wrap-up">To Wrap Up</h2>
<p>The comparison between PHP vs JavaScript ends with the score 3 to 5 – JavaScript beats PHP. </p>
<p>Both languages are fairly good in terms of community support, extensibility, and apps they are suited to. JavaScript is certainly more efficient in terms of speed and universality. Meanwhile, it loses to PHP in terms of learning curve even though the syntax, as we concluded, is just a matter of personal preference.</p>
<p>Just keep in mind - this does not mean that JavaScript and Node.js in particular are always the best choice - it's up to you and your project.</p>
<p><strong>Choose Node.js:</strong></p>
<ul>
<li>If you plan to develop a single page app,</li>
<li>If you plan to build a real-time application, such as a streaming service or a messenger,</li>
<li>If you plan to build a large project with heavy data load,</li>
<li>If you are using JavaScript for front end development.</li>
</ul>
<p><strong>Choose PHP:</strong></p>
<ul>
<li>If you plan to develop a blog or an e-commerce website,</li>
<li>If you are using some of the LAMP technologies already.</li>
</ul>
<h2 id="heading-do-you-have-an-idea-for-a-project">Do you have an idea for a project?</h2>
<p>My company KeenEthics can't help you with PHP, but we are an <a target="_blank" href="https://keenethics.com/#tech-stack">experienced JavaScript company</a> willing to take up the challenge. If you are ready to change the game and start your project, feel free to <a target="_blank" href="https://keenethics.com/contacts">get in touch</a><em>.</em></p>
<p>If you have enjoyed the article, you should definitely read another wonderful comparison: <a target="_blank" href="https://keenethics.com/blog/angular-vs-react-what-to-choose-for-your-app">Angular vs React: What to Choose for Your App?</a> or <a target="_blank" href="https://keenethics.com/blog/nodejs-vs-python">NodeJS vs Python: How to Choose the Best Technology to Develop Your Web App's Back End</a>.</p>
<h2 id="heading-ps">P.S.</h2>
<p>I would also like to say thank you to Yaryna Korduba, one of the awesomest web developers at KeenEthics, for inspiring and contributing to the article.</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/php-vs-javascript">PHP vs JavaScript: Which Technology Will Suit Your Business Better?</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Pros and Cons of Open Source Software Development ]]>
                </title>
                <description>
                    <![CDATA[ It is high time to give back to the people who enable you to use the Internet! Many developers are fond of open source projects, and for good reason: they use them every day to speed up their work. There are a lot of successful examples of open sourc... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-great-about-developing-open-source-and-what-is-not/</link>
                <guid isPermaLink="false">66be14d6b52e57dc7e9d5548</guid>
                
                    <category>
                        <![CDATA[ open source ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Thu, 16 Jan 2020 16:43:19 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/open-source.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-it-is-high-time-to-give-back-to-the-people-who-enable-you-to-use-the-internet">It is high time to give back to the people who enable you to use the Internet!</h2>
<p>Many developers are fond of open source projects, and for good reason: they use them every day to speed up their work. There are a lot of successful examples of open source software solutions, such as Linux (an operating system) or <a target="_blank" href="https://keenethics.com/tech-front-end-react">React</a> (a JavaScript library). These solutions are often well-crafted, and it is a pleasure to work with that kind of high-quality code.</p>
<p>So, let’s have a closer look at what open source means and what the pros and cons are for working with open source projects.</p>
<h2 id="heading-what-is-open-source"><strong>What Is Open Source?</strong></h2>
<p>The term “open source” was coined within the software development industry and refers to something that anyone can inspect, modify, and share. It represents a specific approach to creating computer programs which celebrates the values of collaboration, transparency, and community-oriented development.</p>
<p><em>Open source code is written by developers and for developers.</em></p>
<p>To protect all the parties engaged in open source, the project owner can use a Creative Commons license. A Creative Commons (CC) license enables everyone to share, use, and build upon your work.</p>
<p><strong>Open source software</strong> is usually a free software product, where developers have access to the source code. They can enhance the program’s performance, add some features, and fix errors. Some examples of such software are LibreOffice, Mozilla Firefox, and Chromium.</p>
<p>By contrast, there is <strong>proprietary software</strong>, also called “closed source software”. The source code of such a program can be inspected or altered only by its owners. Some examples of proprietary software include some products of Microsoft, Adobe, or Apple.</p>
<p>Some companies see open source software as the norm, while others prefer developing closed source software. And to be sure, the open source model has its pros and cons.</p>
<h2 id="heading-what-is-great-about-developing-open-source-software"><strong>What Is Great About Developing Open Source Software?</strong></h2>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1ZlWswKRiMxfcF3v3Ats3m/45ae829fc6656bd86c1f7dd65e4eac1f/3.png?fm=png&amp;q=85&amp;w=1000" alt="open source benefits" width="1000" height="1000" loading="lazy"></p>
<h3 id="heading-personal-benefits"><strong>Personal benefits</strong></h3>
<p>If I say that open source developers are driven by altruism and the desire to help others, a lot of people reading this article may smile in disbelief. But this intrinsic motivation is the primary reason most people work on open source projects. </p>
<p>Don't underestimate the importance of personal benefits – those feelings of being helpful and self-accomplished.</p>
<h3 id="heading-community-recognition"><strong>Community recognition</strong></h3>
<p>Scientists and doctors share their experience by writing scholarly articles and participating in scientific conferences. UI/UX designers share their experience on <a target="_blank" href="https://www.behance.net/ec6c70">Behance</a> or <a target="_blank" href="https://dribbble.com/">Dribbble</a>. Writers print their books or share them via online platforms. Musicians and moviemakers share their work with the world via different streaming services. Why would software developers be any different and want to miss their opportunity to get recognition?</p>
<p>When working on or running open source projects, you can get recognition from the developer community in a number of ways, such as creating a great GitHub-profile and participating in events like <a target="_blank" href="https://hacktoberfest.digitalocean.com/">Hacktoberfest</a>. </p>
<p>You might also get discounts, free admissions to events, and a well-developed infrastructure to run your projects. Not only does working on open source projects save you money, but also it inspires you to use all the greatest tools available to you in your own projects.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/7KyHboWKxJonROCTKwVLCn/22b6a7a75d91da5aac99efb68a503894/image1-min__1_.png?fm=png&amp;q=85&amp;w=1000" alt="Here are a few participants of Lviv Hacktoberfest." width="1000" height="667" loading="lazy">
<em>Here are a few participants of Lviv Hacktoberfest.</em></p>
<h3 id="heading-self-advertising"><strong>Self-advertising</strong></h3>
<p>If you or your company actively participate in the open source community, you can earn a great reputation. This way, if you are an individual or self-employed developer, it will be easier for you to find a job as a freelancer or a full-time employee. If you represent a software development company, it will be easier for you to find people willing to work for you, partners willing to cooperate, and clients willing to request your professional services. </p>
<p>This is why developing open source software creates a perfect advertising opportunity – a win-win situation both for developers and development agencies.</p>
<h3 id="heading-sense-of-value"><strong>Sense of value</strong></h3>
<p>No need to hide the truth: job burnout plagues developers’ work and software vendors’ HR strategies. If you are a company owner, by motivating your employees to participate in open source development, you show them that their work has value. Not only will they be working on your commercial projects but they will also be providing value to the wider developer community by working on open source projects. </p>
<p>By helping your developers achieve these feelings of purpose and value, you keep them interested in working with you. </p>
<p>The same is true if you are a self-employed developer. Engaging in open source software development will make your work meaningful, and you will not grow to hate it as time passes.</p>
<h3 id="heading-software-quality"><strong>Software quality</strong></h3>
<p>Open source code is often higher quality. A piece of software created by a team of developers can be lower quality than that developed by thousands of developers from all over the world with experience in different technologies, industries, and projects. And bugs in open source software are identified very quickly as the code is being constantly reviewed by multiple developers.</p>
<p>Even code written by a single developer is often higher quality if it is open sourced. If you write code that only you or your close colleagues will see, you may not care much about code style. But if you write code that everyone can see, you will do all you can not to look like a code monkey. Reviews, contributions, and refactoring from the community are all helpful here.</p>
<h3 id="heading-data-security"><strong>Data security</strong></h3>
<p>You should use open source software for application development because it is more secure. The community promptly finds and reports security flaws which the software owner usually fixes right away. </p>
<p>In turn, if there is a security flaw in a proprietary software product, nobody is going to know until someone falls victim to the threat it poses. </p>
<p>Also, open sourced products cannot misuse and abuse users’ data intentionally like some proprietary software companies do. The community would discover this abuse, and the reputation of the software and its owner would be ruined.</p>
<h3 id="heading-customization"><strong>Customization</strong></h3>
<p>Developing open source software usually means you are developing an easily customizable software. Since the source code is open, a developer can easily add changes to the functionality of the interface. </p>
<p>For instance, Apache CloudStack is an open source software that facilitates cloud computing. Another example is the open sourced platform <a target="_blank" href="https://botpress.io/">Botpress</a>, which allows developers to easily create custom chatbots. KeenEthics developers who are Botpress contributors feel delighted when they're able to make somebody else’s life simpler.</p>
<p><em>Open source is about gaining and sharing experience. Sometimes, you see that an open source software project is lacking something and you fill this gap by contributing your code. Other times, you understand that you could do something better. Open source helps you deal with boredom and earn recognition from peers.</em></p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/4iHtDD5JhgX2czGT2A2uh5/9ee737d0b07057e5dcbe0cd150a13f8c/0?fm=jpg&amp;fl=progressive&amp;q=95&amp;h=130&amp;w=130&amp;fit=crop&amp;fit=thumb" alt="Sergey Gornostaev" width="130" height="130" loading="lazy">
<em>Sergey GornostaevFull-Stack Developer</em></p>
<h2 id="heading-what-is-not-great-about-developing-open-source-software"><strong>What Is NOT Great About Developing Open Source Software?</strong></h2>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/2uTeSRH3T7ROijGXfrDsw8/3459d3293ace4081eb02af0ae3f2d921/4.png?fm=png&amp;q=85&amp;w=1000" alt="open source drawbacks" width="1000" height="774" loading="lazy"></p>
<h3 id="heading-miscommunication-and-misunderstandings"><strong>Miscommunication and misunderstandings</strong></h3>
<p>You can expect requests to improve your product or to help with something, but you might have to deal with different kinds of people. Some may expect you to react to their requests 24/7. Others might open PRs improving your product, but you will have to explain the rules on how things should be prepared and how they get merged into the mainline. </p>
<p>In the end, there is no guarantee that the community contributions will not turn out to be of lower quality. This is why there is a high chance that you end up refactoring someone's code and leaving people disappointed by not merging their changes.</p>
<h3 id="heading-the-threat-to-the-core-business-value"><strong>The threat to the core business value</strong></h3>
<p>You should never open source anything that has a core value to your business. If there is a trade secret – an idea or a way of its implementation that makes your business unique, you should not open source it so that it does not become available for your competitors. Yet, if you have ideas and tools that can be used by the public without any loss for your business – open source them.</p>
<h2 id="heading-why-open-source-is-the-right-thing-to-do"><strong>Why Open Source Is the Right Thing to Do</strong></h2>
<p>If you are an Internet user (and you definitely are), you inevitably use an unbelievable amount of free software open source. The Internet inventors designed a huge share of it as open source projects, and anyone using it today reaps the fruits of their effort. For instance, cloud computing is largely based on open source contributions.</p>
<p>Besides, a survey by Tidelift and The New Stack states that 84 percent of software developers use open source in their professional routine. Making use of somebody else’s experience and knowledge, why don’t you share yours?</p>
<p><em>If we enjoy the benefits of open source, giving back to the community is the right thing to do.</em></p>
<h2 id="heading-participate-in-open-source-development"><strong>Participate in Open Source Development!</strong></h2>
<p>How to start? Open your GitHub repository to the public and tell the world about it via your blog, social media, or developer forums. Register on <a target="_blank" href="https://news.ycombinator.com/">Hacker News</a> as there are a lot of open source contributors hanging out.</p>
<p>Open sourcing makes you grow faster as a developer and brings a useful result to the entire community. At the same time, you should try not to harm the community that gives you all these great open source things. Contribute wisely and help others by answering questions you can help with.</p>
<h2 id="heading-do-you-have-an-idea-for-a-project">Do you have an idea for a project?</h2>
<p>My company KeenEthics has a lot of experience with open source <a target="_blank" href="https://keenethics.com/services-web-development">web development</a> and <a target="_blank" href="https://keenethics.com/services-mobile-development">mobile app deveopment</a>. If you are ready to change the game and start your project, feel free to <a target="_blank" href="https://keenethics.com/contacts">get in touch</a><em>.</em></p>
<p>If you have enjoyed the article, you should definitely read another one: <a target="_blank" href="https://keenethics.com/blog/agile-testing">Agile Testing: How to Ensure High Quality Software</a>.</p>
<h2 id="heading-ps">P.S.</h2>
<p>I would also like to say thank you to <a target="_blank" href="https://www.linkedin.com/in/oleksiy-pletnov-212b3764/">Alex Pletnov</a>, CTO @ KeenEthics, for inspiring and contributing to the article.</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/1554243600000-open-source">What Is Great About Developing Open Source and What Is Not?</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ NodeJS vs Python: How to Choose the Best Technology to Develop Your Web App's Back End ]]>
                </title>
                <description>
                    <![CDATA[ In this article, we'll be bold and claim that one of these technologies is winning. The question is: which one is it? Let's jump on in and find out. Background and overview Node.js and Python are among the most popular technologies for back-end devel... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/nodejs-vs-python-choosing-the-best-technology-to-develop-back-end-of-your-web-app/</link>
                <guid isPermaLink="false">66be14c50c9c630f4d48debf</guid>
                
                    <category>
                        <![CDATA[ node ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Node.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 14 Jan 2020 16:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/nodejs-vs-python.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, we'll be bold and claim that one of these technologies is winning. The question is: which one is it? Let's jump on in and find out.</p>
<h3 id="heading-background-and-overview">Background and overview</h3>
<p>Node.js and Python are among the most popular technologies for back-end development. Common knowledge holds that there are no better or worse programming languages, and that everything depends on each developer's preferences. </p>
<p>Yet, in this article, I am going to be brave and claim that one of these technologies – <a target="_blank" href="https://keenethics.com/services-web-development-node">NodeJS</a> or Python 3 – is winning. Which one will it be? Let’s see.</p>
<p>The criteria that I am going to consider are:</p>
<ol>
<li>Architecture</li>
<li>Speed</li>
<li>Syntax</li>
<li>Scalability</li>
<li>Extensibility</li>
<li>Libraries</li>
<li>Universality</li>
<li>Learning curve</li>
<li>Community</li>
<li>Apps it is best suitable for</li>
</ol>
<p>Before I jump into a detailed side-by-side comparison, you can have a look at this infographic to get a general understanding.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/3cwVqg7Wc3zru8kHavpWeK/35503a74c411a50c50835e2c5c00f6f6/Angular_React__2_-min.png?fm=png&amp;q=85&amp;w=1000" alt="node vs python" width="1000" height="2077" loading="lazy"></p>
<h2 id="heading-brief-overview">Brief overview</h2>
<h3 id="heading-nodejs">NodeJS</h3>
<p>NodeJS is not a programming language but rather an open-sourced runtime environment for JavaScript. It was initially released in 2009 by <a target="_blank" href="https://github.com/ry">Ryan Dahl</a>. The latest version – NodeJS 12.6.0 – was released in July 2019.</p>
<p>The most outstanding thing about Node.js is that it is based on Google’s V8 engine. It is a virtual machine with built-in interpreter, compilers, and optimizers. Written in C++, this engine was designed by Google to be used in Google Chrome. The purpose of this engine is to compile JavaScript functions into a machine code. V8 is well-known for its high speed and constantly advancing performance.</p>
<h3 id="heading-python"><strong>Python</strong></h3>
<p>Python is an open-sourced high-level programming language. It was first released in 1991 by <a target="_blank" href="https://github.com/gvanrossum">Guido van Rossum</a>. The latest version is Python 3.8, and it was released in October 2019. But Python 3.7 is still more popular.</p>
<p>Python mainly runs on Google’s App Engine. Also developed by Google, the App Engine lets you develop web apps with Python and allows you to benefit from numerous libraries and tools that the best Python developers use.</p>
<p><strong>NodeJS vs Python: 0 – 0</strong></p>
<h2 id="heading-architecture">Architecture</h2>
<h3 id="heading-nodejs-1"><strong>NodeJS</strong></h3>
<p>Node.js is designed as an event-driven environment, which enables asynchronous input/output. A certain process is called as soon as the respective event occurs, which means that no process blocks the thread. The event-driven architecture of Node.js is perfectly suitable for the development of chat applications and web games.</p>
<h3 id="heading-python-1"><strong>Python</strong></h3>
<p>By contrast, Python is not designed that way. You can use it to build an asynchronous and event-driven app with the help of special tools. Modules like <a target="_blank" href="https://docs.python.org/3/library/asyncio.html">asyncio</a> make it possible to write asynchronous code in Python as it would be done in Node.js. But this library is not built in most Python frameworks, and it requires some additional hustle.</p>
<p>This event-driven architecture brings Node.js its first point.</p>
<p><strong>NodeJS vs Python: 1 – 0</strong></p>
<h2 id="heading-speed">Speed</h2>
<h3 id="heading-nodejs-2"><strong>NodeJS</strong></h3>
<p>First of all, since JavaScript code in Node.js is interpreted with the V8 engine (in which Google invests heavily), Node.js's performance is remarkable. </p>
<p>Second, Node.js executes the code outside the web browser, so the app is more resource-efficient and performs better. This also allows you to use features that cannot be used in a browser, such as TCP sockets. </p>
<p>Third, the event-driven non-blocking architecture enables several requests to be processed at the same time, which accelerates code execution. </p>
<p>And finally, single module caching is enabled in Node.js, which reduces app loading time and makes it more responsive.</p>
<h3 id="heading-python-2"><strong>Python</strong></h3>
<p>Both Python and JavaScript are interpreted languages, and they are generally slower than compiled languages, such as Java. Python is beat out by Node.js in this case. </p>
<p>Unlike Node.js, Python is single-flow, and requests are processed much more slowly. So, Python is not the best choice for apps that prioritize speed and performance or involve a lot of complex calculations. Therefore, Python web applications are slower than <a target="_blank" href="https://keenethics.com/services-web-development-node">Node.js web applications.</a></p>
<p>Since Node.js is faster, it wins a point in terms of performance and speed.</p>
<p><strong>NodeJS vs Python: 2 – 0</strong></p>
<h2 id="heading-syntax">Syntax</h2>
<h3 id="heading-nodejs-3"><strong>NodeJS</strong></h3>
<p>Syntax, for the most part, is a matter of personal preference. If I start saying that one is better and the other is worse, I know I'll face a lot of criticism and skepticism from our readers. </p>
<p>In fact, Node.js syntax is quite similar to the browser's JavaScript. Therefore, if you are familiar with JavaScript, you are not going to have any difficulties with Node.js.</p>
<h3 id="heading-python-3"><strong>Python</strong></h3>
<p>Python’s syntax is often deemed its greatest advantage. While coding in Python, software developers need to write fewer lines of code than if they were coding in Node.js. Python's syntax is very simple, and it is free of curly brackets. </p>
<p>Because of this, the code is much easier to read and debug. In fact, Python code is so readable that it can be understood by clients with some technical background. But again, it depends on personal preference.</p>
<p>But in the end, because Python's syntax is easier to understand and learn for beginners, Python wins a point here.</p>
<p><strong>NodeJS vs Python: 2 – 1</strong></p>
<h2 id="heading-scalability">Scalability</h2>
<h3 id="heading-nodejs-4"><strong>NodeJS</strong></h3>
<p>Node.js spares you the need to create a large monolithic core. You create a set of microservices and modules instead, and each of them will communicate with a lightweight mechanism and run its own process. You can easily add an extra microservice and module, which makes the development process flexible. </p>
<p>Also, you can easily scale a Node.js web app both horizontally and vertically. To scale it horizontally, you add new nodes to the system you have. To scale it vertically, you add extra resources to the nodes you have. </p>
<p>And finally in terms of typing, you have more options in Node.js than in Python. You can use weakly-typed JavaScript or strongly-typed TypeScript.</p>
<h3 id="heading-python-4"><strong>Python</strong></h3>
<p>In order to scale an app, multithreading needs to be enabled. But Python does not support multithreading because it uses Global Interpreter Lock (GIL). </p>
<p>Although Python has libs for multithreading, it is not "true" multithreading. Even if you have multiple threads, GIL does not let the Python interpreter perform tasks simultaneously but rather makes it run only one thread at a time. Python has to use GIL even though it negatively affects performance because Python's memory management is not thread-safe. </p>
<p>Furthermore, Python is dynamically-typed. Yet, dynamically-typed languages are not suitable for large projects with growing development teams. As it grows, the system gradually becomes excessively complex and difficult to maintain.</p>
<p>Evidently, Python loses out a bit to Node.js in terms of scalability.</p>
<p><strong>NodeJS vs Python: 3 – 1</strong></p>
<h2 id="heading-extensibility">Extensibility</h2>
<h3 id="heading-nodejs-5"><strong>NodeJS</strong></h3>
<p>Node.js can be easily customized, extended, and integrated with various tools. It can be extended with the help of built-in APIs for developing HTTP or DNS servers. </p>
<p>It can be integrated with <a target="_blank" href="https://babeljs.io/">Babel</a> (a JS compiler) which facilitates front-end development with old versions of Node or the browser. </p>
<p><a target="_blank" href="https://jasmine.github.io/2.0/node.html">Jasmine</a> is helpful for unit-testing, and <a target="_blank" href="http://logio.org/">Log.io</a> is helpful for project monitoring and troubleshooting. For data migration, process management, and module bundling, you can use <a target="_blank" href="https://github.com/naturalatlas/migrat">Migrat</a>, <a target="_blank" href="http://pm2.keymetrics.io/">PM2</a>, and <a target="_blank" href="https://webpack.github.io/">Webpack</a>. </p>
<p>And Node.js can be extended with such frameworks as <a target="_blank" href="https://keenethics.com/tech-back-end-express">Express</a>, Hapi, <a target="_blank" href="https://keenethics.com/services-web-development-meteor">Meteor</a>, Koa, Fastify, Nest, Restify, and others.</p>
<h3 id="heading-python-5"><strong>Python</strong></h3>
<p>Python was introduced in 1991, and throughout its history a lot of development tools and frameworks have been created. </p>
<p>For example, Python can be integrated with popular code editor <a target="_blank" href="https://www.sublimetext.com/">Sublime Text</a>, which offers some additional editing features and syntax extensions. </p>
<p>For test automation, there is the <a target="_blank" href="https://robotframework.org/">Robot Framework</a>. There are also a few powerful web development frameworks, such as Django, Flask, Pyramid, Web2Py, or CherryPy.</p>
<p>So, both networks are easily extensible, and both win a point.</p>
<p><strong>Node JS vs Python: 4 – 2</strong></p>
<h2 id="heading-libraries">Libraries</h2>
<h3 id="heading-nodejs-6"><strong>NodeJS</strong></h3>
<p>In Node.js, libraries and packages are managed by NPM – the Node Package Manager. It is one of the biggest repositories of software libraries. NPM is fast, well-documented, and easy to learn to work with.</p>
<h3 id="heading-python-6"><strong>Python</strong></h3>
<p>In Python, libraries and packages are managed by Pip, which stands for “Pip installs Python”. Pip is fast, reliable, and easy to use, so developers find it easy to learn to work with as well.</p>
<p>Again, both win a point.</p>
<p><strong>Node JS vs Python: 5 – 3</strong></p>
<h2 id="heading-universality">Universality</h2>
<h3 id="heading-nodejs-7"><strong>NodeJS</strong></h3>
<p>Node.js is predominantly used for the back-end development of web applications. Yet, for front-end development, you use JavaScript so that both front-end and back-end share the same programming language. </p>
<p>With Node.js, you can develop not only <a target="_blank" href="https://keenethics.com/services-web-development">web apps</a> but also desktop and hybrid <a target="_blank" href="https://keenethics.com/services-mobile-development">mobile apps</a>, along with cloud and IoT solutions. </p>
<p>Node.js is also cross-platform, meaning that a developer can create a single desktop application that will work on Windows, Linux, and Mac. Such universality is a great way to reduce project costs since one team of developers can do it all.</p>
<h3 id="heading-python-7"><strong>Python</strong></h3>
<p>Python is full-stack, so it can be used both for back-end and front-end development. Similar to Node.js, Python is cross-platform, so a Python program written on Mac will run on Linux. </p>
<p>Both Mac and Linux have Python pre-installed, but on Windows you need to install the Python interpreter yourself. </p>
<p>While Python is great for web and desktop development, it is rather weak for mobile computing. Therefore, mobile applications are generally not written in Python. As for IoT and AI solutions, the popularity of Python is growing quickly.</p>
<p>In terms of universality, Node.js and Python go nose to nose. It would be fair to grant each a point here.</p>
<p><strong>Node JS vs Python: 6 – 4</strong></p>
<h2 id="heading-learning-curve">Learning curve</h2>
<h3 id="heading-nodejs-8"><strong>NodeJS</strong></h3>
<p>Node.js is JavaScript-based and can be easily learned by beginning developers. As soon as you have some knowledge of JavaScript, mastering Node.js should not be a problem. </p>
<p>Installing Node.js is quite simple, but it introduces some advanced topics. For example, it may be difficult to understand its event-driven architecture at first. Event-driven architecture has an outstanding impact on app performance, but developers often need some time to master it. </p>
<p>Even so, the entry threshold for Node.js is still quite low. But this can mean that there are a lot of unskilled Node.js developers. This might make it harder for you to find a job in such a busy market. But if you are confident and have a great portfolio, you can easily solve this problem. </p>
<p>On the other hand, if you're a business owner, you might face a problem of hiring low-quality specialists. But you also can solve this problem by hiring a trusted software development agency.</p>
<h3 id="heading-python-8"><strong>Python</strong></h3>
<p>If you do not know JavaScript and you have to choose what to learn – Python or Node.js – you should probably start with the former. Python may be easier to learn because its syntax is simple and compact. </p>
<p>Usually, writing a certain function in Python will take fewer lines of code than writing the same function in Node.js. But this is not always the case because the length of your code greatly depends on your programming style and paradigm. Another plus is that there are no curly brackets as in JavaScript. </p>
<p>Learning Python also teaches you how to indent your code properly since the language is indentation and whitespace sensitive. (The same is true for Node.js.) The problem with indentation and whitespace sensitive languages is that a single indentation mistake or a misplaced bracket can break your code for no obvious reason. And new developers may find it hard to troubleshoot such issues. </p>
<p>Installing Python is more difficult than installing Node.js. If you have Linux or Windows, you should be able to install Python with no problem. If you use MacOS, you will see that you have Python 2.0 preinstalled – but you cannot use it as it will interfere with system libraries. Instead, you need to download and use another version. When you're configuring the development environment, do not forget to select the proper version.</p>
<p>Both Python and Node.js are easy to learn, so it's hard to say objectively which one is simpler. It also is a matter of personal preference. So, once again both technologies receive a point.</p>
<p><strong>Node JS vs Python: 7 – 5</strong></p>
<h2 id="heading-community">Community</h2>
<h3 id="heading-nodejs-9"><strong>NodeJS</strong></h3>
<p>The Node.js community is large and active. It is a mature open-sourced language with a huge user community. It's ten years after its release and developers from all over the world have grown to love this technology. As a business owner, you can easily find Node.js developers. As a developer, you can always rely on peer support.</p>
<h3 id="heading-python-9"><strong>Python</strong></h3>
<p>Python is somewhat older than Node.js, and it is also open-sourced. The user community has an immense number of contributors with different levels of experience. Once again, should you be a business owner or a developer, you benefit from the large community.</p>
<p>Both Python and Node.js have great communities, so both receive a point.</p>
<p><strong>Node JS vs Python: 8 – 6</strong></p>
<h2 id="heading-apps-it-is-best-suitable-for">Apps it is best suitable for</h2>
<h3 id="heading-nodejs-10"><strong>NodeJS</strong></h3>
<p>Due to its event-based architecture, Node.js perfectly suits applications that have numerous concurrent requests, heavy client-side rendering, or frequent shuffling of data from a client to a server. </p>
<p>Some examples include IoT solutions, real-time chatbots and messengers, and complex single-page apps. </p>
<p>Node.js also works well for developing real-time collaboration services or streaming platforms. However, Node.js is not the best option for developing applications that require a lot of CPU resources.</p>
<h3 id="heading-python-10"><strong>Python</strong></h3>
<p>Python is suitable for the development of both small and large projects. It can be used for data science apps, which involve data analysis and visualization, for voice and face recognition systems, image-processing software, neural networks, and machine learning systems. Python can also be used for the development of 3D modeling software and games.</p>
<p>Both technologies let you develop a wide range of apps. Which one is more suitable depends exclusively on what you need. Therefore, choosing a better one does not make any sense. Here, neither technology gets a point because they do not compete directly in this way.</p>
<p><strong>Node JS vs Python: 8 – 6</strong></p>
<h2 id="heading-to-wrap-up">To Wrap Up</h2>
<p>Do you remember that I said I would prove that one technology is better than the other? Good! </p>
<p>But you also should remember that each software project has its own needs and requirements and you should choose your technology based on those needs.</p>
<p><em>A language that works for one project may not work for another project at all.</em></p>
<p>Now, I can draw conclusions. With the 8 – 6 score, Node.js is slightly ahead of Python. Keep these results in mind when choosing Python vs JavaScript for web development.</p>
<h2 id="heading-do-you-have-an-idea-for-a-project">Do you have an idea for a project?</h2>
<p>My company KeenEthics can't help you with Python but we are an <a target="_blank" href="https://keenethics.com/services-web-development-node">experienced Node.js company</a> willing to take up the challenge. If you are ready to change the game and start your project, feel free to <a target="_blank" href="https://keenethics.com/contacts">get in touch</a><em>.</em></p>
<p>If you have enjoyed the article, you should definitely read another wonderful comparison: <a target="_blank" href="https://keenethics.com/blog/angular-vs-react-what-to-choose-for-your-app">Angular vs React: What to Choose for Your App?</a> or <a target="_blank" href="https://www.freecodecamp.org/news/pwa-vs-amp-what-is-the-difference-and-how-do-you-choose/">Progressive Web Apps vs Accelerated Mobile Pages: What's the Difference and Which is Best for You?</a></p>
<h2 id="heading-ps">P.S.</h2>
<p>I would also like to say thank you to Yaryna Korduba, one of the awesomest web developers at KeenEthics, for inspiring and contributing to the article.</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/nodejs-vs-python">NodeJS vs Python: Choosing the Best Technology to Develop Back-End of Your Web App</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Progressive Web Apps vs Accelerated Mobile Pages: What's the Difference and Which is Best for You? ]]>
                </title>
                <description>
                    <![CDATA[ Do you understand what PWAs and AMPs are, and which might be better for you? Let's have a look and find out. So many people own smartphones these days. This opens up endless opportunities for a business - opportunities which, however, are immediately... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/pwa-vs-amp-what-is-the-difference-and-how-do-you-choose/</link>
                <guid isPermaLink="false">66be14ce2728aa32fea75a32</guid>
                
                    <category>
                        <![CDATA[ AMP ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mobile ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mobile app development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ PWA ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 07 Jan 2020 14:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/PWA-vs-AMP.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Do you understand what PWAs and AMPs are, and which might be better for you? Let's have a look and find out.</p>
<p>So many people own smartphones these days. This opens up endless opportunities for a business - opportunities which, however, are immediately challenged by the immense number of competitors in the mobile software market. </p>
<p>Mobile apps are surely more convenient than web or desktop platforms. Yet, they are not the most comfortable option that the industry offers.</p>
<p>To hit the highest level of user satisfaction and to outrun competitors, inventive people opt in favor of progressive web apps (PWAs) or accelerated mobile pages (AMPs).</p>
<p>What are these things, and how should you choose the best option? Let’s consider each one-by-one by going through these simple questions:</p>
<ol>
<li>What is a PWA?</li>
<li>What is an AMP?</li>
<li>How are they similar?</li>
<li>How are they different?</li>
<li>Why PWAs are better than web pages</li>
<li>Why PWAs are better than native mobile</li>
<li>Why AMPs are better than web pages</li>
<li>Why AMPs are NOT better than native mobile</li>
</ol>
<h2 id="heading-1-what-is-a-pwa">1. What Is a PWA?</h2>
<p>A progressive web application, or PWA, unites the advantages of both web and mobile apps into a single software product. As <a target="_blank" href="https://developers.google.com/web/progressive-web-apps">Google</a> declares, PWAs are “user experiences that have the reach of the web and are reliable, fast, and engaging”. It is a technology that lets you use a website as if it was a native app.</p>
<p><a target="_blank" href="https://twitter.com/?lang=en">Twitter</a> is one of the major companies using PWAs. To install the app, you open the web version on your phone and add it to your home screen. When you open Twitter from the home screen icon, you will be opening it as a progressive web app.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1TGtQag89baQtjFwQFRG1t/29cacc2916819498d669921833c88ceb/8-min.png?fm=png&amp;q=85&amp;w=1000" alt="PWA" width="1000" height="563" loading="lazy"></p>
<h3 id="heading-fundamentals">Fundamentals</h3>
<p>PWAs are a highly responsive and easily shareable solution, which can work offline. They store HTML and CSS files in the browser cache and archive them with service workers. This makes it possible to use the web page offline. Service workers are one of the three essential components of a PWA, along with the manifest file and a secure protocol HTTPS.</p>
<p><strong>Service workers</strong> are JavaScript code components which play the role of a proxy between the network and the browser. </p>
<p>When you open a web page for the first time, service workers store the necessary data in the browser cache. When you open it for the second time, service workers retrieve this data from the cache even before the app checked network availability. </p>
<p>Not only do they provide the ability to work offline but also they greatly boost the response time. Service workers also manage push notifications.</p>
<p><strong>The manifest file</strong> is a JSON file containing all the information about your app. For instance, it contains data about the home screen icon of your PWA, its short name, color palette, or theme. </p>
<p>If you are using the Chrome browser on an Android phone, the manifest file will trigger the automatic installation of the PWA onto your phone.</p>
<p><strong>The secure HTTPS protocol</strong> is an absolute must if you develop a progressive web app. While service workers make the very concept of a PWA possible, they are vulnerable to network errors or breaches. Service workers can intercept network requests and modify responses. To ensure data security and network security, the secure protocol needs to be used.</p>
<h3 id="heading-success-stories">Success stories</h3>
<p>Twitter is not the only company that has benefited from PWAs. Check out these <a target="_blank" href="https://developers.google.com/web/showcase/">case studies</a> published by Google to see how this technology helped popular businesses succeed. Among these companies are <a target="_blank" href="https://www.pinterest.com/">Pinterest</a>, <a target="_blank" href="https://www.alibaba.com/">Alibaba</a>, <a target="_blank" href="https://weather.com/">The Weather Channel</a>, <a target="_blank" href="https://www.lancome.com/">Lancome</a>, and <a target="_blank" href="https://www.homedepot.com/">The Home Depot.</a></p>
<h2 id="heading-2-what-is-an-amp">2. What Is an AMP?</h2>
<p>AMP stands for accelerated mobile page. It's a mobile-friendly web page, which is designed to be loaded instantly. It is a fast and smoothly loading solution which is developed with the user experience in mind. Introduced as an open-source project, the AMP technology was integrated by Google in February 2016.</p>
<p>In 2016, <a target="_blank" href="https://www.theguardian.com/membership/2016/feb/24/todays-release-of-accelerated-mobile-pages-amp">The Guardian announced</a> that their platform was now available as an AMP. To help readers see how it worked, they displayed the same article both as <a target="_blank" href="https://www.theguardian.com/us-news/commentisfree/2016/feb/16/thomas-piketty-bernie-sanders-us-election-2016">a web version</a> and <a target="_blank" href="https://amp.theguardian.com/us-news/commentisfree/2016/feb/16/thomas-piketty-bernie-sanders-us-election-2016">an AMP version</a>. </p>
<p>There were some differences, but they were insignificant. But what you'd notice right away was how much faster the AMP article loaded compared to the regular web article.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1ARjDXZC1yH4p15rxRosIW/e23cf5144729c5985e5a8ac156fb66a6/2.7_billion_people_use_smartphones__1_-min.png?fm=png&amp;q=85&amp;w=1000" alt="*By comparing this illustration with the one I included earlier, you could notice an interesting point. A PWA needs to be installed. In turn, you do not need to install AMP. It is accessed via a different like.
" width="1000" height="563" loading="lazy">
<em>*By comparing this illustration with the one I included earlier, you could notice an interesting point. A PWA needs to be installed. In turn, you do not need to install AMP. It is accessed via a different like.</em></p>
<h3 id="heading-fundamentals-1">Fundamentals</h3>
<p>The idea of AMPs is to reduce the amount of unnecessary content and functionality so that the app displays essential content immediately. The data can be reduced up to ten times. The three essential components of AMPs are AMP HTML, AMP Components, and the AMP Cache.</p>
<p><strong>AMP HTML</strong> is a simplified version of regular HTML. AMP HTML does not allow some tags and elements of HTML (for example, forms). To understand better what AMP HTML should look like, check out the <a target="_blank" href="https://amp.dev/documentation/guides-and-tutorials/start/create/basic_markup/?referrer=ampproject.org">required mark-up</a>.</p>
<p><strong>AMP Components</strong> are the scripts that enable you to do without JavaScript. The idea of AMP is to get rid of all JavaScript scripts as make pages load more slowly. </p>
<p>But this does not mean that your page should do without animations, modified layouts, analytics data, autocomplete suggestions, or ads. There is an extensive <a target="_blank" href="https://amp.dev/documentation/components/?referrer=ampproject.org">library of components</a> that enable you to implement these and a lot of other features.</p>
<p><strong>The AMP Cache</strong> is a proxy-based content delivery network which fetches and caches page content. AMP Cache enables you as an app owner to easily introduce page updates. It optimizes and, if needed, modifies the AMP.</p>
<h3 id="heading-success-stories-1">Success stories</h3>
<p>The same as with PWAs, companies are often very proud of the business advantages that AMPs offer. Here is a collection of <a target="_blank" href="https://amp.dev/success-stories/">success stories</a> and case studies of companies that used AMPs and benefited from them. <a target="_blank" href="https://www.musement.com/us/">Musement</a>, <a target="_blank" href="http://www.rcsmediagroup.it/">RCS MediaGroup</a>, <a target="_blank" href="https://www.cnbc.com/">CNBC</a>, <a target="_blank" href="https://www.washingtonpost.com/">The Washington Post</a> are all companies that have implemented or plan to implement AMPs.</p>
<h2 id="heading-3-how-are-pwas-and-amps-similar">3. How Are PWAs and AMPs similar?</h2>
<p>Both PWAs and AMPs are methods of displaying web pages on mobile devices. Both of them are created to enhance the user experience. </p>
<p>AMPs and PWAs both help reduce page load time. While AMPs may be slightly more effective in terms of loading speed than PWAs, the difference between AMP and PWA loading times is barely noticeable. </p>
<p>Both technologies are actively supported by Google. There is <a target="_blank" href="https://developers.google.com/web/progressive-web-apps">a PWA page on Google Developers</a> and <a target="_blank" href="https://developers.google.com/amp">an AMP page on Google Developers</a> as well.</p>
<p>There are not a lot of other similarities, but this primary similarity is essential. </p>
<p>Now let’s see what the differences are. </p>
<h2 id="heading-4-how-are-pwas-and-amps-different">4. How Are PWAs and AMPs Different?</h2>
<h3 id="heading-appearance">Appearance</h3>
<p>By using a PWA you do not feel like you are using a web page. PWAs look and feel like a mobile app.</p>
<p>By using AMPs, you are well aware that you are using a web page because it looks the same.</p>
<h3 id="heading-development">Development</h3>
<p>In the case of PWAs, the application code is written either from scratch or with some parts of the existing code.</p>
<p>In the case of AMPs, the existing code of a web page is stripped of unnecessary CSS and JS so that the web page loads faster.</p>
<h3 id="heading-user-experience">User experience</h3>
<p>PWAs offer a much better user experience. They have push-notifications, a home screen icon, and no browser tabs. Also, they are much easier to download and lighter in size than a regular mobile app. PWAs load faster than a regular web version because they are embedded with App Shell. And PWAs can be used when the network connection is down.</p>
<p>AMPs offer a slightly improved user experience since the page loads faster than a regular page. Still, this is the only UX advantage that they offer. Unlike PWAs, AMPs cannot work offline.</p>
<h3 id="heading-performance">Performance</h3>
<p>From an SEO standpoint, AMP wins the competition. Google favors these pages and lists them in the carousel of top stories, which can increase your click-through rate.</p>
<p>PWAs, in turn, do not have a direct advantage for SEO. However, better user experience translates into higher retention rates, which helps you win with SEO.</p>
<h3 id="heading-support">Support</h3>
<p>PWAs are not supported equally on all devices, so you may find slight inconveniences when they're displayed on iOS. Also, they do not support all the hardware functionalities, such as Bluetooth, NFC, GPS, or accelerometers.</p>
<p>AMPs are supported by all major browsers on all devices.</p>
<h3 id="heading-apps-theyre-best-suited-for">Apps they're best suited for</h3>
<p>PWAs work perfectly for apps that require user interactions. E-commerce websites, social media, or online learning platforms where the app needs to be responsive and constantly updated can make use of this technology. This is why Twitter uses a PWA, for example.</p>
<p>AMPs are more suitable for platforms with a wall of content, such as online magazines or newspapers. AMPs load content instantly, but the interaction opportunities are limited. This is why The Guardian decided to employ AMPs.</p>
<h2 id="heading-5-why-pwas-are-better-than-web-pages">5. Why PWAs Are Better Than Web Pages</h2>
<p>If you access a web page on mobile, you will have to deal with browser tabs, slow loading times, and annoying pop-ups. If your device has a relatively small screen or a slow network connection, surfing the web on it becomes unbearable.</p>
<p>This problem is solved by progressive web apps. In a few clicks, you install the app on your phone and get down to using it. No need to type a link, no browser tabs, and no pop-up screens. The app works fast, and it does work if the network connection is down.</p>
<p>Alright, the benefits of this solution are evident, but it seems like native mobile apps could work perfectly instead. No, they would not. Let’s see why PWAs are better than native mobile apps.</p>
<h2 id="heading-6-why-pwas-are-better-than-native-mobile-apps">6. Why PWAs Are Better Than Native Mobile Apps</h2>
<p>To use a native mobile application, you have to find it in the App Store or Google Play catalogs. Then, you have to wait for some time to download it. You might not have enough free space on your device, so you'll need to find some room.</p>
<p>In turn, PWAs are installed and ready to use in seconds. The file size is small (although it's bound to increase while you are using the app and it is caching). Still, the size of the cached data depends on the amount of free storage you have on your device.</p>
<p>As you can see, PWAs seem better than a web or native mobile app. But you should understand that this solution is not universal. Check out my recent article on <a target="_blank" href="https://keenethics.com/blog/progressive-web-apps-vs-native-which-to-choose-and-when">PWA vs Native</a> to learn when a native app is a better choice than a PWA.</p>
<h2 id="heading-7-why-amps-are-better-than-web-pages">7. Why AMPs Are Better Than Web Pages</h2>
<p>As mentioned above, web apps are slow and inconvenient, especially when accessed on mobile devices with small screen size or underpowered hardware.</p>
<p>By getting rid of all the web components that are unnecessary for a good user experience, accelerated mobile pages solve this problem. AMPs perform 4 times faster and use 10 times less data than regular web pages.</p>
<h2 id="heading-8-why-amps-are-not-better-than-native-mobile">8. Why AMPs Are NOT Better Than Native Mobile</h2>
<p>Unfortunately, AMPs cannot be a complete substitute for native mobile apps. They cannot be installed on the home screen, they still include browser tabs, and their functionality is limited to some basic stuff.</p>
<p>But for an online newspaper or for an informational website, such as <a target="_blank" href="https://www.webmd.com/">WebMD</a>, it is better to use AMPs rather than a native mobile app. These do not require any additional functionality for displaying page content.</p>
<h2 id="heading-to-wrap-up">To Wrap Up</h2>
<p>Both AMPs and PWAs are powerful technologies. To sum up the results of our initial question - PWAs vs AMPs: </p>
<ul>
<li>AMPs will be easier, faster, and cheaper for you to develop </li>
<li>PWA will offer more benefits.</li>
</ul>
<p>Just remember - neither of them is a universal solution, and neither is a panacea. Even using AMPs and PWAs together may not meet all your demands. Sometimes you may need to choose more conventional types of software. </p>
<p>If you are still not sure what to choose, our specialists share <a target="_blank" href="https://www.freecodecamp.org/news/four-questions-to-understand-if-you-need-pwa/">four questions to understand if you need PWA</a>. In short: <em>We believe that progressive web apps are the future. Accelerated mobile pages are just too simple and limited in functionality to compete.</em></p>
<h2 id="heading-do-you-have-an-idea-for-a-project">Do you have an idea for a project?</h2>
<p>My company KeenEthics is experienced in both AMP and <a target="_blank" href="https://keenethics.com/tech-apps-progressive-web-apps">progressive web app development</a>. If you are ready to change the game and start your project, feel free to <a target="_blank" href="https://keenethics.com/contacts">get in touch</a><em>.</em></p>
<h2 id="heading-ps">P.S.</h2>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/pwa-vs-amp">PWA vs AMP:  What Is the Difference and How Do You Choose?</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why You Should Use SVG Images: How to Animate Your SVGs and Make Them Lightning Fast ]]>
                </title>
                <description>
                    <![CDATA[ Why Are We Using SVG? The web development sector is growing at a rapid pace, and SVG (scalable vector graphics) images are becoming more popular. As vector images, SVGs are composed of mathematical equations that define the positioning and color of l... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-fresh-perspective-at-why-when-and-how-to-use-svg/</link>
                <guid isPermaLink="false">66be14ac2969640c348b568d</guid>
                
                    <category>
                        <![CDATA[ 100Days100Projects ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SVG ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 26 Nov 2019 14:51:07 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/11/svg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-why-are-we-using-svg"><strong>Why Are We Using SVG?</strong></h2>
<p>The web development sector is growing at a rapid pace, and SVG (scalable vector graphics) images are becoming more popular. As vector images, SVGs are composed of mathematical equations that define the positioning and color of lines and curves which make up graphic shapes and text in XML format. SVGs are used for icons, logos, graphic designs, and fonts.</p>
<p>Using SVGs is an easy choice once you consider the advantages they offer. For a client, you get superb quality on any device. For us as developers, there are even more reasons to use SVG. </p>
<p>Let's discuss some of the benefits of SVG now.</p>
<h3 id="heading-1-text-based-format"><strong>1. Text-based format</strong></h3>
<p>SVG elements contain text, which greatly improves the accessibility of a website. But the main advantage is that this text is indexed by search engines. And a user can find an SVG file via Google.</p>
<h3 id="heading-2-scalability"><strong>2. Scalability</strong></h3>
<p>The quality of SVG images does not depend on the resolution. Unlike images of other formats or icon fonts, SVGs look perfectly sharp on any device with any screen size. Scalability also means that if you use the same image throughout the website but in different sizes, you use a single SVG. You do not have to create multiple copies of it as in the case of PNG. Instead, you embed the same image and define the size of it directly in SVG code.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/u6zLw9HQVb8DpDR1rhvHp/a5e491c95b5261e47e1c28098b2a2422/Copy_of_2.7_billion_people_use_smartphones__1_-min.png?fm=png&amp;q=85&amp;w=1000" alt="Scalability" width="1000" height="459" loading="lazy"></p>
<h3 id="heading-3-high-performance"><strong>3. High performance</strong></h3>
<p>If you prioritize performance, you should use SVG. With SVG, there is no need for an HTTP request to load in an image file. The page loads faster as it has no files to download. Faster loading time translates into better webpage performance and higher search engine ranking. In turn, it improves user experience.</p>
<h3 id="heading-4-small-file-size"><strong>4. Small file size</strong></h3>
<p>The size of simple SVG files is defined by the colors, layers, gradients, effects, and masks that it contains. The size of a PNG or any other raster graphics file is defined by the number of pixels that it consists of. The larger a PNG image is, the heavier it gets in size. This is not the case for SVG icons, though. Also, SVGs can be optimized, and I will tell how later in this article.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/6TEDo4rR558facWlrHZjlT/ab71bf067cf14098d65c602eac3d5735/Copy_of_2.7_billion_people_use_smartphones__2_-min.png?fm=png&amp;q=85&amp;w=1000" alt="SVG file size" width="1000" height="488" loading="lazy"></p>
<h3 id="heading-5-numerous-editing-and-animating-opportunities"><strong>5. Numerous editing and animating opportunities</strong></h3>
<p>Unlike raster images, vector images can be edited both in special vector drawing programs and directly in a text editor. You can also edit colors or sizes of SVG icons directly via CSS. As for animating SVGs, it can be done with the help of SMIL, Web Animations API, ​WebGL, or CSS animation. Scroll down to learn more about CSS animation of SVG images.</p>
<h3 id="heading-6-integration-with-html-xhtml-and-css"><strong>6. Integration with HTML, XHTML, and CSS</strong></h3>
<p>SVG was designed “to integrate with and extend other prominent open Web platform technologies, such as X/HTML, CSS, and Javascript”, according to <a target="_blank" href="https://dev.w3.org/SVG/proposals/svg-html/svg-html-proposal.html">W3C</a>. So, unlike different image formats, this format can be easily integrated with other documents and technologies.</p>
<h3 id="heading-7-w3c-document-object-model-support"><strong>7. W3C Document Object Model support</strong></h3>
<p>There is growing community support for SVG. The <a target="_blank" href="https://www.w3.org/">World Wide Web Consortium</a> (W3C) has always claimed that the Internet cannot do without vector images. This organization basically <a target="_blank" href="https://www.w3.org/2002/04/svg11-pressrelease">created the SVG format</a>, and they actively support it nowadays.</p>
<h2 id="heading-what-are-the-inconveniences-of-svg"><strong>What Are the Inconveniences of SVG?</strong></h2>
<p>The large number of small parts makes the use of the SVG format irrational. The more parts an image consists of, the heavier it grows in size.</p>
<p>For example, <a target="_blank" href="https://www.amcharts.com/svg-maps/?map=usa">here</a> are two SVG maps of the United States. The second one is slightly more detailed than the first one. But the higher level of detail cost almost a fivefold increase in file size – 33 KB compared to 147 KB. If this map was not monochromatic, the increase would be much greater.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/4xg76fiYHZzxpSxDXW9uFp/4f5161cd3efc5dd2ea0d9578388498f0/Copy_of_2.7_billion_people_use_smartphones__3_-min.png?fm=png&amp;q=85&amp;w=1000" alt="SVG maps" width="1000" height="563" loading="lazy"></p>
<p>If the picture is linear and contains a few colors – SVG is a solution. However, if the details matter and there are a lot of them, PNG or JPEG may be more suitable.</p>
<p>Also note that SVG cannot be used for photographs. If you use a photograph on your website, SVG is not the best option. You definitely should go with a raster image format.</p>
<h2 id="heading-how-to-optimize-svg-images"><strong>How to Optimize SVG Images</strong></h2>
<p>When rendering a vector format, we have to write some extra SVG code. The end result should be optimized using different services. Most often, for optimizing SVG, I use a <a target="_blank" href="https://keenethics.com/services-web-development-node">Node.js</a> tool <a target="_blank" href="https://github.com/svg/svgo">SVGO</a>. It is quite easy to use, and there is no need to upload the images to other websites.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/7m9UpCpPW7GNLR9tXAvTca/4c804519c3dd110b650977f72785453a/0_8YcO63_4ajXq0qEb." alt="Example of SVG optimization using SVGO" width="1500" height="403" loading="lazy">
<em>Example of SVG optimization using SVGO</em></p>
<h2 id="heading-how-to-animate-svg"><strong>How to Animate SVG</strong></h2>
<p>SVG graphics on the web can be animated in a number of ways:</p>
<ol>
<li>SMIL, which is the native SVG animation specification</li>
<li>Web Animations API, which is a native JavaScript API allowing you to create more complex sequential animations without loading any external scripts</li>
<li>​WebGL</li>
<li>CSS animation</li>
</ol>
<p>Let’s consider the last one.</p>
<p><strong>CSS animation</strong> is used in order to avoid overloading your service with big libraries for animating icons and loaders.</p>
<p>To see the example of SVG check the <a target="_blank" href="http://jsfiddle.net/yd3c81bg/9/embedded/html,css,result">animated yolk</a>, the graphic design of which was initially drawn in Sketch.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/7JTBd4pwJJwKYmqgTSwScv/525b6d4e42c53c35961706390802bc5e/ezgif.com-crop.gif" alt="SVG gif" width="800" height="740" loading="lazy"></p>
<p>As you can see here, I use Keyframe Animation Syntax for animation. It is implemented by setting the initial position of an element by id (0%), transition (50%) and final position (100%). To achieve smooth animation, initial and final values are equal.</p>
<p>Here are some <strong>benefits</strong> of using the CSS approach to SVG animation:</p>
<ol>
<li>You do not need an external library.</li>
<li>Preprocessors (like Sass or Less) allow you to create variables.</li>
<li>You can use onAnimationEnd and some other animation hooks with native JavaScript.</li>
<li>This approach is easy to use for responsive web design development because you can modify your animation with media queries.</li>
</ol>
<p>The <strong>downsides</strong> of using CSS animation are the following:</p>
<ol>
<li>You cannot produce some complex physics effects, which would make the animation more realistic.</li>
<li>A lot of recalculation needs to be done if you adjust timing.</li>
<li>CSS and SVG graphics on mobile sometimes require strange hacks.</li>
</ol>
<h2 id="heading-for-example"><strong>For Example</strong></h2>
<p>Still, we can make some interesting projects with the help of simple and trivial CSS animation. For example, I have made a simple game-video using HTML, CSS, and a little bit of JavaScript. All the SVGs were drawn in Sketch. The objective of this game is to save the princess. In any situation, just click. You can find the project at my <a target="_blank" href="https://github.com/maryna-yanul/duck-the-princess/">GitHub</a>.</p>
<h2 id="heading-to-wrap-up"><strong>To Wrap Up</strong></h2>
<p>SVGs are a great image format to go with. They are scalable, lightweight, text-based, and efficient. They are easy to edit, animate, and integrate. Importantly, they are supported by almost any browser except Internet Explorer 8 and Android 2.3.</p>
<p>While learning to work with scalable vector graphics images may take you some time, it is an investment that will pay off considering the benefits of SVG.</p>
<h2 id="heading-do-you-have-an-idea-for-a-software-project">Do you have an idea for a software project?</h2>
<p>My company KeenEthics is a team of experienced <a target="_blank" href="https://keenethics.com/services-web-development">web application developers</a>. In case you need a free estimate of a similar project, feel free to <a target="_blank" href="https://keenethics.com/contacts?activeForm=estimate">get in touch</a><em>.</em></p>
<p>You can read more of similar articles on my Keen Blog. Allow me to suggest you read <a target="_blank" href="https://keenethics.com/blog/the-value-of-user-testing">The Value of User Testing</a> or <a target="_blank" href="https://www.freecodecamp.org/news/7-cases-when-not-to-use-docker/">7 Cases When You Should Not Use Docker</a>. </p>
<h2 id="heading-ps">P.S.</h2>
<p>Also, I would like to say "thank you" to <a target="_blank" href="https://www.linkedin.com/in/yanul/">Maryna Yanul</a> for coauthoring this article as well as the readers for making it to the end!</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/1478674800000-svg-animation-scalable-vector-graphics">A Fresh Perspective at Why, When, and How to Use SVG</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 7 Cases When You Should Not Use Docker ]]>
                </title>
                <description>
                    <![CDATA[ Docker is a game-changer. But it is not a one-size-fits-all solution. There are many good things about Docker. It packs, ships, and runs applications as a lightweight, portable, and self-sufficient containerization tool. Docker is great for businesse... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/7-cases-when-not-to-use-docker/</link>
                <guid isPermaLink="false">66be14a82969640c348b568b</guid>
                
                    <category>
                        <![CDATA[ Docker ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Docker Containers ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 19 Nov 2019 16:23:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/11/Docker-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-docker-is-a-game-changer-but-it-is-not-a-one-size-fits-all-solution">Docker is a game-changer. But it is not a one-size-fits-all solution.</h2>
<p>There are many good things about Docker. It packs, ships, and runs applications as a lightweight, portable, and self-sufficient containerization tool. Docker is great for businesses of all sizes. When you are working on a piece of code in a small team, it eliminates the “but it works on my machine” problem. Meanwhile, enterprises can use Docker to build Agile software delivery pipelines to ship new features faster and more securely.</p>
<p>With its built-in containerization system, Docker is an excellent tool for cloud computing. In turn, Docker Swarm advances clusterization and decentralized design. Sounds too good to be true, right? Well, there are still several cases when not to use Docker. Here are seven of them.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/2JJ68pTAT6ZhVo05jVwbWI/d79861dd9b194ee83a313ce18f8b624e/Infographics__3_-min.png?fm=png&amp;q=85&amp;w=1000" alt="do not use docker" width="1000" height="1000" loading="lazy"></p>
<p>Let's go through these one by one.</p>
<h2 id="heading-do-not-use-docker-if-you-need-to-boost-speed"><strong>Do Not Use Docker if You Need to Boost Speed</strong></h2>
<p>Docker containers are smaller and require fewer resources than a virtual machine with a server and a database. At the same time, Docker will use as much system resources as the host’s kernel scheduler will allow. You should not expect Docker to speed up an application in any way.</p>
<p>What is more, Docker might even make it slower. If you are working with it, you should set limits on how much memory, CPU, or block IO the container can use. Otherwise, if the kernel detects that the host machine’s memory is running too low to perform important system functions, it could start killing important processes. If the wrong process is killed (including the Docker itself), the system will be unstable.</p>
<p>Unfortunately, Docker’s memory adjustments – the out-of-memory priority on the Docker daemon – do not solve this issue. By contrast, an additional layer between an application and the operating system could also result in speed reduction. Yet, this decrease will be insignificant. Docker containers are not fully isolated and do not contain a complete operating system like any virtual machine.</p>
<h2 id="heading-do-not-use-docker-if-you-prioritize-security"><strong>Do Not Use Docker if You Prioritize Security</strong></h2>
<p>The greatest Docker security advantage is that it breaks the app into smaller parts. If the security of one part is compromised, the rest of them will not be affected.</p>
<p>However, while isolated processes in containers promise improved security, all containers share access to a single host operating system. You risk running Docker containers with incomplete isolation. Any malicious code can get access to your computer memory.</p>
<p>There is a popular practice to run a lot of containers in a single environment. This is how you make your app predisposed to the Resource Abuse type of attacks unless you limit the resource container capabilities. For maximum efficiency and isolation, each container should address one specific area of concern.</p>
<p>Another issue is Docker’s default configuration – users are not namespaced. Namespaces let software resources use other resources only if they belong to a specific namespace.</p>
<p>Running applications with Docker implies running the Docker daemon with root privileges. Any processes that break out of Docker container will have the same privileges on the host as it did in the container. Running your processes inside the containers as a non-privileged user cannot guarantee security. It depends on the capabilities you add or remove. To mitigate the risks of Docker container breakout, you should not download ready-to-use containers from untrusted sources.</p>
<h2 id="heading-do-not-use-docker-if-you-develop-a-desktop-gui-application"><strong>Do Not Use Docker if You Develop a Desktop GUI Application</strong></h2>
<p>Docker does not suit applications that require rich UI. Docker is mainly intended for isolated containers with console-based applications. GUI-based applications are not a priority, their support will rely on the specific case and application. Windows containers are based on either Nano or Core Server – it does not allow users to start up a GUI-based interface or a Docker RDP server in the Docker container.</p>
<p>Yet, you can still <a target="_blank" href="https://hub.docker.com/r/tzutalin/py2qt4/">run GUI-based applications</a> developed with Python and the QT framework in a Linux container. Also, you can use X11 forwarding, but this solution is somewhat awkward.</p>
<h2 id="heading-do-not-use-docker-if-you-want-to-light-up-development-and-debugging"><strong>Do Not Use Docker if You Want to Light Up Development and Debugging</strong></h2>
<p>Docker was created by developers and for developers. It provides environment stability: a container on the development machine will work exactly the same on staging, production, or any other environment. This eliminates the problem of various program versioning in different environments.</p>
<p>With Docker’s help, you can easily add a new dependency to your application. No developer on your team will need to repeat this manipulation on their machine. Everything will be up and running in the container and distributed to the entire team.</p>
<p>At the same time, you have to do some extra setup to code your app in Docker. Moreover, with Docker debugging, you have to configure logs output and set up debugging ports. You may also need to map ports for your applications and services in containers. So, if you have a complicated and tedious deployment process, Docker will help you out a lot. If you have a simple app, it just adds unnecessary complexity.</p>
<h2 id="heading-do-not-use-docker-if-you-need-to-use-different-operating-systems-or-kernels"><strong>Do Not Use Docker if You Need to Use Different Operating Systems or Kernels</strong></h2>
<p>With virtual machines, the hypervisor can abstract an entire device. You can use Microsoft Azure to run both instances of Windows Server and Linux Server at the same time. Docker image, however, requires the same operating system it was created for.</p>
<p>There is a large database of Docker container images –  Docker Hub. Yet, if an image was created on Linux Ubuntu, it will run only on the exact same Ubuntu.</p>
<p>If an app is developed on Windows, but the production runs on Linux, you will not be able to use Docker effectively. Sometimes, it is easier to set up a server if you have several static apps.</p>
<h2 id="heading-do-not-use-docker-if-you-have-a-lot-of-valuable-data-to-store"><strong>Do Not Use Docker if You Have a Lot of Valuable Data to Store</strong></h2>
<p>By design, all Docker files are created inside a container and stored on a writable container layer. It may be difficult to retrieve the data out of the container if a different process needs it. Also, the writable layer of a container is connected to the host machine which the container is running on. If you need to move the data elsewhere, you cannot do it easily. More than that, all the data stored inside a container will be lost forever once the container shuts down.</p>
<p>You have to think of ways to save your data somewhere else first. To keep data safe in Docker, you need to employ an additional tool – Docker Data Volumes. Yet, this solution is still quite clumsy and needs to be improved.</p>
<h2 id="heading-do-not-use-docker-if-you-are-looking-for-the-easiest-technology-to-manage"><strong>Do Not Use Docker if You Are Looking for The Easiest Technology to Manage</strong></h2>
<p>Being introduced in 2012, Docker is still a new technology. As a developer, you might have to update Docker versions regularly. Unfortunately, backward compatibility is not guaranteed. Moreover, the documentation is falling behind the advancement of the technology. As a developer, you will have to figure some things out yourself.</p>
<p>In addition, the monitoring options that Docker offers are quite poor. You can get a quick insight into some simple statistics. Yet, if you want to see some advanced monitoring features, Docker has nothing to offer.</p>
<p>Also, in the case of a large and complex application, the implementation of Docker comes at a cost. Building and maintaining communication between numerous containers on numerous servers will take a lot of time and effort. Yet, there is a helpful tool, which makes it easier to work with multi-container Docker apps, – Docker Compose. Docker Compose defines services, networks, and volumes in a single YAML file.</p>
<p>Nonetheless, the Docker ecosystem is quite fractured – not all the supporting container products work well with one another. Each product is backed by a certain company or community. The heated competition between those results in product incompatibility.</p>
<h2 id="heading-to-wrap-up"><strong>To Wrap Up</strong></h2>
<p>KeenEthics professionals enjoy working with Docker and often use it for app development. Despite some drawbacks, you can easily use it to run and manage apps side by side in isolated containers. </p>
<p>Installing an app can be as simple as running a single command – . Docker also provides a clean and original isolation environment for each test, making it an important and useful tool for automation testing. </p>
<p>Docker features offer benefits in terms of dependency management and security. Augmented with such useful tools as Docker Hub, Docker Swarm, and Docker Compose, Docker is a popular and user-friendly solution.</p>
<p>Despite all the benefits of Docker, you should not use it to containerize each and every application you develop.</p>
<p><em>Remember: Docker is a game-changer. But it is not a one-size-fits-all solution.</em></p>
<p>Docker is not the only such a tool in the market either. The alternatives of Docker are <a target="_blank" href="https://coreos.com/rkt/">rkt</a>, pronounced as ‘rocket’, <a target="_blank" href="https://linuxcontainers.org/">Linux Containers</a>, or <a target="_blank" href="https://openvz.org/">OpenVZ</a>. Each of these with its advantages and disadvantages is quite similar to Docker. The growing popularity and use rates of Docker are caused only by the decision of businesses to adopt it.</p>
<p>Before jumping to conclusions as for should you use Docker or not, research the project requirements. Talk to your teammates or peers and let them help you decide when to use Docker, when not to use containers, and whether it is one of those Docker use cases.</p>
<p>Whether you like it or not, this technology has a future. There are some developers and development agencies that hate Docker and try to eliminate it from all their ongoing projects. At the same time, there are specialists who containerize everything they can because they see Docker as a panacea. Perhaps, you should not join either camp. Stay impartial, stay objective, and make a decision depending on a particular situation.</p>
<h2 id="heading-do-you-have-an-idea-for-a-docker-project">Do you have an idea for a Docker project?</h2>
<p>My company KeenEthics is a team of experienced <a target="_blank" href="https://keenethics.com/services-web-development">web application developers</a>. In case you need a free estimate of a similar project, feel free to <a target="_blank" href="https://keenethics.com/contacts?activeForm=estimate">get in touch</a><em>.</em></p>
<p>You can read more of similar articles on my Keen Blog. Allow me to suggest you read <a target="_blank" href="https://keenethics.com/blog/1554572000000-refactoring">Why to Refactor Your Code?</a> or <a target="_blank" href="https://keenethics.com/blog/outsourcing-vs-outstaffing">Software Development Models Explained:  Outsourcing vs Outstaffing,  Fixed Price vs Time &amp; Material?</a></p>
<h2 id="heading-ps">P.S.</h2>
<p>Also, I would like to say "thank you" to <a target="_blank" href="https://www.linkedin.com/in/oleksiy-pletnov-212b3764/">Alex Pletnov</a> for coauthoring this article as well as the readers for making it to the end!</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/1517306255770-docker-5-cases-when-you-should-not-use-it">7 Cases When Not to Use Docker</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
