Debouncing is a new performance optimisation method I came across recently during work. It is one of those things that make you wonder: “How did I not know about this earlier?!”

The Story

I was working on a search bar that needed to call an API every time its search input changes in order to update the search results displayed.

You can already see how this can be a problem: every character the user types will trigger an API call. …

I’m currently taking a course titled “Software Engineering Design Principles and Patterns” for my final year college studies at the National University of Singapore. Amongst the many design principles taught to us, Dependency Inversion came across as something rather interesting to explore further.

If you do a quick Google search, you find the following definitions:

“The Dependency Inversion Principle states that high-level modules should not depend on low-level modules. Both should depend on abstractions.”

“Abstractions should not depend on details, details should depend on abstractions”

As someone who reads this the first time, one might wonder: “so what if we…

I first came across the publisher-subscriber pattern during my internship at Coord, a small startup based in New York City. Back then, I only took an introductory course in software engineering and wasn’t too familiar with many design patterns. My intuition for how the pub-sub pattern works was limited to a vague idea of a notification system.

Why would we want to use the pub-sub pattern?

We would typically use the pub-sub pattern when building event-driven software. Traditionally, we think of software in terms of objects and we store these objects in databases. Event-driven software is a whole different concept…

Chen Caijie

Currently a software engineer at Shopee.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store