<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Linda Ikechukwu</title>
    <description>The latest articles on DEV Community by Linda Ikechukwu (@linda_ikechukwu).</description>
    <link>https://dev.to/linda_ikechukwu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F96835%2F913d01a7-ef49-4087-9a45-eb10c4c24559.jpeg</url>
      <title>DEV Community: Linda Ikechukwu</title>
      <link>https://dev.to/linda_ikechukwu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/linda_ikechukwu"/>
    <language>en</language>
    <item>
      <title>Why You Should Add an Air Quality API to Your Weather App</title>
      <dc:creator>Linda Ikechukwu</dc:creator>
      <pubDate>Mon, 12 Jul 2021 16:15:57 +0000</pubDate>
      <link>https://dev.to/linda_ikechukwu/why-you-should-add-an-air-quality-api-to-your-weather-app-4ni1</link>
      <guid>https://dev.to/linda_ikechukwu/why-you-should-add-an-air-quality-api-to-your-weather-app-4ni1</guid>
      <description>&lt;p&gt;Air quality refers to a measure of how clean or polluted the air in a particular environment is. According to WHO, air pollution accounts for an estimated seven million deaths worldwide every year, due to the numerous respiratory diseases that it triggers. As crucial as this metric is, it is oftentimes not incorporated by weather app builders. Interestingly, air quality data can easily be added to weather apps (or any other application) with the aid of a good air quality API.&lt;/p&gt;

&lt;p&gt;An &lt;a href="https://www.tomorrow.io/data-catalog/air-quality/"&gt;air quality API&lt;/a&gt; basically communicates how polluted the air is and how polluted it is expected to become. It typically reports daily percentages of pollutants that are harmful to human health in a particular location and if they happen to be below or above acceptable thresholds. Such pollutants include carbon monoxide, nitrogen dioxide, sulphur dioxide, ozone, lead, pollen and other particulate matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Adding Air Quality Data to Your App
&lt;/h2&gt;

&lt;p&gt;Convincing users to try out your app is a big challenge, and encouraging users to retain usage of your app is an even bigger challenge when you’re not providing continuous value. &lt;a href="https://www.emarketer.com/Article/Mobile-Users-Returning-Apps-After-Trying-Them-Out/1014039"&gt;Research done in 2016&lt;/a&gt;, shows that only 24% of total users who downloaded a new app returned to it one day after first using it. By subsequent days, they had already deleted the app or completely forgotten about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t1naFS43--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxz8cnqilau4zmzswnr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t1naFS43--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxz8cnqilau4zmzswnr.png" alt="Graph of user app rentention"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://systango.medium.com/the-best-guide-on-app-retention-strategies-and-how-to-increase-retention-rate-59559c83532c"&gt;Image source&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;While there isn’t much we can do about air pollution as individuals, integrating air quality data and insights into your app increases your app’s value proposition due to its numerous use cases. Your users will be equipped to take proactive action regarding their health, like what type of clothing to wear, if it's safe to go outside, what skincare products to use, when to turn on air purifiers etc.&lt;/p&gt;

&lt;p&gt;Imagine a user who is allergic to pollen waking up to such a message: “Hi Linda, pollen levels are high on your usual route today, consider taking an alternate route or exercise indoors.” This builds trust, gives them the feeling that you actually care for the quality of their lives, and depicts your app as being a useful part of their daily routine. All these will definitely have them coming back for more. After all, what is the best way to provide continuous value and become indispensable, if not by integrating your app as part of their daily routine?&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Consider Before Choosing an Air Quality API
&lt;/h2&gt;

&lt;p&gt;There are a couple of APIs owned by different organizations that provide access to air quality data. To make sure that you get the most out of it, here are four things you should consider before choosing an air quality API: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quality and accuracy&lt;/strong&gt;: Choose an API that aggregates data from multiple sources to increase the percentage of accuracy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible documentation&lt;/strong&gt;: Choose an API that has extensive documentation on different integration and offers at least email support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hyperlocal coverage&lt;/strong&gt;: Choose an API that provides rich data on your locations of interest.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Versatility&lt;/strong&gt;: Choose an API that offers data on the &lt;a href="https://www.environment.gov.au/protection/air-quality/air-pollutants"&gt;major pollutants&lt;/a&gt;—particulate matter (PM) 10, PM2.5, Ozone (O3), Sulphur dioxide (SO2), nitrogen dioxide (NO2), carbon monoxide (CO), lead (Pb), ammonia (NH3)) and even more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Air quality is an important metric that has the ability to improve the well-being of users, especially those with certain health conditions. If you’re building a weather app or any app that depends on weather and atmospheric conditions, consider integrating air quality data too, to promote better user preference and retention.&lt;/p&gt;

</description>
      <category>react</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 Benefits of Automated UI Testing
</title>
      <dc:creator>Linda Ikechukwu</dc:creator>
      <pubDate>Tue, 19 Jan 2021 13:26:00 +0000</pubDate>
      <link>https://dev.to/linda_ikechukwu/5-benefits-of-automated-ui-testing-1m56</link>
      <guid>https://dev.to/linda_ikechukwu/5-benefits-of-automated-ui-testing-1m56</guid>
      <description>&lt;p&gt;For engineering teams to ensure that the software they put out is reliable, free of bugs, and meets user/client demands, the software must be tested. These tests may either be in the form of unit tests, integration tests, &lt;a href="https://www.testcraft.io/end-to-end-testing/"&gt;end-to-end tests&lt;/a&gt;, or UI tests. I’ve been learning a lot about UI testing, and that’s what my focus will be on in this article because it deals directly with how users will experience the software.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is UI Testing?
&lt;/h2&gt;

&lt;p&gt;UI testing is an aspect of software testing that deals with verifying that an application’s user interface works as intended, meets design specifications, and is usable. During UI testing, the app is tested to ensure that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user interface is displayed as intended across a range of browsers, devices, and operating systems&lt;/li&gt;
&lt;li&gt;Visual elements such as buttons, inputs, menus, etc., are displayed correctly and work as intended, e.g., buttons performing the right action, navigational elements redirecting to the right page, inputs produce or cause an expected action&lt;/li&gt;
&lt;li&gt;UI flow and logic proceed as intended. An example of a UI flow is the login process. UI tests will be done to ensure that the login process is seamless and behaves as expected. For example, when the user types in the correct login information, the user should be logged in successfully; else, an error message should be shown&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Automated UI Testing?
&lt;/h2&gt;

&lt;p&gt;Originally, UI tests were and are still being done manually within some teams. The QA tester or engineer manually uses all features of the app to check for discrepancies.&lt;/p&gt;

&lt;p&gt;Automated UI testing is very similar to manual testing. However, there is one key difference. In manual testing, a QA engineer manually clicks through application screens to verify that everything is working as it should. In automated UI testing, you create a script that automatically runs each test case you define with &lt;a href="https://dzone.com/articles/top-10-ui-automation-tools-you-should-try"&gt;UI testing automation tools&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There is nothing wrong with manual testing; in fact, not everything about UI testing can or should be automated. But in these modern days, where more teams are beginning to adopt agile software development methodology, employing continuous integration and delivery, manual testing is no longer ideal. This is because it is inefficient, time-consuming, and prone to human errors, especially for repetitive tests such as regression tests. Since applications have to be tested alongside every code release to ensure quality and that nothing breaks, UI testing should be automated as much as possible.&lt;/p&gt;

&lt;p&gt;As a famous saying goes: “Anything that can be automated should be automated.” As I mentioned, not every UI testing aspect should be automated like visual and usability tests, but UI logic/flow tests like the login example should be. Automated UI testing is also ideal for regression tests, end-to-end tests, screenshot comparison, and testing of stable UI versions. For more guidance on when to automate and what to automate, consider reading up on &lt;a href="https://screenster.io/manual-vs-automation-testing/"&gt;manual vs. automated testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In case you still don’t see the need for automated testing, let me give you some:&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Automated UI Testing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Save time: Especially for regression tests, running the same UI flow tests manually every time something is changed, or an update is pushed is wasteful. Automating this process ensures that QA testers or engineers are given back time to focus on other unique activities&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accuracy: Humans are prone to errors when performing repetitive tasks. Automating tests reduces the chance of these errors, even allowing for things like pixel-perfect visual testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Faster feedback time: Automating UI tests gives test teams the ability to execute tests on multiple devices in just hours. This ensures that the tests' feedback gets to developers faster so that they can also make corrections or updates faster and return the code quickly to the testing team. This won’t be possible with manual testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increased Coverage: With manual testing, each tester can only test on one platform at a time and carry out only one single test. Automating UI tests increases test coverage by carrying out different tests  (e.g., functional tests, performance and stress tests, unit tests e.t.c) simultaneously on real devices and various platforms at a faster rate than manual testing ever could&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Faster Bug Discovery: Automating UI tests means that bugs are discovered on time before they become too challenging to resolve. Automated tests are usually built into the continuous integration pipeline and run before, during, and after builds, depending on the configuration&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In conclusion, by following an automated testing approach, the team will not only save time and money but also deliver quality products. In summary, users won’t care about how clean your code is; they only care about what they can see and touch.&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>testing</category>
      <category>webdev</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Automating Dependency Updates for Your GitHub Projects</title>
      <dc:creator>Linda Ikechukwu</dc:creator>
      <pubDate>Fri, 04 Dec 2020 22:56:25 +0000</pubDate>
      <link>https://dev.to/linda_ikechukwu/automating-dependency-updates-for-your-github-projects-2d9o</link>
      <guid>https://dev.to/linda_ikechukwu/automating-dependency-updates-for-your-github-projects-2d9o</guid>
      <description>&lt;p&gt;To keep a piece of software or project relevant, it must continuously be improved and maintained. This usually involves fixing bugs, adding feature requests, optimizing for performance, updating dependencies, etc. &lt;/p&gt;

&lt;p&gt;Managing and updating dependencies is a critical part of maintaining a project. We tend to overlook this task and rarely attend to it because it is such a time-consuming and repetitive chore. You'll have to create a new branch, update the dependencies, test, and then merge, all the while neglecting the actual work you're supposed to be doing. Failure to update dependencies frequently will leave the project prone to errors and fatal breakages, taking more time to fix.&lt;/p&gt;

&lt;p&gt;What if we could delegate this task to someone or something? In this article, I'll show you how to use the &lt;a href="https://www.whitesourcesoftware.com/free-developer-tools/renovate" rel="noopener noreferrer"&gt;WhiteSource Renovate&lt;/a&gt; tool to manage dependency updates automatically, so you can focus on doing what you love: writing badass code.&lt;/p&gt;

&lt;p&gt;Renovate is a free tool that keeps source code dependencies up-to-date using automated Pull Requests. It scans repositories for dependencies inside package manager files such as &lt;code&gt;package.json&lt;/code&gt; (npm/yarn) and submits Pull Requests with updated versions whenever they are found.&lt;/p&gt;

&lt;p&gt;But first, let's make sure we understand what dependencies are.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are software/code dependencies?
&lt;/h2&gt;

&lt;p&gt;Dependencies include any third-party packages or libraries that you add to a project to get some functionality right out of the box. One popular programming advice is: "don't reinvent the wheel." This means that you should reuse existing solutions when they exist instead of building from scratch. For example, if I need to manipulate images in my project, I'll install the &lt;a href="https://www.npmjs.com/package/jimp" rel="noopener noreferrer"&gt;Jimp&lt;/a&gt; package from npm and use it instead of writing code to do that. Now, Jimp has become a dependency for my project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should you periodically update dependencies?
&lt;/h2&gt;

&lt;p&gt;Just as you'll maintain your project and add a little touch up now and then, dependencies are usually updated by their authors and new versions released. Since your project depends on them, it's wise to update them frequently to ensure you don't miss out on security/bug fixes, performance improvements, and new features/API. &lt;/p&gt;

&lt;p&gt;As I previously mentioned, failure to update dependencies on a regular cadence exposes your project to security bugs, incompatibility errors, and possible breakages, which could take hours or even days to fix. The best practice is to update dependencies in smaller version bumps regularly, and Renovate can take care of that for you. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why WhiteSource Renovate?
&lt;/h2&gt;

&lt;p&gt;You may be wondering: GitHub has something which does the same thing — Dependabot. Why do I need to use a different tool? Well, there are a couple of features that have made me come to prefer Renovate to Dependabot. As at the time of writing this, Renovate: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports more &lt;a href="https://docs.renovatebot.com/modules/manager/#supported-managers" rel="noopener noreferrer"&gt;package managers&lt;/a&gt; than Dependabot&lt;/li&gt;
&lt;li&gt;Is open-source, so you can always decide to &lt;a href="https://docs.renovatebot.com/self-hosting/" rel="noopener noreferrer"&gt;spin up your instance&lt;/a&gt;, unlike Dependabot&lt;/li&gt;
&lt;li&gt;Groups monorepo (multiple packages under a single repository/package, e.g. React) updates into a single pull request, unlike Dependabot, which creates &lt;a href="https://github.com/dependabot/dependabot-core/issues/1190" rel="noopener noreferrer"&gt;individual pull requests for each package&lt;/a&gt;, which leads to extra setup and lots of near-identical PRs to review.&lt;/li&gt;
&lt;li&gt;Gives you fine-grained control over which type of updates to automerge based on rules set in the config. Dependabot only has the option to either automerge or not.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to setup Renovate on GitHub with GitHub actions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt; is an automation tool that can be used to automate tasks within the software development lifecycle.&lt;/p&gt;

&lt;p&gt;In this article, we'll be using it to automatically run tests against pull requests made by Renovate to ensure that dependency updates do not break our application before auto merging. &lt;/p&gt;

&lt;p&gt;To set up GitHub actions on your project, create a .github/workflowsdirectory in the root folder. &lt;br&gt;
Inside the &lt;code&gt;workflows&lt;/code&gt; folder, create a workflow file named &lt;code&gt;build-and-test.ymlfile&lt;/code&gt; and add the following code to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Build and Test 
  on:  
    pull_request: 
      branches: [master]

  jobs:  
    build_and_test:    
      runs-on: ubuntu-latest 
      steps:      
        - uses: actions/checkout@v2
        - uses: actions/setup-node@v2-beta
        with:
          node-version: '12'     
        - run: npm install      
        - run: npm run build --if-present      
        - run: npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, we first define the name of our workflow. This is optional. Then we specify that whenever a pull request is made to the master, the &lt;code&gt;build_and_test&lt;/code&gt; workflow job should run. We also specify that the &lt;code&gt;build_and_test&lt;/code&gt; workflow job should be run on an Ubuntu virtual machine and Node v.12.&lt;/p&gt;

&lt;p&gt;The build_and_test job will install all project dependencies, build, and run tests to ensure that nothing breaks every time it is run. &lt;/p&gt;

&lt;p&gt;P.S: This only runs the test command specified in your npm scripts.&lt;/p&gt;

&lt;p&gt;To learn more about the parameters of workflow files, read &lt;a href="https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions#understanding-the-workflow-file" rel="noopener noreferrer"&gt;this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, it's finally time to set up Renovate.&lt;/p&gt;

&lt;p&gt;Head over to &lt;a href="https://github.com/apps/renovate" rel="noopener noreferrer"&gt;https://github.com/apps/renovate&lt;/a&gt; to install the app. Click on the install button and either install it on all your repositories or only select repositories. For now, you can start with only your designated repository (you can always modify this from the &lt;a href="https://github.com/settings/installations" rel="noopener noreferrer"&gt;applications tab&lt;/a&gt; on the settings page). After that, click the green Install button at the bottom of the page and Renovate will be enabled for the repository and then start the onboarding process.&lt;/p&gt;

&lt;p&gt;Once you have successfully installed Renovate in your repository, you'll receive a pull request like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1jjsk7yr02znz4uu7w51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1jjsk7yr02znz4uu7w51.png" alt="Screenshot of pull request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you're done checking and configuring the PR, merge it to enable the actual Pull Requests to begin. After merging, Renovate will create a &lt;code&gt;renovate.json&lt;/code&gt; file in the project root folder. This is where we'll be adding our custom configurations.&lt;/p&gt;

&lt;p&gt;Add this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"packageRules": [
    {
      "updateTypes": [
        "minor",
        "patch"
      ],
      "automerge": true
    }
  ],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we're specifying that all minor and patch dependency updates should be automatically merged.&lt;/p&gt;

&lt;p&gt;Remember that we have set up GitHub actions to build the project and run tests on every pull request, so Renovate will only automerge if the workflow is passed successfully.&lt;/p&gt;

&lt;p&gt;For major dependency releases, we'd like to manually check and confirm before merging.&lt;/p&gt;

&lt;p&gt;And that's it. Congratulations, you've just successfully set up automatic dependency updates for your GitHub project.&lt;/p&gt;

&lt;p&gt;Renovate can also be used the same way on BitBucket and Gitlab. Check their docs for info.&lt;/p&gt;

&lt;p&gt;If you found this article insightful, you should clap and also check out other insightful articles on my &lt;a href="https://www.codewithlinda.com/blog/" rel="noopener noreferrer"&gt;frontend development blog&lt;/a&gt; and maybe drop me a line on &lt;a href="https://twitter.com/_MsLinda" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ciao.&lt;/p&gt;

</description>
      <category>github</category>
      <category>tutorial</category>
      <category>codenewbie</category>
      <category>javascript</category>
    </item>
    <item>
      <title>My Dev Story: Learning to Code, Writing more, and Building My Own Blog.</title>
      <dc:creator>Linda Ikechukwu</dc:creator>
      <pubDate>Sat, 30 May 2020 16:13:16 +0000</pubDate>
      <link>https://dev.to/linda_ikechukwu/my-dev-story-learning-to-code-writing-more-and-building-my-own-blog-267b</link>
      <guid>https://dev.to/linda_ikechukwu/my-dev-story-learning-to-code-writing-more-and-building-my-own-blog-267b</guid>
      <description>&lt;p&gt;I started learning to code inconsistently in late 2018 and in that time I started writing about things I was learning here on medium. I got a couple of positive responses asking me to write more, but I couldn’t find the time to because I was in my final year in school. It was really hard balancing the stress of trying to finish school, finishing my project, the numerous academic defenses, and finding time to learn to code. I finally gave up and stopped writing.&lt;/p&gt;

&lt;p&gt;Fast forward to now, I’ve landed my first job right after leaving school and I finally found the time (all thanks to the pandemic and lockdown) to build my own portfolio and blog site using Gatsby so I can have my own digital space on the internet. [Insert shouting, drum rolls, and some funny dance steps].&lt;/p&gt;

&lt;p&gt;To all of you who were supporting me on here, you can go check it out at codewithlinda.com and drop your reviews. I’ll love to hear them.&lt;br&gt;
On codewithlinda.com, I’ll be publishing beginner-friendly articles on frontend/cloud development, dev life, and more bi-monthly. If this sounds like something you are interested in, consider subscribing to my newsletter on the blog.&lt;/p&gt;

&lt;p&gt;Let's talk in the replies, what has your coding journey been like? Any highs or lows? any lessons learned?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>personal</category>
      <category>devstory</category>
      <category>portfolio</category>
    </item>
    <item>
      <title>Why Web Performance Optimization matters and What You can do</title>
      <dc:creator>Linda Ikechukwu</dc:creator>
      <pubDate>Fri, 31 Aug 2018 16:09:03 +0000</pubDate>
      <link>https://dev.to/linda_ikechukwu/why-web-performance-optimization-matters-and-what-you-can-do-1bff</link>
      <guid>https://dev.to/linda_ikechukwu/why-web-performance-optimization-matters-and-what-you-can-do-1bff</guid>
      <description>&lt;p&gt;Web Performance refers to the speed/rate at which web pages are downloaded and displayed in the browser to the user.&lt;/p&gt;

&lt;p&gt;Web Performance Optimization on the other hand refers to the process of analyzing web pages performance and identifying ways to improve it.&lt;/p&gt;

&lt;p&gt;You may ask, So?? I’m a badass dev. All functionalities needed for the web app has been implemented and are working just fine. What does this have to do with anything?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F250%2F1%2AqyeuHuU7TnwnV2svtHAlMQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F250%2F1%2AqyeuHuU7TnwnV2svtHAlMQ.gif"&gt;&lt;/a&gt;what does it matter.&lt;/p&gt;

&lt;p&gt;Well I have news for you. It does matter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Web Performance Matters
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Retaining Users &amp;amp; Promoting User Experience :
&lt;/h4&gt;

&lt;p&gt;Studies have shown that web pages which take &amp;gt; 5 seconds to load are easily abandoned by users , who may or never come back.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Boost Revenue :&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;If you run an online business, then the main goal is to boost revenue / conversion rates. Well, performance is key. Studies have also shown that if users’ experience a delay &amp;gt; 5 seconds to process orders and add to cart, then they are bound to abandon it.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Promotes SEO :&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Google rewards better user experience with higher ranking and demotes poor user experience. This leads to faster pages ranking higher on search results.&lt;/p&gt;

&lt;h3&gt;
  
  
  What You Can Do
&lt;/h3&gt;

&lt;p&gt;There are quite a number of diverse approaches and steps one can take to optimize web performance . I’ll be looking at the basic ones and must dos.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Think First :
&lt;/h4&gt;

&lt;p&gt;For developers, it is a norm to depend on external CSS/JS libraries and frameworks. Before including them into your files, ask yourself if they are really necessary. Most times the functionalities you need from them can be achieved without them. The idea is to reduce the number of http requests the browser has to make to render the page. More http requests(i.e internal and external files to fetch) means more page load time. So requests should only be made when necessary and should be combined where possible. If you must use frameworks endeavor to opt for the minimalist ones.&lt;/p&gt;

&lt;p&gt;This rule should also apply to images, in other words keep web content to only what is absolutely necessary.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Minify Text Assets(HTML/ CSS/ JS):
&lt;/h4&gt;

&lt;p&gt;Minification is the process of removing all unnecessary characters from codes without changing its functionality. These unnecessary characters usually include white spaces, new lines and comments which are used to add readability to the code but are not required for it to execute.&lt;/p&gt;

&lt;p&gt;Minification of all text assets reduces their file sizes, therefore downsizing the quantity of what the browser has to download to render the page. This results in faster response and load time.&lt;/p&gt;

&lt;p&gt;There are a lot of tools that can be used for minification for the different text assets such as:&lt;/p&gt;

&lt;p&gt;HTML : &lt;a href="https://github.com/kangax/html-minifier" rel="noopener noreferrer"&gt;HTML Minifier&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS : &lt;a href="https://cssnano.co/" rel="noopener noreferrer"&gt;CSSNano&lt;/a&gt; , &lt;a href="https://github.com/css/csso" rel="noopener noreferrer"&gt;CSSO&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JAVASCRIPT : &lt;a href="https://github.com/mishoo/UglifyJS" rel="noopener noreferrer"&gt;UglifyJS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To automate the process , a build tool such as Gulp can be used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F719%2F1%2AS_awmqLOk2rawTmI5JHkVQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F719%2F1%2AS_awmqLOk2rawTmI5JHkVQ.png"&gt;&lt;/a&gt;running the gulp useref task would minimize html, css and js files and store the minified version in the dist folder&lt;/p&gt;

&lt;p&gt;If you’re not familiar with gulp, &lt;a href="https://css-tricks.com/gulp-for-beginners/" rel="noopener noreferrer"&gt;read up this great article on it.&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Optimize Images :
&lt;/h4&gt;

&lt;p&gt;Image Optimization involves serving images at the smallest size possible while still maintaining the appropriate quality, size, resolution and format.&lt;/p&gt;

&lt;p&gt;In modern web pages, Images make up at least 30% of total web page weight therefore optimizing them can yield huge performance improvements for your site.&lt;/p&gt;

&lt;p&gt;There are several tools (free and subscription based) that can be used to optimize images. Some of my favorites are :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://imageoptim.com/" rel="noopener noreferrer"&gt;ImageOptim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://imagekit.io/" rel="noopener noreferrer"&gt;ImageKit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sourceforge.net/projects/nikkhokkho/" rel="noopener noreferrer"&gt;FileOptimizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.imagemagick.org/" rel="noopener noreferrer"&gt;ImageMagick&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/imagemin/imagemin-app" rel="noopener noreferrer"&gt;Imagemin&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The process can also be automated using the gulp-imagemin plugin. Install as a dependency then whip up some code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F694%2F1%2AUoGFypefjiDPKYfFWnxJnA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F694%2F1%2AUoGFypefjiDPKYfFWnxJnA.png"&gt;&lt;/a&gt;Minifying png, jpg, svg and gif files using gulp.&lt;/p&gt;

&lt;p&gt;Again if you’re not familiar with gulp, &lt;a href="https://css-tricks.com/gulp-for-beginners/" rel="noopener noreferrer"&gt;read up this great article on it.&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. HTTP Caching :
&lt;/h4&gt;

&lt;p&gt;Caching in this context refers to the browser storing data (such as images, css, js ), so that future requests for that data can be served directly without having to re-download or fetch from the server. Fewer downloads implies a faster site.&lt;/p&gt;

&lt;p&gt;HTTP Caching can be implemented with the &lt;a href="https://varvy.com/pagespeed/cache-control.html#file-types" rel="noopener noreferrer"&gt;Cache-Control header&lt;/a&gt; which specifies browser caching policies as well as with other available &lt;a href="https://www.keycdn.com/blog/http-cache-headers/" rel="noopener noreferrer"&gt;HTTP Cache Headers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Several file types can be cached including html , CSS , JavaScript, Fonts , Images and Icons. The code can be put in a .htaccess file or in an Apache httpd.conf file.&lt;/p&gt;

&lt;p&gt;For further reading, check out this article on &lt;a href="https://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/" rel="noopener noreferrer"&gt;optimizing pages with HTTP caching.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s Next?
&lt;/h3&gt;

&lt;p&gt;If you’ve implemented the above tips successfully, then you should treat yourself to a cup of cream latte 😉 . Don’t relax yet, there’s one more thing to be done.&lt;/p&gt;

&lt;h4&gt;
  
  
  Testing &amp;amp; Analysis:
&lt;/h4&gt;

&lt;p&gt;The next step would be run an audit on your site to get an overview of what works well and what doesn’t and possible paths to improvement.&lt;/p&gt;

&lt;p&gt;There are a lot of tools (ranging from online applications, browser extensions to system tools) that can be used to audit a website. Let’s take a look at a few and their capabilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/tools/lighthouse/" rel="noopener noreferrer"&gt;Lighthouse:&lt;/a&gt; This is a chrome tool can be run either from the Chrome Dev Tools , as a Chrome extension or from the command line.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F677%2F1%2A4Vt6DWwWQ8KmXKfiibkoew.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F677%2F1%2A4Vt6DWwWQ8KmXKfiibkoew.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/speed/pagespeed/insights/" rel="noopener noreferrer"&gt;PageSpeed Insights :&lt;/a&gt; This is a google web service that that analyzes the content of a web page and generates suggestions to make your pages load faster. Just type in your web URL into the space provided, click on analyze and it generates a report for your site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F975%2F1%2AQiapAcofyHz8dRy1kwazrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F975%2F1%2AQiapAcofyHz8dRy1kwazrg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.webpagetest.org/" rel="noopener noreferrer"&gt;WebPageTest:&lt;/a&gt; This is an online tool that runs website speed test from multiple locations around the globe using real browsers (IE and Chrome) and at real consumer connection speeds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.sitespeed.io/" rel="noopener noreferrer"&gt;SiteSpeed.io :&lt;/a&gt; Sitespeed.io is a set of Open Source Tools that tests web sites using real browsers, simulating real users connectivity and collect important user centric metrics like Speed Index and First Visual Render.&lt;/p&gt;

&lt;p&gt;One thing to take away is that web performance optimization is an art not a science. There is no one laid out path to implementing it . So go ahead, start optimizing your sites and have fun while you’re at it (if you can 💁.)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>imageoptimization</category>
      <category>webperf</category>
      <category>webpageoptimization</category>
    </item>
  </channel>
</rss>
