21st August 2021
If you're still serving images in long-time standard formats such as JPEG and PNG then a Google PageSpeed Insights analysis of your site will identify an opportunity to improve your page loading times by serving images in "next-gen" formats. There are several so-called "next-gen" image formats which offer superior compression to JPEG and PNG but in this post we will be focussing on Webp, a format developed by google. Lossless Webp image files are 26% smaller than PNGs and lossy Webp images are 25-34% smaller than comparable JPEGs according to Google. As you'd expect with a compression format developed by… Continue reading »
25th January 2021
What do WebSockets do? Hypertext Transfer Protocol (HTTP) is unidrectional, meaning requests can only be made by the client. This is a limitation which means that a certain class of web application cannot be built using HTTP alone. WebSockets are a separate communication protocol, fully compatible with HTTP, which allow for bidirectional communication between a client and a server. A protocol is simply a set of rules; in the case of WebSockets they were standardised in 2011. This protocol can be utilised via the WebSocket API or popular JavaScript libraries such as SocketIO, both of which have excellent browser compatibility. WebSockets… Continue reading »
21st July 2018
The Birthday Problem is one of those clear examples that our intuitions about probability can be severely flawed. I find these examples fascinating (see my post on The Monty Hall Problem) and I think they're valuable to learn about because they can help us improve our understanding of probability in our own lives. Most of us will never have a good enough understanding of probability to be able to accurately estimate the probability of complex events but, at the very least, we can gain a better understanding of the limits of our intuitions and the kind of cases where we… Continue reading »