Riding rough-shod over your eslint rules
April 18th 2019
In HMH we have adopted fairly strict eslint rules regarding code complexity. I've written about eslint complexity metrics before, and will no doubt do so again! The rules work well for our code, but do tend to get in the way when we are writing tests…
2 min read
Code coverage rocks
March 4th 2019
As a group, developers are a funny lot. We have a rosy view of ourselves. We like to think we are proud of our craft. We tell ourselves that we study best practices, write tests, seek reviews from our colleagues, practice self-reflection, and…
5 min read
Abstract Syntax Trees for fun and profit
February 7th 2019
Part One - an overview This is part one of a series of articles about abstract syntax trees and their use in javascript. The scope of this article is a quick introduction to ASTs, babel plugins and some simple 'toy' examples. I will present the…
14 min read
Abstract Syntax Trees
February 6th 2019
Babel transpiling has fascinated me for a long time, so I decided to dive in and learn about the technology at the heart of the process. Abstract Syntax Trees are an immensely powerful tool that allows you modify your code - with code! I hope you…
1 min read
Benchmarking implementations of 'cosine' distance between matrix rows
November 5th 2018
As part of creating an encoder/decoder model, we want to find the distance between each row in one array and each row in a second using . One implementation will loop through the first array row by row, find the cosine distance and keep track of the…
3 min read