Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Ategon ( Ategon@programming.dev )  to Programmer Humor@programming.dev ·
edit-2
3 years ago

The superior bracket style

programming.dev

message-square
30
link
fedilink
101

The superior bracket style

programming.dev

Ategon ( Ategon@programming.dev )  to Programmer Humor@programming.dev ·
edit-2
3 years ago
message-square
30
link
fedilink
alert-triangle
You must log in or register to comment.
  • daluca ( daluca@feddit.nz ) 
    link
    fedilink
    arrow-up
    21
    ·
    3 years ago

  • ilost7489 ( ilost7489@lemmy.ca ) 
    link
    fedilink
    arrow-up
    12
    ·
    3 years ago

    What happens when you give a python programmer java

  • jmk1ng ( jmk1ng@programming.dev ) 
    link
    fedilink
    arrow-up
    9
    ·
    3 years ago

    I actually winced

  • verstra ( verstra@programming.dev ) 
    link
    fedilink
    arrow-up
    8
    ·
    3 years ago

    I strongly believe that code formatting does not hold any information and that because of it, compilers should reject non-normalized code, saying “run a formatter first”. We have the tooling for most of the languages to make this absolutely painless, remove all head scratching of “what the hell is up with this code style” and just focus of the semantics. I believe that you should be allowed to produce code abominations like this code sample and have it auto-formatted into the code style that everyone can easily interpret.

    • JackbyDev ( JackbyDev@programming.dev ) 
      link
      fedilink
      arrow-up
      5
      ·
      3 years ago

      Yeah, I like that new languages like Go and to a lesser extent Rust have formatters bundled.

    • Buttons ( Buttons@programming.dev ) 
      link
      fedilink
      arrow-up
      4
      ·
      3 years ago

      The auto-formatting story is half baked I think. As far as I know most language have a formatter that goes only one way, which is an improvement over having no formatter at all.

      What we’re missing is good tools to go from the standard format to a personalized format. For example, I was working on JavaScript recently and the team was using prettier with 2 space indentation. I found that somewhat hard to work with because of some minor vision issues, it was becoming a bit of an accessibility issue for me, but I was already viewed as a bit of a troublemaker at the company and pushing everyone to change their style wasn’t going to help me any.

      I tried to find a tool that would reformat the code for me without altering the repository but couldn’t find an easy solution.

      So we have formatters that go from “everyone’s personal style” to a standard style. But our tools for going the other direction, from standard style to “my personal style” are lacking. (Hoping to be proved wrong on this point.)

      • cycoder ( cycoder@programming.dev ) 
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        You could just have your own local prettier rules which will format things how you want while you work on them, then use something like lint-staged to run the standard prettier rules for your org on commit. That way you work how you wish, and the project gets the files how they wish.

      • delmain ( delmain@beehaw.org ) 
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        Your situation is why tabs are the clearly superior solution. Anyone on the team can just set their tab-width in their editor to whatever they want, and everything is consistent for everyone.

        • Michael0x18 ( Michael0x18@sh.itjust.works ) 
          link
          fedilink
          arrow-up
          2
          ·
          3 years ago

          Unless you’re using them to align things. Then it matters. (Like comments)

    • CreeperODeath ( CreeperODeath@lemmy.world ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      I don’t think it should be forced

      But I do think it should be more popularized

  • Namstel ( Namstel@programming.dev ) 
    link
    fedilink
    arrow-up
    8
    ·
    3 years ago

    That makes me physically uncomfortable. 😬

  • lowleveldata ( lowleveldata@programming.dev ) 
    link
    fedilink
    arrow-up
    8
    ·
    3 years ago

    ok cool do whatever you want. Imma put in a pre-commit hook to auto format everything.

    • sociablefish ( sociablefish@programming.dev ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      im gonna install my own reformatter to reformat it back on my machine, win-win

  • Tragic ( Tragic@programming.dev ) 
    link
    fedilink
    arrow-up
    7
    ·
    3 years ago

    Thats one angry python developer

    • Sleeping ( Sleeping@programming.dev ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      that does not align with PEP8 lmao

  • W33D ( BaroqueInMind@programming.dev ) 
    link
    fedilink
    arrow-up
    7
    ·
    3 years ago

    Honestly, I kinda like it.

    • CreeperODeath ( CreeperODeath@lemmy.world ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      I think it looks nice but I can’t imagine using it effectively

    • verstra ( verstra@programming.dev ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      Because it looks like Python?

    • DuckRaGod ( DuckRaGod@programming.dev ) 
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      Found the AI.

  • kahnclusions ( kahnclusions@programming.dev ) 
    link
    fedilink
    arrow-up
    7
    ·
    3 years ago

    Alright, time to update my team’s linters and formatters…

  • DuckRaGod ( DuckRaGod@programming.dev ) 
    link
    fedilink
    arrow-up
    7
    ·
    3 years ago

    MYYYYY EEEEEEEYYYYYYYYEEEEEEEESSSSSS

  • Michael0x18 ( Michael0x18@sh.itjust.works ) 
    link
    fedilink
    arrow-up
    5
    ·
    3 years ago

    When you really like the python style

  • chris ( chris@l.roofo.cc ) 
    link
    fedilink
    arrow-up
    5
    ·
    3 years ago

    I hate it so much

  • lasagna ( lasagna@programming.dev ) 
    link
    fedilink
    arrow-up
    4
    ·
    3 years ago

    If anything, it’s a good way to enforce line length.

  • Vacant ( Vacant@programming.dev ) 
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    Removed by mod

  • Carlos Solís ( csolisr@communities.azkware.net ) 
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    Somebody is way too used to Python I see

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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

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

  • 855 users / day
  • 2.76K users / week
  • 5.18K users / month
  • 8.36K users / 6 months
  • 465 local subscribers
  • 34.1K subscribers
  • 1.66K Posts
  • 27.4K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.21
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code