25

I told a guy to implement an algorithm in cpp. He wrote this weird 600+ lines of code which contains only global variables and void functions then I told him to make it object oriented and he just put all those garbage in the class and gave me back and on top of that class name is Template and file name is template.cpp. I don't have words to describe his code. May be this picture can help you understand my state. Oh, if you think this matchOn_r1, r2,r3 are different then you are mistaken they are just different with one argument (one global argument). This is just part of the code. He has this shit all over the place. Why the fuck this kind of people exists?

Comments
  • 24
    LOL it's not even "Template", it's Templete ahah.
    I'm sorry you've to put up with that, wouldn't like to be on your shoes...
  • 19
    Wow. This is seriously bad.

    A possible reason: He does not know better?

    Take him aside, and tell him something like this:
    "Thank you you did this. While your code works, we cannot ship that. Here is my suggestion about what can be improved: ... (obviously with reasons)"

    As he did not know better (I assume this), you give him both: acknowledgment of his work (maybe even this garbage was hard work for him) but also critique.
  • 1
    @sbiewald Yeah about that I knew, he didn't have worked with oops before, that's why I gave him a class example code and other resources to study even after that he wrote this shit.
  • 3
    To be fair, this is what my code looked like when I first started. I knew it was wrong but I did not have the brain tools to think of a better way
  • 3
    Same situation here. There was a guy wrote a code so bad that it was better to rewrite it from scratch
  • 5
    @shoop oh it's you again. Just don't start language war again
  • 5
    Gotta admire the positivity in some of the comments here 👍🏽
  • 5
    I must admit, that I am a but disappointed about those comments, as no one complained about he mix of Kebab and Camelcase...
    devRant_community - you can do better!
  • 1
    You should teach him how to do it better. This person seems really junior.
  • 0
    I mean.. it's always easy to bash someone's code, but this is among the worst I've seen.

    This is something that must be sent right back after code review. In all honesty, if this dev thinks their modification makes this code object oriented and they are unwilling or unable to learn - then they are possibly not fit to do the job they are hired for.
  • 0
    Is this some student code or something along those lines?
  • 0
    Yes, he is a junior dev.
  • 1
    Smartly reusing code to save time and money! You should get him promoted to increase team productivity.

    Seriously tho as someone who just started learning this TERRIFIES me.
Add Comment