fstab
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alphacyberranger@sh.itjust.works to Programmer Humor@programming.dev · 2 年前

The lengths we have to go to

sh.itjust.works

message-square
124
fedilink
1.32K

The lengths we have to go to

sh.itjust.works

alphacyberranger@sh.itjust.works to Programmer Humor@programming.dev · 2 年前
message-square
124
fedilink
  • °˖✧ ipha ✧˖°@lemm.ee
    link
    fedilink
    arrow-up
    94
    arrow-down
    24
    ·
    2 年前

    Better than counting curly braces.

    • Sentient Loom@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      50
      arrow-down
      2
      ·
      2 年前

      I’ll take the curly braces

      • TheGreenGolem@lemm.ee
        link
        fedilink
        arrow-up
        30
        arrow-down
        1
        ·
        2 年前

        Me too, any day. I hate everything where indentation matters. Let me just throw my garbage there and YOU sort it out, you are the fucking computer, not me. You do the work.

        So fuck you, YAML! All my homies love JSON!

        • KIM_JONG@lemmy.world
          link
          fedilink
          arrow-up
          15
          ·
          2 年前

          All your homies hate comments.

          • TheGreenGolem@lemm.ee
            link
            fedilink
            arrow-up
            6
            ·
            2 年前

            My code also documents itself, of course.

          • nilloc@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            2 年前

            Yeah Yaml is nicer than json, but I’m not into the Python indenting at all.

          • JonEFive@midwest.social
            cake
            link
            fedilink
            arrow-up
            2
            ·
            2 年前

            I’m here to spread the good word about JSONC. It is the way and everyone should adopt it in place of JSON wherever possible.

      • wols@lemm.ee
        link
        fedilink
        arrow-up
        16
        arrow-down
        1
        ·
        2 年前

        Yup.

        Spaces? Tabs? Don’t care, works regardless.
        Copied some code from somewhere else? No problem, 9/10 times it just works. Bonus: a smart IDE will let you quick-format the entire code to whatever style you configured at the click of a button even if it was a complete mess to begin with, as long as all the curly braces are correct.

        Also, in any decent IDE you will very rarely need to actually count curly braces, it finds the pair for you, and even lets you easily navigate between them.

        The inconsistent way that whitespace is handled across applications makes interacting with code outside your own code files incredibly finicky when your language cares so much about the layout.

        There’s an argument to be made for the simplicity of python-style indentation and for its aesthetic merits, but IMO that’s outweighed by the practical inconvenience it brings.

        • merc@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          2 年前

          But, nobody ever copies code from Stack Overflow!

    • 30p87@feddit.de
      link
      fedilink
      arrow-up
      27
      ·
      2 年前

      Even vim can show you that
      ^(fucking nano user)

      • UndefinedIsNotAFunction@programming.dev
        link
        fedilink
        arrow-up
        14
        ·
        2 年前

        There’s a joke here about using echo "some python code" > main.py in here somewhere but I can’t find it. Imagine I did instead.

        • thanevim@kbin.social
          link
          fedilink
          arrow-up
          11
          ·
          edit-2
          2 年前

          Import python.Joke.ShellProgramming()

        • cartoon meme dog@lemm.ee
          link
          fedilink
          arrow-up
          10
          arrow-down
          1
          ·
          2 年前

          “the punchline is clearly trivial, the set-up is left as an exercise for the reader”

      • Overshoot2648@lemm.ee
        link
        fedilink
        arrow-up
        6
        ·
        2 年前

        Obligatory mirco is better.

        • 30p87@feddit.de
          link
          fedilink
          arrow-up
          11
          ·
          2 年前

          Is mirco a little man sitting on your SSD flipping bits manually as you dictate him?

      • MonkderZweite@feddit.ch
        link
        fedilink
        arrow-up
        1
        ·
        2 年前

        deleted by creator

    • kameecoding@lemmy.world
      link
      fedilink
      arrow-up
      23
      arrow-down
      4
      ·
      2 年前

      if you have to count the curly braces I understand why you are a python developer

    • Knusper@feddit.de
      link
      fedilink
      arrow-up
      8
      ·
      2 年前

      You don’t usually count them. They just have to form a neat diagonal.

      • Reptorian@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        2 年前

        Also, highlighted the way you expect when you click next to braces works too.

    • cerement@slrpnk.net
      link
      fedilink
      arrow-up
      7
      ·
      2 年前

      parentheses

    • shotgun_crab@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 年前

      Why not both

      • EvokerKing@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        2 年前

        Because Python uses indentation instead of curly brackets, which is why this meme exists. Also jetbrains ide s like pycharm and webstorm do all of this for you.

        • mexicancartel@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 年前

          Even the mosy basic text editors does indentation for you, not even an IDE needed

          • EvokerKing@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            2 年前

            Not as good as jetbrains does, it automatically does things like realign when you paste things and lots of little things that improve the coding experience by a lot.

            • mexicancartel@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 年前

              Okay cool!

    • vosjedev@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      2 年前

      yep.

    • FleetingTit@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      2 年前

      deleted by creator

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 1.08K users / day
  • 4.42K users / week
  • 8.1K users / month
  • 20.3K users / 6 months
  • 3 local subscribers
  • 25.2K subscribers
  • 1.61K Posts
  • 59.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org