subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
elff1493
im29yi1
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>What's the point of Json encryption/decryption?<|eor|><|sor|>That's what I was thinking, isn't JSON 'encrypted' by default by HTTPs protocol?<|eor|><|sor|>If it's stored in a file maybe<|eor|><|eols|><|endoftext|>
13
programminghorror
kmauler_on_kilix
im3w0br
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>you don't even wanna know the length of some ".get().getValue().get()..." chains i have seen<|eor|><|eols|><|endoftext|>
12
programminghorror
RichCorinthian
im1eco5
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>This looks an AWFUL lot like what we wind up with on our current project when we generate Typescript from GraphQL and call it with Apollo queries. The destructuring of an unused variable bothers me, and I hate that ...
11
programminghorror
McAu79
im3x3jf
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>No one's gonna talk about the "hasValidValid" variable cut off by the screenshot?<|eor|><|sor|>Its obviously a valorant program and means hasValidValID. Just bad capitalization /s<|eor|><|eols|><|endoftext|>
9
programminghorror
Shepard_Overflow
im2o7li
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>What's the point of Json encryption/decryption?<|eor|><|sor|>Maybe a JWT? That still leaves many questions, though..<|eor|><|eols|><|endoftext|>
8
programminghorror
EmperorArthur
im3bi53
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>What's the point of Json encryption/decryption?<|eor|><|sor|>That's what I was thinking, isn't JSON 'encrypted' by default by HTTPs protocol?<|eor|><|sor|>Some (large) corporation are insane and don't accept HTTPS as...
8
programminghorror
HanzoFactory
im4p2wk
<|sols|><|sot|>name creativity lvl > 9000<|eot|><|sol|>https://i.redd.it/x8s0a41euak91.jpg<|eol|><|sor|>nonce <|eor|><|sor|>Number used Once. It's a common cryptography primitive. https://en.m.wikipedia.org/wiki/Cryptographic_nonce<|eor|><|sor|>[removed]<|eor|><|sor|>What are you even implying? You think you're funn...
6
programminghorror
ZeroTerabytes
uj34jd
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|eols|><|endoftext|>
819
programminghorror
zerovian
i7hmh4l
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
243
programminghorror
trBlueJ
i7gt6dk
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
212
programminghorror
AttackOfTheThumbs
i7gmy03
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Isn't this just a quicksort of sorts?<|eor|><|eols|><|endoftext|>
187
programminghorror
ZeroTerabytes
i7h0j8r
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
158
programminghorror
shawmonster
i7gva9q
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Isn't this just a quicksort of sorts?<|eor|><|sor|>ya its basically just quicksort edit: wait nvm just saw the pivot is chosen based on the average value between the first and last element of the array. this is b...
141
programminghorror
ZeroTerabytes
i7hmk2z
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
105
programminghorror
DrGrimmWall
i7gln0a
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|soopr|>For some reason, it works lol Here is the sort process of the array `[9, 100, 27, 72, 98, 94, 47, 47]`: `[9, 27, 47, 47] [100, 72, 98, 94]` `[9, 27, 47] [47]` `[9, 27] [47]` `[72, 94] [10...
97
programminghorror
ZeroTerabytes
i7gnfm9
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Isn't this just a quicksort of sorts?<|eor|><|soopr|>Idk man, I just made it in 10 minutes during my study hall<|eoopr|><|eols|><|endoftext|>
67
programminghorror
PaintingJo
i7h0hxo
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Isn't this just a quicksort of sorts?<|eor|><|soopr|>Idk man, I just made it in 10 minutes during my study hall<|eoopr|><|sor|>Instead of making the pivot the average of the first and last elements, you could've j...
54
programminghorror
ZeroTerabytes
i7gkd59
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|soopr|>For some reason, it works lol Here is the sort process of the array `[9, 100, 27, 72, 98, 94, 47, 47]`: `[9, 27, 47, 47] [100, 72, 98, 94]` `[9, 27, 47] [47]` `[9, 27] [47]` `[72, 94] [10...
39
programminghorror
Fat_bruh_Gat
i7gy8tn
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|soopr|>For some reason, it works lol Here is the sort process of the array `[9, 100, 27, 72, 98, 94, 47, 47]`: `[9, 27, 47, 47] [100, 72, 98, 94]` `[9, 27, 47] [47]` `[9, 27] [47]` `[72, 94] [10...
33
programminghorror
pydachs
i7git8f
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>arr[-1] // what the fuck? Edit: // Use arr[arr.length - 1] like a normal person Slytherin wizards More edit: // I didn't know I could offend python coders with a single comment lmao Even more edit as I just ...
32
programminghorror
Sqeaky
i7ifgtq
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Isn't this just a quicksort of sorts?<|eor|><|soopr|>Idk man, I just made it in 10 minutes during my study hall<|eoopr|><|sor|>Instead of making the pivot the average of the first and last elements, you could've j...
29
programminghorror
MrGurns
i7ihipa
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
28
programminghorror
brothermanbaj
i7greqf
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|soopr|>For some reason, it works lol Here is the sort process of the array `[9, 100, 27, 72, 98, 94, 47, 47]`: `[9, 27, 47, 47] [100, 72, 98, 94]` `[9, 27, 47] [47]` `[9, 27] [47]` `[72, 94] [10...
27
programminghorror
TheConservativeTechy
i7gkv0s
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>I don't think this terminates if there are any triplicate values (can't break 3 identical values into arr1 and arr2 separately)<|eor|><|eols|><|endoftext|>
23
programminghorror
break_card
i7gmxgp
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>Looks like my leetcode answers when I realize I haven't even started the code with 2 minutes remaining.<|eor|><|eols|><|endoftext|>
21
programminghorror
TheGhostOfInky
i7gmj19
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|soopr|>For some reason, it works lol Here is the sort process of the array `[9, 100, 27, 72, 98, 94, 47, 47]`: `[9, 27, 47, 47] [100, 72, 98, 94]` `[9, 27, 47] [47]` `[9, 27] [47]` `[72, 94] [10...
21
programminghorror
DrGrimmWall
i7gly1j
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>arr[-1] // what the fuck? Edit: // Use arr[arr.length - 1] like a normal person Slytherin wizards More edit: // I didn't know I could offend python coders with a single comment lmao Even more edit as I just ...
18
programminghorror
ands667
i7h2efd
<|sols|><|sot|>So I made a sorting algorithm<|eot|><|sol|>https://i.redd.it/lyrnffme4px81.png<|eol|><|sor|>It can't properly sort certain arrays. For example, `[0, 1000, 200, 1, 52, 100]`. The first pivot is `50`. So, `1000` is placed into `arr2`. No problems yet. Now, the pivot becomes `550`. `200` is then placed into...
18
programminghorror
S44F4Y4T
enbfss
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|eols|><|endoftext|>
821
programminghorror
JLoon92
fdy1c5i
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>A rule I was taught very early on in programming: never write your own encryption. It applies here.<|eor|><|eols|><|endoftext|>
321
programminghorror
yloose
fdxlkfo
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|eols|><|endoftext|>
125
programminghorror
EternityForest
fdxxyy6
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>The NSA will never break this! Mostly because it will hopefully never be used on anything worth breaking.<|eor|><|eols|><|endoftext|>
119
programminghorror
javasux
fdzva3g
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>A rule I was taught very early on in programming: never write your own encryption. It applies here.<|eor|><|sor|>Beginning programmer here; why is this bad exactly? How i see this is that OP used a self-written salt on an un...
118
programminghorror
cooldude255220
fdy3f0k
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|soopr|>it wont..its same as md5<|eoopr|><|sor|>Thats not an encryption then, its a hash, but when you wrote this you probably didnt know the difference<|...
96
programminghorror
apnorton
fdzvirz
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>A rule I was taught very early on in programming: never write your own encryption. It applies here.<|eor|><|sor|>Beginning programmer here; why is this bad exactly? How i see this is that OP used a self-written salt on an un...
87
programminghorror
S44F4Y4T
fdxlp5v
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|soopr|>it wont..its same as md5<|eoopr|><|eols|><|endoftext|>
64
programminghorror
100GHz
fdyt3t2
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|soopr|>it wont..its same as md5<|eoopr|><|sor|>Thats not an encryption then, its a hash, but when you wrote this you probably didnt know the difference<|...
53
programminghorror
cooldude255220
fdye9bw
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|soopr|>it wont..its same as md5<|eoopr|><|sor|>Thats not an encryption then, its a hash, but when you wrote this you probably didnt know the difference<|...
49
programminghorror
gimli_theone
fdztwfi
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>A rule I was taught very early on in programming: never write your own encryption. It applies here.<|eor|><|sor|>Beginning programmer here; why is this bad exactly? How i see this is that OP used a self-written salt on an un...
43
programminghorror
ChemicalRascal
fdyfgrq
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>How are you supposed to decrypt it when you hashed the password?<|eor|><|soopr|>it wont..its same as md5<|eoopr|><|sor|>Thats not an encryption then, its a hash, but when you wrote this you probably didnt know the difference<|...
39
programminghorror
Mr_Redstoner
fdxxjwy
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>what were you trying to do with the str_replaces?<|eor|><|sor|>Looks like rolling own crypto to me. @ OP: Just don't.<|eor|><|eols|><|endoftext|>
37
programminghorror
flamesofphx
fdy300e
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>Never Roll your own encryption, when you can smoke someone's battle tested premium stash... also I didn't look if that was one way or not, password should never be retrievable by the admin, they should be hash so they can be c...
36
programminghorror
mpinnegar
fe0d3nh
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>A rule I was taught very early on in programming: never write your own encryption. It applies here.<|eor|><|sor|>Beginning programmer here; why is this bad exactly? How i see this is that OP used a self-written salt on an un...
27
programminghorror
skeezixcodejedi
fdyplbq
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>Balls for admitting its your own code. Good man :)<|eor|><|eols|><|endoftext|>
25
programminghorror
warpedspoon
fdxv4w3
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>what were you trying to do with the str_replaces?<|eor|><|eols|><|endoftext|>
24
programminghorror
sim642
fdykvf2
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>An md5 hash won't contain half of the replacements you're doing anyway.<|eor|><|eols|><|endoftext|>
22
programminghorror
MJBrune
fdye7ap
<|sols|><|sot|>From my own code<|eot|><|sol|>https://i.redd.it/urdoeofo47a41.png<|eol|><|sor|>So 1 is converted to x0 then x is converted to xz. So 1 is xz0? Edit: Bleh I missed a step. as /u/joshuapjacob stated z would be converted to yy making the final result xyy0<|eor|><|eols|><|endoftext|>
21
programminghorror
humanbeast7
qg0zxn
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|eols|><|endoftext|>
817
programminghorror
MineAndCraft12
hi3b2h3
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Thankfully Copilot is not designed to replace programmers, but instead designed to augment them; think like how an electric screwdriver augments the abi...
99
programminghorror
evestraw
hi3c659
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>i think it learns from stack overflow questions<|eor|><|eols|><|endoftext|>
79
programminghorror
MineAndCraft12
hi3lzpc
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>i think it learns from stack overflow questions<|eor|><|sor|>It learns from public code repositories on GitHub.<|eor|><|eols|><|endoftext|>
54
programminghorror
serg06
hi3tyte
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Thankfully Copilot is not designed to replace programmers, but instead designed to augment them; think like how an electric screwdriver augments the abi...
38
programminghorror
Eclipsan
hi3z9xw
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Thankfully Copilot is not designed to replace programmers, but instead designed to augment them; think like how an electric screwdriver augments the abi...
22
programminghorror
RaiseRuntimeError
hi4078b
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Thankfully Copilot is not designed to replace programmers, but instead designed to augment them; think like how an electric screwdriver augments the abi...
16
programminghorror
Xineon
hi3kcfo
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Since when a simple meme is programming horror?<|eor|><|eols|><|endoftext|>
12
programminghorror
PeaPanties
hi421w3
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>i think it learns from stack overflow questions<|eor|><|sor|>Or even some SO answers. But to be honest, I'm not seeing jQuery here<|eor|><|eols|><|end...
8
programminghorror
Lieby
hi3r94x
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Since when a simple meme is programming horror?<|eor|><|sor|>Probably because of the way they went about solving it. I am not sure of the particular lan...
7
programminghorror
Craksy
hi42yja
<|sols|><|sot|>GitHub Copilot, the technology that will replace human programmers. Also GitHub Copilot...<|eot|><|sol|>https://i.redd.it/bebure32gqv71.gif<|eol|><|sor|>Thankfully Copilot is not designed to replace programmers, but instead designed to augment them; think like how an electric screwdriver augments the abi...
5
programminghorror
MinerMax555
jieeoo
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|eols|><|endoftext|>
814
programminghorror
fz-09
ga6iuv1
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>*totally disgraceful, should have used a switch/case* \s<|eor|><|eols|><|endoftext|>
217
programminghorror
pathguard
ga6ij5n
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
109
programminghorror
CrisalDroid
ga6dpgg
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|eols|><|endoftext|>
101
programminghorror
glemnar
ga700b0
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>viewPermission and addPermission sound like two entirely different permissions<|eor|><|eols|><|endoftext|>
77
programminghorror
pathguard
ga6l8gl
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
59
programminghorror
pathguard
ga6lyyp
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
45
programminghorror
AyrA_ch
ga6lold
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
41
programminghorror
gmtime
ga6qg6m
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>The overly complicated check us annoying, what is much more of a problem is that apparently view permission means add permission. That's just wr...
38
programminghorror
TheManyMilesWeWalk
ga6kz8q
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>Which is wrong, the function body or the function name? I'm guessing the intern copied and pasted code and missed this little mistake. Edit: I...
34
programminghorror
AltSk0P
ga6t20f
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>Frankly? Not a horror. Not at all. Give it a few years in the industry and you'll see things that'll make you want to pull your hair. Then you'...
30
programminghorror
MinerMax555
ga6kx5h
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
29
programminghorror
TheManyMilesWeWalk
ga6pyhn
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>Which is wrong, the function body or the function name? I'm guessing the intern copied and pasted code and missed this little mistake. Edit: I...
23
programminghorror
Ixaire
ga75wxy
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>viewPermission and addPermission sound like two entirely different permissions<|eor|><|sor|>OWASP #5: Broken Access Control<|eor|><|eols|><|endo...
19
programminghorror
gmtime
ga6qm2i
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>Which is wrong, the function body or the function name? I'm guessing the intern copied and pasted code and missed this little mistake. Edit: I...
16
programminghorror
sim642
ga79s4s
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>viewPermission and addPermission sound like two entirely different permissions<|eor|><|sor|>The real horror in this picture that most people ign...
15
programminghorror
JoyJoy_
ga71fea
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>I smell a fail refactoring. This "if" used to contain more code, maybe some debug prints?<|eor|><|sor|>My guess is that `addPermission` isn't al...
15
programminghorror
PostingHereHurtsMe
ga6rbd8
<|sols|><|sot|>Currently tasked with refactoring code that a intern wrote over the summer. Just found this beauty<|eot|><|sol|>https://i.redd.it/4m9c91hqwfv51.png<|eol|><|sor|>Which is wrong, the function body or the function name? I'm guessing the intern copied and pasted code and missed this little mistake. Edit: I...
14
programminghorror
Elixcore
a9qyhc
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|eols|><|endoftext|>
813
programminghorror
lavahot
eclrayp
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>There's no loop. It just runs once. Not going to get much done that way.<|eor|><|eols|><|endoftext|>
142
programminghorror
nordrasir
ecls87v
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>There's no loop. It just runs once. Not going to get much done that way.<|eor|><|sor|>It runs every time you look at it<|eor|><|eols|><|endoftext|>
107
programminghorror
PM_ME_UR_SHADOWFILE
eclrigv
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>Somebody couldn't pass FizzBuzz, so they started hawking novelty mugs instead<|eor|><|eols|><|endoftext|>
83
programminghorror
webby_mc_webberson
eclwow2
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>"hey Lenny, I think these cups we printed are wrong" "don't worry, Frank. The people most likely to buy these mugs won't know the difference anyway" <|eor|><|eols|><|endoftext...
68
programminghorror
celesti0n
ecm4tvp
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>There's no loop. It just runs once. Not going to get much done that way.<|eor|><|sor|>We cant tell, keepCoding() could be an infinite loop, thereby causing the inevitable death...
55
programminghorror
the2baddavid
ecltbw6
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>Somebody couldn't pass FizzBuzz, so they started hawking novelty mugs instead<|eor|><|sor|>Semi related, one of the funniest things I've seen is enterprise fizz buzz. https://...
45
programminghorror
UnfortunatelyEvil
ecm6nda
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>"hey Lenny, I think these cups we printed are wrong" "don't worry, Frank. The people most likely to buy these mugs won't know the difference anyway" <|eor|><|sor|>"and the peo...
34
programminghorror
ebol4anthr4x
eclw2pr
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>[deleted]<|eor|><|sor|>[deleted]<|eor|><|sor|>Oh, you don't center-align your code?<|eor|><|eols|><|endoftext|>
23
programminghorror
coolreader18
eclz1ti
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|> while (self.isAlive()) { if (self.coffee.isEmpty()) { self.coffee.fill() } self.code() }<|eor|><|eols|><|endoftext|>
17
programminghorror
vigbiorn
ecm6ezv
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>There's no loop. It just runs once. Not going to get much done that way.<|eor|><|sor|>We cant tell, keepCoding() could be an infinite loop, thereby causing the inevitable death...
15
programminghorror
grimmxsleeper
ecm9364
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|> while (self.isAlive()) { if (self.coffee.isEmpty()) { self.coffee.fill() } self.code() }<|eor|><|sor|>So when do you drink the coffee?<|eor|><...
14
programminghorror
wchill
ecm3pzg
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|> while (self.isAlive()) { if (self.coffee.isEmpty()) { self.coffee.fill() } self.code() }<|eor|><|sor|>So when do you drink the coffee?<|eor|><...
13
programminghorror
Ohrion
ecmix0i
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|> while (self.isAlive()) { if (self.coffee.isEmpty()) { self.coffee.fill() } self.code() }<|eor|><|sor|>So when do you drink the coffee?<|eor|><...
11
programminghorror
plexxonic
ecm8jjz
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>Somebody couldn't pass FizzBuzz, so they started hawking novelty mugs instead<|eor|><|sor|>Semi related, one of the funniest things I've seen is enterprise fizz buzz. https://...
9
programminghorror
Sentinull
eclyicc
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>If you have no ice cream I will give you some. I you have none, I will take it away. This is an ice cream koan.<|eor|><|eols|><|endoftext|>
8
programminghorror
mlpedant
eco3cs5
<|sols|><|sot|>If the cup is empty then keep coding, if it's not empty refill it.<|eot|><|sol|>https://i.redd.it/4r8y098nnm621.jpg<|eol|><|sor|>"hey Lenny, I think these cups we printed are wrong" "don't worry, Frank. The people most likely to buy these mugs won't know the difference anyway" <|eor|><|sor|>"and the peo...
8
programminghorror
DrFacha
uzd7rq
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|eols|><|endoftext|>
819
programminghorror
ososalsosal
iaal7g1
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>It's deeply cursed that you can create a function and give it a property that is another function without defining anything as a class<|eor|><|eols|><|endoftext|>
161
programminghorror
MagorTuga
iaa3o8i
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>This works 100% of the time the expected outcome is True.<|eor|><|eols|><|endoftext|>
84
programminghorror
linuxdropout
iab8jws
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>That a bunch of people on here didn't realise this is valid JavaScript, but still spent the effort calling out how horrific the advert is, is a sad example of the state of things in the js world. And before the "...
57
programminghorror
Hikari_Owari
iaap4hs
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>It's deeply cursed that you can create a function and give it a property that is another function without defining anything as a class<|eor|><|sor|>I find it amazing! (cursed but amazing)<|eor|><|eols|><|endoftex...
57
programminghorror
Xirenec_
iab02q7
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>It's deeply cursed that you can create a function and give it a property that is another function without defining anything as a class<|eor|><|sor|>I find it amazing! (cursed but amazing)<|eor|><|sor|>Yeah some o...
47
programminghorror
SHIT-PISSER
iaawqfj
<|sols|><|sot|>Turns out it was valid code<|eot|><|sol|>https://www.reddit.com/gallery/uzd7rq<|eol|><|sor|>Man, javascript is the silliest place.<|eor|><|sor|>Sometimes when I'm feeling silly ill fire up the console and divide true by sixteen or multiply Tim Allen by an object containing all the vowels in the national ...
35