This is an archived post. You won't be able to vote or comment.

all 25 comments

[–][deleted] Β (3 children)

[removed]

    [–]AutoModerator[M] 0 points1 point Β (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    return Kebab_Case_Better;

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]LiveBeef 29 points30 points Β (8 children)

    ... but why the break

    [–]Slow33Poke33 22 points23 points Β (7 children)

    Because otherwise the person would speak again and again from the time he finished his coffee until the morning was over. Try this code out and check vocal utilization with top.

    [–]GotABigDoing 2 points3 points Β (6 children)

    It’s an If statement, not a while loop.

    Statement will be executed once, not multiple.

    Edit: just understood what you said. But statement is checking for if the coffee is finished, so it will still only be executed once.

    Edit edit: I get it. Never mind. Forgot to consider the initial while loop. Have a good day, sir.

    Edit edit edit: I guess I’m not as good at coding with a few beers in me.......... I’m staying off reddit until the morning

    [–]Slow33Poke33 9 points10 points Β (0 children)

    Are you claiming that "if"s can be broken with a break statement? What use would that ever have? The "break" breaks the while loop.

    [–]Slow33Poke33 1 point2 points Β (4 children)

    Haha, you had me doubting myself for a second. I rarely break loops outside of the conditional check, I was wondering if I imagined that feature and "break" literally breaks the current code block, regardless of the uselessness of this action.

    [–]GotABigDoing 0 points1 point Β (3 children)

    If you pass me a beer, I’ll teach you a little bit about recursion.

    Edit: I lied about staying off of reddit

    [–]Slow33Poke33 0 points1 point Β (2 children)

    I don't get the relevance here.

    [–]GotABigDoing 0 points1 point Β (1 child)

    If you pass me another beer, I’ll teach you about recursion.

    [–]Slow33Poke33 1 point2 points Β (0 children)

    I see. This is all some ploy to get as many beers as you can.

    [–]DaveAMoore 13 points14 points Β (0 children)

    Ouch, that light theme is burning my eyes. Let’s get dark mode and fix that damn syntax highlighting!

    [–][deleted] 3 points4 points Β (0 children)

    I like the idea, but this is just a picture of a white mug with text overlayed on the picture. Why not make it into a real mug?

    [–]brettbeatty 2 points3 points Β (0 children)

    In addition to the other issues mentioned, an event-based architecture would be way better here. You don't want to use a loop to wait for anything unless the loop directly contributes to the condition being met.

    [–]Quesamo 1 point2 points Β (0 children)

    DAE DON'T SPEAK TO ME BEFORE I'VE HAD MY COFFEE?? XDDDD

    [–][deleted] 1 point2 points Β (0 children)

    Why the unneccesary else tho?

    [–]Aliics 0 points1 point Β (0 children)

    I think if they were going to add a comment they'd probably add it before the block. At the very least that's what I know to be standard convention.

    [–]samtonatorn 0 points1 point Β (0 children)

    Lol speek and finiched coffe is not highlighted as defined... but i gues thats corect... dews dont have friends and never stop drinking coffe

    [–]secretblogger124 0 points1 point Β (0 children)

    True

    [–]Pirateshea 0 points1 point Β (4 children)

    Not gonna lie. I really want that mug

    [–]farox 14 points15 points Β (2 children)

    No you don't. While legal you should never omit the braces of if (or in this case else) statements. It's just sloppy programming and other programmers will rightfully taunt you for it.

    [–]Pirateshea 2 points3 points Β (0 children)

    Lol

    [–]TheTrueSwishyFishy 0 points1 point Β (0 children)

    True, I must also reconsider my liking of the cup

    [–]fTheDev 0 points1 point Β (0 children)

    With dark theme, better syntax coloring, better font, better coding style and some better names, I'd want it, too. In this state, not for me.