subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | aarnens | jiaanzw | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>I understand minified code better than this function<|eor|><|sor|>Ive been writing JavaScript for like 15 years and I cant figure out what the hell this does.<|eor|><|... | 54 |
programminghorror | AL51percentcorn | ji9zev3 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>I feel sssiiiccckkk<|eor|><|eols|><|endoftext|> | 40 |
programminghorror | alexvoedi | jiabpav | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|soopr|>Some clarifications:
- We are a small startup with only 3 devs (now 2).
- This is part of a Vue.js app he worked on alone for a few years.
- He now works for anothe... | 38 |
programminghorror | Lewistrick | ji9tk7o | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>The only thing this person learned about variable naming is that variables must have (at least) three letters.<|eor|><|eols|><|endoftext|> | 36 |
programminghorror | ZzanderMander | jia02l1 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>Well, this guy does not have to worry that code minifier will take his job<|eor|><|eols|><|endoftext|> | 31 |
programminghorror | unix_enjoyer305 | jia7iz3 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>fff -> in chaaat<|eor|><|eols|><|endoftext|> | 24 |
programminghorror | nimitzhunter | ji96j9s | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>What language is this?<|eor|><|sor|>Look like JavaScript with loadash Lib.<|eor|><|eols|><|endoftext|> | 21 |
programminghorror | Nightmoon26 | ji9gc86 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>Not as close to what I've seen in production :)<|eor|><|sor|>I've seen code like that in production, but we usually have to run it through an obfuscator before it look... | 17 |
programminghorror | al_balone | jiazjjg | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>I understand minified code better than this function<|eor|><|sor|>Ive been writing JavaScript for like 15 years and I cant figure out what the hell this does.<|eor|><|... | 14 |
programminghorror | NiteShdw | jic2ksy | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>I understand minified code better than this function<|eor|><|sor|>Ive been writing JavaScript for like 15 years and I cant figure out what the hell this does.<|eor|><|... | 12 |
programminghorror | salman-pathan | jia3ya6 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>Even uglifier generates more meaningful variable names than this<|eor|><|eols|><|endoftext|> | 11 |
programminghorror | Weird_Artsy_Demon666 | jic8h35 | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>Variables must have murdered their family and this is their revenge<|eor|><|sor|>Relateable<|eor|><|eols|><|endoftext|> | 11 |
programminghorror | GottfriedEulerNewton | jia9kzz | <|sols|><|sot|>Someone who used to work at the same company as I do has produced this code<|eot|><|sol|>https://i.redd.it/gcr7epsd0xwa1.png<|eol|><|sor|>It comes pre obfuscated!<|eor|><|eols|><|endoftext|> | 10 |
programminghorror | Walter_Kraut | hsr7ln | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|eols|><|endoftext|> | 768 |
programminghorror | ThatSwedishBastard | fycdkwu | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>Name and shame the application doing this.<|eor|><|eols|><|endoftext|> | 103 |
programminghorror | DownVoteBecauseISaid | fycdrj4 | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>I think that's the reason why I have (also) 8 installed, regardless of the newest version. This happend on several machines to me..<|eor|><|eols|><|endoftext|> | 84 |
programminghorror | TheDiamondPicks | fycb31y | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|sor|>It might just be too new? You can try reverting to 1.7 or something<|eor|><|soopr|>Yes but why this error message? <|eoopr|><|... | 82 |
programminghorror | robrobk | fyck3ao | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|sor|>It might just be too new? You can try reverting to 1.7 or something<|eor|><|soopr|>Yes but why this error message? <|eoopr|><|... | 60 |
programminghorror | Griff2470 | fycpf6n | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>Name and shame the application doing this.<|eor|><|sor|>I mean, it's a program from 2013 at the (hopefully) latest, and probably even before 2010. Since then Java has the jdk ve... | 54 |
programminghorror | Walter_Kraut | fyc6ll1 | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|eols|><|endoftext|> | 45 |
programminghorror | LucasDuck13 | fyc8j0q | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|sor|>It might just be too new? You can try reverting to 1.7 or something<|eor|><|eols|><|endoftext|> | 43 |
programminghorror | Griff2470 | fycoplq | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>11 < 16
I think that's what's going on here. The horror.<|eor|><|sor|>No, Java used to denote versions in the second number, but have since changed it to the first.
What it's ... | 20 |
programminghorror | HotRodLincoln | fycvwg2 | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>Name and shame the application doing this.<|eor|><|sor|>I mean, it's a program from 2013 at the (hopefully) latest, and probably even before 2010. Since then Java has the jdk ve... | 20 |
programminghorror | rsclient | fydj26a | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>This is oracle's fault for changing the version format honestly.<|eor|><|sor|>I've come to the painful conclusion that every system should have an "IsVersionAtLeast('<version>')... | 19 |
programminghorror | robrobk | fyckrow | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>I think that's the reason why I have (also) 8 installed, regardless of the newest version. This happend on several machines to me..<|eor|><|sor|>[deleted]<|eor|><|sor|>also have... | 16 |
programminghorror | clunkyarcher | fycnakf | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>##r/desperate_programmers
---------------------------------------------
^(For mobile and non-RES users) ^|
[^(More info)](https://np.reddit.com/r/botwatch/comments/6xrrvh/click... | 14 |
programminghorror | RuthBaderBelieveIt | fycxslh | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|sor|>It might just be too new? You can try reverting to 1.7 or something<|eor|><|soopr|>Yes but why this error message? <|eoopr|><|... | 14 |
programminghorror | ObiKenobii | fyckca5 | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|soopr|>What should I do to fix this wtf <|eoopr|><|sor|>It might just be too new? You can try reverting to 1.7 or something<|eor|><|soopr|>Yes but why this error message? <|eoopr|><|... | 13 |
programminghorror | lostaztecian | fydl5lr | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>I think that's the reason why I have (also) 8 installed, regardless of the newest version. This happend on several machines to me..<|eor|><|sor|>It is not about machines or java... | 11 |
programminghorror | Griff2470 | fycolco | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>Is this because they're taking the versions, stripping out all the dots, casting to a number, and then seeing which is higher or lower?
That's all I can think of<|eor|><|sor|>J... | 11 |
programminghorror | dataJam | fydrhp1 | <|sols|><|sot|>Desperately installing jdk Crosspost from r/desperate_programmers<|eot|><|sol|>https://i.redd.it/n2loym8nadb51.png<|eol|><|sor|>I think that's the reason why I have (also) 8 installed, regardless of the newest version. This happend on several machines to me..<|eor|><|sor|>It is not about machines or java... | 11 |
programminghorror | manofsticks | 12u8d4e | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|eols|><|endoftext|> | 768 |
programminghorror | v_maria | jh5org1 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>its cool when abstractions abstract nothing and are just a collection of lines of code<|e... | 379 |
programminghorror | siscoisbored | jh5vebf | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 257 |
programminghorror | manofsticks | jh5y6en | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 198 |
programminghorror | siscoisbored | jh5z4n0 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 130 |
programminghorror | forksporkspoon | jh64lkl | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>A long time ago I worked with a guy who didn't name anything. Default17.aspx was the entr... | 75 |
programminghorror | lx_DD_xl | jh5xph2 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>This is me. You see, the requirements kept changing. Id rename the functions, devs would ... | 66 |
programminghorror | skantanio | jh68z1g | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 54 |
programminghorror | LeCrushinator | jh865ii | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 38 |
programminghorror | Instatetragrammaton | jh69chx | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>This is his retirement plan; charge through the nose for him to come back a few hours and... | 31 |
programminghorror | cucklory | jh7zb8u | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>Looks like they originally learnt cobol and moved to other languages later<|eor|><|eols|>... | 16 |
programminghorror | mashdots | jh8vb3n | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>its cool when abstractions abstract nothing and are just a collection of lines of code<|e... | 16 |
programminghorror | wggn | jh6euv4 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 14 |
programminghorror | torgreed | jh9bqo4 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 13 |
programminghorror | John_Fx | jh6ipzc | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>Why bother with subroutines? This guy is old school.<|eor|><|eols|><|endoftext|> | 11 |
programminghorror | PM_ME_YOUR_REPO | jh85k3f | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>Looks like they originally learnt cobol and moved to other languages later<|eor|><|sor|>I... | 11 |
programminghorror | chipstastegood | jh89bou | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>Was his first and only programming language BASIC?<|eor|><|eols|><|endoftext|> | 8 |
programminghorror | government_shill | jh9a29t | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 6 |
programminghorror | r0ck0 | jh8rj56 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>I actually do number ***prefix*** some function + file names sometimes in complex code wh... | 5 |
programminghorror | Dubanx | jh9g1m3 | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 5 |
programminghorror | Shower_Handel | jh9eczs | <|sols|><|sot|>Senior dev retiring. During knowledge transfer he said that he prefers to name functions based on the order they run in the program, not on what they do.<|eot|><|sol|>https://i.redd.it/5gxgpgwfc9va1.png<|eol|><|sor|>The order they run? What kind of programs are they making that only runs every function o... | 5 |
programminghorror | No-Economist-1885 | qnzs5s | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|eols|><|endoftext|> | 769 |
programminghorror | GrilledSpamSteaks | hjjpfdj | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>If it compiles without error, runs correctly and isnt something I have to maintain, yes. if you say no to any one of those 3, then no.<|eor|><|eols|><|endoftext|> | 209 |
programminghorror | MrPandaOverlord | hjjr4t4 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>The only thing that would make this better is having the less than condition first so that way it has to go through both condition checks everytime<|eor|><|eols|><|endoftext|> | 169 |
programminghorror | MrPandaOverlord | hjjw2p3 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>The only thing that would make this better is having the less than condition first so that way it has to go through both condition checks everytime<|eor|><|soopr|>I've fixed that bug , thx<|eoopr|><|sor|>Time to update ... | 147 |
programminghorror | vornamemitd | hjjq8z8 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Behind the scenes of an advanced AI/ML cloud solution provider =]<|eor|><|eols|><|endoftext|> | 117 |
programminghorror | No-Economist-1885 | hjjsx6m | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>The only thing that would make this better is having the less than condition first so that way it has to go through both condition checks everytime<|eor|><|soopr|>I've fixed that bug , thx<|eoopr|><|eols|><|endoftext|> | 100 |
programminghorror | Magmagan | hjjv133 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 76 |
programminghorror | papacheapo | hjk5pby | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 32 |
programminghorror | No-Economist-1885 | hjjwjwm | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 24 |
programminghorror | papacheapo | hjk19ds | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 24 |
programminghorror | Horny20yrold | hjk0dng | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>It's literally just a table lookup lmao.
​
70% of the world's bad code would disappear if people stopped thinking of "if" the exact nano second they hear about setting a value conditional on another value, the... | 22 |
programminghorror | No-Economist-1885 | hjjwnnt | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 20 |
programminghorror | No-Economist-1885 | hjk1to7 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 16 |
programminghorror | helloureddit | hjjtgpb | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>You could round down XM initially and then just have equal cases ==1, ==2...<|eor|><|eols|><|endoftext|> | 10 |
programminghorror | mo3sw | hjjsp16 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>I have an idea to make it simpler. From what I saw, for any value of XM between two integers there is a predefined value.
Store these value in an array and the index is the floor of XM. Next time just return arr[floor(... | 9 |
programminghorror | GrilledSpamSteaks | hjk6mhv | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>So.. I was being flippant with my original post as I assumed you were showing off bad coding ideas. If you are looking for actual help, thats a different story and not what I am accustomed to seeing here.
Best way, imo... | 7 |
programminghorror | Ty_Rymer | hjkg8s6 | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 7 |
programminghorror | RedditF1shBlueF1sh | hjksvyn | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>You could round down XM initially and then just have equal cases ==1, ==2...<|eor|><|sor|>This + switch-case<|eor|><|sor|>This - swtich-case + dictionary<|eor|><|eols|><|endoftext|> | 6 |
programminghorror | pigeon768 | hjlh5by | <|sols|><|sot|>Am I doing this right ?<|eot|><|sol|>https://i.redd.it/uxeqwljb4zx71.jpg<|eol|><|sor|>Can .m (matlab?) can do something like
MY_MAGIC_NUMBER_LIST = [
0.42,
0.40,
0.38,
...,
0.59,
]
CxOp = MY_MAGIC_NUMBER_LIST[floor(XM)]
Or, if you need something more flex... | 6 |
programminghorror | nathan_lesage | x0k791 | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|eols|><|endoftext|> | 769 |
programminghorror | xmcqdpt2 | im8p32z | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|eols|><|endoftext|> | 200 |
programminghorror | DespoticLlama | im8iu1v | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|eols|><|endoftext|> | 127 |
programminghorror | annoyed_freelancer | im8pyys | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>So as a TS dev, I'm on the fence about this code:
- It's readable, mostly. The regex doesn't seem to do anything particularly fucky that I see; there's no lookahead, lookbehind, weird special chars, o... | 75 |
programminghorror | pcgamerwannabe | im92h3l | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>Quick, tell me what the first 4 regexes are doing and the bottom ... | 59 |
programminghorror | TorbenKoehn | im8qoor | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>Yup, I've really seen worse. This is code you will encounter in t... | 51 |
programminghorror | kluzzebass | im9gg1z | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|soopr|>Exactly that.<|eoopr|><|sor|>I am loathe to say this but surely there is a package for that?<|eor|><|sor|>Perhaps t... | 49 |
programminghorror | nathan_lesage | im8locw | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|soopr|>Exactly that.<|eoopr|><|eols|><|endoftext|> | 46 |
programminghorror | nathan_lesage | im8hosb | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|soopr|>Code as text for the amazing human volunteers:
```javascript
return text
.replace(/^\`{1,3}.+?^\`{1,3}$/gsm, '')
.replace(/^-{3}.+?^(?:-{3}|\.{3})$/gsm, '')
.replace(/^#{1,6}\s+/gm, '')
... | 35 |
programminghorror | kuemmel234 | im8vcf6 | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>I think this sort of code really needs to be broken up. Especiall... | 35 |
programminghorror | Pastrami | im90pkx | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>This sub loves to hate on regex.<|eor|><|eols|><|endoftext|> | 24 |
programminghorror | ApeOfGod | im8qjqw | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|soopr|>Code as text for the amazing human volunteers:
```javascript
return text
.replace(/^\`{1,3}.+?^\`{1,3}$/gsm, '')
.replace(/^-{3}.+?^(?:-{3}|\.{3})$/gsm, '')
.replace(/^#{1,6}\s+/gm, '')
... | 24 |
programminghorror | 50v3r31gn | ima8aqg | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>This sub loves to hate on regex.<|eor|><|sor|>Regex is fine. It's... | 24 |
programminghorror | nathan_lesage | im9ao9l | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|soopr|>Exactly that.<|eoopr|><|sor|>I am loathe to say this but surely there is a package for that?<|eor|><|soopr|>Honestl... | 23 |
programminghorror | Tubthumper8 | im94z94 | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>Quick, tell me what the first 4 regexes are doing and the bottom ... | 21 |
programminghorror | DespoticLlama | im97mg6 | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|soopr|>Exactly that.<|eoopr|><|sor|>I am loathe to say this but surely there is a package for that?<|eor|><|eols|><|endoft... | 20 |
programminghorror | DespoticLlama | imasqbc | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>Looks like it is stripping out markdown and then parsing the remainder<|eor|><|soopr|>Exactly that.<|eoopr|><|sor|>I am loathe to say this but surely there is a package for that?<|eor|><|sor|>Perhaps t... | 20 |
programminghorror | itsjustawindmill | im9jvnk | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>Quick, tell me what the first 4 regexes are doing and the bottom ... | 15 |
programminghorror | reallyserious | imafdrm | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>This sub loves to hate on regex.<|eor|><|sor|>Regex is fine. It's... | 14 |
programminghorror | nathan_lesage | im93ikz | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|sor|>It might need some comments but frankly it doesnt strike me as particularly bad? It's multiple regex not just a giant one.<|eor|><|sor|>Quick, tell me what the first 4 regexes are doing and the bottom ... | 13 |
programminghorror | namelessmasses | im99v0p | <|sols|><|sot|>Functional OOP programming in RegExp hell<|eot|><|sol|>https://i.redd.it/xxmf6cnhdmk91.png<|eol|><|soopr|>Code as text for the amazing human volunteers:
```javascript
return text
.replace(/^\`{1,3}.+?^\`{1,3}$/gsm, '')
.replace(/^-{3}.+?^(?:-{3}|\.{3})$/gsm, '')
.replace(/^#{1,6}\s+/gm, '')
... | 13 |
programminghorror | BuyMyBeardOW | 128bel8 | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|eols|><|endoftext|> | 770 |
programminghorror | TheKraftyCTO | jei3dv5 | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>Me who hates (document) relative paths because it makes restructuring things annoying later <|eor|><|eols|><|endoftext|> | 178 |
programminghorror | robclancy | jejrzmy | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>This has to be the weakest horror Ive seen show up on my homepage.<|eor|><|eols|><|endoftext|> | 141 |
programminghorror | serg06 | jeikx37 | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>Common refactoring error.<|eor|><|eols|><|endoftext|> | 119 |
programminghorror | rmini | jejf5ln | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>How is this horror<|eor|><|sor|>The file is presumably in a project folder named DarQuest, so not only is the path equivalent to just "icons/goldCoin.png", it's also fragile--... | 95 |
programminghorror | scorpion-and-frog | jejd7y5 | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>How is this horror<|eor|><|eols|><|endoftext|> | 57 |
programminghorror | iSYan1995 | jei4xae | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>Me who hates (document) relative paths because it makes restructuring things annoying later <|eor|><|sor|>The worst of both worlds<|eor|><|eols|><|endoftext|> | 46 |
programminghorror | scorpion-and-frog | jejhrcf | <|sols|><|sot|>Bro be exiting and entering his own house to check if he is at home<|eot|><|sol|>https://i.redd.it/1l64o08tc7ra1.png<|eol|><|sor|>How is this horror<|eor|><|sor|>The file is presumably in a project folder named DarQuest, so not only is the path equivalent to just "icons/goldCoin.png", it's also fragile--... | 44 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.