Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Thought Record for Debugging Focus: When You Have Been Staring at the Same Bug for 3 Hours

The Thought Record for Debugging Focus: When You've Been Staring at the Same Bug for 3 Hours Published on Dev.to | Tags: cbt, mentalhealth, productivity, debugging You've been staring at the same bug for 3 hours. The stack trace is burned into your retinas. Your coffee is cold. And the thought that keeps looping in your head: "I'll never figure this out. I'm a terrible developer." If this sounds…

Dealing with a stubborn bug for over three hours can be frustrating. The code that caused the error is burned into your mind, and the cold coffee adds to the discomfort. The constant loop of thoughts such as "I won't figure this out" and "I'm a terrible developer" can be mentally exhausting. However, these feelings are not signs of incompetence, but rather symptoms of catastrophic thinking.

When you're stuck for hours, your brain perceives the issue as a personal failure. You might think "I should know this" or "This bug is targeting me," which can lead to feelings of inadequacy. It's important to recognize these thought patterns as cognitive distortions, which are not necessarily true.

Cognitive Behavioral Therapy (CBT) offers techniques to identify and reframe these thoughts. One such tool is the "Debugging Thought Record." After being stuck for more than 30 minutes, take a short break. Go for a five-minute walk, then write down your thought, such as "I won't figure this out." Next, find evidence to support and contradict this thought. You might note that you've been stuck for three hours, but you've also solved harder bugs in the past.

Reframing the thought, you could say, "I'm stuck because the problem is hard, not because I'm bad. I can break it down." This shift in perspective can help you approach the problem more constructively. The article also provides a "5-Card Debugging CBT Toolkit" with actionable steps. These include keeping a frustration thought record, using the 25-minute rule (working for 25 minutes then taking a five-minute break), practicing rubber duck debugging (explaining the bug out loud), and an ask-for-help script.

The article concludes by emphasizing that debugging frustration is normal, but catastrophic thinking can exacerbate it.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Catastrophizing About Production Outages: A CBT Thought Record for On-Call Engineers

Catastrophizing About Production Outages: A CBT Thought Record for On-Call Engineers Published on Dev.to | Tags: cbt, mentalhealth, productivity, webdev You're on call. PagerDuty fires at 2 AM.

  • On-call engineers experience cognitive distortions like catastrophizing outage impact
  • Thought Record technique helps identify and reframe anxious thoughts
  • CBT for on-call engineering alleviates anxiety and improves performance

Pinning GitHub Actions to Commit SHAs

Here is something that takes about five minutes and prevents a real attack vector. Most GitHub Actions workflows use version tags like @v1 or @latest .

  • Pinning GitHub Actions to commit SHA enhances security.
  • Default tags like @v1 or @latest can introduce malicious code.
  • Pinning to specific commit numbers ensures unchanged, audited code.

A created_at-only cursor lost 587 rows, even with clock_timestamp() and microseconds

A reader on one of my Postgres posts asked a fair question: why put id in the pagination index at all? With clock_timestamp() instead of now() , it's hard to create two rows at exactly the same time.

  • Using clocktimestamp() instead of now() in PostgreSQL 16 caused lost rows.
  • Pagination index lost 587 rows due to cursor ending on shared timestamps.
  • Adding id column and ordering by (createdat, id) resolved row loss issue.

Detection planning for CVE-2026-79851 without invented signatures

Detection planning for CVE-2026-79851 without invented signatures Detection teams often receive a critical CVE without the technical detail needed to write a precise exploit signature.

  • CVE-2026-79851 is an unauthenticated buffer overflow vulnerability in Aruba AOS-10 switches.
  • Detection plan uses trusted inventory, live images, roles, and management addresses.
  • Restrict CLI and web management interfaces to dedicated network segment.

More from Thursday 12 November →