Agile for Embedded & System Software Development : Presented by Priyank KS
-
Upload
discuss-agile -
Category
Engineering
-
view
187 -
download
2
Transcript of Agile for Embedded & System Software Development : Presented by Priyank KS
Agile for Embedded & System Software Development
Challenges and Approaches6th May 2016
- Priyank KS
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
About Me
Priyank K S
http://in.linkedin.com/in/priyank-ks-10b18214
Priyank works as a Technical Consultant & Agile Coach at Aritha Consulting Services and consults enterprises in Agile for Embedded & System Software Development area.
Let’s connect:
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Need For AgileA Real World Example
Gateway-Router Small Office Home Office
ISPEthernet
Telephone Line
(ADSL)
Pic source:
thinkdiff.org
Pic source:
bb.osmocom.org
1518
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Inverted Test PyramidRadical shift in testing approach
Unit Tests
Integration
Tests
Manual end-to-end
Tests
Automated end-to-end
Tests
Automated
Integration
Tests
Automated Unit Tests
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Four weeks or less is too short a time to have potential releasable functionality.
Required skills are too diverse to have a cross-functional team
Hardware and Software development cannot be done in parallel. First we need hardware, then only can the software be developed.
User Stories do not work for embedded system development
Common Challenges (myths) in Embedded/System Software Development
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
MTP to Final Product
Pic source: http://www.slideshare.net/tumma72/agile-embedded-software-development-whats-wrong-with-it
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Landmines in the embedded world
Field Issues
Memory
Corruption
System
Out of Memory
System
Crash
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Lets Identify a Landmine in Code
char output[5]; char user_input[5];
memset(output, 0x0, 5);
user_input = read_user_input();
sprintf(output, user_input);
Example 1:
Example 2:
// allocate Array
char *sz = new char[20];
// Initialize the first and last element to 12
sz[0] = 12;
sz[20] = 12;
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
External Quality – Quality of a product as measured by the customer
Finds all the focus of the organizations
Internal Quality – Quality as measured by the programmers
Finds neglect of the organizations
A different perspective towards quality
Business Layer
Technical Layer
External Quality
Internal Quality
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
External Quality Characteristics Correctness
Usability
Efficiency
Reliability
Integrity
Accuracy
Robustness
Internal Quality Characteristics Maintainability
Flexibility
Portability
Re-usability
Readability
Testability
Understandability
How Does it Translate to Day-to-Day Practices?
Source: Steve McConnell’s book – Code Complete
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
External Quality Continuous integration
End-to-end system tests
Iteration demos with stakeholder feedback
Internal Quality Unit testing
Test Driven Development (TDD)
Code Reviews
Pair Programming
How Does it Translate to Day-to-Day Practices?
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
One of the key principles of Lean Software Development – Build Quality In
You can build quality product, but it is hard to add quality later.
“Maintainability is not an afterthought, but should be addressed from the start of the project” – Joost Viser in the book “Building Maintainable Software”
Automate the tests
“Build Quality In”
Automated
End-to-end
Tests
Automated
Integration
Tests
Automated
Unit Tests
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Continuous Feedback is Important
“Build Quality In”
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Quality and The Test Pyramid
Source: Growing Object-Oriented Software, Guided by Tests, by Steve Freeman, Nat Pryce
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
eXtreme Programming (XP) – to build Internal quality
Source: http://www.codeproject.com/Articles/604417/Agile-software-development-methodologies-and-how-t
Kent Beck’s basic idea was Take observed effective team practices Push them to extreme level
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
XP Practices
Pair Programming
The Planning Game Small
Releases
Metaphor
Simple Design
Testing
RefactoringCollective
Ownership
Continuous Integration
40 hour week
On-Site customer
Coding Standards
XP Practices
(Source: Extreme Programming explained
– by Kent Beck)
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
XP Practices
Pair Programming
The Planning Game Small
Releases
Metaphor
Simple Design
Testing
RefactoringCollective
Ownership
Continuous Integration
40 hour week
On-Site customer
Coding Standards
XP Practices
(Source: Extreme Programming explained
– by Kent Beck)
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Why XP?
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Emergent Architecture
Sprint Zero Architecture RunWay, Architecture Vision
Do the Simplest thing that possibly work
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Emergent Architecture
Architecture Runway
Source: http://www.slideshare.net/assocpm/agile-at-lockheed-martin-4th-february-2014
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Emergent Architecture
Sprint Zero Architecture RunWay, Architecture Vision
Architecture Runway --- “ilities” Scalability, Reliability, Extensibility, Security, Reusability,
Maintainability, Usability …
Spikes When in doubt, Code or Model it out
Do the Simplest thing that possibly work
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
“By deferring important architectural and design decisions until the last responsible moment, you can prevent unnecessary complexity from undermining your software projects” (Source: IBM Developerworks)
Creating a flexible architecture, and taking care not to create an irreversible decision
As new concerns appear, the architecture is changed accordingly to handle the new concerns
Walking Skeleton (with Broad brush architecture )
A tiny implementation of the system that performs a small end-to-end function.
It need not use the final architecture, but it should link together the main architectural components.
Definition Credit Alistair Cockburn
Emergent Architecture - Approaches
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
A Walking Skeleton for Embedded
Pic source: http://www.slideshare.net/tumma72/agile-embedded-software-development-whats-wrong-with-it
Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.
Unity - Unit Test Tool for C
TEST(sprintf, NoFormatOperations)
{
char output[5];
memset(output, 0xaa, sizeof(output));
TEST_ASSERT_EQUAL(3, sprintf(output, “hey”));
TEST_ASSERT_EQUAL_STRING(“hey”, output);
TEST_ASSERT_BYTES_EQUAL(0xaa, output[4]);
}
A sample Unity test code