Clubhouse loho

If you use Clubhouse to manage your software projects, you may also be using VCS Integrations, such as the one for GitHub. By default this allows you to create branches with the following naming format: carlousfahmi/ch17545/git-hooks-are-amazing, where the ticket number is embedded within the branch name.

You may also be following the common Git convention of manually prepending your commit messages with the card number you’re working on, resulting in commit messages which look something like this:

To make life easier, you can install a Git hook which automatically prepends the Clubhouse ticket number…

A happy duck handling his errors
A duck handling its errors

Given the dynamically typed nature of JavaScript, a problem you may run into with building error handling into your application is how to tell if a given value actually is an error.

Take the following snippet of code:

someFunction() may return an error which was previously caught from within the function. How can we determine if returnedValue is an error?

There are a couple different techniques which we can use, each with their own potential drawbacks.

Duck typing

If it walks like a duck and it quacks like a duck, it’s a duck! The idea here is to…

Carlous Fahmi

Full Stack Software Developer based in London.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store