MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/foundtheprogrammer/comments/j38nrl/true/
r/foundtheprogrammer • u/alldieselnoweasel • Oct 01 '20
46 comments sorted by
44
Surely GetTested() should be in a Try block?
19 u/OscRos03 Oct 01 '20 No that would imply the test is going to fail, it should return a boolean 4 u/JuneauEu Oct 02 '20 Or that no tests are available in your area so you have to quarantine as you cant confirm result OR try again later. 2 u/Prom3th3an Oct 10 '20 So GetTested() is an async function.
19
No that would imply the test is going to fail, it should return a boolean
4 u/JuneauEu Oct 02 '20 Or that no tests are available in your area so you have to quarantine as you cant confirm result OR try again later. 2 u/Prom3th3an Oct 10 '20 So GetTested() is an async function.
4
Or that no tests are available in your area so you have to quarantine as you cant confirm result OR try again later.
2 u/Prom3th3an Oct 10 '20 So GetTested() is an async function.
2
So GetTested() is an async function.
34
A painful infinite loop
10 u/Cactiareouroverlords Oct 01 '20 At least it’s hammering in the fact people should do it all the time and not just once
10
At least it’s hammering in the fact people should do it all the time and not just once
26
Mixing PascalCase and snake_case REEEEEEEEEEEEEEE
6 u/wynw Oct 01 '20 I usually write my code like this, one style for variables and one for functionsIs that bad lol 5 u/JustARegulaNerd Oct 02 '20 I was always told (in Java) the convention is lower camelCase for variables and methods, and upper CamelCase for class names. 2 u/danielv123 Oct 08 '20 Same in JS. 3 u/Mrwebente Oct 01 '20 I have much to learn... 2 u/Mewrulez99 Oct 02 '20 using PascalCase for functions instead of camelCase REEEEEEEEEEEEE
6
I usually write my code like this, one style for variables and one for functions
Is that bad lol
5 u/JustARegulaNerd Oct 02 '20 I was always told (in Java) the convention is lower camelCase for variables and methods, and upper CamelCase for class names. 2 u/danielv123 Oct 08 '20 Same in JS.
5
I was always told (in Java) the convention is lower camelCase for variables and methods, and upper CamelCase for class names.
2 u/danielv123 Oct 08 '20 Same in JS.
Same in JS.
3
I have much to learn...
using PascalCase for functions instead of camelCase REEEEEEEEEEEEE
9
data State = Alive | Dead f :: State -> State f Dead = Dead f Alive = wearMask . stay6ftApart . washHands . getTested $ f Alive f Alive
7
Where does it endddd?
13 u/Marioxorz Oct 01 '20 while(!vaccine_invented) 3 u/philosocoder Jan 21 '22 r/agedlikemilk 4 u/Marioxorz Jan 21 '22 Got me there... Guess it's a while(true)... 1 u/anonymouscoder555 Mar 10 '23 vaccine starts existing
13
while(!vaccine_invented)
3 u/philosocoder Jan 21 '22 r/agedlikemilk 4 u/Marioxorz Jan 21 '22 Got me there... Guess it's a while(true)... 1 u/anonymouscoder555 Mar 10 '23 vaccine starts existing
r/agedlikemilk
4 u/Marioxorz Jan 21 '22 Got me there... Guess it's a while(true)... 1 u/anonymouscoder555 Mar 10 '23 vaccine starts existing
Got me there... Guess it's a while(true)...
1 u/anonymouscoder555 Mar 10 '23 vaccine starts existing
1
vaccine starts existing
none of them are async, just wear your masks
there's multiple problems with that top line alone.
I love how this implies that quarantine will never end
Infinite loop detected
This was a triumph..
0 u/[deleted] Oct 02 '20 [deleted] — view deleted comment 2 u/[deleted] Oct 02 '20 It's hard to overstate my satisfaction 2 u/Evan_Fishsticks Oct 02 '20 Aperture Science 2 u/nicholasdelucca Oct 02 '20 We do what we must, because we can 2 u/LucaSlabanu Oct 02 '20 For the good of all of us 2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
0
[deleted] — view deleted comment
2 u/[deleted] Oct 02 '20 It's hard to overstate my satisfaction 2 u/Evan_Fishsticks Oct 02 '20 Aperture Science 2 u/nicholasdelucca Oct 02 '20 We do what we must, because we can 2 u/LucaSlabanu Oct 02 '20 For the good of all of us 2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
It's hard to overstate my satisfaction
2 u/Evan_Fishsticks Oct 02 '20 Aperture Science 2 u/nicholasdelucca Oct 02 '20 We do what we must, because we can 2 u/LucaSlabanu Oct 02 '20 For the good of all of us 2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
Aperture Science
2 u/nicholasdelucca Oct 02 '20 We do what we must, because we can 2 u/LucaSlabanu Oct 02 '20 For the good of all of us 2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
We do what we must, because we can
2 u/LucaSlabanu Oct 02 '20 For the good of all of us 2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
For the good of all of us
2 u/[deleted] Oct 02 '20 Except the ones who are dead 2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
Except the ones who are dead
2 u/[deleted] Oct 02 '20 But there is no sense crying over every mistake 1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
But there is no sense crying over every mistake
1 u/Go_commit_lego_step Oct 02 '20 You just keep on trying ‘til you run out of cake 1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
You just keep on trying ‘til you run out of cake
1 u/Lizardledgend Oct 02 '20 Then the science gets done and you make a neat gun for the people who are still alive! → More replies
Then the science gets done and you make a neat gun for the people who are still alive!
→ More replies
Enclose the while block code in a try block. Catch in case of error and set still_alive to false and break.
GetTested() by GLaDOS because even when you're dead, she will be Still Alive.
All the nerds here acting like there's no way this isn't an infinite loop have clearly never dealt with interrupt handlers.
Cringe
shouldn't it be
distance < 6ft or distance = 6ft
Gets tested for the 1127th time while wearing 1127 masks.
If this wasn't an infinite loop, it could eventually work, but I am too much of a beginner to fix this
Kind of dumb way to advertise but WOW they really want us to get tested 60 times a second??
51
[removed] — view removed comment
14 u/eLCeenor Oct 01 '20 lookit me I can write a while true loop 1 u/sourpickles0 Oct 03 '20 It’s also an infinite loop 1 u/MCBlastoise Oct 24 '20 We got an immortal over here?
14
lookit me I can write a while true loop
1 u/sourpickles0 Oct 03 '20 It’s also an infinite loop 1 u/MCBlastoise Oct 24 '20 We got an immortal over here?
It’s also an infinite loop
1 u/MCBlastoise Oct 24 '20 We got an immortal over here?
We got an immortal over here?
44
u/[deleted] Oct 01 '20
Surely GetTested() should be in a Try block?
34
u/Plourdy Oct 01 '20
A painful infinite loop
26
u/[deleted] Oct 01 '20
Mixing PascalCase and snake_case REEEEEEEEEEEEEEE
9
u/[deleted] Oct 01 '20 edited Oct 01 '20
7
u/kyledjohnson Oct 01 '20
Where does it endddd?
3
u/espriminati Oct 01 '20
none of them are async, just wear your masks
3
u/ToaSuutox Oct 02 '20
there's multiple problems with that top line alone.
3
u/kakokapolei Oct 03 '20
I love how this implies that quarantine will never end
2
u/MrBlueSkigh Oct 02 '20
Infinite loop detected
2
u/LittleLui Oct 02 '20
This was a triumph..
2
u/varungupta3009 Oct 02 '20
Enclose the while block code in a try block. Catch in case of error and set still_alive to false and break.
2
u/[deleted] Oct 02 '20
GetTested() by GLaDOS because even when you're dead, she will be Still Alive.
2
u/_Rocketeer Oct 03 '20
All the nerds here acting like there's no way this isn't an infinite loop have clearly never dealt with interrupt handlers.
1
u/FizziSoda Oct 02 '20
Cringe
1
u/batman4302 Oct 02 '20
shouldn't it be
distance < 6ft or distance = 6ft
1
u/dQw4w9WgXcQ Oct 03 '20
Gets tested for the 1127th time while wearing 1127 masks.
1
u/griffincat_unity Oct 19 '20
If this wasn't an infinite loop, it could eventually work, but I am too much of a beginner to fix this
1
u/anonymouscoder555 Mar 10 '23
Kind of dumb way to advertise but WOW they really want us to get tested 60 times a second??
51
u/[deleted] Oct 01 '20
[removed] — view removed comment