[Off topic] Does anyone rubber duck program?

I browsing the part of the Wikipedia on programming, and I came across this. Apparently, when a programmer has a error in his code, he will go through all the lines and explain each one to his rubber duck. Do any of you do this, and do you think this is a good idea?

When I was still working and someone had a problem with their code, I would have them explain it to me. A lot of times they would realize their problem even though I had no idea of what their code was doing. So yes, explaining code to someone else is helpful, but I’m not sure about explaining it to a rubber duck. I think a live peron would be more helpful because of the responses they could get in return.

I don’t know any other programmers socially, so the reactions of a live person vs a rubber duck are probably very similar: o_0

I don’t rubber duck program, but I have sometimes been advised to test my (text entry) programs with a phone - by dropping the phone book on the keyboard to press random letters, and see if the program handles them properly! It’s a joke of course, but with a serious message that users can do very strange things.

Instead of a duck, I could try explaining my programs to my wife, because she doesn’t program, but if know I would just be asked why I spend so much time on Codea when I could be doing something useful like fixing the vacuum cleaner or mowing the lawn…

The expression Rubber duck or teddy bear to explain the problem to was used from time to time when I was teaching at the university, so I sometimes think about it, and it can help to try to explain the problem out loud or writing it down.

@Prynok and I chatted about this in Skype. I suppose I can see how it could be useful.

@Prynok the brain interprets language many different ways when it’s said out loud, if you try to think about it too much you can end up stuck in a circle, because it might make sense when you repeat it to yourself in your head but can be different on paper, this isn’t just something that works for programming as you may have guessed.

@Prynok I don’t talk to a rubber duck, but when I get stuck, I lay my ipad aside, watch some tv/play games for 30min, then I take paper and pen, and start drawing/doing math, which eventually changes into a chunk of code, I then take my ipad, edit my ‘test’ project (project used to test chunks) and as I start typing all of the code, I make minor changes because those look… correcter, then I test it and that way I already solved alot of problems, for example my color chooser, I did alot of thinking and ‘coding’ on paper for the hexagon

I just talk to my program, asking it what object it is, what’s its purpose in life and what it’s doing right now. Most common issues? . vs : and sending a message to the wrong object.

@syntonica I hope it never talks to you! :wink:

@Luatee Well, there is the text-to-speech option…

This sort of discussion always reminds me of the play “Copenhagen” in which there is a repeated refrain:

But in the end, in the end, remember, we have to be able to explain it all to Margrethe!

Rubber duck? Naw, I use my cousin Charlie. He’s a spider. He has so many cousins that there is always a charlie hanging around I can talk to. I tried ants, but they scurry away after I start talking. Lady bugs work a little bit better, but eventually they fly off. Nope, spiders are the best, they hang around and listen for as long as you want. They don’t talk back either and some times a random insect flies into the web which spices up life a little bit.

@MrScience101 You’re kidding, right…?

I have arachnophobia.

@MrScience101 your cousin is a spider… Does that make you a… Scorpio? Or a crab? Then how can you use the ipad keyboard then? The tip of your legs do not have enough capacitance to be detected… Ha! I nailed you: you are lying! :wink:

@SkyTheCoder, you need to watch the second movie of the Hobbit series in 3d. :slight_smile:

@Jmv38, naw, I work at a nuclear power plant. My cousins and I have mutated enough now that capacitance is the least of our worries. =)

@MrScience101 - I wish I could glow in the dark!

@Ignatz, no problem. Come on over and we’ll give you a good dose of a few hundred millirem and you should be glowing in no time!

@MrScience101 Ah, your user name, your profile picture, it all makes sense now!

@MrScience101 You’re not human? Radioactive?