subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
red_question_mark
jad9jru
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>To be fair and to give this code a benefit of the doubt lets remember that there are projects that have close to zero coverage. That all...
24
programminghorror
scottypants2
jac9yrc
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>And someone out there approved this PR....<|eor|><|eols|><|endoftext|>
19
programminghorror
mesori
jabvblu
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>Explain like I'm five.<|eor|><|eols|><|endoftext|>
17
programminghorror
Ok_Chipmunk_9167
jac7qdr
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>Hi chat gtp how can I use "while"<|eor|><|sor|>That actually would not solve their problem. They need a lot of lines of code in order to...
15
programminghorror
m1ss1ontomars2k4
jabzxrv
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>https://thedailywtf.com/articles/at-least-there-s-tests also mentions Salesforce.<|eor|><|eols|><|endoftext|>
14
programminghorror
broknbottle
jacih77
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>And someone out there approved this PR....<|eor|><|sor|>It was joe and joe loves his Starbucks. Its Amazing what a $7 Frappuccino can ge...
14
programminghorror
Janzu93
jad1s3l
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>This test failed at least 10 times due to off-by-x error<|eor|><|eols|><|endoftext|>
8
programminghorror
rubertsmann
jadj4hp
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>This is why coding metrics with strict requirements are often a bad idea.<|eor|><|sor|>This is why pullrequest process is required<|eor|...
8
programminghorror
ifyoulovesatan
jac81od
<|sols|><|sot|>Found this at work. Someone padded a repo with thousands of lines like this to pass a 75% code coverage check.<|eot|><|sol|>https://i.imgur.com/6GwfYZE.jpg<|eol|><|sor|>Explain like I'm five.<|eor|><|sor|>To catch bugs before a ticket is submitted to even QA, large-scale projects will have test suites th...
8
programminghorror
nacho_doctor
z6m4gl
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|eols|><|endoftext|>
776
programminghorror
Akumashisen
iy2orvs
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>i would guess this is just to show how handleError would be used or for testing purposes left in Edit: i feel like people on this sub sometimes forget that rarely certain code had no purpose, sometimes its just difficult to see i...
109
programminghorror
Sklyanskiy
iy2st4i
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>what the hell is this what does this mean what language has this been written in<|eor|><|sor|>It's JS - wash your hands and eyes after seeing this picture.<|eor|><|eols|><|endoftext|>
57
programminghorror
VMGuy23temporary
iy2pszc
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>what the hell is this what does this mean what language has this been written in<|eor|><|eols|><|endoftext|>
52
programminghorror
Spirit_Theory
iy2utcm
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>As dumb as this looks I'd wager this is for testing purposes.<|eor|><|eols|><|endoftext|>
43
programminghorror
Tisamon12
iy2rl8u
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>i would guess this is just to show how handleError would be used or for testing purposes left in Edit: i feel like people on this sub sometimes forget that rarely certain code had no purpose, sometimes its just difficult to see i...
20
programminghorror
vainstar23
iy30s67
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>Looks like a... *Inhales Stackoverflow<|eor|><|eols|><|endoftext|>
12
programminghorror
Ytrog
iy2qpsn
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>Do they try to crash the Javascript engine whenever an exception happens <|eor|><|eols|><|endoftext|>
11
programminghorror
dewakaputo
iy2tl1k
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>Do they try to crash the Javascript engine whenever an exception happens <|eor|><|sor|>This reminds me of C++... [Throwing an exception in the destructor could result in a crash.](https://stackoverflow.com/a/130123)<|eor|><|eols|><...
11
programminghorror
FM-96
iy2wk4j
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>Wait so if it throws something does that mean that the initial state was responded to or has it been the second one which would throw in return to the initals throw. Would it raise both then? Or just the former? Shroedingers cat or...
9
programminghorror
kristallnachte
iy5vrb2
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>i would guess this is just to show how handleError would be used or for testing purposes left in Edit: i feel like people on this sub sometimes forget that rarely certain code had no purpose, sometimes its just difficult to see i...
9
programminghorror
MsPaganPoetry
iy33uq1
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>As dumb as this looks I'd wager this is for testing purposes.<|eor|><|sor|>I agree. That isnt to say theres some pretty awful testing code.<|eor|><|eols|><|endoftext|>
8
programminghorror
Hydroblitz3307
iy2vpzo
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>what the hell is this what does this mean what language has this been written in<|eor|><|sor|>Bruh my thought proccec entirely minus the What devil made this?<|eor|><|eols|><|endoftext|>
8
programminghorror
kristallnachte
iy2x9yt
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>i would guess this is just to show how handleError would be used or for testing purposes left in Edit: i feel like people on this sub sometimes forget that rarely certain code had no purpose, sometimes its just difficult to see i...
7
programminghorror
guitarist_on_reddit
iy30sz3
<|sols|><|sot|>Handle Bomb<|eot|><|sol|>https://i.redd.it/foa8jj4tpn2a1.jpg<|eol|><|sor|>Boss: Handle the error Dev: Very poor choice of requirements.<|eor|><|eols|><|endoftext|>
5
programminghorror
Shad_Amethyst
gvqv3x
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|eols|><|endoftext|>
776
programminghorror
SkinnyJoshPeck
fsr1x8p
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>You mean you didnt just do Here! Inside this function Still workin...
133
programminghorror
shinitakunai
fsr1ii0
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|eols|><|endoftext|>
109
programminghorror
Shad_Amethyst
fsqjuqv
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Are you building a compiler? Sounds interesting!<|eor|><|soopr|>Yes, here it is: https://github.com/CreativeWolfies/patpat.rs Obviously there aren't any bananas or pineapples in it.<|eoopr|><|eols...
55
programminghorror
mkylem423
fsqjv3a
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Ugh this is so often a thing in newbie code. (not saying you're one, but seeing this triggers memories) Yes it is hilarious you can wrote any old garbage as output in your code. It is also incred...
53
programminghorror
TazzTornado
fsr9dqu
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>You mean you didnt just do Here! Inside this function Still workin...
51
programminghorror
lil-libsoc
fsqe772
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Are you building a compiler? Sounds interesting!<|eor|><|eols|><|endoftext|>
50
programminghorror
cholz
fsrqzwq
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>> 4rd if (ordinal >= 3) { indicator = "rd"; } found ...
28
programminghorror
SirLynix
fsras3q
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I'm a simple dev: I see Rust, I upvote.<|eor|><|eols|><|endoftext|>
22
programminghorror
Dojan5
fsr95r6
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Are you building a compiler? Sounds interesting!<|eor|><|soopr|>Yes, here it is: https://github.com/CreativeWolfies/patpat.rs Obviously there aren't any bananas or pineapples in it.<|eoopr|><|sor|...
21
programminghorror
shashyfication
fss1c7g
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>> 4rd if (ordinal >= 3) { indicator = "rd"; } found ...
18
programminghorror
DharokDark8
fsqtrag
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Ugh this is so often a thing in newbie code. (not saying you're one, but seeing this triggers memories) Yes it is hilarious you can wrote any old garbage as output in your code. It is also incred...
18
programminghorror
whizzythorne
fsr1lh2
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Rust!!!!!!<|eor|><|eols|><|endoftext|>
13
programminghorror
opalelement
fsqwcrv
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Is banana significant or just a unique marker? I usually liked to print the method name and maybe a line number if I had to debug via console output.<|eor|><|sor|>I always use "banana" and I have n...
13
programminghorror
mkylem423
fsr3gzy
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Ugh this is so often a thing in newbie code. (not saying you're one, but seeing this triggers memories) Yes it is hilarious you can wrote any old garbage as output in your code. It is also incred...
13
programminghorror
vicentereyes
fsqzpgp
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Ugh this is so often a thing in newbie code. (not saying you're one, but seeing this triggers memories) Yes it is hilarious you can wrote any old garbage as output in your code. It is also incred...
9
programminghorror
cholz
fss5967
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>> 4rd if (ordinal >= 3) { indicator = "rd"; } found ...
9
programminghorror
Shad_Amethyst
fsr6w79
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>What font is this?<|eor|><|soopr|>Hasklig Medium, which is a fork of Source Code Pro. You can see that the `::` is a ligature (SCP's is more spaced-out)<|eoopr|><|eols|><|endoftext|>
7
programminghorror
shinitakunai
fsrzdhh
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>I used to print numbers. Adding 5-6 prints, then if the output was 1,2,3 i knew the fail was before the 4rd print<|eor|><|sor|>> 4rd if (ordinal >= 3) { indicator = "rd"; } found ...
6
programminghorror
richarmeleon
fsqsniu
<|sols|><|sot|>30 minutes later and my code is a fruit salad<|eot|><|sol|>https://i.redd.it/438pzczt0o251.png<|eol|><|sor|>Is banana significant or just a unique marker? I usually liked to print the method name and maybe a line number if I had to debug via console output.<|eor|><|eols|><|endoftext|>
5
programminghorror
SGVsbG86KQ
jm94w5
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
778
programminghorror
SGVsbG86KQ
gatptc9
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
157
programminghorror
Katana__
gau289j
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
66
programminghorror
bcfradella
gauauk9
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
46
programminghorror
jokullmusic
gav545m
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
45
programminghorror
rubdos
gau2sye
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
34
programminghorror
qqwy
gaubeco
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
32
programminghorror
FM-96
gau3htq
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
25
programminghorror
Flex-Ible
gavzhv6
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
20
programminghorror
glutenfreewhitebread
gauo9dr
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
20
programminghorror
qqwy
gaucx7f
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
18
programminghorror
stone_henge
gavne0c
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
18
programminghorror
JuhaJGam3R
gavi22n
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
17
programminghorror
SkinnyJoshPeck
gav9l85
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
15
programminghorror
bcfradella
gauh1b0
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
15
programminghorror
seiyria
gav37fi
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
14
programminghorror
SGVsbG86KQ
gaucozi
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
12
programminghorror
jlangowski
gausz0b
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
8
programminghorror
huntforacause
gav1tl2
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
6
programminghorror
Randolpho
gawcc8t
<|sols|><|sot|>Ans-Delft, a dutch online exam website, allocates an array to generate random numbers for its exercises. My professor attempted to generate a 30-bit number but the system tried to allocate 8GiB. Later they broke it entirely by making it return the same value over and over.<|eot|><|sol|>https://i.redd.it/...
6
programminghorror
inxaneninja
ip2pwd
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|eols|><|endoftext|>
773
programminghorror
RoadSpell
g4hniz0
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>char a[ULONG_MAX] Smh its this easy<|eor|><|eols|><|endoftext|>
234
programminghorror
NanoExplorer
g4hr44m
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|eols|><|endoftext|>
118
programminghorror
mmonstr_muted
g4hs656
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|sor|>Also all sorts of arbitrary code execution exploits are possible, 1e6+1th must be 0 but the string's probably not null-terminated here..<|eor|><|eols|><|endoftext|>
64
programminghorror
pootisEagle
g4iahhv
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Where did you get my code from?<|eor|><|eols|><|endoftext|>
48
programminghorror
vige
g4itkx1
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>As an embedded programmer, I dare to say that I'm not shivering. It's quite clear that this SW is never going to run on any kind of embedded device, so there's nothing to worry about!<|eor|><|eols|><|e...
40
programminghorror
ougryphon
g4i0m4x
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>*Screams in 16-bit*<|eor|><|eols|><|endoftext|>
38
programminghorror
Veylon
g4hww6g
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|sor|>Also all sorts of arbitrary code execution exploits are possible, 1e6+1th must be 0 but the string's probably not null-terminated here..<|eor|><|sor|>Probably should ...
38
programminghorror
CrimsonMutt
g4j8axq
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>char a[ULONG_MAX] Smh its this easy<|eor|><|sor|>ULONG_TEA<|eor|><|eols|><|endoftext|>
36
programminghorror
orclev
g4ir4k3
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|sor|>Also all sorts of arbitrary code execution exploits are possible, 1e6+1th must be 0 but the string's probably not null-terminated here..<|eor|><|sor|>[deleted]<|eor|>...
35
programminghorror
Shinigami_Hei
g4j0kga
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>As an embedded programmer, I dare to say that I'm not shivering. It's quite clear that this SW is never going to run on any kind of embedded device, so there's nothing to worry about!<|eor|><|sor|>This...
31
programminghorror
GaianNeuron
g4ilq8x
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|sor|>Also all sorts of arbitrary code execution exploits are possible, 1e6+1th must be 0 but the string's probably not null-terminated here..<|eor|><|sor|>Probably should ...
26
programminghorror
Arnaldo_LePalle
g4ivdpv
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>As an embedded programmer, I dare to say that I'm not shivering. It's quite clear that this SW is never going to run on any kind of embedded device, so there's nothing to worry about!<|eor|><|sor|>This...
24
programminghorror
Terence_McKenna
g4igbbq
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Where did you get my code from?<|eor|><|sor|>Acid Burn and Zero Cool<|eor|><|eols|><|endoftext|>
21
programminghorror
mmonstr_muted
g4i0038
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Buffer overflow time!<|eor|><|sor|>Also all sorts of arbitrary code execution exploits are possible, 1e6+1th must be 0 but the string's probably not null-terminated here..<|eor|><|sor|>Probably should ...
20
programminghorror
mohragk
g4hravs
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Or just a char *.<|eor|><|eols|><|endoftext|>
17
programminghorror
R3D3-1
g4iouru
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>Obviously the array size should be a power if two!<|eor|><|eols|><|endoftext|>
16
programminghorror
andiconda
g4ipwa5
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>No malloc. No new. Not shivering outside the fact you just took all the memory from my.... Oh wait my proprietary mcu c compiler can't figure out how to page that.<|eor|><|eols|><|endoftext|>
15
programminghorror
Ceglaaa
g4j0bjg
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>As an embedded programmer, I dare to say that I'm not shivering. It's quite clear that this SW is never going to run on any kind of embedded device, so there's nothing to worry about!<|eor|><|sor|>This...
15
programminghorror
joolzg67
g4ixdxw
<|sols|><|sot|>embedded device programmers are shivering<|eot|><|sol|>https://i.redd.it/7wziilz4tzl51.jpg<|eol|><|sor|>We had a crash in an embedded product that we eventually narrowed down to stack-smashing, so grepping the map file we found someone had decided to allocate 64k on the stack, when the stack was only 8k....
14
programminghorror
WhatsMyUsername13
vxbedj
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|eols|><|endoftext|>
779
programminghorror
WhatsMyUsername13
ifuskuf
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|eols|><|endoftext|>
209
programminghorror
mpevnev
ifux87f
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>This might be a lower bar though...<|eor|><|eols|><|end...
152
programminghorror
k26pl
ifv493f
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>pov: you get paid for lines of code or there must be x% coverage<|eor|><|eols|><|endoftext|>
88
programminghorror
WhatsMyUsername13
ifv7d9o
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>This might be a lower bar though...<|eor|><|soopr|>That...
80
programminghorror
bee-sting
ifuw3o3
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>We've all been there, sleep deprived, caffeine deprived, on a tight deadline and just need to churn out code<|eor|><|eols|><|endoftext|>
55
programminghorror
sivyr
ifuuson
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>Are you sure this didn't just come from a legacy codebase before typescript rules were enforced? This looks like a pretty classic check for strict equali...
43
programminghorror
WhatsMyUsername13
ifvz6e2
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>You realize this is absolutely not the same thing as fa...
42
programminghorror
WhatsMyUsername13
ifuuzk2
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>Are you sure this didn't just come from a legacy codebase before typescript rules were enforced? This looks like a pretty classic check for strict equali...
35
programminghorror
klimmesil
ifvx0s5
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>You realize this is absolutely not the same thing as fa...
32
programminghorror
sivyr
ifuv4rp
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>Are you sure this didn't just come from a legacy codebase before typescript rules were enforced? This looks like a pretty classic check for strict equali...
24
programminghorror
klimmesil
ifvzhq8
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>You realize this is absolutely not the same thing as fa...
22
programminghorror
WhatsMyUsername13
ifwwsz0
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|soopr|>And no, this isnt a student code base or anything. This is an enterprise company<|eoopr|><|sor|>Not enterprise enough. Why is it only 6 lines long?<|eo...
17
programminghorror
reverendsteveii
ifx5r3y
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>pov: you get paid for lines of code or there must be x% coverage<|eor|><|sor|>Yeah, came here to say that this looks like sonarqube food. Especially b...
16
programminghorror
CordyZen
ifvo9h9
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>We've all been there, sleep deprived, caffeine deprived, on a tight deadline and just need to churn out code<|eor|><|sor|>Currently my situation. Im basi...
16
programminghorror
sivyr
ifv1ukg
<|sols|><|sot|>I came across a unit test that led me to this gem of a function today. I have no words.<|eot|><|sol|>https://www.reddit.com/gallery/vxbedj<|eol|><|sor|>Are you sure this didn't just come from a legacy codebase before typescript rules were enforced? This looks like a pretty classic check for strict equali...
15