66

Today I checked out a Repo on Github to help a friend.

Holy shit is this code crap!

Basically one single method contains the whole logic.
637 LINES OF PURE AND UTTER DOGSHIT.
SIXHUNDREDTHIRTYSEVEN LINES!
ONE SINGLE UGLY METHOD.

If I have enough time and energy, I will probably create a PR in 2021.

Some people... wtf.

(not my friend's code, he just uses the program)

(Edit: I had to remove the rant and censor names in the image)

Comments
  • 8
    See the edit remark at the bottom:
    There were 2 real names on the picture, I think it's better to not reveal the dev's name.

    And because my name stood on top of the aforementioned method, mine is removed too or otherwise people here would think I am a worthless piece of coding shit. 😉
  • 6
    I agree with @AlexDeLarge's assessment:
    Crotchkick.
  • 9
    Searching likes_nmbr_ValueChanged on GitHub reveales this glorious pile of 💩
  • 2
    @AlexDeLarge Visual studio automatically formats some things...for example, if I ask VS to make a boilerplate method for a button press, it makes_it_like_this and some people are still too lazy to change it
  • 2
    @Sarcaxxo I won't blame him personally, he seems to be relatively new into programming, so I will write him some tips for improvement on the future PR.
    The program itself is quite cool and does what it has to do relatively bug free. 😁
  • 2
    Mental illness affects many.
  • 3
    Purge. That. Drive.
  • 5
    $ git reset --hard <initial commit> && git push -f origin

    or

    $ rm -rf <proj> && git init <proj>

    please...
  • 2
    @justwellbrock How devious! I like your way of thinking.
  • 2
    This aint a clusterfuck, its a compressed fuck. (Preferrably .zip)
  • 5
    Having a method called button1_click_1 should have set the alarm bells ringing!
  • 3
    and the method is called button1_click_1 WOW! PLEASE DESTROY THAT REPO, it is a shame to even call that a code -.-
  • 3
    @gitpush Haha yes... and I forgot to mention that there were about 10 of these EventHandler methods which were created before, but then abandoned because he just created a new handler method.

    So I just deleted all methods with "0 relation".
    Most were like "button1_click1" "button1_click2", "button2_click1".

    Seems like he had no idea on how to bind handlers...
  • 1
    @PonySlaystation I am shocked how your friend is able to even use that software if it has that code, please recommend him a better one so that he doesn't suffer from bugs in the code lol
  • 3
    @gitpush Yeah I will just unfuck this misery and make it great again. 😉
  • 3
    @PonySlaystation see you in 10 years when you are done :P
  • 1
    German?
  • 2
    It’s like I expected to see C# and Visual Studio as soon as you started talking about a 637 line rant.

    Old C# devs are fucking terrible for it.

    I’d say anything prior to 2010 that hasn’t read uncle bob’s clean code/clean coder can be taken out back and shot.

    I’ve had to refactor this shit down time and time again, a method doing a thousand things, with return statements spread apart between massive conditionals that are really child methods... good luck in not finding public static variables spread across controllers in MVC.

    Aaaaanyway, before I loose my cool and go and find one of these devs to beat. @PonySlaystayion: What’s the repo? Open source?

    637 lines isn’t horrific, with resharper I could refactor that down and make sense of it in an hour or so. On a refactoring branch, if it helps.

    I had to learn to do this quickly rather than beat the C# devs... we don’t beat the C# devs.
  • 1
    @AlexDeLarge that’s a C# standard...

    Event handlers: snake,
    Methods: title,
    Properties: camel,
    Private vars: snake
    Local vars: camel,
    Constants: FUCKIT_CASE.

    I’m not defending it, but Microsoft have... it’s ridiculous.
  • 2
    @Sarcaxxo cheers boss...

    Now let’s fix the cunty fucker.

    Also “Form1.cs”, holy shit every time I see this I know I’m in for some nonsense 😂
  • 2
    @BitFlipped the standard came first in CS... Microsoft backed it.
  • 0
    @AlexDeLarge lol and also methods should start with capital letter
  • 1
    @insanealec c#.net 101... circa 2007
  • 2
    @dontbeevil event handlers are discerned from plain methods by fucking the casing.

    The Microsoft docos loosely used to say “fuck it, we can’t be fucked... fuck casing... enjoy your events” - paraphrased.
  • 1
    I write really clean code... BUT I have a project in which I don’t remember how and why but I ended up with a function made of 1200 LoC and never after that I ever said I’m a good coder.
  • 1
    That's one big button click.
Add Comment