subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
P0L1Z1STENS0HN
gv3wyrx
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>Another alternative would be to learn gardening instead ...<|eor|><|sor|>Perhaps a nice game of chess?<|eor|><|sor|>No, let's play Global Thermonuclear War.<|eor|><|eols|><|endoftext|>
21
programminghorror
wizardwes
gv3tulb
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>Sadly this is the low-level representation of what a bash script would *actually* do. Hence why shell scripting is more of an art than science, and best given to people who have talent.<|eor...
16
programminghorror
Battalist
gv4gh8y
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>Sadly this is the low-level representation of what a bash script would *actually* do. Hence why shell scripting is more of an art than science, and best given to people who have talent.<|eor...
16
programminghorror
Koeke2560
gv539kt
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>The number of layers of unnecessary-ness makes me feel like this was done on purpose as a joke.<|eor|><|sor|>Most of the posts on this sub is code being done on purpose, which is so cringe. ...
15
programminghorror
joex_lww
gv4rra1
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>The number of layers of unnecessary-ness makes me feel like this was done on purpose as a joke.<|eor|><|sor|>Most of the posts on this sub is code being done on purpose, which is so cringe. ...
12
programminghorror
nyaisagod
gv3ux4c
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>This is just trolling.<|eor|><|eols|><|endoftext|>
7
programminghorror
Homailot
gv3xfzb
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>what the hell is this even supposed to do<|eor|><|sor|>[deleted]<|eor|><|sor|>And the fact they already had the condition stored<|eor|><|eols|><|endoftext|>
7
programminghorror
Gilsidoo
gv3amtz
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>what the hell is this even supposed to do<|eor|><|sor|>Exactly what the title says<|eor|><|eols|><|endoftext|>
6
programminghorror
-MazeMaker-
gv5phc2
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>The number of layers of unnecessary-ness makes me feel like this was done on purpose as a joke.<|eor|><|sor|>Most of the posts on this sub is code being done on purpose, which is so cringe. ...
6
programminghorror
UnwantedExplainer
gv41c0i
<|sols|><|sot|>An alternative solution to if (cond) {return null; }<|eot|><|sol|>https://i.redd.it/tpgz22ec25u61.png<|eol|><|sor|>Another alternative would be to learn gardening instead ...<|eor|><|sor|>Perhaps a nice game of chess?<|eor|><|sor|>No, let's play Global Thermonuclear War.<|eor|><|sor|>... Ok.<|eor|><|eol...
5
programminghorror
Hardrocketjs
vmhwj4
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|eols|><|endoftext|>
1,249
programminghorror
glorious_reptile
ie18g4o
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
354
programminghorror
NoLifeGamer2
ie16wnp
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I love how they're like "F\*ck it I'm sure the certificate will be valid."<|eor|><|eols|><|endoftext|>
262
programminghorror
Sonotsugipaa
ie1981l
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>`class AcceptAllCertificatesSignedWithASpecificKeyPublicKey`? More like, `class GivenACertificateThatWasSignedWithAKeyMatchingTheOneSpecifiedAsAStaticMemberDoTellTheCertificateHandlerThatTheCertifica...
153
programminghorror
mohragk
ie1xm38
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
115
programminghorror
gringrant
ie2nfyk
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I love how they're like "F\*ck it I'm sure the certificate will be valid."<|eor|><|sor|>Https: Which certificate did the client use? Server: Yes<|eor|><|eols|><|endoftext|>
112
programminghorror
KingJellyfishII
ie2tuzh
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>also the if (condition) return true; return false; bugs me<|eor|><|eols|><|endoftext|>
99
programminghorror
canicutitoff
ie23jyh
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
95
programminghorror
Sonotsugipaa
ie1j88r
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>`class AcceptAllCertificatesSignedWithASpecificKeyPublicKey`? More like, `class GivenACertificateThatWasSignedWithAKeyMatchingTheOneSpecifiedAsAStaticMemberDoTellTheCertificateHandlerThatTheCertifica...
52
programminghorror
Owlstorm
ie1hkxy
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>`class AcceptAllCertificatesSignedWithASpecificKeyPublicKey`? More like, `class GivenACertificateThatWasSignedWithAKeyMatchingTheOneSpecifiedAsAStaticMemberDoTellTheCertificateHandlerThatTheCertifica...
51
programminghorror
al3xxx_96
ie3d1pv
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>also the if (condition) return true; return false; bugs me<|eor|><|sor|>``` if (condition.toString() == "True") return true; return false; ```<|eor|><|eols|><|endoftext|>
37
programminghorror
siddharth904
ie209yj
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
35
programminghorror
notdeadpool
ie16d1y
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>The longer you look, the worse it gets<|eor|><|eols|><|endoftext|>
34
programminghorror
dmeijboom
ie2a5gv
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>At first I was like whats the issue here? Its just a public key... 30 seconds later I noticed the return true in the validate function. Oops. Thats pretty bad.. <|eor|><|eols|><|endoftext|>
31
programminghorror
svick
ie37qgq
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
23
programminghorror
PyroCatt
ie2sb28
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>"It's an ~~older~~ key sir, but it checks out"<|eor|><|eols|><|endoftext|>
21
programminghorror
LawfulMuffin
ie3vy9c
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>I mean in 99.99% of requests, a valid certificate will be presented. Do you really want to spend time thinking about that 0.01% of times where it's invalid? Doesn't seem like a reasonable use of time ...
16
programminghorror
Dealiner
ie3g592
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>also the if (condition) return true; return false; bugs me<|eor|><|sor|>``` if (condition.toString() == "True") return true; return false; ```<|eor|><|sor|>probably "true" cos java ...
15
programminghorror
All_Up_Ons
ie2zrou
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>`class AcceptAllCertificatesSignedWithASpecificKeyPublicKey`? More like, `class GivenACertificateThatWasSignedWithAKeyMatchingTheOneSpecifiedAsAStaticMemberDoTellTheCertificateHandlerThatTheCertifica...
12
programminghorror
KingJellyfishII
ie3gfiq
<|sols|><|sot|>How many security issues do you want? Yes!<|eot|><|sol|>https://i.redd.it/ssuclvj0lb891.png<|eol|><|sor|>also the if (condition) return true; return false; bugs me<|eor|><|sor|>``` if (condition.toString() == "True") return true; return false; ```<|eor|><|sor|>probably "true" cos java ...
12
programminghorror
SuperSuperUniqueName
etz6xl
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|eols|><|endoftext|>
1,253
programminghorror
stevethedev
ffjicnf
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>He unrolled the loop for better performance!<|eor|><|eols|><|endoftext|>
584
programminghorror
hicklc01
ffjk5iy
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>No horror when learning. Its a teaching moment. A new tool to write better code.<|eor|><|eols|><|endoftext|>
257
programminghorror
SageHunter
ffjtlr7
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>He unrolled the loop for better performance!<|eor|><|sor|>Well, it would perform better.... Assuming the rest of the logic was sane....<|eor|><|sor|>[deleted]<|eor|><|sor|>There would be exactly no benefit beca...
99
programminghorror
Elsolar
ffjqf0b
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>being patient with a newbie programmer like me, how, and what kind of loop would help out the fella over there? If every value in this (I assume) array is different?<|eor|><|sor|>Instead of using strings, use an ...
81
programminghorror
society2-com
ffjit1f
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>oh my god, this can't be real<|eor|><|sor|>it's the difference between "cut down the tree" and "swing axe forward" "swing axe back" "swing axe forward" "swing axe back" "swing axe forward" "swing axe back" "sw...
81
programminghorror
SageHunter
ffk6lzj
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>He unrolled the loop for better performance!<|eor|><|sor|>Well, it would perform better.... Assuming the rest of the logic was sane....<|eor|><|sor|>[deleted]<|eor|><|sor|>There would be exactly no benefit beca...
72
programminghorror
exebixel
ffjhmv0
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>oh my god, this can't be real<|eor|><|eols|><|endoftext|>
57
programminghorror
CJSZ01
ffjl7jf
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>being patient with a newbie programmer like me, how, and what kind of loop would help out the fella over there? If every value in this (I assume) array is different?<|eor|><|eols|><|endoftext|>
56
programminghorror
ougryphon
ffjv94r
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>No horror when learning. Its a teaching moment. A new tool to write better code.<|eor|><|sor|>i remember my intro to cs professor made us do stuff like this (not to this extreme though) before we were formally ta...
39
programminghorror
PurePandemonium
ffjjrxk
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>You don't want to see the shuffle() code<|eor|><|eols|><|endoftext|>
35
programminghorror
ekeyte
ffk5dbl
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>He unrolled the loop for better performance!<|eor|><|sor|>Well, it would perform better.... Assuming the rest of the logic was sane....<|eor|><|sor|>[deleted]<|eor|><|sor|>There would be exactly no benefit beca...
30
programminghorror
eeeBs
ffk72iv
<|sols|><|sot|>From my friend (learning Java)<|eot|><|sol|>https://i.redd.it/au4glmm3o0d41.png<|eol|><|sor|>No horror when learning. Its a teaching moment. A new tool to write better code.<|eor|><|sor|>i remember my intro to cs professor made us do stuff like this (not to this extreme though) before we were formally ta...
20
programminghorror
Groundbreaking_Key20
x3724t
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|eols|><|endoftext|>
1,243
programminghorror
KINGodfather
imntirt
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>#What the fuck is that region name???<|eor|><|eols|><|endoftext|>
305
programminghorror
BritainRitten
imnmmd6
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|eols|><|endoftext|>
137
programminghorror
Flashbek
imnnlnf
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>`minutes2Text("6");`<|eor|><|eols|><|endoftext|>
126
programminghorror
BlobAndHisBoy
impqova
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>`minutes2Text("6");`<|eor|><|sor|>Plot twist, the default case actually does some math and converts it properly with minimal code.<|eor|><|eols|><|endoftext|>
105
programminghorror
PissySnowflake
imnoydg
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|sor|>You use if statements then just do int...
95
programminghorror
lantz83
imnxpak
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>#What the fuck is that region name???<|eor|><|sor|>Some horrible kind of code review is my guess. Gonna need eye bleach after seeing that.<|eor|><|eols|><|endoftext|>
91
programminghorror
thesomebody
imnnqng
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>The biggest horror here is the fact that it only works in the specified increments, i.e. If you put 12 minutes in there, you would get nothing. Whoever makes something like this at a job as a programmer/developer should have a lifetim...
75
programminghorror
warr-den
imnr9r7
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|sor|>You use if statements then just do int...
68
programminghorror
Gold_Sort4895
imnp5v3
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>The biggest horror here is the fact that it only works in the specified increments, i.e. If you put 12 minutes in there, you would get nothing. Whoever makes something like this at a job as a programmer/developer should have a lifetim...
62
programminghorror
FreyrVanir
imp4hc2
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>#What the fuck is that region name???<|eor|><|sor|>Some horrible kind of code review is my guess. Gonna need eye bleach after seeing that.<|eor|><|sor|>https://www.c-sharpcorner.com/article/using-regions-to-improve-code-readability/<|e...
56
programminghorror
melance
impa8j9
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>`minutes2Text("6");`<|eor|><|sor|>Now I really want to see the default case.<|eor|><|eols|><|endoftext|>
27
programminghorror
JayCroghan
impky33
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|sor|>You use if statements then just do int...
27
programminghorror
JayCroghan
impl7kf
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|sor|>You use if statements then just do int...
21
programminghorror
OKishGuy
imntkfz
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I'm a simple programmer - I see VisualBasic, I barf a little in my mouth.<|eor|><|eols|><|endoftext|>
20
programminghorror
mgord9518
imr7uij
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>`minutes2Text("6");`<|eor|><|sor|>Now I really want to see the default case.<|eor|><|sor|>"Invalid time" With no explanation<|eor|><|eols|><|endoftext|>
20
programminghorror
SteptimusHeap
imobcjh
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>The biggest horror here is the fact that it only works in the specified increments, i.e. If you put 12 minutes in there, you would get nothing. Whoever makes something like this at a job as a programmer/developer should have a lifetim...
20
programminghorror
mgord9518
imnox2w
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>return intMinutes > 59 ? Floor(intMinutes/60 ) + Hours : intMinutes + Minutes; Why not this? Take intMinutes as Int or Convert it to Int runtime!<|eor|><|sor|>>Why not this? Because the original programmer obviously had no clue wha...
19
programminghorror
saj1adh007
imno8g1
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>return intMinutes > 59 ? Floor(intMinutes/60 ) + Hours : intMinutes + Minutes; Why not this? Take intMinutes as Int or Convert it to Int runtime!<|eor|><|eols|><|endoftext|>
18
programminghorror
qreilly00
imnyc61
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>I think when you post a programming horror post, there should also be an attempt to show how just a little bit of better code would make it way clearer/more performant/less horrific.<|eor|><|sor|>Nice try. We all know you wrote this ab...
16
programminghorror
thesomebody
imoedus
<|sols|><|sot|>Minutes<|eot|><|sol|>https://i.redd.it/ymzzhdidw8l91.png<|eol|><|sor|>The biggest horror here is the fact that it only works in the specified increments, i.e. If you put 12 minutes in there, you would get nothing. Whoever makes something like this at a job as a programmer/developer should have a lifetim...
16
programminghorror
Adititigro
jbuhcj
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|eols|><|endoftext|>
1,248
programminghorror
armageddon_20xx
g8xwmgh
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>I love the random c!=a; and a!=b; conditionals that do nothing<|eor|><|eols|><|endoftext|>
586
programminghorror
KaranasToll
g8y90e8
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>I love the random c!=a; and a!=b; conditionals that do nothing<|eor|><|sor|>Probably meant to be assertions<|eor|><|eols|><|endoftext|>
175
programminghorror
TheJP_
g8yj2sa
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>I love the random c!=a; and a!=b; conditionals that do nothing<|eor|><|sor|>I'm surprised the IDE hasn't pointed that out in some way or another<|eor|><|eols|><|endoftext|>
115
programminghorror
8BitSpecter
g8xvg5i
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>Let's simplify that there equation bud<|eor|><|eols|><|endoftext|>
88
programminghorror
lrflew
g8z16ev
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>Line 21, there's a `b*100+c*10+b` that should be `b*100+c*10+a`. I mean, the code is *bad*, but that should be what's missing to make it "work". Tell her to add spaces and parentheses.<|eor|><|eols|><...
84
programminghorror
qh4os
g8ysruk
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>I love the random c!=a; and a!=b; conditionals that do nothing<|eor|><|sor|>I'm surprised the IDE hasn't pointed that out in some way or another<|eor|><|sor|>Well Id imagine it would fall under unused ...
80
programminghorror
MathSciElec
g8zswoy
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>I love the random c!=a; and a!=b; conditionals that do nothing<|eor|><|sor|>Probably meant to be assertions<|eor|><|sor|>So most likely a math student, then.<|eor|><|eols|><|endoftext|>
72
programminghorror
sendhelp4206934
g8yjnio
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>What is this supposed to do? I can see what the code does but it seems so random.<|eor|><|eols|><|endoftext|>
67
programminghorror
Adititigro
g8z09jc
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>What is this supposed to do? I can see what the code does but it seems so random.<|eor|><|soopr|>It's supposed to return the sum of all numbers obtained from the combinations of digits of an integer wi...
53
programminghorror
und3rko
g8zerwz
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>For those asking what's going on, after formatting it makes much more sense and it's also easy to read the intention behind. I wouldn't say it's a bad implementation. #include <stdio.h> #i...
49
programminghorror
Skendum
g8ya4c0
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>There is no way this is real.<|eor|><|sor|>I've worked as a TA in a introductionary programming course and I can unfortunatly confirm that students do try to turn in code looking like this or worse pre...
45
programminghorror
larsmaehlum
g8yaiwu
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>Debug it? There would be nothing left!<|eor|><|eols|><|endoftext|>
43
programminghorror
Adititigro
g8yzzh3
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>WORKING AS DESIGNED<|eor|><|soopr|>No, the worst part is that thing doesn't do what it's supposed to do and we had to figure out why. I actually rewrote the whole thing cause I didn't want PTSD from go...
38
programminghorror
dporges
g8xwr72
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>WORKING AS DESIGNED<|eor|><|eols|><|endoftext|>
27
programminghorror
gbushprogs
g8zqopb
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>[deleted]<|eor|><|sor|>I want to know the question they were trying to answer with this code.<|eor|><|eols|><|endoftext|>
27
programminghorror
gbushprogs
g8zrlgo
<|sols|><|sot|>A friend asked me to "debug" her homework<|eot|><|sol|>https://i.redd.it/vs49oqqp8bt51.jpg<|eol|><|sor|>For those asking what's going on, after formatting it makes much more sense and it's also easy to read the intention behind. I wouldn't say it's a bad implementation. #include <stdio.h> #i...
24
programminghorror
McCheesyThePuff
ergey9
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|eols|><|endoftext|>
1,251
programminghorror
richarmeleon
ff3ipej
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>Well yeah. The opening brace for do is missing, then a missing closing parenthesis on if statement on coffee pot empty line. Then an unexpected closing brace before while. I wrote it that way since the do brace is a closi...
251
programminghorror
_xithyl
ff3ka1j
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>This should be the official mug for this subreddit.<|eor|><|eols|><|endoftext|>
173
programminghorror
MiataCory
ff3kgav
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>"When you're awake enough to read this terrible code, you'll recoil in horror and put the cup down, providing you just the perfect amount of perk to your morning."<|eor|><|eols|><|endoftext|>
106
programminghorror
Tom_Ov_Bedlam
ff3l7ry
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>But, .make() is an async function. You're calling refill before it's even returned. <|eor|><|eols|><|endoftext|>
89
programminghorror
Someoneman
ff3zpt4
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>This should be the official mug for this subreddit.<|eor|><|sor|>[removed]<|eor|><|sor|>Scam alert. /u/MotorChipmunk5 is a brand-new account who only has this comment and a couple of copied comments in its history. The fa...
84
programminghorror
vrykolakoi
ff3suzp
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>But, .make() is an async function. You're calling refill before it's even returned. <|eor|><|sor|>let's be real here, make is a blocking function. nothing can get done otherwise.<|eor|><|eols|><|endoftext|>
72
programminghorror
society2-com
ff4ug7y
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>Well yeah. The opening brace for do is missing, then a missing closing parenthesis on if statement on coffee pot empty line. Then an unexpected closing brace before while. I wrote it that way since the do brace is a closi...
56
programminghorror
dzmitry-kamarou
ff3mjd8
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>Is it written in Coffeescript?<|eor|><|eols|><|endoftext|>
51
programminghorror
Smooooooothcriminal
ff3qz3i
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>You pickup the mug. A warning flashes in the cold morning air. In the distance a StackOverflow thread begins to build at the speed of a thousand suns ripping through the crushing darkness of space. Around you, reality be...
38
programminghorror
MattiasInSpace
ff3jzzu
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>[deleted]<|eor|><|sor|>I think that the missing brace was intentional: ``` if(coffeeCup.Empty()) { if(coffeePot.Empty()) coffeePot.Make(); coffeeCup.Refill(); } } while(!workTask.Done()); ``` so that ...
30
programminghorror
MrOctantis
ff3jk7o
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>[deleted]<|eor|><|sor|>I think that the missing brace was intentional: ``` if(coffeeCup.Empty()) { if(coffeePot.Empty()) coffeePot.Make(); coffeeCup.Refill(); } } while(!workTask.Done()); ``` so that ...
27
programminghorror
Pyronic_Chaos
ff42il1
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>This should be the official mug for this subreddit.<|eor|><|sor|>[removed]<|eor|><|sor|>2 hour old account already peddling dropship stuff. Thanks Admins.<|eor|><|eols|><|endoftext|>
19
programminghorror
suffoh
ff3itxx
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>mmmmhhhhh did you try console logging<|eor|><|eols|><|endoftext|>
18
programminghorror
_xithyl
ff3yijb
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>This should be the official mug for this subreddit.<|eor|><|sor|>[removed]<|eor|><|sor|>Thats not the right version<|eor|><|eols|><|endoftext|>
11
programminghorror
GlobalIncident
ff3vffq
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>But, .make() is an async function. You're calling refill before it's even returned. <|eor|><|sor|>let's be real here, make is a blocking function. nothing can get done otherwise.<|eor|><|sor|>I guess the question is whethe...
11
programminghorror
camtarn
ff4m1rd
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>But, .make() is an async function. You're calling refill before it's even returned. <|eor|><|sor|>In async Javascript, idk why I bothered making this. I think I've been doing too much web dev cause this makes sense to me: ...
11
programminghorror
person66
ff4xsic
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>But, .make() is an async function. You're calling refill before it's even returned. <|eor|><|sor|>In async Javascript, idk why I bothered making this. I think I've been doing too much web dev cause this makes sense to me: ...
11
programminghorror
Joniator
ff3mshk
<|sols|><|sot|>My mug won't compile<|eot|><|sol|>https://i.redd.it/cg8073w9yyb41.jpg<|eol|><|sor|>mmmmhhhhh did you try console logging<|eor|><|sor|>[removed]<|eor|><|sor|>Can we talk about the fact that it looks like you have to refill the pot, but don't use the pot to fill the cup? Screams bad design to me<|eor|><|...
10