top of page
Writer's pictureSarah Rashidi

A Watched Pot Never Boils: The Art of Debugging

Updated: Nov 19

Hey there, programmers! Today's blog is for everyone, whether you're a beginner, advanced, or somewhere in between. Regardless of what language you write code in We’ve got you covered. Let's dive into some tips that'll help you boil your pot.


 

What is Debugging?


Simply put debugging is the process of detecting and fixing bugs or errors within your code. It usually happens when your program or software fails to operate correctly [1].


The term "Bug" in computers first came into life in 1947. When Grace Hopper, a famous American computer scientist, mathematician, and United States Navy rear [2] admiral found a moth in Harvard Mark II computer [3].

An actual bug causing the computer to malfunction, can you believe that? Now some argue that the first occurrence of the term "Bug" was in 1878 when Thomas Edison talked about finding a bug in his apparatus in one of his letters [4]. But that's just another Blog for a later time, Now let's get back to our Pot!


 

What are some common methods used for debugging?


Some common methods include the following [5] :


  • Backtracing Techniques

  • Debugging Tools

  • Setting Breakpoints and Stepping

  • Log Analysis for Debugging


We'll be focusing on some common debugging tools and their use cases, and while there are plenty of debugging tools out there, I'll only discuss those that I have personally tried.


1- AWS Cloudwatch for logs


A monitoring and observability service used in DevOps to collect and track metrics, collect and monitor log files, and set alarms. It provides insights into application and infrastructure performance, making it essential for proactive issue resolution and system optimization.


Well, that's just one example of a debugging tool but if you're a beginner or haven't fiddled with AWS before then don't worry about this!


2- VS code Breakpoints


VS Code breakpoints, a powerful debugging feature that allows developers to pause the execution of their code at specific points. This tool is beginner-friendly and widely used across various programming languages. By setting a breakpoint, developers can inspect the state of the application, examine variable values, and step through code line by line, facilitating a deeper understanding of how their code operates and making it easier to identify and fix issues. Beginner-friendly, used by many!


3- Chrome Debugger


The Chrome Debugger, part of Chrome DevTools, is an essential tool for every software developer, providing powerful features to debug JavaScript, inspect the DOM, and view the sequence of executed functions. It allows developers to pause their code, step through it, inspect variables, and see call stacks.


So we've covered some common methods for debugging and went over some common debugging tools but now let's go back to our pot because you might be wondering what a pot has to do with debugging.

 

Let's Boil The Pot!


Let's think of our code or software as a pot; for it to run smoothly, it needs to be bug-free! Now to ensure our pot boils, we must heat it at the right temperature for the right amount of time, right?


But what about our code? While we have covered some common debugging methods and focused on some tools, let's step back a bit and explore some practices you could use in your programming journey ones that I personally use.



1- Going for a walk

A short walk can increase blood flow and re-energize your body.


2- Going for a run

Going for a run could help clear your mind and boost your endorphins for better concentration.


3- Pet a Dog/cat

Petting a dog or a cat helps in releasing calming hormones like oxytocin.


4- Embark a Micro-Adventure

A micro-adventure can spark curiosity and fulfillment.


4- Do Nothing

Embrace doing nothing for a moment to recharge your batteries.


 

Final Thoughts


While there are plenty of ways to deal with errors and bugs, sometimes the simplest one out there is really just stepping back. You can't stick to the computer screen for hours, that's neither good nor healthy.


Remember, a wise man once said, 'A watched pot never boils.' If you keep watching your pot, it will never boil; the same thing applies to programming. Watching will only make you anxious, burnt out, and even more stressed and worried.


Sometimes the best step to take is to step back. And that's how your pot will finally boil. Now, what do you say? Has today's blog been helpful? Well, in case it has, we're waiting on that coffee you brewed.


And always remember, the best brews come from giving the pot some space. Because a watched pot never Boils!

 

References


1. What is Debugging? (n.d.).

Retrieved November 17th 2024 from https://aws.amazon.com/what-is/debugging/


2. Wikipedia contributors. (n.d.). Grace Hopper. In Wikipedia, The Free Encyclopedia. Retrieved November 18th 2024 from https://en.wikipedia.org/wiki/Grace_Hopper


3. National Museum of American History. (n.d.). Logbook with the computer. Retrieved November 17th 2024from https://americanhistory.si.edu/collections/object/nmah_334663


4. Lunduke, B. (n.d.). The story of the first "computer bug"... is a pile of lies. Retrieved November 17th 2024 from https://lunduke.substack.com/p/the-story-of-the-first-computer-bug


5. We Are Brain. (n.d.). 10 effective debugging techniques for developers. Retrieved November 17th 2024 from https://wearebrain.com/blog/10-effective-debugging-techniques-for-developers/


 

And with that, we reach the end of the blog. I hope you had a good read and learned a lot. Stay tuned as we'll cover more tech-related topics in future blogs.


In case of any questions or suggestions, feel free to reach out to me via LinkedIn. I'm always open to fruitful discussions.🍏🦜

Comments


bottom of page