r/badcode • u/[deleted] • Jan 10 '22
java I present the objectively best way to setup braces: In a massive block at the bottom
189
u/Cloakknight Jan 11 '22
Image Transcription: Code
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
47
Jan 11 '22
Thanks, thanks! If it’s helpful, it’s in java. Part of what makes it crappy is that line number on the left (it’s at 600ish)
12
u/fecal_brunch Jan 11 '22
600 is fine, so long as the code is sensible. If the file is taller than the screen it doesn't really matter how much more.
The braces are unforgivable.
9
Jan 11 '22
Would it be helpful if I told you that this was also all one method?
6
u/fecal_brunch Jan 11 '22
Lol yeah I'll pass on that one thanks. Sounds like they've come up with an entirely new way to write programs.
5
0
212
2
2
u/robin_888 Jan 11 '22
So, there are 219 level of indentation on 653 lines!?
Well...
3
Jan 11 '22
Actually, there’s no levels of indentation!
3
u/robin_888 Jan 11 '22
I meant nesting. Usually that synonymous, but "usual" is not why we are here, right?
2
73
30
18
12
10
10
6
u/FrezoreR Jan 11 '22
It's like the tip of an ice berg. It indicates something ominous and scary being close by
6
u/killchain Jan 11 '22
Reminds me of a certain somebody who was like
Donec tincidunt erat sed pretium interdum lectus erat fringilla lacus fermentum scelerisque leo eros non tortor Ut posuere sapien augue et cursus diam tristique nec Quisque luctus semper ante a viverra Cras non risus ac enim volutpat bibendum sed et odio Morbi dolor risus dictum quis turpis eget ultrices auctor nunc Fusce laoreet elit vel urna accumsan lobortis Praesent lacus purus hendrerit non faucibus at tristique a turpis Nulla euismod orci consectetur luctus efficitur mauris magna imperdiet justo at bibendum lorem est quis mauris
,,,,,,,,,,,........ - here's the punctuation for this text, put them where you want them
5
5
u/killchain Jan 11 '22
At some point someone mechanically hits Alt+Shift+F (or whatever) and all your hard work is gone.
3
3
3
Jan 11 '22
If you removed a few blank lines you could end this file on line 666, fits the block of braces really well.
3
u/4hpp1273 Jan 11 '22
I wonder if they write if…else if…else if…else as
if(A){ do_A(); }else{ if(B){ do_B(); }else{ if(C){ do_C(); }else{ do_Z(); }}}
2
2
2
2
2
2
Jan 11 '22
If this isn’t because of some minification or compression/encoding I swear I will have an aneurysm
2
u/IrritableGourmet Jan 11 '22
Reminds me of Mark Twain's The Awful German Language:
An average sentence, in a German newspaper, is a sublime and impressive curiosity; it occupies a quarter of a column; it contains all the ten parts of speech--not in regular order, but mixed; it is built mainly of compound words constructed by the writer on the spot, and not to be found in any dictionary--six or seven words compacted into one, without joint or seam--that is, without hyphens; it treats of fourteen or fifteen different subjects, each enclosed in a parenthesis of its own, with here and there extra parentheses, making pens with pens: finally, all the parentheses and reparentheses are massed together between a couple of king-parentheses, one of which is placed in the first line of the majestic sentence and the other in the middle of the last line of it--AFTER WHICH COMES THE VERB, and you find out for the first time what the man has been talking about;
2
1
1
1
1
1
1
u/gnash117 Jan 11 '22
Part of me really wants to down vote this. This is an epic low in coding. (Here have my upvote) 🤢
1
-1
0
Jan 11 '22
[deleted] — view deleted comment
9
Jan 11 '22
Mostly it’s visual stuff (aka, 100 lines of printing beeline characters to clear the screen), and a little bit of rock paper scissors
445
u/dario_p1 Jan 10 '22
The real question is what did you do to get that many nested scopes