subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | BLOZ_UP | fc2zk9z | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I'm betting there was `14 *` at some point and because lazy they just removed the `4`.<|eor|><|eols|><|endoftext|> | 42 |
programminghorror | cstheory | fc31dey | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>This is why you don't name constants for their value. That time value should have been inlined, if it's just used once or twice, or it should have a name like RPC_WAIT_MS.<|eor|><|eols|><|endoftext|> | 37 |
programminghorror | Farsqueaker | fc2wday | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>I appreciate that THIRTY\_SECS is zero indexed.<|eor|><|sor|>[deleted]<|eor|><|sor|>It means that you start counting at zero, just like you do when you iterate an array.<|eor|><|eols|><|endoftext|> | 30 |
programminghorror | TheXRTD | fc34dpo | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>This is why you don't name constants for their value. That time value should have been inlined, if it's just used once or twice, or it should have a name like RPC_WAIT_MS.<|eor|><|sor|>At work our build too... | 26 |
programminghorror | Bbradley821 | fc336m6 | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I'm betting there was `14 *` at some point and because lazy they just removed the `4`.<|eor|><|sor|>[deleted]<|eor|><|sor|>It's not really stupid though, just needs a different varia... | 22 |
programminghorror | abigfoney | fc3dhun | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>Thats the kind of code you write after 173 coffees, 837 redbulls and 23 toothpaste tubes.<|eor|><|soopr|>After getting SonarLint to almost crash in the sight of this project, I can only agree<|eoopr|><|sor|... | 19 |
programminghorror | static_motion | fc36f1a | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I'm betting there was `14 *` at some point and because lazy they just removed the `4`.<|eor|><|sor|>[deleted]<|eor|><|sor|>It's not really stupid though, just needs a different varia... | 17 |
programminghorror | AlphaOmega5732 | fc2lkg0 | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>Clearly 14 minutes wasn't enough.<|eor|><|sor|>Actually, it was 14 times too much. But since we're lying to management about why the code is too slow we don't need to worry about accuracy.<|eor|><|sor|>The... | 15 |
programminghorror | Mr_Redstoner | fc3azod | <|sols|><|sot|>Found in production, I have no words<|eot|><|sol|>https://i.redd.it/38flmts4xy641.png<|eol|><|sor|>This is why you don't name constants for their value. That time value should have been inlined, if it's just used once or twice, or it should have a name like RPC_WAIT_MS.<|eor|><|sor|>Actually they get inl... | 11 |
programminghorror | ProcastinationKing27 | y8g15x | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|eols|><|endoftext|> | 1,118 |
programminghorror | perpetuallyawak3 | iszxfff | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>// The class is called Solution and it is a public class<|eor|><|eols|><|endoftext|> | 665 |
programminghorror | Ariquitaun | iszuihc | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>You should consider commenting your comments so you can comment while you comment<|eor|><|eols|><|endoftext|> | 433 |
programminghorror | vainstar23 | it02jv9 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>I think it's ok to comment code if you are still learning and are just walking yourself through the code.
Of course, later on when you're working in a team, over commenting hides good comments and creates ... | 322 |
programminghorror | flow_Guy1 | iszyb7b | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Yes its over commented<|eor|><|eols|><|endoftext|> | 115 |
programminghorror | ProcastinationKing27 | iszuzdh | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>You should consider commenting your comments so you can comment while you comment<|eor|><|soopr|>lol just to make it clearer what each comment means to anyone else reading my code
`// this means that by co... | 108 |
programminghorror | mykeof | iszzdol | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>// The class is called Solution and it is a public class<|eor|><|sor|>The Perd Hapley of comments<|eor|><|eols|><|endoftext|> | 103 |
programminghorror | plaindrops | it01pc0 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Do me a favour and run this with an input of -1<|eor|><|eols|><|endoftext|> | 99 |
programminghorror | Fat_bruh_Gat | it003x3 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>You are just writing down the algorithm a second time with words, making it cluttered and almost worse than without comment. Nothing in that method needs any explaining, anyone can read that from your code.... | 97 |
programminghorror | No_Exchange1363 | it07s1d | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>I think it's ok to comment code if you are still learning and are just walking yourself through the code.
Of course, later on when you're working in a team, over commenting hides good comments and creates ... | 79 |
programminghorror | QueenVogonBee | it09acs | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Everything was commented except for the thing that actually needs a comment: what is the function supposed to actually achieve? All the comments given here are redundant because they just repeat what the co... | 54 |
programminghorror | _CatNippIes | it06ok4 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>// The class is called Solution and it is a public class<|eor|><|sor|>The Perd Hapley of comments<|eor|><|sor|>In africa it takes 60 minutes to get to the next hour
>Osvaldo12 entered the chat<|eor|><|eols... | 52 |
programminghorror | icySquirrel1 | it00z39 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Your friend is correct<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | NullPointerExpert | it03iqr | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Comment intent, not action.<|eor|><|eols|><|endoftext|> | 33 |
programminghorror | paradigmx | it0la6a | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>I think it's ok to comment code if you are still learning and are just walking yourself through the code.
Of course, later on when you're working in a team, over commenting hides good comments and creates ... | 31 |
programminghorror | nekyo | iszzrir | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Depends... If this is your first piece of code ever and you're struggling with syntax - nothing wrong with it.
If you know the syntax then.. Most of this is just clutter that doesn't add any value.
Commen... | 27 |
programminghorror | geon | it18d1j | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>There is a lot of
// Assign 123 to x.
x = 123;
in there. Completely useless, since it just repeats what the code says.
Instead, comment on WHY you do things. You have some of that already.<|eor... | 21 |
programminghorror | Steve_OH | it0b6ks | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>// The class is called Solution and it is a public class<|eor|><|sor|>The Perd Hapley of comments<|eor|><|sor|>In africa it takes 60 minutes to get to the next hour
>Osvaldo12 entered the chat<|eor|><|sor|... | 21 |
programminghorror | hadidotj | it16m87 | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Do me a favour and run this with an input of -1<|eor|><|sor|>Program go brrrrrrrrrr<|eor|><|eols|><|endoftext|> | 20 |
programminghorror | the_pw_is_in_this_ID | it07pti | <|sols|><|sot|>my friend said i was over-commenting<|eot|><|sol|>https://i.redd.it/sty4v5rg6uu91.png<|eol|><|sor|>Depends... If this is your first piece of code ever and you're struggling with syntax - nothing wrong with it.
If you know the syntax then.. Most of this is just clutter that doesn't add any value.
Commen... | 20 |
programminghorror | mieszkkos | uszg1d | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|eols|><|endoftext|> | 1,118 |
programminghorror | RapidCatLauncher | i975aq6 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>Hmm is that a functional programming language?<|eor|><|sor|>It's a dysfunctional one.<|eor|><|eols|><|endoftext|> | 145 |
programminghorror | TwistedSoul21967 | i96ubha | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>No.<|eor|><|eols|><|endoftext|> | 105 |
programminghorror | purbub | i970agp | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>Hmm is that a functional programming language?<|eor|><|eols|><|endoftext|> | 84 |
programminghorror | Xmgplays | i97vkiy | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>Hmm is that a functional programming language?<|eor|><|sor|>It's agda, a dependently typed programming language, which uses a *lot* of Unicode(ex. ``, ``, `` and `gcd[m,n]0n0`)<|eor|><|eols|><|endoftext|> | 38 |
programminghorror | DC38x | i979936 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>what language is that!<|eor|><|sor|>C:)<|eor|><|eols|><|endoftext|> | 32 |
programminghorror | BakuhatsuK | i97epdo | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>This is Agda right? ML-style languages nowadays tend to have pretty good Unicode support, I think you can do something like this in purescript as well<|eor|><|eols|><|endoftext|> | 26 |
programminghorror | mieszkkos | i97hyl3 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>what language is that!<|eor|><|soopr|>Agda<|eoopr|><|eols|><|endoftext|> | 24 |
programminghorror | Deadly_chef | i97mcur | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>what language is that!<|eor|><|sor|>C:)<|eor|><|sor|>C smile?
Can it compete with the likes of holy C?<|eor|><|eols|><|endoftext|> | 24 |
programminghorror | notretarded_100 | i96yxii | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>what language is that!<|eor|><|eols|><|endoftext|> | 23 |
programminghorror | bearbarebere | i96yf95 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>No.<|eor|><|sor|><|eor|><|eols|><|endoftext|> | 22 |
programminghorror | TwistedSoul21967 | i98e605 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>No.<|eor|><|sor|>!No<|eor|><|sor|><|eor|><|eols|><|endoftext|> | 22 |
programminghorror | LowKeyOhGee | i975itg | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>Please stop the Earth, Id like to get off now.<|eor|><|eols|><|endoftext|> | 18 |
programminghorror | Future-Freedom-4631 | i98cup5 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>No.<|eor|><|sor|>!No<|eor|><|eols|><|endoftext|> | 18 |
programminghorror | mieszkkos | i97iyom | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>This is Agda right? ML-style languages nowadays tend to have pretty good Unicode support, I think you can do something like this in purescript as well<|eor|><|soopr|>Thats right. But what I found especially... | 17 |
programminghorror | Liesmith424 | i97b1cs | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>You were so busy wondering if you *could*, that you never stopped to think if you *should*.<|eor|><|eols|><|endoftext|> | 16 |
programminghorror | ice1Hcode | i97c9b7 | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>This is both offensive and disgusting. Take my upvote damn it<|eor|><|eols|><|endoftext|> | 13 |
programminghorror | Future-Freedom-4631 | i98i25v | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>No.<|eor|><|sor|>!No<|eor|><|sor|><|eor|><|sor|>!Yes<|eor|><|eols|><|endoftext|> | 10 |
programminghorror | Tr4kt_ | i97quft | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>I dont. hate it. I just hate my self for not hating it.<|eor|><|eols|><|endoftext|> | 9 |
programminghorror | Patsonical | i9875go | <|sols|><|sot|>Finally, Type safe emoji programming<|eot|><|sol|>https://i.redd.it/juv86rffhe091.jpg<|eol|><|sor|>I hate it that I instantly recognised it as Agda.
And I hate it more that it makes perfect sense xD<|eor|><|eols|><|endoftext|> | 5 |
programminghorror | Latinolova | dpn36x | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|eols|><|endoftext|> | 1,122 |
programminghorror | dullbananas | f5wqp88 | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>They were obviously paid by the line.<|eor|><|eols|><|endoftext|> | 378 |
programminghorror | mirthcontrol | f5wpu4h | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>We drink.<|eor|><|eols|><|endoftext|> | 241 |
programminghorror | SpaceGenesis | f5wn9wx | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|eols|><|endoftext|> | 204 |
programminghorror | gnutrino | f5wnntz | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>Who said we don't go insane?<|eor|><|eols|><|endoftext|> | 121 |
programminghorror | counterweight7 | f5wq53p | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>Is this simply trying to do Is_ddo = not is_ddo?<|eor|><|eols|><|endoftext|> | 91 |
programminghorror | Moulinoski | f5wzryj | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>They were obviously paid by the line.<|eor|><|sor|>Are there places that do this? Pay programmers by how many lines they produce? It sounds like such a sure fire way to ensure your application is ... | 87 |
programminghorror | Latinolova | f5wllj3 | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|soopr|>Not only is the code base littered with these little nuggets of goodness, one guy has been creating and merging pull requests with no reviewers for the last month!<|eoopr|><|eols|><|endoftext|> | 84 |
programminghorror | mirthcontrol | f5wpvdt | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>We drink.<|eor|><|sor|>It doesn't work. We still go insane.<|eor|><|eols|><|endoftext|> | 77 |
programminghorror | Tsunami6866 | f5yegms | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>They were obviously paid by the line.<|eor|><|sor|>[deleted]<|eor|><|sor|>Where
Do
I
Ap
P
Ly
?<|eor|><|eols|><|endoftext|> | 63 |
programminghorror | Marzhall | f5xdtjf | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>They were obviously paid by the line.<|eor|><|sor|>Are there places that do this? Pay programmers by how many lines they produce? It sounds like such a sure fire way to ensure your application is ... | 60 |
programminghorror | Odianus | f5wplq9 | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>Who said we don't go insane?<|eor|><|sor|>don't forget stress-induced burnout<|eor|><|eols|><|endofte... | 49 |
programminghorror | iamsooldithurts | f5x0a0l | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>Actually, realizing that some programmers dont know what the fuck theyre actually doing was a huge br... | 46 |
programminghorror | lanemik | f5wsyfu | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>You need to send him a keyboard with a working `!` key. Poor guy.<|eor|><|eols|><|endoftext|> | 42 |
programminghorror | javarouleur | f5wrmo0 | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>I wonder how professional programmers deal with legacy code without going insane.<|eor|><|sor|>/taps side of head
You can't **go** insane if you're insane to start with!<|eor|><|eols|><|endoftext... | 37 |
programminghorror | javarouleur | f5wsaqm | <|sols|><|sot|>Just inherited this nastiness from an off shore team<|eot|><|sol|>https://imgur.com/GUFvHJ8.jpg<|eol|><|sor|>It's a lot of code but I think the crux is maybe that the dev doesn't know that `setState` is asynchronous...
I have an urge to post what this should be... the whole function should just be this.... | 33 |
programminghorror | Mucksh | mhbw6n | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|eols|><|endoftext|> | 1,120 |
programminghorror | SilverTroop | gsxy6ih | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|eols|><|endoftext|> | 135 |
programminghorror | 500_internal_error | gsy0085 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|sor|>Nice, finally a code with function names that make sense.<|eor|><|eols|><|endoftext|> | 128 |
programminghorror | 500_internal_error | gsy6jp0 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|sor|>Nice, finally a code with function names that make sense.<|eor|><|sor|>Go throw yourself<|eor|><|sor|>Sure
public ... | 105 |
programminghorror | jumbo53 | gsxyoa8 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|eols|><|endoftext|> | 62 |
programminghorror | AnalSwordfish | gsy335t | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>The real travesty is 8-char indentation. <|eor|><|eols|><|endoftext|> | 54 |
programminghorror | SilverTroop | gsy2ffd | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|sor|>Nice, finally a code with function names that make sense.<|eor|><|sor|>Go throw yourself<|eor|><|eols|><|endoftext|> | 53 |
programminghorror | timeIsAllitTakes | gsy2kl3 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Why do I feel like TryHarder is try forever if fails?<|eor|><|eols|><|endoftext|> | 52 |
programminghorror | status_200_ok | gsy3rtf | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>I'm sure the coder must have watched 10s hours of motivational videos on YouTube before writing this epic.<|eor|><|eols|><|endoftext|> | 50 |
programminghorror | CeeBYL | gsxz2wf | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>lol wth is this<|eor|><|eols|><|endoftext|> | 40 |
programminghorror | Mucksh | gsyep4m | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Can someone explain why?<|eor|><|soopr|>tryhard seems too be a generic extension method that tries the different functions in the parameter until one is successfull or if none the ... | 37 |
programminghorror | RagingCeltik | gsynq9d | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>What's next - `TryHarderer()`?<|eor|><|sor|>TryHardWithAVengence()<|eor|><|eols|><|endoftext|> | 34 |
programminghorror | killchain | gsyehw6 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|sor|>Nice, finally a code with function names that make sense.<|eor|><|sor|>Go throw yourself<|eor|><|sor|> Exception up ... | 32 |
programminghorror | 655321cesar | gsy40vm | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>If they try that hard, i really hope there is a catch somewhere<|eor|><|sor|>CatchHarder was not implemented yet<|eor|><|eols|><|endoftext|> | 30 |
programminghorror | Mucksh | gsydzmf | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Why do I feel like TryHarder is try forever if fails?<|eor|><|soopr|>it won't but it could if setting differen parameters :)<|eoopr|><|eols|><|endoftext|> | 29 |
programminghorror | 500_internal_error | gsz0reg | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|sor|>Yes<|eor|><|sor|>Nice, finally a code with function names that make sense.<|eor|><|sor|>Go throw yourself<|eor|><|sor|>Sure
public ... | 25 |
programminghorror | AnalSwordfish | gsy1djo | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|><<<>>>>><<<>><<>><>><>
Sometimes I hate generics.<|eor|><|sor|>This is nothing.<|eor|><|eols|><|endoftext|> | 22 |
programminghorror | gonzofish | gsz1s1y | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>The real travesty is 8-char indentation. <|eor|><|sor|>And the curly brace not on a new line.<|eor|><|sor|>How dare you<|eor|><|eols|><|endoftext|> | 22 |
programminghorror | blu-7 | gsy0oi5 | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>If they try that hard, i really hope there is a catch somewhere<|eor|><|eols|><|endoftext|> | 18 |
programminghorror | Mucksh | gsydrsx | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Is this from a real codebase??<|eor|><|soopr|>yes and somehow i feel tempted just to leave it<|eoopr|><|eols|><|endoftext|> | 18 |
programminghorror | 1thief | gsyj61k | <|sols|><|sot|>Sometimes to try hard is not enough and you have to try harder<|eot|><|sol|>https://i.redd.it/0m1y7hbcleq61.png<|eol|><|sor|>Why do I feel like TryHarder is try forever if fails?<|eor|><|sor|>TryUntilDeath<|eor|><|eols|><|endoftext|> | 18 |
programminghorror | az3arina | 11anbjl | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|eols|><|endoftext|> | 1,117 |
programminghorror | v_maria | j9szci0 | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>won't work for strings with a negative size<|eor|><|eols|><|endoftext|> | 344 |
programminghorror | Ss310_alpha | j9tbw66 | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>Why call s.length() in for loop, recursively call stringSize function<|eor|><|eols|><|endoftext|> | 195 |
programminghorror | jaerie | j9u1g2y | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|> function stringSize(String s)
{
if (!s.length()) return 0
return 1 + stringSize(s[1:])
}
function stringSize(String s)
{
switch(s.length())
{
... | 179 |
programminghorror | leosadovsky | j9szvjv | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>No gotos and recursive calls. Boring<|eor|><|eols|><|endoftext|> | 148 |
programminghorror | Familiar_Ad_8919 | j9t0o6r | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>won't work for strings with a negative size<|eor|><|sor|>just iterate negative times, simple<|eor|><|eols|><|endoftext|> | 145 |
programminghorror | kaerfkeerg | j9t1xk1 | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>Ok but why<|eor|><|sor|>To get the length of a string obviously<|eor|><|eols|><|endoftext|> | 86 |
programminghorror | magnetichira | j9v5dl6 | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|> function stringSize(String s)
{
if (!s.length()) return 0
return 1 + stringSize(s[1:])
}
function stringSize(String s)
{
switch(s.length())
{
... | 66 |
programminghorror | louis8799 | j9tagut | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>Never use for loop to do something like that, you should use recursion instead.<|eor|><|eols|><|endoftext|> | 57 |
programminghorror | LongerHV | j9tco8a | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>won't work for strings with a negative size<|eor|><|sor|>Just let the i overflow<|eor|><|eols|><|endoftext|> | 56 |
programminghorror | Eze-Wong | j9vuafh | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|> function stringSize(String s)
{
if (!s.length()) return 0
return 1 + stringSize(s[1:])
}
function stringSize(String s)
{
switch(s.length())
{
... | 55 |
programminghorror | Cybasura | j9tiwju | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>The fact that you even used .length() is the icing on the cake<|eor|><|eols|><|endoftext|> | 50 |
programminghorror | _pelya | j9u36il | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>I've improved your code somewhat.
public static Long stringSize (String S) {
long s = 0;
try {
for (;;s++) {
S.charAt(s);
}
} catch (Object e) {
return Lo... | 38 |
programminghorror | Sodium1111 | j9tfbvm | <|sols|><|sot|>I think I made it more readable<|eot|><|sol|>https://i.redd.it/xpdlh2zac5ka1.jpg<|eol|><|sor|>This isnt concurrently safe, try again<|eor|><|eols|><|endoftext|> | 33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.