Ideabox

Transcription

Ideabox
Software
Engineering
Best Practices
+
Topic Outline
1. Common Problems
2. Software Engineering Best Practices
3. Coding Principles
Scope Creep
is what happens when your project
experiences changes and increases
beyond its original mission
Cause of Scope Creep
1. Lack of understanding of the
requirements
2. Hidden complexity
3. The ripple effect
Major Change in
Requirements
1. Mission objective changes
2. Lack of stakeholder’s involvement
Too busy putting out fires
Things to consider
1. Software Development Life Cycle
2. Testing
3. Code Review
4. Automation
Waterfall
1. Requirement
2. Design
3. Implementation
4. Testing
5. Operation
Enter Agile Manifesto
1. Individuals and interactions
over processes and tools
2. Working software
over comprehensive documentation
3. Customer collaboration
over contract negotiation
4. Responding to change
over following a plan
Remember
there is no silver bullet
Testing
1. Unit Test
2. Code Coverage
3. Acceptance Test
Unit Testing
Source: https://jtreminio.com/2013/03/unit-testing-tutorial-part-2-assertions-writing-a-useful-test-and-dataprovider/
Unit Testing
Unit Testing
Source: https://jtreminio.com/2013/03/unit-testing-tutorial-part-2-assertions-writing-a-useful-test-and-dataprovider/
Code Coverage
Source: http://code.tutsplus.com/articles/test-code-coverage-from-myth-to-reality--cms-20442
Code Coverage
Source: http://code.tutsplus.com/articles/test-code-coverage-from-myth-to-reality--cms-20442
User Acceptance Test
1. Test high level functionality
2. Documented feedback
for developers and managers
3. Agreement whether the test passes
User Acceptance Test
Step
Procedure
Expected Result
Passed/
Failed
1
Visit website
Login form displayed
PASSED
2
Login to admin site using valid Logged in and dashboard
username and password
page opened
PASSED
3
Click logout
Logged out and login form
displayed
PASSED
4
Login to admin site using
invalid username and
password
Display message “Invalid
username or password”
FAILED
Code Review
1. Maintain high quality code base
2. Establish code review process
(pre-commit or post-commit)
3. Pair programming, anybody?
Automation
Optimize for minimal operational burden
Mike Krieger, Instagram
Measure anything, measure everything
etsy.com
Coding Principles
Use Coding Standards
Coding Conventions
Commenting
Naming conventions
Do not Repeat Yourself
(DRY)
Every piece of knowledge must have a
single, unambiguous, authoritative
representation within a system.
Keep It Simple Stupid
(KISS)
Less is more
You Ain’t Gonna Need
It (YAGNI)
80% of the time spent on a software
project is invested in 20% of the
functionality.
Thank you
Happy
Coding