agile for embedded & system software development : presented by priyank ks

24
Agile for Embedded & System Software Development Challenges and Approaches 6 th May 2016 - Priyank KS

Upload: discuss-agile

Post on 11-Apr-2017

185 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Agile for Embedded & System Software Development : Presented by Priyank KS

Agile for Embedded & System Software Development

Challenges and Approaches6th May 2016

- Priyank KS

Page 2: Agile for Embedded & System Software Development : Presented by 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

[email protected]

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:

Page 3: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 4: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 5: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 6: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 7: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 8: Agile for Embedded & System Software Development : Presented by Priyank KS

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;

Page 9: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 10: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 11: Agile for Embedded & System Software Development : Presented by Priyank KS

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?

Page 12: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 13: Agile for Embedded & System Software Development : Presented by Priyank KS

Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.

Continuous Feedback is Important

“Build Quality In”

Page 14: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 15: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 16: Agile for Embedded & System Software Development : Presented by Priyank KS

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)

Page 17: Agile for Embedded & System Software Development : Presented by Priyank KS

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)

Page 18: Agile for Embedded & System Software Development : Presented by Priyank KS

Copyright © 2016, Aritha Consulting Services Pvt. Ltd. All rights reserved.

Why XP?

Page 19: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 20: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 21: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 22: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 23: Agile for Embedded & System Software Development : Presented by Priyank KS

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

Page 24: Agile for Embedded & System Software Development : Presented by Priyank KS

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