subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
OMG_A_CUPCAKE
exvv4c8
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>When you want to be extra sure that a number is equal to 1, you really gotta check it from both sides.<|eor|><|soopr|>Just in case<|eoopr|><|sor|>I'm having an internship at th...
86
programminghorror
budd222
exvqb17
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>This gets all the edge cases<|eor|><|eols|><|endoftext|>
61
programminghorror
hiimsoba
exva2bd
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>When you want to be extra sure that a number is equal to 1, you really gotta check it from both sides.<|eor|><|soopr|>Just in case<|eoopr|><|sor|>I'm having an internship at th...
46
programminghorror
putneyj
exx01ff
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>I once had a senior developer put both a true *and* false check of the same variable back to back in the same if statement...I seriously considered firing them on the spot. They...
34
programminghorror
DraculaGottfried
exxe7mt
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Okay quick question, how acceptable is it for an intern to fuck up? I work at a startup and I made an app (you can check my posting history) and now I'm afraid it might crash w...
31
programminghorror
Geek55
exxdhul
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>I once had a senior developer put both a true *and* false check of the same variable back to back in the same if statement...I seriously considered firing them on the spot. They...
30
programminghorror
fried_green_baloney
exwngev
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Okay quick question, how acceptable is it for an intern to fuck up? I work at a startup and I made an app (you can check my posting history) and now I'm afraid it might crash w...
30
programminghorror
Fitbot5000
exwiizf
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>When you want to be extra sure that a number is equal to 1, you really gotta check it from both sides.<|eor|><|soopr|>Just in case<|eoopr|><|sor|>I'm having an internship at th...
30
programminghorror
jen1980
exwkd9m
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>The intern probably intended ||, not &&, but couldn't remember what operator matches "everything" and the screwed up the boolean.<|eor|><|sor|>That's worse since then it would a...
26
programminghorror
timmyotc
exwq6fa
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Okay quick question, how acceptable is it for an intern to fuck up? I work at a startup and I made an app (you can check my posting history) and now I'm afraid it might crash w...
22
programminghorror
stable_maple
exw28pw
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Is this javascript? Maybe the intern is confused about the differences in =, ==, and ===.<|eor|><|sor|>Flair says kotlin.<|eor|><|eols|><|endoftext|>
18
programminghorror
curtmack
exwxyot
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Nah, it's actually a clever solution. The getter for reviewDismissals is not pure, so it's really checking two subsequent values in a sequence. See? Perfectly good code. No cod...
17
programminghorror
Farfignugen42
exvxsdj
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Is this javascript? Maybe the intern is confused about the differences in =, ==, and ===.<|eor|><|eols|><|endoftext|>
15
programminghorror
DrStalker
exx04dh
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>When you want to be extra sure that a number is equal to 1, you really gotta check it from both sides.<|eor|><|soopr|>Just in case<|eoopr|><|sor|>I'm having an internship at th...
9
programminghorror
urielsalis
exy9eep
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Is this javascript? Maybe the intern is confused about the differences in =, ==, and ===.<|eor|><|sor|>Flair says kotlin.<|eor|><|sor|>I've been using Kotlin more and more at m...
8
programminghorror
shinsukke
exwhmr0
<|sols|><|sot|>Reviewing the code of one of the interns at work when suddenly...<|eot|><|sol|>https://i.redd.it/jk3snf00i8i31.jpg<|eol|><|sor|>Okay quick question, how acceptable is it for an intern to fuck up? I work at a startup and I made an app (you can check my posting history) and now I'm afraid it might crash w...
7
programminghorror
Moe_Baker
j18koq
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|eols|><|endoftext|>
731
programminghorror
i_am_adult_now
g6xy6gy
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|eols|><|endoftext|>
111
programminghorror
RFC793
g6yu65y
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>What you said, but add Factory to the end.<|eor|><|eols|><|endoftext|>
74
programminghorror
Md5Lukas
g6y1vok
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Create new variable with value "client.client.Client" and use it<|eor|><|sor|>But it is called `clIent` Client clIent = client.client.Client; clIent.RemoteEndPoint.Stuff();<|eor|><|eols|><|endoftext|>
54
programminghorror
yaonkey
g6xy7kl
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Create new variable with value "client.client.Client" and use it<|eor|><|eols|><|endoftext|>
50
programminghorror
CollieOop
g6z07xb
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>What you said, but add Factory to the end.<|eor|><|sor|>What kind of monster makes a factory that doesn't i...
26
programminghorror
Nivekk_
g6ycwzg
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>It's the remote end point of the client of the client of the client, what's the problem?? /s<|eor|><|eols|><|endoftext|>
22
programminghorror
BlazingThunder30
g6z7e1b
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>What you said, but add Factory to the end.<|eor|><|sor|>I once encountered a `FactoryFactory`. A teacher wa...
17
programminghorror
tigie11
g6yfjwj
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Create new variable with value "client.client.Client" and use it<|eor|><|sor|>But it is called `clIent` Client clIent = client.client.Client; clIent.RemoteEndPoint.Stuff();<|eor|><|sor|>Didn't saw that last clie...
17
programminghorror
RFC793
g6ypz7z
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Or not enough abstraction considering you have to dig so deep past the interface to do anything useful?<|eor|><|eols|><|endoftext|>
13
programminghorror
RFC793
g6z65s1
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>What you said, but add Factory to the end.<|eor|><|sor|>Impl<|eor|><|sor|>Factory (yes, a factory that prod...
10
programminghorror
TorbenKoehn
g6z5xo0
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>For anyone wondering, yes it's an existing class in the Java Swing library. And yes, it was obvious this is...
9
programminghorror
Henlaz
g6z1pvv
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Heh... InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState<|eor|><|sor|>What you said, but add Factory to the end.<|eor|><|sor|>Impl<|eor|><|eols|><|endoftext|>
8
programminghorror
Nsber
g6ysr3q
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Let me guess. C#?<|eor|><|eols|><|endoftext|>
7
programminghorror
Deutschlands_Kaiser
g6zeqxy
<|sols|><|sot|>Too much abstraction?<|eot|><|sol|>https://i.imgur.com/8wIRsSq.png<|eol|><|sor|>Let me guess. C#?<|eor|><|sor|>[deleted]<|eor|><|sor|>Looks more like C# because of the RemoteEndPoint property<|eor|><|eols|><|endoftext|>
7
programminghorror
Mastergrow
f7ym4a
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|eols|><|endoftext|>
728
programminghorror
Shadew69
fih4s2q
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|eols|><|endoftext|>
178
programminghorror
Mastergrow
figysf3
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|soopr|>This is only a small piece of the code. I was tasked with fixing some bugs from a tetris game that somebody wrote. He used 800 lines of code just to do collision detection. He m...
165
programminghorror
Canonip
fihbw3l
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>DEUTSCHER CODE!! TTET IHN!<|eor|><|eols|><|endoftext|>
98
programminghorror
Klatschen
fihk2gk
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|sor|>Thats true for the code itself but ive experienced that sometimes (for example in some complicated peace of math code or ...
61
programminghorror
Qesa
fii68ug
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>How would Reddit programmers do it better?<|eor|><|sor|>As someone who's never written a Tetris game before: * Game space is a 2d array, which denotes if the cell is either empty ...
55
programminghorror
BOTzzz
fihx6xr
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|soopr|>This is only a small piece of the code. I was tasked with fixing some bugs from a tetris game that somebody wrote. He used 800 lines of code just to do collision detection. He m...
40
programminghorror
whuppo99
fiivrnl
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|soopr|>This is only a small piece of the code. I was tasked with fixing some bugs from a tetris game that somebody wrote. He used 800 lines of code just to do collision detection. He m...
39
programminghorror
Rafael20002000
fihfubc
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>DEUTSCHER CODE!! TTET IHN!<|eor|><|sor|>Ich hole die Mistgabeln und die Fackeln, Hexenjagt?<|eor|><|eols|><|endoftext|>
31
programminghorror
soniq__
fiiq6cs
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Yo I heard you like switch statements, so I put switch statements inside your switch statements<|eor|><|eols|><|endoftext|>
30
programminghorror
Dojan5
fiijcp1
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|sor|>Thats true for the code itself but ive experienced that sometimes (for example in some complicated peace of math code or ...
25
programminghorror
Pradfanne
fihxcb6
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>DEUTSCHER CODE!! TTET IHN!<|eor|><|sor|>Der Bursche hat tatschlich Taster geschrieben. r/de wre stolz auf ihn<|eor|><|eols|><|endoftext|>
23
programminghorror
EmeldemelTV
fihzgtq
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|soopr|>This is only a small piece of the code. I was tasked with fixing some bugs from a tetris game that somebody wrote. He used 800 lines of code just to do collision detection. He m...
22
programminghorror
Dojan5
fiiy9pe
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|sor|>Thats true for the code itself but ive experienced that sometimes (for example in some complicated peace of math code or ...
22
programminghorror
Dojan5
fiiil3y
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>DEUTSCHER CODE!! TTET IHN!<|eor|><|sor|>German cracks me up every time I see it. "Ttet" sounds so ridiculous and non-threatening in Swedish.<|eor|><|eols|><|endoftext|>
21
programminghorror
ObiWanGurobi
fihsyqx
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|sor|>Thats true for the code itself but ive experienced that sometimes (for example in some complicated peace of math code or ...
21
programminghorror
fzammetti
fiiow5u
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>How would Reddit programmers do it better?<|eor|><|sor|>Exactly like this: https://github.com/fzammetti/pocketpc/blob/master/kgarcade/source/common/mini_games/ffopir_sirtet_paehc....
17
programminghorror
loofy2
fihzp9g
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>How would Reddit programmers do it better?<|eor|><|eols|><|endoftext|>
16
programminghorror
nappiestapparatus
fiixhaf
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>Non-english code is instant horror for me tbh<|eor|><|sor|>Thats true for the code itself but ive experienced that sometimes (for example in some complicated peace of math code or ...
15
programminghorror
teckcypher
fiigiex
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|sor|>How would Reddit programmers do it better?<|eor|><|sor|>I'm not a professional programmer, it's more of a hobby that I have from time to time. Also I make scripts at work to automa...
13
programminghorror
Founntain
fiji1vf
<|sols|><|sot|>How to do Tetris collision detection in only 800 lines of code<|eot|><|sol|>https://i.redd.it/7uisztjzcji41.png<|eol|><|soopr|>This is only a small piece of the code. I was tasked with fixing some bugs from a tetris game that somebody wrote. He used 800 lines of code just to do collision detection. He m...
11
programminghorror
Marvin_Guacamole
10qmcz7
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|eols|><|endoftext|>
733
programminghorror
TheBrainStone
j6qwsof
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Looks like someone failed math class<|eor|><|eols|><|endoftext|>
248
programminghorror
Xywzel
j6r9iuz
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Other than the all other unnecessary things, why did they also have to specify the zeros are binary literals with "0b? Are they actually being paid by character and not by line?<|eor|><|eols|><|endof...
235
programminghorror
DonaldHolmers
j6r6o0c
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|eols|><|endoftext|>
134
programminghorror
mroczek123
j6r9jvb
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|eols|><|endoftext|>
103
programminghorror
Shmutt
j6rdaox
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
102
programminghorror
scragar
j6rdu6x
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Other than the all other unnecessary things, why did they also have to specify the zeros are binary literals with "0b? Are they actually being paid by character and not by line?<|eor|><|sor|>My best ...
92
programminghorror
R3D3-1
j6r43yw
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>- Paid by lines of code? - Working at twitter after being purchased by Elon Musk?<|eor|><|eols|><|endoftext|>
77
programminghorror
gabrielesilinic
j6qwunh
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>When you are that bad at math<|eor|><|eols|><|endoftext|>
66
programminghorror
Deadly_chef
j6rliww
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
45
programminghorror
duncte123
j6r1kcr
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Just create a string of the input with a minus sign and then parse to an int?????<|eor|><|eols|><|endoftext|>
44
programminghorror
MJBrune
j6rcsvn
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
43
programminghorror
pxOMR
j6rl7q2
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Just create a string of the input with a minus sign and then parse to an int?????<|eor|><|sor|>Also if you deal with negative numbers a lot you might want to write a web API and set up a kubernetes c...
39
programminghorror
xerxesbeat
j6r8xrh
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>To be fair I believe any compiler could be able to optimize this properly.<|eor|><|sor|>hah, not even close<|eor|><|eols|><|endoftext|>
29
programminghorror
RenaKunisaki
j6slyag
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>Just create a string of the input with a minus sign and then parse to an int?????<|eor|><|sor|>why not multiply by -1? am i missing something?<|eor|><|sor|>The joke.<|eor|><|eols|><|endoftext|>
23
programminghorror
detroitmatt
j6sd5qr
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
23
programminghorror
qwertykg
j6re12w
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
21
programminghorror
gnutrino
j6sixhi
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Technically this function actually calculates `Math.min(0, -input)`. It's not at all clear what it *should* be doing but that's what it does. EDI...
20
programminghorror
SanianCreations
j6redhf
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
18
programminghorror
EvilStevilTheKenevil
j6v27vo
<|sols|><|sot|>Ever wondered how Java handles numbers < 0?<|eot|><|sol|>https://i.redd.it/mro39ru19kfa1.jpg<|eol|><|sor|>It is so hard to write `return -input;`<|eor|><|sor|>Im not sure if every language supports this but multiplying by -1 is always an option<|eor|><|sor|>Yeah but what if it's zero? How you gonna get n...
17
programminghorror
FreedomSka
ycd2w9
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|eols|><|endoftext|>
735
programminghorror
DuckDuck_27417
itlz7qm
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>average python user flexing his list comprehension.<|eor|><|eols|><|endoftext|>
391
programminghorror
Joram_FC
itm6enh
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
241
programminghorror
chickenlollipop
itmlinq
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>average python user flexing his list comprehension.<|eor|><|sor|>Ah yes I use list comprehension to make my code incomprehensible<|eor|><|eols|><|endoftext|>
187
programminghorror
No-Witness2349
itm6xsm
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
104
programminghorror
jvlomax
itmeahv
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
102
programminghorror
ForLackOfABetterNam3
itngqdg
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>average python user flexing his list comprehension.<|eor|><|sor|>Ah yes I use list comprehension to make my code incomprehensible<|eor|><|sor|>List incomprehension<|eor|><|eols|><|endoftext|>
93
programminghorror
dick_rash
itm4hko
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|eols|><|endoftext|>
63
programminghorror
No-Witness2349
itmghdr
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
55
programminghorror
Asleep_Analysis7890
itlghsp
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Kiss her goodbye<|eor|><|eols|><|endoftext|>
44
programminghorror
JestemStefan
itlm3ev
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I would take [::-1] over this abomination every day. BTW you can use: "".join(reversed(string))<|eor|><|eols|><|endoftext|>
37
programminghorror
NullVoidPointer
itm6uy5
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>The nil guard just make this better.<|eor|><|eols|><|endoftext|>
31
programminghorror
luziferius1337
itmfc40
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Never trust any programming language that strays beyond ASCII. Ooh, never would have suspected we had so many raging APL programmers lurking in this sub.<|eor|><|sor|>Thats a rendering thing in their IDE. The proper ope...
24
programminghorror
No-Witness2349
itnxq8o
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
18
programminghorror
Jorgestar29
itn7mq3
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It's says that it returns a str, but it returns a str | None. And that thing in the middle is quite strange<|eor|><|eols|><|endoftext|>
15
programminghorror
zickige_zicke
itmbh5a
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Which font and theme ?<|eor|><|eols|><|endoftext|>
14
programminghorror
jvlomax
itmnzx5
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>The nil guard just make this better.<|eor|><|sor|>It not even that, it checks for an empty string value too<|eor|><|eols|><|endoftext|>
14
programminghorror
thelamestofall
itmljcs
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Never trust any programming language that strays beyond ASCII. Ooh, never would have suspected we had so many raging APL programmers lurking in this sub.<|eor|><|sor|>That's a font ligature...<|eor|><|eols|><|endoftext|...
13
programminghorror
Joram_FC
itmb0xq
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>Can someone explain this and why it's bad?<|eor|><|sor|>It really is a lot of efforts for doing something quite simple. If the goal really is to reverse a string called uid then writing : uid = uid[::-1] is enough. Here...
13
programminghorror
Accurate_Koala_4698
itls8dr
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I would take [::-1] over this abomination every day. BTW you can use: "".join(reversed(string))<|eor|><|sor|>[deleted]<|eor|><|sor|>put str\[::-1\] into a method called reverse\_string(str) o...
13
programminghorror
Linguaphonia
ito22bv
<|sols|><|sot|>Just found this beauty<|eot|><|sol|>https://i.redd.it/l3zt1y45nrv91.png<|eol|><|sor|>> i, _ in enumerate Bruh<|eor|><|eols|><|endoftext|>
12
programminghorror
andrule95
pgfxpc
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|eols|><|endoftext|>
731
programminghorror
RoughedUpEdge
hbb3xlx
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>Apparently baby logic does not compile.<|eor|><|eols|><|endoftext|>
257
programminghorror
ldani7492
hbb9438
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>Someone must have had a bad breakup with a programmer and is only making these to piss programmers off. I see no other explanation.<|eor|><|eols|><|endoftext|>
129
programminghorror
Tungsten_Rain
hbb58vr
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>The boolean values! if (boolean == true). Just don't. Please. if (boolean) And no closing bracket. It's a good thing that's a onesie. That vomitous mass of code needs to be barfed on and...
63
programminghorror
mohragk
hbb3zai
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>Does not compile.<|eor|><|eols|><|endoftext|>
57
programminghorror
JellySp
hbb9h9p
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>Most of these 'nerdy code shirts' have bad code and make real programmers cringe.<|eor|><|eols|><|endoftext|>
54
programminghorror
Durahk
hbbu6fx
<|sols|><|sot|>Baby code<|eot|><|sol|>https://i.imgur.com/MiIk8V5_d.webp?maxwidth=640&shape=thumb&fidelity=medium<|eol|><|sor|>Most of these 'nerdy code shirts' have bad code and make real programmers cringe.<|eor|><|sor|>There's a reason the people designing these are working on T-shirts instead of writing production ...
40