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”

Linked List explained

linked list explained banner nickang
Photo by Simon Abrams on Unsplash

A linked list is one of many commonly used data structures. The first thing to know about linked lists is that they are not the same thing as array-like primitives (eg. Array in JavaScript or List in Python). They are similar in some ways, but they have different strengths and weaknesses.

In this post, we’ll explore what a linked list is, why there’s a need for it in certain situations, and its general strengths and weaknesses, especially in relation to primitive arrays that you’re probably already familiar with.

Continue reading “Linked List explained”

Algorithm time complexity and the Big O notation

bite size programming algorithm time complexity and big o notation banner
Photo by Lysander Yuen on Unsplash

Big O notation has attained superstar status among the other concepts of math because of programmers like to use it in discussions about algorithms (and for good reason). It’s a quick way to talk about algorithm time complexity.

While it’s a math concept that applies to various fields, programmers are probably one of the most frequent users of Big O. We use it as a shorthand to discuss how quickly and/or with how much memory an algorithm takes to go from start to finish.

Perhaps the part about Big O being most used by programmers is just my carpal-tunnel-visioned mind speaking, but nevertheless! It’s an important concept and here’s a post dedicated to understanding the Big O notation.

Continue reading “Algorithm time complexity and the Big O notation”

Writing my first Sass mixins

writing my first sass mixins banner
Photo by Dmitri Popov on Unsplash

Sass is a CSS pre-processor. Even though I’ve been using Sass in many projects, I realised recently at work that I’d only been using it in a very primitive way. Sass mixins didn’t even exist in my mind.

The main ways I’d been using Sass are:

  • declaring variables in a single file as the main way of easily configuring an entire project
  • extending/inheriting selectors to reduce repetition (to keep the code DRY)
  • nesting selectors to create and maintain a clear visual hierarchy

But there’s an incredibly useful feature of Sass that I’d been missing out on. I only accidentally stumbled onto it recently – it’s called Sass mixins.

Continue reading “Writing my first Sass mixins”

What are bugs in software?

bite size programming what is a bug banner
Photo by Glen Carrie on Unsplash

“Crap, I think there’s a bug. This isn’t supposed to work like that!”

Have you heard a software engineer mention “bug” before? Well, it’s inevitable, because bugs are everywhere in software…

But what exactly are we referring to when we say that “there’s a bug” in a piece of software?

Continue reading “What are bugs in software?”

Do I need to type fast to be a programmer?

type fast to be a programmer nickang blog
Photo by Ilya Pavlov on Unsplash

Let’s talk about a complete misconception today. I’ll put it out there… you don’t need to type fast to be a programmer.

Why?

Well, mainly because 99 percent of the time, your brain is playing catch up with your fingers. (Unless you’re high on psychedelics?)

Continue reading “Do I need to type fast to be a programmer?”

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)”