Commenting

  • Brandie Tarvin (9/26/2013)


    At risk of starting another rant, if you're already updating the stored procedure, variables are easy enough to rename.

    Already thought of that one Brandie - however I would still (according to the powers that be) need to put the comment about what the parameter is used for, even though the name is descriptive. So I would end up with:-

    DECLARE @EmployeeReferenceNumber VARCHAR(20) -- this is the employee reference number,

    @EmployeeDepartment INT -- this is the department number

    @ImportRunTime smalldatetime -- this is the Import run time

    Sadly I am not joking.

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Ah, I see. I saw naming with @Param1 and assumed Parameters.

  • Stuart Davies (9/26/2013)


    Brandie Tarvin (9/26/2013)


    At risk of starting another rant, if you're already updating the stored procedure, variables are easy enough to rename.

    Already thought of that one Brandie - however I would still (according to the powers that be) need to put the comment about what the parameter is used for, even though the name is descriptive.

    .... I see your need to rant.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • +1 to the need to rant on this. But my need comes from a lack of guidelines. Invariably I am drawn into a heated discussion over my need for at least basic comments (and versioning but please don't get me started on that one) verses no comments whatsoever. Most of the time I am simply looking at the script file's metadata to find out which is newer. :crying:

  • Maybe you could get the powers that be to have a look at the article I linked to? If I remember correctly, the thrust of the argument was that if you code well then the code is the comments. The more comments you have, the more likely you are to end up in a situation where, over time, the comments don't "agree" with the code. And a wrong comment is worse than no comment. So you could argue that not only are trivial comments unnecessary, they can also be dangerous.

    John

  • John Mitchell-245523 (9/26/2013)


    Maybe you could get the powers that be to have a look at the article I linked to? If I remember correctly, the thrust of the argument was that if you code well then the code is the comments. The more comments you have, the more likely you are to end up in a situation where, over time, the comments don't "agree" with the code. And a wrong comment is worse than no comment. So you could argue that not only are trivial comments unnecessary, they can also be dangerous.

    John

    Tried that approach already John.

    The powers that be are non-technical and are totally without any coding experience. But most importantly - they are right :hehe:

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • That's rough. What are non-technical people doing even looking at code, never mind imposing standards for it?

    John

  • Reading between the lines of what is going on in my company, I may well be writing the training manual for a support company to take over my job. We have recently been taken over and the new owners have a habit of outsourcing support.

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

Viewing 8 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic. Login to reply