Publishing scoped packages to npm
Publishing scoped packages to npm

I’m a pretty big fan of the npm registry. For many developers, especially those coming from bootcamp backgrounds, being introduced to Node and NPM is a pivotal moment.

Let’s take a look at how we can go about adding a scoped package to NPM using Node.js and TypeScript.

The Plan

The idea here is to be able to install and use our own npm package under the scope of your npm username. e.g npm install @user/package

We can just as easily configure an existing project. However if this is new to you, it may prove more beneficial to test this concept in…

A step-by-step guide for navigating through the unavoidable pull request.

Managing Accidental Pull Requests
Managing Accidental Pull Requests
Managing Accidental Pull Requests

Before we talk about how to resolve this issue, let us first address what is happening here and why it is actually intended to be a safety net implemented to protect the branch.

What happened?

If we read the hint carefully, it is telling us that something has changed upstream. Basically, changes have been made to the remote branch we are pushing to so we are no longer up-to-date on our local version. Git will advise us to address this issue before we proceed, so let’s do that!

How can I fix it?

This can be broken up into 6 steps, it is worth getting familiar with…

A day one guide to getting started and feeling comfortable working with Git

Generally I would advise against prioritizing the memorization of any particular syntax right away, however if you are looking to make your way into the Tech industry in 2021 and beyond, you will almost certainly encounter some sort of version control system and well.. it’s always better to be prepared right?

Before we dive into this, it’s important to understand what Git is and why we use it in order to be effective with it. It’s also important to note that Git is not the same thing as GitHub or GitLab.

Git has been the cool kid on the block…

Let’s demonstrate the practical use of GET requests using the Fetch API to build an application that generates pictures of dogs based on specific breeds.

Fetch Photo by Julissa Helmuth from Pexels
Fetch Photo by Julissa Helmuth from Pexels
Photo by Julissa Helmuth from Pexels

Why Use 3rd Party APIs?

Think about the last time you saw a map while visiting a web site. There’s a good chance that map was outsourced using a 3rd Party API such as Google Maps or ESRI.

There’s any number of reasons a developer would opt for a 3rd party API over building the service from scratch. The most obvious being someone else has already done the heavy lifting for us.

Brief Introduction to the Fetch API

The fetch API returns a Promise and is…

Let’s walk through how to set up husky and lint-staged to run our linters before writing commits.

stop sign to suggest how we will prevent a bad commit
stop sign to suggest how we will prevent a bad commit

Before we begin

I should mention these resources have excellent documentation on how to do everything we will do here, I’ve simply complied them together for our convenience.

Official Docs for Husky, Lint-Staged, ESLint and Prettier

Initialize Git, Node.js and Install devDependencies

From within the terminal we will initialize a new project with version control and Node.js.

$ git init && npm init -y 
$ npm i husky lint-staged eslint prettier -D

Configure ESLint

Next we can create an ESLint configuration file. Go ahead and add a new file titled.eslintrc.js

The calculator is often seen as one of the more trivial, beginner friendly applications to build. Today we will walk through how we can validate inputs being passed to the calculator to ensure we have a valid mathematical equation.

Photo by Karolina Grabowska from Pexels
Photo by Karolina Grabowska from Pexels

Getting Started

If you are here to follow along, you can grab a copy of the starter code here. which includes the HTML, CSS and JavaScript I will be referring to through out.

Build the calculator buttons

Let’s begin by creating the calculator’s buttons. We could hard code our buttons using HTML, however I would rather use vanilla JavaScript to avoid writing repetitious code.

First let’s loop through the array containing the button values. Within our loop, we can create a new button and append it to the DOM.

We’ve created a function that builds the buttons for the calculator

Let’s recap what we’ve just done…


As software developers, it’s quite common we find ourselves in unfamiliar scenarios. Here are a few quick approaches I take when debugging web applications to keep the ball rolling.

debugging web applications
debugging web applications
Photo by from Pexels

Identify the problem

Sounds pretty straightforward right? It’s often the most simple things that we tend to overlook.

If I were to ask you right now, to identify the problem would you be able to?

Years ago my mentor presented me with the Rubber Ducky concept where, for those unfamiliar is to speak with an inanimate object as if it were listening. The idea behind this concept is to essentially discuss and break down your current problem into smaller problems until all that you are left with is an actionable step.

Print everything

I tend to see Juniors overlook this one the most. We often…

Nobody likes spaghetti code. The Array with inconsistent quotations for a lack of better purpose is hardly acceptable and the console riddled with “hi” will certainly appear amateurish, if not unfinished at best.

Clearly, I am a good practices advocate, but with a good cause. I have reviewed 1000’s of PR’s from countless aspiring developers and it’s safe to say the standard for consistency is rising. …

Matthew Bub

Full Stack Web Developer | Good Practices Advocate

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