2017

37 posts from 2017

JavaScript Event Loop

Tutorial on JavaScript's call stack, callback queue, and event loop.

URIs vs URLs

Clearing up the confusion between the two terms.

JavaScript Range Array Function

Python has a very handy range array function that I find myself using all the time. Unfortunately JavaScript does not, but we can quickly implement our own functionality.

JavaScript: Map, Filter, Reduce

JavaScript’s built-in map, filter, and reduce array methods are invaluable to a modern JavaScript developer. First introduced in 2011, these methods go way beyond the traditional for loop for traversing...

Currying in JavaScript

Currying is a fundamental tool in functional programming, a programming pattern that tries to minimize the number of changes to a program’s state (known as side effects) by using immutable...

JavaScript Scope and Closures

Closures and scope are fundamental parts of JavaScript but often poorly explained and therefore the source of confusion to many developers. This is my take on explaining them to someone...

JavaScript Double Negate (aka !!)

JavaScript features the odd but commonly used double negate operator !!, which is used to create a Boolean from a value.

JavaScript Temporal Dead Zone

The Temporal Dead Zone is a behavior in JavaScript that occurs when declaring a variable with the let and const keywords, but not with var. A shorthand you’ll often hear...

JavaScript Hoisting

Hoisting is a behavior in JavaScript where variable and function declarations are “hoisted” to the top of their scope before code execution. This can result in confusing behavior, such as...

Python 2 vs Python 3: Which to Learn?

If you’re new to Python perhaps you’ve heard there are two major versions out in the wild: Python 2 and Python 3. So which should you learn and why is...

Python Optimizations with Guido

Within the Python docs essays section is a wonderful article by Guido van Rossum on optimizing code with Python. You should read the whole thing but I’m highlighting the bits...

Python zip()

A short tutorial on Python's built-in zip() and longest_zip() functions.

Algorithms: Simple Search

Imagine you are visiting your friend Guido’s house and he asks you to find his favorite book from the Harry Potter series, “The Prisoner of Azkaban.” How would you do...

Python's Built-in Help Function

Python has a built-in help function help() that provides an interactive guide to the official Python documentation. Even though I’ve been programming in Python for years, I only just started...

Algorithms: Binary Search

Binary search is typically one of the first algorithms taught to CS students. It is very powerful, prevalent, and yet one of the easier-to-understand algorithms. With binary search, even if...

JavaScript Arrays: slice vs splice

In JavaScript, it is easy to confuse slice and splice. I certainly do it all the time. They have similar names but act in very different ways. Here’s a quick...

JavaScript Arithmetic Operators

JavaScript’s arithmetic operators perform addition (+), subtraction (-), multiplication (*), and division (/). Mozilla has a great overview of them, but it fails to mention any of the edge cases...

Python Lambda Expressions

In Python, lambda is a fancy way to define a small anonymous function inline. You never have to use lambda expressions, but they can make your code more concise in...

Python Pass Statement

In Python programming, pass is a null statement typically used as a placeholder. In contrast to a comment statement which is ignored by the Python interpreter, a pass statement is...

How The Web Works

A behind-the-scenes look at the World Wide Web and how it really works.

Total Beginner vs Beginner

Programming in the Twenty-First Century has a great piece with this title on why most programming language tutorials fail. Namely, they’re written by accomplished programmers who highlight the issues/concerns relevant...

Install Node.js and NPM on a Mac

JavaScript is one of the most popular programming languages in the world. It is built into most web browsers and used to add interactivity to websites. With Node.js, a “JavaScript...

Install Node.js and NPM on Windows

JavaScript is one of the most popular programming languages in the world. It is built into most web browsers and used to add interactivity to websites. With Node.js, a “JavaScript...

Node Rest API Tutorial

This tutorial will show you how to build a simple REST API with Node.js and Express.js, a popular and lightweight framework for building Node.js apps.

The Next WordPress

It’s 2017 and WordPress alone makes up 27% of the Web. Which is crazy. However when you consider web development still remains quite complicated and difficult to learn, it makes...