SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Advanced Member LauraScharp's Avatar
    Join Date
    Aug 2002
    Location
    Huntington Beach, Ca. USA
    Posts
    725
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    I am a code dinosaur!

    I have decided that I'm a dinosaur and a product of my jurassic COBOL past, and I just have to ask this... What's up with the kids these days and their variable naming convention??

    Is it just me? Is it because I'm old and need those helpful reminder of just what the variable is supposed to do? Am I not changing with the times??

    When I see variable declarations like this:

    int i, j, k;
    int value = 0;
    char *temp,myValue;

    I want to cry. What happened to names like LoopCounter, TempCustName, and RandomChoice?? I know that there are shortcuts that become "standard conventions" over time. I even admit to having used "rc" for ReturnCode once or twice (but I didn't inhale, so does it count?).

    The younger folks that I work with seem to take this for granted and don't care. When I ask "What about a meaningful name?", I get this pitiful look that says "Did you take your geratol this morning?". The answer always seems to be "Why type the extra characters, I know what it does.".

    Yes, this is a bit of a rant, but I really am curious whether I'm the only one that has a problem with this? [img]images/icons/confused.gif[/img]

    As for indentation and comments... I'll leave that for another day and another rant!! [img]images/icons/cool.gif[/img]
    Laura Scharp
    SoCalGal - Defender of end user response times!

  2. #2
    Moderator
    Join Date
    Mar 2004
    Location
    West Coast of the East Coast!
    Posts
    7,756
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    It's a problem with the "me" mentality. Who cares anymore if someone else can read it. I wrote, I know what it does, that's all that matters. If I leave, nobody can maintain it so it has to be rewritten. And the leaders let them get away with it.
    Personal Comment

    Success is the ability to go from one failure to another with no loss of enthusiasm.
    ~ Winston Churchill ~


    ...Rich Wagner

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    I too am a dinosaur. In the days when I did coding it was not only considered poor coding to use names that had no meaning but was usually against coding standards.

    It another sign of the times that you use a single letter instead of a meaningful name - drive me crazy.

    What I also find fascinating is that when I do some very rare coding nowadays I still use meaningful names and the "kids" think I am crazy.

    Using short names such as RC for return code I think is acceptable - especially if you are consistent and don't use for anything else.

    Laura - have you also seen tis post started by Peter today - I think different but the same.


    http://www.qaforums.com/ultimatebb.p...;f=33;t=001895
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  4. #4
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    Laura, I'm with you on this. You are not however , a dinosaur! A dinosaur like Rich would know that "way back when" they coded with buttons and toggle switches that constant and variable names were limited. Rich would know that in BASIC, one could use only two letter names. Rich would also know that in assembler on machines with precious amounts of memory, long names could be memory-robbing creatures depending upon the assembler features.

    I prefer self-documenting code in that respect - meaningful names.. I do confess to using int i, j, and k sometimes.

  5. #5
    Advanced Member LauraScharp's Avatar
    Join Date
    Aug 2002
    Location
    Huntington Beach, Ca. USA
    Posts
    725
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    Lynne: I did see Peter's post - I agree with you!! Also, with regard to RC and other acronyms - I'm good with them if they are published as standards and, as you say, used consistently.

    Jim: I think they should have to debug it after being paged at 3:00am!

    All: Coding standards!!! YES! I was the Standards Police for years!
    Laura Scharp
    SoCalGal - Defender of end user response times!

  6. #6
    Moderator
    Join Date
    Mar 2000
    Location
    Orange County, CA
    Posts
    3,187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    "I am Sparticus-ourous!"

    Anyone that joins my group is required to have read, or will read, the book "Code Complete" by Steve McConnell and be required to follow coding standards. I get the whole sob story of how it slows them done, they can understand what is going on without any of "that", etc.

    As Peter said - I make it just the same as turing up to work.

    I am starting to push it upstream for me as well to the development group in that each drop of the AUT we receive, we lose over 20 hours in having to go back and rework our GUI maps in WinRunner due to development having the attitude that not only you don't have to follow any standards to code, if you go back in and maintain someone else's code it is perfectly acceptable to change all the object names to ones that make sense to them individually. Enforcing a naming convention at the least would stop that.
    Insanity: doing the same thing over and over again and expecting different results

  7. #7
    Moderator
    Join Date
    Sep 2001
    Location
    Boston, MA
    Posts
    4,348
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    I don't think it is an age issue at all. I use meaningful names for vars unless its something trivial that goes out of scope in a few lines.

    But it is interesting to notice how the various communities based around programming languages treat this.
    for example, in python; most people use longer meaningful names, while in perl; the common practice is to be very terse.

    so i guess it all depends.. just not sure i see the correalation to age. for example, i have my K&R (Programming in C) book, which is almost 30 years old, and _all_ the examples use insanely terse and meaningless variable names.. probably due to space constraints or whatever..

    -Corey
    Corey Goldberg
    Homepage: goldb.org
    Twitter: twitter.com/cgoldberg
    Google+: gplus.to/cgoldberg

  8. #8
    Moderator
    Join Date
    Mar 2002
    Location
    Tampa Bay
    Posts
    7,673
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    I'm with Lynne. I've worked with people who don't LIKE coding standards, but if the manager can be persuaded of their necessity, then the developer (sorry, programmer) is REQUIRED to adhere to them, just the same as turning up to work each day.

  9. #9
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    And coding standards are only worth anything if they are enforced - I learned after having to do extensive code rewrites very quickly.
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  10. #10
    SQA Knight
    Join Date
    Jan 2002
    Location
    Highlands Ranch, CO, USA
    Posts
    2,860
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: I am a code dinosaur!

    Well I came around during the Cretaceous period and some of this was already going on and being taught in college by the C profs. It was because of the notation that came out of the K&R C book (the C Bible so to speak).

    But I always had Profs. who said if they can't read it and make sense of what your program does then it gets an F. By saying this they were saying use meaningful names. They also emphasized the use of Hungarian Notation (datatype + varname); i.e., a variable named either strLastName or sLName was a string variable for the persons last name.

    This attitude of keeping the code cryptic and thus I am the only one who can maintain it (lack of documentation or coding standards means job security) has been around for a long long time. The first app. I worked on 18 years ago had very non-descriptive variable names and function names too. The guy who wrote it had been there for about 10 years. When I started to re-write things and implement a coding standard he got all bent out of shape.

    Probably a good thing to do to the young pups to teach a lesson to them is to write your own cryptic program and ask them to go debug it and make an enhancement. To really stick it to thema tell them they have 30 minutes to do it in. Might wake them up to how much of a hassle it is to maintain someone elses code and how just taking a couple of extra minutes to code properly can save them a lot of time later, and lot of pain inflicted by others because they are too wet behind the ears.

    Jim
    Jim
    -------------------------------------------
    For all the general stuff to know about QA/Test go here http://www.softwareqatest.com/

 

 
Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:09 PM.

Copyright BetaSoft Inc.