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. The Lounge
  3. Naming class members

Naming class members

Scheduled Pinned Locked Moved The Lounge
c++phpsysadmindata-structuresjson
20 Posts 12 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.
  • A alex barylski

    I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

    P Offline
    P Offline
    ProffK
    wrote on last edited by
    #2

    Long may you lie awake tonight thinking. Don't get ripped-off by the life assurance industry.

    A 1 Reply Last reply
    0
    • A alex barylski

      I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

      N Offline
      N Offline
      Navin
      wrote on last edited by
      #3

      How about one of thesse: doSomeStuff shuffleSomeData doSomethingUseful :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

      D L M 3 Replies Last reply
      0
      • A alex barylski

        I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

        G Offline
        G Offline
        Graham Bradshaw
        wrote on last edited by
        #4

        Slightly off topic... What's the point of the 'mixed case apart from the first letter' naming standard. I know it's prevalent, especially in Java, and (I think) .NET. Mixed case I understand - it makes the different words easy to read. So why not make the first letter mixed case as well?

        N A 2 Replies Last reply
        0
        • P ProffK

          Long may you lie awake tonight thinking. Don't get ripped-off by the life assurance industry.

          A Offline
          A Offline
          alex barylski
          wrote on last edited by
          #5

          I was up all night...not thinking just about that mind you...but i've been up since 12:30 yesterday afternoon... 2 hours more and I have 24 hours... My eye lids are starting to get pretty heavy though... :zzz: It's frustrating being a genius and living the life of a moron!!!

          1 Reply Last reply
          0
          • G Graham Bradshaw

            Slightly off topic... What's the point of the 'mixed case apart from the first letter' naming standard. I know it's prevalent, especially in Java, and (I think) .NET. Mixed case I understand - it makes the different words easy to read. So why not make the first letter mixed case as well?

            N Offline
            N Offline
            Navin
            wrote on last edited by
            #6

            You got me there. I personally prefer the good ol' capital first, like Windows API functions. An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

            1 Reply Last reply
            0
            • N Navin

              How about one of thesse: doSomeStuff shuffleSomeData doSomethingUseful :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

              D Offline
              D Offline
              Daniel Turini
              wrote on last edited by
              #7

              You've been reading VB code lately, right? :) Yes, even I am blogging now!

              1 Reply Last reply
              0
              • A alex barylski

                I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

                realJSOPR Online
                realJSOPR Online
                realJSOP
                wrote on last edited by
                #8

                How about this PhpFunctionator() ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                A J 2 Replies Last reply
                0
                • G Graham Bradshaw

                  Slightly off topic... What's the point of the 'mixed case apart from the first letter' naming standard. I know it's prevalent, especially in Java, and (I think) .NET. Mixed case I understand - it makes the different words easy to read. So why not make the first letter mixed case as well?

                  A Offline
                  A Offline
                  alex barylski
                  wrote on last edited by
                  #9

                  I usually only do that while programming in Perl or PHP. Whenever I do MFC/Javascript or anything specific to windows I usually follow the WIN32 API and hungarian notation for variables. I dunno...especially when I write PHP code I have a tendancy to write functions in a verbNoun() type fashion...I just prefer that coding style...yet I probably wouldn't do anything like that in C++ especially Windows code. It's frustrating being a genius and living the life of a moron!!!

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    How about this PhpFunctionator() ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    A Offline
                    A Offline
                    alex barylski
                    wrote on last edited by
                    #10

                    The Php would have to be small case...seems to be the standard way of using php in any logo, function call, etc. :) It's frustrating being a genius and living the life of a moron!!!

                    1 Reply Last reply
                    0
                    • A alex barylski

                      I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

                      C Offline
                      C Offline
                      Chris Meech
                      wrote on last edited by
                      #11

                      I've a favourite for hard-to-name functions

                      ThisDoesWhoKnowsWhatSoDontThinkAboutChangingIt();

                      or

                      ICantThinkOfAnythingBetterThanThis();

                      :doh: Chris Meech I am Canadian. [heard in a local bar] Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]

                      1 Reply Last reply
                      0
                      • A alex barylski

                        I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

                        E Offline
                        E Offline
                        El Corazon
                        wrote on last edited by
                        #12

                        CornedBeefHash() since it has a little bit of everything in it.... LeftOverMeatloaf() also works... honestly... I am kidding! I haven't used those since my college days when I wanted to annoy my professor. EinsteinsHeadache() was a 4 dimensional storage routine (my professor said she had to visualize data storage to grade it, I learned new words that day I turned it in too). _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                        1 Reply Last reply
                        0
                        • N Navin

                          How about one of thesse: doSomeStuff shuffleSomeData doSomethingUseful :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

                          L Offline
                          L Offline
                          l a u r e n
                          wrote on last edited by
                          #13

                          i was thinking doit() :)


                          "there is no spoon"
                          biz stuff about me

                          N 1 Reply Last reply
                          0
                          • N Navin

                            How about one of thesse: doSomeStuff shuffleSomeData doSomethingUseful :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

                            M Offline
                            M Offline
                            Matt Gerrans
                            wrote on last edited by
                            #14

                            And if you want people to think you're doing really high-tech stuff, you can gussie them up like this: TransmogrifyCommunicationPaths() StabilizeOfflineBufferArrays() InitiateTransparentProtocol() TransmitArterialSpecification() etc. Seriously, though, you were originally talking about parameters, then all your ideas for names were about events and actions. From your original description I was thinking it would be SendParameters(), or GetParameters(), or GetGetParameters() :), or the like. Additionally, a kind of rule of thumb about hard-to-name functions or methods is that usually the reason is that they are not cohesive (see Coupling and Cohesion[^]). Matt Gerrans

                            1 Reply Last reply
                            0
                            • A alex barylski

                              I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

                              D Offline
                              D Offline
                              Daniel Turini
                              wrote on last edited by
                              #15

                              When talking about unmaintainable code, this[^] guide is a must. Don't follow what all those amateurs here told you, they are not as good as a real pro at unmaintainable code. E.g., while Navin suggested: doSomeStuff shuffleSomeData doSomethingUseful a real pro would use: dSmStff misturaAlgunsDados (yeah! Globalization rules) DoSoMeTh1nGusefu1 Also, don't forget to consider: _ (That's it! A single score can be used as a function name! Multiple scores too!) Yes, even I am blogging now!

                              1 Reply Last reply
                              0
                              • A alex barylski

                                I am curious as to what the proper name would be for the following function: The method... Takes parameters prepared on client side which are then shuttled to server side as URL GET variables, then converted into PHP function parameters and passed to a function call. The object is written in PHP. Here are some names i've come up with...but none seem to fit the purpose very well. 1) bindEvents/captureEvents Although my PHP object is not really capturing any events...except for a native HTTP GET request...I think. 2) routeActions My PHP object is basically parsing the URL get request into an array and then determining what elements in the array are parameters intended for the function call (which is actually more like the event handler) For this reason I have decided on eventListener because it actually unpacks parameters for more than one function. However I wonder, would bindEvents be a better name for the function considering what it's doing? This function is basically parsing a URL breaking it into seperate variables and submiting certain parameters to a function handler. Perhaps something like deparcelParams or unpackParams but thats not really saying it all either... Any suggestions? Cheers :) It's frustrating being a genius and living the life of a moron!!!

                                J Offline
                                J Offline
                                Jim Stewart
                                wrote on last edited by
                                #16

                                Its possible that the method is doing too much. One of the "smells" (as Fowler puts it) is if you have trouble with a name, perhaps its because the method is too diffuse. See if you can whack it up into bits which then follow the old VerbObject() motif. Just a thought...

                                α.γεεκ

                                Fortune passes everywhere.
                                Duke Leto Atreides

                                J 1 Reply Last reply
                                0
                                • L l a u r e n

                                  i was thinking doit() :)


                                  "there is no spoon"
                                  biz stuff about me

                                  N Offline
                                  N Offline
                                  Navin
                                  wrote on last edited by
                                  #17

                                  Or you could have: doitBest() But I think that's trademarked by a hardware store. :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

                                  J 1 Reply Last reply
                                  0
                                  • N Navin

                                    Or you could have: doitBest() But I think that's trademarked by a hardware store. :-D An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.

                                    J Offline
                                    J Offline
                                    Jim Crafton
                                    wrote on last edited by
                                    #18

                                    or even doit2(), for when the first proves inadequate, but for reasons of backward compatibility, you can't get rid of it. Like the man said, self documenting code :) ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned

                                    1 Reply Last reply
                                    0
                                    • realJSOPR realJSOP

                                      How about this PhpFunctionator() ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                      J Offline
                                      J Offline
                                      Jim Crafton
                                      wrote on last edited by
                                      #19

                                      or perhaps phpMultiplexingFrobnicator() pstFricticatingBabelizer() lsfDopplewhangingSpidofuscator() ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned

                                      1 Reply Last reply
                                      0
                                      • J Jim Stewart

                                        Its possible that the method is doing too much. One of the "smells" (as Fowler puts it) is if you have trouble with a name, perhaps its because the method is too diffuse. See if you can whack it up into bits which then follow the old VerbObject() motif. Just a thought...

                                        α.γεεκ

                                        Fortune passes everywhere.
                                        Duke Leto Atreides

                                        J Offline
                                        J Offline
                                        Jim Crafton
                                        wrote on last edited by
                                        #20

                                        smellyDiffuser() ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned

                                        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