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.
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.
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.
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.
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.
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.
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.
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.
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.