The Bard's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
fossilesque@mander.xyzM to Science Memes@mander.xyzEnglish · 2 years ago

))<>((

mander.xyz

message-square
67
link
fedilink
1.08K

))<>((

mander.xyz

fossilesque@mander.xyzM to Science Memes@mander.xyzEnglish · 2 years ago
message-square
67
link
fedilink
alert-triangle
You must log in or # to comment.
  • rockerface 🇺🇦@lemm.ee
    link
    fedilink
    English
    arrow-up
    191
    ·
    2 years ago

    As a software developer, the less ambiguous your notation is, the better it is for everyone involved. Not only will I use brackets, I’ll split my expression into multiple rows and use tabs to make it as readable as humanly possible. And maybe throw a comment or 2 if there’s still some black magic involved

    • dustyData@lemmy.world
      link
      fedilink
      English
      arrow-up
      57
      ·
      2 years ago

      As a professor said, most programming languages don’t care about readability and whitespace. But we care because humans need it to parse meaning. Thus, write code for people, not for the machine. Always assume that someone with no knowledge of the context will have to debug it, and be kind to them. Because that someone might be you in six months when you have completely forgotten how the code works.

      • zalgotext@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        16
        ·
        2 years ago

        Exactly. You read code way more times than you write it, so it makes all the sense in the world to prioritize readability.

      • Swedneck@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 years ago

        Source code is for humans, then the compiler turns it into code for machines.

      • rockerface 🇺🇦@lemm.ee
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 years ago

        Yep, if you’re writing code for a machine, just do it in binary to save compilation time (/s just in case). Also, you in six months will indeed be someone with no knowledge of the context. And every piece of code you think you write for one-time use is guaranteed to be reused every day for the next 5 years

      • feinstruktur@lemmy.ml
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        2 years ago

        This. Always be kind to your future self.

      • snowsuit2654@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Yeah I totally agree. You can minimize and optimize as part of your build procedure/compilation but the source code should be as readable as possible for humans.

    • Quetzalcutlass@lemmy.world
      link
      fedilink
      English
      arrow-up
      51
      arrow-down
      2
      ·
      2 years ago

      I had someone submit a pull request recently that, in addition to their actual changes, also removed every single parenthesis that wasn’t strictly necessary in a file full of 3D math functions. I know it was probably the fault of an autoformatter they used, but I was still the most offended I’ve ever been at a pull request.

      • rockerface 🇺🇦@lemm.ee
        link
        fedilink
        English
        arrow-up
        27
        ·
        2 years ago

        Autoformatter? More like obfuscator

    • MotoAsh@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      10 months ago

      deleted by creator

    • penquin@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      You’re a good human being.

    • stebo@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      3
      ·
      2 years ago

      Ok but that’s unrelated to putting some numbers and operations in a calculator. No one is going to proofread that. If anything, you simply calculate it again.

  • unexposedhazard@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    2 years ago

    Also works if you dont trust yourself with correctly ordering your operations.

  • mathic@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    2 years ago

    I, my head, shake.

    • RPN user
    • rockerface 🇺🇦@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 years ago

      Also known as: Japanese speaker

  • Qkall@lemmy.ml
    link
    fedilink
    English
    arrow-up
    21
    ·
    2 years ago

    Iykyk

    https://youtu.be/KQoJo81lujk

    • PoisonedPrisonPanda@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      3
      ·
      2 years ago

      Ok man. Wtf did I just watch…

      I get it. We are here on the somehow dark side of the internet…

      But THIS… without any context. i mean. Im questioning live here man. What do you want to express with that?

      • janNatan@lemmy.ml
        link
        fedilink
        English
        arrow-up
        8
        ·
        2 years ago

        I’m pretty sure it’s just a reference to when the kid types ))<>((

        Btw, it’s not from the dark side of the Internet. This was a very popular video at the time.

      • ASeriesOfPoorChoices@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        🤦‍♂️ read the post body, my lad.

        • PoisonedPrisonPanda@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 years ago

          Thanks. Im blind AF

  • ASeriesOfPoorChoices@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    ·
    2 years ago

    back and forth, forever.

    • RinseDrizzle@midwest.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Suuuuuch a weird movie lol

  • Omega_Haxors@lemmy.ml
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    2 years ago

    (I used(LISP)one time(and it(permanently))changed the way I (program(computers)))

    • henfredemars@infosec.pub
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      Did it change it in a positive way?

  • SmoothLiquidation@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    2 years ago

    This is why every calculator should be a RPN calculator.

    • lemmyng@lemmy.ca
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      I still have my HP 48 series calculator. It’s a sturdy beast.

    • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      2 years ago

      This is why every calculator should be a RPN calculator

      No, this is why programmers should (re)learn the order of operations rules before writing a calculator.

  • Voyajer@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 years ago

    Improved readability is always good

  • MeDuViNoX@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    2 years ago

    (‿!‿) (‿O‿)

    • The_Cunt_of_Monte_Cristo@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      ( . ) ( . ) ( . Y . )

  • MotoAsh@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    3
    ·
    edit-2
    10 months ago

    deleted by creator

    • itsralC@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Counterpoint: C function pointers (or just C in general)

    • dejected_warp_core@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Also: sometimes, a mathematician just has to invent some concept or syntax to convey something unconventional. The specific use of subscript/superscript, whatever ‘phi’ is being used for, etc. on whatever paper you’re reading doesn’t have to correlate to how other work uses the same concepts. It’s bad form, but sometimes its needed, and if useful enough is added to the general canon of what we call “math”. Meanwhile, you can encapsulate and obfuscate things in software, sure, but you can always get down to the bedrock of what the language supports; there’s no inventing anything new.

      • MotoAsh@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        10 months ago

        deleted by creator

        • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          2
          ·
          2 years ago

          Math should be just as deterministic as programming, but it’s not in some situations

          Maths is 100% deterministic for order of operations. The issue is people not following all of the rules. Order of operations thread index

          • MotoAsh@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            edit-2
            10 months ago

            deleted by creator

            • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              1
              ·
              2 years ago

              The syntax is arbitrary in some edge cases

              Such as?

  • Fat Tony@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    2 years ago

    My calculator says -2² = -4, so yeah…

    • ByGourou@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      2 years ago

      Isn’t the “-” order of operations the same as a multiply ? I think I learned powers take priority over the “-” so your calculator would be right.
      But either way if it can cause confusion you should use parentheses.

      • TonyTonyChopper@mander.xyz
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        2
        ·
        2 years ago

        Every calculator I’ve used has separate negative and subtraction keys for this purpose. There is no order of operations to follow, it’s just a squaring a number

        • ByGourou@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          2 years ago

          I learned negative as being a separate operation where we need to apply the order of operations. I think it was something like : -2 is a diminutive for -1x2 so it uses the order of operations of a multiplication.
          My calculator is the official one used in schools in France (ti-83 premium ce) and it says -2^2 = -4 with the negative key. I don’t think it would make a mistake in such a simple concept.

          But whatever these concepts can change depending on the field, country, level of education. What I mean is : it’s unclear, so use parentheses. So (-2)^2 or -(2^2) are the correct ways to write it.

          • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            I think it was something like : -2 is a diminutive for -1x2

            Correct. Things that are usually left out of Maths expressions are plus signs, ones as multipliers/indices, and un-needed brackets. e.g. I could more fully write this as -1(4)², but that just simplifies to -4²

        • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 years ago

          it’s just a squaring a number

          The number being squared is 4, unless you put (-4)², otherwise it’s 4² with a minus sign.

      • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        I think I learned powers take priority over the “-”

        Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.

    • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      My calculator says -2² = -4

      That’s correct

    • Ultraviolet@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      2 years ago

      I would never write -n². Either ‐(n²) or (-n)². Order of operations shouldn’t be some sort of gotcha to trick people into misinterpreting you, it’s the intuitive reading of a well constructed mathematical expression.

      • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        2 years ago

        Either ‐(n²) or (-n)². Order of operations shouldn’t be some sort of gotcha to trick people into misinterpreting you

        It isn’t. With ‐(n²), n² is already a single term, so the brackets aren’t needed.

  • Lemmy_Cook@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 years ago

    I feel this in my bones

  • seriousconsideration@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 years ago

    deleted by creator

    • Daxtron2@startrek.website
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 years ago

      sounds like work for a compooter

  • ooli@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    deleted by creator

    • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      I just used the calc on window… it cannot respect order of operation

      Yeah, I’ve tried several times to get Microsoft to fix their calculators. I’ve given up trying now - eventually you have to stop banging your head against the wall.

  • Kowowow@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    Ooh I love brackets

Science Memes@mander.xyz

science_memes@mander.xyz

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !science_memes@mander.xyz

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Meta Post Tags

  • ANNOUNCEMENTS
  • RESOURCES


Rules

  1. Don’t throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.


If you are here asking: “Is this a science meme?”

Probably, yes. We use the Dawkins definition of meme: a replicating idea, not just an image macro with a fact on it. A good post here doesn’t need to teach you something. It needs to make you ask something: who, what, where, when, and especially why or how.

Science isn’t a filing cabinet of facts, it’s a conversation. For example, a photo of an eel or other localized wildlife counts because most people never see one, and wonder is the first step of inquiry. A car meme counts if it makes you curious about what’s under the bonnet. If you want to talk about something you noticed in the world, chances are someone else wants to talk about it too.

We moderate for vibe, not category. Pruning is light, especially where a post creates interesting discussion. Experimenting is encouraged, but keep it in good faith and never punch down.



Research Committee

  • !spiders@lemmy.world

Other Mander Communities

Science and Research

  • !academia@mander.xyz
  • !science@mander.xyz
  • !scicomm@mander.xyz

Biology and Life Sciences

  • !abiogenesis@mander.xyz
  • !animal-behavior@mander.xyz
  • !anthropology@mander.xyz
  • !arachnology@mander.xyz
  • !balconygardening@slrpnk.net
  • !biodiversity@mander.xyz
  • !biology@mander.xyz
  • !biophysics@mander.xyz
  • !botany@mander.xyz
  • !ecology@mander.xyz
  • !entomology@mander.xyz
  • !fermentation@mander.xyz
  • !herpetology@mander.xyz
  • !houseplants@mander.xyz
  • !medicine@mander.xyz
  • !microscopy@mander.xyz
  • !mycology@mander.xyz
  • !nudibranchs@mander.xyz
  • !nutrition@mander.xyz
  • !palaeoecology@mander.xyz
  • !palaeontology@mander.xyz
  • !photosynthesis@mander.xyz
  • !plantid@mander.xyz
  • !plants@mander.xyz
  • !reptiles and amphibians@mander.xyz

Physical Sciences

  • !astronomy@mander.xyz
  • !chemistry@mander.xyz
  • !earthscience@mander.xyz
  • !geography@mander.xyz
  • !geospatial@mander.xyz
  • !nuclear@mander.xyz
  • !physics@mander.xyz
  • !quantum-computing@mander.xyz
  • !spectroscopy@mander.xyz

Humanities and Social Sciences

  • !archaeology@mander.xyz
  • !folklore@mander.xyz
  • !history@mander.xyz
  • !old_maps@mander.xyz

Practical and Applied Sciences

  • !exercise-and sports-science@mander.xyz
  • !gardening@mander.xyz
  • !self sufficiency@mander.xyz
  • !soilscience@slrpnk.net
  • !terrariums@mander.xyz
  • !timelapse@mander.xyz

Memes

  • !bushrat_confidential@slrpnk.net
  • !science_memes@mander.xyz

Miscellaneous

  • !answered@mander.xyz
  • !mander@mander.xyz
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 802 users / day
  • 3.44K users / week
  • 5.26K users / month
  • 11.5K users / 6 months
  • 1 local subscriber
  • 20.7K subscribers
  • 6.91K Posts
  • 96.1K Comments
  • Modlog
  • mods:
  • Salamander@mander.xyz
  • fossilesque@mander.xyz
  • SciBot@mander.xyz
  • fossilesque@lemmy.dbzer0.com
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org