{ In Scope }

Stephen Weiss

Written by Stephen Weiss who lives in Chicago with his wife, Kate, and dog, Finn. Follow him on Twitter!

Object Oriented Javascript: Class Instantiation Patterns

February 18, 2019

What are classes anyway? A class is an entity that is capable of producing objects (instances) that share common attributes, features, and…

React Key Props And Why You Shouldn’t Be Using Index

February 17, 2019

If you’ve ever mapped over an array in React, you’ve likely seen this warning: I wanted to understand why React gives this warning. After…

Looking Up Shell Functions In Zsh

February 13, 2019

I recently figured out how to write a shell function. The problem is that pretty quickly I’d forgotten which functions I’d written, or fi…

MacOS Spotlight Nonsense & Reindexing

February 12, 2019

Recently, Spotlight had been acting up. For example: When I search for Spotify (an app I use every day), it wouldn’t show up. Instead I’d…

JS Modules Primer: Export & Require

February 11, 2019

Import/Export vs. Require in JS On more than one occasion I’ve found myself looking up the MDN page on imports and exports for modules in…

Reasons To Share

February 06, 2019

There are plenty of reasons to write this blog and share your perspective. Recently, however, I had a few experiences that really reinforced…

Difference Arrays: What Are They And How Do They Work?

January 31, 2019

Difference Arrays Imagine you’re given a problem that says for each “query” in the format add to all elements of an array of zeros with…

Exploring GET Requests: Multiple Values And Parameters

January 30, 2019

The ease of writing GET requests varies with the clarity of the supporting documentation. With that in mind, I recently explored an API…

Heroic Consistency, Wu Wei, And The Middle Way

January 30, 2019

I recently found the following tweet about heroic consistency. Don’t aim for consistently heroic efforts. Aim for being heroic at…

Rotating Arrays: Two Ways

January 30, 2019

Given an array and a number of left rotations (each left rotation moves the first element to end and all subsequent elements one place to…

Better Form Submissions with Event.preventDefault() and HTMLFormElement.reset()

January 04, 2019

Two tools to keep in your tool belt when adding forms to your website should be: The reason is that by default, on submission of a form…

Write Your Own Javascript Contracts and Docstrings

December 29, 2018

My very first introduction to code was with ~Introduction To Computational and Programming Using Python~ by John V. Guttag. While I didn’t…

VSCode: Adding Ligatures To A Font That Doesn't Have THem

December 29, 2018

A few months ago, I found a font, that introduced me to ligatures and how they could be useful in writing code. Fira Code’s ligature set…

Lessons In querySelector And The Importance Of Understanding Mechanism

December 27, 2018

NB: The below illustrations are inspired / adapted from MDN’s great page on QuerySelector . I did not come up with these examples (though…

Postman, URI Encoding, and Occam's Razor

December 25, 2018

Occam was a 14th century theologian-philosopher who is perhaps best known now for his relentless insistence on using the law of parsimony…

Debugging: Dev.To RSS-To-Draft Only Displaying Post Summaries (Wordpress Solution)

December 23, 2018

Preamable I’m filing this under the category of: “Issues that I created for myself and don’t want to forget how I solved.” Also, I don’t…

Oh-My-Zsh and Persistent Aliases

December 22, 2018

NB: If you want the quick steps to add aliases to your , jump down to the section, “Adding Aliases: The Better Way”. First, a little…

Charts, Colors, and Complements: Oh my!

December 20, 2018

Charts are the black hole of programming. I was warned, but I wanted to tackle charts anyway. That was my first mistake. Humans tend to…

Node Environmental Variables: A Simple Example

December 18, 2018

This is not going to be a deep dive into Node’s environmental variables, but rather a quick look at how you may use environmental variables…

Error Handling: Jest with Babel

December 16, 2018

Trying to run tests with Jest, I got the following error: Looking at the stack trace (in full at the end of this post), however, there…

Custom Sort Functions with Javascript

December 14, 2018

Javascript’s built-in sort is powerful and fast. However, there are many times when you will want to sort in a custom fashion. Whenever I…

Error Handling: Uncaught TypeError: this.searchDB is not a function

December 12, 2018

While working on a React project, I came across the following error: is a method on my component that is called when certain buttons are…

Customizing webpack

December 10, 2018

I’ve looked up how to customize my Webpack a number of times, so I’m documenting here to serve as a reference and template for future…

Adding Indexes To Mongo + A Case Study

November 30, 2018

I’ve been working on projects with larger data sets recently and have begun to notice that not all queries resolve in one or two…

Experience, exposure, and the building of knowledge

November 29, 2018

A few weeks back I went from an absolute novice to being invited to present on a topic in the span of five days. The experience was humbling…

Axios And Routing With baseURLs

November 27, 2018

I was unifying multiple micro services into a single front-end. To do this efficiently, I wanted to create a single proxy that sat in front…

Indexing Databases - A Postgres Example

November 22, 2018

A short review of when and how to index a Postgres database. Common Commands Why Index Your Postgres Table The two most common reasons to…

Learning To Savor The Moment

November 21, 2018

Savor the moment I love that phrase. It’s a reminder that there is something genuinely special about this moment in time. The circumstances…

Error Handling: permission denied for sequence _id_seq…

November 20, 2018

Recently, I was using NodeJS to write directly to a Postgres database when I got an error beginning with: What follows are the steps I took…

A Beginner's Guide to Feature Branch Workflows with Git

October 25, 2018

The Feature Branch Workflow for git is a graduation from the Centralized workflow where all changes are made directly to the master branch…

Debugging Create-React-App

October 23, 2018

In an effort to learn React, I pulled up React’s introductory tutorial . Almost immediately I hit turbulence. I was in the setup of the…

Printing Articles and Blogs in 2018

October 21, 2018

There are more free resources out there today than ever before. For a student, it’s a glorious time. Despite the rise of great annotating…

Swapping and Bitwise Operators

October 02, 2018

One of the simplest ways to swap two variables in programming is to create a temporary variable that holds a value while you iterate. Given…

Growing up

September 14, 2018

Greg Lukianoff was recently on the Cato Daily Podcast to discuss his new book with Jonathan Haidt, the “ The Coddling of the American Mind…

Leadership vs Management

September 11, 2018

Cal Turner Jr., CEO of Dollar General, was on the A16Z podcast this week. In a wonderful moment, Cal reflected on a lesson he took from…

Shady email practices

September 10, 2018

Want to make sure that your customers unsubscribe even less than they would otherwise? Make your email long enough so that only the footer…

Aggregators and what they're hiding

September 09, 2018

The thing about aggregators is: in an era of abundant supply, it’s almost impossible to know when things aren’t there. When you need a piece…

Dear Donald

September 08, 2018

Dear Donald, Four years ago, you told me to “ Learn To Code .” This month I will be taking the next step in that journey as I start a full…

Aliases and the .bash_profile

September 05, 2018

.gitconfig follow-up with .bash_profille In my previous Git posts ( here and here ), I noted that one of the things I found really helpful…

Chia seed pudding

September 01, 2018

At brunch with my cousin, I tried Chia Seed Pudding for the first time. It was awesome. To me it was a pleasant combination of Oatmeal and a…

Improvements in cable management

August 31, 2018

Spend enough time looking at pictures of desks and you’ll realize that despite all of the electronics, there are terribly few wires on…

Git clone, pull, and push

August 30, 2018

Git Clone, Pull, and Push Continuing my learnings re: Git . I wanted to better understand the use cases for three Git commands: Clone…

Curbing my natural tendencies

August 29, 2018

This spring I read the Jason Zweig updated version of Benjamin Graham’s The Intelligent Investor , the follow up to his more technical…

Time in the kitchen

August 28, 2018

I’ve been trying to pick up more of the cooking duties in our home and I’ve noticed that recipes often make a distinction between prep time…

Deciphering the terminal

August 27, 2018

My goal is to be a competent command line programmer. I knew that in order to make that happen, I would have to get very comfortable reading…

How to quickly / safely keep my project up to date with branches (and avoid avoidable problems)

August 26, 2018

I got into a bit of a mess earlier today when I accidentally checked out an old state of my current branch without creating a new branch…

Learning Git from the ground up - another Git tutorial

August 22, 2018

I’ve been trying to learn more about Git recently. I thought I’d write up some of the lessons I’ve learned to create a basic primer on Git…

Deep and shallow copying - A tale of two friends

August 20, 2018

I was recently using the slice method to copy an array and I ran into a few difficulties understanding why my copy was not shallow. From the…

Giraffes and Elephants

August 14, 2018

The simplest endeavor toward diversity focus on hiring practices. Making sure that candidates are not systematically excluded and that…

Confucianism’s marketing problem

August 13, 2018

I’m currently reading The Path by Michael Puett and Christine Gross-Loh. Puett and Gross-Loh contrast Confuscius to Kant and the modern…

The best time to get started was yesterday

August 12, 2018

The next best time is now. I’ve been dying to get back to this blog for months but this week two things gave me the push I needed: First…

Measurement overload

June 14, 2017

Measurements are getting cheaper, but the amount getting done is not keeping pace. Why is that? Nearly 150 years ago, William Thomson, the…

A Healthy Skepticism

June 13, 2017

“For best results, mattresses should be replaced every 8 years” — I recently saw an ad with this copy in a window of a mattress store near…

A small tweak but a big difference

June 10, 2017

Last night, I made a small change that made a big difference. It didn’t feel significant when I made it. It felt like a thing you do when…

Meetings with yourself

June 09, 2017

I write only when inspiration strikes. Fortunately it strikes every morning at nine o clock sharp. - W. Somerset Maugham It’s not…

Sending a signal - Meetings at AndreesonHorowitz

June 08, 2017

In his brilliant book on management and leadership, The Hard Thing About Hard Things , Ben Horowitz covered a lot of ground. Three years…

The hat tip

May 23, 2017

The hat tip is ” a cultural expression of recognition, respect, gratitude .” It’s more modern incarnation takes that tradition and…

Showing up and the Daffodil Principle

May 19, 2017

There are days when I don’t want to show up. Days when I wish I could just jump ahead to the part where I have accomplished my goal, won the…

You're doing it wrong

May 17, 2017

Ryan Holiday recently weighed in on the phenomenon of ‘ultra hardcore readers’ - people who spent nearly every spare minute of their day…

The hidden cost of habit creep

May 16, 2017

Habits are a way to automate certain decisions to make space for the bigger ones. They are not, however, a panacea - a lesson which became…

The allure of banned materials

May 06, 2017

A few days ago, I got to talking with a friend about the Berkeley students’ recent protests and threatened protests in advance of speeches…

Why write?

April 26, 2017

In his annual letter to shareholders, Jeff Bezos answered a question that had been following him around for twenty years: what does Day…

Optimizing for the experience

April 16, 2017

Think about the last time you were in an elevator. Did you pull out your phone to check your email or get an update on the score of the game…

Where do you live?

April 08, 2017

When we meet people for the first time, we are filling in gaps with all of the information we can gather about a person. No matter how good…

This too shall pass and thoughts on (im)permanence

April 06, 2017

Permanence is beautiful. I would argue that one reason we gravitate toward immortal divine beings is that there’s comfort and solace in…

Acknowledge then correct; skip the judgment

April 03, 2017

I had wanted to write something smart tonight. The topic was all picked out, I had researched it, and I’d even thought of an anecdote about…

Drowning out thoughts

April 02, 2017

“An artist must have downtime, time to do nothing.” — Julia Cameron A few months back, I was talking to a friend who confided that he filled…

City of Big Shoulders

March 31, 2017

Hog Butcher for the World, Tool Maker, Stacker of Wheat, Player with Railroads and the Nation’s Freight Handler; Stormy, husky, brawling…

Looking at the keys to successful (email) communication

March 30, 2017

In my first corporate orientation class, I participated in a professional writing seminar lad by Curry Young Consultants. In terms of return…

Alleviating the pressure to be right

March 29, 2017

“If they don’t know your dreams, then they can’t shoot ‘em down” - J.Cole Most kids learn to share at an early age. It’s a lesson that…

Graveyard of Good Intentions

March 28, 2017

Commitments are easy to accumulate and much harder to extricate from. One of the reasons why I’ve felt this week to be particularly…

Media diet

March 27, 2017

These past few weeks have been a lot for me. I’ve felt overwhelmed and underwhelmed, isolated and crowded, confident and unsure. The roller…

Yesterday is not like today

May 07, 2016

This morning I woke up for the first time in nearly three years without something that had become a core part of my identity. Yesterday, I…

Sneezes, meetings, and Kitty Genovese

February 21, 2016

The room was quiet and the music soothing. After 50 minutes of flowing from pose to pose in a room approaching 95°F, the class collectively…

Learning to "GTD"

February 14, 2016

I have a friend who likes to say that people complain all the time about not having enough time to do what they find important, but when he…

Brief thoughts on reading and note taking

February 10, 2016

Coming into 2015, I promised myself that I would read more than I did the year before. I was achieved this goal, but I finished was no where…

Who would buy a car programmed to sacrifice the owner?

Invalid date

“Who would buy a car programmed to sacrifice the owner?” ¹ What I love about this question is that it gets at two conflicting priorities…

Yesterday's Coffee - tastes like you made it today!

December 11, 2015

“For the rest of our lives, we will always be one pot of coffee ahead.” “Until that day when I make a pot of coffee that neither of us will…

Blue Origin's historic rocket landing

November 24, 2015

Because who doesn’t want to go to space? Also, props to the creative team who had the video chopped and edited in 24 hours to take us all…

Reaction: The Thucydides Trap: Are the U.S. and China Headed for War?

October 02, 2015

Graham Allison’s article “The Thucydides Trap: Are the U.S. and China headed for War?” published in this month’s Atlantic reviews the rise…

Reaction: When Housing Prices Rise, So Do Retail Prices

September 27, 2015

The left panel of Figure 1 shows that retail-price inflation was highest in locations with high housing price growth during the housing boom…

Musings in the beer aisle

August 13, 2015

Preamble I love beer. Thanks in part to a stint in Prague and living with a beer nerd for a year, it’s a real treat to stand in front of a…

Shirt patterns and memory

August 09, 2015

via The Old Design Shop Yesterday, I sat down at my friend Grant’s desk to catch up a bit. He commented on my shirt and said something to…

Should education be subsidized?

July 19, 2015

Beyond my health, education is probably the single greatest gift I have ever received. I am eternally grateful to my parents, my teachers…

Starting with a question

July 18, 2015

This site starts with a question. It’s a question about purpose, about direction, and about value - “Is this worth reading? Is it useful or…