Results 1 to 9 of 9

Thread: Formatted procs

  1. #1
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Unanswered: Formatted procs

    Can somebody provide me an argument on how nicely formatted and indented procs perform better. I am currently formatting a 1000 line proc just to understand what it does ... Maybe your argument will help convince my development team to write neat procs
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

    Re: Formatted procs

    Originally posted by Enigma
    Can somebody provide me an argument on how nicely formatted and indented procs perform better. I am currently formatting a 1000 line proc just to understand what it does ... Maybe your argument will help convince my development team to write neat procs

    As far as my knowledge goes, indentation and formatting of the proc has nothing got to do with the performance. Its just that, u improve the readability of the code, and believe me it is very much required. I had stumbled upon a stored proc which was not working properly, it was about 1500 lines and the code was so badly written without any comments, that it took hours first to format it, then to understand the whole thing. Properly formatted code performs better in the long run, meaning after six months of coding if u have to debug the proc, it wouldn't be a mess.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Can somebody supply me with an argument as to why my kids should help keep the house clean? They claim that it provides just as much shelter with crap strewn all over the place, because it is the roof that counts. I say that when the place is cluttered it makes it harder to find things they have lost and it is more likely that things will get accidentally broken, but they aren't buying this. So I am currently cleaning up a 1000 sqr foot floor in order to make the area a more practical and inviting place to live.

    I think I will just tell my development team (oops, I mean kids) that if they don't keep the place clean they will not get their allowance.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Make the sentence for writing undocumented, poorly formatted code be a stint doing nothing but maintenance??? At least in the shops that I've worked in, that would make them consider suicide as a viable alternative!

    -PatP

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Oh, I like that one!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Buy a big bat.....

    I gotta find that thread where we had a war about this....

    don't forget change conmtrol in the comments up front...

    does anyone comment out old code and leave it if it's being altered?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    I don't even want to start this one...Naming conventions, coding standards, change control, release management, and the most dreaded one, - documentation...

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I've got a little Perl script that shrouds T-SQL. It removes all the extraneous whitespace and renames the variables, cursors, and temp tables @v1, @v2, @v3... The thing is a work of pure evil, but you could always ask them to debug a 1500 line stored procedure that you'd passed through the shrouder.

    -PatP

  9. #9
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Ha ha .. i would love to have that script
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

Posting Permissions

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