r/ProgrammerHumor • • Sep 05 '20

For as long as you code

Post image
6.1k Upvotes

54 comments sorted by

364

u/noitsu Sep 05 '20

Wait until he scream "IT WORKED??! THIS MAKES NO SENSE!"

157

u/Aayyi Sep 05 '20

This feeling never goes away for as long as you code

52

u/ZanorinSeregris Sep 05 '20

This is the way

1

u/TheXGood Sep 08 '20

Happy Cake Day!

30

u/apophis-pegasus Sep 05 '20

Ah that brings me back....to two weeks ago.

15

u/Mast3rL0rd145 Sep 05 '20

2 weeks? you're doin' pretty good

8

u/thatcoolguy27 Sep 05 '20

That's prob how long of a holiday be you

7

u/MichaelEmouse Sep 05 '20

I guess that can be worse than not working because then it might have effects you don't expect which will mess something up later.

5

u/justinlanewright Sep 05 '20

Maybe it only looks like it worked.

4

u/schwerpunk Sep 05 '20

Each ejaculation while debugging brings you closer to the truth.

3

u/Akurei00 Sep 06 '20

Also, after writing over 1k lines of code without testing, "It's working? Oh, God. Not even syntax? How badly did I fuck something up that I can't tell where it's broken."

2

u/PabloPiza Sep 05 '20

This is the feeling I have the most

99

u/Cloakknight Sep 05 '20

Image Transcription: Twitter Post


Isaac is Laughing, @imosquera

"IT WORKED!! IT WORKED!!!" my son screamed with joy from his room.

I'm teaching him to code python and left him alone to solve a problem.

me: "Son, that feeling you had never goes away for as long as you code".

This is why programmers love to code.

Isaac Is Laughing, @imosquera

update

he's now yelling "IT'S NOT WORKING NOW, THIS MAKES NO SENSE!!!"

me: "Son, this feeling also never goes away for as long as you code."


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

5

u/DrNotch0908 Sep 05 '20

Good hooman UwU

42

u/[deleted] Sep 05 '20

Tell him about StackOverflow and the benefits of code cloning!

26

u/schimmelA Sep 05 '20

i really think that when you've just started learning a language it's best not to copy a lot of stuff you find online. try, fail, repeat and then check to see how other people did it.

13

u/l0c4lh057 Sep 05 '20

Even if you have years of experience you should not copy code. If you need to look something up it means you did not know or understand it. Copying does not make you learn or understand it. Read it and then write it yourself. (That means you should not just type character by character from the source either, you need to make sure you understand what it does)

9

u/schwerpunk Sep 05 '20 edited Sep 05 '20

An instructor gave me this tip when I was just getting started, and the practice still bears fruit to this day.

Also reminds me a story from college. One of our cohort, who was known to be lazy nagged another classmate if they could copy their assignment. Finally, the not-lazy classmate relented and sent them their source. But with one small alteration: right in the middle of the main loop, they put the word hotdog. Not a variable, or an alias, or a macro, or a string constant, but just the word.

hotdog

Like that, surrounded by whitespace on all sides.

The lazy student threw a fit because it wouldn't compile. But they didn't look at error messages, they didn't look at warnings in their IDE (we all used Visual Studio), and they certainly didn't look at the source they had copied. All the other student would say was "it works on my machine."

I swear to you, they submitted The broken project as-is, almost unchanged. Of course, both students were spoken to, but the lesson -- and the great story behind it -- was worth it.

Now, the lazy student didn't make it to graduation (shocker), but I still like to tell the story to people who might be tempted to copy code without actually trying to learn and understand it.


PS I just want to add that there's nothing wrong with struggling (ex: learning to work with pointers did my head in initially). I've asked for extensions. I've submitted broken assignments. Just... if you're going to copy, read everything and type it in your own words.

3

u/l0c4lh057 Sep 05 '20

Do you know what happened to them? Did they both get 0 points for it or just the one who copied?

I am lazy af and I sometimes ask people if they have something, I especially did it while schools were closed and we had to hand in stuff online, but I always read everything, rephrased it and then handed it in (had nothing to do with computer science). I never just copied anything.

I had something not working but that was when we should design a database in CS class and write queries for getting certain results. Lazy as I am I just started few hours before we had to hand it in and I did not have time to create test data anymore (which we should have done) so I did not have anything to test my queries with either. That is why half of them did not work. (I was assuming something was working regarding joins but it wasn't, can't really remember what anymore tho)

4

u/schwerpunk Sep 05 '20

I don't know what they got on that assignment, no. I wasn't actually that close with either of them - this was mostly overheard while working on my own stuff in our computer lab. I do know the one I called lazy failed eventually (but most students failed, so it could have just been a matter of GPA attrition over time).

I've definitely been given (and have given) classmates working pieces of code before, because when you're struggling it's really helpful to have a working example to compare to.

Yeah, it's a slippery slope, but if you're genuinely trying I don't think there's anything wrong with collaborating with someone who might be a bit ahead of you. Especially if your focus isn't CS to begin with.

One classmate and I did both get 0 on an assignment that we copied from eachother once, though. But that was regraded after we explained we misunderstood what the instructor meant by "you're allowed to work together" - we just took turns driving while pairing on the same assignment.

It really depends on the school / programme / class / instructor.

7

u/BrythonLexi Sep 05 '20

I'd argue that typing out the code may help you understand it better

8

u/[deleted] Sep 05 '20

But it is written in the stars: he who clones keeps the software industry going on

4

u/schwerpunk Sep 05 '20

I mean there's a difference between cloning a repo and using it rather than copying 100 lines and sticking it in your codebase (except maybe plumbing or boilerplate).

Cloning a repo is like using a library or installing a system tool: That's the point of it.

4

u/scroll_of_truth Sep 05 '20

99% of the time i copy code it's because I either am not totally sure I remember the syntax, or I need a simple function and it's faster to copy one that's already working. very rarely was it because I didn't/couldn't understand. only time that would happen IMO is when you just started, like the guy above said.

5

u/Naitsab_33 Sep 05 '20

Or because you know a way to do it, but it's clumsy and someone did it 10n times faster

2

u/Glaidtors Sep 05 '20 edited Sep 05 '20

I mean, it's fine to copy code if you understand each line of code and you're too lazy to type it in yourself.

2

u/shutanovac Sep 05 '20

I second that. Also, you're*

2

u/jeisot Sep 05 '20

If it works...

49

u/MrBackpacker Sep 05 '20

Hahaha!!!! I say this atleast 3 times a day at my job.

16

u/schwerpunk Sep 05 '20 edited Mar 02 '24

I love the smell of fresh bread.

17

u/[deleted] Sep 05 '20 edited Sep 05 '20

I was stuck on a code and wanted to solve it by sticking as many if statements as possible to pass all those cases where the code was not working.

It became even more buggy after that.

5

u/shutanovac Sep 05 '20

Confucius says: too many "if" statements means you're doing it wrong.

14

u/Wexzuz Sep 05 '20

Sometimes I ask my no code "what do you want from me?!"

10

u/artanis00 Sep 05 '20

he's now yelling "IT'S NOT WORKING NOW, THIS MAKES NO SENSE!!!"

me: "Son, this feeling also never goes away for as long as you code."

This is why programmers hate to code.

7

u/[deleted] Sep 05 '20

My favorite feeling is: "Eh, it's not going to work but I'll try it anyway." "What?! It's working?!"

5

u/dance_rattle_shake Sep 05 '20

Uh, I never get that happy "it worked!" feeling, because it always comes after so much frustration and failure, that I'm not even relieved when it finally works, just exhausted. Maybe I'm in the wrong profession.

3

u/Pclovr Sep 05 '20

Python syntax??? It makes no sence!!! /s

3

u/Father_Wolfgang Sep 05 '20

It’s the repetitive cycle of achieving a short-lived moment of euphoria that only comes after enduring a lot of pain. Some call it passion, others call it masochism.

2

u/Valendr0s Sep 05 '20

I feel like when you always expect it not to work, you're rarely disappointed. I mean there's almost infinitely more ways for it to not work than there are ways for it to work.

The fact that anything ever works is amazing.

2

u/xzero_3 Sep 05 '20

ah...welcome to programming

2

u/kirbman Sep 07 '20

"My code doesn't work and I don't know why."

"My code works and I don't know why."

-12

u/[deleted] Sep 05 '20

Python in of itself does not make any sense.

Dumbest language ever.

7

u/Noobfortress Sep 05 '20

You sure that isn't JS?

-1

u/[deleted] Sep 05 '20

also js

2

u/Prinzessid Sep 05 '20

Let me guess, you dont like anything that does not have the same syntax as C? Very open minded.

2

u/[deleted] Sep 06 '20

Actually, yes. Lmao. C / C++ / C# are bae. Java is also okay, i guess.

Javascript is also kinda weird. All this typeless shit is weird.

It's nice for beginners but when you know a bit you just miss all these restrictions because they force to write proper code

1

u/Prinzessid Sep 07 '20

Well, python is not „typeless“. It is strongly, dynamically typed. This prevents bugs because type changes dont happen unexpectedly or go by unnoticed. I would also argue that the python syntax forces you to write good code but does not demand unneccesary boilerplate code all the time, which makes it much more readable.

1

u/[deleted] Sep 08 '20

Code without these {} is automatically badly readable.

Code relying on tabs / line breaks is automatically bad code.

A perfect syntax should allow you (alltho it is a terrible idea) to write a super long files all in one line. Like, even javascript / fucking css does!

1

u/Prinzessid Sep 08 '20

Why would you ever want to write stuff that is a „terrible idea“? Have you ever really tried python? You sound really confident in your opinion, without giving any arguments.

1

u/[deleted] Sep 08 '20

Yes, i have.

It's a prototyping language in my opinion. You can code really fast, but it looks bad and does not perform that well.

Python's only usecase imo is "Develop complex algorythm XY => Does it work? Yes: Implement in a proper language"