lemmy.dexlit
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alphacyberranger to Programmer Humor@programming.dev • 2 years ago

The lengths we have to go to

sh.itjust.works

message-square
127
fedilink
1.33K

The lengths we have to go to

sh.itjust.works

alphacyberranger to Programmer Humor@programming.dev • 2 years ago
message-square
127
fedilink
  • °˖✧ ipha ✧˖°
    link
    fedilink
    70•2 years ago

    Better than counting curly braces.

    • Sentient Loom
      link
      fedilink
      English
      48•2 years ago

      I’ll take the curly braces

      • @TheGreenGolem@lemm.ee
        link
        fedilink
        29•2 years ago

        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
          15•2 years ago

          All your homies hate comments.

          • @TheGreenGolem@lemm.ee
            link
            fedilink
            6•2 years ago

            My code also documents itself, of course.

          • @nilloc@discuss.tchncs.de
            link
            fedilink
            English
            3•2 years ago

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

          • @JonEFive@midwest.social
            link
            fedilink
            2•2 years ago

            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
        15•2 years ago

        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
          1•2 years ago

          But, nobody ever copies code from Stack Overflow!

    • @30p87@feddit.de
      link
      fedilink
      27•2 years ago

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

      • @UndefinedIsNotAFunction@programming.dev
        link
        fedilink
        14•2 years ago

        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
          link
          fedilink
          11•
          edit-2
          2 years ago

          Import python.Joke.ShellProgramming()

        • cartoon meme dog
          link
          fedilink
          9•2 years ago

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

      • @Overshoot2648@lemm.ee
        link
        fedilink
        6•2 years ago

        Obligatory mirco is better.

        • @30p87@feddit.de
          link
          fedilink
          11•2 years ago

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

          • @lud@lemm.ee
            link
            fedilink
            2•
            edit-2
            8 days ago

            deleted by creator

      • @MonkderZweite@feddit.ch
        link
        fedilink
        1•2 years ago

        deleted by creator

    • @kameecoding@lemmy.world
      link
      fedilink
      19•2 years ago

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

    • @Knusper@feddit.de
      link
      fedilink
      8•2 years ago

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

      • @Reptorian@programming.dev
        cake
        link
        fedilink
        3•2 years ago

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

    • @cerement@slrpnk.net
      link
      fedilink
      7•2 years ago

      parentheses

    • @shotgun_crab@lemmy.world
      link
      fedilink
      English
      4•2 years ago

      Why not both

      • @EvokerKing@lemmy.world
        link
        fedilink
        4•2 years ago

        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
          0•2 years ago

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

          • @EvokerKing@lemmy.world
            link
            fedilink
            3•2 years ago

            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
              1•2 years ago

              Okay cool!

    • @vosjedev@lemm.ee
      link
      fedilink
      2•2 years ago

      yep.

    • @fidodo@lemm.ee
      link
      fedilink
      1•2 years ago

      Have you tried using an auto formatter? Let’s you write code however and fixes the structure automatically on save. It’s way easier for me to write curly braces then hit ctrl+s than have to select multiple lines manually and tab in and out. I feel the biggest gains I’ve made in productivity came after I learned to embrace tooling.

    • @FleetingTit@feddit.de
      link
      fedilink
      1•2 years ago

      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
  • 349 users / day
  • 3.72K users / week
  • 8.9K users / month
  • 19.6K users / 6 months
  • 24.7K subscribers
  • 1.53K Posts
  • 53.7K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org