One simple trick to optimize React re-renders

Kent C. Dodds: If you’re experiencing React performance issues, try this: “Lift” the expensive component to a parent where it will be rendered less often. Then pass the expensive component down as a prop. You may find doing so solves your performance problem without needing to spread React.memo all over you codebase like a giant […]

Making sense of API response times

Mathias Hansen, co-founder of Geocodio, on how they analyze their API response times: For the longest time, we focused on average response times. It is a quick and simple metric that you can quickly break down by API endpoint and time window. […] While measuring average response time have their place they can also be […]

Display the macOS Dock in Touch Bar using Pock

Display macOS Dock in Touch Bar. It’s free and open source! Not that I’d use it (I always use the “Expanded Control Strip” to make the Touch Bar show the “regular” keys), but I found this one quite interesting and it looks really cute. Installation possible per brew cask: brew cask install pock You can […]

Using AWS’ “Server­less Image Han­dler” to roll your own Image Transform Service

Ama­zon AWS has offered a Server­less Image Han­dler for a while that allows you to spin up an AWS Lamb­da func­tion to cre­ate your own pri­vate lit­tle image trans­form ser­vice that is inex­pen­sive, fast, and is front­ed by the Cloud­Front con­tent deliv­ery net­work (CDN). Whenever an image is uploaded to the bucket, a Lambda function […]

Visually Search using your Phone’s Camera with The Web Perception Toolkit

The Web Perception Toolkit is an open-source library that provides the tools for you to add visual search to your website. The toolkit works by taking a stream from the device camera, and passing it through a set of detectors. Any markers or targets that are identified by the detectors are mapped to structured data […]

Implementing Dark Mode on adactio.com

Jeremy recently implemented “Dark Mode” on his site. Tanks to CSS Custom Properties the implementation is pretty straightforward (also see my writeup here). But of course, Jeremy added some extra details that make the difference: In Dark Mode images are toned down to make ‘m blend in better, as detailed by Melanie Richards: @media (prefers-color-scheme: […]

GitHub CI Workflow for PHP applications

Mattias Geniar has shared his GitHub Workflow to make GitHub do the CI work for PHP applications: on: push name: Run phpunit testsuite jobs: phpunit: runs-on: ubuntu-latest container: image: mattiasgeniar/php73 steps: – uses: actions/[email protected] with: fetch-depth: 1 – name: Install composer dependencies run: | composer install –prefer-dist –no-scripts -q -o; – name: Prepare Laravel Application […]

Idiosyncrasies of the HTML parser

Highly interesting book (in the making) by Simon Pieters, on how HTML parsers work: The HTML parser is a piece of software that processes HTML markup and produces an in-memory tree representation (known as the DOM). The HTML parser has many strange behaviors. This book will highlight the ins and outs of the HTML parser, […]