T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd...

8
T-SQL... Interactive Coding Standards

Transcript of T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd...

Page 1: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

T-SQL...Interactive Coding Standards

Page 2: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

Session Overview

• What are coding standards?• Why do we need them?• Quick list of standards• The interactive bit… show us your brains!

Page 3: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

What are coding standards?

A set of rules that tells developers in a team how to write their code, instead of each developer coding in

their own preferred style.A set of rules that tells developers in a team how to write their code, instead of each developer coding in their own preferred style.

Page 4: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

Why do we need coding standards?

A set of rules that tells developers in a team how to write their code, instead of each developer coding in their own preferred style.

Page 5: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

A few standards to whet your appetite

• CAPITALISE keywords• Indent your code• Comments, comments & more comments• Do not call functions repeatedly• No anonymous inserts• Don’t use select *• Avoid using not equals operators• Don’t use hardcoded values• Catch errors

Page 6: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

Ideas time....

Page 7: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.

Resources

A set of coding standards will be made available to download from my blog.

• Blog: http://nzgirlgeek.blogspot.com• E-mail: [email protected]

Websites that have helped me in my search for coding standards nirvana…

• http://www.sqlserver.org.au/• http://www.cslacey.co.uk/TSQLCodingStandards.pdf• http://www.pinaldave.com/sql-download/SQLServerGuideLines.pdf• http://www.sql-server-performance.com/articles/dev/

sql_best_practices_p1.aspx• http://www.sqlserver.org.au/

Page 8: T-SQL... Interactive Coding Standards. Amanda Jackson Senior Developer with Fronde Systems Group Ltd 20 years in the IT Industry Loves refactoring code.