Never miss a beat

Join my newsletter.

The Archives

Trial by Code Review

Published: 8/22/2016

Today wasn’t the day, but I remember it like it was. My first big project that I submitted at a big company working with engineers that I respected and looked up to. I pushed my code to our code review tool and anxiously awaited their feedback. Some of it was the most non-constructive feedback that I’ve ever seen in a code review and since then I’ve thought of some standards that might (or might not) be worth adhering to in code reviews. Perhaps a better title for this post is actually A brief…

A brief summary on Automated Testing

Published: 8/20/2016

I recently read this amazing article by Josh Mock and felt the need to share it. In fact, the tools he uses in his examples – JavaScript, Mocha+Chai, and Phantom are the tools I use daily to do the same thing. I can’t stress enough how great his article is, especially if you’ve written some tests before but you’re not sure how to write a good test. That being said, there’s a few more things I’d like to cover and add to it. In summary, Josh covers the following things: Keep Business and…

Mighty Morphing Multimethods

Published: 8/2/2016

Type systems are a tricky thing. A lot of languages have very flexible type systems, such as F# with its inferred (and extremely well inferred at that) type system, or JavaScript with it’s untyped nature. Clojure hits a happy middle ground (for me, at least) – It’s dynamically typed (or “gradually typed”, if that’s your cup of tea). Why is the typing important? Polymorphism. Most of you probably learned polymorphism from your introduction to object-oriented programming course/book which was…

JavaScript: Generators

Published: 7/19/2016

One thing I’ve learned recently from Clojure (don’t worry, this post is about JavaScript) is that laziness is great. Lazy code is powerful code, allowing you to model things like infinite sequences or complex computations over a range of data. Without this laziness, an infinite sequence would cause a stack overflow or complex computations would bog down your performance when you may not even need to perform all those computations to begin with! Enter Generators With the latest rendition of…

Understanding Clojure's Map & PMap

Published: 7/18/2016

Let’s be honest – Part of the reason you’re using Clojure is the higher order functions like map . They’re great, composable, and describe what you’re trying to do instead of defining what to do – this keeps code simple. Maybe you’ve been playing with map for a while now and have even tried using pmap . If you did, you probably noticed that pmap is often slower than map , and if you want to know why – read on. What is map ? Before we get into pmap lets go ahead and clarify our…

Why I Switched from Python to Clojure

Published: 7/18/2016

First – a bit of background. When I first started to learn programming, I started with a course in high school that focused on Java. From there, I decided I wanted to work for a start-up and I had to learn Python (I was naive). I started playing around with Python and it just felt right – at first. I spent some more time with it and started to realize that I needed something more. Here’s a brief list of the reasons why I switched from Python to Clojure. Interpreted Language Python is a dynamic…