• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Twitter GitHub

JavaScript Or (||) Versus Nullish Coalescing Operator (??)

Last updated on April 8, 2021 by Sal Ferrarello

The “or” (||) operator and the “nullish coalescing operator” (??) can often be used in similar ways when reading a property from an object that may or may not exist. When dealing with strings you’re typically better off using “or” (||) and for numbers you’re typically better off using the “nullish coalescing operator” (??).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Recommendations Tagged With: JavaScript

SemVer TLDR

Last updated on April 3, 2021 by Sal Ferrarello

Semantic versioning (SemVer) is a standard for defining the version numbers. A version number consists of three numbers separated by periods (X.Y.Z). The type of change being introduced (e.g. a new feature or a change that breaks backwards compatibility) determines which numbers are incremented.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Programming, Recommendations Tagged With: composer, npm, semver

Git alias 'git open-pr-github' and the webpage it opens to.

Git Alias Open Pull Request on GitHub

Last updated on March 29, 2021 by Sal Ferrarello

I want to be able to type “git open-github-pr” and have my browser open to the GitHub URL to create a Pull Request (PR) for my current branch on the current project I’m working on. Here is how I built this.

Filed Under: Dev Tips, Solution Tagged With: Git, git alias, GitHub

Your edited hunk does not apply

Last updated on March 24, 2021 by Sal Ferrarello

When using git add -p and faced with a hunk that can not be split sufficiently for your purposes, you can use the e option (manually edit the current hunk). Unfortunately, after manually editing the current hunk it is common to get the message “Your edited hunk does not apply.” I’ve found there are some things I can do to avoid this failure.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Git

Writing Posts with CLI Commands

Last updated on March 1, 2021 by Sal Ferrarello

A lot of the posts I write include command-line interface (CLI) commands to type in. I’ve found over time there are things I can do to improve how these commands are communicated.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Presentation, Recommendations Tagged With: blogging, command line, website

Clue Board Game Exhibitionist Gambit

Last updated on March 1, 2021 by Sal Ferrarello

In the Clue Board Game (a.k.a. Cluedo), the Exhibitionist Gambit is when you suggest three cards in your own hand.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Game Theory Tagged With: Board Game

Building blocks representing two Git branches, one with a merge commit where the top commit has two parents.

Git Merge Commit with Blocks

Last updated on March 4, 2021 by Sal Ferrarello

We can’t do a fast-forward merge when the most recent commit on the receiving branch does not appear in the branch we are merging in. One of our options in this situation is to create a merge commit when we merge in our branch.

Filed Under: Dev Tips, Programming Tagged With: Git

Should I add .env to .gitignore?

Last updated on February 11, 2021 by Sal Ferrarello

The short answer is, “yes”. You should use your .gitignore file to ignore the .env file.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

.gitignore Hidden Files with Exceptions

Last updated on February 13, 2021 by Sal Ferrarello

In most operating systems by default, files that start with a period (.) are hidden. When setting up my .gitignore file, I like to ignore all these hidden files (with a few exceptions).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

Starter .gitignore file

Last updated on February 11, 2021 by Sal Ferrarello

This is my general starter .gitignore file for projects. I have a separate .gitignore for WordPress websites.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 35
  • Next Page»

Copyright © 2021 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in