60

Okay it's called devRant - so I'll rant...

Why the fuck do people write comments like that:
$savesThisStuff = "stuff"; # does save stuff

Why are here 1500 lines from which there are 700 outcommented code and 300 dead functions which aren't called anywhere?

Why the fuck is here PHP code which generates JavaScript inline which itself generates STATIC (!!) HTML.

------
"Always code like the one maintaining your code next is a violent murderer with an axe and you'll still be save."
... Where's my axe again?

Comments
  • 12
    Buy an axe
  • 12
    PHP code that generates JavaScript that generates static HTML ---> Sounds like three siblings in the same room and two of them not taking to each other. Like hey JavaScript tell HTML to do his job. :-D
  • 0
    I know that feeling... You are not alone my friend.
    Changed from a company with disgusting legacy code to find another with even more disgusting legacy code.
    The attitude "I will do it like this for now, because of deadlines, I will fix it later" is the real killer of coding standards and principles.
  • 1
    @busuu if the variable is numberOfColumns, I don't see point of adding comments, but if the variable were nColumns, I would probably add a comment
  • 1
    @busuu if the person working on the code after you, doesn't know that "n" means number, they might not realize that nColumns means number of columns
  • 1
    @busuu please don't assume while writing code. Every person and company may not have same coding standards. I would say any comment is good comment. It may be useless to you, but it may be useful to others.
  • 0
    @busuu haha..when did they start teaching that during algebra..
  • 1
    Take this one 😂😂😂. just for your pleasure
    <?php
    echo "<script>
    var e= document.createElement("div");
    $("#bla").append(e);
    </script>"
    ?>
  • 0
    Put a copy of clean code on their desk and let's see if they get the hint.

    This kind of shit happens in my office too, they simply ended their grade and never tried to move on from there.
Add Comment