JavaScript Event Loop
Tutorial on JavaScript's call stack, callback queue, and event loop.
37 posts from 2017
Tutorial on JavaScript's call stack, callback queue, and event loop.
Implement the objects for a deck of playing cards in JavaScript with ES6.
Clearing up the confusion between the two terms.
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’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 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...
A tutorial on the three ways to declare variables in JavaScript ES6+.
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...
In JavaScript, the tilde ~ Bitwise NOT operator is commonly used right before an indexOf() to do a boolean check (truthy/falsy) on a string.
JavaScript features the odd but commonly used double negate operator !!, which is used to create a Boolean from a value.
An overview of the traditional var keyword for declaring variables in JavaScript.
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...
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...
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...
The Greatest Common Divisor (GCD) is the largest integer that evenly divides two numbers. For example:
Consider the following Python code. What is the output?
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...
A short tutorial on Python's built-in zip() and longest_zip() functions.
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 slice notation is straightforward enough, but it does have some strange edge cases.
Check out the following Python code:
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...
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...
In this tutorial you’ll learn how to build a simple web app with Node, Express, and MongoDB.
A list of famous programming quotes I like.
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’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...
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...
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...
A behind-the-scenes look at the World Wide Web and how it really works.
A behind-the-scenes look at how the Internet really works.
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...
How to debug this common Cloudflare and Chrome issue
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...
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...
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.
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...