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.

    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
                                • W wizardzz

                                  This makes you a dick.

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

                                  I wish this was the only thing making me a dick. I'd be in much better shape.

                                  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