William Shawn

Lazy Sequences with ECMAScript 6 Generators


11 months ago by William Shawn on Atomic Spin.
Generators are an ES6 feature that started receiving a lot of attention a few years ago because of their potential to ease some of the pain associated with...

Using Decorators to Declaratively Extend Functions


9 months ago by William Shawn on Atomic Spin.
The decorator pattern gained fame in the object-oriented world after being featured in the classic 1994 Gang of Four book, Design Patterns. Since then,...

How to Read Code (Eight Things to Remember)


8 months ago by William Shawn on Atomic Spin.
“I hate reading other people’s code” is a common refrain among software developers of all experience levels. However, it’s a necessary...

A Simpler Case for Functional Programming & “Elegant” Code


4 months ago by William Shawn on Atomic Spin.
A lot has been written about the benefits of functional programming, but little of it is accessible to a newcomer. Some of the benefits are easy to understand...

An Introduction to Property-Based Testing with JavaScript


3 months ago by William Shawn on Atomic Spin.
Property-based testing is a powerful technique that’s been widely and successfully applied to functional-style codebases for a long time. As functional...

Make Monkey Patching in Ruby Less Risky with Refinements


25 days ago by William Shawn on Atomic Spin.
Ruby makes it easy to extend its built-in classes, which can be very convenient and lead to more readable code—but it can also be dangerous. This practice...