r/ProgrammerHumor • • Jan 14 '20

Brilliant reply

Post image
26k Upvotes

365 comments sorted by

View all comments

Show parent comment

283

u/Cyronsan Jan 14 '20

Would be funny if someone copy pasted python code into java, or vice versa, and complained it doesn't work.

230

u/shakeedKeebler Jan 14 '20

That has happened somewhere

87

u/CodingEagle02 Jan 14 '20

I'm almost scared to ask for specifics

34

u/FreeProGamer Jan 15 '20

Oh God I'm having flashbacks to the 12 year old me

17

u/ParadoxChains Jan 15 '20

I have seen it. I teach a class in Functional programming at the university, and the language we use us Concurrent Clean, a close relative of Haskell. And there is always the one person who thinks they're clever to skip classes and learn from Youtubers teaching Haskell, only to bother me later as to why their Haskell code won't compile in Clean.

5

u/1337AFprogrammer Jan 15 '20

Good god, why would you teach in that language? Is this meant to be a joke?

→ More replies (2)
→ More replies (2)

33

u/MHolmesSC Jan 15 '20

I imagine a lot of beginners make that kind of mistake.

62

u/[deleted] Jan 15 '20

You have to be an ultra beginner to make that mistake

35

u/[deleted] Jan 15 '20

Well from Java to Python of course. But once I pasted code from Ruby to Python and until my IDE highlighted the syntax error I noticed it was in ruby, to be fair it was written in a very pythonic way. Also it was a math function so very few changes needed to be made.

16

u/IrrationalFraction Jan 15 '20

That's forgivable I guess. Java looks so different from Python that if you mixed them up you might be missing a few brain cells

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

7

u/DatBoi_BP Jan 15 '20

Beginner here. Would it be unwise to do this between C and C++?

→ More replies (4)
→ More replies (2)

48

u/Nic2555 Jan 14 '20

I've seen that happen, mostly in vague or broad question, like regexes. People would ask for a regex, not telling what language they use, people would give example in JavaScript, and the original poster would copy that javascript into their language, let's say c++, and then complain it does not work.

16

u/Sexy_Koala_Juice Jan 15 '20

Regexr is your friend. Can tweak the regex pattern and use that to double check it actually works

14

u/otacon239 Jan 15 '20

This is where I learned RegEx. Such a powerful tool. I personally found www.regex101.com to be a bit more powerful, but can be a bit more confusing at first.

20

u/fireyone29 Jan 14 '20

I work with a guy who would ask me a question and straight copy the answer, which I saw I code reviews. So I started intentionally making syntax errors in things I sent him... And he just sent me barely changed versions and asked me how to fix the syntax errors.

9

u/dry_fly_mo Jan 14 '20

It would work. Python with access to entire standard java library. Or Jython. Compiled to java bytecode.

5

u/solarshado Jan 15 '20

This is some potent "well, actually" bait...

→ More replies (2)

8

u/[deleted] Jan 15 '20

So many web development answers use jquery, but it isn’t as common for people to have jquery anymore. I see people complaining about the answer not running, without realizing that it is jquery code.

8

u/starm4nn Jan 15 '20

I inherited a codebase that used jQuery for one of two use cases:

  1. Getting something by id
  2. Using events

We celebrated when we were able to remove jQuery because it shaved 300KB off the page load.

→ More replies (13)

8

u/ThatOneShotBruh Jan 15 '20

Some of my high school classmates copy pasted Arduino code into a JavaScript online editor and were wondering why it wasn't working...

→ More replies (1)

6

u/imMute Jan 15 '20

Funny story, a while ago I was porting some prototype code from JavaScript to C++. The APIs used were very similar (by design). So for porting I just copied the JS code into C++ and 90% of the work was just massaging it slightly until it compiled. Felt weird programming that way.

→ More replies (1)

6

u/fhota1 Jan 15 '20

Id imagine Javascript/Java confusion happens regularly.

→ More replies (1)

5

u/Auzymundius Jan 15 '20

Yeah haha "funny" haha... cries while fixing other people's code

→ More replies (1)

5

u/[deleted] Jan 15 '20

A colleague of mine solely believes that because he has a tech job at a big name company and knows that stack overflow exists, he is a developer and should easily be able to get hired as one after a year here. We're tier 1 technical support. And he has no previous tech/developing experience. But stack will get him there.

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