621

Found this in our codebase, apparently one of my co-workers had written this

Comments
  • 22
    The blank lines at the beginning and at the end of the method are slightly disturbing.
  • 60
    Honestly I'd do the same if someone is going to use such a useless metric as lines of code then fuck them this type of shit is going to happen
  • 20
    Useless code is useless.
    Sometimes devs need to do useless things to become productive again
  • 10
    @daarkfall Yes, and I'd even be tempted to write some utility that replaces function calls with the function code inlined. And look for another job, of course, since paying per line of code will result in an unmaintainable codebase which won't be any fun to spend your days with.
  • 9
    Seems something I would do on my college projects (one of the elements they base themselves on for our grades are the number of commits)
  • 2
    Awesome
  • 36
    The fact that your boss thinks more lines of code is better than less lines of codes truly makes him an idiot
  • 14
    With such a stupid thing to base pay on, I'd do the same. It just promotes bruteforcing everything.
  • 3
    It always catch me when I read "do nothing" because always tend to come from the same kind if programmers
  • 1
    @kamen Are just added value lines!
  • 6
    I forgot who said it but I heard in a python conference video "We have features not code" and of course more complicated things has a bigger chance of going wrong. Lesson of the day: That boss should learn to appreciate devs that can write features with little but cleverly written code.
  • 2
    The lines of the comments are too long
  • 4
    I'd just hardcode the whole app and solve the issue of $/line . Look bawss , I wrote 2000 lines of code today (one function) .
  • 3
    Shouldn't it be ==? Sorry, I have never seen this syntax before. Anyone know what language it is?
  • 3
    I guess recursion isnt much of an option over there huh? Better go full iterative
  • 7
    1. git blame
    2. Fired.
  • 1
    There must be a better way to do this. More implicitly.
  • 4
    @SpencerBeige he is assigning the value so one is fine :)
    It looks like JS
  • 8
    I wonder if deleted lines has the opposite effect on his salary.

    Imagine doing a refactor that replaces a lot of code with a few lines. He would probably be fired
  • 3
    This has since changed though, yeah? You don't get paid for lines written, right?
  • 4
    You should get paid a lot more if you produce what is required with the smallest amount of code.
  • 2
    @edisonn I kind of agree but it depends on the requirement to paraphrase gandalf 'a good programmer never uses too few lines of code nor to many they use exactly as many as they intend to'
  • 6
    printf('h');

    printf('e');

    printf('l');

    printf('l');

    printf('o');

    printf(' ');

    printf('w');

    printf('o');

    printf('r');

    printf('l');

    printf('d');

    printf(' ')

    printf('n');

    printf('o');

    printf('w');

    printf('');

    printf('p');

    printf('a');

    printf('y');

    printf(' ');

    printf('m');

    printf('e');

    printf(' ');

    printf('m');

    printf('y');

    printf(' ');

    printf('m');

    printf('o');

    printf('n');

    printf('e');

    printf('y');
  • 1
    @ryzokuken Lol. Exactly what I was thinking.
  • 2
    Is this a joke or is this for real ?:D

    But then we should not charge by hours spent also :) same thing happens with hours for lot of people :)
  • 2
    @harambae it's like small me thinking that the more files there are in program's directory, the more it's cooler
  • 0
    @codeblue

    for i in src/*

    do

    tr -d '\n' < $i | sponge $i

    done

    "I reduced the number of lines by a factor of about 200, where is my rise?"

    You would have to change it when you use python to insert a ';', or when you use C or C++ to not break the line when the next lines begins with a '#' (excluding space).
  • 1
    your coworker can work in this company with this mother fucker

    https://devrant.com/rants/5004522/...
  • 0
    "return nothing;"

    with nothing (seemingly) not being defined anywhere.

    what is that? TypeScript? or some other "language" that's a slight flavoring of JS, where "nothing" is an actual keyword for null?

    wait, no, there is an actual null in the code too...

    ...what is that "nothing"?

    where does it come from? what is its value? and why?

    or do you have a global var "nothing" defined somewhere which you use instead of null?
Add Comment