subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
qqqrrrs_
h2bet3k
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|eols|><|endoftext|>
169
programminghorror
Farfignugen42
h2cc404
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>This belongs to r/programmerhumor<|eor|><|sor|>Or r/TechnicallyCorrect<|eor|><|eols|><|endoftext|>
94
programminghorror
O_X_E_Y
h2bjwbq
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
86
programminghorror
Sentinull
h2bkldu
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
78
programminghorror
The_Cosmin
h2bgyv3
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>a, b = b, a<|eor|><|eols|><|endoftext|>
56
programminghorror
vincent-vega10
h2bubsj
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>Lol in my first ever programming class, I asked my professor if I could do this instead of using a temporary variable. My dumbass thought printing was the important thing here and not the actual swapping.<|eor|>...
41
programminghorror
InverseHackermann
h2bnwex
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|>I can't remember the exact details, but doesn't that fail if both parameters are the same, or one is zero, or something?<|eor|...
41
programminghorror
bistr-o-math
h2ccvxm
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>This belongs to r/programmerhumor<|eor|><|sor|>Or r/TechnicallyCorrect<|eor|><|sor|>This is technically not correct, because r/TechnicallyCorrect is a sub for videos<|eor|><|eols|><|endoftext|>
30
programminghorror
TinyBreadBigMouth
h2c6168
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|>I can't remember the exact details, but doesn't that fail if both parameters are the same, or one is zero, or something?<|eor|...
30
programminghorror
camswp
h2bvpgr
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>a, b = b, a<|eor|><|sor|>This is c++ tho<|eor|><|eols|><|endoftext|>
26
programminghorror
lightmatter501
h2bkx1z
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
25
programminghorror
MCWizardYT
h2c97op
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
21
programminghorror
Possibility_Antique
h2by0gp
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>Is this some peasant joke Im too Python to understand?<|eor|><|sor|>No, this works in Python as well. OP is just reading Num1 into Num2 instead of actually performing a swap<|eor|><|eols|><|endoftext|>
19
programminghorror
MCWizardYT
h2bzq9t
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
19
programminghorror
Jane6447
h2bjqjh
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>i used to do a similar thing during 8th class on our school calculator, because i didn't understand how to set a variable in ti basic and there was no dokumentation.. (its "(content) -> (variable)")<|eor|><|eols...
18
programminghorror
MCWizardYT
h2bzxov
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|> what does the ^= operator do? Edit: formatting made my life hard, I meant to say `^=` but reddit won't have it show up that ...
18
programminghorror
_siggies_
h2cmn04
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>a, b = b, a<|eor|><|sor|>This works in python, Go, and some other programming languages but not in C++. Try printing the output afterwards and theyll be the same.<|eor|><|eols|><|endoftext|>
16
programminghorror
NeoKabuto
h2c188a
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|> void swap(int *a, int *b) { *a ^= *b ^= *a ^= *b; }<|eor|><|sor|>I'd be pretty surprised if this compiled to something more efficient than using a temporary.<|eor|><|sor|>Compilers are fuckin...
16
programminghorror
KushagrJ
h2cuqux
<|sols|><|sot|>Easiest way to swap two numbers<|eot|><|sol|>https://i.redd.it/ilb658s3l7671.jpg<|eol|><|sor|>a, b = b, a<|eor|><|sor|>This works in python, Go, and some other programming languages but not in C++. Try printing the output afterwards and theyll be the same.<|eor|><|sor|>Weird. I thought it would give an e...
14
programminghorror
CoderCharmander
jloz8p
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|eols|><|endoftext|>
1,945
programminghorror
CoderCharmander
gaq7i9d
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
597
programminghorror
CoderCharmander
gaq8swx
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
350
programminghorror
figuresys
gaqlv7n
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
320
programminghorror
Mr_Redstoner
gaqdb9o
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>I also love the `(String)"Clearly a string"` that the decompiler produced.<|eor|><|eols|><|endoftext|>
214
programminghorror
IrritableGourmet
gaqumhd
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
134
programminghorror
bearly_breathing
gaqc1eg
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
132
programminghorror
das_Keks
gar6uou
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>From the docs >`public void setSeed(byte[] seed)` > >Reseeds this random object. The given seed supplements, rather than replaces, the existing seed. Thu...
114
programminghorror
Razier
gaqyo1q
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
99
programminghorror
das_Keks
gar82e8
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>Sounds malicious.<|eor|><|soopr|>It's in fact not, it's an official app to buy train tickets. And this makes it *just a bit* worse.<|eoopr|><|sor|>Which coun...
91
programminghorror
captainfoxtrot-
gaqed1x
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>I also love the `(String)"Clearly a string"` that the decompiler produced.<|eor|><|sor|>Could it be a char\[\] vs string thing? I know it's sometimes necessar...
71
programminghorror
Mr_Redstoner
gaqelxl
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>I also love the `(String)"Clearly a string"` that the decompiler produced.<|eor|><|sor|>Could it be a char\[\] vs string thing? I know it's sometimes necessar...
59
programminghorror
Cadenticity
gar7i2t
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|soopr|>Bonus fact: it has a close relation with money. **EDIT**: While it's still horror, it does not cause a lot of problems. The "generated" key is used to stor...
59
programminghorror
McGoldrick11_
gaqhnad
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>But they named it secure so it must be secure<|eor|><|eols|><|endoftext|>
58
programminghorror
minn0w
gaqg7i4
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>Could be this: https://en.m.wikipedia.org/wiki/Nothing-up-my-sleeve_number<|eor|><|eols|><|endoftext|>
37
programminghorror
thockinator
gaqi6kl
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>Could be this: https://en.m.wikipedia.org/wiki/Nothing-up-my-sleeve_number<|eor|><|sor|>If I understand it correctly those numbers are only used for initialis...
34
programminghorror
CoderCharmander
gaqdemr
<|sols|><|sot|>I decompiled a random app and it uses a hardcoded seed to generate an encryption key<|eot|><|sol|>https://i.redd.it/1njx2ag4khw51.jpg<|eol|><|sor|>Maybe the constraint was out of their control on server software they didn't write and it *has* to be encrypted with this key. I guess I don't exactly get the...
34
programminghorror
virgo911
t9j6yc
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|eols|><|endoftext|>
1,929
programminghorror
Liesmith424
hzvivd3
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|eols|><|endoftext|>
413
programminghorror
AttackOfTheThumbs
hzv0qws
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Yeah, some of the templates that come with extensions are insane. I get that kind of crap a lot. I wish templates could be more context sensitive.<|eor|><|eols|><|...
184
programminghorror
jambox888
hzwa6xm
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|sor|>Looks like you're trying to write a AbstractSingletonProxyFactory...
138
programminghorror
shygal_uwu
hzvcm5q
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>IntelliDoesntMakeSense<|eor|><|eols|><|endoftext|>
123
programminghorror
TheOneAndOnlyBaron
hzup25e
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Especially in razor files, as I see you're doing here. A tip - you can write multiline C# code with a code block `@{` `// write code here` `}`<|eor|><|eols|><|...
110
programminghorror
Ill-Chemistry2423
hzwiq8s
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>IntelliDoesntMakeSense<|eor|><|sor|>r/IntelliNonsense<|eor|><|eols|><|endoftext|>
71
programminghorror
virgo911
hzwbfd5
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|soopr|>This is why I code on pen and paper and use text recognition so...
64
programminghorror
Various_Studio1490
hzww3p3
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|sor|>Looks like you're trying to write a AbstractSingletonProxyFactory...
55
programminghorror
zigs
hzv67bv
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>I love visual studio to death, but the razor support was a joke even before blazor, which is even worse. That is despite both razor and blazor being amazing to wo...
45
programminghorror
PranshuKhandal
hzx4rgb
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|sor|>Looks like you're trying to write a AbstractSingletonProxyFactory...
44
programminghorror
justjanne
hzvifec
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is another example why a working IDE requires direct integration, not just an API for some external language servers. Visual Studio Code is as good editor, b...
31
programminghorror
Liesmith424
hzwvnl9
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is why I code in Word and depend on Clippy for code-completion recommendations.<|eor|><|soopr|>This is why I code on pen and paper and use text recognition so...
30
programminghorror
numerousblocks
hzw1ud2
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Accept on enter is terrible.<|eor|><|eols|><|endoftext|>
28
programminghorror
bootsareme
hzx0uyk
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Me: I like me a for loop :) Resharper: Do you mean: `PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON_REQ_RELOCS`<|eor|><|eols|><|endoftext|>
28
programminghorror
AyrA_ch
hzuqxtq
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Especially in razor files, as I see you're doing here. A tip - you can write multiline C# code with a code block `@{` `// write code here` `}`<|eor|><|sor|>Wha...
26
programminghorror
Meaxis
hzvo1v3
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>This is another example why a working IDE requires direct integration, not just an API for some external language servers. Visual Studio Code is as good editor, b...
26
programminghorror
saichampa
hzy9j27
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Yeah, some of the templates that come with extensions are insane. I get that kind of crap a lot. I wish templates could be more context sensitive.<|eor|><|sor|>Mos...
21
programminghorror
Tasik
hzx1z8u
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>IntelliDoesntMakeSense<|eor|><|sor|>r/IntelliNonsense<|eor|><|sor|>I wanted that to be real. :(<|eor|><|eols|><|endoftext|>
21
programminghorror
Kirillin1111
hzvfala
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>trust me, it's better than eclipse. like way, way better. especially that it does not require pressing enter, just spacebar is enough to have a huge java class ins...
19
programminghorror
NatoBoram
hzxl661
<|sols|><|sot|>Pressing Enter while typing anything in Visual Studio is a minefield these days<|eot|><|sol|>https://i.redd.it/eyptphp2h6m81.jpg<|eol|><|sor|>Accept on enter is terrible.<|eor|><|sor|>Yeah, accept on tab is the only way to go<|eor|><|eols|><|endoftext|>
19
programminghorror
LadyxLucie
pmb5yb
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|eols|><|endoftext|>
1,931
programminghorror
Vega_128
hcged9i
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|eols|><|endoftext|>
302
programminghorror
LadyxLucie
hcggjjb
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|eols|><|endoftext|>
252
programminghorror
cuye
hch6t0l
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>Im thinking this was an attempt at fixing a problem that went away before it was finished<|eor|><|eols|><|endoftext|>
215
programminghorror
UniqueUsername014
hcgjp7t
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
129
programminghorror
GreatBarrier86
hch7pz6
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>Im thinking this was an attempt at fixing a problem that went away before it was finished<|eor|><|sor|>That or, and this is my guess, it did something else and when it was no longer needed, they made ...
85
programminghorror
LadyxLucie
hcgrk9k
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>You are assuming `isEmptyOrNull` has no side...
74
programminghorror
kvicksilv3r
hchkibv
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
68
programminghorror
tchernobog84
hcgmdib
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>You are assuming `isEmptyOrNull` has no side...
58
programminghorror
emc87
hcidhov
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
52
programminghorror
kvicksilv3r
hcic232
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
44
programminghorror
CatWeekends
hci3ej4
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>Im thinking this was an attempt at fixing a problem that went away before it was finished<|eor|><|sor|>That or, and this is my guess, it did something else and when it was no longer needed, they made ...
43
programminghorror
ElvinDrude
hchh6eu
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>You are assuming `isEmptyOrNull` has no side...
33
programminghorror
BruhWhereAretheNames
hch2yqr
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>Wish i could see what the comment said<|eor|><|eols|><|endoftext|>
30
programminghorror
vigbiorn
hcglfzn
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Looking on the bright side... I have a simi...
30
programminghorror
LadyxLucie
hcgmml1
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Looking on the bright side... I have a simi...
30
programminghorror
j01101111sh
hciiufz
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
28
programminghorror
ManEatingSnail
hchjd2w
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>Reminds me of one of my former boss' Excel s...
27
programminghorror
Tvde1
hch9g0i
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>so it returns all the time?<|eor|><|soopr|>Yep! It always returns the same value that was passed in. No idea why anyone would ever need this<|eoopr|><|sor|>You are assuming `isEmptyOrNull` has no side...
27
programminghorror
Sassbjorn
hchf990
<|sols|><|sot|>Found this great method in production code<|eot|><|sol|>https://i.redd.it/akg7dxqcowm71.jpg<|eol|><|sor|>This was written at 3 am<|eor|><|eols|><|endoftext|>
26
programminghorror
G4merXsquaD
od3vyl
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|eols|><|endoftext|>
1,932
programminghorror
shinx32
h3y83un
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Is this code from Chrome ?<|eor|><|eols|><|endoftext|>
607
programminghorror
AC2302
h3y4nit
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Real men malloc 1024<|eor|><|eols|><|endoftext|>
456
programminghorror
WhiskeyCarp
h3yc7f8
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>LDOS - Local Denial of Service<|eor|><|eols|><|endoftext|>
386
programminghorror
tuankiet65
h3yeg1q
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>[Leaks are ~~desirable~~ not a concern if the program terminates before exhausting all available memory](https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125).<|eor|><|eols|><|endoftext|>
229
programminghorror
not_some_username
h3ymu4a
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Real men malloc 1024<|eor|><|sor|>\*Real men malloc(sizeof(int)/4)<|eor|><|eols|><|endoftext|>
122
programminghorror
backfire10z
h3yf3z8
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>[Leaks are ~~desirable~~ not a concern if the program terminates before exhausting all available memory](https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125).<|eor|><|sor|>Leaks are not desirable theyre ...
90
programminghorror
TheHansinator255
h3y6esk
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>If I remember, on C this is not enough to fill the memory<|eor|><|sor|>Malloc never fail something like that.<|eor|><|sor|>Right, it won't complain until you actually write to the memory. EDIT: At least Linux won't...
75
programminghorror
G4merXsquaD
h408xg4
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>LDOS - Local Denial of Service<|eor|><|soopr|>Google Chrome: Denial of ram<|eoopr|><|eols|><|endoftext|>
60
programminghorror
not_some_username
h3y628i
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>If I remember, on C this is not enough to fill the memory<|eor|><|sor|>Malloc never fail something like that.<|eor|><|eols|><|endoftext|>
57
programminghorror
Johanno1
h3yjfmx
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Missing fork()<|eor|><|eols|><|endoftext|>
45
programminghorror
SanderE1
h3y53jy
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>ouch my ram<|eor|><|eols|><|endoftext|>
44
programminghorror
mrheosuper
h3zrpsj
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Real men malloc 1024<|eor|><|sor|>\*Real men malloc(sizeof(int)/4)<|eor|><|sor|>(Real_men*) malloc(sizeof(int)/4)<|eor|><|eols|><|endoftext|>
42
programminghorror
ArrozConmigo
h3yy9pn
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>I worked at a place where the IT department had a God Complex, and in order to get a memory upgrade, you had to show them a screenshot of task manager showing you using all your memory. So, yah. Then they said it ...
41
programminghorror
jfisher9495
h3z2lzi
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Real men malloc 1024<|eor|><|sor|>Real women calloc<|eor|><|eols|><|endoftext|>
36
programminghorror
Zymoox
h3yjkpj
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>Is this code from Chrome ?<|eor|><|sor|>You better accept the award I just gave you<|eor|><|eols|><|endoftext|>
32
programminghorror
tuankiet65
h3yfhcc
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>[Leaks are ~~desirable~~ not a concern if the program terminates before exhausting all available memory](https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125).<|eor|><|sor|>Leaks are not desirable theyre ...
31
programminghorror
99stem
h3yp80o
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>If I remember, on C this is not enough to fill the memory<|eor|><|sor|>Malloc never fail something like that.<|eor|><|sor|>Right, it won't complain until you actually write to the memory. EDIT: At least Linux won't...
31
programminghorror
Nicnl
h3ye30x
<|sols|><|sot|>Came across this on VSinder<|eot|><|sol|>https://i.redd.it/rty3kg4sm1971.png<|eol|><|sor|>If I remember, on C this is not enough to fill the memory<|eor|><|sor|>Malloc never fail something like that.<|eor|><|sor|>Right, it won't complain until you actually write to the memory. EDIT: At least Linux won't...
29
programminghorror
Im-Not-a-Redditor123
122vyvt
<|sols|><|sot|>HTMLLLLLLLLLLLLLLLLLLLL<|eot|><|sol|>https://i.redd.it/hvg7zl7ss4qa1.jpg<|eol|><|eols|><|endoftext|>
1,912
programminghorror
SmashLanding
jds16yx
<|sols|><|sot|>HTMLLLLLLLLLLLLLLLLLLLL<|eot|><|sol|>https://i.redd.it/hvg7zl7ss4qa1.jpg<|eol|><|sor|>Looks like a very depressing flag<|eor|><|eols|><|endoftext|>
274
programminghorror
BarfingOnYourFace
jds2cru
<|sols|><|sot|>HTMLLLLLLLLLLLLLLLLLLLL<|eot|><|sol|>https://i.redd.it/hvg7zl7ss4qa1.jpg<|eol|><|sor|>HtmELL<|eor|><|eols|><|endoftext|>
116
programminghorror
foot-inner-canvas
jdsdels
<|sols|><|sot|>HTMLLLLLLLLLLLLLLLLLLLL<|eot|><|sol|>https://i.redd.it/hvg7zl7ss4qa1.jpg<|eol|><|sor|>Looks like a very depressing flag<|eor|><|sor|>This would be great for r/VexillologyCirclejerk<|eor|><|eols|><|endoftext|>
99