Me: *tumbling through the intertubes on my laptop nearby*
YS: *burns through the entirety of the homework with zero assistance until the last problem*
Me: ::le proud::
YS: *starts conversation about several different things, circling closer and closer to the actual last math problem*
Me: *light dawns* Hey dude, do you need help with the last problem?
YS: Yeah!
Me: Okay, let's start over with it - read it to me.
YS: *reads it out loud, realizes that the info he needed was right there in the question all along and he'd been making it more difficult than he needed to*
YS: !!!
Me: !!!
YS: *slams book shut*
Me: So reading the problem out loud helped?
YS: YEAH! *throws up two hands for a double high five* LET'S HEAR IT FOR RUBBER DUCKING!!!
Me: *double high-fives*
YS: *double high-fives, sits down, opens book and finishes answering question in like 13 seconds*
Me: *turns to internet, writes this post* and so hey whoever it was who instigated what became a post explaining what rubber ducking is, for programmers? THANK YOU FOR THAT. Because I was explaining that idea to him the other night, after his last bout of maths homework, and apparently it REALLY stuck with him and he has found a new reason to actually talk to me when he needs help with a thing, even if the help is just using me as an object that may or may not actually say anything useful rather than simply be present and offer a something to which to explain himself so he can grok his own brains. THANK YOU.
In a display of what i believe to be PEAK rubber duck programming, I’m explaining my coding homework to an attentive class of Martian skitarii and Tech-Priests.
Found this in a link from a Pinterest post. And the comments with it are funny, but......
No. This person is a serious computer programmer. The rubber duck collection is so they have all the rubber duck options for every possible Rubber Duck Programming need. The collection is in the bathroom because keeping your rubber duck collection by the bathtub is way less weird than keeping it by your computer.
200 tiny resin ducks have now been hidden around my work! There’s no competition if they find them all, but I kinda doubt they will. Especially all the ones in the solder lab
NEVER LET ME DESIGN MY OWN PROGRAMS THERE WILL BE DUCKS AND THINGS WILL GET STUPID VERY QUICKLY
Case in point: The following is a document outlining my plan for a project slated to take place after semester break. The idea came to me when I was bored and I am going to stick with it for shits and giggles. It is word for word exactly what I submitted, I would have written more formally if it weren't peer assessed but nyeh
Submission title: QUACK QUACK MOTHAF!#KAAAA
Just a warning - you can tell I get progressively less and less serious about using formal writing as this plan goes on so please excuse my language.
MAKE YOUR OWN PRAC – My Plan
What system I’m modelling and what the program will do
I plan to make a program based on members in a nobility. For a bit of irony, it’s going to be a nobility in which all of the nobles are actually rubber ducks, but I figured it would be interesting and a good way to get better with object hierarchies, which I’m not so good at yet. I intend for my program to allow the user to name various ducks and assign them ranks in the nobility (with each rank limited to a certain number of ducks), and the ducks will then do various things based on what rank they are.
Required concepts and how the duckies will meet the standards
MEMORY ALLOCATION: I intend to make an array filled with the limiting values for each rank in the nobility. I’ll allocate memory to another array which will contain the number of ducks in each rank, and this will be the array that changes with time. I’m not sure if this is going to fully meet the requirements but it’s a start.
I also intend to have a separate duck object which then takes on elements of the nobility structure.
MEMORY MANAGEMENT: YAY GONNA ALLOCATE ME AN ARRAY.
ARRAYS: The dynamic ‘number of ducks’ array will be constantly changing as the user adds more ducks to the nobility.
STRINGS: DUCKIES GONNA HAVE NAMES AND GONNA SAY FUNNY STUFF. QUACK QUACK SUCKAAAS
NUMERICAL OUTPUT: I will include a function to output the number of ducks in the rank and number of ducks arrays. These will be displayed as an integer value since floating points don’t appear to be necessary, and will be displayed automatically whenever a rank becomes full. It will also be displayed when the user stops adding new ducks.
USER INPUT: The user will be the one naming the ducks and giving them rank, not me. I intend to make this ‘childproof’ in that if a value is supplied wrong, an error message will be returned and the user will be asked again to input a value. For example, the program will expect capital letters at the beginning of names and ranks, and will reject anything else. Grammar is important, yo.
INHERITANCE: OKAY SO LIKE NOBILITY RIGHT? There’s gonna be one basic group they all fall under: Nobles. Under that, the top two tiers are king and queen. Then beneath king, male members, princes, knights and barons. Beneath queen, princesses, dames and baronesses. Though I don’t know about dames. I need to look up an actual nobility chart again before I have the exact name for that. In modern times, at least, it would be a dame.
POLYMORPHISM: look I don’t care how many if loops I gotta write these ranks are all gonna say different things and some of them will do different things and NONE OF THEM WILL BE EXACTLY THE SAME. Each class will be DIFFERENT.
OO PROGRAMMING AND DESIGN: look none of the functions will be overly useful from a programming perspective but each function will be respective of their class and should hopefully help distinguish the differences between one rank in the nobility and another. For example, the queen duck may wave a jeweled scepter, while a princess duck will wave a silk and lace hanky, a baroness a cotton hanky and a dame will wave her wing. Or something.
TESTING: GONNA BE MANY IF LOOPS. NOTHING WILL ESCAPE THE MAGICAL IF-ELSE NET!!!
GAME PLAN
I’m gonna first do a bit of work on pointers and hierarchies – I’m still pretty bad with pointers and I’m not great with making hierarchies yet so I’m gonna work on those. Then I’ll sketch up a draft of my program on paper and will write the skeleton function with not much testing in it yet. Then I’m gonna get tricky and I’ll write up my if statements and it’ll all be very time consuming, because while I do that I’ll have to be constantly testing to make sure the ducks don’t betray me.
I just know the arrays are gonna be fiddly, I feel it in my boooooones
SUMMARY
Basically, tl;dr, I’m gonna be making a program in which rubber ducks run a kingdom and wave at stuff and say sassy things depending on what rank in the nobility they are. I fully intend to make life difficult for myself here because I’m gonna make it so the user of the program chooses what name the duck has and what rank they are but it’s gonna be really funny in the end so I think it will be worth it.
Çoğu zaman başıma geliyor. Baya karmaşık bir problemi çözmeye çalışırken başkasına sormaya karar verdiğimde soruyu sorarken çözümü buluyorum. [Gökmen](https://twitter.com/gkmngrgn)'de aynı şeyi söylüyordu hatta, "*birine sorarken problemi çözüyorum*" diyordu. Bunun olmasının sebebi sorunu başkasına anlatabilmek için mevzuyu önce zihinde düzenlemek zorunda oluşumuz. İfade edebilmek için bunu yapmak zorunda kalıyor insan, yapabilince de çözümü kendisi buluveriyor. Neyse bugün [reddit](http://reddit.com)'de Rubber Duck Debugging diye bir şey [gördüm](http://www.reddit.com/r/todayilearned/comments/1tmviq/til_that_rubber_duck_debugging_is_when_a/). Tam bu bahsettiğim şeye yarıyor. Bilgisayarın yanına bir tane plastik ördek koyuyorsun. Sorunu, kodunu ona anlatıyorsun. İfade etmeye çalışırken problemi ve karşındaki kodu zihninde düzenlemek zorunda kalıyorsun bu da çözümü bulmanı sağlıyor.
Bu metod The Pragmatic Programmer adlı kitapta bir hikayede geçmiş ilk defa. Biraz deli işi ama denenebilir. İşe yarar gibi gözüküyor.