Why I stopped using Operator Mono

Published on:

I bought Operator Mono two years ago. If you don’t know, Operator Mono is this fancy code font that was in the rage back then.

It’s nice. It has a unique serif feel to it. And it has real italics on a code font. Real italics

It’s pricey too — it costs $200. It took me a long time to contemplate and I finally bought it.

<Image src='/images/2022/operator-mono/operator_ide2.png' alt='Operator mono used for some code.' loading='lazy' />

Fast forward two years, I decided to stop using Operator Mono and switch back to a free font.

Using async/await in Express

Published on:

Have you noticed you write a lot of asynchronous code in Express request handlers? This is normal because you need to communicate with the database, the file system, and other APIs.

When you have so much asynchronous code, it helps to use async/await. It makes your code easier to understand.

Today, I want to share how to use async/await in an Express request handler.

Serving HTTPS locally with Node

Published on:

You won't need to serve up HTTPS when developing locally because localhost is treated like a secure context.

But you need to use a HTTPS scheme even on localhost in some cases — like when you're trying to work with Facebook's API.

We're going to talk about how to serve up a HTTPS website on localhost. It's quite simple. Really.

Get good at the hiring game

Published on:

You may be frustrated with how the industry uses "wrong" practices to filter out candidates — most companies focus on data structure, algorithm and the Big O notation as interview questions when hiring.

It's wrong! Why? Because it's not like developers deal with data structures and algorithm everyday, right? Shouldn't they focus on letting someone show their project and explain their logic?! Why do they use leet code or give you a data structure for you to solve and explain when you don't care about them?

Year end review — 2021

Published on:

Hello! It's a tradition for me to write a review for the year. I'm going to do it again this year even though I haven't been blogging for a couple of months.

Many things happened last year so it's easier for me to split this review up into 4 sections:

  • Work
  • Non Work
  • What I learned
  • What's for 2022

Dealing with anxiety during job interviews

Published on:

It's normal to feel anxious when applying for a job. After all, you're trying to present your best self in hopes of getting the job. Today's article will help you learn to control or work with this anxiousness.

I propose four ways to work through your anxiousness

  • Be pessimistic about the interview
  • Don't care about the results
  • Face the anxiousness head-on and work through it
  • Bring your real self instead of your best self

How and when to use Async and Defer attributes

Published on:

Both async and defer attributes look like they do the same thing at first glance, but there are nuances to async and defer. Most of the time, you'd want to use defer instead of async, even though async sounds sexier.

But why?

I'd like to walk you through the differences and why you should use them (and also why you don't have to use them).

Trying Your Best is really bad advice (and strategy)

Published on:

For a while I've been telling myself that it's okay as long as I tried my best. It's been a decent strategy for a long time, but it's not working for me anymore.

I want to explain why it doesn't work and what pitfalls you might want to watch out for if you use the same strategy in your life.

Rapid Mac Setup for Frontend Development

Published on:

My Macbook broke down after using it for a year — the logic board got fried. I got this Mac repaired and it broke down a month later. The logic board got fried again 🤦‍♂️.

Long story short, Apple agreed to repair the Mac again for free. They also agreed to send me a new Macbook as a replacement since my current one gave me so many problems.

In the meantime, I've gotten pretty good at setting up my Mac and I'd like to share how I do this with you.

Using Gulp with Dart Sass

Published on:

I'm playing around with Sass again recently and I noticed newer features (like @use and @forward) are only available on Dart Sass. Upon further inspection, I noticed that LibSass is now deprecated.

This article aims to help you get started with Dart Sass if you're using Gulp.

Disabling languages for Prettier (in VScode)

Published on:

It used to be straightforward to disable languages for Prettier in VSCode. You just added a prettier.disableLanguages setting and you were done.

// In settings.json
  &quot;prettier.disableLanguages&quot;: [

Unfortunately, prettier.disableLanguages is deprecated so we can’t do this anymore. Here’s what we can do instead.

Prettier and Standard in VSCode

Published on:

Prettier is an opinionated tool that helps you format code. I love Prettier, but I don't like its opinions with JavaScript. I prefer using Standard for JavaScript because it doesn't have semicolons (which makes the code cleaner to read).

It used to be complicated to use Prettier and Standard together. We had to disable Prettier for specific languages. Thankfully, there's a simpler way now.

How to remember JavaScript

Published on:

JavaScript contains many things — lots of different methods and ways to do things. How do you remember them all?

If you ask around the web, many people will say you don't have to remember everything since you can always google. But this answer doesn't help — you can't always Google everything, every time. If you forget absolutely everything and Google everything all the time, you're going to be real slow when you code!

So what's the alternative? What must you remember? What can you forget? That's what this article is for.

Overcoming 7 main problems of learning to code for people who don't have a developer job

Published on:

If you don't have a job as a developer, learning how to code becomes a much bigger challenge for a simple reason — developers can learn to code on the job.

I want to share with you 7 major challenges people face when learning, especially if they don't have a developer job. I'm also going to talk about how you can overcome each challenge.

How to debug a Github Actions' secret

Published on:

One irritating thing about Github Actions is you can't debug secrets. If you try to debug secrets you'll get *** in the log.

<Image src='/images/2021/debug-github-actions-secret/run-echo.png' alt='run echo' />

This makes sense because Github is trying to help us keep the secret secret (ha!). But it doesn't help when we're trying to figure out whether there's something wrong with the secret we provided.

Deploying to a server via SSH and Rsync in a Github Action

Published on:

I wanted to use Github Actions to deploy — when I push a commit into Github, I want Github Actions to build my site and deploy to my Digital Ocean server.

The hardest part of this process is deploying to the server with SSH and rsync. I tried various Github actions like SSH Deploy and SSH Action, but I couldn't get the permissions to work for A LONG TIME.

I found most articles about Github actions and SSH didn't help me much. I got stuck with debugging for a few days before I finally figured out how to make the process work.

Today, I want to share the exact steps to deploy via rsync and SSH. This process works for any server, even if you don't use Digital Ocean.

Understanding how to use Github Actions

Published on:

Github Actions is a Continuous Integration (CI) + Continuous Deployment (CD) tool by Github.

CI and CD are bombastic terms, but they simply mean the following:

  • Continuous Integration: People push to a Git repository and the code gets tested automatically.
  • Continuous Delivery: The pushed code (ideally tested and bug-free) is then pushed into the server so it becomes live for users.

Although Github Actions is one of the many CI + CD Tools out there, it's probably the simplest one to use (in my experience). Unfortunately, the Github Actions docs is a complete mess — they keep pointing you to different pages, expecting you to read everything (and understand everything) when you're still trying to set up your first action.

Today I want to share the basics of using Github Actions so it becomes easy for you to use it.

How to use Reduce in JavaScript

Published on:

reduce is an array method that helps you convert an array into a single value. It looks like this:

const callback = (accumulator, currentValue, index) =&gt; {
  // return something here
const result = array.reduce(callback, initialValue)
  • initialValue is the value you want to start with.
  • accumulator is the value returned from the previous iteration. It will be initialValue for the first iteration.
  • currentValue is array item in the current iteration.

Let's go through some examples.