SlideShare a Scribd company logo
An Overview of
.NET Best Practices


      Stephen D. Ritchie

      12 Nov 2012
Live Tweet, Tonight’s Slides and Examples




• Twitter:      @RuthlesssHelp
                @Apress

• Slideshare: http://www.slideshare.net/ruthlesshelp

• Github:       http://github.com/ruthlesshelp




                             Excella Consulting
Overall – Challenges




 Continuous Integration
            No CI Server
            No Code Analysis
            Not Triggered by SCM
                       Excella Consulting   -3-
Overall – Challenges




 Code Reviews
            Not Conducted
            Issues Not Tracked
            Issues Dropped
                       Excella Consulting   -4-
Current – Challenges




 Automated Builds and
 Deployments
            Manual Deployment
            No Automated Testing
            No Code Analysis
                       Excella Consulting   -5-
Current – Challenges




 Automated Unit Testing
            Low Code Coverage
            No Mocking Framework
            Failing or Ignored Tests
                       Excella Consulting   -6-
Opportunities




 Best Practices Matrix
     Complexity                      Value
     Risk
     Cost

                Excella Consulting           -7-
Minimal, Essential




 Source Control




                     Excella Consulting   -8-
TFS



Excella Consulting         -9-
SVN



Excella Consulting         - 10 -
Mercurial



Excella Consulting   - 11 -
Git



Excella Consulting         - 12 -
Level Metaphor




                 Excella Consulting   - 13 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 14 -
Level 1 – Goals




 Build Script




                  Excella Consulting   - 15 -
Level 1 – Starting Point




 Manual Builds




                           Excella Consulting   - 16 -
MSBuild



Excella Consulting   - 17 -
NAnt



Excella Consulting          - 18 -
PowerShell



Excella Consulting   - 19 -
Extensions



Excella Consulting   - 20 -
Level 1 – Example




 Example Build
 Script



                    Excella Consulting   - 21 -
Level 1 – Result




Build Script
One Script,
Builds Everything
“Run the Runner”
                   Excella Consulting   - 22 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 23 -
Level 2 – Goals




 Continuous
 Integration



                  Excella Consulting   - 24 -
Level 2 – Starting Point




 No CI Server




                           Excella Consulting   - 25 -
Level 2 – To Do




 Install CI Server
       Triggered by Code Push
       “Run the Runner”

                  Excella Consulting   - 26 -
TFS



Excella Consulting         - 27 -
CC.NET



Excella Consulting   - 28 -
Jenkins



Excella Consulting     - 29 -
TeamCity



Excella Consulting   - 30 -
Level 2 – Example




 CI Server
 Example



                    Excella Consulting   - 31 -
Level 2 – Result




 Observe & Report




                   Excella Consulting   - 32 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 33 -
Level 3 – Goals




 Code Analysis




                  Excella Consulting   - 34 -
Level 3 – Starting Point




 No Code Analysis




                           Excella Consulting   - 35 -
Level 3 – To Do




 Analysis Tool
       Static Code Analysis
       Run with CI Server

                  Excella Consulting   - 36 -
FxCop



Excella Consulting           - 37 -
Gendarme



Excella Consulting   - 38 -
StyleCop



Excella Consulting   - 39 -
NDepend



Excella Consulting   - 40 -
Simian



Excella Consulting       - 41 -
Sonar



Excella Consulting           - 42 -
Level 3 – Example




 Analysis Tool
 Example

                       FxCop 10

                    Excella Consulting   - 43 -
Level 3 – Result




 Analyze,
 Improve,
 Monitor


                   Excella Consulting   - 44 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 45 -
Level 4 – Goals




 Automate Testing




                  Excella Consulting   - 46 -
Level 4 – Starting Point




 No Tests




                           Excella Consulting   - 47 -
Level 4 – To Do




 Testing Framework
       Run with Runner
       Run with CI Server

                  Excella Consulting   - 48 -
MSTest



Excella Consulting    - 49 -
MBUnit



Excella Consulting     - 50 -
xUnit.net



Excella Consulting   - 51 -
NUnit



Excella Consulting           - 52 -
Level 4 – To Do




 Mocking Framework
       Isolation
       Interaction Testing

                   Excella Consulting   - 53 -
Rhino Mocks



  Excella Consulting   - 54 -
Moq



Excella Consulting         - 55 -
Level 4 – Example




 Automate Testing
 Example



                    Excella Consulting   - 56 -
Level 4 – Results




 Passing
 Tests



                    Excella Consulting   - 57 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 58 -
Level 5 – Goals




 Code Coverage
            + More Tests
            + More Code Analysis


                  Excella Consulting   - 59 -
Level 5 – To Do




 Coverage Tool
       Run in Visual Studio
       Run with CI Server

                  Excella Consulting   - 60 -
NCover



Excella Consulting    - 61 -
OpenCover



Excella Consulting   - 62 -
dotCover



Excella Consulting   - 63 -
Level 5 – Example




 Code Coverage
 Example



                    Excella Consulting   - 64 -
Level 5 – Results




 100% Class Coverage

            + More Code Analysis



                    Excella Consulting   - 65 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 66 -
Level 6 – Goals




 Code Review
            + More Tests
            + More Code Analysis


                  Excella Consulting   - 67 -
Level 6 – To Do




 Pick Approach
       Share Opinions
       Track Issues

                  Excella Consulting   - 68 -
Pairing



Excella Consulting        - 69 -
Group



Excella Consulting           - 70 -
Peer



Excella Consulting          - 71 -
Level 6 – Example




 Code Review
 Example

                                         Peer

                    Excella Consulting          - 72 -
Level 6 – Results




 Reviewed Code
            100% Method Coverage
            + More Code Analysis


                    Excella Consulting   - 73 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 74 -
Level 7 – Goals




 Packaging
            + More Tests
            + More Coverage
            + More Code Analysis

                  Excella Consulting   - 75 -
MSI



Excella Consulting         - 76 -
Web Deploy



 Excella Consulting   - 77 -
Octopus



Excella Consulting   - 78 -
Zip Archive



 Excella Consulting   - 79 -
Level 7 – Example




 Packaging Example

                                         Zip


                    Excella Consulting         - 80 -
Level 7 – Results




 Packaged Deliverable
            Code Reviews
            40% Line Coverage
            + More Code Analysis
                    Excella Consulting   - 81 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 82 -
Level 8 – Goals




 Automated
 Deployments
            + More Tests
            + More Line Coverage
            + More Code Analysis
                  Excella Consulting   - 83 -
Script



Excella Consulting            - 84 -
Level 8 – Example




 Automated
 Deployment Example

                       MSBuild

                    Excella Consulting   - 85 -
Level 8 – Results




 Automated
 Deployments
            + Code Reviews
            + 60% Line Coverage
            + More Code Analysis
                    Excella Consulting   - 86 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 87 -
Level 9 – Goals




 Full Code Coverage

            + More Tests
            + More Coverage
            + More Code Analysis
                  Excella Consulting   - 88 -
Testing



Excella Consulting     - 89 -
Level 9 – Example




 Full Code Coverage
 Example



                    Excella Consulting   - 90 -
Level 9 – Results




 > 80% Line Coverage
            + Code Reviews
            Automated Deployments
            + More Code Analysis
                    Excella Consulting   - 91 -
Go to Green
  1         2               3

  4         5               6

  7         8               9
       Excella Consulting       - 92 -
Overall – Results




 Continuous Integration
            CI Server
            Code Analysis
            Triggered by SCM
                    Excella Consulting   - 93 -
Overall – Results




 Code Reviews
            Conducted Regularly
            Issues Tracked
            Issues Resolved
                    Excella Consulting   - 94 -
Overall – Results




 Automated Builds and
 Deployments
            Automated Deployment
            Automated Testing
            Code Analysis
                    Excella Consulting   - 95 -
Overall – Results




 Automated Unit Testing
            Code Coverage: > 80%
            Mocking Framework
            Passing Tests: Priority
                    Excella Consulting   - 96 -
Follow On – Goals




 Retrospectives
Presentations


                    Excella Consulting   - 97 -
Further Discussion




            Any questions?

           Any comments?


                     Excella Consulting
Shameless Self Promotion Time!




                            40% off eBook at
                            apress.com

                            Use promo code:
                            PR0N3T

                            Offer ends 15-Dec-2012




                            Excella Consulting
Contact Me




• Twitter:    @ruthlesshelp

• Email:      stephen.ritchie@excella.com

• Blog:       http://ruthlesslyhelpful.net

• LinkedIn:   http://www.linkedin.com/in/sritchie




                           Excella Consulting
Slides and Examples




• Slideshare: http://www.slideshare.net/ruthlesshelp

• Github:      http://github.com/ruthlesshelp




                           Excella Consulting

More Related Content

Similar to An Overview of .NET Best Practices

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
Stephen Ritchie
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
Stephen Ritchie
 
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingOvercoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Stephen Ritchie
 
Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best Practices
Stephen Ritchie
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
jaredrrichardson
 
20100309 05 - Air France : des audits manuels aux audits automatisés
20100309 05 - Air France : des audits manuels aux audits automatisés20100309 05 - Air France : des audits manuels aux audits automatisés
20100309 05 - Air France : des audits manuels aux audits automatisés
LeClubQualiteLogicielle
 
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
gdgsurrey
 
Agile engineering environment 50 minutes or less
Agile engineering environment   50 minutes or lessAgile engineering environment   50 minutes or less
Agile engineering environment 50 minutes or less
Vernon Stinebaker
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
India Scrum Enthusiasts Community
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
India Scrum Enthusiasts Community
 
10 Safe Essential Elements to Achieve the Benefits of SAFe
10 Safe Essential Elements to Achieve the Benefits of SAFe10 Safe Essential Elements to Achieve the Benefits of SAFe
10 Safe Essential Elements to Achieve the Benefits of SAFe
Cprime
 
Apache Spark Model Deployment
Apache Spark Model Deployment Apache Spark Model Deployment
Apache Spark Model Deployment
Databricks
 
DSDM® AgilePF® - Agile Project Framework - Foundation
DSDM® AgilePF® - Agile Project Framework - FoundationDSDM® AgilePF® - Agile Project Framework - Foundation
DSDM® AgilePF® - Agile Project Framework - Foundation
Mirosław Dąbrowski C-level IT manager, CEO, Agile, ICF Coach, Speaker
 
Yaroslav Ravlinko "Build your own Machine Learning Platform or how to develo...
Yaroslav Ravlinko  "Build your own Machine Learning Platform or how to develo...Yaroslav Ravlinko  "Build your own Machine Learning Platform or how to develo...
Yaroslav Ravlinko "Build your own Machine Learning Platform or how to develo...
Lviv Startup Club
 
Grading Rubric For C++
Grading Rubric For C++Grading Rubric For C++
Grading Rubric For C++
sritikumar
 
How to Be More Productive With AI Development Assistance
How to Be More Productive With AI Development AssistanceHow to Be More Productive With AI Development Assistance
How to Be More Productive With AI Development Assistance
OutSystems
 
XSCALE: Beyond BDD
XSCALE: Beyond BDDXSCALE: Beyond BDD
XSCALE: Beyond BDD
Peter Merel
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
Elmar Selbach
 
Barga Data Science lecture 4
Barga Data Science lecture 4Barga Data Science lecture 4
Barga Data Science lecture 4
Roger Barga
 
Test team dynamics, Антон Мужайло
Test team dynamics, Антон МужайлоTest team dynamics, Антон Мужайло
Test team dynamics, Антон Мужайло
Sigma Software
 

Similar to An Overview of .NET Best Practices (20)

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
 
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingOvercoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
 
Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best Practices
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
20100309 05 - Air France : des audits manuels aux audits automatisés
20100309 05 - Air France : des audits manuels aux audits automatisés20100309 05 - Air France : des audits manuels aux audits automatisés
20100309 05 - Air France : des audits manuels aux audits automatisés
 
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
 
Agile engineering environment 50 minutes or less
Agile engineering environment   50 minutes or lessAgile engineering environment   50 minutes or less
Agile engineering environment 50 minutes or less
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
 
10 Safe Essential Elements to Achieve the Benefits of SAFe
10 Safe Essential Elements to Achieve the Benefits of SAFe10 Safe Essential Elements to Achieve the Benefits of SAFe
10 Safe Essential Elements to Achieve the Benefits of SAFe
 
Apache Spark Model Deployment
Apache Spark Model Deployment Apache Spark Model Deployment
Apache Spark Model Deployment
 
DSDM® AgilePF® - Agile Project Framework - Foundation
DSDM® AgilePF® - Agile Project Framework - FoundationDSDM® AgilePF® - Agile Project Framework - Foundation
DSDM® AgilePF® - Agile Project Framework - Foundation
 
Yaroslav Ravlinko "Build your own Machine Learning Platform or how to develo...
Yaroslav Ravlinko  "Build your own Machine Learning Platform or how to develo...Yaroslav Ravlinko  "Build your own Machine Learning Platform or how to develo...
Yaroslav Ravlinko "Build your own Machine Learning Platform or how to develo...
 
Grading Rubric For C++
Grading Rubric For C++Grading Rubric For C++
Grading Rubric For C++
 
How to Be More Productive With AI Development Assistance
How to Be More Productive With AI Development AssistanceHow to Be More Productive With AI Development Assistance
How to Be More Productive With AI Development Assistance
 
XSCALE: Beyond BDD
XSCALE: Beyond BDDXSCALE: Beyond BDD
XSCALE: Beyond BDD
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
 
Barga Data Science lecture 4
Barga Data Science lecture 4Barga Data Science lecture 4
Barga Data Science lecture 4
 
Test team dynamics, Антон Мужайло
Test team dynamics, Антон МужайлоTest team dynamics, Антон Мужайло
Test team dynamics, Антон Мужайло
 

More from Stephen Ritchie

Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
Stephen Ritchie
 
Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923
Stephen Ritchie
 
Test Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftTest Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master Craft
Stephen Ritchie
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
Stephen Ritchie
 
Continuous Integration DCAEC12
Continuous Integration DCAEC12Continuous Integration DCAEC12
Continuous Integration DCAEC12
Stephen Ritchie
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
Stephen Ritchie
 
Advanced Code Analysis with .NET
Advanced Code Analysis with .NETAdvanced Code Analysis with .NET
Advanced Code Analysis with .NET
Stephen Ritchie
 
Advanced Code Analysis In .NET
Advanced Code Analysis In .NETAdvanced Code Analysis In .NET
Advanced Code Analysis In .NET
Stephen Ritchie
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
Stephen Ritchie
 

More from Stephen Ritchie (9)

Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923
 
Test Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftTest Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master Craft
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Continuous Integration DCAEC12
Continuous Integration DCAEC12Continuous Integration DCAEC12
Continuous Integration DCAEC12
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
 
Advanced Code Analysis with .NET
Advanced Code Analysis with .NETAdvanced Code Analysis with .NET
Advanced Code Analysis with .NET
 
Advanced Code Analysis In .NET
Advanced Code Analysis In .NETAdvanced Code Analysis In .NET
Advanced Code Analysis In .NET
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
 

Recently uploaded

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 

Recently uploaded (20)

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 

An Overview of .NET Best Practices

Editor's Notes

  1. Week 1Build ScriptWrite a build script using a common build scripting tool.Rebuild AllThe entire project solutionSoup-to-nuts rebuildOne command file calls one script
  2. Manual BuildsVisual Studio is NOT a Build ToolDanger ZoneInconsistencyHero Worship
  3. Helpful ChangeWrite a Build ScriptConventional Scripting ToolMSBuildConventionalPart of .NETUsed by Visual Studio and TFSWidely used, lots of examplesPart of .NET Fundamentals
  4. Conventional Scripting ToolNAntFree and open-sourcePopular with .NET developersWidely used, lots of examplesBased on the Java build tool, AntObsolete
  5. Conventional Scripting ToolPowerShell – the Microsoft shell toolpsake – a PowerShell based build systemSupports scriptingCan automate many administrative tasks on Windows Server and most Microsoft server applicationsPart of Windows Fundamentals
  6. Task LibrariesMSBuild Extension PackMSBuild Community TasksAutomate, Automate, AutomateAssembly InfoXML Peek & Poke, Transform ConfigCopy Files, Zip, PackageDocumentation
  7. One Script, Builds EverythingCompletelyConsistentlyrunner.msbuildrunner.batVirtuous DisciplineRunner Runs Every Build StepAlways “Run the Runner”Avoid Integration HellPullRebuildCodeRebuildPush
  8. Week 2Continuous Integration ServerSelect oneInstall itRun Build ScriptRebuild PhaseSoup-to-Nuts
  9. No CI ServerDevelopers Push CodeFire and ForgetSCM RepositoryHolds Code RevisionsUnknown ConditionDanger ZoneDeferring the BuildIntegration HellLurking Quality Issues
  10. Install CI ServerSCM TriggerRun runner.msbuild
  11. CommercialMicrosoft’s Team Foundation Server
  12. Free, Open SourceCruise Control .NET
  13. Free, Open SourceJenkins
  14. CommercialJetBrainsTeamCity
  15. ObserveCode PushBuild SuccessReportBuild HistoryVisibilityBuild FeedbackImprove Personal ProcessStakeholder Visibility
  16. Week 3Code AnalysisRun code analysis tool against the codebaseUnderstand the InspectionsFocus on the Minimum, RecommendedFind One Rule That’s Being ViolatedDecide that on one that’s worth fixingOne that’s worth monitoringFix Every Violation of That One InspectionBuild ScriptCode analysis running from within the build scriptRunning from within the CI serverBuild breaks if that one inspection rule is violated
  17. No Code AnalysisDanger ZoneCritical Errors: these probably exist in the code, but you don’t know whereBad Practices: you could be following a bad coding practicesCode Smells: you could be following new and better coding practices
  18. Identify an Analysis ToolStatic Code AnalysisRun the Analysis Tool within the CI Server
  19. FxCop.NET Framework Guidelines
  20. GendarmeFinds Common Problems
  21. StyleCopHelps Enforce Coding Standards
  22. NDependGo Deep: analysis in depth
  23. SimianDuplicate Code Finder
  24. Sonar 3DashboardRules, Alerts, Thresholds
  25. Add to runner.msbuildRun PerformantAnalysisPer-Commit AnalysisCI ServerRun Performant AnalysisMonitorViolations Break the BuildNightly AnalysisRun Complete AnalysisAnalyzeEvaluate, TriageImproveUrgent, Important
  26. Week 4Write One Automated Unit TestBuild ScriptHave the test run within the build scriptHave the test run within the CI serverCode AnalysisIdentify, fix and monitor 2 more inspections
  27. No Automated TestsUnitIntegrationWhatDefines “Automated Testing”?Runs EverywhereEvery Developer’s MachineNo Manual …ConfigurationInterventionDeterministic, Isolated, Repeatable
  28. Select a Testing FrameworkRun the Tests with a Scripting ToolRun the Tests within the CI Server
  29. Testing FrameworkMSTest
  30. Testing FrameworkMbUnit
  31. Testing FrameworkxUnit.net
  32. Testing FrameworkNUnit
  33. Select a Mocking FrameworkAllows for Test IsolationEnables Interaction Testing
  34. Mocking FrameworkRhinoMocks
  35. Mocking FrameworkMoq
  36. Add to runner.msbuildRun All Unit TestsPer-Commit TestingCI ServerRun All Unit TestsMonitorFailing Unit Test, Breaks the BuildNightly TestingRun Automated Integration Tests
  37. Automated Unit TestingOne automated unit test assembly for each assembly/executable-under-testOne tests class for each class-under-testAchieve 100% class coverageMocking FrameworkUse a mocking frameworkCI ServerMake sure all unit tests runs on the CI serverCode AnalysisIdentify, fix and monitor 4 more code analysis violations.
  38. Automated Unit TestingOne automated unit test assembly for each assembly/executable-under-testOne tests class for each class-under-testAchieve 100% class coverageMocking FrameworkUse a mocking frameworkCI ServerMake sure all unit tests runs on the CI serverCode AnalysisIdentify, fix and monitor 4 more code analysis violations.
  39. Code ReviewDecide on the code review strategyPerform a “model code review”, together with everyone on the teamHash it out and define an approach that the team is willing to commit toAutomated Unit TestingWrite one unit test for each method in each class-under-testTry to achieve 100% method coverageCode AnalysisIdentify, fix and monitor 8 more code analysis violations
  40. Code ReviewDecide on the code review strategyPerform a “model code review”, together with everyone on the teamHash it out and define an approach that the team is willing to commit toAutomated Unit TestingWrite one unit test for each method in each class-under-testTry to achieve 100% method coverageCode AnalysisIdentify, fix and monitor 8 more code analysis violations
  41. PackagingDeploymentCode ReviewMake sure code reviews happenAutomated TestingWrite more unit testsTry to exceed 40% statement coverageCode AnalysisIdentify, fix and monitor 16 more code analysis violations
  42. Automated DeploymentWrite a deployment/packaging scriptCode ReviewMake sure code reviews happenAutomated TestingWrite more unit testsTry to exceed 40% statement coverageCode AnalysisIdentify, fix and monitor 16 more code analysis violations
  43. Automated DeploymentWrite a deployment/packaging scriptAutomated DeploymentAutomate the deployment to an integration environment as part of the “per commit” pipelineCode ReviewsPerform all code reviewsAutomated TestingWrite more unit testsTry to exceed 60% statement coverageCode AnalysisIdentify, fix and monitor 32 more code analysis violations
  44. Automated DeploymentAutomate the deployment to TestAutomate the deployment to an integration environment as part of the “per commit” pipelineCode ReviewsPerform all code reviewsAutomated TestingWrite more unit testsTry to exceed 60% statement coverageCode AnalysisIdentify, fix and monitor 32 more code analysis violations
  45. Automated TestingWrite more unit testsWrite more automated integration testsTry to exceed 80% statement coverage
  46. Automated TestingWrite more unit testsTry to exceed 80% statement coverageCode ReviewsPerform all code reviewsAutomated DeploymentWorking with QA, automate the deployment to Test environment.Code AnalysisIdentify all applicable code analysis rulesFix and monitor all mandatory rules
  47. RetrospectiveLiked: What did we do right?Learned: What did we learn?Lacked: What held us back?Longed for: What did we wish we had?Presentation to Project StakeholdersGather metrics along the wayGather success storiesDemonstrate the CI serverPresent the results