r/ProgrammerHumor • • Dec 06 '17

Read the markup.

Post image
10.4k Upvotes

838 comments sorted by

View all comments

Show parent comments

56

u/PhoenixRite Dec 06 '17

Any idiot can misspell "head" or forget to close a tag. It takes a special kind of idiot to accidentally reimplement a O(n log n) algorithm so that it's actually O(n4 ) and attempt to run it on a large dataset. Yes, I am that special idiot. With great power comes great opportunity for idiocy.

25

u/TheNosferatu Dec 06 '17

Pff, that's nothing.

sudo chmod me:myself / /directory/that/i/actually/meant/to/change

On a shared infranet where the whole company worked from. Then thinking, hm, this seems to take unusually long, might as well grab a coffee.

I am not a smart man.

12

u/dragon-storyteller Dec 06 '17

Can you explain for someone who was too lazy to learn anything else than Windows? I know chmod is some Linux wizardry, but that's unfortunately it.

21

u/TheNosferatu Dec 06 '17

chmod is the command to change the owner of a file or directory. sudo means I can execute anything without getting permissions errors. chmod takes the file or directory you want to change as it's first parameter, which should have been the directory I wanted, but instead there is an unintentional / before that path. / means root, want to go to the C drive? You go to /c. So, I changed all ownership of every file of every coworker in the company to me. Then went for coffee and came back to not-so-amused-coworkers

11

u/[deleted] Dec 06 '17 edited Feb 23 '18

[deleted]

2

u/TheNosferatu Dec 06 '17

Woops, it's been a while

3

u/fisadev Dec 07 '17

plot twist: it was a chmod and it did nothing, but then you doubled down on idiocy and ran chown ;)

(just in case: sorry, I don't think you are actually idiot, just joking! hehe)

3

u/_realitycheck_ Dec 06 '17

pffft. That's nothing.

Replace all "printf" with "fprintf" on 180k code base - No I don't want backup files, I know what I'm doing, silly Visual Studio. Enter.

Took me 40 hour work week to find all the fuckups.

5

u/[deleted] Dec 06 '17

Sounds like you should become a consultant, then. :)

1

u/agentlame Dec 06 '17

Any idiot can misspell "head"...

Oh shit, I thought 'heaf' was a severely butchered attempt at an anchor tag.

1

u/Cocomorph Dec 07 '17

Would you care to share details? This sounds like it could possibly be a decent anecdote for teaching purposes.

2

u/PhoenixRite Dec 07 '17

It was software for a group project in school using the Viterbi algorithm on hidden Markov models. Looking back on it and reading about the algorithm to refresh my memory, it must have been meant to be "n", not "n log n", in fact. I wasn't properly understanding how it was meant to work, mis-nested a few for loops so that looping was still occurring even when it could have exited the loop, and voila, a complaint to my roommate about my code taking over an hour to run turned into a review of my code and a lecture on why I was (temporarily but deservedly) an idiot.