Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Apparently there is no limit to naming conventions for method

Apparently there is no limit to naming conventions for method

Scheduled Pinned Locked Moved The Weird and The Wonderful
36 Posts 28 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T thedavejay

    public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
    {
    return;
    }

    I feel like crying. X|

    R Offline
    R Offline
    R_L_H
    wrote on last edited by
    #14

    You guys have obviously never written any objective C. The following method signature (without defined parameter names) is a legit initializer method from the Apple code base for the NSBitmapImageRep[^][] object. God only knows what some users have made.

    initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:

    M 1 Reply Last reply
    0
    • G Gary Wheeler

      In this case, she is actually a he, and he's an inflatable doll.

      Software Zen: delete this;

      B Offline
      B Offline
      BillW33
      wrote on last edited by
      #15

      :confused: :wtf: X| :laugh:

      Just because the code works, it doesn't mean that it is good code.

      1 Reply Last reply
      0
      • T thedavejay

        public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
        {
        return;
        }

        I feel like crying. X|

        M Offline
        M Offline
        Michael Kingsford Gray
        wrote on last edited by
        #16

        What is actually so bad about this? The length only? If yes, then WTF? You are kvetching about length? Why? If not, then fill it in here: __________________________

        B K 2 Replies Last reply
        0
        • M Michael Kingsford Gray

          What is actually so bad about this? The length only? If yes, then WTF? You are kvetching about length? Why? If not, then fill it in here: __________________________

          B Offline
          B Offline
          BobJanova
          wrote on last edited by
          #17

          The length is a WTF because it makes it unreadable.

          M 1 Reply Last reply
          0
          • B BobJanova

            The length is a WTF because it makes it unreadable.

            M Offline
            M Offline
            Michael Kingsford Gray
            wrote on last edited by
            #18

            Eh? Unreadable in what sense? I can read quite clearly, as well as understand the intent. Long names are inherently self-documenting. I sincerely do NOT understand your response. To me, tersely abbreviated names are not only unreadable, but quite unnecessary in this day-and-age of auto-completion.

            L B B A 4 Replies Last reply
            0
            • T thedavejay

              public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
              {
              return;
              }

              I feel like crying. X|

              G Offline
              G Offline
              Gary Wheeler
              wrote on last edited by
              #19

              I've used support software from a certain hardware manufacturer. I think their software was written by an intern. All of the names are of the form:

              #define ACR1_ACR2_ACR3_..._ACRN 0x........

              where each ACR_i_ is a three or four letter acronym for a hardware signal or state. Some of the names are well over 100 characters long, and completely unreadable.

              Software Zen: delete this;

              1 Reply Last reply
              0
              • M Michael Kingsford Gray

                Eh? Unreadable in what sense? I can read quite clearly, as well as understand the intent. Long names are inherently self-documenting. I sincerely do NOT understand your response. To me, tersely abbreviated names are not only unreadable, but quite unnecessary in this day-and-age of auto-completion.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #20

                Considering the most common coding convention argues for 80-character lines, and given that only the method name contains 113 characters I would say yes, it is very unreadable.

                Saludos!! ____Juan

                1 Reply Last reply
                0
                • M Michael Kingsford Gray

                  Eh? Unreadable in what sense? I can read quite clearly, as well as understand the intent. Long names are inherently self-documenting. I sincerely do NOT understand your response. To me, tersely abbreviated names are not only unreadable, but quite unnecessary in this day-and-age of auto-completion.

                  B Offline
                  B Offline
                  BobJanova
                  wrote on last edited by
                  #21

                  The same reason that writing a 4 page essay in a comment in the lounge is unreadable. You have to parse a lot of text before you can begin to understand what the purpose is. Just get to the point, which I'm sure can be expressed in fewer than 15 words or however many are in that title.

                  1 Reply Last reply
                  0
                  • T thedavejay

                    Yeah, its like climbing Rapunzel's tower to find out that she is actually a he.

                    W Offline
                    W Offline
                    wizardzz
                    wrote on last edited by
                    #22

                    Or finding out the hair you climbed was not the type of hair you anticipated.

                    1 Reply Last reply
                    0
                    • M Michael Kingsford Gray

                      Eh? Unreadable in what sense? I can read quite clearly, as well as understand the intent. Long names are inherently self-documenting. I sincerely do NOT understand your response. To me, tersely abbreviated names are not only unreadable, but quite unnecessary in this day-and-age of auto-completion.

                      B Offline
                      B Offline
                      bkebamc
                      wrote on last edited by
                      #23

                      Lolz. Apparently self-documenting code means that we never have to write commentary? Has there been a formal proof that camel case and embedded separators cover the full semantics of natural language?

                      1 Reply Last reply
                      0
                      • R R_L_H

                        You guys have obviously never written any objective C. The following method signature (without defined parameter names) is a legit initializer method from the Apple code base for the NSBitmapImageRep[^][] object. God only knows what some users have made.

                        initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:

                        M Offline
                        M Offline
                        msvbdev
                        wrote on last edited by
                        #24

                        X| and that is why I prefer ISO standard C :)

                        1 Reply Last reply
                        0
                        • M Michael Kingsford Gray

                          Eh? Unreadable in what sense? I can read quite clearly, as well as understand the intent. Long names are inherently self-documenting. I sincerely do NOT understand your response. To me, tersely abbreviated names are not only unreadable, but quite unnecessary in this day-and-age of auto-completion.

                          A Offline
                          A Offline
                          AspDotNetDev
                          wrote on last edited by
                          #25

                          In college, did you title your essays using the entire contents of the essays, or did you use something shorter? Longer variables take longer for humans to read, they can lead to extra horizontal scrolling (the Devil!), they take longer to type, and they are not necessary.

                          INSWSAEJETGTMA...

                          Im_Not_Saying_We_Should_Abbreviate_Excessively_Just_Enough_To_Get_The_Meaning_Across...

                          // If you want to explain something more, put it in a comment above the variable declaration so it doesn't follow the variable around.
                          abbreviateAppropriately...

                          Thou mewling ill-breeding pignut!

                          P 1 Reply Last reply
                          0
                          • A AspDotNetDev

                            In college, did you title your essays using the entire contents of the essays, or did you use something shorter? Longer variables take longer for humans to read, they can lead to extra horizontal scrolling (the Devil!), they take longer to type, and they are not necessary.

                            INSWSAEJETGTMA...

                            Im_Not_Saying_We_Should_Abbreviate_Excessively_Just_Enough_To_Get_The_Meaning_Across...

                            // If you want to explain something more, put it in a comment above the variable declaration so it doesn't follow the variable around.
                            abbreviateAppropriately...

                            Thou mewling ill-breeding pignut!

                            P Online
                            P Online
                            PIEBALDconsult
                            wrote on last edited by
                            #26

                            /** <summary>That should go here.</summary> */
                            [Description("Or perhaps here.")]
                            abbreviateAppropriately...

                            so it does follow the method around and is more localizable.

                            1 Reply Last reply
                            0
                            • T thedavejay

                              public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
                              {
                              return;
                              }

                              I feel like crying. X|

                              M Offline
                              M Offline
                              musicdev
                              wrote on last edited by
                              #27

                              Wow. Hurts just looking at it.

                              1 Reply Last reply
                              0
                              • T thedavejay

                                public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
                                {
                                return;
                                }

                                I feel like crying. X|

                                M Offline
                                M Offline
                                Mohibur Rashid
                                wrote on last edited by
                                #28

                                I thought I am the naming jerk :laugh:

                                1 Reply Last reply
                                0
                                • E egenis

                                  Look on the bright side - it's broken up into easily manageable chunks by _'s Imagine it was not...

                                  K Offline
                                  K Offline
                                  KP Lee
                                  wrote on last edited by
                                  #29

                                  egenis wrote:

                                  Imagine it was not...

                                  Using all lowercase.

                                  B 1 Reply Last reply
                                  0
                                  • L Lost User

                                    Nice ans well, but I expect some rcommendation any time now that will tell us to wear feathers on our heads and chant while dancing around the computer.

                                    At least artificial intelligence already is superior to natural stupidity

                                    K Offline
                                    K Offline
                                    KP Lee
                                    wrote on last edited by
                                    #30

                                    The chant would be "Owe waa taw goo sigh M"? (Start slowly, pick up speed, enlightenment eventually comes.)

                                    1 Reply Last reply
                                    0
                                    • M Michael Kingsford Gray

                                      What is actually so bad about this? The length only? If yes, then WTF? You are kvetching about length? Why? If not, then fill it in here: __________________________

                                      K Offline
                                      K Offline
                                      Keith Barrow
                                      wrote on last edited by
                                      #31

                                      SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue You genuiely think this is readable? I got bored half way through, though it is 1 am where I am.

                                      Michael K Gray wrote:

                                      If not, then fill it in here:

                                      Well in probability this is several methods and attributes:

                                      public void ReAddRequiredDeletedDevice()
                                      {
                                      //OK this if is a punt, but if gives the idea
                                      if(!Device.IsDeleted && Device.IsIncluded)
                                      {
                                      //Add or whatever
                                      }
                                      }

                                      public void SetDeviceList()
                                      {
                                      ReAddRequiredDeletedDevice();
                                      return; //Hey the one useful line of code from the OP!
                                      }

                                      Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                                      -Or-
                                      A Dead ringer for Kate Winslett[^]

                                      1 Reply Last reply
                                      0
                                      • T thedavejay

                                        public void SettingDeviceList_ReAddingAPreviouslyDeletedDevice_MustAddDevicesToRuleDevicesWithIsDeletedFalseAndIsIncludedTrue()
                                        {
                                        return;
                                        }

                                        I feel like crying. X|

                                        R Offline
                                        R Offline
                                        Reza Ahmadi
                                        wrote on last edited by
                                        #32

                                        That is not real! I can't believe

                                        1 Reply Last reply
                                        0
                                        • B Brisingr Aerowing

                                          :(( :wtf: :(( :wtf: :(( :wtf: :(( Is that even called somewhere?!??! On thinking, it might be a stub that never got filled in for some reason, but the name is absolutely unreasonably ridiculously insanely crazy!

                                          public class SysAdmin : Employee
                                          {

                                           public override void DoWork(IWorkItem workItem)
                                           {
                                                if (workItem.User.Type == UserType.NoLearn){
                                                   throw new NoIWillNotFixYourComputerException(new Luser(workItem.User));
                                                }else{
                                                     base.DoWork(workItem);
                                                }
                                           }
                                          

                                          }

                                          A Offline
                                          A Offline
                                          Alberto Bar Noy
                                          wrote on last edited by
                                          #33

                                          Zac Greve wrote:

                                          absolutely unreasonably ridiculously insanely crazy

                                          private void absolutely_unreasonably_ridiculously_insanely_crazy()
                                          {
                                          return;
                                          }

                                          FTFY

                                          Alberto Bar-Noy --------------- “The city’s central computer told you? R2D2, you know better than to trust a strange computer!” (C3PO)

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups