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.

1

u/backtickbot Nov 07 '20

Correctly formatted

Hello, shitten. Just a quick heads up!

It seems that you have attempted to use triple backticks (```) for your codeblock/monospace text block.

This isn't universally supported on reddit, for some users your comment will look not as intended.

You can avoid this by indenting every line with 4 spaces instead.

There are also other methods that offer a bit better compatability like the "codeblock" format feature on new Reddit.

Have a good day, shitten.

You can opt out by replying with "backtickopt6" to this comment. Configure to send allerts to PMs instead by replying with "backtickbbotdm5". Exit PMMode by sending "dmmode_end".

3

u/[deleted] Nov 07 '20

[removed] — view removed comment

1

u/[deleted] Nov 07 '20

Haha thank you!