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. New Variable Naming Standards

New Variable Naming Standards

Scheduled Pinned Locked Moved The Lounge
tutorial
23 Posts 14 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.
  • L Lost User

    I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

    A Offline
    A Offline
    Amarnath S
    wrote on last edited by
    #3

    Add 6. The numeric digit what you feel Dalek Dave usually votes for your posts.

    1 Reply Last reply
    0
    • L Lost User

      That reminds me of something: Each player gets six cards, except for the player on the dealer's right, who gets seven. The second card is turned up, except on Tuesdays. Two jacks are a "half-fizzbin". If you have a half-fizzbin: a third jack is a "shralk" and results in disqualification; one wants a king and a deuce, except at night, when one wants a queen and a four; if a king had been dealt, the player would get another card, except when it is dark, in which case he'd have to give it back. The top hand is a "royal fizzbin", but the odds against getting one are said to be "astronomical".

      At least artificial intelligence already is superior to natural stupidity

      E Offline
      E Offline
      effayqueue
      wrote on last edited by
      #4

      Yet again proving how knowledge of Star Trek can be invaluable in real life

      L 1 Reply Last reply
      0
      • L Lost User

        I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #5

        You forgot a special character if you want passwords. Most of them wouldn't work though. _ is about it, i think.

        V.

        1 Reply Last reply
        0
        • E effayqueue

          Yet again proving how knowledge of Star Trek can be invaluable in real life

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

          Sure. I usually solve problems by wrapping them up in a warp field and keeping the antimatter contained. I only wish I had Kirk's ability to talk computers to death.

          At least artificial intelligence already is superior to natural stupidity

          L 1 Reply Last reply
          0
          • L Lost User

            I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

            S Offline
            S Offline
            Slacker007
            wrote on last edited by
            #7

            Two man enter, one man leave.

            "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
            "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) "It is the celestial scrotum of good luck!" - Nagy Vilmos (2011) "But you probably have the smoothest scrotum of any grown man" - Pete O'Hanlon (2012)

            1 Reply Last reply
            0
            • L Lost User

              I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

              H Offline
              H Offline
              Hiren solanki
              wrote on last edited by
              #8

              MehGerbil wrote:

              intValReCoRDCouNT1rjt1998

              In which year variable was created. :rolleyes:

              Regards, Hiren. -"I don't know, I don't care, and it doesn't make any difference".

              L Mike HankeyM 2 Replies Last reply
              0
              • H Hiren solanki

                MehGerbil wrote:

                intValReCoRDCouNT1rjt1998

                In which year variable was created. :rolleyes:

                Regards, Hiren. -"I don't know, I don't care, and it doesn't make any difference".

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

                Let's reduce it to the two digit year to save space. After all, including the century digits is redundant. :-D

                H T A 3 Replies Last reply
                0
                • L Lost User

                  Let's reduce it to the two digit year to save space. After all, including the century digits is redundant. :-D

                  H Offline
                  H Offline
                  hairy_hats
                  wrote on last edited by
                  #10

                  ^ I think I've identified our resident century digit hater.

                  1 Reply Last reply
                  0
                  • L Lost User

                    I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

                    K Offline
                    K Offline
                    krumia
                    wrote on last edited by
                    #11

                    How about adding the hat size of the nearest squirrel[^]?

                    1 Reply Last reply
                    0
                    • L Lost User

                      Let's reduce it to the two digit year to save space. After all, including the century digits is redundant. :-D

                      T Offline
                      T Offline
                      TorstenH
                      wrote on last edited by
                      #12

                      Let's reduce it to the two digit year to save space. That's what they said before they knew better...

                      regards Torsten When I'm not working

                      L 1 Reply Last reply
                      0
                      • L Lost User

                        I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

                        T Offline
                        T Offline
                        TorstenH
                        wrote on last edited by
                        #13

                        I'd like to add a prefix m_ for member variables: m_intValReCoRDCouNT1rjt to add a bit more security we should make the naming longer - one never knows, the name might already been taken.

                        regards Torsten When I'm not working

                        1 Reply Last reply
                        0
                        • H Hiren solanki

                          MehGerbil wrote:

                          intValReCoRDCouNT1rjt1998

                          In which year variable was created. :rolleyes:

                          Regards, Hiren. -"I don't know, I don't care, and it doesn't make any difference".

                          Mike HankeyM Offline
                          Mike HankeyM Offline
                          Mike Hankey
                          wrote on last edited by
                          #14

                          Excellent! +52012mwh

                          VS2010/Atmel Studio 6.0 ToDo Manager Extension
                          Version 3.0 now available. There is no place like 127.0.0.1

                          1 Reply Last reply
                          0
                          • L Lost User

                            I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

                            J Offline
                            J Offline
                            Jan Steyn
                            wrote on last edited by
                            #15

                            You are hereby officially disowned by the CodeProject community. We do not know you nor do we want to know you. :laugh: :laugh: :laugh:

                            1 Reply Last reply
                            0
                            • L Lost User

                              Let's reduce it to the two digit year to save space. After all, including the century digits is redundant. :-D

                              A Offline
                              A Offline
                              Amarnath S
                              wrote on last edited by
                              #16

                              Will it not lead to the Y0.1K problem, like the Year 2000 problem?

                              1 Reply Last reply
                              0
                              • L Lost User

                                I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

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

                                This makes you a dick.

                                L 1 Reply Last reply
                                0
                                • L Lost User

                                  I'd like to recommend some new variable namig standards. For this tutorial I'll use an example pulled from one of my recent projects. intValReCoRDCouNT1rjt 1: The first 3 letters are the type. 2: The second 3 letters are if it's a reference or value type. 3: The third set of letters - all capital letters (except for vowels) - is the name. 4: The numeric digit is what I usually vote on all of Dalek Dave's posts. 5: My initials (so we know what programmer made the variable). The great thing about these variable names is that they also work well as passwords. I call it Code Project Notation.

                                  P Offline
                                  P Offline
                                  peterchen
                                  wrote on last edited by
                                  #18

                                  I can go with 1, 2, 4, and five - silly, but I can imagine a tortured, past-plagued mind coming up with perfectly fine reasons. I'm curious, though, what's the motivation behind the casing rule of 3. They didn't want to shell out for an obfuscator?

                                  FILETIME to time_t
                                  | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                                  L 1 Reply Last reply
                                  0
                                  • L Lost User

                                    Sure. I usually solve problems by wrapping them up in a warp field and keeping the antimatter contained. I only wish I had Kirk's ability to talk computers to death.

                                    At least artificial intelligence already is superior to natural stupidity

                                    L Offline
                                    L Offline
                                    lewax00
                                    wrote on last edited by
                                    #19

                                    But...wouldn't reversing the polarity be easier?

                                    L 1 Reply Last reply
                                    0
                                    • T TorstenH

                                      Let's reduce it to the two digit year to save space. That's what they said before they knew better...

                                      regards Torsten When I'm not working

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

                                      I'll be dead long before it's a problem. Which is my way of saying it isn't my problem. That is also a great way to view the environment (1). NOTES ---------------------------------------------- 1: Please don't tell Lucy Lawless that I wrote that.

                                      1 Reply Last reply
                                      0
                                      • L lewax00

                                        But...wouldn't reversing the polarity be easier?

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

                                        Even Kirk does not talk computers to death which he just could switch off. That's reserved for those which are inaccessible and insist to follow their buggy programs.

                                        At least artificial intelligence already is superior to natural stupidity

                                        1 Reply Last reply
                                        0
                                        • P peterchen

                                          I can go with 1, 2, 4, and five - silly, but I can imagine a tortured, past-plagued mind coming up with perfectly fine reasons. I'm curious, though, what's the motivation behind the casing rule of 3. They didn't want to shell out for an obfuscator?

                                          FILETIME to time_t
                                          | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

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

                                          peterchen wrote:

                                          I'm curious, though, what's the motivation behind the casing rule of 3.

                                          You must be one of those VB guys I'm always hearing about...

                                          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