subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | JamesWjRose | mm52zx | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 1,001 |
programminghorror | DiskFormal | gtp8rdh | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 408 |
programminghorror | JamesWjRose | gtp8wwe | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 244 |
programminghorror | veryusedrname | gtph5wy | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 161 |
programminghorror | JamesWjRose | gtpgdxd | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 132 |
programminghorror | mohragk | gtpcy5l | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 124 |
programminghorror | AyrA_ch | gtpkayg | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 111 |
programminghorror | Monkeyget | gtpg9lj | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 104 |
programminghorror | JamesWjRose | gtplbd2 | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 76 |
programminghorror | 0xF013 | gtpvv41 | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 74 |
programminghorror | whatdaadmech211 | gtpdqkq | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 71 |
programminghorror | mohragk | gtpdxee | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 70 |
programminghorror | DiskFormal | gtpctor | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 62 |
programminghorror | TinyBreadBigMouth | gtqdy16 | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 54 |
programminghorror | mrcrassic | gtpkdu4 | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 49 |
programminghorror | keyrol1222 | gtpqk8k | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 46 |
programminghorror | Ceros007 | gtpgvzx | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 45 |
programminghorror | JamesWjRose | gtpl5om | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 45 |
programminghorror | JamesWjRose | gtpkjke | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 41 |
programminghorror | JamesWjRose | gtpojv1 | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 40 |
programminghorror | JamesWjRose | gtpd1fd | <|soss|><|sot|>The worst code/pattern I have ever seen.<|eot|><|sost|>There is just so much wrong with this company, that I no longer work for, that it's hard to comprehend.
eg:
* Asking me to work for free
* Asking employees to come into the office during a hurricane
* Having a call center in midtown Manhattan
* Hav... | 37 |
programminghorror | prashant13b | r99po9 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|eols|><|endoftext|> | 997 |
programminghorror | zigs | hnb2w8b | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>if the 20 chosen countries have to be greater than or equal the randomized limit, then the top 20 countries will always be a valid answer.<|eor|>... | 554 |
programminghorror | TechcraftHD | hnbfs4d | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 449 |
programminghorror | roanoked | hnau8a2 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>sounds like a fun challenge, but it should be asked in the interview to learn about your approach rather than actually wanting a real accurate an... | 259 |
programminghorror | VincentVancalbergh | hnbb64m | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>I have 20+ years experience in software development. I know enough to easily solve this in several ways. But I also know enough not to apply for ... | 189 |
programminghorror | TechcraftHD | hnbgo9h | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 182 |
programminghorror | ritajalilip | hnbsw2x | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>if the 20 chosen countries have to be greater than or equal the randomized limit, then the top 20 countries will always be a valid answer.<|eor|>... | 179 |
programminghorror | prashant13b | hnawpp9 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>sounds like a fun challenge, but it should be asked in the interview to learn about your approach rather than actually wanting a real accurate an... | 156 |
programminghorror | pttp60 | hnbl2xh | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 130 |
programminghorror | JohnHwagi | hnbzki4 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 89 |
programminghorror | ckthorp | hnbggdr | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 82 |
programminghorror | repetitive_chanting | hnbhqj4 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>sounds like a fun challenge, but it should be asked in the interview to learn about your approach rather than actually wanting a real accurate an... | 68 |
programminghorror | JackalopeZero | hnba8qi | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>sounds like a fun challenge, but it should be asked in the interview to learn about your approach rather than actually wanting a real accurate an... | 67 |
programminghorror | lordpuza | hnc7qkl | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>if the 20 chosen countries have to be greater than or equal the randomized limit, then the top 20 countries will always be a valid answer.<|eor|>... | 63 |
programminghorror | prashant13b | hnbslwt | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 57 |
programminghorror | HoppCoin | hnb3stl | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>It is quite bad, as problem statements go. First of all, Earth is a geode, not a sphere. Distance from geocoordinates is not straightforward. But... | 53 |
programminghorror | MattVanAndel | hndd0a0 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>"Calculate the sum of all lines that can be drawn between coordinates"
They are aware that there are an infinite number of lines that can be dra... | 53 |
programminghorror | silentjet | hnapg61 | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>just run....<|eor|><|eols|><|endoftext|> | 50 |
programminghorror | thebritisharecome | hnbsj2p | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>I have 20+ years experience in software development. I know enough to easily solve this in several ways. But I also know enough not to apply for ... | 45 |
programminghorror | tchernobog84 | hnb3bpm | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>It is quite bad, as problem statements go. First of all, Earth is a geode, not a sphere. Distance from geocoordinates is not straightforward. But... | 43 |
programminghorror | Sharlinator | hnbe9ay | <|sols|><|sot|>Applied for a job got hit with this. I don't know where to start how shit this question is asked.<|eot|><|sol|>https://i.redd.it/m49q88uq6o381.png<|eol|><|sor|>It is quite bad, as problem statements go. First of all, Earth is a geode, not a sphere. Distance from geocoordinates is not straightforward. But... | 34 |
programminghorror | xigoi | jl1sge | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|eols|><|endoftext|> | 993 |
programminghorror | tylerr147 | ganead5 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|sor|>then what the fuck is it eating<|eo... | 241 |
programminghorror | xigoi | gamlf47 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|eols|><|endoftext|> | 157 |
programminghorror | figuresys | ganga4v | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|sor|>then what the fuck is it eating<|eo... | 141 |
programminghorror | cheesits456 | gamkpyb | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|eols|><|endoftext|> | 131 |
programminghorror | bp1608 | gao4iwi | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>This has inspired me to write variable names in Tagalog instead of just obfuscating them.<|eor|><|eols|><|endoftext|> | 76 |
programminghorror | xigoi | gaokf29 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>tf is ukolos?<|eor|><|soopr|>kol is the Czech word for task. o is a random suffix he likes to add to words.<|eoopr|><|eols|><|endoftext|> | 66 |
programminghorror | cuddle_cuddle | gaoldwh | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>I never judge people on what they write for hackathons and similar competitions, god knows I've written some flimsy shit myself.<|eor|><|sor|>"Flimsy" is a nice way to put it.
... | 65 |
programminghorror | danfay222 | gan8nvu | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|sor|>Obviously it determines if you should eat ukolos or not<|eor|><|eols|><|endoftext|> | 58 |
programminghorror | brtt3000 | gansssa | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>tf is ukolos?<|eor|><|eols|><|endoftext|> | 56 |
programminghorror | AdvancingTitan | gaohnf7 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>I never judge people on what they write for hackathons and similar competitions, god knows I've written some flimsy shit myself.<|eor|><|eols|><|endoftext|> | 54 |
programminghorror | TimGreller | gaornjw | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>tf is ukolos?<|eor|><|soopr|>kol is the Czech word for task. o is a random suffix he likes to add to words.<|eoopr|><|sor|>sounds like a solid naming convention.<|eor|><|eols|><|e... | 41 |
programminghorror | cheesits456 | gaoclf9 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|sor|>The program can optimize the electr... | 39 |
programminghorror | daru567 | ganc5xp | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|sor|>Obviously it determines if you should eat ukolos or not<|eor|><|sor|>And clearly European Union is a rate.<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | iamacuteporcupine | gao6ye4 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|sor|>Is your friend on drugs?<|eor|><|e... | 35 |
programminghorror | danfay222 | ganc9f8 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|sor|>Obviously it determines if you should eat ukolos or not<|eor|><|sor|>And clearly European Union is a rate.<|eor|><|sor|>The European Union i... | 32 |
programminghorror | RefrigeratorOk1573 | gap11q6 | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>What does the program do?<|eor|><|soopr|>It's a part of a program that did some kind of optimization of electricity consumption.<|eoopr|><|sor|>then what the fuck is it eating<|eo... | 29 |
programminghorror | xigoi | gaokhec | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>Hey, I love my ligatures!<|eoopr|><|eols|><|endoftext|> | 18 |
programminghorror | EverySingleThread | gaole8h | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>I never judge people on what they write for hackathons and similar competitions, god knows I've written some flimsy shit myself.<|eor|><|sor|>"Flimsy" is a nice way to put it.
... | 16 |
programminghorror | RidleyGrayMusic | gaoahil | <|sols|><|sot|>These variable names my friend has produced during a programming contest<|eot|><|sol|>https://iili.io/3k2kJa.png<|eol|><|sor|>I dont know what makes me more afraid, the fact that that is a thing or the fact that this program is made to optimize electricity...<|eor|><|eols|><|endoftext|> | 14 |
programminghorror | Ill_Professor9920 | 10kgfm3 | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|eols|><|endoftext|> | 996 |
programminghorror | imaQuiliamQuil | j5r3beg | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|eols|><|endoftext|> | 379 |
programminghorror | Ill_Professor9920 | j5qm1bp | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|soopr|>Recursion usualy.
```ts
function recurse(node){
for(let child of node.children){
recurse(child)
}
}
```<|eoopr|><... | 205 |
programminghorror | oalbrecht | j5rmwe1 | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|eols|><|endoftext|> | 179 |
programminghorror | OutrageousFlatworm38 | j5qq8sk | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|soopr|>Recursion usualy.
```ts
function recurse(node){
for(let child of node.children){
recurse(child)
}
}
```<|eoopr|><... | 133 |
programminghorror | OutrageousFlatworm38 | j5qktjo | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|eols|><|endoftext|> | 121 |
programminghorror | sillyredcar | j5rn1ps | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|eols|><|endoftext... | 116 |
programminghorror | CharlyXero | j5rovvy | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 90 |
programminghorror | Few_Clue1627 | j5rqdpy | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 85 |
programminghorror | Dense-Beach-6957 | j5qygv5 | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>I admire the patient and dedication of the people who code like this. I usually Google for the laziest solution. You know what they say: avoid reinventing the wheel<|eor|><|eols|><|endoftext|> | 71 |
programminghorror | beeteedee | j5rbydw | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|soopr|>Recursion usualy.
```ts
function recurse(node){
for(let child of node.children){
recurse(child)
}
}
```<|eoopr|><... | 56 |
programminghorror | joshuakb2 | j5rzq8w | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 53 |
programminghorror | Magmagan | j5r7wxz | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>I admire the patient and dedication of the people who code like this. I usually Google for the laziest solution. You know what they say: avoid reinventing the wheel<|eor|><|sor|>It's sometimes... | 31 |
programminghorror | Jatrrkdd | j5rzdon | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 31 |
programminghorror | AJohnnyTruant | j5rxkh7 | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|soopr|>Recursion usualy.
```ts
function recurse(node){
for(let child of node.children){
recurse(child)
}
}
```<|eoopr|><... | 30 |
programminghorror | bucknut4 | j5sdx7x | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 21 |
programminghorror | kuya1284 | j5s8kie | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 21 |
programminghorror | Zappotek | j5qonnb | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>But how *should* you? I'm asking this for a friend.<|eor|><|soopr|>Recursion usualy.
```ts
function recurse(node){
for(let child of node.children){
recurse(child)
}
}
```<|eoopr|><... | 18 |
programminghorror | Shepard_Overflow | j5sd4ce | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 18 |
programminghorror | ipreferjeremy | j5sg4s8 | <|sols|><|sot|>My friend doesn't know how to iterate over a tree.<|eot|><|sol|>https://i.redd.it/y7mbmvh932ea1.png<|eol|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, is why you need to learn recursion<|eor|><|sor|>This, kids, ... | 14 |
programminghorror | 0sani | q2wtsh | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|eols|><|endoftext|> | 997 |
programminghorror | x4u | hfoylfz | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>needs a little fix:
while( *s ) ++s;
while( *s++ = *t++ );<|eor|><|eols|><|endoftext|> | 215 |
programminghorror | Lekgolo167 | hfo3scg | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>As long as they are null terminated ;)<|eor|><|eols|><|endoftext|> | 184 |
programminghorror | blueg3 | hfoycos | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>As long as they are null terminated ;)<|eor|><|sor|>That's the contract for strcat!<|eor|><|eols|><|endoftext|> | 110 |
programminghorror | kluzzebass | hfowv0v | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>Just make sure enough space is allocated to s.<|eor|><|sor|>That's not necessary for a strcat() implementation.<|eor|><|sor|>Why not? You could accidentally overwrite ... | 76 |
programminghorror | Ytrog | hfpbe34 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>needs a little fix:
while( *s ) ++s;
while( *s++ = *t++ );<|eor|><|sor|>What happens here? My experience with C is limited, however I see some pointer magic g... | 66 |
programminghorror | stumpychubbins | hfoxex8 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>Just make sure enough space is allocated to s.<|eor|><|sor|>That's not necessary for a strcat() implementation.<|eor|><|sor|>Why not? You could accidentally overwrite ... | 58 |
programminghorror | Boris-Holo | hfo9a0z | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>Pretty clever tbh<|eor|><|eols|><|endoftext|> | 57 |
programminghorror | stumpychubbins | hfoxmvx | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>`strcat` is pretty dangerous but this is kinda how I would implement it as well. You may also want to look at [Duff's device](https://en.wikipedia.org/wiki/Duff%27s_de... | 55 |
programminghorror | klausklass | hfpfi00 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>As long as they are null terminated ;)<|eor|><|sor|>That's the contract for strcat!<|eor|><|sor|>[deleted]<|eor|><|sor|>strcat has to trust the input, as theres no rea... | 55 |
programminghorror | stumpychubbins | hfoxxlb | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>You should probably do `while(*s++); s--;` to handle zero-length strings. Also, Im pretty sure the double parentheses are unnecessary. This is a cool simple C code gol... | 51 |
programminghorror | kluzzebass | hforz53 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>Just make sure enough space is allocated to s.<|eor|><|sor|>That's not necessary for a strcat() implementation.<|eor|><|eols|><|endoftext|> | 49 |
programminghorror | AyrA_ch | hfo6icd | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>I'm very confused. What is this empty while loop supposed to do?<|eor|><|sor|>From the docs of strcat:
> Appends a copy of the null-terminated byte string pointed to ... | 46 |
programminghorror | sim642 | hfozwj3 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>As long as they are null terminated ;)<|eor|><|sor|>You'd have no way to check though. Is it missing null terminator or is it just a very long string?<|eor|><|eols|><|... | 44 |
programminghorror | Ytrog | hfpd7h9 | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>needs a little fix:
while( *s ) ++s;
while( *s++ = *t++ );<|eor|><|sor|>What happens here? My experience with C is limited, however I see some pointer magic g... | 41 |
programminghorror | StenSoft | hfonx0r | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>`strcat` is pretty dangerous but this is kinda how I would implement it as well. You may also want to look at [Duff's device](https://en.wikipedia.org/wiki/Duff%27s_de... | 36 |
programminghorror | mgorski08 | hfpey1v | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>As long as they are null terminated ;)<|eor|><|sor|>That's the contract for strcat!<|eor|><|sor|>[deleted]<|eor|><|sor|>Single responsibility principle. This function ... | 35 |
programminghorror | malleoceruleo | hfohd0k | <|sols|><|sot|>Had to implement strcat for class, I'm not sure if this is genius or stupid<|eot|><|sol|>https://i.redd.it/0ur80g6q5xr71.png<|eol|><|sor|>Just make sure enough space is allocated to s.<|eor|><|eols|><|endoftext|> | 34 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.