Debugging code can be frustrating, especially when you’ve stared at your screen for hours and still can’t figure out what’s wrong. But what if the key to solving your bug was sitting right on your desk—a rubber duck ? 🦆 Yes, you read that right! Rubber Duck Debugging is a powerful technique used by developers worldwide to debug their code simply by explaining it—often to a rubber duck or any other inanimate object. Let’s dive into how this works and why it’s so effective. What is Rubber Duck Debugging? Rubber Duck Debugging is a problem-solving method where you explain your code, line by line, as if you were teaching it to someone who knows nothing about programming. The catch? That “someone” can be a rubber duck , a stuffed toy, or even an imaginary friend. The term originated from the book The Pragmatic Programmer by Andrew Hunt and David Thomas, where a programmer carried around a rubber duck and explained code to it whenever they faced an issue. How to Use Rubber Duck Debug...
Tracking down a bug in a large codebase can be frustrating. **Git bisect** helps by using a binary search to quickly find the exact commit that introduced the issue. ## Step 1: Start Git Bisect Begin by starting bisect mode: ```sh git bisect start ``` ## Step 2: Mark a Good and Bad Commit Specify a known working commit: ```sh git bisect good a1b2c3d ``` Mark the current commit (where the bug exists) as bad: ```sh git bisect bad ``` ## Step 3: Test and Mark Commits Git checks out a middle commit. Run your app and test it: ```sh ./gradlew bootRun ``` If the bug exists: ```sh git bisect bad ``` If the bug is not present: ```sh git bisect good ``` ## Step 4: Find the Bad Commit Once Git finds the problematic commit, it displays: ```sh 1234567 is the first bad commit ``` ## Step 5: Reset Git Bisect Once the issue is identified, reset bisect mode: ```sh git bisect reset ``` ## Conclusion Using **git bisect** can save you hours when debugging! Instead of checking each commit manually, bisect ...