A blog focused on programming, debugging, and refactoring real-world code

// Dev notes

function deploySafely()

if (isFriday()) {

console.warn(“Do not touch production.”);

return;

}

deploy();

}

Dev notes

Code is like a joke. If you have to explain it, it’s bad.


Practical code

Quick coding tips

View your commit history as a graph

Make your commit history visual and easier to follow:

git log --oneline --graph --decorate --all

This command gives you a clean, visual tree of your branches and commits.

GIT: Stash uncommitted changes

Need to switch branches but don’t want to commit yet? This command temporarily saves your work for later:

git stash

Now you can restore your code to the exact state it was in before you stashed it, ready to continue working seamlessly.

git stash pop

The Difference Between == and === in JavaScript

The loose equality operator == in JavaScript automatically converts values to the same type before comparing them.
This can cause unexpected results, so it’s usually better to use the strict equality operator ===

console.log(5 == "5");   
// true - because "5" is converted to a number

console.log(5 === "5");  
// false - because types are different (number vs string)

Blog

Latest posts

Category

JavaScript

Category

Front-end Developer Tools

Category

Linux

Category

CSS