subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | joemckie | fljwkuf | <|sols|><|sot|>The irony<|eot|><|sol|>https://i.redd.it/1w5ctnfx10p41.png<|eol|><|sor|>The trick is not to use CSS, you cant go wrong!<|eor|><|sor|>Ah yes, like [this](https://motherfuckingwebsite.com/)?<|eor|><|sor|>Like [this](http://bettermotherfuckingwebsite.com)
edit: s/https/http. no `s` bad. i stand corrected.<... | 15 |
programminghorror | ShustOne | fll2i2v | <|sols|><|sot|>The irony<|eot|><|sol|>https://i.redd.it/1w5ctnfx10p41.png<|eol|><|sor|>Ah yes programming horror because CSS means programming
Edit: seems like freshmen CS students dont really like hearing truth. Poor bastards...<|eor|><|sor|>CSS is more along the lines of coding but this attitude is pretty shitty. Pe... | 13 |
programminghorror | chooxy | fljwpxf | <|sols|><|sot|>The irony<|eot|><|sol|>https://i.redd.it/1w5ctnfx10p41.png<|eol|><|sor|>The trick is not to use CSS, you cant go wrong!<|eor|><|sor|>Ah yes, like [this](https://motherfuckingwebsite.com/)?<|eor|><|sor|>Like [this](http://bettermotherfuckingwebsite.com)
edit: s/https/http. no `s` bad. i stand corrected.<... | 13 |
programminghorror | HildartheDorf | fljvt9b | <|sols|><|sot|>The irony<|eot|><|sol|>https://i.redd.it/1w5ctnfx10p41.png<|eol|><|sor|>The trick is not to use CSS, you cant go wrong!<|eor|><|sor|>All joking apart, less is definitely more with CSS.<|eor|><|eols|><|endoftext|> | 12 |
programminghorror | Sv443_ | fllpwh2 | <|sols|><|sot|>The irony<|eot|><|sol|>https://i.redd.it/1w5ctnfx10p41.png<|eol|><|soopr|>(Yes I know that the stylesheet just timed out while loading but I just love how ironic this is)<|eoopr|><|sor|>I'm surprised by how often this happens. If I every start a business with a web page, I'm going to ensure that the CSS... | 12 |
programminghorror | Not_a_tasty_fish | mnuk3h | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|eols|><|endoftext|> | 1,821 |
programminghorror | LucienZerger | gtztenk | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>simplest i've seen, nicely optimised..<|eor|><|eols|><|endoftext|> | 620 |
programminghorror | very_bad_programmer | gu059gz | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>This is something that someone did as a meme, sent the screenshot, got distracted and left it in<|eor|><|eols|><|endoftext|> | 289 |
programminghorror | Not_a_tasty_fish | gu07boz | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>This is something that someone did as a meme, sent the screenshot, got distracted and left it in<|eor|><|soopr|>I stumbled onto it in our codebase this afternoon. You can't make this shit up<|eoopr|><|eols|><|endoftext|> | 188 |
programminghorror | glorious_reptile | gu0qfv2 | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>simplest i've seen, nicely optimised..<|eor|><|sor|>I challenge you to find one bug with that line of code.<|eor|><|eols|><|endoftext|> | 117 |
programminghorror | fr4nklin_84 | gu0k11c | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>// TODO: Things
return true;<|eor|><|eols|><|endoftext|> | 72 |
programminghorror | diamondjim | gu0mcr9 | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>simplest i've seen, nicely optimised..<|eor|><|sor|>Add MethodImplOptions.AggressiveInlining for further performance gains.<|eor|><|eols|><|endoftext|> | 68 |
programminghorror | Nothing-But-Lies | gu12cbj | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>This is something that someone did as a meme, sent the screenshot, got distracted and left it in<|eor|><|soopr|>I stumbled onto it in our codebase this afternoon. You can't make this shit up<|eoopr|><|sor|>By chance work fo... | 60 |
programminghorror | sim642 | gu0l1el | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>A crypto library should implement certificate checking itself instead of requiring each application to do so. It's so easy to make mistakes and completely ruin the security. You should only have to use this callback if you ... | 57 |
programminghorror | triumphover | gu0r3tf | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>This is something that someone did as a meme, sent the screenshot, got distracted and left it in<|eor|><|soopr|>I stumbled onto it in our codebase this afternoon. You can't make this shit up<|eoopr|><|sor|>By chance work fo... | 55 |
programminghorror | nullish_ | gu0uq8g | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>This is something that someone did as a meme, sent the screenshot, got distracted and left it in<|eor|><|soopr|>I stumbled onto it in our codebase this afternoon. You can't make this shit up<|eoopr|><|sor|>By chance work fo... | 42 |
programminghorror | heyf00L | gu1dt22 | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>[deleted]<|eor|><|sor|>The mythical O(true)<|eor|><|eols|><|endoftext|> | 41 |
programminghorror | BasieP2 | gu0qtr1 | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>A crypto library should implement certificate checking itself instead of requiring each application to do so. It's so easy to make mistakes and completely ruin the security. You should only have to use this callback if you ... | 41 |
programminghorror | Cistern64 | gu0ux2h | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>simplest i've seen, nicely optimised..<|eor|><|sor|>I challenge you to find one bug with that line of code.<|eor|><|sor|>The word 'check' in the comment seems like an error in the requirements..
Probably left from before ... | 40 |
programminghorror | evkan | gu0mpap | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>[deleted]<|eor|><|sor|>It's performance optimised<|eor|><|eols|><|endoftext|> | 34 |
programminghorror | savornicesei | gu0u83n | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>Actually this is common in .NET enterpeise software. Because security is an afterthought and devs usually have no knowledge about certificates and how to properly use them<|eor|><|eols|><|endoftext|> | 29 |
programminghorror | LimbRetrieval-Bot | gu0yecl | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>Actually this is common in .NET enterpeise software. Because security is an afterthought and devs usually have no knowledge about certificates and how to properly use them<|eor|><|sor|>Seen that in java and php as well (:
... | 27 |
programminghorror | SageHunter | gu1deja | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>simplest i've seen, nicely optimised..<|eor|><|sor|>I challenge you to find one bug with that line of code.<|eor|><|sor|>The word 'check' in the comment seems like an error in the requirements..
Probably left from before ... | 26 |
programminghorror | vacant_gonzo | gu0qdsj | <|sols|><|sot|>Production code btw<|eot|><|sol|>https://i.redd.it/8g4sybjys8s61.png<|eol|><|sor|>Ive seen basically that code in at least 3 separate companies Ive worked. All .net apps. All just validate a cert regardless. Always we had to do that to get it to work.
Im not sure if it was in a blog or SO answer once or... | 24 |
programminghorror | dougmantis | qrz62q | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|eols|><|endoftext|> | 1,810 |
programminghorror | 7tar | hk9y2aj | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|eols|><|endoftext|> | 574 |
programminghorror | Educational-Lemon640 | hkak8k7 | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>If true, that's the *real* horror.<|eor|><|eols|><|endoftext|> | 414 |
programminghorror | jailbreak | hkazi8x | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Most likely, return uninitialized is undefined beha... | 236 |
programminghorror | Host127001 | hkaybbk | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|eols|><|endoftext|> | 202 |
programminghorror | staletic | hkaoozr | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>Dangling if somewhere?<|eor|><|sor|>That would trigger `-Wmisleading-indentation`. The more I try to explain this, the bigger the horror becomes.<|eor|><|eols|><|endoftext|> | 113 |
programminghorror | nashidau | hkao13g | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>Dangling if somewhere?<|eor|><|eols|><|endoftext|> | 111 |
programminghorror | Host127001 | hkb01od | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Most likely, return uninitialized is undefined beha... | 94 |
programminghorror | staletic | hkav341 | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>Dangling if somewhere?<|eor|><|sor|>That would trigger `-Wmisleading-indentation`. The more I try to explain this, the bigger the horror becomes.<|eor|><|sor|>Wait are you for real, if so I am ... | 80 |
programminghorror | qci | hkaxpre | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>I want to confirm that gcc does not support dead code detection properly, like clang does. But I have never seen the need to place two unconditional returns one after another. Probably bullshit... | 67 |
programminghorror | Roflkopt3r | hkba4nr | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Most likely, return uninitialized is undefined beha... | 47 |
programminghorror | dougmantis | hkay74x | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>Dangling if somewhere?<|eor|><|sor|>That would trigger `-Wmisleading-indentation`. The more I try to explain this, the bigger the horror becomes.<|eor|><|sor|>Wait are you for real, if so I am ... | 20 |
programminghorror | AyrA_ch | hkbuuxa | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Most likely, return uninitialized is undefined beha... | 20 |
programminghorror | chaff800 | hkc5h1b | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>What would be best practice to get around this instead? It's been a little while since I've written anything in C, fair warning.
Is it just a matter of providing a default value that matches t... | 13 |
programminghorror | Rainbow-Dev | hkb2e4t | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>I still dont see how that could cause an error though. You can still return uninitialised variables in C<|eor|><|eols|><|endoftext|> | 12 |
programminghorror | curtmack | hkbppng | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Most likely, return uninitialized is undefined beha... | 12 |
programminghorror | staletic | hkbci1k | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>Dangling if somewhere?<|eor|><|sor|>That would trigger `-Wmisleading-indentation`. The more I try to explain this, the bigger the horror becomes.<|eor|><|sor|>Wait are you for real, if so I am ... | 11 |
programminghorror | elperroborrachotoo | hkb8sj9 | <|sols|><|sot|>An extra return to appease the C gods, I suppose.<|eot|><|sol|>https://i.redd.it/om5h5jwq72z71.png<|eol|><|sor|>n might be uninitialized<|eor|><|sor|>But how does adding an unreachable return make gcc think it is ok to have n uninitialized?<|eor|><|sor|>Because once there is UB it can do whatever it want... | 10 |
programminghorror | Specific_Taste_9035 | qauvuo | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|eols|><|endoftext|> | 1,811 |
programminghorror | HTTP_404_NotFound | hh5l95o | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|eols|><|endoftext|> | 359 |
programminghorror | GreatBarrier86 | hh5oy1y | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|eols|><|endoftext|> | 278 |
programminghorror | ZylonBane | hh5mx3v | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>JSON and the Arguments()<|eor|><|eols|><|endoftext|> | 200 |
programminghorror | _Pho_ | hh5w2y6 | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>Of course it was raised as a Github issue<|eor|><|eols|><|endoftext|> | 150 |
programminghorror | HTTP_404_NotFound | hh5zm81 | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|sor|>I am surprised nobody has sa... | 116 |
programminghorror | theg721 | hh686si | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>A while ago someone was telling me something about someone called Jason, and I genuinely had a moment of, "What kind of sadistic nerd names their kid *Json*?"<|eor|><|eols|><|endoftext|> | 101 |
programminghorror | HTTP_404_NotFound | hh5pl5z | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|sor|>I am surprised nobody has sa... | 80 |
programminghorror | Buddy-Matt | hh7r9we | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>Of course it was raised as a Github issue<|eor|><|sor|>I was wondering why a stack overflow reply wasn't just a rant calling the poster an absolute fucking donkey.
And now it make sense.<|eor|><|eols|><|endoftext|> | 61 |
programminghorror | 8bitslime | hh5sq78 | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I made a handler for drag-and-drop events and called it dragon_drop... | 49 |
programminghorror | druule10 | hh5mgrj | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>They've been watching too many Halloween movies<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | kptc_py | hh64y6m | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>In case anyone bored & wondering (like me), the link is here: https://github.com/simolus3/moor/issues/292<|eor|><|eols|><|endoftext|> | 33 |
programminghorror | TimeToBecomeEgg | hh5ysf3 | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|sor|>I am surprised nobody has sa... | 32 |
programminghorror | TimeToBecomeEgg | hh5zsry | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|sor|>I am surprised nobody has sa... | 32 |
programminghorror | invisibo | hh6qjeh | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I name StringBuilders Bob<|eor|><|sor|>I had a MySQL replication se... | 30 |
programminghorror | Jonno_FTW | hh747tt | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>JSON and the Arguments()<|eor|><|sor|>Gonna call my next kid Json<|eor|><|eols|><|endoftext|> | 27 |
programminghorror | robclancy | hh6e3ur | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>In case anyone bored & wondering (like me), the link is here: https://github.com/simolus3/moor/issues/292<|eor|><|sor|>I was curious how many people do this. [https://github.com/search?q=toJason&type=code](https://github.... | 22 |
programminghorror | HTTP_404_NotFound | hh62aob | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>lol, I actually have a lot of cases where I name the private field for class ISerializer, "cereal".
Might give somebody a laugh one day.<|eor|><|sor|>I once made a variable called datas, because it was a list of Whate... | 20 |
programminghorror | Magmagan | hh6wswv | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>I wonder if it was a spellchecker. I've introduced bugs that way once.<|eor|><|sor|>You were coding on your mobile phone??<|eor|><|eols|><|endoftext|> | 17 |
programminghorror | Boxit379 | hh723b6 | <|sols|><|sot|>man was calling Jason<|eot|><|sol|>https://i.redd.it/mihjgb8rm9u71.jpg<|eol|><|sor|>A while ago someone was telling me something about someone called Jason, and I genuinely had a moment of, "What kind of sadistic nerd names their kid *Json*?"<|eor|><|sor|>https://www.names.org/n/json/about<|eor|><|eols|>... | 16 |
programminghorror | blueprint357 | ov6s29 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|eols|><|endoftext|> | 1,809 |
programminghorror | blueprint357 | h775kcv | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 513 |
programminghorror | TheBrainStone | h778c25 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 294 |
programminghorror | TheBrainStone | h777jvb | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 216 |
programminghorror | MysteryProper | h77d1xh | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 201 |
programminghorror | nodexyz | h778ngr | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 189 |
programminghorror | radboss92 | h77cfy6 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>The original line would return true for any value except 1 (including 0 and negative numbers). You changed the condition to greater than 1.<|eor|><|eols|><|endoftext|> | 147 |
programminghorror | blueprint357 | h77jdnz | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>The original line would return true for any value except 1 (including 0 and negative numbers). You changed the condition to greater than 1.<|eor|><|soopr|>I've mentioned it in anot... | 137 |
programminghorror | blueprint357 | h7787gw | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 136 |
programminghorror | nodexyz | h7782r5 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 105 |
programminghorror | blueprint357 | h778z8j | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 102 |
programminghorror | breezedave | h77ad00 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>Their line of code returns true for all arrays that aren't of size 1
Your line of code returns true for all arrays that are of size 2 or larger.
The !! turns a truthy value (... | 96 |
programminghorror | Durahk | h77alc3 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>Their line of code returns true for all arrays that aren't of size 1
Your line of code returns true for all arrays that are of size 2 or larger.
The !! turns a truthy value (... | 94 |
programminghorror | ArrozConmigo | h77a33b | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 73 |
programminghorror | radboss92 | h77jo3y | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>The original line would return true for any value except 1 (including 0 and negative numbers). You changed the condition to greater than 1.<|eor|><|soopr|>I've mentioned it in anot... | 70 |
programminghorror | FromWayDownUnder | h78x0ys | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 68 |
programminghorror | atsju | h77bwqq | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>Code readability should most always go over human optimization. How much times did I see >>4 instead /8 because "it will optimization better" And it's just not true...<|eor|><|eols... | 58 |
programminghorror | Timik | h77dgk3 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|sor|>Code readability should most always go over human optimization. How much times did I see >>4 instead /8 because "it will optimization better" And it's just not true...<|eor|><|sor|... | 55 |
programminghorror | indyK1ng | h778ml3 | <|sols|><|sot|>after a year of CRing those "freelancers" - please kill me now<|eot|><|sol|>https://i.redd.it/sexsg6t4rje71.jpg<|eol|><|soopr|>just to clarify - red line is the abomination he wanted to add
the green line is my suggestion
the yellow part - his comment where he tried to justify his code.
edit: another ... | 52 |
programminghorror | Poiuy2010_2011 | 10vlgtd | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|eols|><|endoftext|> | 1,808 |
programminghorror | _g550_ | j7if760 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>This a puzzle, not an exam question.<|eor|><|eols|><|endoftext|> | 1,016 |
programminghorror | RedditIsATimeSink | j7i8f6a | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Paste into replit.com:
```c
#include <stdio.h>
int main() {
int i;
for (i = 1;i++ <= 1; i++)
for (i++; i++ <= 6; i++)
i++;
printf(" %d", i);
}
```
Output is " 12". Now you all can argue... | 339 |
programminghorror | greem | j7isvi3 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>This a puzzle, not an exam question.<|eor|><|sor|>It's definitely a puzzle and terrible code, but this is a reasonable question for a beginner c exam.<|eor|><|eols|><|endoftext|> | 316 |
programminghorror | SOKS33 | j7ib196 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Paste into replit.com:
```c
#include <stdio.h>
int main() {
int i;
for (i = 1;i++ <= 1; i++)
for (i++; i++ <= 6; i++)
i++;
printf(" %d", i);
}
```
Output is " 12". Now you all can argue... | 309 |
programminghorror | Amaranthine | j7j97vk | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>This a puzzle, not an exam question.<|eor|><|sor|>It's definitely a puzzle and terrible code, but this is a reasonable question for a beginner c exam.<|eor|><|sor|>I mean, I guess it's good to know exactly ... | 257 |
programminghorror | lepoulpe303 | j7i3ovx | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Very good example of: it's not because you can do something that you must do it ...<|eor|><|eols|><|endoftext|> | 218 |
programminghorror | inthemindofadogg | j7iir1m | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Who the fuck does i++;i ++<=6;
Also, i hear professors talking about commenting the code and then they go and pull this shit. Im not a fucking computer and I would never write code this unreadable. If I was... | 79 |
programminghorror | eloel- | j7iarrd | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>In order of execution:
line1 i=?
line2 i=1, i=2 (from i++<=1)
line3 i=3 (from i++), i=4 (from i++<=6)
line4 i=5
line3 i=6 (from the last i++), i=7 (from i++<=6)
line4 i=8
line3 i=9 (from the last i++... | 72 |
programminghorror | Lost-Cantaloupe-6739 | j7iwlkx | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Who the fuck does i++;i ++<=6;
Also, i hear professors talking about commenting the code and then they go and pull this shit. Im not a fucking computer and I would never write code this unreadable. If I was... | 68 |
programminghorror | woahwhatamidoing | j7imb2c | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Every time I think Ive spotted all the i++s I spot another lol<|eor|><|eols|><|endoftext|> | 57 |
programminghorror | CmdrSelfEvident | j7joopu | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>This a puzzle, not an exam question.<|eor|><|sor|>It's definitely a puzzle and terrible code, but this is a reasonable question for a beginner c exam.<|eor|><|sor|>I mean, I guess it's good to know exactly ... | 47 |
programminghorror | Kazagan40 | j7i7kvc | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Could someone more proficient in that language tell me what happens when you have i++<=x ?
Does it compare i+1 to x?
Does it increment i by one and then compare i to x?
Does it error?<|eor|><|sor|>It does ... | 46 |
programminghorror | KennyBassett | j7i6440 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Could someone more proficient in that language tell me what happens when you have i++<=x ?
Does it compare i+1 to x?
Does it increment i by one and then compare i to x?
Does it error?<|eor|><|eols|><|endof... | 45 |
programminghorror | SickOfEnggSpam | j7i9r79 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>What possible use could the ability to work this out in your head have?<|eor|><|sor|>To see if you have a good understanding of the language<|eor|><|eols|><|endoftext|> | 43 |
programminghorror | Regist33l3 | j7iuo85 | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Paste into replit.com:
```c
#include <stdio.h>
int main() {
int i;
for (i = 1;i++ <= 1; i++)
for (i++; i++ <= 6; i++)
i++;
printf(" %d", i);
}
```
Output is " 12". Now you all can argue... | 43 |
programminghorror | Kweldulf | j7i6xzq | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Could someone more proficient in that language tell me what happens when you have i++<=x ?
Does it compare i+1 to x?
Does it increment i by one and then compare i to x?
Does it error?<|eor|><|sor|>`i++ <= ... | 42 |
programminghorror | goomyman | j7jrpug | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>This a puzzle, not an exam question.<|eor|><|sor|>It's definitely a puzzle and terrible code, but this is a reasonable question for a beginner c exam.<|eor|><|sor|>I mean, I guess it's good to know exactly ... | 32 |
programminghorror | Kweldulf | j7i7lgb | <|sols|><|sot|>Absolutely fucked up code on an exam<|eot|><|sol|>https://i.redd.it/0m5x172ainga1.png<|eol|><|sor|>Does it print 12? I think it prints 12 due to a weird quirk where in the comparison i++ <= n the comparison is checked before i gets incremented<|eor|><|sor|>You are correct, but this is not a 'weird quirk'... | 31 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.