SlideShare a Scribd company logo
Treat Your Code Like the
Valuable Software It Is
Amanda Cinnamon
Amanda.cinnamon@daytonanalytics.com
Poll
▪ Who here has lost days or even weeks of productivity trying
to track down a bug, recovering lost code, or trying to
understand your own code
▪ How many of you consider yourselves software developers?
Introduction
▪ Target audience: analysts who write code
▪ Objective: Basic introduction to principals, tools, and
resources
Overview
▪ Tools
▪ Software Testing Frameworks
▪ Version Control
▪ Concepts
▪ Software Development Life Cycle
▪ Don’t Repeat Yourself (DRY)
▪ Design Patterns
▪ Modularization
▪ Cinnamon Axiom
Why Don’t Analyst Use Software
Development Tools?
▪ Lack of training
▪ Imposter syndrome
▪ Requires investment of time and money
Solution
▪ Knowledgeable mentors
▪ Awareness of available resources
▪ Continuous learning
▪ Owning up to role of software developer
Software Development Tools
Coding Problem
Problems caused by tiny programming errors appear at the
worst time during my analysis and I spend time debugging
when I should be doing my “real” job!
Solution: Software Testing
▪ Types of testing:
▪ Unit tests
▪ Verification
▪ Validation
▪ Integration tests
▪ User test
Unit Test Example
V & V Test Example
0 0.2 0.4 0.6 0.8 1
0
0.5
1
1.5
Time Ratio (t/t0
)
DragAreaRatio(c
D
S/c
D
S
0
)
WiSS-Generated Generic Chute Drag Area Growth Profiles
Ringslot, WiSS
Cross, WiSS
Solid Flat, WiSS
Ringslot, Theory
Cross, Theory
Solid Flat, Theory
300 400 500 600 700 800 900 1000 1100
1
2
3
4
5
6
7
C-130J-30 Exit Time
Fuselage Station (in. aft)
ExitTime(s)
WiSS
AFI11-231
Data Visualization Validation
Source: xkcd.com
Coding Problem
I know I fixed this bug already, but it has suddenly reappeared!
That must have happened when I copied Joe’s version of the
algorithm into my code. Now what was the fix again?
Solution: Version Control Software
Source: https://git-scm.com
Software Development Concepts
Problem
I don’t really know where I’m going with this code. I just start at
line one and hope it does something by the time I get to the
last close bracket.
Solution: Software Development
Life Cycle
Manifesto for Agile Software Development
▪ Customer satisfaction by early and continuous delivery of valuable software
▪ Welcome changing requirements, even in late development
▪ Working software is delivered frequently (weeks rather than months)
▪ Close, daily cooperation between business people and developers
▪ Projects are built around motivated individuals, who should be trusted
▪ Face-to-face conversation is the best form of communication (co-location)
▪ Working software is the primary measure of progress
▪ Sustainable development, able to maintain a constant pace
▪ Continuous attention to technical excellence and good design
▪ Simplicity—the art of maximizing the amount of work not done—is essential
▪ Best architectures, requirements, and designs emerge from self-organizing teams
▪ Regularly, the team reflects on how to become more effective, and adjusts accordingly
Coding Problem:
Can you find the copy/past/modify mistake?
These lines are so similar, it seemed easy to just copy/paste
and modify the variable names, but I can’t figure out why it
doesn’t work!
Solution: Don’t Repeat Yourself
Coding Problem
Everyone on the team has already solved this problem in a
different way. Mike’s solution crashes all the time, but Joe’s
code is slow. Should I write my own algorithm?
Solution: Design Patterns
Example: Singleton
Coding Problem
I know I’ve written code to do this for another project. It’s in one
of these main.cpp files somewhere.
Solution: Modularization
Main
Physics
Model
Data
Logger
Data
Visualization
RNG
Coding Problem:
I did this the brute force way last time because I thought I
would never have to do this again
Solution: Cinnamon Axiom
You will never do something once.
Summary
▪ Doing things the right way and not taking shortcuts saves
time in the long run.
Resources
▪ Software testing
▪ Introduction to Test Driven Development by Kent
Beck
▪ Version Control Software
▪ https://git-scm.com/
▪ Software Development Life Cycle
▪ http://agilemanifesto.org/
▪ Don’t Repeat Yourself
▪ http://deviq.com/don-t-repeat-yourself/
▪ Design Patterns
▪ Design Patterns: Elements of Reusable Object-
Oriented Software by Erich Gamma, Richard Helm,
Ralph Johnson, and John Vlissides
▪ Modularization
▪ Domain-Driven Design by Eric Evans Amanda Cinnamon
Amanda.cinnamon@daytonanalytics.com
www.thedevinstitute.com

More Related Content

Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is

  • 1. Treat Your Code Like the Valuable Software It Is Amanda Cinnamon Amanda.cinnamon@daytonanalytics.com
  • 2. Poll ▪ Who here has lost days or even weeks of productivity trying to track down a bug, recovering lost code, or trying to understand your own code ▪ How many of you consider yourselves software developers?
  • 3. Introduction ▪ Target audience: analysts who write code ▪ Objective: Basic introduction to principals, tools, and resources
  • 4. Overview ▪ Tools ▪ Software Testing Frameworks ▪ Version Control ▪ Concepts ▪ Software Development Life Cycle ▪ Don’t Repeat Yourself (DRY) ▪ Design Patterns ▪ Modularization ▪ Cinnamon Axiom
  • 5. Why Don’t Analyst Use Software Development Tools? ▪ Lack of training ▪ Imposter syndrome ▪ Requires investment of time and money
  • 6. Solution ▪ Knowledgeable mentors ▪ Awareness of available resources ▪ Continuous learning ▪ Owning up to role of software developer
  • 8. Coding Problem Problems caused by tiny programming errors appear at the worst time during my analysis and I spend time debugging when I should be doing my “real” job!
  • 9. Solution: Software Testing ▪ Types of testing: ▪ Unit tests ▪ Verification ▪ Validation ▪ Integration tests ▪ User test
  • 11. V & V Test Example 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 Time Ratio (t/t0 ) DragAreaRatio(c D S/c D S 0 ) WiSS-Generated Generic Chute Drag Area Growth Profiles Ringslot, WiSS Cross, WiSS Solid Flat, WiSS Ringslot, Theory Cross, Theory Solid Flat, Theory 300 400 500 600 700 800 900 1000 1100 1 2 3 4 5 6 7 C-130J-30 Exit Time Fuselage Station (in. aft) ExitTime(s) WiSS AFI11-231
  • 13. Coding Problem I know I fixed this bug already, but it has suddenly reappeared! That must have happened when I copied Joe’s version of the algorithm into my code. Now what was the fix again?
  • 14. Solution: Version Control Software Source: https://git-scm.com
  • 16. Problem I don’t really know where I’m going with this code. I just start at line one and hope it does something by the time I get to the last close bracket.
  • 18. Manifesto for Agile Software Development ▪ Customer satisfaction by early and continuous delivery of valuable software ▪ Welcome changing requirements, even in late development ▪ Working software is delivered frequently (weeks rather than months) ▪ Close, daily cooperation between business people and developers ▪ Projects are built around motivated individuals, who should be trusted ▪ Face-to-face conversation is the best form of communication (co-location) ▪ Working software is the primary measure of progress ▪ Sustainable development, able to maintain a constant pace ▪ Continuous attention to technical excellence and good design ▪ Simplicity—the art of maximizing the amount of work not done—is essential ▪ Best architectures, requirements, and designs emerge from self-organizing teams ▪ Regularly, the team reflects on how to become more effective, and adjusts accordingly
  • 19. Coding Problem: Can you find the copy/past/modify mistake? These lines are so similar, it seemed easy to just copy/paste and modify the variable names, but I can’t figure out why it doesn’t work!
  • 21. Coding Problem Everyone on the team has already solved this problem in a different way. Mike’s solution crashes all the time, but Joe’s code is slow. Should I write my own algorithm?
  • 23. Coding Problem I know I’ve written code to do this for another project. It’s in one of these main.cpp files somewhere.
  • 25. Coding Problem: I did this the brute force way last time because I thought I would never have to do this again
  • 26. Solution: Cinnamon Axiom You will never do something once.
  • 27. Summary ▪ Doing things the right way and not taking shortcuts saves time in the long run.
  • 28. Resources ▪ Software testing ▪ Introduction to Test Driven Development by Kent Beck ▪ Version Control Software ▪ https://git-scm.com/ ▪ Software Development Life Cycle ▪ http://agilemanifesto.org/ ▪ Don’t Repeat Yourself ▪ http://deviq.com/don-t-repeat-yourself/ ▪ Design Patterns ▪ Design Patterns: Elements of Reusable Object- Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides ▪ Modularization ▪ Domain-Driven Design by Eric Evans Amanda Cinnamon Amanda.cinnamon@daytonanalytics.com www.thedevinstitute.com