22
1 www.teratech.com 1/20 How to become a Guru Coder Michael Smith, TeraTech, Inc. [email protected] http://www.teratech.com 301-424-3903 x110 Copyright TeraTech 2003

1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc. 301-424-3903 x110 Copyright

Embed Size (px)

DESCRIPTION

3/20 3 Speaker Information Who am I? Michael Smith President of TeraTech, Inc Rockville MD ttWebReportServer, CFXGraphicserver MDCFUG, CFUN-03, Fusebox Conf Articles in CFDJ, Fusion Authority Winner CFDJ award Best Consulting

Citation preview

Page 1: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

1 www.teratech.com 1/20

How to become a Guru Coder

Michael Smith, TeraTech, [email protected]://www.teratech.com

301-424-3903 x110

Copyright TeraTech 2003

Page 2: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

2 www.teratech.com 2/20

Overview

What makes a smart coder? Brains or communications skills?

Does commenting matter to real programmers?

My Code is my Comment. What tips can you learn to become

a true programming guru?

Page 3: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

3 www.teratech.com 3/20

Speaker InformationWho am I? Michael Smith President of TeraTech, Inc Rockville

MD http://www.teratech.com/ ttWebReportServer, CFXGraphicserver

MDCFUG, CFUN-03, Fusebox Conf Articles in CFDJ, Fusion Authority Winner CFDJ award Best Consulting

Page 4: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

4 www.teratech.com 4/20

Programming Experience

22 years programming 7 years with ColdFusion 4 years with Fusebox Also work with SQL, JavaScript, HTML,

VB, Oracle, Access Teach one-on-one and custom classes On site and custom development Fusebox and Process Methodology

Page 5: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

5 www.teratech.com 5/20

Does character matter?

Studies show that 85% of a programmers success is due to human factors rather than pure technical skills.

Page 6: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

6 www.teratech.com 6/20

Humble

My brain can’t take in the whole program at once

Use coding crutches Egoless programming Code reviews Ask for help if stuck > 15 minutes Murphy’s law

Page 7: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

7 www.teratech.com 7/20

Curious

How can I improve? Constantly learning Experiment Problem solving and planning skills Case studies - Programming Pearls RTFM and magazines, websites

Page 8: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

8 www.teratech.com 8/20

Honesty

I don’t know I was wrong Fix bugs rather than covering up Understand code before you run it True status reports – including “bad” news Stand by accurate estimates

Page 9: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

9 www.teratech.com 9/20

Communication skills

WORM code, not WMRO code Write code for humans to read, not for

computer to run Clear emails

Page 10: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

10 www.teratech.com 10/20

Coding conventions

Save having to think about that part of code

Variable naming Indenting Case Avoid poor constructshttp://www.cfug-md.org/articles.cfm#code

Page 11: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

11 www.teratech.com 11/20

Coding conventions

Save having to think about that part of code

Variable naming Indenting

Clarifies meaning Case Avoid poor constructshttp://www.cfug-md.org/articles.cfm#code

Page 12: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

12 www.teratech.com 12/20

Lazy

Write smart code instead of repetition of code

Write or use a tool instead of repeating steps by hand

Macros in your code editor Use a pre-built tool instead of reinventing

the wheel

Page 13: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

13 www.teratech.com 13/20

Prioritize

Plan before you Code before you Debug

Think before you Document before you Code before you Run

Page 14: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

14 www.teratech.com 14/20

Not as important

Persistence – pigheaded Experience – is 10 years of experience or

10 x 1 year’s experience? Jolt programming – all nighters

Page 15: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

15 www.teratech.com 15/20

Good habits

Code and understand before running End loops before coding the “filling” Don’t go long with code “broken” Plan before coding Figure out how you will test code before coding Take a break; sleep on problems “Telephone” review of problem to a buddy

Page 16: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

16 www.teratech.com 16/20

Reduce complexity

Avoid global data Short routines, few parameters Limited nesting Data driven vs complex logic Named constants – rather than magic

numbers

Page 17: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

17 www.teratech.com 17/20

Modularize to simplify

Hide details – black box De-Couple routines Cohesion – do one thing well

Page 18: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

18 www.teratech.com 18/20

Code for humans to read

WORM code is easier to: Understand Review Less errors Faster to debug Easier to modify Faster to develop overall

Sets a good habit

Page 19: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

19 www.teratech.com 19/20

Defensive coding

If it can go wrong it will go wrong Check parameters exist and data type Throw errors if assumptions not met Always code the ELSE part of IF

Page 20: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

20 www.teratech.com 20/20

Debugging

If you can prove your algorithm must work It is less effort to Debug.

Test Parameters at and beyond their limits. (Some tests must show a failure)

Keep it Simple, Stupid (Kiss) If you can’t remember what it does, how can it

be maintained?

Page 21: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

21 www.teratech.com 21/20

Resouces

“Code Complete” – Steve McConnell “The Mythical Man-Month” by Frederick

Brooks “Peopleware” by Tom Demarco, et al

Page 22: 1/20 1 How to become a Guru Coder Michael Smith, TeraTech, Inc.  301-424-3903 x110 Copyright

22 www.teratech.com 22/20

Questions?

Email me at [email protected]