subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
programminghorror
hadidotj
g5qepkw
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>But at least it's async<|eor|><|sor|>Async stops errors happening immediately!<|eor|><|sor|>It does. And replaces them with errors happening eventually.<|eor|><|so...
53
programminghorror
gosoxharp
g5ppfss
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>Looks like some of the code I have to deal with on a daily basis... I am telling them in all the PRs to split into smaller functions but as they don't care in th...
52
programminghorror
diamondjim
g5pnelj
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>There's a point at which you're really not doing anything better than the default built-in error handling. This is way past that point.<|eor|><|sor|>A core dump ca...
30
programminghorror
Dachannien
g5pop6d
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>Probably better described as a "hopefully/doh" block in this case.<|eor|><|eols|><|endoftext|>
29
programminghorror
Str_
g5ppg5k
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>My company had a guy that did this regularly. Like 8 different class files all called from a single try/catch. Project after project.<|eor|><|eols|><|endoftext|>
26
programminghorror
DrifterInKorea
g5pqcki
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>Looks like some of the code I have to deal with on a daily basis... I am telling them in all the PRs to split into smaller functions but as they don't care in th...
21
programminghorror
Seismicsentinel
g5prvkv
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>"Look, there's a lot of shit here, and if ANYTHING goes wrong I really only want to hear about it in the console"<|eor|><|eols|><|endoftext|>
20
programminghorror
Terrain2
g5qn0fr
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>But at least it's async<|eor|><|sor|>Async stops errors happening immediately!<|eor|><|sor|>It does. And replaces them with errors happening eventually.<|eor|><|so...
17
programminghorror
obvious_ghost
g5q7ae7
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>This seems reasonable? They are making sure the logger (which is probably sending out to some company log storage system) records the error message. The alternati...
15
programminghorror
gosoxharp
g5pqm4i
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>Looks like some of the code I have to deal with on a daily basis... I am telling them in all the PRs to split into smaller functions but as they don't care in th...
14
programminghorror
Le_9k_Redditor
g5rtnor
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>My company had a guy that did this regularly. Like 8 different class files all called from a single try/catch. Project after project.<|eor|><|sor|>Must have been r...
13
programminghorror
davy_jones_locket
g5quioa
<|sols|><|sot|>You think maybe we're doing to much in this try block? Nah. It's probably fine.<|eot|><|sol|>https://i.redd.it/471tcad5uwn51.png<|eol|><|sor|>This seems reasonable? They are making sure the logger (which is probably sending out to some company log storage system) records the error message. The alternati...
13
programminghorror
sweet-potato39
12xnf5i
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|eols|><|endoftext|>
1,671
programminghorror
Bloody_Insane
jhkkiug
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Obviously the tests were redundant too.<|eor|><|eols...
190
programminghorror
tok3rat0r
jhju8oq
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|eols|><|endoftext|>
143
programminghorror
MrBassAckwards
jhk7bvp
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>This is why you never remove unused imports in legacy Python code. Side effects, as far as the eye can see!<|eor|><|eols|><|endoftext|>
133
programminghorror
b1ack1323
jhkqv8n
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
63
programminghorror
b1ack1323
jhkpdt9
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
58
programminghorror
2popes1donut
jhlhxhw
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>The worst is when the linter tells you about your redundant code. So you fix it and wonder: why did I ever write it that way? Instantaneous crash and burn. Turns out the recommendation from the linter onl...
36
programminghorror
deadbeef1a4
jhkqm09
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
31
programminghorror
electrodragon16
jhn7n6a
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Obviously the tests were redundant too.<|eor|><|sor|...
23
programminghorror
NatoBoram
jhldi5p
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
23
programminghorror
b1ack1323
jhktgxa
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
18
programminghorror
Thykka
jhmen78
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>Don't be removing fences you don't know the reason for. Fences don't just spontaneously appear from the ground. Someone built it for a reason.<|eor|><|eols|><|endoftext|>
14
programminghorror
kristallnachte
jhm2dcs
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
12
programminghorror
pikapichupi
jhm1g6x
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I have been guilty of commenting for items like this in my personal coding projects &#x200B; if (true){//This has to be here... idk why but if I remove it everything breaks<|eor|><|eols|><|endoftext|>
11
programminghorror
kristallnachte
jhm2fjo
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
11
programminghorror
paradigmx
jhm4a8l
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>This how you get blocks of code with the comment ``` //I have no idea what this does //But don't change anything //or nothing will work ```<|eor|><|eols|><|endoftext|>
10
programminghorror
Kpuku
jhlplh4
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>The worst is when the linter tells you about your redundant code. So you fix it and wonder: why did I ever write it that way? Instantaneous crash and burn. Turns out the recommendation from the linter onl...
10
programminghorror
themonkery
jhks7dy
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>I literally did this at work last week. Got rid of some lines of code which were clearly redundant. Pushed the change. Tests started failing.<|eor|><|sor|>Its a bit alarming when tests stop working after rem...
9
programminghorror
JotaRata
jhl5x1d
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>This happens more often that one might think<|eor|><|eols|><|endoftext|>
8
programminghorror
O_X_E_Y
jhl7a3d
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>too fucking real. I call this rerefactoring<|eor|><|eols|><|endoftext|>
8
programminghorror
2popes1donut
jhlruqq
<|sols|><|sot|>Sometimes it just seems unnecessary<|eot|><|sol|>https://i.redd.it/xhri8volsuva1.jpg<|eol|><|sor|>The worst is when the linter tells you about your redundant code. So you fix it and wonder: why did I ever write it that way? Instantaneous crash and burn. Turns out the recommendation from the linter onl...
6
programminghorror
HerrMotz
lv33xx
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|eols|><|endoftext|>
1,668
programminghorror
Immort4lFr0sty
gpa1v96
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>What did it log? *Everything*<|eor|><|eols|><|endoftext|>
585
programminghorror
aa599
gpa39me
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
251
programminghorror
Rc202402
gpau3cl
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>What did it log? *Everything*<|eor|><|sor|>Logs are like the textual representation of a programmer's life...
187
programminghorror
soulseeker31
gpace81
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
131
programminghorror
josephblade
gpa9dqt
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>looks like every log on every server I've been on (that was managed by developers).<|eor|><|eols|><|endofte...
112
programminghorror
CityYogi
gpadgus
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>Totally normal thing that can happen to anyone. When you spawn a dev server, you don't first ~~thing~~ thin...
78
programminghorror
Herb_Derb
gpasrfl
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
72
programminghorror
humanbeast7
gpa6c1f
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>"Did you log" "Yes" "How much space did it cost?" "Everything"<|eor|><|eols|><|endoftext|>
66
programminghorror
Garhand
gpabq37
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>looks like every log on every server I've been on (that was managed by developers).<|eor|><|sor|>I feel per...
53
programminghorror
Mr_Weeble
gpaclcu
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>looks like every log on every server I've been on (that was managed by developers).<|eor|><|sor|>As a devel...
49
programminghorror
JedSwamp43
gpae2sa
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>Totally normal thing that can happen to anyone. When you spawn a dev server, you don't first ~~thing~~ thin...
45
programminghorror
road_laya
gpagyfq
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
41
programminghorror
heatd
gpb9f48
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
33
programminghorror
aa599
gpaek6d
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
28
programminghorror
CityYogi
gpaheu5
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>Totally normal thing that can happen to anyone. When you spawn a dev server, you don't first ~~thing~~ thin...
21
programminghorror
Caltosax
gpb9zrr
<|sols|><|sot|>One day I ssh'd into a dev server and was wondering why the disk is full, because it had not been used in a while. Then I found this...<|eot|><|sol|>https://i.redd.it/5cqt7upuddk61.png<|eol|><|sor|>You can configure `logrotate` to rotate at a fixed interval, or when a log reaches a max size. Makes life m...
21
programminghorror
Tudor-Todorescu
m5hthb
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|eols|><|endoftext|>
1,654
programminghorror
Bob-The-One
gr0axkr
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|eols|><|endoftext|>
309
programminghorror
prussianapoleon
gr0gc0k
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|eols|><|endoftext|>
184
programminghorror
yeusk
gr0hn8g
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>Branching, just that, predictions are hard<|eor|><|sor|>Compiler optimizations and branch prediction take care of that. This is just try...
50
programminghorror
alarmclckcatastrophe
gr0far9
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|eols|><|endoftext|>
43
programminghorror
not_some_username
gr0ke2r
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
42
programminghorror
three_furballs
gr0h25x
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>If you're going to use tertiaries, you might as well just go with `(condition ? statement1 : statement2)()` And if you need `else if`s: ``` (condition1 ? statement1 : condition2 ? statement2...
37
programminghorror
Tudor-Todorescu
gr03c3p
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>While(condition){ Code Break; } While(! Condition){ Code Break; }<|eor|><|soopr|>that was actually the meme that started this :))<|eoopr|><|eols|><|endoftext|>
37
programminghorror
HotRodLincoln
gr0lvq8
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>In some languages (C), they don't play nice with macros, but people instead usually modify the macros wrapping them as `do{...}while(0)` o...
30
programminghorror
yeusk
gr0in96
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>Branching, just that, predictions are hard<|eor|><|sor|>Compiler optimizations and branch prediction take care of that. This is just try...
27
programminghorror
dependency_injector
gr0t2sw
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
24
programminghorror
yeusk
gr0ith9
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>Branching, just that, predictions are hard<|eor|><|sor|>Compiler optimizations and branch prediction take care of that. This is just try...
21
programminghorror
Vinnie420
gr129ez
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
20
programminghorror
fakehalo
gr0y1vb
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
19
programminghorror
yeusk
gr0jvb3
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>Branching, just that, predictions are hard<|eor|><|sor|>Limiting branching isn't wrong. I for my self try to avoid If-Else situations. T...
18
programminghorror
SkyIsByteSized
gr0tc58
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>I have a coworker who used to do this...<|eor|><...
15
programminghorror
Johnobo
gr0hwzn
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>Why are people averse to if else statements?<|eor|><|sor|>Branching, just that, predictions are hard<|eor|><|sor|>Limiting branching isn't wrong. I for my self try to avoid If-Else situations. T...
13
programminghorror
not_some_username
gr18drp
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
12
programminghorror
BakuhatsuK
gr1hozg
<|sols|><|sot|>A different way of writing an if statement ...<|eot|><|sol|>https://i.redd.it/urig2qzq66n61.png<|eol|><|sor|>This is even better switch (condition) { case true: { } break; case false: { } break; }<|eor|><|sor|>default: uh oh ...<|eor|><|sor|>Its either true ...
12
programminghorror
Catyre
ppj27j
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|eols|><|endoftext|>
1,656
programminghorror
kyngskyngs
hd436g7
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|eols|><|endoftext|>
303
programminghorror
qqqrrrs_
hd47nfi
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|> def foo(): while True: return False<|eor|><|eols|><|endoftext|>
284
programminghorror
geeshta
hd498ju
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|> def foo(): while True: return False<|eor|><|sor|>After reading the post, this lingers in my mind like a mantra... Def foo - while true - return false. Def foo - while true - return false. Def ...
201
programminghorror
shafe123
hd45l2f
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|sor|>I love the accepted answer.<|eor|><|eols|><|endoftext|>
193
programminghorror
yogos15
hd455mt
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>How many times does this guy have to define foo()? Its the same definition, and hes doing it in if statements of all things<|eor|><|eols|><|endoftext|>
177
programminghorror
LionST1
hd43a2b
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Not even python will let you do this<|eor|><|eols|><|endoftext|>
136
programminghorror
deadbeef1a4
hd4netk
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|sor|>he's got two other questions just like that and nothing else since 4 years ago. Wonder wh...
132
programminghorror
nobdar
hd46tav
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>How many times does this guy have to define foo()? Its the same definition, and hes doing it in if statements of all things<|eor|><|sor|>and they never call it, not that it does anything other than return False<...
131
programminghorror
nuclearslug
hd4p1v9
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|sor|>he's got two other questions just like that and nothing else since 4 years ago. Wonder wh...
108
programminghorror
a45ed6cs7s
hd448m0
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Not even python will let you do this<|eor|><|sor|>Technically python can't Stop you from doing do this like in any interpreted language.<|eor|><|eols|><|endoftext|>
76
programminghorror
CodeLobe
hd4na5j
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>[deleted]<|eor|><|sor|>`def fuck(): while false: return true;` edit, yes it does fuck all.<|eor|><|eols|><|endoftext|>
75
programminghorror
qqqrrrs_
hd47b92
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Not even python will let you do this<|eor|><|sor|>Technically python can't Stop you from doing do this like in any interpreted language.<|eor|><|sor|>Technically there is a syntax error in line 3 (lack of indent...
75
programminghorror
-MazeMaker-
hd53qff
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>okay, I know that code sucks ass, doesn't even work, and 90% of it could be removed and it would work better; but can we talk about that `` instead of \\n ?<|eor|><|sor|>I tried to click on this for so long thin...
71
programminghorror
emperorOfTheUniverse
hd53k03
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|sor|>he's got two other questions just like that and nothing else since 4 years ago. Wonder wh...
69
programminghorror
CodeLobe
hd4n5hf
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>How many times does this guy have to define foo()? Its the same definition, and hes doing it in if statements of all things<|eor|><|sor|>and they never call it, not that it does anything other than return False<...
62
programminghorror
ogaat
hd65uob
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|>Here is the original question btw: https://stackoverflow.com/questions/41144688/python-skipping-a-user-input<|eor|><|sor|>he's got two other questions just like that and nothing else since 4 years ago. Wonder wh...
54
programminghorror
Tasgall
hd508ze
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|> def foo(): while True: return False<|eor|><|sor|>Im really confused as to what this function is supposed to do. Loop doesnt make sense either.<|eor|><|sor|>It does nothing. It just declares a sco...
51
programminghorror
nobdar
hd49ymx
<|sols|><|sot|>My first one found in the wild!<|eot|><|sol|>https://i.redd.it/s0rvw44zrwn71.png<|eol|><|sor|> def foo(): while True: return False<|eor|><|sor|>After reading the post, this lingers in my mind like a mantra... Def foo - while true - return false. Def foo - while true - return false. Def ...
43
programminghorror
jugnuggets
kjgvgi
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|eols|><|endoftext|>
1,647
programminghorror
Mithrandir2k16
ggx107h
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well, still better than a mix of capital I and small l. I = Il - ll<|eor|><|eols|><|endoftext|>
201
programminghorror
tp333zy
ggx09x7
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>bad variable/function names are the worst. too many people think typing less means better code<|eor|><|eols|><|endoftext|>
103
programminghorror
Ubera90
ggx8o1i
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well, still better than a mix of capital I and small l. I = Il - ll<|eor|><|sor|>Go for the hatrick: Il|<|eor|><|eols|><|endoftext|>
82
programminghorror
UC101
ggx1bj1
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>bad variable/function names are the worst. too many people think typing less means better code<|eor|><|sor|>Good old itoa(dst, num, 10);<|eor|><|eols|><|endoftext|>
54
programminghorror
floodedfloor
ggxf42r
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well, still better than a mix of capital I and small l. I = Il - ll<|eor|><|sor|>Go for the hatrick: Il|<|eor|><|sor|>Even better one: Il|<|eor|><|eols|><|endoftext|>
52
programminghorror
Simtau
ggxm87x
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well, still better than a mix of capital I and small l. I = Il - ll<|eor|><|sor|>Go for the hatrick: Il|<|eor|><|sor|>Even better one: Il|<|eor|><|sor|>*cries in barcode"<|eor|><|eols...
52
programminghorror
Eluvatar_the_second
ggx1var
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>I count 5 different href variables, did I miss any?<|eor|><|eols|><|endoftext|>
45
programminghorror
stevethedev
ggxlqni
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>bad variable/function names are the worst. too many people think typing less means better code<|eor|><|sor|>Good old itoa(dst, num, 10);<|eor|><|sor|>Int to a?<|eor|><|sor|>int to char...
44
programminghorror
hadidotj
ggxb5tp
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well, still better than a mix of capital I and small l. I = Il - ll<|eor|><|sor|>`Il != lI || ll != II`<|eor|><|eols|><|endoftext|>
26
programminghorror
FreeProGamer
ggxj8xh
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well hey, if you're using a sane IDE you can pick one, right-click, and "rename variable." Repeat until the names make sense.<|eor|><|soopr|>This is IntelliJ, a couple of F6s later and...
23
programminghorror
0x15e
ggx4b2o
<|sols|><|sot|>Gonna need you to be more creative with variable naming...<|eot|><|sol|>https://i.redd.it/xvqrvawdh5761.png<|eol|><|sor|>Well hey, if you're using a sane IDE you can pick one, right-click, and "rename variable." Repeat until the names make sense.<|eor|><|eols|><|endoftext|>
22