Binary Search explained

binary search blog banner nickang
Photo by Pablo Garcia Saldaña on Unsplash

If you’re a software engineer, you’ve probably heard about binary search before. And if you don’t know what it is, how it’s implemented, and its strengths and weaknesses, this post is for you.

Binary search is, as its name suggests, a search algorithm. In fact, it’s one of the most efficient and commonly used search algorithms.

Continue reading “Binary Search explained”

How to implement a Linked List in JavaScript

implement linked list in javascript banner nickang
Photo by LinkedIn Sales Navigator on Unsplash

In this post, you’ll learn how to implement a linked list in JavaScript. This is the second part of a 2-parter post on linked lists (read part 1).

Let’s jump right in!

Continue reading “How to implement a Linked List in JavaScript”

How to start using the command line (part 2)

BSP how to start using the command line nickang blog
Photo by Dan Edwards on Unsplash

Welcome to the second part of How to start using the command line. You can read part 1 here if you haven’t already – I cover the most basic commands there to get you started.

In this second part, I’ll go through a few more basic commands and introduce the concept of a flag that you can use to modify certain commands. A flag can, for example, be used to modify the command rm to act on a directory instead of a file.

Let’s dive in!

Continue reading “How to start using the command line (part 2)”

Bite Size Programming – How to start using the command line (part 1)

BSP how to start using the command line nickang blog
Photo by Thanh Tran on Unsplash

Just getting started with becoming a programmer and want to start using the command line? This post is just for you.

Do note that I’ll be going through command line commands for computers running macOS. If you’re using a Linux computer, the commands are very similar and you should be able to learn something too.

Continue reading “Bite Size Programming – How to start using the command line (part 1)”

Bite Size Programming – How to get started with programming (part 1)

how to get started with programming banner nickang blog
Photo by Joshua Sortino on Unsplash

I’ve only been a professional software engineer for about a year, but one of the questions I’m frequently asked by friends and strangers alike is, “How do I get started with programming?”

To their question, I’d almost always give an answer that I think they find unsatisfying (as if satisfaction was what they were really hoping to get by asking the question!).

To get started with programming, you shouldn’t start by picking the “right” programming language and jumping into learning it immediately.

Continue reading “Bite Size Programming – How to get started with programming (part 1)”

How to tunnel HTTP requests into localhost

ngrok explanation illustration
Source: https://ngrok.com/product

Suppose you’re part of the engineering team of a tech company whose product is involves giving users product recommendation widgets for online stores. Since the product is already in the wild, so to speak, how do you test developmental features on live stores?

Continue reading “How to tunnel HTTP requests into localhost”

How to completely replace git branch code with another branch’s code

photo of a branch of leaves
Photo by Leo Rivas-Micoud on Unsplash

At work recently, our CTO noticed that our main repository’s staging branch had over 80 less commits than master. That shouldn’t be the case, because our deployment pipeline has always been to go from feature -> staging -> master. Code that exist on master must therefore already exist in staging, right?

No, turns out nothing was really wrong. It’s just that whenever we close a pull request (PR) on GitHub, our team protocol is to hit the “Merge” button, which merges all the commits from the PR into master, but not without adding one extra commit at the top called the “merge commit”. Each PR created one extra commit on master. That was the reason for the commit count mismatch.

Continue reading “How to completely replace git branch code with another branch’s code”