subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
wibblewafs
frg56f0
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>Huh, very interesting. Thanks lol.<|eoopr|><|sor|>What was it? It's deleted now.<|eor|><|sor|>I didn't see the comment, but I assume it's an explanation to why this is the...
24
programminghorror
TheOneTrueTrench
frftfoq
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>It's actually not bracket's fault, it's some quirk of Microsoft's legacy colors iirc. Edit : nope as pointed, not Microsoft's fault ! It's a legacy CSS quirk tho.<|eor|><|sor|>Nope, actually has ...
22
programminghorror
RiktaD
frgc2jo
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>Huh, very interesting. Thanks lol.<|eoopr|><|sor|>What was it? It's deleted now.<|eor|><|sor|>I didn't see the comment, but I assume it's an explanation to why this is the...
16
programminghorror
_TriggerhappyJ_
frfk00g
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>Huh, very interesting. Thanks lol.<|eoopr|><|eols|><|endoftext|>
15
programminghorror
_TriggerhappyJ_
frfl44p
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>Perhaps it would come out the way you expect if you spell it 'grey' instead of 'gray.'<|eor|><|soopr|>Just tried it and either spelling gets the same results. So I guess its just a curse of the he...
12
programminghorror
FM-96
frgw73i
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>Huh, very interesting. Thanks lol.<|eoopr|><|sor|>What was it? It's deleted now.<|eor|><|sor|>> This is one of those things where each colour makes sense on its own, but b...
9
programminghorror
mikeputerbaugh
frgonru
<|sols|><|sot|>'Dark grey' is lighter than 'grey' on Brackets<|eot|><|sol|>https://i.redd.it/wighq4dlw8051.png<|eol|><|sor|>This is a legacy quirk of HTML and early browser technology. [https://medium.com/commitlog/why-dark-gray-is-brighter-than-gray-in-css-138c59ae51c3](https://medium.com/commitlog/why-dark-gray-is-b...
9
programminghorror
evilripper
fqjesh
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|eols|><|endoftext|>
1,325
programminghorror
HildartheDorf
flqud5t
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>The last time this was posted (with actual link to the firmware) you could see from the bug descri...
329
programminghorror
AyrA_ch
flqs968
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>The last time this was posted (with actual link to the firmware) you could see from the bug descri...
326
programminghorror
000yesnt
flqle9z
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|eols|><|endoftext|>
304
programminghorror
AyrA_ch
flqv2f4
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>The last time this was posted (with actual link to the firmware) you could see from the bug descri...
300
programminghorror
crunchyintheory
flqsdww
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>First off, this is literally the explanation for why. Second, there's no such thing as "firmware software"<|eor|><|sor|>Firmsoft wareware<|eor|><|eols|><|endoftext|>
143
programminghorror
adragondil
flqrf1d
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>First off, this is literally the explanation for why. Second, there's no such thing as "firmware software"<|eor|><|eols|><|endoftext|>
139
programminghorror
Farull
flqrlid
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>Not to be that guy but int16 max is 32767 if signed and 65535 unsigned.<|eor|><|eols|><|endoftext|>
130
programminghorror
000yesnt
flqmbez
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>It's probably 16 bits of SMART data, and the way this sounds, the 17th bit is a self-destruct or s...
125
programminghorror
Loading_M_
flqsrsk
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>Not to be that guy but int16 max is 32767 if signed and 65535 unsigned.<|eor|><|sor|>Actually this probably explains it. Their hours of use is probably signed, so when the firmware sees a negative number,...
123
programminghorror
AltSk0P
flrpu8h
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>The last time this was posted (with actual link to the firmware) you could see from the bug descri...
93
programminghorror
ehostunreach
flqm9ps
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>It's probably 16 bits of SMART data, and the way this sounds, the 17th bit is a self-destruct or s...
82
programminghorror
UnchainedMundane
flrkxbm
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>The last time this was posted (with actual link to the firmware) you could see from the bug descri...
70
programminghorror
silentxxkilla
flrmtpj
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>What I think is funny is that they gave us the exact explanation. This came from a Dev and wasn't translated by anyone's pr department. Some dev found the bug and was like oh wow it's going to fail at int...
68
programminghorror
Roticap
flr0116
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>Not to be that guy but int16 max is 32767 if signed and 65535 unsigned.<|eor|><|sor|>Totally to be that guy. int16 is signed uint16 is unsigned<|eor|><|eols|><|endoftext|>
43
programminghorror
Owlstorm
flqnriy
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>... Why should that even be an issue? isn't "X hours of operation" just a bit of SMART data?<|eor|><|sor|>My guess would be an overflow into other data.<|eor|><|eols|><|endoftext|>
36
programminghorror
Needleroozer
flr3tv0
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>Not to be that guy but int16 max is 32767 if signed and 65535 unsigned.<|eor|><|sor|>Actually this probably explains it. Their hours of use is probably signed, so when the firmware sees a negative number,...
34
programminghorror
IntelliDev
flrifn0
<|sols|><|sot|>Coincidence or crap firmware software?<|eot|><|sol|>https://i.redd.it/e8odpbzrrep41.jpg<|eol|><|sor|>Why does it need to record the hours of operation? Does it break itself once it's over warranty?<|eor|><|sor|>Why does my car have an odometer? Does it crash itself once its over warranty?<|eor|><|eols|><...
30
programminghorror
i_abh_esc_wq
q5s6tx
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|eols|><|endoftext|>
1,329
programminghorror
Stormageddon37
hg7skm5
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>Am I stupid or is this the lovechild of an XSS attack and an SQL injection?<|eor|><|eols|><|endoftext|>
531
programminghorror
StenSoft
hg7njew
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This looks like someone was testing for script and SQL injections, and failed.<|eor|><|eols|><|endoftext|>
306
programminghorror
ings0c
hg7tnuo
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This looks like someone was testing for script and SQL injections, and failed.<|eor|><|sor|>I hate it when sql gets in via my xss vulnerability and my browser executes it<|eor|><|eols|><|endoftext|>
173
programminghorror
TimeToBecomeEgg
hg7uy21
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>Am I stupid or is this the lovechild of an XSS attack and an SQL injection?<|eor|><|sor|>the one, the only, the one told of in prophecies thousands of years before<|eor|><|eols|><|endoftext|>
155
programminghorror
ososalsosal
hg7z414
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>Am I stupid or is this the lovechild of an XSS attack and an SQL injection?<|eor|><|sor|>the one, the only, the one told of in prophecies thousands of years before<|eor|><|sor|>Ah yes, the famous Iron Maiden album, `objec...
78
programminghorror
hedgehog125
hg7nqvi
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This is wrong on so many levels<|eor|><|eols|><|endoftext|>
75
programminghorror
denideniz
hg7ykf2
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>is it failed xss attack or a frontend guy tries to implement backend?<|eor|><|eols|><|endoftext|>
68
programminghorror
AndStanleyWasHappy
hg7oe38
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>my answer is </script><|eor|><|eols|><|endoftext|>
67
programminghorror
Bankde
hg854oy
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>Just an another guess: Maybe he got it from his website's logs where the hacker entered a polyglot payload? Polyglot payload is a single payload that could execute on two or more different contexts. For example, I want t...
56
programminghorror
BakuhatsuK
hg8vdxk
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This looks like someone was testing for script and SQL injections, and failed.<|eor|><|sor|>I hate it when sql gets in via my xss vulnerability and my browser executes it<|eor|><|sor|>[Web SQL](https://en.m.wikipedia.org/...
49
programminghorror
prioritypasta
hg83mt2
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>is it failed xss attack or a frontend guy tries to implement backend?<|eor|><|sor|>As a backend, I really hope even a backend guy knows better than to place SQL directly in client-side code.<|eor|><|eols|><|endoftext|>
43
programminghorror
LevelSevenLaserLotus
hg852ta
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>is it failed xss attack or a frontend guy tries to implement backend?<|eor|><|sor|>As a backend, I really hope even a backend guy knows better than to place SQL directly in client-side code.<|eor|><|sor|>Behold, the power...
38
programminghorror
PranshuKhandal
hg83443
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>my answer is </script><|eor|><|sor|>i say </style src=index.html"><|eor|><|eols|><|endoftext|>
37
programminghorror
person66
hg8guqk
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>is it failed xss attack or a frontend guy tries to implement backend?<|eor|><|sor|>As a backend, I really hope even a backend guy knows better than to place SQL directly in client-side code.<|eor|><|sor|>Behold, the power...
30
programminghorror
kiipa
hg8sgxp
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>Am I stupid or is this the lovechild of an XSS attack and an SQL injection?<|eor|><|sor|>It's what we, *in the biz*, call XQLi<|eor|><|eols|><|endoftext|>
21
programminghorror
nkydr0i0lnri9
hg81mm4
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>They just tried to say How `"select * from "`? although that doesn't make much more sense either<|eor|><|eols|><|endoftext|>
18
programminghorror
StuntHacks
hg8lscl
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>is it failed xss attack or a frontend guy tries to implement backend?<|eor|><|sor|>As a backend, I really hope even a backend guy knows better than to place SQL directly in client-side code.<|eor|><|sor|>Behold, the power...
14
programminghorror
lightwhite
hg8905i
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This just smacked my bitch up and me triggered and gleeful at the same time. Who would like to share the relevant xkcd?<|eor|><|eols|><|endoftext|>
12
programminghorror
liljefelt
hg9577d
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This just smacked my bitch up and me triggered and gleeful at the same time. Who would like to share the relevant xkcd?<|eor|><|sor|>https://xkcd.com/327/<|eor|><|eols|><|endoftext|>
11
programminghorror
WikiMobileLinkBot
hg8vfqp
<|sols|><|sot|>Found this old screenshot<|eot|><|sol|>https://i.imgur.com/6sYLrAw.jpg<|eol|><|sor|>This looks like someone was testing for script and SQL injections, and failed.<|eor|><|sor|>I hate it when sql gets in via my xss vulnerability and my browser executes it<|eor|><|sor|>[Web SQL](https://en.m.wikipedia.org/...
8
programminghorror
AyyItsNicMag
ka1qqa
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|eols|><|endoftext|>
1,323
programminghorror
ManCalledNova
gf7sbaw
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|eols|><|endoftext|>
287
programminghorror
AyyItsNicMag
gf7vnb2
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
265
programminghorror
RobotTimeTraveller
gf7vgel
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|sor|>I just imagine some guy opening the door to his office for the first time in 15 months afte...
205
programminghorror
8asdqw731
gf7yepw
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
132
programminghorror
AyyItsNicMag
gf80ou2
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
123
programminghorror
AyyItsNicMag
gf8a3jy
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
77
programminghorror
OneDimensionalVector
gf84o1j
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
69
programminghorror
Bishops_Guest
gf88mok
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|sor|>My first boss would do these. He would write bash scripts by piping ls into emacs and then ...
65
programminghorror
engineertee
gf7ux5i
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>A syntax error would be fun to debug here<|eor|><|eols|><|endoftext|>
56
programminghorror
AyyItsNicMag
gf7x933
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>A syntax error would be fun to debug here<|eor|><|soopr|>There is a ~~syntax~~ logic error, funny enough. Occasionally it returns the incorrect ma...
56
programminghorror
Bishops_Guest
gf813f3
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|sor|>My first boss would do these. He would write bash scripts by piping ls into emacs and then ...
52
programminghorror
DarkblueFlow
gf7uhth
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>"Absolute unit" is a fitting name.<|eor|><|eols|><|endoftext|>
48
programminghorror
fried-noodles_
gf80un1
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>Where are the image transcribers for this one?<|eor|><|eols|><|endoftext|>
44
programminghorror
Bishops_Guest
gf87kv7
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|sor|>My first boss would do these. He would write bash scripts by piping ls into emacs and then ...
31
programminghorror
Jonno_FTW
gf8oyjt
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|soopr|>Forgot to add: the function has a total length of 1024 lines (oddly satisfying for it to be 2\^10 lines, at least compared to the contents of th...
31
programminghorror
Yamoyek
gf872au
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>This has to be generated...right? RIGHT?!<|eor|><|sor|>My first boss would do these. He would write bash scripts by piping ls into emacs and then ...
25
programminghorror
ClvrNickname
gf7yh73
<|sols|><|sot|>When you need the highest value in a set but you're...boycotting loops? Or simply masochistic.<|eot|><|sol|>https://www.reddit.com/gallery/ka1qqa<|eol|><|sor|>Someone is getting paid by the line<|eor|><|eols|><|endoftext|>
21
programminghorror
lescuer97
s2yxb6
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|eols|><|endoftext|>
1,323
programminghorror
lescuer97
hshcc6v
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
267
programminghorror
pleshij
hshe4i7
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>So cheap, I'd use `&&`<|eor|><|eols|><|endoftext|>
227
programminghorror
IanisVasilev
hshhwoa
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
142
programminghorror
Prashank_25
hshevvn
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>I bet it was a mime check at some point then someone removed the different image mimes and left this behind.<|eor|><|eols|><|endoftext|>
99
programminghorror
wowwveryoriginal
hshejk5
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>So cheap, I'd use `&&`<|eor|><|sor|>Why not both<|eor|><|eols|><|endoftext|>
53
programminghorror
YourMJK
hshomcp
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>Checkmate, it's actually a cyrillic 'a' (U+0430) and a cyrillic 'e' (U+0435) in the comparison strings!<|eor|><|eols|><|endoftext|>
52
programminghorror
ReptileCake
hshfror
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>So cheap, I'd use `&&`<|eor|><|sor|>bEcAuSe ThAt WoUlD sLoW iT dOwN<|eor|><|eols|><|endoftext|>
51
programminghorror
TooLateQ_Q
hshmfm7
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
50
programminghorror
morbiiq
hsho0l4
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
41
programminghorror
MinusBrain
hshlv05
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>But what happens if type === 'image' ?<|eor|><|eols|><|endoftext|>
40
programminghorror
iEatPlankton
hshezq5
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>id love to see hows that 'image' used afterwards<|eor|><|sor|>image = image<|eor|><|eols|><|endoftext|>
32
programminghorror
AdminYak846
hshg1ei
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>...b..bu..b..but why???<|eor|><|sor|>probably a stripped down check after the mime type wasn't needed anymore. Smells like a Ctrl + F/Ctrl+ R job more than actually written code.<|eor|><|eols|><|endoftext|>
30
programminghorror
apparently_DMA
hshdsuu
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>id love to see hows that 'image' used afterwards<|eor|><|eols|><|endoftext|>
26
programminghorror
captnkrunch
hshr4df
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>So cheap, I'd use `&&`<|eor|><|sor|>bEcAuSe ThAt WoUlD sLoW iT dOwN<|eor|><|sor|>Efficiency is our upmost concern.<|eor|><|eols|><|endoftext|>
21
programminghorror
lescuer97
hshxhp6
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
17
programminghorror
sternold
hsjr2pt
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>I bet it was a mime check at some point then someone removed the different image mimes and left this behind.<|eor|><|sor|>...mimes?? Tf do mimes have to do with programming??<|eor|><|sor|>https://en.wikipedia.org/wiki/MIME<|e...
16
programminghorror
ReptileCake
hsi7eet
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|sor|>So cheap, I'd use `&&`<|eor|><|sor|>bEcAuSe ThAt WoUlD sLoW iT dOwN<|eor|><|sor|>how tho? does javascr\*pt not do short circuiting?<|eor|><|sor|>Javascr*pt short circutting evaluates from left to right in a chain of && until ...
15
programminghorror
IanisVasilev
hshp897
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
15
programminghorror
StochasticTinkr
hshmidt
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
14
programminghorror
choseusernamemyself
hshuhav
<|sols|><|sot|>Some quality code<|eot|><|sol|>https://i.redd.it/5vd7w61zdgb81.png<|eol|><|soopr|>I work for a company worth 22 Billion dollars, I just found this gem in the code that I maintain. for what I can gather this is a code to paint an svg with css classes so it would check the type of file you would upload an...
13
programminghorror
Bernardiswz
12j2mry
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|eols|><|endoftext|>
1,317
programminghorror
TollyThaWally
jfx0jbp
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|sor|>wait fr?<|eor|><|sor|>Yep. A lot of old games did for that matter as it's faster than an actual pseudorandom number generator, and while it's predictable it's *perceptually* random which is all th...
373
programminghorror
cliserkad
jfwr4ke
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|eols|><|endoftext|>
327
programminghorror
Valmond
jfxo70k
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>return 4;<|eor|><|eols|><|endoftext|>
135
programminghorror
NoLifeGamer2
jfxzlkl
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>What annoys me the most about this is the lack of space after "70",<|eor|><|eols|><|endoftext|>
123
programminghorror
Thenderick
jfxqoo5
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>return 4;<|eor|><|sor|>[// Number was randomly determined by dice roll](https://xkcd.com/221/)<|eor|><|eols|><|endoftext|>
121
programminghorror
nickcash
jfwy5vm
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>Ok, let's roast it. In python3.10 a dict is guaranteed to keep the order ... So it would always return "0". And I loved the "else: None" at the top.<|eor|><|sor|>That's a set, not a dict. They actually don't keep insertion order. Or at leas...
114
programminghorror
GraveSlayer726
jfwz6f7
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|sor|>wait fr?<|eor|><|eols|><|endoftext|>
109
programminghorror
WallstreetChump
jfx301j
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|sor|>wait fr?<|eor|><|sor|>Yep. A lot of old games did for that matter as it's faster than an actual pseudorandom number generator, and while it's predictable it's *perceptually* random which is all th...
75
programminghorror
BobGeneric
jfwwip3
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>Ok, let's roast it. In python3.10 a dict is guaranteed to keep the order ... So it would always return "0". And I loved the "else: None" at the top.<|eor|><|eols|><|endoftext|>
74
programminghorror
Pleasant50BMGForce
jfyb0dy
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>What annoys me the most about this is the lack of space after "70",<|eor|><|sor|>Even compiler is annoyed by it<|eor|><|eols|><|endoftext|>
45
programminghorror
Thriven
jfxeqdx
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|sor|>wait fr?<|eor|><|sor|>Yep. A lot of old games did for that matter as it's faster than an actual pseudorandom number generator, and while it's predictable it's *perceptually* random which is all th...
43
programminghorror
Redingold
jfzbaxz
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>I mean, this is how DOOM did it <|eor|><|sor|>wait fr?<|eor|><|sor|>Yep. A lot of old games did for that matter as it's faster than an actual pseudorandom number generator, and while it's predictable it's *perceptually* random which is all th...
39
programminghorror
concrete_clock
jfxklh8
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>What's bad about this?<|eor|><|sor|>There's a built-in Python library for generating (pseudo) random numbers since Python ~~3.7+~~ 2.7+. Reinventing an already implemented module in an inefficient way that doesn't even properly function(!) is...
38
programminghorror
4hpp1273
jfxemd1
<|sols|><|sot|><|eot|><|sol|>https://i.redd.it/noxtj1q6fcta1.png<|eol|><|sor|>Ok, let's roast it. In python3.10 a dict is guaranteed to keep the order ... So it would always return "0". And I loved the "else: None" at the top.<|eor|><|sor|>That's a set, not a dict. They actually don't keep insertion order. Or at leas...
31