subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
programminghorror | freeranger05 | ja5ay13 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>You were right to capture this part. The names and initializations leave no doubt about how truly horrific the rest is. I'm also pretty sure it is a looong function too.<|eor|><|soopr|>Lmao ... | 57 |
programminghorror | Minastik | ja5ay58 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>tempyyyyboyyy<|eor|><|sor|>Yep .... Too many temps... Of different types...
I wonder how this person names the funcions func, func1, func2, ...?<|eor|><|sor|>Phew.
Funcyboy, funcygirl, fu... | 56 |
programminghorror | KFBoom | ja53cu3 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>tempyyyyboyyy<|eor|><|sor|>Yep .... Too many temps... Of different types...
I wonder how this person names the funcions func, func1, func2, ...?<|eor|><|eols|><|endoftext|> | 55 |
programminghorror | ironnewa99 | ja53ao1 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>When you don't need the Obsfucator anymore because it comes by "design".<|eor|><|soopr|>Ahahahaha this is golden<|eoopr|><|eols|><|endoftext|> | 52 |
programminghorror | Sedenic | ja4odz0 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>You were right to capture this part. The names and initializations leave no doubt about how truly horrific the rest is. I'm also pretty sure it is a looong function too.<|eor|><|eols|><|endo... | 50 |
programminghorror | WhatsMyUsername13 | ja5h49s | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>Coworker or classmate? Dont tell me this person actually makes money doing this<|eor|><|soopr|>They do lol<|eoopr|><|sor|>Tell me this didn't make it through code review.<|eor|><|eols|><|end... | 38 |
programminghorror | OptimalMain | ja57t0c | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>Ghidra gives me better names than this when I decompile stuff.. wow<|eor|><|eols|><|endoftext|> | 33 |
programminghorror | mark__fuckerberg | ja7l134 | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>Coworker or classmate? Dont tell me this person actually makes money doing this<|eor|><|soopr|>They do lol<|eoopr|><|sor|>Tell me this didn't make it through code review.<|eor|><|soopr|>Lmao... | 31 |
programminghorror | new2bay | ja659ol | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>Coworker or classmate? Dont tell me this person actually makes money doing this<|eor|><|soopr|>They do lol<|eoopr|><|sor|>Tell me this didn't make it through code review.<|eor|><|soopr|>Lmao... | 28 |
programminghorror | cob59 | ja5apis | <|sols|><|sot|>Snippet of a coworkers code(sorry for trash picture)<|eot|><|sol|>https://i.redd.it/23hh3s26emka1.jpg<|eol|><|sor|>is this fucking CodeBlocks?<|eor|><|sor|>Probably bundled with a compiler from the previous century, too.<|eor|><|eols|><|endoftext|> | 27 |
programminghorror | territrades | r0fb01 | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|eols|><|endoftext|> | 1,058 |
programminghorror | kluzzebass | hls7ugx | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>The code looks generated, tbh.<|eor|><|eols|><|endoftext|> | 390 |
programminghorror | jazzmester | hltmoax | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>The code looks generated, tbh.<|eor|><|sor|>There is a voice calling from the deepest pits of my mind, a voice I have grown to detest, th... | 162 |
programminghorror | territrades | hlrwvkc | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|soopr|>Bonus points if you noticed that sqrt is a wildcard import from math.<|eoopr|><|eols|><|endoftext|> | 156 |
programminghorror | KripC2160 | hls7hlg | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Context please this looks more like assembly or machine code to me lmfao<|eor|><|eols|><|endoftext|> | 96 |
programminghorror | gipp | hlsito9 | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Context please this looks more like assembly or machine code to me lmfao<|eor|><|sor|>No, it's definitely scientific numerical code. Judg... | 96 |
programminghorror | LoquaciousRaven | hls7sii | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Please tell us this is the result of some metaprogramming... (Not that that makes it acceptable, multidim arrays ars a thing after all, b... | 63 |
programminghorror | emilvikstrom | hlsln3p | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Context please this looks more like assembly or machine code to me lmfao<|eor|><|sor|>No, it's definitely scientific numerical code. Judg... | 56 |
programminghorror | wwelna | hlsijzq | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Nobody is gonna transcribe that<|eor|><|sor|>I ran it through one of those free OCR Image to Text converters and I got this
>!relul =Ire... | 51 |
programminghorror | michaelDav1s | hls86qb | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>that looks like generated shitcode<|eor|><|eols|><|endoftext|> | 50 |
programminghorror | kluzzebass | hltmyr6 | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>The code looks generated, tbh.<|eor|><|sor|>There is a voice calling from the deepest pits of my mind, a voice I have grown to detest, th... | 45 |
programminghorror | jddddddddddd | hlryr1l | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>At least you chose sensible variables names otherwise you code would illegible..<|eor|><|eols|><|endoftext|> | 41 |
programminghorror | Racerdude | hlsy9pz | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|soopr|>Bonus points if you noticed that sqrt is a wildcard import from math.<|eoopr|><|sor|>Not a "from" import then?<|eor|><|eols|><|endoftex... | 34 |
programminghorror | cyberrich | hlvrz7s | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|soopr|>Bonus points if you noticed that sqrt is a wildcard import from math.<|eoopr|><|sor|>Eh, wildcard import can be bad, but math is standa... | 31 |
programminghorror | kowdermesiter | hlt68ik | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>10k more lines like this, then
git add .
git commit -m "update"
git push origin master<|eor|><|eols|><|endoftext|> | 30 |
programminghorror | yard2010 | hlsa7ek | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>Nobody is gonna transcribe that<|eor|><|eols|><|endoftext|> | 27 |
programminghorror | turunambartanen | hlvr1x5 | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|soopr|>Bonus points if you noticed that sqrt is a wildcard import from math.<|eoopr|><|sor|>Eh, wildcard import can be bad, but math is standa... | 24 |
programminghorror | lightwhite | hlsa3up | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>It looks like a punchcard template sequence to make some lights do something.<|eor|><|eols|><|endoftext|> | 19 |
programminghorror | omg_drd4_bbq | hlv527l | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>The code looks generated, tbh.<|eor|><|sor|>There is a voice calling from the deepest pits of my mind, a voice I have grown to detest, th... | 18 |
programminghorror | Martin8412 | hltuy4o | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>that looks like generated shitcode<|eor|><|sor|>It's certainly not ergonomic for humans to deal with, but if you know how the code will b... | 17 |
programminghorror | vinnceboi | hlt09p5 | <|sols|><|sot|>Good thing he added this one comment to the code, otherwise I would not understand it. Written in python.<|eot|><|sol|>https://i.redd.it/chh95rua2d181.png<|eol|><|sor|>semicolons in python????<|eor|><|sor|>Its valid, just not necessarily necessary<|eor|><|eols|><|endoftext|> | 14 |
programminghorror | b1ack1323 | 11zja8j | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|eols|><|endoftext|> | 1,053 |
programminghorror | GerbilScream | jdcz759 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|eols|><|endoftext|> | 268 |
programminghorror | b1ack1323 | jdd0hx4 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|soopr|>Fortunately, it is a really small company and I have purchasing power,... | 254 |
programminghorror | uz45 | jdctpfk | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Oh my god guys I just got hired, looks at codebase<|eor|><|eols|><|endoftext|> | 110 |
programminghorror | b1ack1323 | jdd01vg | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Can someone explain the problem<|eor|><|soopr|>Several apparent problems:
Large files like this cause your IDE to run incredibly slow.
This forces large recompiles as the compiler does not modularize re... | 86 |
programminghorror | kacjugr | jdddo9p | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I'm very relieved to hear that this is a generational divide, and I'm not just in an organization full of madmen.<|eor|><|eols|><|endoftext|> | 77 |
programminghorror | GerbilScream | jdd2sbb | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|soopr|>Fortunately, it is a really small company and I have purchasing power,... | 77 |
programminghorror | b1ack1323 | jdctx45 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Oh my god guys I just got hired, looks at codebase<|eor|><|soopr|>Been with this org for 6 years, first time I have looked at this legacy code base.<|eoopr|><|eols|><|endoftext|> | 68 |
programminghorror | nimitzhunter | jdddy6d | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Oh my god guys I just got hired, looks at codebase<|eor|><|soopr|>Been with this org for 6 years, first time I have looked at this legacy code base.<|eoopr|><|sor|>Admit it OP, took you 6 years to get to ... | 65 |
programminghorror | LovingThatPlaid | jdd588q | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>For some reason I completely disregarded the line number and thought you were talking about the extra empty line at the bottom lol. I was so confused for a bit<|eor|><|eols|><|endoftext|> | 62 |
programminghorror | -PM_me_your_recipes | jdd8ksd | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We got close to files like this. Recently, my work started a codebase cleanup initiative to help improve security and make our codebase easier to work with. We refactored/removed close to 50k lines of le... | 45 |
programminghorror | ActiveLlama | jddx3xs | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|soopr|>Fortunately, it is a really small company and I have purchasing power,... | 45 |
programminghorror | kacjugr | jddi6qi | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>[deleted]<|eor|><|sor|>I'm very relieved to hear that this is a generational divide, and I'm not just in an organization full of madmen.<|eor|><|sor|>[deleted]<|eor|><|sor|>I've had a number of cases wher... | 41 |
programminghorror | Schokokampfkeks | jdd6wzn | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|soopr|>Fortunately, it is a really small company and I have purchasing power,... | 37 |
programminghorror | dchidelf | jddf5ro | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>[deleted]<|eor|><|sor|>Mostly a difference of not developing in an IDE as you pointed out. In an IDE you can jump to the definition even if it is in another file. In vi it is easier to just jump around in... | 32 |
programminghorror | Andy_B_Goode | jddg4a2 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Can someone explain the problem<|eor|><|soopr|>Several apparent problems:
Large files like this cause your IDE to run incredibly slow.
This forces large recompiles as the compiler does not modularize re... | 29 |
programminghorror | Jawertae | jdeyes1 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|soopr|>Fortunately, it is a really small company and I have purchasing power,... | 27 |
programminghorror | b1ack1323 | jdd03tt | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>Can you not just simply fix it with a script?<|eor|><|soopr|>Parsing C++ correctly is no small feat.<|eoopr|><|eols|><|endoftext|> | 26 |
programminghorror | goizn_mi | jdgb9n1 | <|sols|><|sot|>Oh no.... Hundreds of files like this.<|eot|><|sol|>https://i.redd.it/p3bz8gxtihpa1.png<|eol|><|sor|>We have tons of vb.net like this. The worst part is making a change and waiting 45 seconds for intellisense to update.<|eor|><|sor|>Hah, intellisense?? Get a load of this guy, everyone. He's got intellise... | 25 |
programminghorror | Diapolo10 | k2p4kf | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|eols|><|endoftext|> | 1,055 |
programminghorror | danfay222 | gdw3c6q | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Wow I didnt know there was a way to access the underlying pointers in python<|eor|><|eols|><|endoftext|> | 176 |
programminghorror | Diapolo10 | gdwastl | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|soopr|>Basically, it works because CPython caches the integers from -5 to 256 (inclusive) as an optimisa... | 137 |
programminghorror | Frptwenty | gdw8zl1 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Wow I didnt know there was a way to access the underlying pointers in python<|eor|><|sor|>ctypes is part of the standard library in CPython. Its not really recommended use to do this... | 127 |
programminghorror | Tautres | gdw603b | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|eols|><|endoftext|> | 62 |
programminghorror | Mr_Redstoner | gdwcf21 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|soopr|>Basically, it works because CPython caches the integers from -5 to 256 (inclusive) as an optimisa... | 51 |
programminghorror | R3D3-1 | gdw77ow | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Yeah, super scary to change the value of a pointed-to int.<|eor|><|sor|>The scary part is that you can redefine, what the constant `2` means, apparently.
Scarier yet, it also change... | 49 |
programminghorror | Frptwenty | gdw1pr1 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Yeah, super scary to change the value of a pointed-to int.<|eor|><|eols|><|endoftext|> | 46 |
programminghorror | Frptwenty | gdw85r5 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Yeah, super scary to change the value of a pointed-to int.<|eor|><|sor|>The scary part is that you can redefine, what the constant `2` means, apparently.
Scarier yet, it also change... | 37 |
programminghorror | Diapolo10 | gdwb66b | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|soopr|>Since this kind of blew up more than I was expecting, you can read more about why and how this works in this Stack Overflow answer: https://stackoverflow.com/a/62188431<|eoopr|><|e... | 29 |
programminghorror | StenSoft | gdw6bx3 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|sor|>Yes, that's exactly what it does<|eor|><|eols|><|endoftext|> | 29 |
programminghorror | coderacer | gdwo8rk | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|soopr|>Basically, it works because CPython caches the integers from -5 to 256 (inclusive) as an optimisa... | 27 |
programminghorror | tjf314 | gdwqvdm | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>my favorite use of this is this piece of code:
```
>__import__(ctypes).c_uint64.from_address(id(4)+24)).value = 5
>2 + 2
5
```<|eor|><|eols|><|endoftext|> | 23 |
programminghorror | Blue_Vision | gdz9c3e | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Wow I didnt know there was a way to access the underlying pointers in python<|eor|><|sor|>If you're the adventurous type, there are some pretty fun talks out there on how deep you ca... | 19 |
programminghorror | Diapolo10 | gdyoaam | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Wow I didnt know there was a way to access the underlying pointers in python<|eor|><|sor|>If you're the adventurous type, there are some pretty fun talks out there on how deep you ca... | 18 |
programminghorror | Blue_Vision | gdymcts | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Wow I didnt know there was a way to access the underlying pointers in python<|eor|><|sor|>If you're the adventurous type, there are some pretty fun talks out there on how deep you ca... | 17 |
programminghorror | GIA2X7LMT | gdwues8 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|soopr|>Basically, it works because CPython caches the integers from -5 to 256 (inclusive) as an optimisa... | 17 |
programminghorror | backtickbot | gdwqwjy | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>my favorite use of this is this piece of code:
```
>__import__(ctypes).c_uint64.from_address(id(4)+24)).value = 5
>2 + 2
5
```<|eor|><|sor|>Hello, tjf314: code blocks using backtic... | 15 |
programminghorror | Blue_Vision | gdym3s1 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Why does this work? Is the literal number 2 an object you can change?<|eor|><|soopr|>Basically, it works because CPython caches the integers from -5 to 256 (inclusive) as an optimisa... | 11 |
programminghorror | Blue_Vision | gdyp2r7 | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Yeah, super scary to change the value of a pointed-to int.<|eor|><|sor|>The scary part is that you can redefine, what the constant `2` means, apparently.
Scarier yet, it also change... | 9 |
programminghorror | cholz | gdwqt7f | <|sols|><|sot|>I fear no man. But that... thing (`ctypes`)... it scares me.<|eot|><|sol|>https://i.redd.it/r52bpz3axz161.png<|eol|><|sor|>Oh. Oh no.<|eor|><|eols|><|endoftext|> | 7 |
programminghorror | anh0516 | jj5fzu | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|eols|><|endoftext|> | 1,053 |
programminghorror | Badabinski | gaant8h | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 427 |
programminghorror | truh | gaajvqc | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Cython exists.<|eor|><|eols|><|endoftext|> | 249 |
programminghorror | sneezerb | gaawlfq | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Cython exists.<|eor|><|sor|>Also python has bytecode that it gets compiled into.<|eor|><|eols|><|endoftext|> | 114 |
programminghorror | PN_Guin | gaal4ps | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>I am not completely sure about python, but I know a compiler (of sorts) exists for php (which is interpreted too).
I... | 85 |
programminghorror | rangeDSP | gaar2gb | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 79 |
programminghorror | TheTacoWombat | gaasl3t | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 50 |
programminghorror | yhu420 | gaan28k | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>[Yeah but technically uhhh you know..](https://stackoverflow.com/a/16869074/3001271)
But I guess your class probably ... | 39 |
programminghorror | jelder | gaantgz | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Pretty sure python has a compilation stage and does wind up executing bytecode, even if there's no _explicit_ compilat... | 34 |
programminghorror | necheffa | gab975l | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 34 |
programminghorror | tonydrago | gab7nbd | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Cython exists.<|eor|><|sor|>So does [Jython](https://en.wikipedia.org/wiki/Jython)<|eor|><|eols|><|endoftext|> | 26 |
programminghorror | you90000 | gaayh4m | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>.pyc exists
Yes you can compile python<|eor|><|eols|><|endoftext|> | 25 |
programminghorror | truh | gaaymwm | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Cython exists.<|eor|><|sor|>[deleted]<|eor|><|sor|>>**Cython** is an **optimising static compiler** for both the [**Py... | 23 |
programminghorror | SuspiciousScript | gab4dz4 | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>I am not completely sure about python, but I know a compiler (of sorts) exists for php (which is interpreted too).
I... | 22 |
programminghorror | Terrain2 | gaari16 | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>[Yeah but technically uhhh you know..](https://stackoverflow.com/a/16869074/3001271)
But I guess your class probably ... | 17 |
programminghorror | red_riding_hoot | gaarw1t | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>I am not completely sure about python, but I know a compiler (of sorts) exists for php (which is interpreted too).
I... | 17 |
programminghorror | Nicnl | gaatpnp | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Cython exists.<|eor|><|sor|>[removed]<|eor|><|sor|>_It looks like there aren't many great matches for your search_<|eo... | 17 |
programminghorror | vtable | gaauunj | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Pretty sure python has a compilation stage and does wind up executing bytecode, even if there's no _explicit_ compilat... | 15 |
programminghorror | MopishOrange | gabj4cs | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 14 |
programminghorror | necheffa | gabn66o | <|sols|><|sot|>My Programming Fundamentals class has a lesson called "Compiling and Executing in Python. Python is an interpreted language.<|eot|><|sol|>https://i.redd.it/2pwuvavn8ov51.png<|eol|><|sor|>Python goes through a compilation step and has its own bytecode format. There's very little magic that happens during ... | 14 |
programminghorror | Analprop | 11p9gxu | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|eols|><|endoftext|> | 1,050 |
programminghorror | Eluvatar_the_second | jbwracy | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Looks like someone ran XML through a ~~bad~~ professor written XML to JSON converter.<|eor|><|eols|><|endoftext|> | 268 |
programminghorror | RizzoTheSmall | jbwu5m0 | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Links to Json spec.
Posts document that doesn't confirm to Json spec.
I hope someone pointed it out to the professor.<|eor|><|eols|><|endoftext|> | 210 |
programminghorror | The_Ovani | jby0f2l | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Why is it so hard to fix the fucking indentation? It makes me so mad man lol<|eor|><|eols|><|endoftext|> | 121 |
programminghorror | SoLoDas | jbwqjip | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>a little annotation
it would be
...
"study": {
"category" : "Computer Science",
"level" : "bachelor"
}
}<|eor|><|sor|>it's not valid json
```
{ // presumed, keys can't exist without an object
"docu... | 100 |
programminghorror | FluffyWonder3149 | jbwq9ca | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>a little annotation
it would be
...
"study": {
"category" : "Computer Science",
"level" : "bachelor"
}
}<|eor|><|eols|><|endoftext|> | 73 |
programminghorror | IanisVasilev | jbx6cii | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Looks like someone ran XML through a ~~bad~~ professor written XML to JSON converter.<|eor|><|sor|>Is the professor bad or the converter?<|eor|><|eols|><|endoftext|> | 70 |
programminghorror | Lucian41 | jbx7oo0 | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Looks like someone ran XML through a ~~bad~~ professor written XML to JSON converter.<|eor|><|sor|>Is the professor bad or the converter?<|eor|><|sor|>At least one of them<|eor|><|eols|><|endoftext|> | 66 |
programminghorror | JeffIpsaLoquitor | jbxmjf5 | <|sols|><|sot|>Taken from slides at uni course<|eot|><|sol|>https://i.redd.it/2x7x3balr9na1.png<|eol|><|sor|>Looks like someone ran XML through a ~~bad~~ professor written XML to JSON converter.<|eor|><|sor|>Worst programmers I've encountered (from least to worst):
1. Engineers (not the software kind)
2. Lawyers (typic... | 48 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.