Posts from 2020
What’s the difference between providing a rejection handler for a promise and catching errors ?
And why Does the React AJAX FAQ say
Read more ...
// Note: it's important to handle errors here
// instead of a catch() block so that we don't swallow
// exceptions from actual bugs in components.
I’ve been using Google’s Firebase recently and find it a great development platform.
One of the best things about it is the emulators available for local development.
Just a few weeks ago they made it even better by adding an authentication emulator
So now you can easily start up a clean environment to test your new code on.
But the auth emulator starts with no users every time.
This is one way to add users.Read more ...
Hugo Page Bundles seem like a great idea, providing a way to organise images and other pages assets.
Here’s why I decided not to use them.Read more ...
Setting up Sonarcloud integration with Gitlab was so easy as to be not worth documenting - just setup an account at each, import your projects on Sonarcloud and follow the step by step guide to start analysis.
But getting test coverage reports was harder.Read more ...
I’ve been taking a bit of time lately to do some of those low priority housekeeping tasks that can easily get overlooked.
By using quiet times to setup good processes life should be easier next time things get busy.
One of those tasks was to setup outgoing email on various systems - some of which are laptops and I’d still like automated mails to go out even if the device isn’t on the home network and can’t reach my ISP mailserver.
Back in the day you’d just send mail directly - but with spam protection everywhere this just doesn’t work and it’s far better to authenticate to some trusted mailserver.
I’m using gmail so I’ll use their servers.Read more ...I repurposed an old workstation and needed to install Windows with only Linux systems to work from.
This turned out to be painful because the system has an old BIOS and while you can in theory install windows from a USB stick - doing so requires a newer system using UEFI
Linux installs fine from a USB stick so this caught me out.
It turns out the Windows installer works fine from an external DVD drive - but first you may have to buy some double layer DVDs because the image doesn’t quite fit on a normal one.
Read more ...
I wanted to use an html
<aside> block in my blog and this isn’t supported by Markdown
It’s fairly easy to implement as a hugo shortcode though
I created a file (path from the root of my hugo site)
Read more ...
I’ve really enjoyed learning Golang lately, the tour is a great place to start and I found using VSCode as an IDE really helped with automatic formatting and highlighting of errors.
Best things about Go so far for me areRead more ...
I’ve been writing software for long enough to know that it pays to be careful at the start. You don’t always know when you’ll be supporting a project long term and may need to upgrade versions of your framework and related tools.
These are my notes of starting to use React with an eye to long term support.Read more ...
As more and more of the web moves to https, we developers find more problems getting things to run properly.
It used to be easier to run development sites on http and maybe have a config option pretending it was secure, or use a fake certificate (often labelled “snakeoil”)
As the internet has matured this has become more problematic.
Some things just don’t work without https, browsers are less likely to let you ignore the warning, and if you develop a PWA it just won’t work without a valid, trusted certificate.Read more ...