MTGZone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Lena@gregtech.eu to Programmer Humor@programming.devEnglish · 1 day ago

I wonder if this was made by AI or a shit programmer

gregtech.eu

message-square
160
fedilink
823

I wonder if this was made by AI or a shit programmer

gregtech.eu

Lena@gregtech.eu to Programmer Humor@programming.devEnglish · 1 day ago
message-square
160
fedilink
  • Diplomjodler@lemmy.world
    link
    fedilink
    arrow-up
    21
    ·
    10 hours ago

    I always get irrationally angry when i see python code using os.path instead of pathlib. What is this, the nineties?

    • UndercoverUlrikHD@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      3 hours ago

      What big advantages does pathlib provide? os.path works just fine

      • Diplomjodler@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 hours ago
        • Everything is in one library which offers consistency for all operations.
        • You can use forward slashes on Windows paths, which makes for much better readability.
        • You can access all the parts of a pathlib object with attributes like .stem, .suffix or .parent.
        • You can easily find the differences between paths with .relative_to()
        • You can easily build up complex paths with the / operator (no string additions).

        Just off the top of my head.

        • nibbler@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          2 hours ago

          if you don’t need those, why burden the program with another dependency?

          • Diplomjodler@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 hour ago

            It’s in the standard library, just like os or shutil.

    • Diplomjodler@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 hours ago

      deleted by creator

    • indepndnt@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      6 hours ago

      And what’s with the string addition? Never heard of f-strings or even .format()?

    • Gonzako@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      9 hours ago

      Make a PR

      • axEl7fB5@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 hours ago

        Be the change you want to see in the world.

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.

  • 706 users / day
  • 4.3K users / week
  • 7.93K users / month
  • 20.2K users / 6 months
  • 5 local subscribers
  • 25.3K subscribers
  • 1.59K Posts
  • 58.3K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org