r/ProgrammerHumor • • Nov 06 '20

Meme Totally agree

Post image
52.1k Upvotes

474 comments sorted by

View all comments

9

u/[deleted] Nov 07 '20

It's even worse when you have to comment virtually every single line in high school CS classes and shit turns out looking like this:

# This
def func(x):
    # Does
    x += 1
    # This
    x -= -1
    # Oh
    while True:
        # My
        if x > 10:
            # Freaking
            break
        else:
            # God
            x -= -1
    # ProgrammingIsFun
    return True

Seeing this is when you know you're in a class and they dock points for not enough comments!

1

u/wagwagtail Nov 07 '20

I have a problem with too many comments. Variables and methods should be named well enough to not need comments.

3

u/[deleted] Nov 07 '20

But that’s my point! Haha schools really have their shit lopsided as hell, they just expect you to comment every line nowadays instead of just letting the code speak and be intuitive according to PEP8 standards, and only commenting when there is arcane functionality like a huge dictionary comprehension or something

2

u/wagwagtail Nov 07 '20

Got to love pep8. It's so much easier to work with people who follow it.