subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | radboss92 | gwx9c7r | <|sols|><|sot|>Wondered why the B&Q website was logging `true` to the console on every page<|eot|><|sol|>https://i.redd.it/xovhgv0xx2x61.png<|eol|><|sor|>Did they mean to put 1/10? I mean it wouldn't be the 10th visitor but it'd on average be every 10th person<|eor|><|sor|>!(Date.now() % 10) would be more evenly distri... | 28 |
programminghorror | SirButcher | gwy85pu | <|sols|><|sot|>Wondered why the B&Q website was logging `true` to the console on every page<|eot|><|sol|>https://i.redd.it/xovhgv0xx2x61.png<|eol|><|sor|>`async function checkTenth() {`
`var ids = await query("SELECT id FROM visitorlog");`
`var maxid = Math.max(...ids);`
`if ((maxid + 1) % 10 == 0) {`
`console.log(... | 21 |
programminghorror | ZylonBane | gwxd4eu | <|sols|><|sot|>Wondered why the B&Q website was logging `true` to the console on every page<|eot|><|sol|>https://i.redd.it/xovhgv0xx2x61.png<|eol|><|sor|>[deleted]<|eor|><|sor|>Maybe they set it to this "temporarily" to test the output, and then forgot to set it back to the intended value?<|eor|><|sor|>My hypothesized ... | 19 |
programminghorror | pxOMR | i75262 | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|eols|><|endoftext|> | 2,213 |
programminghorror | chudleyjustin | g0ztu53 | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>At least you could find Apple documentation for what youre trying to do...Ive been wanting to develop a piece of software specific for Mac OS, and It seems that even Apple themselves doesnt have documentation for Mac development!<... | 493 |
programminghorror | pxOMR | g0zucur | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>At least you could find Apple documentation for what youre trying to do...Ive been wanting to develop a piece of software specific for Mac OS, and It seems that even Apple themselves doesnt have documentation for Mac development!<... | 101 |
programminghorror | NicoPela | g0zsmbr | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Why:
1. Don't expect a `main`-esque function to actually return its result code - NSApplicationMain results in user code being invoked which might never make it back to that point. This return code is likely there for legacy reas... | 77 |
programminghorror | phoenix_bright | g101njz | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>I understand that its a matter if supporting legacy stuff, but I thought it was funny. Was hoping to read something like:
AppKit itself ignores NsApplicationMain, if you want to run the main function then call the main function i... | 36 |
programminghorror | Kaze_Senshi | g0zuhws | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Surely there is some legacy code, refactoring issues or a shitty programmer behind this<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | stakeneggs1 | g10mo5n | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>At least you could find Apple documentation for what youre trying to do...Ive been wanting to develop a piece of software specific for Mac OS, and It seems that even Apple themselves doesnt have documentation for Mac development!<... | 31 |
programminghorror | ciknay | g11xrid | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>At least you could find Apple documentation for what youre trying to do...Ive been wanting to develop a piece of software specific for Mac OS, and It seems that even Apple themselves doesnt have documentation for Mac development!<... | 26 |
programminghorror | NicoPela | g0zt4wq | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Why:
1. Don't expect a `main`-esque function to actually return its result code - NSApplicationMain results in user code being invoked which might never make it back to that point. This return code is likely there for legacy reas... | 21 |
programminghorror | kahoyeung | g10bncf | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Bonus Apple horror:
- (id)performSelector:(SEL)aSelector;
You think this method returns an object right? So did I, and it's exactly what Apple's document said.
However if the method of the selector actually returns a primitive... | 19 |
programminghorror | pxOMR | g107jrw | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>At least you could find Apple documentation for what youre trying to do...Ive been wanting to develop a piece of software specific for Mac OS, and It seems that even Apple themselves doesnt have documentation for Mac development!<... | 13 |
programminghorror | blaizedm | g118pco | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Why:
1. Don't expect a `main`-esque function to actually return its result code - NSApplicationMain results in user code being invoked which might never make it back to that point. This return code is likely there for legacy reas... | 11 |
programminghorror | roman_fyseek | g0zssrm | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>It's crap like this that causes my testers to think that they can store result sets and use those results in other tests.<|eor|><|eols|><|endoftext|> | 10 |
programminghorror | ssjskipp | g1289wz | <|sols|><|sot|>Thanks Apple<|eot|><|sol|>https://i.redd.it/d9v2mqhli6g51.png<|eol|><|sor|>Why:
1. Don't expect a `main`-esque function to actually return its result code - NSApplicationMain results in user code being invoked which might never make it back to that point. This return code is likely there for legacy reas... | 10 |
programminghorror | Kiwi_Taster | itxas5 | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|eols|><|endoftext|> | 2,195 |
programminghorror | MattVanAndel | g5hcotl | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|eols|><|endoftext|> | 532 |
programminghorror | speedingpeanut | g5hh6ok | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>And all they needed was
&& is_pandemic<|eor|><|eols|><|endoftext|> | 362 |
programminghorror | Macadooz___ | g5h8lou | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>My homies only do functional public health<|eor|><|eols|><|endoftext|> | 180 |
programminghorror | dliwespf | g5hiswc | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This one is not that bad. still_alive would of couse not be a local variable. It needs to be set to false by the inevitable die() method, so it must be a member variable (life is object oriented, of cour... | 155 |
programminghorror | pancakesiguess | g5hnarh | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>And all they needed was
&& is_pandemic<|eor|><|sor|>I'd still run Stay6ftApart(); if (is_pandemic == false). I don't like being around people in general.<|eor|><|eols|><|endoftext|> | 135 |
programminghorror | DaVinciJunior | g5hevzs | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|sor|>Or the moral could also be that the wearMask() function has a bug and before the user puts on the mask is trapped in an endless loop inside the wearMask() function ... | 132 |
programminghorror | MarkRems | g5i3pgz | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|sor|>Or the moral could also be that the wearMask() function has a bug and before the user puts on the mask is trapped in an endless loop inside the wearMask() function ... | 119 |
programminghorror | ianff | g5hl2xv | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This one is not that bad. still_alive would of couse not be a local variable. It needs to be set to false by the inevitable die() method, so it must be a member variable (life is object oriented, of cour... | 80 |
programminghorror | MattVanAndel | g5hlqwm | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|sor|>still_alive could be modified by any of those functions or even externally<|eor|><|sor|>I suppose a horrible hand washing accident could result in still_alive = fal... | 54 |
programminghorror | ComicBookFanatic97 | g5hd3uz | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This is a while (true) loop with no break instruction.<|eor|><|eols|><|endoftext|> | 51 |
programminghorror | managedheap84 | g5heph5 | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This is a while (true) loop with no break instruction.<|eor|><|sor|>Welp, I guess my life is now just wearing a mask, washing my hands & getting tested.
Sounds more fun than my actual life tbf.
 ... | 47 |
programminghorror | Grenadeapple_ | g5hcx5t | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>Everyone is immortal<|eor|><|eols|><|endoftext|> | 31 |
programminghorror | zakarumych | g5hl90o | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|sor|>still_alive could be modified by any of those functions or even externally<|eor|><|eols|><|endoftext|> | 27 |
programminghorror | anovagadro | g5hqdiy | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This one is not that bad. still_alive would of couse not be a local variable. It needs to be set to false by the inevitable die() method, so it must be a member variable (life is object oriented, of cour... | 25 |
programminghorror | danfay222 | g5hfjzz | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This is a while (true) loop with no break instruction.<|eor|><|sor|>Welp, I guess my life is now just wearing a mask, washing my hands & getting tested.
Sounds more fun than my actual life tbf.
 ... | 24 |
programminghorror | zakarumych | g5hmd3z | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>The moral: It never ends.<|eor|><|sor|>still_alive could be modified by any of those functions or even externally<|eor|><|sor|>I suppose a horrible hand washing accident could result in still_alive = fal... | 22 |
programminghorror | ianff | g5hkzy5 | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>This is a while (true) loop with no break instruction.<|eor|><|sor|>Not if one of those functions modifies still_alive.<|eor|><|eols|><|endoftext|> | 21 |
programminghorror | jerslan | g5hv0lh | <|sols|><|sot|>Functions with side effects? No thanks!<|eot|><|sol|>https://i.redd.it/5yq8y736zin51.jpg<|eol|><|sor|>What exactly is the target audience for this ad?<|eor|><|sor|>Lower right corner "Santa Clara County Public Health"...
The target audience is Silicon Valley.<|eor|><|eols|><|endoftext|> | 19 |
programminghorror | hedsht | ffuhsc | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|eols|><|endoftext|> | 2,194 |
programminghorror | Karn-age | fk0qkkl | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|eols|><|endoftext|> | 306 |
programminghorror | MassiveFajiit | fk0yiyw | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 179 |
programminghorror | radulfr2 | fk0ryee | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>
defaultZero = 0
defaultOne = 1
defaultTwo = defaultOne + defaultOne<|eor|><|eols|><|endoftext|> | 122 |
programminghorror | Niha_d | fk0qlfd | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|># Can you change defaultFalse to true just to see what happens?<|eor|><|sor|> #define true 0;
#define false 1;<|eor|><|eols|><|endoftext|> | 118 |
programminghorror | i3aizey | fk10k0e | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 91 |
programminghorror | lengau | fk0s9oc | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>
defaultZero = 0
defaultOne = 1
defaultTwo = defaultOne + defaultOne<|eor|><|sor|>I think you mean
defaultTwo = sum(defaultZero, defaultOne, defaultOne)<|eor|><|eols|><|endoftext|> | 78 |
programminghorror | gbbas | fk0nrcb | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Ya know, just to be sure.<|eor|><|eols|><|endoftext|> | 40 |
programminghorror | MassiveFajiit | fk10ocs | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 39 |
programminghorror | TheMetalFleece | fk0tr2n | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>
defaultZero = 0
defaultOne = 1
defaultTwo = defaultOne + defaultOne<|eor|><|sor|>I think you mean
defaultTwo = sum(defaultZero, defaultOne, defaultOne)<|eor|><|sor|>You forgot
`defaultSum... | 35 |
programminghorror | neros_greb | fk139ii | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>var; not const. In case these values need to change during execution<|eor|><|eols|><|endoftext|> | 28 |
programminghorror | lxpnh98_2 | fk1apyq | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>
defaultZero = 0
defaultOne = 1
defaultTwo = defaultOne + defaultOne<|eor|><|sor|>I think you mean
defaultTwo = sum(defaultZero, defaultOne, defaultOne)<|eor|><|sor|>You forgot
`defaultSum... | 24 |
programminghorror | blenderfreaky | fk1b52b | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 23 |
programminghorror | Karn-age | fk0yyp3 | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 21 |
programminghorror | i3aizey | fk19v7q | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Enterprise C# jobs made me use String.Empty cause people might be too dumb to know what "" means. Looking at the rest of the team... | 19 |
programminghorror | Saculs78 | fk0q33o | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why<|eor|><|eols|><|endoftext|> | 17 |
programminghorror | Geometry314 | fk0vap9 | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|>Why would you write "" when you can write defaultEmptyString ?<|eor|><|sor|>Does a programming language ever change how it interprets these things? I would think that these are set in stone, otherwise you ... | 17 |
programminghorror | FuckTheCharacterLimi | fk1wyft | <|sols|><|sot|>just in case it changes in the future<|eot|><|sol|>https://i.redd.it/001rdypddnl41.png<|eol|><|sor|># Can you change defaultFalse to true just to see what happens?<|eor|><|sor|> #define true 0;
#define false 1;<|eor|><|sor|> #define false 0
#define true -1
This has the added bonus of almos... | 17 |
programminghorror | CAS-14 | 13n9lmr | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|eols|><|endoftext|> | 2,190 |
programminghorror | Terrible_Children | jkye8nn | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|eols|><|endoftext|> | 587 |
programminghorror | CEOofRaytheon | jkyefq1 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|sor|>I keep my spare key on the same ring as my normal key so I don't lose it<|eor|><|eols|><|endoftext... | 347 |
programminghorror | javier1zq | jkyh0vv | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>r/vexillologycirclejerk
Flag of Nepal, but it is some guys server backups<|eor|><|eols|><|endoftext|> | 139 |
programminghorror | Audience-Electrical | jkye369 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>lmaooo
if(filename.endsWith(".bak"){
pass
}
Or something?<|eor|><|eols|><|endoftext|> | 112 |
programminghorror | CAS-14 | jkyx334 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 80 |
programminghorror | feldejars | jkypg9m | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|sor|>I keep my spare key on the same ring as my normal key so I don't lose it<|eor|><|sor|>Always keep ... | 77 |
programminghorror | CAS-14 | jkyph9j | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 76 |
programminghorror | umop_aplsdn | jkygd9e | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>lmaooo
if(filename.endsWith(".bak"){
pass
}
Or something?<|eor|><|sor|>Probably better to ignore certain folders like the backup output folder. Otherwise, you cant back... | 59 |
programminghorror | CAS-14 | jkyu0bh | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 46 |
programminghorror | Luke_theGreat | jl09o3x | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|sor|>I keep my spare key on the same ring as my normal key so I don't lose it<|eor|><|sor|>Always keep ... | 29 |
programminghorror | edgymemesalt | jkytp1c | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 27 |
programminghorror | Bitwise_Gamgee | jkyoyd5 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>That is a feature, not a bug, sir.<|eor|><|eols|><|endoftext|> | 21 |
programminghorror | CAS-14 | jkzvs1p | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 20 |
programminghorror | mexanoz | jkzyfto | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>lmaooo
if(filename.endsWith(".bak"){
pass
}
Or something?<|eor|><|sor|>what language uses {} and "pass" instead of "continue"?<|eor|><|sor|>Google pseudocode<|eor|><|eo... | 19 |
programminghorror | cpaca0 | jl018p8 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>lmaooo
if(filename.endsWith(".bak"){
pass
}
Or something?<|eor|><|sor|>what language uses {} and "pass" instead of "continue"?<|eor|><|sor|>Google pseudocode<|eor|><|so... | 19 |
programminghorror | OctilleryLOL | jkz3gat | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|soopr|>Theyre just backups in case I somehow mess up the code and the actual databases get messed up. T... | 19 |
programminghorror | Casiell89 | jl0bbw7 | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>You store your server backups on the server you're backing up?<|eor|><|sor|>Reminds me of a situation when we had fire in our building. A friend went by an old joke:
In case... | 16 |
programminghorror | Cybasura | jkz4zml | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>To people suggesting random btrfs utilities
Take note that not everyone uses btrfs<|eor|><|eols|><|endoftext|> | 15 |
programminghorror | stopassumingilipread | jkzx55m | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>We heard you like backups...<|eor|><|eols|><|endoftext|> | 13 |
programminghorror | CAS-14 | jkypjml | <|sols|><|sot|>I accidentally programmed my server to back up all files... even backups<|eot|><|sol|>https://v.redd.it/ugzjum2b021b1<|eol|><|sor|>lmaooo
if(filename.endsWith(".bak"){
pass
}
Or something?<|eor|><|soopr|>Thats pretty much what I went with, except in Python.<|eoopr|><|eols|><|endoftext|> | 13 |
programminghorror | pranavnegandhi | 10xti54 | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|eols|><|endoftext|> | 2,188 |
programminghorror | Herb_Derb | j7ud7ur | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|eols|><|endoftext|> | 438 |
programminghorror | Antares987 | j7u7ejs | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Sounds like a race condition exists for a file lock.<|eor|><|eols|><|endoftext|> | 307 |
programminghorror | Mickenfox | j7uggkm | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Sounds like a race condition exists for a file lock.<|eor|><|sor|>"I tried something and it fixed the problem so I'll just leave it" programming.<|eor|><|eols|><|endoftext|> | 155 |
programminghorror | pranavnegandhi | j7ufzii | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|soopr|>*"Never gonna give you up..." playing in background*<|eoopr... | 143 |
programminghorror | Minteck | j7ug81g | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>* "hey let's try this"
* "woops it's not working, let's just try again in case it actually works"<|eor|><|eols|><|endoftext|> | 104 |
programminghorror | _Xertz_ | j7uihu1 | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|soopr|>*"Never gonna give you up..." playing in background*<|eoopr... | 70 |
programminghorror | melance | j7uitgg | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>If at first you don't succeed, try, try again.<|eor|><|eols|><|endoftext|> | 67 |
programminghorror | Jjabrahams567 | j7u9jr7 | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>60% of the time it works every time.<|eor|><|eols|><|endoftext|> | 67 |
programminghorror | pranavnegandhi | j7ugbdh | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>* "hey let's try this"
* "woops it's not working, let's just try again in case it actually works"<|eor|><|soopr|>Do or do not. There is no try.<|eoopr|><|eols|><|endoftext|> | 40 |
programminghorror | goob96 | j7ux9ay | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Sounds like a race condition exists for a file lock.<|eor|><|sor|>"I tried something and it fixed the problem so I'll just leave it" programming.<|eor|><|sor|>Wait, isn't that how it's done?<|eor... | 38 |
programminghorror | Yadobler | j7ulegf | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>I'm sure if this was java you'd get a *unchecked exception not handled* because the 2nd IO statement, which is declared as *throws ioerror*, is not being catched / the enclosing function does not... | 35 |
programminghorror | cdglasser | j7vazt7 | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|sor|>Or we can just pretend we didn't see that and move right alon... | 32 |
programminghorror | lose_has_1_o | j7upm1l | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Looks like a leftover debug statement. Someone calls this function in a loop where the Nth iteration fails. Instead of putting a conditional breakpoint in the loop body to stop on the Nth iterati... | 24 |
programminghorror | i3aizey | j7w8f4n | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|sor|>Or we can just pretend we didn't see that and move right alon... | 24 |
programminghorror | nekokattt | j7vui0l | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>still beats the "multiple layers of authentication" which turns out to be just
if (user.isAuthenticated()) {
if (user.isAuthenticated()) {
request.proceed();
}
... | 18 |
programminghorror | ComfortablyBalanced | j7v49xp | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>I'm sure if this was java you'd get a *unchecked exception not handled* because the 2nd IO statement, which is declared as *throws ioerror*, is not being catched / the enclosing function does not... | 18 |
programminghorror | folothedamntraincj | j7ur6ec | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>Truly horrifying. What if it throws again? Should have been
```
catch
{
return EncodeFile(fileName);
}
```<|eor|><|soopr|>*"Never gonna give you up..." playing in background*<|eoopr... | 16 |
programminghorror | HappyZombies | j7u9det | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>The definition of insanity is...<|eor|><|eols|><|endoftext|> | 15 |
programminghorror | Justindr0107 | j7xc3cw | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>If at first you don't succeed, try, try again.<|eor|><|sor|>... try "try" again...<|eor|><|eols|><|endoftext|> | 15 |
programminghorror | Loading_M_ | j7vfmdv | <|sols|><|sot|>There's no room for failure in our line of work<|eot|><|sol|>https://i.redd.it/orfrum0so5ha1.png<|eol|><|sor|>* "hey let's try this"
* "woops it's not working, let's just try again in case it actually works"<|eor|><|soopr|>Do or do not. There is no try.<|eoopr|><|sor|>More like do or do.<|eor|><|eols|><|... | 14 |
programminghorror | GVmG | jdip8r | <|sols|><|sot|>why though<|eot|><|sol|>https://i.redd.it/y879qupclvt51.png<|eol|><|eols|><|endoftext|> | 2,193 |
programminghorror | Charlie_Kilo24 | g98d0bs | <|sols|><|sot|>why though<|eot|><|sol|>https://i.redd.it/y879qupclvt51.png<|eol|><|sor|>They forgot && !(ele >16)<|eor|><|eols|><|endoftext|> | 561 |
programminghorror | GVmG | g98gc7u | <|sols|><|sot|>why though<|eot|><|sol|>https://i.redd.it/y879qupclvt51.png<|eol|><|sor|>I saw it in decompiled code.<|eor|><|soopr|>oh this isn't decompiled this is 16yo me being an idiot lol<|eoopr|><|eols|><|endoftext|> | 200 |
programminghorror | TimGreller | g98vvhi | <|sols|><|sot|>why though<|eot|><|sol|>https://i.redd.it/y879qupclvt51.png<|eol|><|sor|>They forgot && !(ele >16)<|eor|><|sor|>`|| ele <= 16` to be extra sure...<|eor|><|eols|><|endoftext|> | 190 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.