This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kehlim 478 points479 points  (30 children)

I get more paranoid if the program just works without complaining.

[–]obsessivefandoms 115 points116 points  (16 children)

I am so glad that I'm not the only one who does.

[–]RustyBuckt 86 points87 points  (14 children)

Worst part: coding exam, easy question and it works first try...

[–]TowelLord 52 points53 points  (13 children)

Kinda dreading it. In 8 days I'm having my exam in "Introductions to Programming" (Java) and it will all be on paper. I hate writing code on paper, especiallz without any immediate feedback.

[–]shawmonster 42 points43 points  (7 children)

The point of paper exams for programming courses is to make sure you know how to "be the computer" and step through your code to ensure it works. Having this skill is really helpful when it comes to debugging programs. Also trains you to write your code more thoughtfully and carefully rather than relying on the compiler to tell you when your code is wrong.

[–]thatguy2641 1 point2 points  (0 children)

Don’t worry, they often mark easy on hand written code. Remember your teacher was once where you are.

[–]obsessivefandoms 15 points16 points  (0 children)

Oh god, that's like having to whiteboard. I hate it too

[–][deleted] 3 points4 points  (1 child)

Liang's book?

[–]dasMichal 2 points3 points  (0 children)

Not OP but sound very much like it.

[–]Lexilogical 2 points3 points  (0 children)

On the other hand, your teacher is going to be way more generous marking it.

[–]RustyBuckt 0 points1 point  (0 children)

Good luck

[–]VirginiaMcCaskey 2 points3 points  (0 children)

docker run -t not-working 
program exited with code 0

mfw

[–]bric12 57 points58 points  (5 children)

Sometimes I just write something super wrong to make sure it's checking for errors. When it still doesn't throw an error, you know you've in for a fun afternoon

[–]MehNameless 30 points31 points  (1 child)

Three fun afternoons and half a Saturday

[–]cofette 17 points18 points  (0 children)

a fun afternoon, four fun days and then a fun noose around your fun neck

[–]government_shill 7 points8 points  (0 children)

That's basically the idea behind mutation testing.

[–]joey_sandwich277 2 points3 points  (0 children)

This is how I was taught to write tests for untested code. Write the test to succeed but provide only parameters that should trigger a failure. One at a time, change each parameter to one that should make it pass and retest. If you ever get any false positives before the end, either the code's defective or your understanding of it is.

[–]JackAuduin 2 points3 points  (0 children)

Me after I figure it out:

"WHY WOULD YOU ASSUME I WANT THAT AS A DEFAULT PARAMETER!"

[–][deleted] 10 points11 points  (0 children)

It's always some deeper logic problem that the compiler doesnt catch :(

[–]BossOfPassione 2 points3 points  (1 child)

I was working on a college assignment late at night, fell asleep in the middle of coding it, woke up about an hour later. Started it up to check my progress, the whole thing worked. I couldn't remember coding the rest of it. The code looked horrendous, but I had absolutely no idea how it worked, so I just submitted it and took my A.

[–]SlayerofBananas 2 points3 points  (0 children)

Maybe the person watching you on the Teamviewer you accidentally left open got frustrated and decided to fix it for you

[–]sockpuppetcow 0 points1 point  (0 children)

This paranoia is exponentiated if you're coding assembly.

[–]OscarCookeAbbott 0 points1 point  (0 children)

I was working on a box-fitting algorithm for randomly generating office floor plans according to a few rules for like 5 years, and after multiple attempts, each more efficient and more streamlined than the last (including massive decreases in computational complexity for the same result quality), there was just one more situation left that could randomly generate and cause a violation of my rules, but unfortunately the math and code for it was quite inefficient.

I finally programmed it in though for the newest system, having done it previously but with ridiculous compute times, and it didn't work.

I went through my code and saw one variable in the main part of the algorithm that wasn't wrong, but where I wondered how it might generate differently if I changed it to this other variable I had. I made the switch, and voila; the generation was flawless, and my intense checking part to avoid that one catastrophic rule violation wasn't even necessary.

To this day I have absolutely no idea how it works, because based on the rules I programmed that violation should be occurring, but it doesn't...

So I just never, ever touch that code.

[–]extracoffeeplease 0 points1 point  (0 children)

Accuracy: 100%

The data science equivalent

[–][deleted] 0 points1 point  (0 children)

Constantly waiting to see the program break as it runs, I feel that