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 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…
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.
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!
This can be broken up into 6 steps, it is worth getting familiar with…
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.
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.
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.
Let’s walk through how to set up husky and lint-staged to run our linters before writing commits.
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.
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
Next we can create an ESLint configuration file. Go ahead and add a new file titled
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.
Let’s recap what we’ve just done…
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.
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. …
Full Stack Web Developer | Good Practices Advocate