The Abyss
-
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:
- Ctrl + A, Ctrl + K, Ctrl + F
- Remove extraneous newlines
- Slap the developer(s) responsible in the face with a wet trout
-
@RaceProUK said in The Abyss:
@dstopia Just follow my three-step plan:
- Ctrl + A, Ctrl + K, Ctrl + F
- Remove extraneous newlines
- 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?
-
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.
Wait, does this if-clause actually encapsulate 2,279 lines of code?
Ah.
In which case, disregard my previous advice, and do this:
-
@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
-
@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.
-
The entire thing has no packages
Oh $deity.
Every class attribute and method is static
Oh $deity.
Variables are global for no good reason
Oh $deity.
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.
-
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?
-
@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.
-
SwampShack
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.
-
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.
-
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? ? Anyway, fixed now, for certain values of 'fixed' anyway...
-
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.
-
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...
-
@ChaosTheEternal Of course, a simpler method that should work in any IDE is Ctrl+Alt
,+ DelFTFY.
-
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).
-
I don't drink and I have no health insurance. Will that be an issue?
Do you have any rocks with holes in them?
-
@boomzilla 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:
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):
edit: Think I found that at Stinson Beach (north of SF)
-
@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.
-
@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?
-
-
-
And the corresponding header is 12135 lines.
At least a good portion of it is embedded documentation. Right? Right??
-
@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.
-
My biggest shame (and largest file):
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...
-
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
-
-
only 6928 lines
I have single functions longer than that.
-
@RaceProUK Big
switch
with rather a lot ofgoto
s 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
-
@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:
Filed under: Don't let your memes become dreams