Tips for Working From Home

Working from home has become much more common over the past few years, even before the COVID-19 pandemic struck. But whereas doing so was a choice before, now it is mandatory for many office workers. Working from home can be a challenge, though. Yes, it’s great to work in your pajamas and not have to shave regularly, but it comes with some pitfass as well. In this article I will share some tips I’ve picked up from having spent half of my 25 year career working from home.

Continue reading

Quick Sort Algorithm

Quick sort algorithm banner image

Quicksort is one of the most efficient sorting algorithm with O(log n) Big-O notation. It can be 2x – 3x faster than merge sort. It is another divide-and-conquer algorithm. The algorithm divides the list on a pivot, which can be any number in the list. Any item lower than the pivot is added to a ‘left’ list. Any item larger than the pivot is added to the ‘right’ list. The process is repeated recursively with any sub-list with more than 2 items.

Continue reading

Merge Sort Aglorithm

Merge Sort illustration

I mentioned in yesterday’s post that a lot of data manipulation involves lists, nested and otherwise. Another common task is sorting elements in a list. Day 6 of 30 Days of Algorithms is a Merge Sort, which is another “divide-and-conquer” algorithm.

Continue reading

Array to Tree Algorithm

Array to tree algorithm illustration

Managing data almost always involves working with hierarchical or nested data. Whether we are talking about nested files and folders, product categories and sub-categories, music, … you name it. But we store data in a database in a flat structure. This makes sense because the data objects themselves share the same attributes and it makes for easy searching. But how we store the data and how we need to visualize and manipulate it don’t necessarily match. So how do we efficiently transform a flat array to a tree? Day 5 of 30 Days of Algorithms will present one solution with O(n) complexity.

Continue reading

Bubble Sort Algorithm

Bubble Sort illustration

Our algorithm for Day 3 of 30 Days of Algorithms is a Bubble Sort. Bubble Sort is not an efficient sort algorithm (The Big-O notation for the time complexity is 0n2) but it is useful for learning. The basic premise is very simple : Start with the first two items in the list. If the first item (left) is higher than the second item (right), swap them.

Continue reading

30 Days of Algorithms in JavaScript

algorithms illustration

I recently decided to re-enter the “real world” after freelancing for three years. My very first interview was at InVision. It did not go well, to say the least. The coding test focused on common algorithms in JavaScript, and I bombed. After receiving the polite rejection email, I asked the recruiter for feedback from the hiring team so I could improve.

Continue reading

Create JavaScript models from JSON

For the past several months I have been working on a new Adobe Illustrator extension to make the functionality of IconJar available as a panel. In order to manipulate the IconJar data – which is stored in JSON, I needed to create “Plain Old JavaScript Objects” (POJsO?) with getters and setters. Rather than type out the same lines of code over-and-over, I decided to create a command-line utility to quickly create the JavaScript classes for me.

Continue reading