Nick Ang profile picture

Nick Ang

Want to see a full list instead of pages of results? Click here.

How to setup ESLint for your next project

Photo by Norbert Levajsics on Unsplash For over a year, I used ESLint at work without knowing. I didn’t have to understand what package exactly was doing the work of linting - it just worked, quietly doing its duty of enforcing no unused variables and imports, keeping consistent code styles, and all…


Why do some developers use Object.prototype.hasOwnProperty.call()?

Original photo credit: Pete Wright You might have read someone else’s JavaScript code recently and came across something like this: let name = ”; if (Object.prototype.hasOwnProperty.call(instance, ‘getName’)) { name = instance.getName(); } And you’re probably wondering like I did before I dug deeper…


What is an API?

Image by Igor Ovsyannykov I first came across the term “API” before I knew how to code. It was thrown around by the developers during a hackathon I attended in 2016, and I sort of understood what they were talking about by inference. Back then, my understanding of an API was that it’s a conduit that…


The uncommon (and invaluable) ability to recognise a noisy mind

Photo by Levi XU on Unsplash One of the biggest benefits I’ve personally gotten from meditating daily is the invaluable ability to recognise when my mind is noisy. “Why does it matter?”, you ask. Because our quality of life (and work) is always directly affected by clarity and peace of mind. I’ve…


What I've learned from selling used stuff on Carousell

Carousell is an online marketplace that is huge in Southeast Asia, grown proudly from Singapore. (What a great name, right? Carousel with a cute, sneaky “sell” at the end?) I remember when the founder, Quek Siu Rui, who’s about my age, began the service in obscurity at our university (NUS). With…


Rick and Morty, bitch!

Why the heck is Rick’s skin gray? Rick and Morty is such a endearingly weird show that I feel that I need to address it in a blog post. It’s so odd that I must have went “Hahah, what the fuck?” about 10 times before the end of episode one. By the end of the pilot, I just thought to myself that this…


Cooking vs creating software

Photo by Fabrizio Magoni on Unsplash I’ve been watching a little too much Chef’s Table recently, so I thought of doing a simplified and quick comparison between cooking and creating software on one front. Not exactly scientific, so just consider it a thought experiment. First, let’s define the two…


Get out of your own head

That’s the no bullshit name of a chapter in Ego Is The Enemy by Ryan Holiday that I’d read today. It’s one of the best chapters in what I can tell so far as a very useful book. As an aside, once I’m through with the book, I’ll be counting 2 weeks before sitting down once more with it to distil the…


How to clone class instance in JavaScript

One very common scenario for wanting to clone a class instance is inside a function. Why there’s a need to clone objects/arrays inside functions Because non-primitive data structures are passed by reference in JavaScript, we will inadvertently mutate the original object or array passed into a…


The software developer's craft

What my desk looks like on a good day from working at home I’d recently taken up watching Chef’s Table during work breaks. I love it for its artful presentation and masterful storytelling. Chef’s Table is really not about cooking or even food; to me, it is clearly about humanity and our capacity to…


The era of food delivery services

Food delivery services are awesome. They provide unbridled convenience since they’re even faster than fast food when you cut out the travel time. And so far they are relatively affordable. Amid all the “we take care of X for you, so that you can spend more time on what truly matters” marketing…


The fallacy of greener bananas

Photo by Lotte Löhr on Unsplash For the first time yesterday, my long time friend Kegan joined my wife and I on a quick grocery run. Since we’ve been married, Charlane and I have been buying groceries once every 2-3 weeks, so this trip to Fairprice felt familiar, almost habitual. That’s why when…


Uber the provocateur

A still from Uber’s “Let’s unlock cities” campaign Ads before a movie screening in the cinema are like the tasty dessert before a meal. With the big screen and surround sound, ads become extra poignant. Recently there was one ad that really stood out for me - I mean, it really popped out. https…


Notes from watching Minimalism documentary

Watch the Minimalism documentary. I watched it on Netflix. My notes Some words and phrases that frame the issue of excess in modern day living: mindless consumption, crap that we don’t need, “I want that”. We ought to start questioning every thing that we bring into our lives. A good question is…


Conceptual overview of Jest Enzyme testing

I recently had the privilege of introducing frontend testing to our code base at work. With 5 engineers working on different parts of the product at any given time, it finally made sense to add automated tests. I can foresee this helping us cut down time spent on debugging and improving the overall…


Temptation to just build stuff

Photo by Buzz Andersen on Unsplash I’m beginning to adopt an engineer’s mentality of wanting to build things because it’s fun and I’d probably learn a few things along the way. For example, I’d recently wanted to build 2 Chrome extensions with very specific uses. The first was something like…


One big difference between CS and non-CS software engineers

Photo by Alexis Brown on Unsplash From what I can tell so far, software engineers who didn’t graduate from a Computer Science (CS) degree program quite often have an inferiority complex. Based on my year of working closely with many CS graduates at my current job, and with a little bit of self…


Success needs health

Singapore laksa from a nearby makeshift food court near work All the success in the world means nothing if you don’t have good health to enjoy it. Charlane (my wife) seems to be down with food poisoning tonight. It’s one of those unpredictable, common-ish illnesses that can swoop down on you without…


Remember why you are programming

Photo by Kevin on Unsplash As a programmer, you probably get a little carried away once in a while. You know, getting engrossed in the sophistication of another developer’s implementation, be it beautiful or ugly (or both) and having an engaging conversation with your colleague about it. Yeah, I can…


Implementing a Queue in JavaScript?

Yesterday I asked myself whether it was necessary to implement a stack abstract data type in JavaScript. The answer turned out to be “no,” because you can just use the built-in data type to simulate a stack without obvious performance penalties. Naturally, I started asking myself, what about a…