Archive

Archive for the ‘’ Category

3 Essential Design Trends, August 2023

July 24th, 2023 No comments

There’s an overall movement in website design right now where there are no dominant hero image or video on the homepage. Look at some of your most visited websites, and you might see this trend in action. You’ll surely see it among the three other trends we explore in website design here.

Categories: Designing, Others Tags:

Recreating YouTube’s Ambient Mode Glow Effect

July 24th, 2023 No comments

I noticed a charming effect on YouTube’s video player while using its dark theme some time ago. The background around the video would change as the video played, creating a lush glow around the video player, making an otherwise bland background a lot more interesting.

This effect is called Ambient Mode. The feature was released sometime in 2022, and YouTube describes it like this:

“Ambient mode uses a lighting effect to make watching videos in the Dark theme more immersive by casting gentle colors from the video into your screen’s background.”
— YouTube

It is an incredibly subtle effect, especially when the video’s colors are dark and have less contrast against the dark theme’s background.

Curiosity hit me, and I set out to replicate the effect on my own. After digging around YouTube’s convoluted DOM tree and source code in DevTools, I hit an obstacle: all the magic was hidden behind the HTML element and bundles of mangled and minified JavaScript code.

Despite having very little to go on, I decided to reverse-engineer the code and share my process for creating an ambient glow around the videos. I prefer to keep things simple and accessible, so this article won’t involve complicated color sampling algorithms, although we will utilize them via different methods.

Before we start writing code, I think it’s a good idea to revisit the HTML Canvas element and see why and how it is used for this little effect.

HTML Canvas

The HTML element is a container element on which we can draw graphics with JavaScript using its own Canvas API and WebGL API. Out of the box, a is empty — a blank canvas, if you will — and the aforementioned Canvas and WebGL APIs are used to fill the with content.

HTML is not limited to presentation; we can also make interactive graphics with them that respond to standard mouse and keyboard events.

But SVG can also do most of that stuff, right? That’s true, but is more performant than SVG because it doesn’t require any additional DOM nodes for drawing paths and shapes the way SVG does. Also, is easy to update, which makes it ideal for more complex and performance-heavy use cases, like YouTube’s Ambient Mode.

As you might expect with many HTML elements, accepts attributes. For example, we can give our drawing space a width and height:

<canvas width="10" height="6" id="js-canvas"></canvas>

Notice that is not a self-closing tag, like an or . We can add content between the opening and closing tags, which is rendered only when the browser cannot render the canvas. This can also be useful for making the element more accessible, which we’ll touch on later.

Returning to the width and height attributes, they define the ’s coordinate system. Interestingly, we can apply a responsive width using relative units in CSS, but the still respects the set coordinate system. We are working with pixel graphics here, so stretching a smaller canvas in a wider container results in a blurry and pixelated image.

The downside of is its accessibility. All of the content updates happen in JavaScript in the background as the DOM is not updated, so we need to put effort into making it accessible ourselves. One approach (of many) is to create a Fallback DOM by placing standard HTML elements inside the , then manually updating them to reflect the current content that is displayed on the canvas.

Numerous canvas frameworks — including ZIM, Konva, and Fabric, to name a few — are designed for complex use cases that can simplify the process with a plethora of abstractions and utilities. ZIM’s framework has accessibility features built into its interactive components, which makes developing accessible -based experiences a bit easier.

For this example, we’ll use the Canvas API. We will also use the element for decorative purposes (i.e., it doesn’t introduce any new content), so we won’t have to worry about making it accessible, but rather safely hide the from assistive devices.

That said, we will still need to disable — or minimize — the effect for those who have enabled reduced motion settings at the system or browser level.

requestAnimationFrame

The element can handle the rendering part of the problem, but we need to somehow keep the in sync with the playing and make sure that the updates with each video frame. We’ll also need to stop the sync if the video is paused or has ended.

We could use setInterval in JavaScript and rig it to run at 60fps to match the video’s playback rate, but that approach comes with some problems and caveats. Luckily, there is a better way of handling a function that must be called on so often.

That is where the requestAnimationFrame method comes in. It instructs the browser to run a function before the next repaint. That function runs asynchronously and returns a number that represents the request ID. We can then use the ID with the cancelAnimationFrame function to instruct the browser to stop running the previously scheduled function.

let requestId;

const loopStart = () => {
  /* ... */

  /* Initialize the infinite loop and keep track of the requestId */
  requestId = window.requestAnimationFrame(loopStart);
};

const loopCancel = () => {
  window.cancelAnimationFrame(requestId);
  requestId = undefined;
};

Now that we have all our bases covered by learning how to keep our update loop and rendering performant, we can start working on the Ambient Mode effect!

The Approach

Let’s briefly outline the steps we’ll take to create this effect.

First, we must render the displayed video frame on a canvas and keep everything in sync. We’ll render the frame onto a smaller canvas (resulting in a pixelated image). When an image is downscaled, the important and most-dominant parts of an image are preserved at the cost of losing small details. By reducing the image to a low resolution, we’re reducing it to the most dominant colors and details, effectively doing something similar to color sampling, albeit not as accurately.

Next, we’ll blur the canvas, which blends the pixelated colors. We will place the canvas behind the video using CSS absolute positioning.

And finally, we’ll apply additional CSS to make the glow effect a bit more subtle and as close to YouTube’s effect as possible.

HTML Markup

First, let’s start by setting up the markup. We’ll need to wrap the and elements in a parent container because that allows us to contain the absolute positioning we will be using to position the behind the . But more on that in a moment.

Next, we will set a fixed width and height on the , although the element will remain responsive. By setting the width and height attributes, we define the coordinate space in CSS pixels. The video’s frame is 1920×720, so we will draw an image that is 10×6 pixels image on the canvas. As we’ve seen in the previous examples, we’ll get a pixelated image with dominant colors somewhat preserved.

<section class="wrapper">
  <video controls muted class="video" id="js-video" src="video.mp4"></video>
  <canvas width="10" height="6" aria-hidden="true" class="canvas" id="js-canvas"></canvas>
</section>

Syncing And

First, let’s start by setting up our variables. We need the ’s rendering context to draw on it, so saving it as a variable is useful, and we can do that by using JavaScript’s getCanvasContext function. We’ll also use a variable called step to keep track of the request ID of the requestAnimationFrame method.

const video = document.getElementById("js-video");
const canvas = document.getElementById("js-canvas");
const ctx = canvas.getContext("2d");

let step; // Keep track of requestAnimationFrame id

Next, we’ll create the drawing and update loop functions. We can actually draw the current video frame on the by passing the element to the drawImage function, which takes four values corresponding to the video’s starting and ending points in the coordinate system, which, if you remember, is mapped to the width and height attributes in the markup. It’s that simple!

const draw = () => {
  ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
};

Now, all we need to do is create the loop that calls the drawImage function while the video is playing, as well as a function that cancels the loop.

const drawLoop = () => {
  draw();
  step = window.requestAnimationFrame(drawLoop);
};

const drawPause = () => {
  window.cancelAnimationFrame(step);
  step = undefined;
};

And finally, we need to create two main functions that set up and clear event listeners on page load and unload, respectively. These are all of the video events we need to cover:

  • loadeddata: This fires when the first frame of the video loads. In this case, we only need to draw the current frame onto the canvas.
  • seeked: This fires when the video finishes seeking and is ready to play (i.e., the frame has been updated). In this case, we only need to draw the current frame onto the canvas.
  • play: This fires when the video starts playing. We need to start the loop for this event.
  • pause: This fires when the video is paused. We need to stop the loop for this event.
  • ended: This fires when the video stops playing when it reaches its end. We need to stop the loop for this event.
const init = () => {
  video.addEventListener("loadeddata", draw, false);
  video.addEventListener("seeked", draw, false);
  video.addEventListener("play", drawLoop, false);
  video.addEventListener("pause", drawPause, false);
  video.addEventListener("ended", drawPause, false);
};

const cleanup = () => {
  video.removeEventListener("loadeddata", draw);
  video.removeEventListener("seeked", draw);
  video.removeEventListener("play", drawLoop);
  video.removeEventListener("pause", drawPause);
  video.removeEventListener("ended", drawPause);
};

window.addEventListener("load", init);
window.addEventListener("unload", cleanup);

Let’s check out what we’ve achieved so far with the variables, functions, and event listeners we have configured.

Creating A Reusable Class

Let’s make this code reusable by converting it to an ES6 class so that we can create a new instance for any and pairing.

class VideoWithBackground {
  video;
  canvas;
  step;
  ctx;

  constructor(videoId, canvasId) {
    this.video = document.getElementById(videoId);
    this.canvas = document.getElementById(canvasId);

    window.addEventListener("load", this.init, false);
    window.addEventListener("unload", this.cleanup, false);
  }

  draw = () => {
    this.ctx.drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height);
  };

  drawLoop = () => {
    this.draw();
    this.step = window.requestAnimationFrame(this.drawLoop);
  };

  drawPause = () => {
    window.cancelAnimationFrame(this.step);
    this.step = undefined;
  };

  init = () => {
    this.ctx = this.canvas.getContext("2d");
    this.ctx.filter = "blur(1px)";

    this.video.addEventListener("loadeddata", this.draw, false);
    this.video.addEventListener("seeked", this.draw, false);
    this.video.addEventListener("play", this.drawLoop, false);
    this.video.addEventListener("pause", this.drawPause, false);
    this.video.addEventListener("ended", this.drawPause, false);
  };

  cleanup = () => {
    this.video.removeEventListener("loadeddata", this.draw);
    this.video.removeEventListener("seeked", this.draw);
    this.video.removeEventListener("play", this.drawLoop);
    this.video.removeEventListener("pause", this.drawPause);
    this.video.removeEventListener("ended", this.drawPause);
  };
    }

Now, we can create a new instance by passing the id values for the and elements into a VideoWithBackground() class:

const el = new VideoWithBackground("js-video", "js-canvas");

Respecting User Preferences

Earlier, we briefly discussed that we would need to disable or minimize the effect’s motion for users who prefer reduced motion. We have to consider that for decorative flourishes like this.

The easy way out? We can detect the user’s motion preferences with the prefers-reduced-motion media query and completely hide the decorative canvas if reduced motion is the preference.

@media (prefers-reduced-motion: reduce) {
  .canvas {
    display: none !important;
  }
}

Another way we respect reduced motion preferences is to use JavaScript’s matchMedia function to detect the user’s preference and prevent the necessary event listeners from registering.

constructor(videoId, canvasId) {
  const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");

  if (!mediaQuery.matches) {
    this.video = document.getElementById(videoId);
    this.canvas = document.getElementById(canvasId);

    window.addEventListener("load", this.init, false);
    window.addEventListener("unload", this.cleanup, false);
  }
}

Final Demo

We’ve created a reusable ES6 class that we can use to create new instances. Feel free to check out and play around with the completed demo.

See the Pen Youtube video glow effect – dominant color [forked] by Adrian Bece.

Creating A React Component

Let’s migrate this code to the React library, as there are key differences in the implementation that are worth knowing if you plan on using this effect in a React project.

Creating A Custom Hook

Let’s start by creating a custom React hook. Instead of using the getElementById function for selecting DOM elements, we can access them with a ref on the useRef hook and assign it to the and elements.

We’ll also reach for the useEffect hook to initialize and clear the event listeners to ensure they only run once all of the necessary elements have mounted.

Our custom hook must return the ref values we need to attach to the and elements, respectively.

import { useRef, useEffect } from "react";

export const useVideoBackground = () => {
  const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
  const canvasRef = useRef();
  const videoRef = useRef();

  const init = () => {
    const video = videoRef.current;
    const canvas = canvasRef.current;
    let step;

    if (mediaQuery.matches) {
      return;
    }

    const ctx = canvas.getContext("2d");

    ctx.filter = "blur(1px)";

    const draw = () => {
      ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
    };

    const drawLoop = () => {
      draw();
      step = window.requestAnimationFrame(drawLoop);
    };

    const drawPause = () => {
      window.cancelAnimationFrame(step);
      step = undefined;
    };

    // Initialize
    video.addEventListener("loadeddata", draw, false);
    video.addEventListener("seeked", draw, false);
    video.addEventListener("play", drawLoop, false);
    video.addEventListener("pause", drawPause, false);
    video.addEventListener("ended", drawPause, false);

    // Run cleanup on unmount event
    return () => {
      video.removeEventListener("loadeddata", draw);
      video.removeEventListener("seeked", draw);
      video.removeEventListener("play", drawLoop);
      video.removeEventListener("pause", drawPause);
      video.removeEventListener("ended", drawPause);
    };
  };

  useEffect(init, []);

  return {
    canvasRef,
    videoRef,
  };
};

Defining The Component

We’ll use similar markup for the actual component, then call our custom hook and attach the ref values to their respective elements. We’ll make the component configurable so we can pass any element attribute as a prop, like src, for example.

import React from "react";
import { useVideoBackground } from "../hooks/useVideoBackground";

import "./VideoWithBackground.css";

export const VideoWithBackground = (props) => {
  const { videoRef, canvasRef } = useVideoBackground();

  return (
    <section className="wrapper">
      <video ref={ videoRef } controls className="video" { ...props } />
      <canvas width="10" height="6" aria-hidden="true" className="canvas" ref={ canvasRef } />
    </section>
  );
};

All that’s left to do is to call the component and pass the video URL to it as a prop.

import { VideoWithBackground } from "../components/VideoWithBackground";

function App() {
  return (
    <VideoWithBackground src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />
  );
}

export default App;

Conclusion

We combined the HTML element and the corresponding Canvas API with JavaScript’s requestAnimationFrame method to create the same charming — but performance-intensive — visual effect that makes YouTube’s Ambient Mode feature. We found a way to draw the current frame on the , keep the two elements in sync, and position them so that the blurred sits properly behind the .

We covered a few other considerations in the process. For example, we established the as a decorative image that can be removed or hidden when a user’s system is set to a reduced motion preference. Further, we considered the maintainability of our work by establishing it as a reusable ES6 class that can be used to add more instances on a page. Lastly, we converted the effect into a component that can be used in a React project.

Feel free to play around with the finished demo. I encourage you to continue building on top of it and share your results with me in the comments, or, similarly, you can reach out to me on Twitter. I’d love to hear your thoughts and see what you can make out of it!

References

Categories: Others Tags:

Secured vs Unsecured Loans: Understanding the Key Differences

July 24th, 2023 No comments

Are you thinking about getting a loan but feeling confused by all the options? Whether a loan is secured or unsecured is one of the most crucial factors to take into account. While both types of loans can give you the money you need, some significant distinctions between them could have a long-term effect on your financial situation.

To help you decide which type of loan is best for you, we’ll explain what separates secured and unsecured loans in this article. Understanding these distinctions will help you make the best decision possible while minimizing any risks, whether you’re planning on remodeling your house or consolidating debt

Payday loans online same day can provide a quick solution for those who need immediate funds to cover unexpected expenses. These short-term loans can be obtained without collateral, and the application process is often straightforward and can be completed online.

How do Secured Loans Work?

Loans that demand collateral as a condition of borrowing are known as secured loans. Banks or lenders could want collateral if you’re applying for a sizable loan to buy a specific asset or if your credit score doesn’t fulfill the requirements for an unsecured loan. Since secured loans provide less risks to lenders, you can benefit from lower interest rates. It’s important to keep in mind that some secured loan options, including short-term installment loans or personal loans for those with terrible credit, may have higher interest rates.

Secured loans provide a variety of options for different purposes. The following secured loan options are available when borrowing money for personal needs:

Loan Type Purpose Collateral
Secured Personal Loan Used for consolidating debt, paying emergency bills, or other personal expenses Collateral options include savings account, investment account, or car title
Mortgage Intended for purchasing a home Collateral is the property being purchased (home)
Home Equity Loan/HELOC Allows borrowing against the equity in your home to cover expenses Collateral is the home itself
Boat and Specialty Vehicle Loans Used for financing the purchase of boats, RVs, motorcycles, ATVs, or Jet Skis Collateral is the title of the specific vehicle or watercraft
Auto Loan Designed for financing the purchase of a vehicle Collateral is the vehicle being purchased
Auto Title Loan Provides funds for paying bills, managing debt, or other purposes Collateral is the title of the vehicle
Pawn Shop Loan Provides quick funds for short-term needs Collateral is a valuable item
Secured Business Loan Used for growing the business, consolidating business debt, or other business purposes Collateral options vary, including property, equipment, inventory, invoices, investments, etc.
Secured Credit Card Used for making purchases, with the credit line secured by a deposit Collateral is a security deposit typically ranging from $50 to $300

Banking institutions, credit unions, and online lenders all offer secured loans. Lenders may evaluate the value of your collateral when you apply for a secured loan before authorizing the loan. On the other hand, some lenders will take a savings account or a certificate of deposit as security for the loan.

How do Unsecured Loans Work? 

An unsecured loan differs from a secured loan as it lacks any collateral. Instead of relying on assets to minimize risk, lenders offering unsecured loans evaluate your creditworthiness, income, and debt-to-income (DTI) ratio to assess your eligibility for a personal loan.

Having bad credit can make it challenging to obtain unsecured loans. Conversely, individuals with good credit may find the application process for unsecured loans to be more straightforward.

Unsecured loans are generally regarded as safer since the lender cannot immediately seize your property if you fall behind on payments. Regardless of whether you have a loan that requires collateral or not, creditors have the right to take measures to recoup their losses if you default on your payments.

In the case of unsecured debt, debt collectors can take legal action against you. With a court order, they can garnish your wages or withdraw funds from your bank account.

Due to the absence of collateral, unsecured loans typically come with higher interest rates, smaller loan amounts, and shorter repayment terms. Take a look at the below table, to learn more about unsecured loans.

Loan Type Purpose
Personal Loan Used for various purposes such as home remodeling, financing a wedding, or dream vacation.
Debt Consolidation Loan Designed to pay off existing debts, such as credit card or medical debt, by consolidating multiple balances into a single loan.
Student Loan Specifically intended to cover education costs.
Personal Line of Credit Offers flexibility to make purchases or handle emergency expenses up to the credit limit. Funds are replenished as the line is paid off.
Credit Card Enables borrowing money, with the possibility of accruing interest, to make purchases up to the credit limit.

You’ll find a variety of options when it comes to unsecured loans, including offerings from banks, credit unions, and online lenders. The loan amounts can range from as low as 1 lakh loan to as high as 25 lakhs. Although not all banks offer this type of financing, online lenders are recognized for their convenient and efficient application process. Applying for a loan online is a breeze, and you can need funding quickly. In fact, some online lenders go a step further and provide prequalification, allowing you to assess and compare rates without any impact on your credit score.

Final Thoughts

Secured and unsecured loans are two very different loan categories, each with its own advantages and disadvantages. Secured loans need assets to be put up as security but have lower interest rates and larger loan amounts. Without collateral, unsecured loans involve higher interest rates and smaller loan amounts.

Before making a choice, it is crucial to examine the benefits and drawbacks of each type of loan. Your financial demands and situation ultimately determine whether you choose a secured or an unsecured loan. So, before choosing the best loan for you, take the time to properly weigh your possibilities.

Featured image by Towfiqu barbhuiya on Unsplash

The post Secured vs Unsecured Loans: Understanding the Key Differences appeared first on noupe.

Categories: Others Tags:

7 Essential Tips on How to Perform Regression Testing

July 24th, 2023 No comments

Imagine you’ve got a fancy new app that you’re marketing to consumers. You’ve done your market research, splashed out on an intensive marketing campaign, partnered with a few influencers, and even registered a local domain to give your website the widest reach possible.

Only, the first time you update your app, it’s hit with a bug that makes it pretty much unusable. Disaster! Suddenly all that money spent on research, development, and marketing seems like a bad investment, because your reputation is through the floor and trust in your app is non-existent.

If only it could’ve been avoided.

Well, with regression testing, it could’ve been.

If you want to avoid the bad press of bugs and glitches in your software, then regression testing is the way forward. We’re going to take an in-depth look at what regression testing involves, and how to get it right.

What is Regression Testing?

Regression testing a method of software testing. It involves re-executing a series of functional and non-functional software tests in order to check that a change in the software’s code doesn’t affect its functionality.

Many developers consider regression testing to be an integral part of the software development cycle, as it allows for the detection of unexpected faults that have arisen due to necessary tweaks, enhancements, or bug fixes.

When Should You Perform Regression Testing?

Regression testing can be performed under a variety of circumstances:

  • A new feature is added to an existing product
  • Code is changed to fix errors or bugs in the product
  • Changes are made to the user interface (UI) or configuration of software 
  • The source code is optimized to improve performance
  • A new version of existing software is developed
  • Third party systems are integrated with a product

Any instance that would result in a change to the code of a piece of software is usually cause to run regression testing, as it may have altered the way that the software performs.

Regression testing may also be deployed during lengthy development cycles of software (the average software development cycle is estimated to be around 4.5 months). As new code is added during development, regression testing can be used to make sure that existing code still works as the product is built.

Regression Testing Techniques

There are various different techniques that can be employed when undertaking regression testing.

Retest all

This method of testing involves applying regression testing to all available testing suites.

Retesting everything is the safest way to ensure that any defects or bugs are found and fixed. However, it is also the most costly method of regression testing in terms of time and resources.

For this reason, a complete retest is usually only performed when there is good reason to do so, such as after an application-wide update, when a major bug fix is implemented, or when the application is moved to a new platform. 

Regression test selection

This method of regression testing is more selective, with quality assurance teams selecting specific parts of the application to test, based on how likely it is they’ll be affected by the changes.

Performing only a selection of regression tests helps to reduce the time taken and the resources required. This method will often be utilized by teams working on large-scale, complex applications, where the overall number of test scripts will be higher.

Test case prioritization

Test case prioritization involves determining which test cases should be performed first during the regression testing process.

Factors used to determine which cases should be given priority include:

  • Feature failure rate
  • Business impact
  • Security-related features
  • Customer-centric features

Corrective regression testing

Corrective regression testing is used when no changes or updates have been made to the source code. It is used to check how current features are performing, and whether they are functioning correctly, so it can be determined whether or not existing test cases can be reused.

If the results of corrective regression testing are positive, then quality assurance teams can be confident that test cases are up-to-date, and can plan for when new code is added.

Progressive regression testing

Progressive testing is based on the acknowledgement that changes to the source code may require changes to the test suites themselves. Testers will therefore update their test scripts to reflect the changes.

Why is Regression Testing Important?

Regression testing is important for ensuring the continued usability of a product, especially one that is already in the hands of customers. Even small tweaks and enhancements to software’s code can have an unexpected knock-on effect across the entire product.

Not only can this cause problems for customers and lead to a negative user experience, but it can also cost a lot in terms of time and resources to reverse. Detecting potential faults before changes are implemented is paramount in reducing these negative effects.

Practicing regression testing aligns perfectly with an agile testing methodology, making it a valuable testing method for developers. More frequent testing means that potential errors are detected earlier, and can be rectified long before the product goes into production.

Image sourced from broadcom.com

Visual regression testing is equally as important as testing functionality. Not only does it help to preserve the visual aesthetic and brand identity of the software, but it also helps identify any misaligned images or unclickable buttons that have appeared as a result of updates to the code. 

For a website, changes like this can be marked up using annotation software such as MarkUp.io, identifying to testers which areas are presenting a problem, without altering the HTML code of the website.

How to Perform Regression Testing

How regression testing is performed will depend on the individual goals and needs of the organization carrying it out. However, there are some fundamental steps that will be present in most instances of regression testing.

1. Detect changes in source code

Firstly, any modifications or optimizations in the source code must be identified. Code review sessions can be conducted in order to determine which components or modules have been changed, and what impact this has had on existing features.

2. Prioritize identified changes

Once all the changes have been identified, QA teams should determine which cases need to be tested extensively, and which require less thorough testing.

The larger the codebase, the more important it is that cases are prioritized. Automation testing can be used to help streamline the process of QA software testing.

3. Select test cases to re-run

Next, you need to determine which test cases are to be re-run. It’s not yet necessary to test the entire test suite. Instead, test cases can be categorized as either reusable or obsolete. Obsolete test cases can be omitted from future test cycles, while reusable test cases can be shortlisted for regression testing.

4. Categorize regression test cases

Once the test cases have been selected, they can be categorized. Common test categorization criteria include:

  • Manual vs automated regression tests

Tests which involve repeating the same series of steps over and over again can be performed using automated testing, while it is often better to apply manual testing and human evaluation to non-repetitive cases.

  • Testing type

The testing environment, setup, and tools required for each test case can also be taken into consideration, with more easily tested cases prioritized.

  • Critical vs non-critical features

The urgency and significance of test cases can be ranked on a scale of low, medium, and high, based on the potential impact to the business and its customers.

Image sourced from guru99.com

5. Prepare the test environment

If you’re undertaking frequent regression testing, it’s useful to have test environments to hand for whenever you need them. Environments need to be stable and ready-to-test, as a poor testing environment increases the likelihood that tests will fail and defects will go unnoticed.

When considering the test environment, it’s worth examining the advantages and disadvantages of utilizing physical devices or a cloud environment.

Manual testing requires setting up and maintaining devices, which will involve collaboration with IT, Ops, and finance, which can make it a lengthy and costly endeavor. However, it may be necessary to test some applications on physical hardware. 

Image sourced from perfecto.io

For example, games need to be tested using components such as graphics cards and  processors in order to properly test load times, rendering quality, and frame rates.

On the other hand, web-based applications could be more easily tested using on-demand cloud environments, helping to reduce the upfront cost of obtaining and preparing physical hardware. 

6. Schedule and execute tests

Once the previous steps have been completed, the test cases should be ready for execution. Tests can be scheduled based on the plan developed earlier, taking into account priority and categorization. 

Time-based test execution provides greater control over software quality, so scheduling tests at intervals across the entire development cycle allows for greater quality control over the constantly changing code.

7. Measure success

Once tests are complete, the process can be analyzed in order to provide valuable insights for future test runs. Applications such as data model tools can be used to assist in visualizing the data obtained from testing, helping to make it easier to digest and analyze.

Reports generated by testing can also help to reveal weaknesses and pain points in the application early, which can then be addressed before they enter production. The earlier a bug is detected, the less costly it is to fix.

Image sourced from blog.pdark.de

Get Regression Testing Right Every Time

So now you know everything you need to get started with regression testing. Identify what you need to test, then prioritize and categorize to make sure the most urgent test cases get checked first.

Make sure you’ve got a functioning test environment ready for whenever you may need it, and investigate ways you can reduce your costs, such as using a cloud environment.

Schedule your tests for the perfect time, and make sure you analyze the results when you’re done.

Follow these tips, and you’ll be identifying and fixing problems left, right and center. 

Photo by Christina @ wocintechchat.com on Unsplash

The post 7 Essential Tips on How to Perform Regression Testing appeared first on noupe.

Categories: Others Tags:

Google Set to Enable New API in Bid to Eliminate Cookies

July 21st, 2023 No comments

In January 2020, Google announced its ambitious plan to eliminate third-party cookies from Chrome. Now, after over three years (and countless delays), the first phase of Google’s cookie-killing strategy is almost complete.

Categories: Designing, Others Tags:

Dubai’s Tourism Logo is a Masterclass in Universal Design

July 21st, 2023 No comments

Tourism logos are all about universal appeal. To be successful, they must be impactful, memorable, and, above all, inclusive of people from different regions. Some countries simply create separate logos for different parts of the world. Others choose to eliminate typography altogether, instead opting for a simple icon or graphic. Unfortunately, this approach often results in an unrecognizable logo that is impossible to link to a specific country or city without prior knowledge – a poor strategy for a nation trying to drum up tourism.

Categories: Designing, Others Tags:

15 Fresh and Effective WooCommerce Plugins to Boost Sales in 2023

July 21st, 2023 No comments

Businesses constantly face new challenges and opportunities. Over the last few years many companies have had to adjust their operations to accommodate the new remote working environment, while others have had to make drastic changes to their business models to stay afloat.

Categories: Designing, Others Tags:

The Art Of Looking Back: A Critical Reflection For Individual Contributors

July 21st, 2023 No comments

Have you ever looked back at your younger self and wondered, “What was I even thinking?” If you have, then you know how important it is to acknowledge change, appreciate growth, and learn from your mistakes.

Søren Kierkegaard, the first existentialist philosopher, famously wrote:

“Life can only be understood by looking backward, but it must be lived forwards.”
Søren Kierkegaard

By looking back at our past selves, we compare them not only to who we are today but to who we want to be tomorrow.

This process is called reflection.

Critical reflection is the craft of “bringing unconscious aspects of experience to conscious awareness, thereby making them available for conscious choice.” At its core, reflection focuses on challenging your takeaways from practical experiences, nudging you to explore better ways of achieving your goals.

Learning and growth are impossible without reflection. In the 1970s, David Kolb, an educational theorist, developed the “Cycle of Learning”, comprising four stages: Concrete Experience, Reflective Observation, Abstract Conceptualization, and Active Experimentation.

According to Kolb, each new experience yields learning when all of its aspects are analyzed, assessed, and challenged — in theory (through reflection and conceptualization) and in practice (through experimentation). In turn, new learning informs new experiences, therefore completing the circle: act, analyze, challenge, plan, repeat.

Reflection takes the central stage: it evaluates the outcomes of each concrete experience, informs future decisions, and leads to new discoveries. What’s more important, reflection takes every aspect of learning into consideration: from actions and feelings to thoughts and observations.

Design is, by nature, reflective. Ambiguity requires designers to be flexible and analyze the situation on the go. We need to adapt to the ever-changing environment, learn from every failure, and constantly doubt our expertise. Rephrasing Donald Schön, an American philosopher, instead of applying experience to a situation, designers should be open to the “situation’s back talk.”

On the other hand, designers often reflect almost unconsciously, and their reflections may lack structure and depth, especially at first. Reflection is the process of “thinking analytically” about all elements of your practice, but structureless reflection is not critical nor meaningful.

Luckily, a reflective framework exists to provide the necessary guidance.

Practicing Critical Reflection

In 1988, Professor Graham Gibbs published his book Learning by Doing, where he first introduced the Reflective Cycle — a framework represented by a closed loop of exercises, designed to help streamline the process of critical reflection.

In a nutshell, reflection comes down to describing the experience and your feelings towards it, analyzing your actions and thoughts, and devising an action plan. What sets it apart from a retrospective is continuity: the cycle is never complete, and every new iteration is built on the foundation of a previous one.

Imagine a situation: You are tasked with launching a survey and collecting at least 50 responses. However, a week later, you barely receive 15, despite having sent it to over a hundred people. You are angry and disappointed; your gut tells you the problem is in the research tool, and you are tempted to try again with another service.

Then, you take a deep breath and reflect on the experience.

Describe the situation

Begin by describing the situation in detail. Remember that a good description resembles a story, where every event is a consequence of past actions. Employ the “But & Therefore” rule of screenwriting and focus on drawing the connection between your actions and their outcomes.

First, provide a brief outline: What did you do, and how did it go?

Last week, I launched a research survey using Microsoft Forms, but despite my best efforts, it failed to collect a number of responses large enough to draw a meaningful conclusion. Upon analyzing the results, I noticed that a significant portion of the participants bounced from the question, which required them to choose a sector of a multi-layered pie chart.

Then, add some details: describe how you went about reaching your objective and what was your assumption at the time.

The technical limitations of Microsoft Forms made embedding a large image impossible, so I uploaded a low-resolution thumbnail and provided an external link (“Click to enlarge the image”). A large portion of participants, however, did not notice the link and couldn’t complete the task, stating that the image in the form was too small to comprehend. As a result, we have only collected 15 complete responses.

Recommendations

  • Avoid analyzing the experience at this stage. Focus on describing the situation in as many details as possible.
  • Disregard your experience and your gut urging you to solve a problem. Be patient, observant, and mindful.
  • Reflection doesn’t have to take place after the experience. In fact, you can reflect during the event or beforehand, trying to set the right expectations and plan your actions accordingly.

Describe Your Feelings

At this stage, focus on understanding your emotions before, during, and after the experience. Be mindful of the origin of your feelings and how they manifested and changed over time.

I was rather excited to see that Microsoft Forms offer a comprehensive set of survey tools. Moreover, I was captivated by the UI of the form, the option to choose a video background, and the feature that automatically calculated the time to complete the survey.

You will notice how describing your emotions helps you understand your motivations, beliefs, and convictions. In this particular example, by admitting to being enchanted by the platform’s interface, you essentially confirm that your decision was not a result of reasonable judgement or unbiased analysis.

I was somewhat disappointed to learn that I could not embed a large image, but I did not pay enough attention at the time.

This step is important: as your feelings change, so do your actions. A seemingly minor transition from “excitement” to “disappointment” is a signal that you have obviously overlooked. We will get back to it as we begin analyzing the situation.

Lastly, focus on your current state. How do you feel about your experience now when it’s over? Does any emotion stand out in particular?

I feel ashamed that I have overlooked such an obvious flaw and allowed it to impact the survey outcome.

Describing your emotions is, perhaps, the most challenging part of critical reflection. In traditional reflective practice, emotions are often excluded: we are commanded to focus on our actions, whether we are capable of acting rationally and disregard the feelings. However, in modern reflection, emotional reflection is highly encouraged.

Humans are obviously emotional beings. Our feelings determine our actions more than any facts ever could:

Our judgement is clouded by emotions, and understanding the connection between them and our actions is the key to managing our professional and personal growth.

Recommendations

  • Analyze your feelings constantly: before, during, and after the action. This will help you make better decisions, challenge your initial response, and be mindful of what drives you.
  • Don’t think you are capable of making rational decisions and don’t demand it of others, too. Emotions play an important role in decision–making, and you should strive to understand them, not obtain control over them.
  • Don’t neglect your and your team’s feelings. When reflecting on or discussing your actions, talk about how they made you feel and why.

Evaluate And Analyze

Evaluation and analysis is the most critical step of the reflective process. During this stage, you focus not only on the impact of your actions but on the root cause, challenging your beliefs, reservations, and decisions.

W3C’s guidelines for complex images require providing a long description as an alternative to displaying a complex image. Despite knowing that, I believed that providing a link to a larger image would be sufficient and that the participants would either be accessing my survey on the web or zooming in on their mobile devices.

Switching the focus from actions to the underlying motivation compliments the emotional reflection. It demonstrates the tangible impact of your feelings on your decisions: being positively overwhelmed has blinded you, and you didn’t spend enough time empathizing with your participant to predict their struggles.

Moreover, I chose an image that was quite complex and featured many layers of information. I thought providing various options would help my participants make a better-informed decision. Unfortunately, it may have contributed to causing choice overload and increasing the bounce rate.

Being critical of your beliefs is what sets reflection apart from the retelling. Things we believe in shape and define our actions — some of them stem from our experience, and others are imposed onto us by communities, groups, and leaders.

Irving Janis, an American research psychologist, in his 1972 study, introduced the term “groupthink”, an “unquestioned belief in the morality of the group and its choices.” The pressure to conform and accept the authority of the group, and the fear of rejection, make us fall victim to numerous biases and stereotypes.

Critical reflection frees us from believing the myths by doubting their validity and challenging their origins. For instance, your experience tells you that reducing the number of options reduces the choice overload as well. Critical reflection, however, nudges you to dig deeper and search for concrete evidence.

However, I am not convinced that the abundance of options led to overwhelming the participants. In fact, I managed to find some studies that point out how “more choices may instead facilitate choice and increase satisfaction.”

Recommendations

  • Learn to disregard your experience and not rely on authority when making important decisions. Plan and execute your own experiments, but be critical of the outcomes as well.
  • Research alternative theories and methods that, however unfamiliar, may provide you with a better way of achieving your goals. Don’t hesitate to get into uncharted waters.

Draw A Conclusion And Set A Goal

Summarize your reflection and highlight what you can improve. Do your best to identify various opportunities.

As a result, 85% of the participants dropped out, which severely damaged the credibility of my research. Reflecting on my emotions and actions, I conclude that providing the information in a clear and accessible format could have helped increase the response rate.

Alternatively, I could have used a different survey tool that would allow me to embed large images: however, that might require additional budget and doesn’t necessarily guarantee results.

Lastly, use your reflection to frame a SMART (Specific, Measurable, Achievable, Relevant, and Time-Bound) goal.

Only focus on goals that align with your professional and personal aspirations. Lock every goal in time and define clear and unambiguous success criteria. This will help you hold yourself accountable in the future.

As my next step, I will research alternative ways of presenting complex information that is accessible and tool-agnostic, as this will provide more flexibility, a better user experience to survey participants and ensure better survey outcomes for my future research projects. I will launch a new survey in 14 days and reflect accordingly.

At this point, you have reached the conclusion of this reflective cycle. You no longer blame the tool, nor do you feel disappointed or irate. In fact, you now have a concrete plan that will lead you to pick up a new, relevant, and valuable skill. More than that, the next time the thrill takes you, you will stop to think about whether you are making a rational decision.

Recommendations

  • SMART is a good framework, but not every goal has to fit it perfectly. Some goals may have questionable relevancy, and others may have a flexible timeline. Make sure you are confident that your goals are attainable, and constantly reflect on your progress.
  • Challenge your goals and filter out those that don’t make practical sense. Are your goals overly ambiguous? How will you know when you have achieved your goal?

Daily Reflection

Reflection guides you by helping you set clear, relevant goals and assess progress. As you learn and explore, make decisions, and overcome challenges, reflection becomes an integral part of your practice, channels your growth, and informs your plans.

Reflection spans multiple cognitive areas (“reflective domains”), from discipline and motivation to emotional management. You can analyze how you learn new things and communicate with your peers, how you control your emotions, and stay motivated. Reflecting on different aspects of your practice will help you achieve well–balanced growth.

As you collect your daily reflections, note down what they revolve around, for example, skills and knowledge, discipline, emotions, communication, meaningful growth, and learning. In time, you may notice how some domains will accumulate more entries than others, and this will signal you which areas to focus more on when moving forward.

Finally, one thing that can make a continuous, goal-driven reflective process even more effective is sharing.

Keeping a public reflective journal is a great practice. It holds you accountable, requires discipline to publish entries regularly, and demands quality reflection and impact analysis. It improves your writing and storytelling, helps you create more engaging content, and work with the audience.

Most importantly, a public reflective journal connects you with like-minded people. Sharing your growth and reflecting on your challenges is a great way to make new friends, inspire others, and find support.

Conclusion

In Plato’s “Apology,” Socrates says, “I neither know nor think I know.” In a way, that passage embodies the spirit of a reflective mindset: admitting to knowing nothing and accepting that no belief can be objectively accurate is the first step to becoming a better practitioner.

Reflection is an argument between your former and future selves: a messy continuous exercise that is not designed to provide closure, but to ask more questions and leave many open for further discussions. It is a combination of occasional revelations, uncomfortable questions, and tough challenges.

Reflection is not stepping out of your comfort zone. It is demolishing it, tearing it apart, and rebuilding it with new, better materials.

Don’t stop reflecting.

Further Reading on Smashing Magazine

Categories: Others Tags:

Reddit Change their iOS App Icon to Low-Quality Pixel Art

July 20th, 2023 No comments

Reddit has made the strange decision to change its iOS app logo into a pixelated icon, and it’s forcing begrudged users to pay up if they want the old one back.

Categories: Designing, Others Tags:

Apple is Designing its Own AI Chatbot

July 20th, 2023 No comments

According to a report by Bloomberg, Apple is designing its own AI-powered chatbot, but they aren’t really sure how to use it yet.

Categories: Designing, Others Tags: