Down the rabbit hole with typescript's mapped and lookup types
Two of the more abstract concepts in typescript are mapped types and lookup types.
SVG transformations with affine matrices
I recently had a requirement to add zooming and panning to an svg image. Panning and zooming are popular interaction techniques which let the user focus on a region of interest by restricting the view. The obvious choice was to use d3-zoom but as react is rendering the svg content, D3 is a bit of a bad fit as it mutates the DOM directly. I somehow ended up using affine matrices to compute the transformations.
Narrowing a union type in typescript and a gotcha with callbacks
Narrowing a union type In typescript, a union type describes a value that can be one of several types separated by the vertical bar, for…
Creating an Accessible React Website
I've recently been working on an online application form in the form of a multistep wizard that had strict accessibility requirements. I've never worked on a project with such strict requirements before. I've also heard rumblings that it was not possible to make a SPA accessible. It turns out that there is not that much work involved in making your site accessible and I am going to ensure that any work I do from now on has an accessible first approach. I'm now going to outline in no particular order what I have learned over the past few months.
Streams and Async Await in Nodejs
Dealing with asynchronicity in nodejs has been a challenge from day one due to its non blocking nature. The evolution has been slow and the node world has moved from callback hell to promises and from promises to generators.
Animating a Sine Wave With d3.js and MathJax
I have spent the last year learning some of the maths I should have learned about 27 years ago. One of the things that I have found interesting while learning maths is the relationship between the unit circle and a sine wave graph of y = sin(x).