Don't Make Me Think | Frontend at Scale: The Psychology of Speed and Reducing Cognitive Load

Jaeyeol Lee

Hatched by Jaeyeol Lee

Jan 13, 2024

3 min read

0

Don't Make Me Think | Frontend at Scale: The Psychology of Speed and Reducing Cognitive Load

In the world of frontend development, one of the challenges we face is managing the complexity of our codebase. At each step, we have to make sense of the module we're currently looking at, load all of its logic in our heads, and figure out where we should go next. This cognitive load can be overwhelming and hinder our ability to make changes efficiently.

One of the symptoms of cognitive load is the amount of information we need to keep in our heads at a time to make a change. To reduce cognitive load in our codebase, it is essential to keep our modules cohesive. By organizing our code in a way that each module has a clear and specific responsibility, we can easily understand its purpose and make changes without having to consider the complicated logic behind it.

Another approach to reducing cognitive load is to make our design more declarative. This means representing the relationship between components or actions using a simple data structure rather than complex operations. This not only makes the code easier to understand but also easier to modify when needed.

In addition to reducing cognitive load, we can also improve the perceived performance of our websites and apps. Perceived performance refers to how fast or responsive a website or app feels to users, regardless of its actual speed. By leveraging the psychology of how people perceive time and speed, we can create designs that give the illusion of faster performance.

One psychological principle that comes into play is the Weber-Fechner law, which defines the Just Noticeable Difference (JND) in response to stimulation. This principle suggests that small improvements in performance can have a significant impact on how users perceive the speed of a website or app. Therefore, aiming for improvements well above the 20% threshold can make a noticeable difference in perceived performance.

To optimize the actions that people perform most frequently within our sites and apps, we can take advantage of the concept of flow. Flow refers to a state of being fully absorbed in an activity, where users are productively engaged with a task without being aware of the underlying technology. By designing flows that align with users' attention spans, we can provide appropriate feedback and prioritize performance work.

So, what are some actionable steps we can take to reduce cognitive load and improve perceived performance?

  1. Be smart about communicating status and progress: Users should always have a clear understanding of what is happening and how long they need to wait. Use loading messages or progress indicators to keep them informed and minimize frustration.

  2. Always have something for the reader to do: Instead of leaving users idle while waiting for a task to complete, provide them with other actions they can take to keep them engaged. This can include suggestions for related content or interactive elements that provide a sense of progress.

  3. Avoid sudden page movements: Sudden movements or shifts in the layout can be disorienting for users and make the website or app feel less responsive. Smooth transitions and animations can help create a sense of continuity and enhance perceived performance.

In addition to these tips, there are other techniques we can employ to improve performance, such as shipping less JavaScript, auditing the impact of third-party libraries, and lazy loading off-screen content. These optimizations can further enhance the perceived speed of our websites and apps.

By reducing cognitive load and optimizing for perceived performance, we not only simplify our codebase but also enhance the overall user experience. These improvements can lead to increased productivity for developers and happier users.

In conclusion, reducing cognitive load and managing perceived performance are essential aspects of frontend development. By keeping our codebase cohesive, leveraging the psychology of perception, and following actionable advice, we can create more efficient and user-friendly websites and apps. So, let's strive for simplicity and speed in our frontend endeavors.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣