subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | MJBrune | ibo0c4w | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>[nice!](https://stackoverflow.com/questions/27459455/in-c-why-does-this-backwards-indexing-work)
Edit: it's pointers all the way down, folks<|eor|><|sor|> int main() {
int i = 1;
... | 31 |
programminghorror | RFC793 | ibnkylv | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>Why not *(1+a) to make it really fun?<|eor|><|sor|>To me, this is much more clear since it is simple pointer arithmetic as opposed to abusing the index operator.<|eor|><|eols|><|endoftext|> | 30 |
programminghorror | JazzRider | ibmex0m | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>Does that even compile?<|eor|><|eols|><|endoftext|> | 29 |
programminghorror | BS_in_BS | ibnpkwb | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>Does that even compile?<|eor|><|soopr|>Yes indeed it will, the c compiler just adds the two values so a normal array compiles to
a[1] - > *(a + 1)
And
1[a] - > *(1 + a)
It is just a convention for ... | 27 |
programminghorror | rosebeats1 | ibo4pn8 | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>Does that even compile?<|eor|><|soopr|>Yes indeed it will, the c compiler just adds the two values so a normal array compiles to
a[1] - > *(a + 1)
And
1[a] - > *(1 + a)
It is just a convention for ... | 27 |
programminghorror | melance | ibmcz9s | <|sols|><|sot|>From now on this is how i will use arrays<|eot|><|sol|>https://i.redd.it/c0zh1hlgie491.jpg<|eol|><|sor|>[nice!](https://stackoverflow.com/questions/27459455/in-c-why-does-this-backwards-indexing-work)
Edit: it's pointers all the way down, folks<|eor|><|sor|>Pointers!<|eor|><|eols|><|endoftext|> | 23 |
programminghorror | kivicode | qhspju | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|eols|><|endoftext|> | 1,147 |
programminghorror | nimitzhunter | hiet71f | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>You're missing half the Christmas tree.<|eor|><|eols|><|endoftext|> | 313 |
programminghorror | IshKebab | hif093c | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 306 |
programminghorror | Flopamp | hierjjc | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Well, at least it uses defines and not something run time<|eor|><|eols|><|endoftext|> | 292 |
programminghorror | Ambitious_Medicine90 | hif0p27 | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Well, at least it uses defines and not something run time<|eor|><|sor|>If they were all functions they would be optimized away anyways so it doesnt matter.<|eor|><|eols|><|endoft... | 74 |
programminghorror | sham_wowzers | hiful3a | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>ITT: people who have never used C or are new to C++<|eor|><|eols|><|endoftext|> | 69 |
programminghorror | emilvikstrom | hifh972 | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 68 |
programminghorror | marinuso | hiezcvb | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>If only they knew they could just prefix `0b` in front of integers to write them in binary...<|eor|><|sor|>`0b` is a GCC-specific extension, so portable code can't use it.<|eor|>... | 60 |
programminghorror | chuck_the_plant | hiew6lg | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>That is really odd. Is there any context on why the felt the need to define numbers like this? Also isnt the include guard at the top supposed to be in all caps?<|eor|><|sor|>May... | 47 |
programminghorror | slugonamission | hiewbcd | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>If only they knew they could just prefix `0b` in front of integers to write them in binary...<|eor|><|sor|>`0b` is a GCC-specific extension, so portable code can't use it.<|eor|>... | 47 |
programminghorror | Bob_thezealot | hiewcro | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Oh god please tell me its not all the way until 255<|eor|><|eols|><|endoftext|> | 44 |
programminghorror | ChemicalRascal | hig6usr | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 40 |
programminghorror | bellator_solis | hifamm8 | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>You're missing half the Christmas tree.<|eor|><|sor|>But what are we going to do with this hacked off part?<|eor|><|eols|><|endoftext|> | 37 |
programminghorror | PKTINOS | hifi06p | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 37 |
programminghorror | kivicode | hiexb9c | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Oh god please tell me its not all the way until 255<|eor|><|soopr|>But it does ;}<|eoopr|><|eols|><|endoftext|> | 37 |
programminghorror | Flopamp | hif18ov | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Well, at least it uses defines and not something run time<|eor|><|sor|>If they were all functions they would be optimized away anyways so it doesnt matter.<|eor|><|sor|>Hopefully... | 37 |
programminghorror | Alikont | hifsp9s | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 36 |
programminghorror | fake--name | hignl6r | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 35 |
programminghorror | IshKebab | hifn3kq | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>Binary literals weren't available in C++ until C++14, which is quite recent (it takes some more time before compilers that implement it are available everywhere).
This is probab... | 34 |
programminghorror | WackyWheelsDUI | hietlqv | <|sols|><|sot|>Found this beauty in the codebase of one fairly large company...<|eot|><|sol|>https://i.redd.it/06epevowc8w71.png<|eol|><|sor|>That is really odd. Is there any context on why the felt the need to define numbers like this? Also isnt the include guard at the top supposed to be in all caps?<|eor|><|eols|><|... | 29 |
programminghorror | careseite | a9gyvp | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|eols|><|endoftext|> | 1,149 |
programminghorror | JohnMcPineapple | ecj81lq | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>I might be confusing something but `$a = $a +-0 -+3` equals `$a -= 3`, not `$a += 3`, doesn't it?<|eor|><|eols|><|endoftext|> | 217 |
programminghorror | segv | ecjcco9 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Cue the classic "goes to" operator in C<|eor|><|eols|><|endoftext|> | 98 |
programminghorror | don_py | ecja0et | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Why would someone write it like that<|eor|><|eols|><|endoftext|> | 84 |
programminghorror | JohnMcPineapple | ecjdm40 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>I might be confusing something but `$a = $a +-0 -+3` equals `$a -= 3`, not `$a += 3`, doesn't it?<|eor|><|sor|>[deleted]<|eor|><|sor|>That would be very weird for a programming language to do, but since I rea... | 49 |
programminghorror | XuRuX | ecjcpg6 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>I might be confusing something but `$a = $a +-0 -+3` equals `$a -= 3`, not `$a += 3`, doesn't it?<|eor|><|sor|>exactly my thoughts. Unless if `$a -+ $b` becomes `$a + $b` for some reason, maybe?<|eor|><|eols|... | 48 |
programminghorror | StuntHacks | ecjfgpg | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Reminds me of [this](https://stackoverflow.com/questions/1642028/what-is-the-operator-in-c) stack overflow post.
[This](https://stackoverflow.com/a/8909176) is my favourite answer from that post.<|eor|><|eol... | 45 |
programminghorror | Zambito1 | ecjkz7v | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>I might be confusing something but `$a = $a +-0 -+3` equals `$a -= 3`, not `$a += 3`, doesn't it?<|eor|><|sor|>Yep, tweet is wrong<|eor|><|sor|>What tweet?<|eor|><|eols|><|endoftext|> | 25 |
programminghorror | Batman_AoD | ecjeo6p | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Every time I see unary and binary operators strung together like this, I become slightly fonder of reverse Polish notation. <|eor|><|eols|><|endoftext|> | 23 |
programminghorror | Stevenator1 | ecjoie3 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Why would someone write it like that<|eor|><|sor|>[deleted]<|eor|><|sor|>[deleted]<|eor|><|sor|>Javascript as a backend language receives the same treatment though - some people are appalled, while those work... | 22 |
programminghorror | Noxium51 | eck2y47 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Cue the classic "goes to" operator in C<|eor|><|sor|>[deleted]<|eor|><|sor|>Wow that made me feel like a real dumbass for a second. Also Im over halfway through my comp sci degree, and somehow I have never th... | 19 |
programminghorror | Totenlicht | ecl4z1i | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Cue the classic "goes to" operator in C<|eor|><|sor|>[deleted]<|eor|><|sor|>Wow that made me feel like a real dumbass for a second. Also Im over halfway through my comp sci degree, and somehow I have never th... | 18 |
programminghorror | Ascomae | ecjczx5 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>$a = $a+++++$a;<|eor|><|eols|><|endoftext|> | 15 |
programminghorror | NuttingFerociously | eck76m2 | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Why would someone write it like that<|eor|><|sor|>[deleted]<|eor|><|sor|>[deleted]<|eor|><|sor|>Javascript as a backend language receives the same treatment though - some people are appalled, while those work... | 13 |
programminghorror | goodolbluey | eckcver | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Reminds me of [this](https://stackoverflow.com/questions/1642028/what-is-the-operator-in-c) stack overflow post.
[This](https://stackoverflow.com/a/8909176) is my favourite answer from that post.<|eor|><|sor... | 11 |
programminghorror | 0x564A00 | ecjdh9j | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>$a = $a+++++$a;<|eor|><|sor|> for($downto=10; $downto --> 0;) print('please no<br>');<|eor|><|eols|><|endoftext|> | 11 |
programminghorror | tobiasvl | eckrokq | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>I might be confusing something but `$a = $a +-0 -+3` equals `$a -= 3`, not `$a += 3`, doesn't it?<|eor|><|sor|>Yep, tweet is wrong<|eor|><|sor|>What tweet?<|eor|><|sor|>The thing, the image (edit: the top pos... | 10 |
programminghorror | EpicSaxGirl | ecker7p | <|sols|><|sot|>Those weird php exclusive operators...<|eot|><|sol|>https://i.imgur.com/x7ruoBY.jpg<|eol|><|sor|>Why would someone write it like that<|eor|><|sor|>The same reason someone would use 4 semicolons for indentations in languages where that works, because they can.<|eor|><|eols|><|endoftext|> | 9 |
programminghorror | AndyTheSane | scc0lw | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|eols|><|endoftext|> | 1,146 |
programminghorror | Freddedonna | hu5xobo | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|eols|><|endoftext|> | 193 |
programminghorror | Drayenn | hu6ea4d | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>A coworker once showd me a maven error he had.. he just deleted the error (????) And ran his program<|eor|><|eols|><|endoftext|> | 132 |
programminghorror | Bulji | hu6gdlt | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>A coworker once showd me a maven error he had.. he just deleted the error (????) And ran his program<|eor|><|sor|>Alpha as fuck<|eor|><|eols|><|endoftext|> | 76 |
programminghorror | matbiz01 | hu61xjx | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>There is a dark theme in eclipse?.
5 years. I've been working in it. Fuck me<|eor|><|sor|>I... | 67 |
programminghorror | Dusk_Lycanroc | hu5d1qg | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>Great, you have reminded me of the SAP HANA Studio with this<|eor|><|eols|><|endoftext|> | 55 |
programminghorror | TastyOrganization122 | hu5zwx0 | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>There is a dark theme in eclipse?.
5 years. I've been working in it. Fuck me<|eor|><|eols|>... | 42 |
programminghorror | Carabalone | hu6r1uu | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>A coworker once showd me a maven error he had.. he just deleted the error (????) And ran his program<|eor|><|sor|>based<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | FranticBronchitis | hu78lfi | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>Warnings aren't errors.<|eor|><|sor|>I fear no man. But that thing...
`-Werror`
It scares me.<|eor|><|eols|><|endoftext|> | 28 |
programminghorror | aaryanmoin | hu7kood | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>Last year the eclipse dark theme wasn't very good.<|eor|><|sor|>It really did suck and I ha... | 21 |
programminghorror | HotRodLincoln | hu714qc | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>Warnings aren't errors.<|eor|><|eols|><|endoftext|> | 17 |
programminghorror | anoppe | hu6xydv | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>Your biggest problem here is using Eclipse<|eor|><|eols|><|endoftext|> | 16 |
programminghorror | AlternativeAardvark6 | hu635xo | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>Last year the eclipse dark theme wasn't very good.<|eor|><|eols|><|endoftext|> | 16 |
programminghorror | GuySalmon | hu8dbqm | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>See, it says "Java Problems" not "My Problems", so I don't need to deal with it.<|eor|><|eols|><|endoftext|> | 15 |
programminghorror | AndyTheSane | hu6om00 | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>This reminds me of one of our major platforms at work. Warnings out the ying yang.<|eor|><|soopr|>I had to increase the memory limits for Eclipse just to allow SonarLint to run..<|eoopr|><|eols|><|e... | 15 |
programminghorror | TastyOrganization122 | hu62dxs | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>There is a dark theme in eclipse?.
5 years. I've been working in it. Fuck me<|eor|><|sor|>I... | 15 |
programminghorror | PleX | hu7dlsi | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The most horrifying things in this screenshot is that you're using Eclipse with a white theme<|eor|><|sor|>Last year the eclipse dark theme wasn't very good.<|eor|><|sor|>It really did suck and I ha... | 14 |
programminghorror | Auxilor | hu65cvc | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The problem is eclipse<|eor|><|sor|>If I import that code into intellij, netbeans, vscode, etc then we can blame those as well.<|eor|><|sor|>yeah that works, i just hate eclipse<|eor|><|eols|><|endo... | 13 |
programminghorror | FranticBronchitis | hu78b4n | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>I got 21556 problems and there ain't no way I'm going to go through all of them to see whether a bitch is one<|eor|><|eols|><|endoftext|> | 12 |
programminghorror | Fishery9 | hu61d6w | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>The problem is eclipse<|eor|><|sor|>If I import that code into intellij, netbeans, vscode, etc then we can blame those as well.<|eor|><|eols|><|endoftext|> | 12 |
programminghorror | ryansworld10 | hu84mlt | <|sols|><|sot|>No errors, no problem, nothing to see here..<|eot|><|sol|>https://i.redd.it/z7c9qti1ptd81.png<|eol|><|sor|>Warnings aren't errors.<|eor|><|sor|>I fear no man. But that thing...
`-Werror`
It scares me.<|eor|><|sor|>Watch out for -Werrorwolves<|eor|><|eols|><|endoftext|> | 11 |
programminghorror | meckinze | nc9i0x | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|eols|><|endoftext|> | 1,141 |
programminghorror | Amaranthine | gy3rd9t | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|eols|><|endoftext|> | 306 |
programminghorror | dUeFgo7ExH | gy3pt7w | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|eols|><|endoftext|> | 100 |
programminghorror | TGX03 | gy3qkda | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>What happened when you ran it?<|eor|><|sor|>If I imagine correctly, the switch statement will simply jump to the first default: Statement and then go on from there. The second default... | 93 |
programminghorror | thepromaper | gy3zfkx | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|sor|>They work in GML.<|eor|><|eols|><|endoftext|> | 74 |
programminghorror | t4pf | gy3vmlz | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>Completely agree. The... | 72 |
programminghorror | Race_Me_IRL | gy44uwy | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>Fun fact, switches are basically just gotos and allow you to make total garbage spaghetti:
switch(i) {
printf("what.\n");
default:
printf("idk.\n");
... | 61 |
programminghorror | NeckBeardedJedi | gy3ptnc | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>What happened when you ran it?<|eor|><|eols|><|endoftext|> | 52 |
programminghorror | thepromaper | gy4bfzx | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|sor|>They work in GML.<|eor|><|sor|>Does it detect it's in a conditional and treat it as a `==` instead of an assignment?<|eor|><|... | 50 |
programminghorror | amoliski | gy4b51m | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|sor|>They work in GML.<|eor|><|sor|>Does it detect it's in a conditional and treat it as a `==` instead of an assignment?<|eor|><|... | 49 |
programminghorror | SimonHolm | gy4d2us | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>What happened when you ran it?<|eor|><|sor|>If I imagine correctly, the switch statement will simply jump to the first default: Statement and then go on from there. The second default... | 38 |
programminghorror | vijexa | gy3ytu8 | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>Wait until you learn ... | 35 |
programminghorror | Skote2 | gy4x0ld | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|sor|>Unclosed curly braces, too<|eor|><|sor|>They're closed that's the editor folding the brackets. Look at the line numbers.<|eor... | 35 |
programminghorror | graycode | gy5fbuh | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>Fun fact, switches are basically just gotos and allow you to make total garbage spaghetti:
switch(i) {
printf("what.\n");
default:
printf("idk.\n");
... | 30 |
programminghorror | UnluckyLuke | gy3vwh7 | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>Even since I learned ... | 27 |
programminghorror | TheNorthComesWithMe | gy4vsta | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>Completely agree. The... | 23 |
programminghorror | more_exercise | gy4olc9 | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>That single = in the ifs has me nervous too <|eor|><|sor|>Unclosed curly braces, too<|eor|><|eols|><|endoftext|> | 22 |
programminghorror | FallenWarrior2k | gy47xwb | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>Wait until you learn ... | 19 |
programminghorror | Direwolf202 | gy4hjws | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>rust's `match` is eve... | 16 |
programminghorror | KingJellyfishII | gy433gs | <|sols|><|sot|>The fact that the complier let this run, and it worked.....<|eot|><|sol|>https://i.redd.it/oo3zmc1sf3z61.png<|eol|><|sor|>I'm still convinced that a C switch is just a hack. Go has the ideal switch imo since break is default behaviour and fallthrough has to be requested<|eor|><|sor|>rust's `match` is eve... | 15 |
programminghorror | schloppity | v3i7c7 | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|eols|><|endoftext|> | 1,145 |
programminghorror | CitrusLizard | iayon6p | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|eols|><|endoftext|> | 334 |
programminghorror | saichampa | iayv1yb | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Don't look up recu... | 121 |
programminghorror | schloppity | iayoqu1 | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|soopr|>Just a list of things:
- python already has arrays containing letters and digits in the builtin `string` module
- it doesnt have to be a list - strings are iterable and thus... | 107 |
programminghorror | Ian678 | iayndie | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|> $result = null;
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9));
for($i = 0; $i < 10; $i++) {
$result = $result.$chars[array_rand($char... | 88 |
programminghorror | SmotherMeWithArmpits | iayl8zq | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|> $result = null;
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9));
for($i = 0; $i < 10; $i++) {
$result = $result.$chars[array_rand($char... | 78 |
programminghorror | redman3global | iaz5qvl | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Don't look up recu... | 70 |
programminghorror | therobertgarcia | ib045wg | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Don't look up recu... | 43 |
programminghorror | -MazeMaker- | iayqa9o | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Uh oh, you seem to... | 38 |
programminghorror | sjuas690 | ib0e7r1 | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Don't look up recu... | 35 |
programminghorror | xX_HolyFire_Xx | iayihtp | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Issues with this
bro made 10 same lists
didnt start at 0
and obviously he is not using loops reee<|eor|><|eols|><|endoftext|> | 30 |
programminghorror | J_Blackwater_2569 | iaz3b4z | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Uh oh, you seem to... | 26 |
programminghorror | Jolknan | ib0foel | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|>Looked up 'loops' on Stack Overflow, copied the code, went to paste, and thought no, maybe try loops! So I looked up loops on Stack Overflow...<|eor|><|sor|>Don't look up recu... | 26 |
programminghorror | H-s-O | iaz0fkl | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|> $result = null;
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9));
for($i = 0; $i < 10; $i++) {
$result = $result.$chars[array_rand($char... | 24 |
programminghorror | 4hpp1273 | ib0d4er | <|sols|><|sot|>If you find yourself pressing Ctrl-V while coding, maybe try loops.<|eot|><|sol|>https://i.redd.it/xeolbgk9q9391.png<|eol|><|sor|> $result = null;
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9));
for($i = 0; $i < 10; $i++) {
$result = $result.$chars[array_rand($char... | 23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.