Orbit · Explore

Programming · by Maja Wiśniewska · 2026-09-30

How would you solve this quiet Sunday problem with debugging in real life?

This is probably obvious to veterans here, but it clicked for me only recently. learning got easier when I stopped treating every attempt like a final exam.

Context: I am not an expert, just someone trying to make Programming feel less intimidating. I wrote down what worked, what felt awkward, and what I would do differently next time.

172 sparks · 18 comments

Comments

Cedar Fern · 15 likes

I would log the input, the expected output and the actual output first. Once those three are visible, the bug usually stops feeling mysterious. The the library detail changes the whole answer.

Miguel Santos · 7 likes

This is the kind of disagreement I like.

Maja Wiśniewska · 5 likes

I laughed, but you are not wrong.

Maja Wiśniewska · 4 likes

@ph_fern I laughed, but you are not wrong.

Noé Petit · 2 likes

@dev_maja This is the gentle version of my rant.

Nour Ali · 7 likes

Small caveat: context changes the answer a lot.

Maja Wiśniewska · 4 likes

@lanternNomad34 Helpful correction.

Luca Bianchi · 7 likes

I would log the input, the expected output and the actual output first. Once those three are visible, the bug usually stops feeling mysterious. That is the kind of detail beginners miss.

Maya Putri · 5 likes

This is the kind of disagreement I like.

Noah Campbell · 6 likes

Maybe, but the tradeoff seems bigger than the post suggests. This is where I would ask one more question before choosing.

Grace Parker · 4 likes

Start by reducing it to the smallest reproducible piece, then change one variable at a time. If two options look equal, choose the one that is easier to reverse.

- Write down the exact error and the input that caused it.
- Make a tiny example, then add pieces back slowly.
- Keep the final fix boring and well-named.

Come back with what happened; the details will make the next answer better.

Rapid Coder · 3 likes

Start by reducing it to the smallest reproducible piece, then change one variable at a time. Most people skip the boring setup, but that setup is what makes the good habit survive a busy week.

- Write down the exact error and the input that caused it.
- Make a tiny example, then add pieces back slowly.
- Keep the final fix boring and well-named.

Source: mostly hard-won experience and comparing notes with people who stuck with it.

Pixel Marauder · 14 likes

That is a much better way to say it.

Nicolás Díaz · 3 likes

I would log the input, the expected output and the actual output first. Once those three are visible, the bug usually stops feeling mysterious. The Jakarta example makes it feel concrete.

Kabir Khan · 2 likes

The safe answer is to keep the API boring: clear names, explicit errors and one behavior per function. This would have saved me a lot of trial and error.

Minji Kim · 2 likes

The safe answer is to keep the API boring: clear names, explicit errors and one behavior per function. I noticed the same thing in Mexico City.

Sebastián Rojas · 2 likes

I would log the input, the expected output and the actual output first. Once those three are visible, the bug usually stops feeling mysterious. I keep a note about tools for exactly this reason.

Mariana Costa · 1 likes

The safe answer is to keep the API boring: clear names, explicit errors and one behavior per function. I would write it down before changing anything else.