Love Coding
A blog focused on programming, debugging, and refactoring real-world code
function deploySafely()
if (isFriday()) {
console.warn(“Do not touch production.”);
return;
}
deploy();
}
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)
Categories
CSS
Styling tips and techniques to create beautiful, responsive web designs
7 postsFront-end Developer Tools
Essential tools and workflows to boost your front-end productivity.
2 postsHTML
Best practices for writing clean, accessible, and semantic markup
12 postsJavaScript
Modern guides and tips for dynamic, interactive web development
3 postsLinux
Developer-focused tutorials for mastering Linux and the command line
1 postPHP
Practical tips for building powerful and secure web applications
4 postsProgrammers mindset
Improve your problem-solving, focus, and growth as a developer
0 postsPrzykładowe projekty juniora
7 postsReact
Learn to build fast, reusable UI components with React
12 postsReact Native
Guides to creating cross-platform mobile apps with React Native
4 postsWordPress Development
Advanced tips for customizing and optimizing WordPress sites
Blog
Latest posts
jQuery infinite scroll image gallery
Infinite scroll gallery is a simple and difficult task at the same time. It all depends on how you want…
React Hooks – useCallback hook example with React.memo higher-order component
UseCallback, same as useMemo hook, is useful in situation, when you want to improve performance of your app. Thanks to…
React Hooks – useMemo hook example
UseMemo hook returns memoized value. That’s why you can use it to optimize performance of your app. If you have…
React Hooks – useRef hook example
UseRef hook can be used in two ways. First, it allows to directly access to DOM element, so we can…
React Hooks – useEffect hook example
UseEffect hook runs after first render and after every other completed render (but we can change that, so it can…
React Hooks – useContext hook example
UseContext hook provides a way to pass data through the component tree without having to pass props down manually at…
Category
JavaScript
Category
Front-end Developer Tools
Category
Linux
Category