December 03, 2016
0 strokes bestowed

IMHO: Avoid Clever Code

or Code is for Humans, Not for Computers

Yesterday, I was poring through some code when I came across a pattern I hadn't seen used in JavaScript before. The pattern looked like this: This pattern takes advantage of how logical operators work. In the case of && , when the left side is true, the runtime evaluates the right side. Since an…
December 01, 2016
0 strokes bestowed
At work, I am building a JavaScript application with universal rendering. There are a number of challenges with building a universally rendered application, but one challenge in particular is making sure code that should only run on the client doesn't cause the server to crash. Today, I built a…
Tags
React
November 16, 2016
0 strokes bestowed
Redux is a predictable state container for JavaScript apps. I've been using it in all of my apps recently and I discovered an elegant and clever use of it that I want to share. The rest of this article assumes you know how to use Redux. If you do not, follow the link above and read up before…
Tags
Redux
March 27, 2016
0 strokes bestowed
In previous posts I've mentioned my vehement dislike of purposefully opening links in a new tab. Here's a short list of reasons why it's a bad idea: It's not the default behavior of links. It's extra work, generally because the developer will code it to open normally, someone will see it and say…
March 26, 2016
0 strokes bestowed
I've written before about my not so mild hatred for the request to open all external links in new tabs. For those who don't know, this is done by adding target="_blank" to the anchor tag. I don't like doing this for so many reasons, but I'll save that rant for another blog post. Now, I've been…
March 13, 2016
0 strokes bestowed
Recently, I worked my way through the D3 Intro Course taught by Ian Johnson over at Front End Masters and have been practicing what I've learned ever since. I'm not great at it (yet), and I haven't made anything too amazing, but I am getting a better grasp of this awesome library (big thanks…
March 09, 2016
0 strokes bestowed
I write about Bash so often you might start to think it's all I do. It's not, but considering I spend a good portion of my day in the terminal, I'm always on the look out for ways to make it a more efficient experience. Recently, I came upon a simple trick for bash scripts that just has to be shared…
September 10, 2015
0 strokes bestowed
If you're like me, you like to find patterns in your work and turn them into aliases and shortcuts in the terminal. I thought I'd share with you my current Git aliases, explaining a few along the way. For starters, you'll want to add these aliases to your .gitconfig file. Most of these aliases are…
Tags
Bash
July 25, 2015
0 strokes bestowed
If you're like me, you're constantly using the command line to make a directory and then immediately change to that directory. Here's a Bash function that will allows you to do that: This function takes the user supplied directory name, makes all the directories needed to get there, and then cd s…
July 25, 2015
0 strokes bestowed
Like most developers, I'm always looking for ways to increase my efficiency. One way I like to do this is through Bash functions. Just like other programming languages, Bash functions allow you to combine Bash commands or manipulate user input to output a desired effect. While I have a good number…
Previous123456
7
8Next

Let's talk some more about JavaScript, React, and software engineering.

I write a newsletter to share my thoughts and the projects I'm working on. I would love for you to join the conversation. You can unsubscribe at any time.

Introduction to State Machines and XState Logo
Introduction to State Machines and XState

Check out my courses!

Liked the post? You might like my video courses, too. Click the button to view this course or go to Courses for more information.
View on egghead.io