I tried rubberducking today to fix a bug.

It has felt a bit weird to me before although I have done the same thing in some other form, like while pair programming and code review.

This was the first time that I remember consciously practicing rubber ducking. And it worked very well. I didn’t even complete one paragraph and I figured out what was wrong.

This was the whole thing that I wrote:

I’ve run into this weird bug which started when there was some change with the rendering. Initially it failed because there was some 500 error when project couldn’t be fetched. Now it errors because the create user project page gives 200, but then the user project doesn’t actually exist. Ah, now that I say it like this, the solution is obvious. It was probably because the code for the view was changed. Of course. The logic to create the user project was removed completely.

A lot of context is missing and I was just thinking out loud, but it helped me arrive at the solution.

The interesting thing I think is that I had already spent about half an hour to one hour looking at the logs and trying out different things to fix this issue but writing about it made the problem immediately clear. My intuitive thinking is bad at such things and I should remember that explicitly thinking about things like this works better.