fed.dyne.org
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
gandalf_der_12te@discuss.tchncs.de to Programmer Humor@programming.dev · 1 year ago

new preference war just dropped

i.redd.it

message-square
5
link
fedilink
5

new preference war just dropped

i.redd.it

gandalf_der_12te@discuss.tchncs.de to Programmer Humor@programming.dev · 1 year ago
message-square
5
link
fedilink

geteilt von: https://lemmit.online/post/3018791

This is an automated archive made by the Lemmit Bot.

The original was posted on /r/ProgrammerHumor by /u/polytopelover on 2024-05-26 21:23:20+00:00.

alert-triangle
You must log in or register to comment.
  • alexdeathway@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    First one are method name, second one are status name.

    
    def open_file_dialog(self):
           self.dialog_file_open = True
           pass
    
    

    Yoda level preference war.

    • Croquette@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I tend to add is to booleans toreally differentiate between a method name and a status.

      def open_file_dialog(self):
          self.dialog_file_is_open = True
          pass
      

      That way, it’s easier for my dumb brain to spot which is which at a glance.

      • db0@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        is_dialog_file_open

        fite me

  • Agent641@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I just name my variables a, b, c etc. If I have more than 26 variables in any given function, I name them aa, ab, ac, etc.

    • gandalf_der_12te@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      you’re on a highway to hell.

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.12K users / day
  • 4.71K users / week
  • 9.15K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 23.1K subscribers
  • 980 Posts
  • 19K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org