Professional Web Applications Themes

Why are the pros nitpicky about the capitalizing of SQL keywords? - ASP Database

I noticed on many posts by people in-the-know that the SQL keywords are capitalized, and people seem to try to use the correct case for vbscript even though it doesnt seem to be required (at least using IIS and Access/SQL server). What is the advantage to doing these two things? I find it easier to write both SQL and vbscript if I don't bother with the capitalizing of the keywords but since I'm by no means a pro I certainly am open to the argument for being nitpicky with the caps... so why do it?...

  1. #1

    Default Why are the pros nitpicky about the capitalizing of SQL keywords?

    I noticed on many posts by people in-the-know that the SQL keywords
    are capitalized, and people seem to try to use the correct case for
    vbscript even though it doesnt seem to be required (at least using IIS
    and Access/SQL server). What is the advantage to doing these two
    things? I find it easier to write both SQL and vbscript if I don't
    bother with the capitalizing of the keywords but since I'm by no means
    a pro I certainly am open to the argument for being nitpicky with the
    caps... so why do it?
    Mike Guest

  2. #2

    Default Re: Why are the pros nitpicky about the capitalizing of SQL keywords?

    It's simply a common coding convention, and it's there for a number of
    subjective reasons, the main one of which is that it makes the code easier
    to read. Same as indenting your code neatly - if someone else has to go
    through it at some point, it will make an enormous difference to have the
    code in a commonly accepted style. Personally I'd find your all-lower-case
    code annoying, because of the style conventions I use.

    Besides, it looks better.


    --
    Jason Brown
    Microsoft GTSC, IIS

    This posting is provided AS IS with no warranties, and confers no rights.


    "Mike" <com> wrote in message
    news:google.com... 


    Jason Guest

  3. #3

    Default Re: Why are the pros nitpicky about the capitalizing of SQL keywords?

    On 9 Sep 2004 20:25:18 -0700, com (Mike) wrote:
     

    Readability and convention.

     

    So when the next guy has to edit your code he doesn't swear at you.
    :)

    Obviously, if you're writing code that will never be maintained and no
    one will ever look at again, you can do what you want. Like
    commenting, conventions for formatting make life easier down the road
    in exchange for a little more work now (though some IDE's will
    capitalize and color code for you...).

    I've frequently been saved by decent comments I've put in code several
    years, or even months or weeks, old. Using common sense variable
    names, column and table names and the like helps too. I'm cursed with
    having to deal with data from an ancient app with table names like:

    ACRECNY (Accounts Receivable for the NY Office)

    And column names like:

    ACID (Account ID, but it's the Account Number on all forms and
    reports)

    Or worse, importing data which shows as:

    COL1, COL2, ZIP, COL5, RNAME (RNAME is the State. Some idiot thought
    "Region Name" was a decent substitute for a State column in case the
    data was entered where states weren't useful)

    Life is just easier if you follow conventions. :)

    Jeff
    Jeff Guest

  4. #4

    Default Re: Why are the pros nitpicky about the capitalizing of SQL keywords?

    "Mike" <com> wrote in message
    news:google.com... 

    mainlyitistomakethecodemorelegiblewhichcanbeuseful whendebuggingalsowhilecase
    maynotmatterinvbscriptitdoesmatterinjscriptbutsolo ngasyouareconsistentwithyo
    urnamingandcodingconventionsyouarefreetousewhateve rmethodologyyoulike


    Chris Guest

Similar Threads

  1. <cfscript> Auto Capitalizing Question
    By sams@centric.net in forum Macromedia ColdFusion
    Replies: 0
    Last Post: June 29th, 05:08 PM
  2. Camera PROs please help!!!
    By ITiN in forum Macromedia Director 3D
    Replies: 11
    Last Post: June 2nd, 01:27 PM
  3. Need Help From One Of The Pros - Urgent!
    By genesisfloorcare webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: October 11th, 11:33 PM
  4. What are the pros and cons for magic_quotes_gpc
    By williamc in forum PHP Development
    Replies: 3
    Last Post: September 16th, 02:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139