Skip to main content
Code Snippet

Code Snippet

By Andrew Walpole
A podcast centered around web development technologies, like HTML, CSS and JavaScript, that takes a few lines of functional code and deep-dives into what’s going on.
Listen on Spotify
Where to listen
Apple Podcasts Logo

Apple Podcasts

Google Podcasts Logo

Google Podcasts

Overcast Logo


Pocket Casts Logo

Pocket Casts

RadioPublic Logo


Spotify Logo


Using Bitmasks for Efficient App Configurations
In this episode, we look at 2 functions to encode and decode a bitmask for a set of configuration flags. This is a great way to efficiently store user or app settings. As always, the code for this snippet can be found here:
October 16, 2019
Easier Layouts with CSS box-sizing
In this episode, we take a look at a very common practice of  changing the box-sizing property on all HTML elements using CSS to help us do less math and create easier and more maintainable layouts. As always you can find this episode's code here:
September 25, 2019
CSS Grid Named Area Layouts
In this episode we look at a powerful CSS Grid feature; named areas! Named areas let you have specific control over where items in your grid layout are placed, letting you take the same semantic HTML content and providing multiple, pure css, ways of laying out the content. As always, you can view the code here:
September 20, 2019
Destructured Function Parameters
In this episode, we look at using destructured function parameters as an alternative way to pass information via objects into functions. The code to this weeks code snippet can be found here:
September 11, 2019
Using Spread with Objects and Arrays
In this episode we look at the spread operator and how it is used to make quick work of merging and shallow-copying Arrays and Objects. If you'd like to follow along, the link to today's snippet code is here:
September 05, 2019
Using URLSearchParams Web API to Preserve Page State
In this episode we look at the URLSearchParams Web API which allows you to query, check and modify URL parameters using JavaScript. As always, you can check out this episode's snippet here: And if you want to learn more about the URLSearchParams API, here's the documentation:
August 22, 2019
Random Whole Numbers With Bitwise Not
We look at a quick, useful and fairly performant way to generate random whole numbers within a given minimum and maximum range in JavaScript. You can take a look at our code snippet on codepen at the following link:
August 13, 2019
3 Ways to do CSS Vertical Centering
In this episode we look at 3 easy and common ways to do modern CSS vertical centering of html content. You can find this episode's snippet on codepen at the following link:
July 30, 2019
Array of Unique Values with JS Set
In this quick episode, we look at a single line of JavaScript code that can quickly turn any array of values into an array of unique values, filtering out any duplicates. You can find the code for today's snippet here:
July 24, 2019
Indexing Data in Javascript
In this episode, we look at a simple function that can be used to index a data set over specific properties in order to make it easier for your app to display data in a specifically organized way. Here's a link to the episode's snippet:
July 23, 2019