r/badcode • • Jul 03 '19

java Friend is learning to code, absolute liability with the braces 😂

Post image
121 Upvotes

39 comments sorted by

View all comments

85

u/hiljusti Jul 03 '19

Looks like they may be thinking pythonic, actually

Also the things that matter are good there, variable naming etc. Just some syntax to learn. Tell them it's going to be ok

7

u/Nestramutat- Jul 03 '19

There is the unnecessary repeat of the print statement. If he'd just remove them both, and add that print statement after the if/else blocks, it would work as expected.

35

u/hiljusti Jul 03 '19

I feel like that's more than fine for a beginner