Really clever from the New York Times. You can create your own here.
Continuing from before, I wanted to improve the accessibility on this website as much as possible. The initial Lighthouse run gave me a score of around 82, which is not too bad, but I definitely wanted to improve it.
One important thing for a good user experience is a fast website. Google offers the free tool Page Speed Insights. Running it initially on my website I already have a score of 99, which is pretty good. In the past I already spent a fair amount of time optimizing the bigger problems. I looked at the tips to improve the page speed even further. There are four things that Google considers currently in need of improvement on this page.
Rails provides a great way to check for
nil and empty variables in the same call:
blank?. This is especially helpful in ERB templates where a variable can be either nil or empty, depending on the object. Without it, the check would look similar to this:
This is quite cumbersome and easy to forget. With
blank?, this can be simplified to:
For the following values