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. Programming isn't hard...

Programming isn't hard...

Scheduled Pinned Locked Moved The Lounge
66 Posts 31 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 AspDotNetDev

    I prefer to call all my variables a1, a2, a3, a4, and so on. Also, once I get to a6, I use another letter (say, b1)... that way, I only ever have to use my left hand and can keep my right hand on the mouse. It's a very efficient technique I wish everybody else would adopt. Until then, I just refactor all the code I see with overly long variable names like "count" (that's a particularly bad name because some of the characters require the right hand to type). I sleep easily at night, comfortable in the knowledge that all my refactoring has made the world a better place. :-\

    Somebody in an online forum wrote:

    INTJs never really joke. They make a point. The joke is just a gift wrapper.

    R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #61

    Saving the right hand for better uses?

    1 Reply Last reply
    0
    • Sander RosselS Sander Rossel

      Where they flops too? :laugh:

      It's an OO world.

      public class Naerling : Lazy<Person>{}

      R Offline
      R Offline
      Rob Grainger
      wrote on last edited by
      #62

      Naerling wrote:

      Where they flops too?

      Wow, he's going for the record in grammatical errors in 4 words ;-)

      Sander RosselS 1 Reply Last reply
      0
      • R Rob Grainger

        Naerling wrote:

        Where they flops too?

        Wow, he's going for the record in grammatical errors in 4 words ;-)

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #63

        Were* And that's the only one I can find... But let's see how well your Dutch grammar is :) Als je durft ;p (yeah, translate that!)

        It's an OO world.

        public class Naerling : Lazy<Person>{}

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          _beauw_ wrote:

          The declaration at the end of this snippet implies that the name max_subscript is actually an inaccurate description.

          I would agree, but that isn't a fault of the naming convention. Rather, it is a fault of the coder: max_subscript is wrong, and doesn't describe what the constant is used for: max_elements_count would have been better (or max_whatevertheheckthearrayholds_count even better still) For me, the problem is I grew up with Fortran, where a line of code was 80 characters, and variables were a max of six characters. Generally names were impenetrable, short and unrelated to the use. So, when I can I use "proper" names for things, because it means I can read the code in six months time and stand a vague chance of working out how it works. :laugh:

          Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

          J Offline
          J Offline
          jsc42
          wrote on last edited by
          #64

          When I learnt Algol60 (no limit on variable names) after several years of writing FORTRAN IV / 66 (max 6 chars in variable names), our lecturer said we had to use long, meaningful identifiers and I failed to see what the advantage was. So, for an assessed piece of work, I used 80-char identifiers (as identifiers could not be broken across cards) causing even simple assignments to straddle multiple cards and to render the whole program totally unintelligible. [Using whole cards per identifier did make coding easy - I could just duplicate the cards rather than having to retype the identifier wherever it was used] I also submitted a legible version using short identifiers. The lecturer was not impressed.

          OriginalGriffO 1 Reply Last reply
          0
          • J jsc42

            When I learnt Algol60 (no limit on variable names) after several years of writing FORTRAN IV / 66 (max 6 chars in variable names), our lecturer said we had to use long, meaningful identifiers and I failed to see what the advantage was. So, for an assessed piece of work, I used 80-char identifiers (as identifiers could not be broken across cards) causing even simple assignments to straddle multiple cards and to render the whole program totally unintelligible. [Using whole cards per identifier did make coding easy - I could just duplicate the cards rather than having to retype the identifier wherever it was used] I also submitted a legible version using short identifiers. The lecturer was not impressed.

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #65

            :laugh: I can't imagine why not!

            Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              _beauw_ wrote:

              The declaration at the end of this snippet implies that the name max_subscript is actually an inaccurate description.

              I would agree, but that isn't a fault of the naming convention. Rather, it is a fault of the coder: max_subscript is wrong, and doesn't describe what the constant is used for: max_elements_count would have been better (or max_whatevertheheckthearrayholds_count even better still) For me, the problem is I grew up with Fortran, where a line of code was 80 characters, and variables were a max of six characters. Generally names were impenetrable, short and unrelated to the use. So, when I can I use "proper" names for things, because it means I can read the code in six months time and stand a vague chance of working out how it works. :laugh:

              Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

              B Offline
              B Offline
              Brady Kelly
              wrote on last edited by
              #66

              Reminds me of my SAP days, relatively recently, where table identifiers were normally four character acronyms, and field names six characters , both often based on the original German names. After a surprisingly short while I found these very easy to remember and use, considering we coded in a line editor without Intellisense.

              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