There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

yum13241 , in Int and bool walk into a bar

Where I live, I have to spend 500 years to either get volcano-like water, or Ice Age water. Moving it one atom completely changes the temperature.

cynar ,

If yours uses a thermal sensing element (not just mixing blind),I’ve found running it through its full temperature range helps a lot. I suspect limescale and other crap build up on the thermal element. It adds several years on to the life of the mixer. Descaling it would likely also work, but involves removing it from the pipes, to get the cleaner in.

Durotar , in Oops
@Durotar@lemmy.ml avatar

Relatable /s

veloxization , in Oops
@veloxization@yiffit.net avatar

Or in the case of some languages:

“Oh. I forgot a return statement.”

NotAViciousCyborg ,

deleted_by_author

  • Loading...
  • noproblemmy ,

    The kind bullshit that makes me extract a value from a cache I just calculated just to make sure it is working.

    FrostyCaveman , in More the merrier

    Then someone refactors the stop sign into a speed limit sign, leaves the comment unchanged, and years later someone else gets the fun job of figuring out which comments are lies

    Also someone applied an auto code formatter to the entire codebase in the meantime, and the original file got moved a couple times, maybe just the path or into an entirely new repo

    pfannkuchen_gesicht , in Marketing vs Developers

    That kind of depends. ANNs are basically utilizing the branchless programming paradigm, similarly to what you would do when programming for a GPU

    BravoVictor , in More the merrier
    @BravoVictor@programming.dev avatar

    I mean… you gotta have them start the habit somehow

    bear_with_a_hammer ,

    I do neither, yes I do comment, but don’t apply it to easy code.

    The thing is I also make easy comments about hard stuff in the code, it’s like giving a cancerous puppy a reason to live :D

    Gallardo994 ,

    Let’s face it, such comments usually cause more problems than do good. If someone changes the code and forgets to modify the comment, the reader might favor one or another at random. “Stop sign” example isn’t the best but you get my point.

    Comments at best should explain some non-obvious logic, or some sort of reasons for implementing one way or another. For SDKs and packages overall, public APIs should also be commented. The rest imo should be readable from code.

    spader312 ,

    A form of “self documentation” I like to do is create variables for conditions before using it in an if statement. If you break down a funky conditional into easy to read variables it becomes a lot more clear what it’s trying to do.

    Idk how to write code on sync:

    
    <span style="color:#323232;">const isHumid = xxxx;
    </span><span style="color:#323232;">const isHot = yyyy;
    </span><span style="color:#323232;">const isSunny = zzzzz;
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">If (isHot &amp;&amp; isHumid &amp;&amp; isSunny) {
    </span><span style="color:#323232;">    ...
    </span><span style="color:#323232;">}
    </span>
    
    coloredgrayscale ,

    If someone changes the code and forgets to modify the comment, the reader might favor one or another at random.

    Hence why you should comment why, not how/what.

    // slow down traffic before crossing busy main road

    Now you can change the stop sign to a yield without touching the comment. Or judge that the comment can be removed if it’s clear the main road does no longer exist.

    _danny ,

    Bad/wrong documentation is worse than no documentation.

    “Practice makes perfect” is only true if you’re practicing the right stuff. Otherwise you’re just reinforcing bad habits.

    metaStatic , in Oops

    mems getting real low big guy

    AchillesUltimate , in Marketing vs Developers

    I’ve actually been thinking that AI poses a substantial enough existential risk that it probably should be called Abominable Intelligence.

    IceMan ,

    c/Unexpected40K (huh, we miss that one)

    Clent ,

    I’m not sure we should start renaming things because you had thoughts.

    docAvid ,

    AI is fine. AI under capitalist control is horrifying.

    mashbooq , in More the merrier

    Also me when I’m forced to write documentation for a Python function

    
    <span style="color:#323232;">def delete_first_of_list(the_list: list):
    </span>
    
    stilgar ,
    @stilgar@infosec.pub avatar

    This is a good way to realise that you don’t need a function for that use case.

    coloredgrayscale ,

    If they need it often it makes some sense, if it also perform some checks, if the list if empty or None/null.

    coloredgrayscale ,

    What if I pass an empty list, or NoneType?

    RagingRobot ,

    Does this return a new list or modify the original? I would hope it returns a new one but I would know for sure if there was documentation.

    kablammy ,

    I would hope it modifies the original. It’s implied in the name. A function that returns all but the first item should be named something like tail or without_first_item.

    cyber_kalashnikov , in Would you agree?
    @cyber_kalashnikov@lemmygrad.ml avatar

    You mean GNU Kernel?

    jhulten , in Would you agree?

    All monocultures suck.

    superbirra , in Would you agree?

    but GNU?

    QuazarOmega ,

    It’s just that nobody gnu

    Sigmatics , in Would you agree?

    So you mean we would have weird useless concrete structures everywhere? I doubt it

    dragnucs , in e = error in syntax

    Very hard to spot.

    damnthefilibuster , in Recursion

    Damn. That’s the politician way of thinking!!!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines