Blog

Posts on software development, careers, and craft.

React tip: You often don't need to declare a constructor in class components

React tip: You often don't need to declare a constructor in class components. You can use a class field instead. (stage 3) Transpiled via Babel: ht...

Speaker tip: Instead of asking "Who doesn't understand x?" ask "Who...

Speaker tip: Instead of asking "Who doesn't understand x?" ask "Who understands x?" Why? 1. It avoids embarrassing people. 2. It enhances engagemen...

Perhaps the most striking stat on the 2017 State of #JavaScript Survey: VS...

Perhaps the most striking stat on the 2017 State of #JavaScript Survey: VS Code (@code) is by far the most popular editor - and it's only 2.5 years...

Coding a simple prototype takes a little time, but saves a ton of time in...

Coding a simple prototype takes a little time, but saves a ton of time in discussion. It's easier to hit your target when your conversation revolve...

Man, after using @prettiercode for a month, I'd love to have all the time...

Man, after using @prettiercode for a month, I'd love to have all the time back that I've wasted over the years manually formatting code! Prettier i...

Just rewrote a Redux app in plain React

Just rewrote a Redux app in plain React. Here's how: 1. Moved data from Redux store to most relevant component 2. Lifted state as needed More on li...

Creating a new feature

Creating a new feature? Consider writing the docs first. Here's why. 1. It clarifies your vision before writing code. 2. If the doc lists many manu...

Woah, prettier does a wonderful job formatting markdown files too

Woah, prettier does a wonderful job formatting markdown files too! Numbered lists and tables look great. Really enjoying prettier: https://buff.ly/...

Designing Reusable React Components

What Legos Can Teach Us About Reuse in React Apps React is a component library. So React makes it easy to break your UI down into composable pieces. The questio…

Handy way to update npm packages: Use npx

Handy way to update npm packages: Use npx. Nicely formatted report. Hit space to select the packages you want to update. Slick. 😎 via @seldo #java...

Perf tip: Stop using babel-preset-es2015

Perf tip: Stop using babel-preset-es2015. It's deprecated. Use babel-preset-env instead. The env preset only transpiles the features that your targ...

Coming very soon: Use cipm instead of npm on your CI server for 20x faster...

Coming very soon: Use cipm instead of npm on your CI server for 20x faster install than npm 4! 🎉 #Nodevember

It's live

It's live! 🎥 "React: The Big Picture" just published on @pluralsight! 🎉 Short course on React's benefits, tradeoffs, and downsides. ⚖️ https://ap...

Using the same JS lib on multiple apps

Using the same JS lib on multiple apps? 1. Extract it via Webpack 2. Reference the lib on a CDN Now your users only have to download the lib once. 👍

Extract your setState calls to pure functions

Extract your setState calls to pure functions. Test them in isolation. Reuse as desired. Handy pattern from @MicheleBertoli Slides: "setState ftw":...

Tip: Does your project work better with @code (VS Code) extensions

Tip: Does your project work better with @code (VS Code) extensions? List recommended extensions in .vscode/extensions.json, and VS Code will prompt...

React Pattern: Centralized PropTypes

Avoid repeating yourself by centralizing PropTypes There are three popular ways to handle types in React: PropTypes, TypeScript and Flow. This post is about Pro…

Tip: With async/await, you can run multiple async operations in parallel

Tip: With async/await, you can run multiple async operations in parallel. How? Put the await statements on the same line! Works like promise.all. h...

As a long-time OO developer, I've finally embraced the functional paradigm...

As a long-time OO developer, I've finally embraced the functional paradigm in #javascript. Epiphany: Most my objects are just data structures. *No...

Is there a single good reason to ever use a static class in #javascript...

Is there a single good reason to ever use a static class in #javascript instead of simply exporting the public functions? 🤔 I can't think of one.

Here's a handy pattern to easily build objects for #javascript tests

Here's a handy pattern to easily build objects for #javascript tests. Similar to the builder pattern, but less coding.

Just updated the "Tech Speaker Starter Kit" with some new resources...

Just updated the "Tech Speaker Starter Kit" with some new resources including a list of over *800* conferences: https://github.com/coryhouse/speake...

This is absolutely key

This is absolutely key. Want to write loosely coupled code? Do these three things. Full post by @_ericelliott: https://buff.ly/2yojAjt

Much of writing testable code boils down to this: Keep logic and I/O separate

Much of writing testable code boils down to this: Keep logic and I/O separate. Then you can test logic in isolation without mocking. #tdd

Why blog

Why blog? Cunningham's Law: "the best way to get the right answer on the internet is not to ask a question; it's to post the wrong answer.

Spent the morning comparing React's syntax to Angular, Vue, and Ember's for...

Spent the morning comparing React's syntax to Angular, Vue, and Ember's for my upcoming "React: The Big Picture" course... #react

I'm a fan of Redux, but it's a power tool, not a "use it all the time" tool

I'm a fan of Redux, but it's a power tool, not a "use it all the time" tool. Too many people are cutting paper with an ax.

Developer job security: Low road: Obfuscate so only you can understand

Developer job security: Low road: Obfuscate so only you can understand. High road: Automate your job away, and a better job will follow.

Woah, you can get most of TypeScript's benefits with plain JS by just...

Woah, you can get most of TypeScript's benefits with plain JS by just slapping comments in your code?! Compelling. https://buff.ly/2ydk9eR

I've found a VSCode setup I ❤️: Material Pale Night Material Icon Theme See...

I've found a VSCode setup I ❤️: Material Pale Night Material Icon Theme See settings in 2nd screenshot. Perfect for late night coding.