Blog
-
Testing signed and encrypted cookies in Rails
Recently I’ve been refactoring the tests for a gem I maintain and I needed to test that it sets the right cookies at the right time. But the cookies in use in the gem are signed cookies and that caused a slight hiccup for me. I’d never tested the value in a signed cookie before and it wasn’t immediately obvious what to do.
-
How not to sort an array in JavaScript
Array sorting is one of those things you don’t spend too long thinking about, until it stops working for you. Recently I was working with array of items in JavaScript that were not sorting at all properly and completely messing up an interface. It took me way too long to work out what went wrong so I wanted to share what happened and why it was so weird.
-
How to start a Node.js project
Sometimes I write blog posts to remind myself what I’ve learned and sometimes I write them because someone else shares something and I want to remember that better. This post is one of the latter.
-
2018 in review
I’ve never been one for writing a review of my year. This year I’ve found myself not only reading, but comparing myself to others’ reviews. I realised that this is not particularly helpful, so decided I’d give myself something to compare myself to at the end of 2019. Thus, here is my first year in review.
-
Service workers: beware Safari's range request
You’ve implemented a service worker to cache some assets. Everything is working well, your service worker is a success, you’re feeling good. But then…
-
Techniques for animating on the canvas in React
I recently experimented with audio visualisation in React on the Twilio blog. While I meant to teach myself more about the web audio API I found that I picked up a few techniques for animating in canvas within a React project. If you’re creating a canvas animation in React then perhaps this will help you too.
-
Implementing one time passwords in Crystal
Crystal is still a young language, there aren’t a lot of libraries available yet. For some this could be offputting, but for others this is a chance to learn about a language and provide useful tools for those also starting to use it.
-
Git commands to keep a fork up to date
I’ve seen the following tweet about git making its way around Twitter recently:
-
Spring clean your dev machine
Development machines can build up such a lot of cruft. Old versions, oudated programs and unused caches litter the hard drive. It’s good to take time once in a while to clean all of this up and free up some space.
-
Use the web share API easily with web components
I’m a fan of the web share API but I was not happy with my initial implementation of the API. It was all a bit complex for what is a very simple API. I wanted something more declarative and easier to use with a more generic fallback for when the share API was not available.
Subscribe
To keep up with posts on this blog, you can subscribe via RSS or follow me on DEV.