subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | FriddyNanz | guqm3tc | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|soopr|>Here is the code:
[https://github.com/SirBlobfis/CrappyTetris](https://github.com/SirBlobfis/CrappyTetris)<|eoopr|><|sor|>Im so angry. You clearly took time to make your code fairly cl... | 38 |
programminghorror | ZylonBane | guqvquz | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>I actually felt sick watching this lol<|eor|><|sor|>That's why you shouldn't watch any kind of lol right after eating.<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | felincaus | guqo07f | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|soopr|>Here is the code:
[https://github.com/SirBlobfis/CrappyTetris](https://github.com/SirBlobfis/CrappyTetris)<|eoopr|><|sor|>Im so angry. You clearly took time to make your code fairly cl... | 36 |
programminghorror | 1over100yy | guqhs11 | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>Tetrislepsy<|eor|><|eols|><|endoftext|> | 35 |
programminghorror | VisibleSignificance | guqxcgi | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>I'm guessing you're just shifting the whole terminal down and then re-draw the "scene"?
I've made a couple terminal games and can tell you the only way to get smooth and snappy animatio... | 34 |
programminghorror | Robyt3 | guqz62s | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>I'm guessing you're just shifting the whole terminal down and then re-draw the "scene"?
I've made a couple terminal games and can tell you the only way to get smooth and snappy animatio... | 23 |
programminghorror | CoderCharmander | guqpwpq | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>So I am not the only one who implemented 1-bit graphics in the terminal. (I was working on a CHIP-8 emulator in C++ on my phone with Termux, so "real" graphics would be a no-go)<|eor|><|s... | 22 |
programminghorror | bionicjoey | guqnt24 | <|sols|><|sot|>Tetris in terminal with print statements *FLASHING WARNING*<|eot|><|sol|>https://v.redd.it/yqtqkiiowjt61<|eol|><|sor|>When you adding vsync?<|eor|><|eols|><|endoftext|> | 21 |
programminghorror | AlexTemina | 11ir41o | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|eols|><|endoftext|> | 2,027 |
programminghorror | MEMES_N_BEANS | jazmg6c | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|eols|><|endoftext|> | 1,842 |
programminghorror | Everspace | jazm4he | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>I think for the purposes of contrivance in a tweet, it's whatever. Sure it could be `return type === 'admin'`, but that's not the point here, it's asking about "early exiting style" or "explicitly ... | 677 |
programminghorror | horpetorcsog | jazny81 | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>const userHasAccess = (type) => type === admin<|eor|><|eols|><|endoftext|> | 358 |
programminghorror | JeEmGu | jazs1zr | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>I am the kinda dev that does not like to grant admin access based on a string<|eor|><|eols|><|endoftext|> | 332 |
programminghorror | CptMisterNibbles | jazp7v5 | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>Right. The sensible type<|eor|><|eols|><|endoftext|> | 266 |
programminghorror | 2ndbasejump | jazu3su | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>const userHasAccess = (type) => type === admin<|eor|><|sor|>const userHasAccess = type => type === admin
Single parameter functions can drop the parens too.<|... | 207 |
programminghorror | bent_my_wookie | jazozgt | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>const userHasAccess = (type) => type === admin<|eor|><|sor|>const userHasAccess = type => type === admin
Single parameter functions can drop the parens too.<|... | 141 |
programminghorror | danfish_77 | jazmth8 | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>I think for the purposes of contrivance in a tweet, it's whatever. Sure it could be `return type === 'admin'`, but that's not the point here, it's asking about "early exiting style" or "explicitly ... | 125 |
programminghorror | xxXaMixx | jazx3va | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|> if (type=='user') {
return false:
}
return true;
/s<|eor|><|eols|><|endoftext|> | 87 |
programminghorror | lose_has_1_o | jb08k8q | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>const userHasAccess = (type) => type === admin<|eor|><|sor|>const userHasAccess = type => type === admin
Single parameter functions can drop the parens too.<|... | 73 |
programminghorror | shall1313 | jaznr2r | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>Glad to say I am type A<|eor|><|sor|>congrats that makes you an idiot
edit: the options presented in the OP have clearly gone over everyones heads whos downvoting. both solutions are bad<|eor|><|s... | 64 |
programminghorror | Daniel15 | jazzgci | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>return type === 'admin';<|eor|><|sor|>'admin' should be an enum instead of a string.
Although in a proper permission system, you'd check if the user has specific permissions rather than just chec... | 59 |
programminghorror | meinkr0phtR2 | jazylz7 | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>I am the kinda dev that does not like to grant admin access based on a string<|eor|><|sor|>Exactly. Im gonna go ahead and be cynical and just make the function return false. Someone wants an easily... | 49 |
programminghorror | ThaiJohnnyDepp | jazmp4o | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>In the type of developer that sneers at programming fonts with ligatures.<|eor|><|eols|><|endoftext|> | 48 |
programminghorror | FlightAffectionate15 | jazmc8w | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>Glad to say I am type A<|eor|><|eols|><|endoftext|> | 46 |
programminghorror | Nickvec | jazm8lu | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>Yeah, I ain't using a Mac either.
Seriously though if I weren't writing collaborative code I'd use way more ternarys.
type === 'admin' ? return true : return false<|eor|><|sor|>No need for a ter... | 42 |
programminghorror | mothzilla | jb0fkan | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>Can be reduced to one line:
function userHasAccess(type) {
return !userDoesNotHaveAccess(type)
}<|eor|><|eols|><|endoftext|> | 40 |
programminghorror | eddhall | jazn4vv | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>[deleted]<|eor|><|sor|>Wouldn't this be switch (true)?<|eor|><|eols|><|endoftext|> | 39 |
programminghorror | JeEmGu | jazwe6g | <|sols|><|sot|>Uh, I guess... I'm another type of developer?<|eot|><|sol|>https://i.redd.it/r7g6ab9g2xla1.jpg<|eol|><|sor|>I am the kinda dev that does not like to grant admin access based on a string<|eor|><|sor|>I mean there's really nothing wrong with this depending on the system. What would you use instead?<|eor|><... | 39 |
programminghorror | Sancho03 | qg4ge7 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|eols|><|endoftext|> | 2,026 |
programminghorror | MunarExcursionModule | hi5btsk | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 483 |
programminghorror | ziptar_ | hi4hkso | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>You are the responsible for global warming<|eor|><|eols|><|endoftext|> | 376 |
programminghorror | AbhiEncoded | hi3vi0u | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Now I have no idea which language this is but how did this guy not think of just assigning k=n*n lmao<|eor|><|eols|><|endoftext|> | 233 |
programminghorror | mustapelto | hi3wg8s | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Now I have no idea which language this is but how did this guy not think of just assigning k=n*n lmao<|eor|><|sor|>Because that would be too easy.
As would be just writing 'return n*n'.
(Edit: messed up my k's and n's... | 167 |
programminghorror | SorryDidntReddit | hi4gij3 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>"If it ain't broke" and other stuff you tell yourself so you don't have to actually learn how to program.<|eor|><|eols|><|endoftext|> | 140 |
programminghorror | MadOverlord | hi4a3ea | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Literally O(n^2)<|eor|><|eols|><|endoftext|> | 127 |
programminghorror | not_a_novel_account | hi5ncu0 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 89 |
programminghorror | Mond_13 | hi4ovj5 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>I've seen code like this.... we make self driving vehicles..... and I have seen code like this....<|eor|><|eols|><|endoftext|> | 62 |
programminghorror | freak_dessert2 | hi3rn1c | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Looks like eclipse + java and they're putting their braces on new lines. That's horror enough<|eor|><|eols|><|endoftext|> | 58 |
programminghorror | RoamingBlobOfAtoms | hi5hhgh | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 58 |
programminghorror | MunarExcursionModule | hi5mjjs | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 55 |
programminghorror | KarlofDuty | hi3vi2i | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Looks like eclipse + java and they're putting their braces on new lines. That's horror enough<|eor|><|sor|>Braces should always be on new lines, you cannot change my opinion<|eor|><|eols|><|endoftext|> | 54 |
programminghorror | ISeeTheFnords | hi4g0gs | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Literally O(n^2)<|eor|><|sor|>Ah, so what we should REALLY be doing is timing how long one iteration takes and then return time\_total/time\_per\_iteration.<|eor|><|eols|><|endoftext|> | 46 |
programminghorror | RoamingBlobOfAtoms | hi5mu7x | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 39 |
programminghorror | IamImposter | hi4zvdf | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>"If it ain't broke" and other stuff you tell yourself so you don't have to actually learn how to program.<|eor|><|sor|>It is deep learning<|eor|><|eols|><|endoftext|> | 37 |
programminghorror | 3n1gma302 | hi3x83v | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Now I have no idea which language this is but how did this guy not think of just assigning k=n*n lmao<|eor|><|sor|>Because that would be too easy.
As would be just writing 'return n*n'.
(Edit: messed up my k's and n's... | 29 |
programminghorror | Der_Wisch | hi3vzcp | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Looks like eclipse + java and they're putting their braces on new lines. That's horror enough<|eor|><|sor|>Braces should always be on new lines, you cannot change my opinion<|eor|><|sor|>I'm in the same camp and can't s... | 29 |
programminghorror | SirNamesAlotx | hi5oyg9 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Interestingly enough, compilers will optimise this code to simply return n*n (At least for C/C++).
The reasoning is:
-Infinite loops are undefined behavior so the compiler is allowed to assume that an infinite loop wi... | 27 |
programminghorror | Due_Entertainment_66 | hi52um2 | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>I've seen code like this.... we make self driving vehicles..... and I have seen code like this....<|eor|><|sor|>Which company you work so i can stay away.<|eor|><|eols|><|endoftext|> | 26 |
programminghorror | Needleroozer | hi59g2q | <|sols|><|sot|>If it works, don't touch it<|eot|><|sol|>https://i.imgur.com/Z4hqNxF.jpg<|eol|><|sor|>Now I have no idea which language this is but how did this guy not think of just assigning k=n*n lmao<|eor|><|sor|>My best guess is a race condition? Slowing the function down so the async processes align again<|eor|><|... | 25 |
programminghorror | Bladertom | st1uhc | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|eols|><|endoftext|> | 2,022 |
programminghorror | Stereojunkie | hx18fsf | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|eols|><|endoftext|> | 592 |
programminghorror | DaviAMSilva | hx1hm1e | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>What if there's 2 cosmic rays?<|eor|><|eols|><|endoftext|> | 234 |
programminghorror | stumblewiggins | hx1lt9r | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>What if there's 2 cosmic rays?<|eor|><|sor|>You fools! If only you'd built it to withstand 3 cosmic rays!<|eor|><|eols|><|endoftext|> | 209 |
programminghorror | tgiyb1 | hx18w7s | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>This trick gives you a couple extra microseconds to dodge your race condition, looks good to me<|eor|><|eols|><|endoftext|> | 146 |
programminghorror | illogicalhawk | hx1bd9c | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>This seems less "programming horror" than "accidental duplicate line" or maybe some artifact of a merge.<|eor|><|eols|><|endoftext|> | 135 |
programminghorror | Encursed1 | hx13bvb | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Always double check your work!<|eor|><|eols|><|endoftext|> | 111 |
programminghorror | nachiket_kanore | hx1c3tm | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>You mean 200% sure<|eor|><|eols|><|endoftext|> | 97 |
programminghorror | rpchill | hx1hv1k | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>You gotta love a good single-event upset.
Why isn't my code working? Must be space's fault.<|eor|><|eols|><|endoftext|> | 96 |
programminghorror | hammer-jon | hx1ce87 | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|> whats with the triple equal sign?<|eor|><|sor|>javascript has == for equal (same value) and === for very equal (same type and value).
You almost always want triple equals.<|eor|><|eols|><|endoftext|... | 90 |
programminghorror | Sindef | hx1flus | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>I mean if you really need to be sure
function responsecode() {
if (response.status === 200) {
if (response.status === 200) {
//Do something
res... | 87 |
programminghorror | Sairina | hx1fvnd | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>This seems less "programming horror" than "accidental duplicate line" or maybe some artifact of a merge.<|eor|><|sor|>merge conflict shenanigans I would wager<|eor|><|eols|><|endoftext|> | 82 |
programminghorror | hammer-jon | hx1dlv8 | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|> whats with the triple equal sign?<|eor|><|sor|>javascript has == for equal (same value) and === for very equal (same type and value).
You almost always want triple equals.<|eor|><|sor|>I meant the e... | 70 |
programminghorror | an4s_911 | hx25hf0 | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>What if there's 2 cosmic rays?<|eor|><|sor|>You fools! If only you'd built it to withstand 3 cosmic rays!<|eor|><|sor|>What if 4 butterflies flapped their win... | 62 |
programminghorror | mgord9518 | hx1dr1b | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|> whats with the triple equal sign?<|eor|><|sor|>javascript has == for equal (same value) and === for very equal (same type and value).
You almost always want triple equals.<|eor|><|sor|>I meant the e... | 59 |
programminghorror | Kyyken | hx1m2xm | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>this is more vulnerable to cosmic rays, they have a bigger time window to strike here and one check failing unexpectedly is enough; this is not redundancy<|eo... | 51 |
programminghorror | MechanicalHorse | hx1da06 | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|> whats with the triple equal sign?<|eor|><|sor|>javascript has == for equal (same value) and === for very equal (same type and value).
You almost always want triple equals.<|eor|><|sor|>I meant the e... | 48 |
programminghorror | Kyyken | hx1quqf | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>this is more vulnerable to cosmic rays, they have a bigger time window to strike here and one check failing unexpectedly is enough; this is not redundancy<|eo... | 36 |
programminghorror | drcforbin | hx2fx6a | <|sols|><|sot|>Just to be 100% sure it is a 200 status...<|eot|><|sol|>https://i.redd.it/97r7v958qzh81.png<|eol|><|sor|>Cosmic ray bit flipping-safe<|eor|><|sor|>What if there's 2 cosmic rays?<|eor|><|sor|>You fools! If only you'd built it to withstand 3 cosmic rays!<|eor|><|sor|>Triple redundancy is good enough for NA... | 35 |
programminghorror | s1nical | gq1lpb | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|eols|><|endoftext|> | 2,020 |
programminghorror | stayclassytally | frqgrnk | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|eols|><|endoftext|> | 513 |
programminghorror | --var | frqa1kt | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>I thought they said online voting couldn't be safe?<|eor|><|eols|><|endoftext|> | 269 |
programminghorror | choose_what_username | frq6ni3 | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Wait.
This is JavaScript.
Is this running on the client side?
Edit: [Apparently it is.](https://www.reddit.com/r/ProgrammerHumor/comments/976qp1/login_code_on_a_real_website/?utm_medium=android_app&utm... | 218 |
programminghorror | null_reference_user | frqe1vu | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>```
if ("true" === "true") {
return false;
}
```
Excuse me, what the fuck?<|eor|><|eols|><|endoftext|> | 155 |
programminghorror | Dustorn | frqmb0p | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>I'm speechless. This can't be real.<|eor|><|sor|>It's almost a work of art - once you think you've found the worst it had to offer, it hands you something even worse.
​
It's sort of beautiful in ... | 124 |
programminghorror | E_N_Turnip | frqpsak | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|sor|>Theory: B-
[Execution: F](https://www.reddit.com/r/ProgrammerHumor/comments/976qp1/login_code_on_a_real_websit... | 121 |
programminghorror | Eugene_V_Chomsky | frqeg8x | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>what, you don't find your house by trying to open every door in town with your key until it works?<|eor|><|eols|><|endoftext|> | 118 |
programminghorror | ShadowPouncer | frrah0t | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|sor|>The fact it's run client side though..
It's not SQL injection if you don't have to inject statements to run it... | 106 |
programminghorror | IAmAnIssue | frq6ujl | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>i hope this function is at least passed a hashed password<|eor|><|sor|>Press X to doubt
X<|eor|><|eols|><|endoftext|> | 96 |
programminghorror | GoddammitDontShootMe | frqkcbp | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>```
if ("true" === "true") {
return false;
}
```
Excuse me, what the fuck?<|eor|><|sor|>Is it that hard to believe the author thought you couldn't have a naked return statement given everything else ... | 70 |
programminghorror | BluudLust | frr23ya | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|sor|>The fact it's run client side though..
It's not SQL injection if you don't have to inject statements to run it... | 66 |
programminghorror | iamasuitama | frqqzxv | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Wait.
This is JavaScript.
Is this running on the client side?
Edit: [Apparently it is.](https://www.reddit.com/r/ProgrammerHumor/comments/976qp1/login_code_on_a_real_website/?utm_medium=android_app&utm... | 58 |
programminghorror | 0x2113 | frqya2w | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>I'm speechless. This can't be real.<|eor|><|sor|>It's so horrible, that it must be real.<|eor|><|sor|>Only if this is 1997<|eor|><|sor|>Oh, belive me, this might as well be 2027. There will *always* be so... | 56 |
programminghorror | m1ch4ll0 | frr8t0e | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|sor|>The fact it's run client side though..
It's not SQL injection if you don't have to inject statements to run it... | 52 |
programminghorror | ShadowPouncer | frraz47 | <|sols|><|sot|>*weird head shaking and facial expression*<|eot|><|sol|>https://i.imgur.com/FiLBwFx.jpg<|eol|><|sor|>Cant be SQL injected if you dont use the user input in the query \*taps brain\*<|eor|><|sor|>The fact it's run client side though..
It's not SQL injection if you don't have to inject statements to run it... | 51 |
programminghorror | thecodinghipster | dwf4d4 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|eols|><|endoftext|> | 2,018 |
programminghorror | neeks84 | f7jcs59 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>Aaaaaaaand Im unemployed<|eor|><|eols|><|endoftext|> | 271 |
programminghorror | SlipperySnatch | f7j6s01 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>Even heroes needs a break once in a while<|eor|><|eols|><|endoftext|> | 92 |
programminghorror | Chowdex | f7jlckz | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The sacred texts!<|eor|><|eols|><|endoftext|> | 80 |
programminghorror | tigie11 | f7jm47k | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>Aaaaaaaand Im unemployed<|eor|><|sor|>You're the guy who is in charge of the servers?<|eor|><|eols|><|endoftext|> | 73 |
programminghorror | Sv443_ | f7jbpt0 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>This is it. Now the world as we know it comes to an end. It's been nice knowing you all.<|eor|><|eols|><|endoftext|> | 65 |
programminghorror | silenceofnight | f7jmqny | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The question? "How do I use printscn?"
/s<|eor|><|eols|><|endoftext|> | 60 |
programminghorror | ProbablyANoobYo | f7jziq3 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The scariest part is they have to fix this without using stack overflow<|eor|><|eols|><|endoftext|> | 47 |
programminghorror | TomBob42369 | f7jopsn | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>News headline "Tech companies fire's 99% of their programmers because they all stopped working."<|eor|><|eols|><|endoftext|> | 46 |
programminghorror | TheMadVanguard | f7kcd3v | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>Aaaaaaaand Im unemployed<|eor|><|sor|>You're the guy who is in charge of the servers?<|eor|><|sor|>He's the guy that needs the servers :D<|eor|><|eols|><|endoftext|> | 45 |
programminghorror | haykam821 | f7jo2gc | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The question? "How do I use printscn?"
/s<|eor|><|sor|>Unfortunately its actually [How do you add an ActionListener onto a JButton in Java](https://stackoverflow.com/questions/284899/how-do-you-add-an-actionliste... | 28 |
programminghorror | fzammetti | f7jpsmm | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>It does raise a legit concern though: SO is obviously a huge repository of collected knowledge. Jokes aside, what happens if it really goes away? Is there maybe an archival download available or something?<|eor|><... | 27 |
programminghorror | Billyblue27 | f7jzvvb | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The question? "How do I use printscn?"
/s<|eor|><|sor|>Unfortunately its actually [How do you add an ActionListener onto a JButton in Java](https://stackoverflow.com/questions/284899/how-do-you-add-an-actionliste... | 27 |
programminghorror | dnswblzo | f7keje9 | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>It does raise a legit concern though: SO is obviously a huge repository of collected knowledge. Jokes aside, what happens if it really goes away? Is there maybe an archival download available or something?<|eor|><... | 24 |
programminghorror | StuckAtWork124 | f7kjsdz | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>It does raise a legit concern though: SO is obviously a huge repository of collected knowledge. Jokes aside, what happens if it really goes away? Is there maybe an archival download available or something?<|eor|><... | 17 |
programminghorror | lxpnh98_2 | f7kogst | <|sols|><|sot|>Dangerous times we live in...<|eot|><|sol|>https://i.redd.it/62j38yo9mpy31.jpg<|eol|><|sor|>The question? "How do I use printscn?"
/s<|eor|><|sor|>Unfortunately its actually [How do you add an ActionListener onto a JButton in Java](https://stackoverflow.com/questions/284899/how-do-you-add-an-actionliste... | 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.