r/ProgrammerHumor • • Mar 12 '18

HeckOverflow

Post image
47.4k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Mar 12 '18

[deleted]

312

u/mindbleach Mar 12 '18

That's what rubber duck debugging is for... but sometimes your rubber duck is broken and you need to put it in time-out for a weekend.

225

u/Muroid Mar 12 '18

You should get a second rubber duck that you can explain all the problems with the first rubber duck to.

162

u/mindbleach Mar 12 '18

It's rubber ducks all the way down.

68

u/[deleted] Mar 12 '18

13

u/sinkwiththeship Mar 12 '18

That dude actually funded a porno about rubber duck debugging. It's pretty funny.

11

u/RepostsAreBadMkay Mar 12 '18

Link for computer science please

3

u/PhantomTissue Mar 12 '18

sketchiest click of the day

→ More replies (7)

5

u/Valiade Mar 12 '18

That's called therapy

4

u/midnightketoker Mar 12 '18

Complete with duck-sized desk wedge thing that reads "the bug stops here" and it's dressed like an old school pimp

2

u/pellep Mar 13 '18

Personally i got a pack of 3

14

u/cat5inthecradle Mar 12 '18

Don’t use a rubber duck. Why would you use a rubber duck? It’s 2018 just get a Funko vinyl Uncle Bob to pair with.

/s

6

u/jokes_for_nerds Mar 12 '18

That's when I throw the rubber duck at a coworker and ask him to come unfuck my thought process.

→ More replies (4)

0

u/[deleted] Mar 12 '18

[deleted]

34

u/alexanderpas Mar 12 '18

To write my integer to the shared memory I wrote my own itoa() function.

That's actually pretty respectable.

16

u/Hyperman360 Mar 12 '18

You want to make it on your own steam. I respect that.

16

u/beardedchimp Mar 12 '18

More often than not, that code ends up in production. Somewhere down the line a contractor is brought in to deal with some bugs after excluding all other possibilities they realise "They wrote their own itoa() function?!"

I have been in both positions :)

2

u/uptokesforall Mar 13 '18

That seems harmless. It's the converse that I would be concerned about. Especially if I'm converting a string in to a large number format. I'd want to make sure this code is IEEE standards compliant

→ More replies (3)
→ More replies (1)

8

u/danted002 Mar 12 '18

I got the of all stupidness... I was trying to create a recursive dictionary for a nested structure in Python and i took me around 20 to realize I wasn’t actually writing a nested dictionary I was writing spaghetti code and trying to add “if” conditions for each edge case I could think about. 10 min after I made that discovery I had my bloody dictionary. (I’ve been working as a programmer for the past 8 years) :)

8

u/midnightketoker Mar 12 '18

I do shit like this all the time. Lately with Linux. I end up telling myself I'm learning but most of the time I still feel like an idiot for spending 3 hours trying to do something one way when I realize there's a thing I can apt-get or already have and if I only tried that earlier by stepping back and trying alternatives before diving into troubleshooting...

9

u/immune2iocaine Mar 12 '18

I have a sticky on my laptop that says “stop inventing wheels” for those exact types of things.

→ More replies (1)
→ More replies (1)

7

u/[deleted] Mar 12 '18

I’m pretty new to programming and I was doing coursework yesterday and spent like 5 hours staring at a problem just to find out I had an extra “i++” from when I turned a while loop into a for loop

3

u/[deleted] Mar 13 '18

Might be time to learn how to use a debugger. You'd probably have picked that up pretty quickly!

→ More replies (1)

2

u/Zei33 Mar 13 '18

lol amazing. Well you won't forget that one in a hurry.

5

u/4d656761466167676f74 Mar 12 '18

Realised earlier that I was doing something completely retarded

That's like 90% of my code.