Published inJavaScript in Plain English·PinnedAn Introduction to TypeScriptA basic overview on TypeScript interfaces, types and enums — To understand TypeScript, we first need to understand what kind of problems JavaScript introduces. Before TypeScript was a thing, JavaScript had no concept of type checking. It is a dynamically typed language. At one end you can declare a variable and have it store a string. On another end you…Typescript3 min readTypescript3 min read
Nov 1Member-onlySimulate a Parking Lot application in javascriptLet’s say we have a small parking lot that can only take 5 cars at a time but at the same time there are 10 cars trying to park. Of course, with limited capacity we cannot park all the cars at once so these cars have to wait. Let’s implement…JavaScript1 min readJavaScript1 min read
Oct 27Member-onlyHandling left click, right click, and double click simultaneously in reactThis is a useful tutorial that you will need if you want to support an application that handles single click, double click, and right click activities at the same time. First of all, create a react application and replace app.js with the following content: To do single click, it…React1 min readReact1 min read
Sep 3Member-onlyDiscussing Frontend System design with e-commerceThis can be a typical interview question you can encounter when interviewing for frontend engineer positions. Essentially here is the question we are trying to discuss: Design an e-commerce website that allows users to browse products and purchase them. To approach this, let’s understand the functional and non-functional requirements. Well…what…System Design Interview6 min readSystem Design Interview6 min read
Aug 4Member-onlyBuild a component that increments counter with mouse cursor inside a boxToday we will built a simple react component that increments a counter quickly when the mouse is hovering over a box. Step 1: As always open you react codesandbox link. Step 2: under the src folder, open the index.js file and replaced with the following: Over here, we set…Frontend Interviews1 min readFrontend Interviews1 min read
Published inJavaScript in Plain English·Aug 2Member-onlyBuild an Easy Image Container w/ DescriptionToday we will focus on building an image container. This can be a very common frontend interview question to test mainly your basic javascript and css knowledge. Because of the lack of complexity of the codebase, we do not need to build a react application locally on the desktop. …Frontend Interviews2 min readFrontend Interviews2 min read
Jun 30System design: show the most songs in the last 7 daysToday we will tackle a system design question: Show the songs that were most popular in the last 7 days. To understand this problem, we need to understand the non-functional requirements for this problem. Before we head into this part, let’s dive into the workflow first: User interacts with the…System Design Interview2 min readSystem Design Interview2 min read
Jun 2Design a proximity server that implements local searchWith this problem, we have to design a system that handles “places nearby” queries . Given a latitude and longitude, find all the places that are within a given distance. Well…how do we go about this solution? Solution 1: Given two latitude and longitude, grab all the locations within this…System Design Interview3 min readSystem Design Interview3 min read
May 6Solving Best Time to Buy and Sell Stock ProblemThis is a pretty classic algorithm question that you might encounter on any interview. Let’s take a look into the context of this problem. Let’s say you have a list of stock prices [7, 1, 3, 5, 14, 12]. …Leetcode1 min readLeetcode1 min read
Apr 24Designing live comment in a system design interviewIn this article, we will be talking about how to implement a live comment system. To understand how to answer this problem, we have to understand a few things: what are the functional requirements? what is the size/scope of the problem? what are the approaches that we have to take…System Design Interview3 min readSystem Design Interview3 min read