SlideShare a Scribd company logo
1 of 25
How to become a Guru Coder

  Michael Smith
  TeraTech, Inc.
   michael@teratech.com
   http://www.teratech.com
   301-424-3903 x110
  Copyright TeraTech

                                          1/23
                       www.teratech.com
What is a Guru Coder?




                         2/23
      www.teratech.com
Overview

• A guru coder…
  Writes great programs that users love to
   use
  Code is easy to maintain
  Works well in teams
  Has few bugs
  Is good at solving problems in a simple
   way
• Guru coder: born or learned?

                                 3/23
           www.teratech.com
Speaker Information
Who am I?
• Michael Smith
• President of TeraTech, Inc
• MDCFUG, CFUnited, Fusebox Conf
• Articles in CFDJ, Fusion Authority
• Winner CFDJ award Best Consulting



                               4/23
            www.teratech.com
Programming Experience

• 30+ years programming
• 15+ years with ColdFusion
• Also work with SQL, JavaScript,
  HTML, VB, Oracle, Access
• Teach one-on-one and custom
  classes
• custom development
• Fusebox and Process Methodology
                             5/23
          www.teratech.com
Does character matter?

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




                                   6/23
                www.teratech.com
What human factors does a Guru
        Coder Have?




                              7/23
           www.teratech.com
Guru Coder Character

•   Humble
•   Curious
•   Honest
•   Communication
•   Coding conventions
•   Lazy
•   Thinking and Planning
                               8/23
            www.teratech.com
Not as important

• Persistence – pigheaded
• Experience – is 10 years of experience
  or 10 x 1 year’s experience?
• Jolt programming – all nighters
  Code disappear can be good – chance to
   rewrite
  Tweaking forever for perfect code

                                    9/23
                www.teratech.com
Humble

• My brain can’t take in the whole program at
    once - use coding crutches
•   Egoless programming, Rewrite complex code
•   Code reviews
•   Ask for help if stuck > 15 minutes
•   Murphy’s law
•   Examples in comments
•   Reference Change Tracker issue# and Desc
•   Document algorithm used
                                     10/23
                  www.teratech.com
Reduce complexity

• Avoid global data
• Short routines, few parameters
• Limited nesting
• Data driven vs complex logic
• Named constants – rather than magic
  numbers
• Descriptive names – variable,
  database, files, short, no weird
  characters                       11/23
                www.teratech.com
Modularize to simplify

•   Hide details – black box
•   De-Couple routines
•   Cohesion – do one thing well
•   Test parameters as they come into
    each module



                                    12/23
                 www.teratech.com
Curious

• How can I improve?
• Constantly learning
• Experiment
• Problem solving and planning skills
• Case studies - Programming Pearls,
  alphablox.com, open source sourceforge.net
• RTFM and magazines, websites
• Likes challenging projects
• Google skills
                                    13/23
                 www.teratech.com
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
                                   14/23
                www.teratech.com
Communication skills

• WORM code, not WMRO code (spaghetti)
• Write code for humans to read, not for
    computer to run
•   Clear emails
•   Use the phone, F2F meetings
     correct understanding
     Get extra information
•   EQ. Listen to upsets, allow let off steam
•   Remember the user – actors, photo,
    useability testing
                                        15/23
                    www.teratech.com
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 for team
                                  16/23
               www.teratech.com
Coding conventions

•   Save having to think about that part of code
•   Variable and database naming
•      Indenting clarifies meaning
•   InCONsistent Case confuses
•   Avoid poor constructs
•   Bad spelling propagates
•   Scope variables, avoid public
     http://www.cfug-md.org/articles.cfm#code
                                       17/23
                    www.teratech.com
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 vs reinventing the wheel
•   Write less code – copy existing code,
    searchable library of code
•   Use a template/ existing document
•   Consistent look between programmers and
    projects
                                       18/23
                   www.teratech.com
Planning

Plan before you Code before you Debug

Think before you Document before you
 Code before you Run

Test as you go


                                    19/23
                 www.teratech.com
More 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
• Write algorithm on whiteboard – diagram
                                    20/23
                 www.teratech.com
Good Commenting

• Comment to relate distant open and
  close tags
• Comment – “see below” rather than
  break up code
• Don’t make code or comments go off
  the page horizontally - printable


                                  21/23
               www.teratech.com
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




                                    22/23
                 www.teratech.com
Debugging
• If you can prove your algorithm must work
   It is less effort than 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 and/or understand what it
     does, how can it be maintained?
• Use debug mode variable to get extra info,
  stop page execution, save to file, email to self
• Take a break, take different approach
•      Use multiple catches
                                         23/23
                   www.teratech.com
Resources

• “Code Complete”
  by Steve McConnell
• “The Mythical Man-Month”
  by Frederick Brooks
• “Peopleware”
  by Tom Demarco, et al


                        24/23
     www.teratech.com
Questions?

Ask now or
Email me at
michael@teratech.com




                           25/23
        www.teratech.com

More Related Content

Similar to How to be a Guru Coder

Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
What schools should be teaching IT students
What schools should be teaching IT studentsWhat schools should be teaching IT students
What schools should be teaching IT studentsAndy Lester
 
Clean code, Feb 2012
Clean code, Feb 2012Clean code, Feb 2012
Clean code, Feb 2012cobyst
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programmingJuggernaut Liu
 
You and your code.pdf
You and your code.pdfYou and your code.pdf
You and your code.pdfTony Khánh
 
CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45Bilal Ahmed
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentationBhavin Gandhi
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationBlue Elephant Consulting
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): RevistedMike Harris
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to itPetter Holmström
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesInductive Automation
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesInductive Automation
 
Multi View Constructed Right
Multi View Constructed RightMulti View Constructed Right
Multi View Constructed RightOpenBossa
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 
The View - 30 proven Lotuscript tips
The View - 30 proven Lotuscript tipsThe View - 30 proven Lotuscript tips
The View - 30 proven Lotuscript tipsBill Buchan
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software DevelopmentAhmet Bulut
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet
 

Similar to How to be a Guru Coder (20)

Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
What schools should be teaching IT students
What schools should be teaching IT studentsWhat schools should be teaching IT students
What schools should be teaching IT students
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Clean code, Feb 2012
Clean code, Feb 2012Clean code, Feb 2012
Clean code, Feb 2012
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programming
 
You and your code.pdf
You and your code.pdfYou and your code.pdf
You and your code.pdf
 
CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to it
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Multi View Constructed Right
Multi View Constructed RightMulti View Constructed Right
Multi View Constructed Right
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
The View - 30 proven Lotuscript tips
The View - 30 proven Lotuscript tipsThe View - 30 proven Lotuscript tips
The View - 30 proven Lotuscript tips
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with Puppet
 

How to be a Guru Coder

  • 1. How to become a Guru Coder Michael Smith TeraTech, Inc. michael@teratech.com http://www.teratech.com 301-424-3903 x110 Copyright TeraTech 1/23 www.teratech.com
  • 2. What is a Guru Coder? 2/23 www.teratech.com
  • 3. Overview • A guru coder… Writes great programs that users love to use Code is easy to maintain Works well in teams Has few bugs Is good at solving problems in a simple way • Guru coder: born or learned? 3/23 www.teratech.com
  • 4. Speaker Information Who am I? • Michael Smith • President of TeraTech, Inc • MDCFUG, CFUnited, Fusebox Conf • Articles in CFDJ, Fusion Authority • Winner CFDJ award Best Consulting 4/23 www.teratech.com
  • 5. Programming Experience • 30+ years programming • 15+ years with ColdFusion • Also work with SQL, JavaScript, HTML, VB, Oracle, Access • Teach one-on-one and custom classes • custom development • Fusebox and Process Methodology 5/23 www.teratech.com
  • 6. Does character matter? • Studies show that 85% of a programmers success is due to human factors rather than pure technical skills. 6/23 www.teratech.com
  • 7. What human factors does a Guru Coder Have? 7/23 www.teratech.com
  • 8. Guru Coder Character • Humble • Curious • Honest • Communication • Coding conventions • Lazy • Thinking and Planning 8/23 www.teratech.com
  • 9. Not as important • Persistence – pigheaded • Experience – is 10 years of experience or 10 x 1 year’s experience? • Jolt programming – all nighters Code disappear can be good – chance to rewrite Tweaking forever for perfect code 9/23 www.teratech.com
  • 10. Humble • My brain can’t take in the whole program at once - use coding crutches • Egoless programming, Rewrite complex code • Code reviews • Ask for help if stuck > 15 minutes • Murphy’s law • Examples in comments • Reference Change Tracker issue# and Desc • Document algorithm used 10/23 www.teratech.com
  • 11. Reduce complexity • Avoid global data • Short routines, few parameters • Limited nesting • Data driven vs complex logic • Named constants – rather than magic numbers • Descriptive names – variable, database, files, short, no weird characters 11/23 www.teratech.com
  • 12. Modularize to simplify • Hide details – black box • De-Couple routines • Cohesion – do one thing well • Test parameters as they come into each module 12/23 www.teratech.com
  • 13. Curious • How can I improve? • Constantly learning • Experiment • Problem solving and planning skills • Case studies - Programming Pearls, alphablox.com, open source sourceforge.net • RTFM and magazines, websites • Likes challenging projects • Google skills 13/23 www.teratech.com
  • 14. 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 14/23 www.teratech.com
  • 15. Communication skills • WORM code, not WMRO code (spaghetti) • Write code for humans to read, not for computer to run • Clear emails • Use the phone, F2F meetings correct understanding Get extra information • EQ. Listen to upsets, allow let off steam • Remember the user – actors, photo, useability testing 15/23 www.teratech.com
  • 16. 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 for team 16/23 www.teratech.com
  • 17. Coding conventions • Save having to think about that part of code • Variable and database naming • Indenting clarifies meaning • InCONsistent Case confuses • Avoid poor constructs • Bad spelling propagates • Scope variables, avoid public http://www.cfug-md.org/articles.cfm#code 17/23 www.teratech.com
  • 18. 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 vs reinventing the wheel • Write less code – copy existing code, searchable library of code • Use a template/ existing document • Consistent look between programmers and projects 18/23 www.teratech.com
  • 19. Planning Plan before you Code before you Debug Think before you Document before you Code before you Run Test as you go 19/23 www.teratech.com
  • 20. More 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 • Write algorithm on whiteboard – diagram 20/23 www.teratech.com
  • 21. Good Commenting • Comment to relate distant open and close tags • Comment – “see below” rather than break up code • Don’t make code or comments go off the page horizontally - printable 21/23 www.teratech.com
  • 22. 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 22/23 www.teratech.com
  • 23. Debugging • If you can prove your algorithm must work It is less effort than 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 and/or understand what it does, how can it be maintained? • Use debug mode variable to get extra info, stop page execution, save to file, email to self • Take a break, take different approach • Use multiple catches 23/23 www.teratech.com
  • 24. Resources • “Code Complete” by Steve McConnell • “The Mythical Man-Month” by Frederick Brooks • “Peopleware” by Tom Demarco, et al 24/23 www.teratech.com
  • 25. Questions? Ask now or Email me at michael@teratech.com 25/23 www.teratech.com

Editor's Notes

  1. What makes a guru 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?
  2. Where a number of parameters crop up together, consider using a Data type or record to reduce the number to one.