Build Your Own Nested Query String Encoder/Decoder

The other day at work, one of my colleagues was frated that he was unable to encode nested objects in a query string and still maintain a readable URL. I went home that night and coded up a simple solution to this problem, and I thought I'd share it here today. This Github repo contains specs and the solution code.

Build a Regex Engine in Less than 40 Lines of Code

I stumbled upon an article the other day where Rob Pike implements a rudimentary regular expression engine in c. I converted his code to Javascript and added test specs so that someone can self-guide themselves through the creation of the regex engine. The specs and solution can be found in this GitHub repository. This blog post walks through my solution.

Write Your Own React-Redux Connect

My inspiration for this blog post came from this video where Dan Abramov walks through the source code to react-redux

As frontend web developers, it's not uncommon that we follow well-specified patterns - often blindly. The frontend landscape is changing rapidly, and sometimes there isn't time to investigate why we use a specific pattern; we just know we should.

One widely used pattern in react-redux applications looks like this

connect(
  mapStateToProps,
  mapDispatchToProps
)(MyComponent);

I'll assume you know how to implement this pattern, but why do we use it and how does it work under the hood?