The Abyss



  • 0_1484759620219_16144385_10211706458797986_1957363213_n.jpg

    I think the fact that it ends on a break, it's not even correctly indented and has superfluous newlines is the perfect punchline for this piece of fucking shit.



  • @dstopia Just follow my three-step plan:

    1. Ctrl + A, Ctrl + K, Ctrl + F
    2. Remove extraneous newlines
    3. Slap the developer(s) responsible in the face with a wet trout


  • @RaceProUK said in The Abyss:

    @dstopia Just follow my three-step plan:

    1. Ctrl + A, Ctrl + K, Ctrl + F
    2. Remove extraneous newlines
    3. Slap the developer(s) responsible in the face with a wet trout

    What editor/IDE? I presume this isn't one of the JetBrains IDEs.

    The trout sounds about equivalent though.



  • Wait, does this if-clause actually encapsulate 2,279 lines of code?



  • @Rhywden said in The Abyss:

    Wait, does this if-clause actually encapsulate 2,279 lines of code?

    Holy shit, I just saw that....



  • @lesniakbj said in The Abyss:

    What editor/IDE? I presume this isn't one of the JetBrains IDEs.

    You presume correctly! I'm talking about Visual Studio, which the snippet looks like it is.

    @Rhywden said in The Abyss:

    Wait, does this if-clause actually encapsulate 2,279 lines of code?

    Ah.

    In which case, disregard my previous advice, and do this:
    0_1484761835705_upload-5f1fbd2d-4ee6-4bbb-a7c5-8a159131145f



  • @RaceProUK Not to mention that there seem to be 5,124 lines of code preceding the if-clause...

    ... and I don't really want to place a bet on how many more follow his snippet, considering the level of indentation.



  • @RaceProUK Or, you could just do Ctrl + K, Ctrl + D.



  • @ChaosTheEternal Of course, a simpler method that should work in any IDE is Ctrl+A, Del



  • @ChaosTheEternal TIL a new key sequence for VS :slight_smile:



  • @ChaosTheEternal said in The Abyss:

    @RaceProUK Or, you could just do Ctrl + K, Ctrl + D.

    I'd prefer Ctrl+A, Backspace, Ctrl+S



  • @Rhywden I'd prefer shredding all hard drives that ever contained that code, but you can't always get what you want.



  • The point was the 2.5k lines of code inside the if, yeah. This piece of shit was programmed by people who never knew anything about Java and had been coding in (shitty) C for like 30 years or something.

    The entire thing has no packages. Every class attribute and method is static. Variables are global for no good reason, variables get declared like old K&R C used to work, and this thing opens transactions with no rhyme or reason. I fixed an issue today where it was opening a connection to a service being opened while a connection was already opened, for absolutely no reason at all, if only that whoever slapped that piece of code in there had no idea there was a connection available at that point. Also this connection was being opened and closed at a detail-level processing inside a for loop. It was easy to miss because the code is a jumbled mess. To add insult to injury, this connection was opened in an openConnection() private method that was used EXACTLY ONCE, in that function, and the reason I had to fix it was because it was manually throwing an exception between opening and closing the connection. No try clause or anything. Golly gee.

    This whole thing needs to be burned to the ground. I think cargo culture pushed this piece of shit so far no one ever wanted to take a minimal step back to look at it and see what they were actually working on. They just did patches upon patches for years on end.

    I hate software.



  • @dstopia said in The Abyss:

    The entire thing has no packages

    Oh $deity.

    @dstopia said in The Abyss:

    Every class attribute and method is static

    Oh $deity.

    @dstopia said in The Abyss:

    Variables are global for no good reason

    Oh $deity.

    @dstopia said in The Abyss:

    I think cargo culture pushed this piece of shit so far no one ever wanted to take a minimal step back to look at it and see what they were actually working on. They just did patches upon patches for years on end.

    Get out while you still can!



  • @RaceProUK said in The Abyss:

    Get out while you still can!

    I'm getting out in July, moving to a different country. At least what I actually work on is only tangentially related, and I rarely have to touch this piece of shit. But until then I have to stick it out! At least I got my holiday weeks coming up, still.



  • @dstopia said in The Abyss:

    The point was the 2.5k lines of code inside the if, yeah. This piece of shit was programmed by people who never knew anything about Java and had been coding in (shitty) C for like 30 years or something.

    The entire thing has no packages. Every class attribute and method is static. Variables are global for no good reason, variables get declared like old K&R C used to work

    I inherited a project like that once. C# Winforms app, with 90% of the business logic inside a single 10k line class where everything was public static. And all of the data was stored in global fixed-size arrays with other global variables for the size, as if there wasn't a perfectly good dynamic List<> class already.

    Fortunately, I did have the time and authority to refactor it all to being somewhat sane before releasing it into the world.



  • @UndergroundCode said in The Abyss:

    And all of the data was stored in global fixed-size arrays with other global variables for the size, as if there wasn't a perfectly good dynamic List<> class already.

    Oh YEAH! That totally happens here as well. It's mindblowing.



  • @dstopia Do you happen to work in a SwampShack?



  • @mott555 said in The Abyss:

    @dstopia Do you happen to work in a SwampShack?

    It's actually consulting for one of the biggest telecommunications companies in the country. And equally as stupid when it comes to internal IT, it seems.


  • Winner of the 2016 Presidential Election

    @mott555 said in The Abyss:

    SwampShack

    0_1484771560251_upload-76b02ccc-a2d7-420c-a475-728f5165890d

    Don't really see why you would expect that monstrosity from a Texas Cajun style seafood joint.


    The entire first page of results is that place. I don't live in Texas, haven't shown an interest in it, and the last time I was there was before Google could figure out I was there. Possibly even before I'd heard of Google.


  • Discourse touched me in a no-no place

    @dstopia said in The Abyss:

    I think the fact that it ends on a break

    Grrr… it does if ... else break, a “pattern” that I loathe since it increases the apparent indentation complexity instead of identifying the conditional as a loop iteration precondition (which is a style much easier to understand, I find).

    It's also far too long. I've got some code on that scale and if it wasn't very performance sensitive I'd split it up. (I've also got the performance details for why it shouldn't be split somewhere.) But then it is C and it is a bytecode engine core. Those things break quite a few rules. ;)



  • @dstopia If you need me, I'll be in the bathroom vomiting my guts out for the next ten minutes.

    Brain bleach, where the fuck is the fucking brain bleach?



  • @Dreikin The "SwampShack" reference was a TDWTF inside joke. Read up on Spectate Swamp Desktop Search (SSDS) sometime, but first you'll need to sign some liability waivers and disclaimers. I also recommend a few bottles of your favorite beer and a health insurance plan that covers psychiatric issues.


  • Winner of the 2016 Presidential Election

    @mott555 said in The Abyss:

    I also recommend a few bottles of your favorite beer and a health insurance plan that covers psychiatric issues.

    I don't drink and I have no health insurance. Will that be an issue?


    I know generally about SSDS, but haven't actually read the thread yet and didn't realize you were referencing that.



  • @mott555 Nobody induces psychotic breaks better than this!

    EDIT: Wait, there were two different threads with the same title? And I got the wrong one the frist time? :wtf: ? Anyway, fixed now, for certain values of 'fixed' anyway...


  • Discourse touched me in a no-no place

    @Dreikin said in The Abyss:

    I don't drink and I have no health insurance. Will that be an issue?

    You're probably OK, since it's usually Swampy who seems to have the psychoses.



  • If you need a quick introduction to the, uhm, astonishing sort of programming @SpectateSwamp is known for, my attempt to discern meaning from his source code should get you up to speed. The fact that the effort was a dismal failure may be all you really need to know, though.



  • @Dreikin said in The Abyss:

    @mott555 said in The Abyss:

    I also recommend a few bottles of your favorite beer and a health insurance plan that covers psychiatric issues.

    I don't drink and I have no health insurance. Will that be an issue?

    By the end of the thread, that may change...


  • Impossible Mission Players - A

    @hungrier said in The Abyss:

    @ChaosTheEternal Of course, a simpler method that should work in any IDE is Ctrl+Alt,+ Del

    FTFY.


  • Impossible Mission Players - A

    @Dreikin said in The Abyss:

    I know generally about SSDS, but haven't actually read the thread yet and didn't realize you were referencing that.

    You should totally try it! There was a post relatively recent in the thread where I even found and uploaded the binary (that's one thing it has going for it, it's rather tiny compiled, but enough about dicks) and posted my experiences (the UI is darkish green, so look for those screenshots).



  • @Dreikin said in The Abyss:

    I don't drink and I have no health insurance. Will that be an issue?

    Do you have any rocks with holes in them?


  • Winner of the 2016 Presidential Election

    @boomzilla said in The Abyss:

    @Dreikin said in The Abyss:

    I don't drink and I have no health insurance. Will that be an issue?

    Do you have any rocks with holes in them?

    Ahh...no. Not that I know of. I have the hole from a piece of rock though, if that helps?



  • @boomzilla said in The Abyss:

    @Dreikin said in The Abyss:

    I don't drink and I have no health insurance. Will that be an issue?

    Do you have any rocks with holes in them?

    Here (sitting on my kitchen counter):

    0_1485375210374_upload-ea6349ed-7b1c-4765-aa30-d32ef625b97e

    edit: Think I found that at Stinson Beach (north of SF)


  • Impossible Mission - B

    @Rhywden said in The Abyss:

    @RaceProUK Not to mention that there seem to be 5,124 lines of code preceding the if-clause...

    ... and I don't really want to place a bet on how many more follow his snippet, considering the level of indentation.

    My rule of thumb is that any source file with over 1000 lines is a code smell.



  • @masonwheeler said in The Abyss:

    My rule of thumb is that any source file with over 1000 lines is a code smell.

    You'd love one of our files... 23204 fileslines. And the corresponding header is 12135 lines. No, it's not a generated file.


  • Winner of the 2016 Presidential Election

    @dcon said in The Abyss:

    @masonwheeler said in The Abyss:

    My rule of thumb is that any source file with over 1000 lines is a code smell.

    You'd love one of our files... 23204 files. And the corresponding header is 12135 lines. No, it's not a generated file.

    You have a source file composed of 23204 files? :scream:



  • @dcon said in The Abyss:

    You'd love one of our files... 23204 files

    0_1485475221459_upload-687c1ab6-8659-4141-97e7-461dceebccd8



  • @Dreikin said in The Abyss:

    You have a source file composed of 23204 files? :scream:

    LOL. Fixed.



  • @dcon said in The Abyss:

    And the corresponding header is 12135 lines.

    At least a good portion of it is embedded documentation. Right? Right??


  • Discourse touched me in a no-no place

    @dcon I've got a project with several C source files over 10kloc. Fortunately, we've split the code up so that everything stays below the 20kloc mark…



  • @masonwheeler said in The Abyss:

    My rule of thumb is that any source file with over 1000 lines is a code smell.

    Hang on, let me check... I've got one of 67361, with a header of 3915. And it's far from the only one (well, tbh there are "only" 20 or so files >20k).

    Does the putrid smell of that code reaches you already?



  • Huh, my largest code file is only 6928 lines, and header only 1338 lines. And I've thought both of those are too large.


  • Winner of the 2016 Presidential Election

    My biggest shame (and largest file):

    0_1485522836623_upload-d4eeb8e2-d9db-42a3-9ba7-7fcf1190353d

    It's basically a huge if...else matching a bunch of strings and shoving the data around some other classes (the database comment is actually wrong now, need to update that).

    Ok, I have one larger one on the web side, but my excuse is that including JS files properly is just a huge PITA...



  • @Onyx said in The Abyss:

    Ok, I have one larger one on the web side, but my excuse is that including JS files properly is just a huge PITA...

    Tell me about it :unamused:


  • Discourse touched me in a no-no place

    @PleegWat said in The Abyss:

    only 6928 lines

    I have single functions longer than that.



  • @dkf said in The Abyss:

    @PleegWat said in The Abyss:

    only 6928 lines

    I have single functions longer than that.

    :no_mouth:


  • Discourse touched me in a no-no place

    @RaceProUK Big switch with rather a lot of gotos too, so as to keep the compiled code as small as possible. Very difficult to make smaller without hitting performance problems.



  • @dkf All I can think of now is
    0_1485524168227_upload-e25364a8-ed6c-4d77-9f38-fc2df65c3277


  • Discourse touched me in a no-no place

    @RaceProUK The trick is that you put the spaghetti in a can so that you have less of a mess in the rest of the code.



  • @RaceProUK
    But once the spaghetti code has been massaged for a while, you get:
    0_1485525219327_upload-e181365f-4663-4d06-8078-6602ee547e51

    Filed under: Don't let your memes become dreams


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.