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. variable names - who cares!?

variable names - who cares!?

Scheduled Pinned Locked Moved The Weird and The Wonderful
comgame-devquestion
32 Posts 15 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.
  • S Steven A Lowe

    a friend of mine - many years ago - was asked to port a physics simulation program from one platform to another. The software performed beautifully, was efficient, and had won awards for educational excellence etc. the source code was several thousand lines of assembly, which was large but not too large for that platform and era. The program had two comments in it, one word each. They were not helpful. The variable naming convention was even more interesting. It seems the original author [a physicist/mathematician, in all fairness] treated variable names like a Pez dispenser. The first variable in the program was named "A", the second was named "B", and so on. When he got to Z he started over with A1, then B1, etc. The program had a lot of variables, I think the last variable was named BB21. Porting the application was not too difficult, as the two platforms had very similar instruction sets. Debugging it, on the other hand, was an exercise in insanity!

    Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

    V Offline
    V Offline
    Vasudevan Deepak Kumar
    wrote on last edited by
    #23

    Steven A. Lowe wrote:

    BB21

    Is he a fan(atic) and lunatic user of Microsoft Excel (spreadsheet program) which has this AA, BB type arrangements for its grid?

    Vasudevan Deepak Kumar Personal Homepage
    Tech Gossips
    All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

    S 1 Reply Last reply
    0
    • C Chris Maunder

      I spent too much time dealing with numerical modelling suites written in FORTRAN written exactly the same way. Thousands and thousands of lines, and all the variables "x", "xx", "xxx" etc. Comments? We're physicists, not literary majors. We don't need no stinkin' comments. The code is obvious anyway... :doh: :sigh:

      cheers, Chris Maunder

      CodeProject.com : C++ MVP

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #24

      Actually, once the application is run through an obfuscator tool, the output code would be like this. Isn't it?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

      P L 2 Replies Last reply
      0
      • V Vasudevan Deepak Kumar

        Actually, once the application is run through an obfuscator tool, the output code would be like this. Isn't it?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #25

        Vasudevan Deepak Kumar wrote:

        the output code would be like this. Isn't it?

        Depends. I did give the Skater obfuscator a try, and it has the ability to create non-printable member/method names. It does crash a certain useful tool when obfuscated in such a manner.

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

        1 Reply Last reply
        0
        • S Steven A Lowe

          a friend of mine - many years ago - was asked to port a physics simulation program from one platform to another. The software performed beautifully, was efficient, and had won awards for educational excellence etc. the source code was several thousand lines of assembly, which was large but not too large for that platform and era. The program had two comments in it, one word each. They were not helpful. The variable naming convention was even more interesting. It seems the original author [a physicist/mathematician, in all fairness] treated variable names like a Pez dispenser. The first variable in the program was named "A", the second was named "B", and so on. When he got to Z he started over with A1, then B1, etc. The program had a lot of variables, I think the last variable was named BB21. Porting the application was not too difficult, as the two platforms had very similar instruction sets. Debugging it, on the other hand, was an exercise in insanity!

          Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

          B Offline
          B Offline
          BiscuitTheCat
          wrote on last edited by
          #26

          Hey... I resemble that remark. Andrew

          1 Reply Last reply
          0
          • V Vasudevan Deepak Kumar

            Steven A. Lowe wrote:

            BB21

            Is he a fan(atic) and lunatic user of Microsoft Excel (spreadsheet program) which has this AA, BB type arrangements for its grid?

            Vasudevan Deepak Kumar Personal Homepage
            Tech Gossips
            All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

            S Offline
            S Offline
            Steven A Lowe
            wrote on last edited by
            #27

            :laugh: No, actually he's a Mac fan, and the program in question is older than spreadsheets...

            Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

            1 Reply Last reply
            0
            • P Paul Conrad

              CDP1802 wrote:

              we have one big difference between interpreters and assemblers / compilers.

              Oh yes, that was my first lesson in the difference between compilers and interpreters. Writing a program in the old Commodore Basic, then write the equivalent - sometimes by hand - in assembly, and what a bit of difference that was :) I did get my first Intel based machine as a high school graduation present, in 1991, an Intel 80386-DX25mhz box. I had qbasic and Microsoft Quick Basic 4.5 both installed on the machine. Bit of a performance difference between those two, back then.

              "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

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

              Well, I guess I tossed myself into the cold water. It was 1978, I was 12 years old and, as always, had a little difference of opinion with my parents. So I spent the day out of harm's way at a local mall. There was a little Radio Shack where they had just unpacked a TRS-80 Model I. They made the mistake to leave that that thing unattended and so they had me as a guest all day, trying to figure out what you can do with a computer. And when I finally got home, my poor parents were surprised to learn that the previous issues were totally irrelevant and that getting a computer was now the highest priority :) Their answer was a simple 'no', but I kept harassing them until they got me a kit for 100$. It was an Elf II with tremendous 256 bytes RAM, a hex keypad and a video resolution of 64 x 32 pixels (monochrome). So it was no neat but slow BASIC for me, it was entering machine code with the hexpad. And my parents soon got longer lists of desperately required hardware.

              A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

              1 Reply Last reply
              0
              • B BillW33

                A place where I used to work had a lot of code with variable names like a, aa, b, bb, etc. Their reason? The time they saved by not typing out a longer variable name would add up to a significant time savings over the course of a year. They also saw nothing wrong with method names like "DoIt". You think that these things would make the code to understand? Their answer to that objection was "A good programmer can figure out what the code does!". I don't work there anymore, for obvious reasons ;).

                S Offline
                S Offline
                Steven A Lowe
                wrote on last edited by
                #29

                a while back I visited a web site that gave me a javascript error on load. curious, i looked at the page source. The function with the bug was named "JoshIsCool" :laugh:

                Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

                B 1 Reply Last reply
                0
                • S Steven A Lowe

                  a while back I visited a web site that gave me a javascript error on load. curious, i looked at the page source. The function with the bug was named "JoshIsCool" :laugh:

                  Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

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

                  Yeah, Josh is so cool that his javascript won't even load ;) Bill W

                  1 Reply Last reply
                  0
                  • S Steven A Lowe

                    a friend of mine - many years ago - was asked to port a physics simulation program from one platform to another. The software performed beautifully, was efficient, and had won awards for educational excellence etc. the source code was several thousand lines of assembly, which was large but not too large for that platform and era. The program had two comments in it, one word each. They were not helpful. The variable naming convention was even more interesting. It seems the original author [a physicist/mathematician, in all fairness] treated variable names like a Pez dispenser. The first variable in the program was named "A", the second was named "B", and so on. When he got to Z he started over with A1, then B1, etc. The program had a lot of variables, I think the last variable was named BB21. Porting the application was not too difficult, as the two platforms had very similar instruction sets. Debugging it, on the other hand, was an exercise in insanity!

                    Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

                    L Offline
                    L Offline
                    leonej_dt
                    wrote on last edited by
                    #31

                    Real men don't need variable names! Real men use memory addresses!

                    To those who understand, I extend my hand. To the doubtful I demand: Take me as I am. Not under your command, I know where I stand. I won't change to fit yout plan. Take me as I am.

                    1 Reply Last reply
                    0
                    • V Vasudevan Deepak Kumar

                      Actually, once the application is run through an obfuscator tool, the output code would be like this. Isn't it?

                      Vasudevan Deepak Kumar Personal Homepage
                      Tech Gossips
                      All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

                      L Offline
                      L Offline
                      Louis Cipher
                      wrote on last edited by
                      #32

                      Amazing! His friend has a mind like an obfuscator.

                      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