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”

Why online advice is dangerous

laptop with screen showing medium website with a lot of online advice
Medium is becoming a major source of online advice for me and I’m getting worried

It’s 8:00am in the morning on a weekday and I’m sitting in my living room mindlessly having breakfast. My attention is being given to the Medium posts appearing on my feed this morning. In this particular week, I’m occupied by thoughts about careers, so I tap into posts that discuss the topic.

As far as I can tell, this has happened for many weeks or months, even. Since a lot of them sound flat-out like advice, I’ve basically become habituated to fishing for online advice every morning regarding important areas of life like career, relationships, personal growth, and more.

Continue reading “Why online advice is dangerous”

Poetry

It’s almost the end of the year 2017. I’m 27 and I still don’t get poetry.

I’m inspired to log this here after trying to understand the poem Elon Musk recently shared on his Instagram account.

screenshot of poetry post on instagram post by elon musk

Hopeful that one day I’ll get a poem and happily go down that rabbit hole.

Dear email HTML, please get better

i hate email html banner with a cat with mouth open wide looking unhappy
Photo by Erik-Jan Leusink on Unsplash

I dislike email HTML. There, I openly said it! I really had to get that out of my system before I go crazy.

One of the crowning achievements in my short software development career so far is having built a drag and drop email editor for Metisa in React.

It’s not perfect but it means something to me because I consider it to be the first real feature I’d developed and deployed to a live product with actual users.

While I thoroughly enjoyed the process of figuring out how to build a WYSIWYG (what you see is what you get) email campaign builder, I disliked the part where I had to figure out how to make it output HTML that would be compatible with over 70 email clients on multiple devices with different operating systems (surprise). Entire businesses have been built on how hard it is to get an email to look right on all devices.

Continue reading “Dear email HTML, please get better”

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”

Adapt and forget

sapling
Photo by Francesco Gallarotti on Unsplash

The air conditioner in my office is really loud but I just realised this: I hadn’t noticed it at all!

Today when the air conditioner stopped suddenly, the office felt almost pin-drop silent, except I could still hear the ringing in my ears. The machine had been bellowing like a Ferrari – unnecessarily loud, but without the sexy to make it at least slightly palatable.

While my damaged ears were still ringing, I scribbled this in my notebook: we adapt and forget that we adapted.

Continue reading “Adapt and forget”