Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Safer Looping with Python's Strict Zip

May 29, 2026

Python's `zip()` function is incredibly useful for pairing up elements from multiple lists. However, a silent bug can creep in if your lists aren't the exact same length—`zip()` will quietly truncate the longer list to match the shorter one, potentially losing important data without throwing an error.

To prevent this, Python 3.10 introduced the `strict=True` argument. By writing `zip(list_a, list_b, strict=True)`, Python will raise a `ValueError` if the iterables are of unequal lengths. It's a tiny change that can save you hours of debugging silent failures in your data pipelines.

Master Multi-Cursor Editing in VS Code

May 29, 2026

If you're still manually editing repetitive lines of code one by one, it's time to unlock the power of multi-cursor editing. In VS Code, you can press `Alt + Click` (or `Option + Click` on Mac) to place cursors in multiple places at once. Even better, highlight a variable or tag and press `Ctrl + D` (or `Cmd + D`) to select the next occurrence of that exact text.

This lets you rename variables, wrap items in tags, or clean up lists in seconds instead of minutes. Once you get the muscle memory down, it feels like having superpowers.

Saving Yourself with Git Reflog

May 29, 2026

We've all been there: you run a destructive command like `git reset --hard` or accidentally delete a branch, and panic sets in. Before you accept defeat, remember that Git rarely actually deletes anything immediately. It keeps a secret history of every single action you take locally in a tool called the reflog.

Just type `git reflog` in your terminal to see a list of your recent movements, even the ones you thought you lost. Once you find the commit hash from right before your mistake, you can run `git reset --hard <commit-hash>` to bring your code back from the dead. It's the ultimate undo button for Git.

Supercharge Your Editing with VS Code's Multi-Cursor Magic

May 29, 2026

If you're still manually renaming variables or editing identical lines of code one by one, it's time to embrace multi-cursor editing. In VS Code, simply highlight a word and hit Ctrl+D (or Cmd+D on Mac) to automatically select the next occurrence of that word. Each press adds a new cursor, allowing you to edit all of them simultaneously.

If you want to select all occurrences at once, use Ctrl+F2 (or Cmd+F2). It's a massive timesaver that keeps you in the flow and prevents the tedious copy-paste cycle.

Stop Writing print('var =', var) in Python

May 29, 2026

We've all been there: quickly sprinkling print statements throughout our code to see what a variable holds during runtime. But writing 'print(f"user_id: {user_id}")' over and over gets tedious. Next time, try the f-string shortcut by adding an equals sign after the variable name: 'print(f"{user_id=}")'.

This will automatically output both the variable name and its value (for example, 'user_id=42'), saving you keystrokes and making your quick-and-dirty debugging sessions much faster. It even works with expressions, like 'print(f"{len(users)=}")'!

Master the Art of Selective Commits with 'git add -p'

May 29, 2026

Ever finished a long coding session only to realize you've written three different features, fixed a bug, and left a bunch of debug console.log statements in a single file? Instead of committing everything in one massive, chaotic dump, use 'git add -p' (or '--patch'). This command lets you review your changes hunk by hunk, deciding exactly what goes into the staging area and what stays out.

It's like having a final code review with yourself before making things official. You can stage the actual feature, discard the debug statements, and keep your git history incredibly clean and readable for your team.

Prevent silent bugs with Python's strict zip

May 28, 2026

Python's built-in `zip()` function is incredibly handy for looping over two lists at the same time. However, there's a sneaky trap: if your lists are of unequal lengths, `zip()` will silently truncate the longer list to match the shorter one, potentially hiding bugs in your data pipeline.

Starting in Python 3.10, you can pass the `strict=True` argument to your `zip()` calls. This forces Python to raise a `ValueError` if the iterables aren't the exact same length. It's a simple, defensive coding habit that ensures your data remains aligned and your bugs get caught early.

Master the multi-cursor magic in VS Code

May 28, 2026

If you find yourself manually changing a variable name or adding formatting to fifteen lines of code in a row, you're doing too much manual labor. VS Code has a brilliant multi-cursor feature that lets you edit multiple lines simultaneously. Just hold `Alt` (or `Option` on Mac) and click wherever you want to add a cursor.

Even better, if you want to select other occurrences of a highlighted word, press `Ctrl+D` (or `Cmd+D` on Mac) repeatedly to select them one by one, or `Ctrl+Shift+L` to select all of them at once. It turns tedious refactoring tasks into a satisfying, two-second shortcut.

Lost your commits? Git reflog to the rescue!

May 28, 2026

We've all been there: you perform a force push, a messy rebase, or accidentally delete a local branch, and suddenly your hard work seems gone forever. Before you panic, run `git reflog` in your terminal. Git keeps a silent, chronological diary of almost every action you take locally, even if those commits are no longer attached to any active branch.

Once you find the commit hash of your lost work in the reflog list, you can easily resurrect it by running `git checkout <commit-hash>` or creating a new branch from that point. It's the ultimate safety net that will save your skin more than once.

Speed Up Formatting with VS Code's Multi-Cursor Modifier

May 28, 2026

Instead of manually editing repetitive lines of code one by one, leverage VS Code's multi-cursor capability to do it all at once. By holding down `Alt` (or `Option` on Mac) and clicking in multiple places, you can place multiple cursors and type simultaneously.

For even faster editing, select a variable name and press `Ctrl+D` (or `Cmd+D` on Mac) to select the next occurrence of that word. It's a massive time-saver when you need to rename local variables, wrap multiple items in quotes, or format a quick list of static data.

Quick Debugging in Python with f-string Self-Documenting Expressions

May 28, 2026

If you still find yourself writing `print(f"user_id: {user_id}")` to debug your Python code, there's a much cleaner way. Since Python 3.8, you can add an equals sign `=` inside the curly braces of your f-string to print both the expression and its evaluated value.

Simply write `print(f"{user_id=}")` and Python will automatically output `user_id='12345'`. It works for expressions and function calls too, saving you a ton of keystrokes during quick debugging sessions.

Master Selective Commits with git add -p

May 28, 2026

Ever finished a long coding session only to realize your working directory is a mess of different logical changes? Instead of staging everything at once with `git add .`, try using `git add -p` (or `--patch`). This command runs an interactive session that steps through your changes hunk by hunk, letting you decide exactly what goes into the next commit.

You can stage a specific change, skip it, or even split a large hunk into smaller pieces. It's an absolute game-changer for keeping your commit history clean, readable, and easy to review during pull requests.

Level Up Your JS with Logical Assignment Operators

May 27, 2026

If you are still writing `if (!settings.theme) settings.theme = 'dark';` or even `settings.theme = settings.theme || 'dark';`, it is time to simplify. Modern JavaScript gives us logical assignment operators that combine logical operations with assignment in a clean, readable way.

By using `settings.theme ||= 'dark'`, you only assign 'dark' if `settings.theme` is falsy. Even better, use the nullish coalescing assignment operator (`??=`) to only assign a value if the variable is strictly `null` or `undefined`. This prevents pesky bugs where valid falsy values, like `0` or an empty string, accidentally get overwritten.

Master the Multi-Cursor Skip in VS Code

May 27, 2026

Most devs know that pressing `Ctrl+D` (or `Cmd+D` on macOS) selects the next occurrence of the highlighted word. It’s a game-changer for quick renaming. But what happens when you accidentally select a variable you didn't want to change?

Instead of hitting escape and starting all over, you can use `Ctrl+K` followed by `Ctrl+D` (or `Cmd+K` then `Cmd+D` on Mac). This nifty combo skips the currently highlighted occurrence and jumps straight to the next one, keeping your other selections intact. It's a massive time-saver when refactoring.

Clean Up Your Commit History Effortlessly with Git Fixups

May 27, 2026

We've all been there: you submit a pull request, notice a tiny typo, and end up making a commit named "fix typo" or "temp." Instead of cluttering your git history, try using `git commit --fixup [commit-hash]` when committing the fix. This marks your new change as a fixup of that specific older commit.

When you're ready to clean things up before merging, run `git rebase -i --autosquash origin/main`. Git will automatically organize your interactive rebase todo list, placing the fixup commits directly beneath their parent commits and marking them to be melted in. It keeps your commit history pristine without the manual drag-and-drop headache.

Quick and Dirty Python Debugging with the f-string '=' Shortcut

May 27, 2026

We've all been there: sprinkling 'print()' statements all over our Python code to figure out why a variable isn't what we expect. Instead of typing 'print(f"user_id: {user_id}")', save yourself some keystrokes by using the '=' shortcut inside your f-string. Simply write 'print(f"{user_id=}")'.

Python will automatically expand this to print both the variable name and its evaluated value, outputting 'user_id=42'. It even works for expressions, like 'print(f"{len(users)=}")'. It's a small, built-in trick that makes quick print-debugging much faster and cleaner.

Speed Up Repetitive Editing with VS Code's Multi-Cursor Power

May 27, 2026

If you find yourself manually changing a list of variables or adding the same wrapper to ten different lines of code, stop! In VS Code, you can place multiple cursors by holding 'Alt' (or 'Option' on Mac) and clicking where you want to edit. If you need to select a vertical block of text, hold 'Shift + Alt' (or 'Shift + Option' on Mac) and drag your mouse.

Combining this with keyboard shortcuts like 'Ctrl + D' (or 'Cmd + D' on Mac) to select the next occurrence of the current word will make you feel like you have superpowers. You can edit dozens of lines simultaneously in seconds, saving your wrists from repetitive strain.

Master the Art of Selective Commits with Git Patch

May 27, 2026

Ever finished a long coding session only to realize you've written three different features and a hotfix all in the same files? Instead of committing one giant, chaotic mess, use 'git add -p' (or '--patch'). This command takes you through your changes chunk by chunk, letting you decide whether to stage, skip, or even split each specific modification.

It's a fantastic way to keep your commit history clean, readable, and easy to roll back if something goes wrong. Plus, reviewing your code line-by-line before staging acts as a great final self-review to catch silly mistakes before they ever reach your repository.

The Easiest Way to Debug Python with F-Strings

May 26, 2026

We’ve all been there: sprinkling `print()` statements throughout our code to see what a variable holds. If you're using Python 3.8 or newer, there's a neat shortcut built right into f-strings. Instead of writing `print(f"user_id = {user_id}")`, you can just write `print(f"{user_id=}")`.

Adding that trailing equal sign tells Python to print both the expression itself and its evaluated value. It saves a ton of typing and keeps your quick-and-dirty debugging sessions incredibly clean.

Speed Up Formatting with VS Code's Multi-Cursor Modifier

May 26, 2026

If you’re still manually editing repetitive lines of code one by one, it's time to unlock the power of multi-cursors. In VS Code, holding `Alt` (on Windows/Linux) or `Option` (on macOS) while clicking lets you place cursors in multiple locations simultaneously.

Even better, you can select a variable, press `Ctrl+D` (or `Cmd+D` on Mac) to select its next occurrence, and edit them all at once. It’s like search-and-replace, but with instant visual feedback and much less risk of breaking unrelated code.

Master Git's Interactive Staging for Cleaner Commits

May 26, 2026

Ever find yourself with a giant file of changes, but you only want to commit a few specific lines? Instead of committing the whole mess, use `git add -p` (or `--patch`). This opens an interactive prompt that lets you review each change "hunk" individually. You can stage it, skip it, or even split it into smaller pieces.

It’s a lifesaver for keeping your pull requests clean and focused, especially when you've snuck in a few unrelated console logs or formatting tweaks during your coding session.

Prevent Silent Bugs with Python's Strict Zip

May 26, 2026

Python's built-in "zip()" function is incredibly useful for pairing up elements from multiple iterables. However, its default behavior has a sneaky trap: if your lists are of different lengths, it will silently truncate the output to match the shortest list. This can mask data-mismatch bugs that are incredibly hard to track down in production.

Starting in Python 3.10, you can pass the "strict=True" argument to "zip()". If the iterables aren't of equal length, Python will immediately raise a "ValueError" instead of silently dropping data. It's a tiny change that adds a massive layer of safety to your data processing pipelines.

Stop Using Find-and-Replace to Rename Variables

May 26, 2026

We've all been there: you want to rename a variable, so you hit "Ctrl+F" (or "Cmd+F"), type the old name, and replace it across the file. But then you accidentally rename a completely unrelated variable, or worse, a string literal that just happened to contain the same characters. In VS Code, simply put your cursor on the variable and hit "F2".

This triggers the "Rename Symbol" feature. It understands the abstract syntax tree of your code, meaning it will only rename actual references to that specific variable, function, or class, leaving identical-looking strings and comments completely untouched. It's safer, faster, and even works across multiple files in your workspace.

Master the Art of Selective Git Commits

May 26, 2026

Ever finished a long coding session only to realize you've written three different features and a couple of random bug fixes, all in the same files? Instead of staging everything at once, use "git add -p" (or "--patch"). This handy command lets you review your changes chunk by chunk, allowing you to selectively stage only the lines of code that belong to a specific logical change.

By splitting your work into smaller, cohesive commits, you'll make your pull requests much easier to review, and your future self will thank you when you're trying to track down a bug using "git bisect" later on.

Prevent Silent Bugs in Python with `strict=True`

May 25, 2026

Python's `zip()` function is incredibly handy for looping over two lists simultaneously. However, there's a sneaky trap: if your lists are of unequal length, `zip()` will silently stop at the end of the shortest one, discarding the extra elements from the longer list without warning. This can lead to hard-to-find bugs in your data processing pipelines.

If you're using Python 3.10 or newer, you can pass the `strict=True` argument (e.g., `zip(names, ages, strict=True)`). This forces Python to raise a `ValueError` if the iterables aren't the exact same length, saving you from silent data loss.

Multi-Cursor Magic in VS Code

May 25, 2026

If you aren't using multi-cursor editing in VS Code, you're missing out on a serious productivity superpower. Instead of manually editing ten lines of repetitive code, press Option+Click (Mac) or Alt+Click (Windows/Linux) to place cursors in multiple locations at once. Even better, highlight a word and press Cmd+D or Ctrl+D to select its next occurrence, allowing you to edit all of them simultaneously.

This lets you rename variables, refactor HTML tags, or format lists of data in seconds. Once you get the muscle memory down, you'll wonder how you ever coded without it.

Master the Art of Laser-Focused Commits with `git add -p`

May 25, 2026

Ever finished a long coding session only to realize you've written three different features and a couple of bug fixes all in the same files? Instead of dumping everything into one massive, messy commit, use `git add -p` (or `--patch`). This command runs an interactive prompt that lets you review your changes chunk by chunk (called "hunks") and decide whether to stage them, skip them, or even split them further.

It's a fantastic habit that keeps your pull requests clean, makes code reviews a breeze, and saves your future self a ton of headaches if you ever need to revert a specific change without breaking everything else.

The Easiest Way to Debug Python with F-Strings

May 25, 2026

If you still use print("x =", x) to debug your Python code, there's a much cleaner shortcut built right into f-strings since Python 3.8. You can simply put an equals sign (=) after your variable name inside the curly braces.

For example, writing print(f"{user_id=}") will automatically output user_id='12345'. It prints both the variable name and its value, saving you from writing repetitive labels. It even works with expressions, like f"{len(my_list)=}"!

Speed Up Your Editing with VS Code's Multi-Cursor Magic

May 25, 2026

If you find yourself manually editing ten lines of similar code one by one, stop right there! VS Code has a brilliant shortcut to help you edit multiple lines simultaneously. Simply select a word or a variable and press Ctrl+D (Windows/Linux) or Cmd+D (macOS) to select the next occurrence of that exact text.

Keep pressing it to select as many as you need, and you'll get a cursor at every single one. From there, you can type, delete, or navigate all of them at once. If you want to select all occurrences instantly, use Ctrl+Shift+L or Cmd+Shift+L. It saves so much tedious typing time.

Master Git Interactive Staging for Cleaner Commits

May 25, 2026

We’ve all been there: you’re working on a feature, get distracted, fix a couple of typos in another file, and add some temporary debug logs. Now you have a giant mess of changes to commit. Instead of committing everything at once or meticulously copy-pasting code, try using git add -p (or git add --patch).

This command lets you review your changes chunk by chunk. Git will show you a "hunk" of code and ask if you want to stage it, skip it, or even split it into smaller pieces. It’s a game-changer for keeping your pull requests clean, focused, and incredibly easy for your team to review.

Safer Looping with Python's Strict Zip

May 24, 2026

We all love using Python's `zip()` function to loop through multiple lists at the same time. But here is a silent bug waiting to happen: by default, if your lists are of different lengths, `zip()` will quietly stop at the end of the shortest list, completely ignoring the extra elements in the longer one.

Starting in Python 3.10, you can pass the `strict=True` argument (like `zip(names, ages, strict=True)`). This forces Python to raise a `ValueError` if the iterables aren't of equal length. It's a tiny addition that saves you from hours of debugging silent data omissions down the road.

Master the Multi-Cursor in VS Code

May 24, 2026

If you find yourself manually changing a list of variables or adding quotes to twenty different strings line-by-line, it's time to let your editor do the heavy lifting. In VS Code, holding `Alt` (or `Option` on Mac) while clicking lets you place multiple cursors anywhere on your screen, allowing you to type in several places at once.

Want to speed it up even more? Highlight a word and press `Ctrl+D` (or `Cmd+D`) to select the next occurrence of that exact word. You can keep pressing it to select all instances, then edit them all simultaneously. It saves an incredible amount of time and keeps you in your flow state.

Saved by the Git Reflog

May 24, 2026

Ever accidentally hard-reset your branch, deleted a commit you actually needed, or got completely lost during a messy rebase? Before you panic and start re-writing code from memory, take a deep breath and run `git reflog` in your terminal.

Git keeps a silent, chronological diary of almost every action you take locally—even things that aren't on any current branch. Once you find the commit hash of your lost work in the reflog list, you can easily bring it back to life with `git checkout <commit-hash>` or `git cherry-pick`. It’s the ultimate safety net you hope you never need, but are incredibly glad exists when you do.

Speed Up Repetitive Edits with VS Code's Multi-Cursor Magic

May 24, 2026

Stop manually editing dozens of lines of redundant HTML or JSON. In VS Code, you can quickly place cursors on all occurrences of a selected word by pressing `Ctrl+D` (Windows/Linux) or `Cmd+D` (macOS) repeatedly. If you want to select every instance in the entire file instantly, use `Ctrl+Shift+L` or `Cmd+Shift+L`.

Once selected, you can type, delete, or navigate all lines simultaneously. It's like having a macro without any of the setup, transforming what would be a tedious ten-minute chore into a two-second keystroke.

Supercharge Your Python Debugging with f-String Self-Documenting Expressions

May 24, 2026

We've all written quick print statements like `print(f'user_id: {user_id}')` to debug our code. Python 3.8 introduced a brilliant shorthand that makes this much faster: just add an equals sign `=` inside the curly braces.

Writing `print(f'{user_id=}')` will automatically output both the variable name and its value, formatted as `user_id=123`. It even preserves whitespace and works with expressions, like `f'{user.get_name()=}'`. It's a tiny syntax trick that saves thousands of keystrokes over a project's lifetime.

Master Git's Interactive Staging for Cleaner Commits

May 24, 2026

Ever find yourself ready to commit, but you've made changes across three different features in the same file? Instead of committing everything at once and writing a messy commit message, use `git add -p` (or `--patch`). This command lets you review your changes block by block (or 'hunk') and decide whether to stage it, skip it, or even split it into smaller pieces.

It keeps your pull requests incredibly clean and makes rolling back specific changes a breeze. Your team will thank you for the highly focused, readable commit history.

Avoid Silent Bugs with Python's Strict Zip

May 23, 2026

Python's built-in `zip()` function is incredibly useful for pairing up elements from two lists, but it has a dangerous default behavior: if one list is shorter than the other, it silently truncates the longer list. This can lead to hard-to-track bugs where data just vanishes.

Starting in Python 3.10, you can pass the `strict=True` argument to `zip()`. If the iterables aren't the exact same length, it immediately raises a `ValueError` instead of quietly failing. It’s a simple flag that saves you hours of debugging down the road.

Declutter Your Mind with VS Code Profiles

May 23, 2026

If you use VS Code for everything from heavy backend development to writing markdown notes or presenting, your editor can get incredibly bloated with extensions and custom settings. You can solve this by using VS Code Profiles (click the gear icon in the bottom left).

Profiles let you save distinct sets of extensions, settings, keyboard shortcuts, and UI layouts. You can have a lightweight "Markdown" profile, a distraction-free "Focus" profile, and a fully loaded "Full-Stack" profile. It keeps your workspace fast, organized, and tailored to the exact task at hand.

Clean Up Your Commits with Git Autosquash

May 23, 2026

Ever found yourself making tiny typo-fix commits right after opening a PR? Instead of manually rebasing and renaming them, try using `git commit --fixup <commit-hash>`. This marks your new change as a fixup of an older commit.

When you're ready to clean up, run `git rebase -i --autosquash <branch-base>`. Git will automatically arrange your commits and merge the fixups into their targets without you having to manually move lines around in the interactive editor. It keeps your git history pristine and your reviewers happy.

Stop Using OR (||) for Default Values in JavaScript

May 23, 2026

When setting default values in JavaScript, it's common to see developers use the logical OR operator like this: 'const port = process.env.PORT || 3000'. While this works fine for falsy values like undefined or null, it can cause subtle bugs when your valid data is actually 0, false, or an empty string—all of which are also falsy and will get overridden by your default. Instead, reach for the nullish coalescing operator (??). It specifically checks only for null or undefined, allowing actual falsy values like 0 or false to pass through safely. Your configuration objects will thank you.

Mastering Git's Interactive Patch Mode

May 23, 2026

We've all been there: you've spent the last hour writing great code, but you also sprinkled in some temporary console logs and formatting changes that shouldn't go into your final commit. Instead of committing everything or manually reverting files, try using 'git add -p' (or '--patch'). This command launches an interactive prompt that lets you review your changes chunk by chunk ('hunks') and decide whether to stage, skip, or even split them. It's a fantastic way to keep your commits clean, focused, and free of debugging leftovers without losing your train of thought.

The Power of Multi-Cursor Editing in VS Code

May 23, 2026

If you find yourself manually editing a list of items or renaming variables across multiple lines, you're missing out on one of VS Code's best productivity boosters. By holding down Alt (or Option on macOS) and clicking, you can place multiple cursors anywhere in your file. Want to edit a perfect vertical block? Hold Shift + Alt (or Shift + Option on macOS) and drag your mouse. This lets you write, delete, or paste across dozens of lines simultaneously, turning tedious refactoring tasks into a three-second win.

Master Selective Commits with Git Add Patch

May 22, 2026

Ever finished a long coding session and realized you've written code for three different features, but you want to keep your commit history clean? Instead of committing everything at once, use `git add -p` (or `--patch`). This command runs an interactive session that walks you through every single change in your workspace, letting you decide whether to stage it, skip it, or even split a change into smaller pieces.

It's a lifesaver for keeping your pull requests focused and easy to review. Your future self—and your teammates—will thank you for commits that actually match their commit messages.

Speed Up Repetitive Editing with VS Code Multi-Cursors

May 22, 2026

If you find yourself manually editing ten lines of HTML or renaming variables in a mock data array one by one, stop! VS Code has a super handy shortcut to place cursors at all occurrences of your current selection. Just highlight the word you want to change and press `Ctrl+D` (Windows/Linux) or `Cmd+D` (macOS) to select the next match. Keep pressing it to add more cursors, then type once to edit them all simultaneously.

If you want to select *every* occurrence in the file instantly, use `Ctrl+Shift+L` or `Cmd+Shift+L`. It turns tedious, error-prone editing into a five-second task.

The Hidden Debugging Shortcut in Python F-Strings

May 22, 2026

We've all written quick print statements like `print(f"user_id: {user_id}")` to debug our Python code. But there is a much cleaner, built-in shortcut that saves you from typing out the variable name twice. If you add an equal sign `=` inside the curly braces after the variable name, Python will automatically print both the expression and its evaluated value.

For example, `print(f"{user_id=}")` will output `user_id=42`. It even preserves whitespace and works with expressions, like `f"{len(users)=}"`. It’s a tiny syntax trick that makes quick-and-dirty debugging incredibly satisfying.

Prevent Silent Bugs with Python's Strict Zip

May 22, 2026

Python's `zip()` function is incredibly handy for looping through multiple lists at the same time. However, a silent gotcha is that if your lists are of different lengths, `zip()` will quietly stop at the shortest one, discarding the extra elements from the longer list without warning.

If you are using Python 3.10 or newer, you can prevent this silent data loss by adding the `strict=True` argument (e.g., `zip(names, ages, strict=True)`). This forces Python to raise a `ValueError` if the iterables aren't of equal length, saving you from hours of debugging mysterious missing data.

Speed Up Formatting with Multi-Cursor Magic in VS Code

May 22, 2026

Writing repetitive code or manually editing a long list of variables can feel like a chore. Instead of clicking and typing on every single line, leverage VS Code’s multi-cursor power. You can hold `Alt` (or `Option` on Mac) and click in multiple places to type in all of them at once.

Even better, if you want to edit all occurrences of a highlighted word, just press `Ctrl + D` (or `Cmd + D` on Mac) repeatedly to select the next matches one by one. If you want to select *all* matches instantly, use `Ctrl + Shift + L` (or `Cmd + Shift + L`). It's a massive time-saver for quick refactoring.

Rescue Your Lost Commits with Git Reflog

May 22, 2026

Ever accidentally hard-reset your branch or deleted a commit you desperately needed back? Don't panic just yet. Git rarely actually deletes anything immediately. It keeps a silent, behind-the-scenes diary of every single move you make called the "reflog."

By running `git reflog` in your terminal, you'll see a chronological list of all your recent actions, including checkouts, commits, and resets. Find the commit hash right before the disaster happened, run `git checkout [hash]` or `git reset --hard [hash]`, and just like that, you've traveled back in time to save your work.

Saved by the Git Reflog

May 21, 2026

Ever accidentally hard-reset your branch or deleted a commit you desperately needed back? Before you panic and start rewriting code from memory, meet `git reflog`. Think of it as Git's safety net—it records every single movement of your HEAD, even the ones that aren't part of your commit history anymore.

Just run `git reflog` in your terminal to see a chronological list of your recent actions. Once you find the commit hash where your lost code still existed, you can bring it back to life using `git checkout <commit-hash>` or cherry-pick it back into your current branch. It's an absolute lifesaver.

Master the Multi-Cursor in VS Code

May 21, 2026

If you're manually editing repetitive lines of code one by one, you're losing valuable time. VS Code has incredibly powerful multi-cursor editing that can turn minutes of tedious work into seconds.

Try holding Option (on Mac) or Alt (on Windows/Linux) and clicking in multiple places to type in several spots at once. Need to select a vertical block? Hold Shift + Option and drag your mouse. Combined with keyboard shortcuts like Cmd/Ctrl + D to select the next occurrence of a highlighted word, you'll feel like you're writing code in fast-forward.