Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Programming Practices and Project Management
for Professional Software Development
Sébastien Jodogne
CHU of Liège

Interfaces-Entreprises ULg, May 28th, 2013

1 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Who Am I?
PhD in Computer Science, ULg. Domains of interest:
Image Processing,
Machine Learning,
High-Performance Computing,
Theoretical Computer Science.

5-year professional experience in private companies:
CCTV – Closed Circuit Television (Secosys, Euresys),
Machine Vision (Euresys),
Broadcasting (EVS).

Now: Medical imaging engineer in the Department of Medical
Physics at the CHU of Liège.
This talk: Industrial practices for compiled languages.
2 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Case Study

Summary
Lightweight, scriptable server for medical imaging.
Open-source (GPLv3).
Developed with an industrial methodology.
Main languages:
Core: C++.
GUI: HTML5, JavaScript.
3 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Put Your Code in Revision Control Software
Advantages
Keep track of all the changes to the code.
Share across multiple computers, with multiple collaborators.
Track the various versions of the software (“tagging”).
Backup (recover deleted or modified files).
Avoid the ZIP mess (which version is the latest one?).
Candidates
1 Mercurial.
2

Git (more adapted to geeks).

3

Subversion (becomes legacy).
4 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Questions When Starting a Project

Choose a licensing model (cf. Jérémie Fays). GPLv3 is the
de-facto choice.
Choose a software forge:
For closed-source (private): BitBucket, SourceForge.
For open-source (public): GitHub, Google Code.
For confidential code (medical data, spin-off): ???

5 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Choose (and Stick to) a Coding Style

6 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Documentation
Document functions and classes in the source code
⇒ Doxygen (C/C++), Javadoc (Java), XML (C#).
Document architecture and algorithms elsewhere (separate
files or Wiki).
Don’t forget the User Manual (PDF or Wiki).
Be verbose and use explicit names (possibly long) for variables,
functions and methods.
⇒ “Self-Documented Code”.
Do not reuse variables and introduce them only when they are
needed (not at the top of a function as in C).

7 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Don’t Reinvent the (Squared) Wheel
Use third-party libraries.
⇒ Know your ecosystem (language, frameworks, StackOverflow).
Recommended libraries for C++: STL, Boost, SQLite, Qt. . .
Caveats:
Minimize the number of dependencies!
Avoid heavyweight, not supported or “exotic” libraries.
Pay attention to portability (Windows, Mac OS).
License compatibility.

8 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Anti-Patterns (Don’ts!)

Programs whose structure is
barely comprehensible, especially because of misuse of code
structures (especially GOTO).

9 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Anti-Patterns (Don’ts!)

Classes not properly encapsulated,
thus permitting unrestricted access to
their internals.

10 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Anti-Patterns (Don’ts!)

An object that knows too much
or does too much.

11 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Anti-Patterns (Don’ts!)

Conclusions
Learn and recognize bad software architectures.
Inventories do exist!
Lasagna code,
Magic numbers,
Poltergeists,
Error hiding. . .
[Antipatterns, Code smells, Fifth-System Effect]

12 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Design Patterns (Do’s!)

Recurring solutions to common
problems in software design.

13 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Design Patterns (Do’s!)
Basic Philosophy
Uncouple the software components by adding abstractions (“Java
interfaces”), thanks to object-oriented programming.
[Wikipedia, Head First Design Patterns]

Some Common Patterns
Singleton.
Factory.
Observer.
Model-View-Controller (aka. separate GUI and core).

14 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

RAII — Resource Acquisition Is Initialization
Most useful design pattern for C++.
Automatic release of a resource on leaving scope or on
exception ⇒ Never any leak!
Applicable to memory allocation, I/O, multithreading. . .
class FileWriter
{
private:
FILE* fp_;
public:
FileWriter(const char* filename)
{
fp_ = fopen(filename, "w");
}
~FileWriter()
{
printf("Closing filen");
fclose(fp_);
}
};

void Demo1()
{
FileWriter w1("/tmp/hello.txt");
// Leaving scope => closing "w1.fp_"
}
void Demo2()
{
FileWriter w2("/tmp/hello.txt");
throw std::runtime_error("Sorry guy");
// Exception => closing "w2.fp_"
}

15 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

Other Recommendations
1

KISS (“Keep it simple, stupid”) — A code is written once, but
read many times by different people!

2

DRY (“Don’t repeat yourself”) — Implement some
computation at a single place to ensure consistency.

3

“Premature optimization is the root of all evil” [D. Knuth].

4

Use exceptions, never return error codes (except in C).

5

Use a build system (CMake, SCons or Visual Studio).

6

Windows-only: Do not create DLL and favor static linking,
except if you know what you are doing (ABI, DLL hell)!
Learn debugging tools:

7

Debuggers (Visual Studio, Eclipse, gdb. . . ).
Linux-only: Valgrind (memory leaks, access violations. . . ).
16 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

What is Legacy Code?
Legacy code is defined as
code without tests.
⇓
Impossible to know when
things get broken (i.e. to
detect regressions).
⇓
Impossible to refactor.

17 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

“Testing is up to the Testers and the Users!”

18 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

“Testing is up to the Testers and the Users!”
Really? Bugs detected at the
code level are:
Easier to understand,
Easier to reproduce,
Easier and cheaper to fix,
More contained.
⇓
Software engineers are part of
the testing process!

18 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Assertion-Driven Testing (aka. Invariants/Preconditions)
#include <assert.h>
#include <stdio.h>
int factorial(int value)
{
assert(value >= 0);
if (value == 0)
return 1;
else
return value * factorial(value - 1);
}
int main()
{
printf("%dn", factorial(-5)); /* => crash */
}

19 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Unit Testing
int main()
{
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
}

factorial(0));
factorial(1));
factorial(2));
factorial(3));
factorial(4));
factorial(5));

/*
/*
/*
/*
/*
/*

1
1
2
6
24
120

*/
*/
*/
*/
*/
*/

20 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Unit Testing
int main()
{
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
}

factorial(0));
factorial(1));
factorial(2));
factorial(3));
factorial(4));
factorial(5));

/*
/*
/*
/*
/*
/*

1
1
2
6
24
120

*/
*/
*/
*/
*/
*/

⇒

TEST(Example, Factorial)
{
ASSERT_EQ(1, factorial(0));
ASSERT_EQ(1, factorial(1));
ASSERT_EQ(2, factorial(2));
ASSERT_EQ(6, factorial(3));
ASSERT_EQ(24, factorial(4));
ASSERT_EQ(120, factorial(5));
}

20 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Unit Testing
int main()
{
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
printf("%dn",
}

factorial(0));
factorial(1));
factorial(2));
factorial(3));
factorial(4));
factorial(5));

/*
/*
/*
/*
/*
/*

1
1
2
6
24
120

*/
*/
*/
*/
*/
*/

⇒

TEST(Example, Factorial)
{
ASSERT_EQ(1, factorial(0));
ASSERT_EQ(1, factorial(1));
ASSERT_EQ(2, factorial(2));
ASSERT_EQ(6, factorial(3));
ASSERT_EQ(24, factorial(4));
ASSERT_EQ(120, factorial(5));
}

Basic Idea
Accumulate a database of tests!

20 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Unit Testing In Practice

Use a unit testing framework (e.g. Google Test).
Move your main() tests as unit tests.
Keep your unit tests small and fast.
Add unit tests each time a function or a class is added.
Add an unit test for each solved bug.
Execute the unit tests as a step of the build process!
Even better: Write tests before writing the code (aka. TDD
— Test-Driven Development).

21 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Continuous Integration Server (Build + Unit tests)

22 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Different Flavors of Quality Assurance

System testing

Integration testing

Unit testing

Hardware/OS

Executable

Classes
Functions

23 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Integration Tests
“End-to-end” tests on the final binaries (black box).
Typically less automated and much more lengthy than unit
tests (white box).
Possible approaches:
1
2
3

Inject stimuli, compare outputs with expected results.
GUI automation testing.
Challenge the API (cf. Orthanc).

Run integration tests (at least) before each release, or even
better as part of the nightly builds.
System Tests
At last, the testing team makes user-level tests.
24 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

Issue Tracker: Link between Engineers, Testers and Users

Common Choices
Bugzilla, JIRA, FogBugz, Redmine, Trac.
Often integrated within the software forge.
25 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

The Software Quality Iceberg

26 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

A New Vision of Project Management

The cathedral (monolithic)
27 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

A New Vision of Project Management

⇒

The cathedral (monolithic)

The bazaar (agile)
27 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Agility: Cut Down Release Cycles

28 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Agility: Cut Down Release Cycles

28 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Agility: Cut Down Release Cycles

⇒

Features are incrementally added.
Software architecture is continuously refactored.
28 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Continuous Testing is at the Center of Agile Development

⇒

The cathedral (monolithic)

The bazaar (agile)

29 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Scrum: Most Popular Agile Methodology

30 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Scrum: The Product Backlog of Orthanc in Trello

31 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Extreme Programming: Agile Engineering Practices

32 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Extreme Programming: Agile Engineering Practices

32 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Agile Methodologies
Scrum
Extreme Programming

Extreme Programming: Agile Engineering Practices

32 / 34
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
1

Introduction

2

Best Programming Practices
Put Your Code in Revision Control Software
Coding Style and Documentation
Don’t Reinvent the (Squared) Wheel
Design Patterns
Other Recommendations

3

Software Quality
Software Engineers are Part of the Testing
Assertion-Driven Testing
Unit Testing
Integration and System Testing

4

Project Management
Agile Methodologies
Scrum
Extreme Programming

5

Summary
Score Your Project!
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Score Your Project!

Score Your Project!

33 / 34
Introduction
Best Programming Practices
Software Quality
Project Management
Summary

Score Your Project!

Any Question?

34 / 34

More Related Content

PPT
Ensuring code quality
PPTX
How To Improve Quality With Static Code Analysis
PDF
Code-Review-Principles-Process-and-Tools (1)
PDF
01 software test engineering (manual testing)
PDF
Manual testing
DOC
Manual Testing Notes
PDF
SE2018_Lec 17_ Coding
PPT
DO 178C Upcoming Guidance for OOS
Ensuring code quality
How To Improve Quality With Static Code Analysis
Code-Review-Principles-Process-and-Tools (1)
01 software test engineering (manual testing)
Manual testing
Manual Testing Notes
SE2018_Lec 17_ Coding
DO 178C Upcoming Guidance for OOS

What's hot (20)

PPTX
Static Code Analysis
PPT
07 Outsource To India Independent Testing
PDF
Code quality as a built-in process
PPT
TEA Presentation V 0.3
PPT
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
PPT
Codingstandards matiar
PDF
Parasoft fda software compliance part2
PDF
Java Code Review Checklist
PPT
Introduction to Parasoft C++TEST
PPTX
Static Code Analysis
PPT
Software Design for Testability
PDF
Software defect prevention example project
PDF
ISTQB Advance Material
PDF
Parasoft fda software compliance part1
PPT
Peer Code Review An Agile Process
PDF
Practical Guide To Software System Testing
PPTX
Software presentation
PPT
Automation testing by Durgasoft in Hyderabad
PPTX
Java Code Quality Tools
PDF
Verification Challenges and Methodologies
Static Code Analysis
07 Outsource To India Independent Testing
Code quality as a built-in process
TEA Presentation V 0.3
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Codingstandards matiar
Parasoft fda software compliance part2
Java Code Review Checklist
Introduction to Parasoft C++TEST
Static Code Analysis
Software Design for Testability
Software defect prevention example project
ISTQB Advance Material
Parasoft fda software compliance part1
Peer Code Review An Agile Process
Practical Guide To Software System Testing
Software presentation
Automation testing by Durgasoft in Hyderabad
Java Code Quality Tools
Verification Challenges and Methodologies
Ad

Viewers also liked (8)

PDF
La qualité logicielle et l'intégration continue - Cas concret du projet Cytomine
PDF
Open Source Community Management
PDF
Introduction à la qualité logicielle (1/5)
PDF
Programmation fonctionnelle
PDF
Modern c++ (C++ 11/14)
PDF
Jenkins - perdre du temps pour en gagner
PDF
When Biology Meets Computer Science
PPTX
Unity - Game Engine
La qualité logicielle et l'intégration continue - Cas concret du projet Cytomine
Open Source Community Management
Introduction à la qualité logicielle (1/5)
Programmation fonctionnelle
Modern c++ (C++ 11/14)
Jenkins - perdre du temps pour en gagner
When Biology Meets Computer Science
Unity - Game Engine
Ad

Similar to Programming practises and project management for professionnal software development (20)

PPTX
Devops Introduction nd basics of DevOps.
PPTX
DevOps interview questions and answers
PPT
Software testing presentation for engineering students of computer science
PPT
Rhapsody Software
PPTX
Metodologías agiles de desarrollo de software
PPT
Cnpm bkdn
PPTX
Software Engineering- Crisis and Process Models
PPTX
Software Architecture - Allocation taxonomies: building, deployment and distr...
PDF
Scilab Enterprises (Numerical Computing)
PPT
Software coding and testing
PPT
1.Basic Introduction (1).ppt
PDF
Software Development Standard Operating Procedure
PPTX
Practices of agile developers
PPTX
reaserch ppt.pptx
PPTX
Software Engineering PPT Unit I.pptx
PPTX
07 fse implementation
PDF
Code Craftsmanship Checklist
PPTX
Coding and testing in Software Engineering
PDF
L5555555555555555555555 Agile Scrum Framework.pdf
Devops Introduction nd basics of DevOps.
DevOps interview questions and answers
Software testing presentation for engineering students of computer science
Rhapsody Software
Metodologías agiles de desarrollo de software
Cnpm bkdn
Software Engineering- Crisis and Process Models
Software Architecture - Allocation taxonomies: building, deployment and distr...
Scilab Enterprises (Numerical Computing)
Software coding and testing
1.Basic Introduction (1).ppt
Software Development Standard Operating Procedure
Practices of agile developers
reaserch ppt.pptx
Software Engineering PPT Unit I.pptx
07 fse implementation
Code Craftsmanship Checklist
Coding and testing in Software Engineering
L5555555555555555555555 Agile Scrum Framework.pdf

More from Geeks Anonymes (20)

PDF
Programmer sous Unreal Engine
PDF
Implémentation efficace et durable de processus métiers complexes
PDF
Managing Open Source Licenses (Geeks Anonymes)
PDF
Reprendre le contrôle de ses données
PDF
Geeks Anonymes - Le langage Go
PDF
Le rôle du testeur et le Blackbox testing
PDF
Kubernetes
PDF
Vulnérabilités au cœur des applications Web, menaces et contre-mesures
PDF
191121 philippe teuwen cryptographie et attaques materielles
PDF
"Surfez couverts !" - Conseils de Cyber securité
PDF
Introduction au développement mobile - développer une application iOS et Andr...
PDF
Le langage rust
PDF
Test your code
PDF
Intelligence artificielle et propriété intellectuelle
PDF
Pour une histoire plophonique du jeu video
PDF
Become Rick and famous, thanks to Open Source
PDF
Reconnaissance vocale et création artistique
PDF
Natural Language Processing
PDF
Sécurité, GDPR : vos données ont de la valeur
PDF
Modern sql
Programmer sous Unreal Engine
Implémentation efficace et durable de processus métiers complexes
Managing Open Source Licenses (Geeks Anonymes)
Reprendre le contrôle de ses données
Geeks Anonymes - Le langage Go
Le rôle du testeur et le Blackbox testing
Kubernetes
Vulnérabilités au cœur des applications Web, menaces et contre-mesures
191121 philippe teuwen cryptographie et attaques materielles
"Surfez couverts !" - Conseils de Cyber securité
Introduction au développement mobile - développer une application iOS et Andr...
Le langage rust
Test your code
Intelligence artificielle et propriété intellectuelle
Pour une histoire plophonique du jeu video
Become Rick and famous, thanks to Open Source
Reconnaissance vocale et création artistique
Natural Language Processing
Sécurité, GDPR : vos données ont de la valeur
Modern sql

Recently uploaded (20)

PPTX
Benefits of Physical activity for teenagers.pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
STKI Israel Market Study 2025 version august
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Getting Started with Data Integration: FME Form 101
PPTX
The various Industrial Revolutions .pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Five Habits of High-Impact Board Members
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Geologic Time for studying geology for geologist
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
August Patch Tuesday
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Benefits of Physical activity for teenagers.pptx
WOOl fibre morphology and structure.pdf for textiles
STKI Israel Market Study 2025 version august
Final SEM Unit 1 for mit wpu at pune .pptx
Getting Started with Data Integration: FME Form 101
The various Industrial Revolutions .pptx
Getting started with AI Agents and Multi-Agent Systems
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Five Habits of High-Impact Board Members
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Developing a website for English-speaking practice to English as a foreign la...
Geologic Time for studying geology for geologist
Zenith AI: Advanced Artificial Intelligence
August Patch Tuesday
observCloud-Native Containerability and monitoring.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
sustainability-14-14877-v2.pddhzftheheeeee
Group 1 Presentation -Planning and Decision Making .pptx
A novel scalable deep ensemble learning framework for big data classification...
Assigned Numbers - 2025 - Bluetooth® Document

Programming practises and project management for professionnal software development

  • 1. Introduction Best Programming Practices Software Quality Project Management Summary Programming Practices and Project Management for Professional Software Development Sébastien Jodogne CHU of Liège Interfaces-Entreprises ULg, May 28th, 2013 1 / 34
  • 2. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 3. Introduction Best Programming Practices Software Quality Project Management Summary Who Am I? PhD in Computer Science, ULg. Domains of interest: Image Processing, Machine Learning, High-Performance Computing, Theoretical Computer Science. 5-year professional experience in private companies: CCTV – Closed Circuit Television (Secosys, Euresys), Machine Vision (Euresys), Broadcasting (EVS). Now: Medical imaging engineer in the Department of Medical Physics at the CHU of Liège. This talk: Industrial practices for compiled languages. 2 / 34
  • 4. Introduction Best Programming Practices Software Quality Project Management Summary Case Study Summary Lightweight, scriptable server for medical imaging. Open-source (GPLv3). Developed with an industrial methodology. Main languages: Core: C++. GUI: HTML5, JavaScript. 3 / 34
  • 5. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 6. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 7. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Put Your Code in Revision Control Software Advantages Keep track of all the changes to the code. Share across multiple computers, with multiple collaborators. Track the various versions of the software (“tagging”). Backup (recover deleted or modified files). Avoid the ZIP mess (which version is the latest one?). Candidates 1 Mercurial. 2 Git (more adapted to geeks). 3 Subversion (becomes legacy). 4 / 34
  • 8. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Questions When Starting a Project Choose a licensing model (cf. Jérémie Fays). GPLv3 is the de-facto choice. Choose a software forge: For closed-source (private): BitBucket, SourceForge. For open-source (public): GitHub, Google Code. For confidential code (medical data, spin-off): ??? 5 / 34
  • 9. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 10. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Choose (and Stick to) a Coding Style 6 / 34
  • 11. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Documentation Document functions and classes in the source code ⇒ Doxygen (C/C++), Javadoc (Java), XML (C#). Document architecture and algorithms elsewhere (separate files or Wiki). Don’t forget the User Manual (PDF or Wiki). Be verbose and use explicit names (possibly long) for variables, functions and methods. ⇒ “Self-Documented Code”. Do not reuse variables and introduce them only when they are needed (not at the top of a function as in C). 7 / 34
  • 12. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 13. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Don’t Reinvent the (Squared) Wheel Use third-party libraries. ⇒ Know your ecosystem (language, frameworks, StackOverflow). Recommended libraries for C++: STL, Boost, SQLite, Qt. . . Caveats: Minimize the number of dependencies! Avoid heavyweight, not supported or “exotic” libraries. Pay attention to portability (Windows, Mac OS). License compatibility. 8 / 34
  • 14. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 15. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Anti-Patterns (Don’ts!) Programs whose structure is barely comprehensible, especially because of misuse of code structures (especially GOTO). 9 / 34
  • 16. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Anti-Patterns (Don’ts!) Classes not properly encapsulated, thus permitting unrestricted access to their internals. 10 / 34
  • 17. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Anti-Patterns (Don’ts!) An object that knows too much or does too much. 11 / 34
  • 18. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Anti-Patterns (Don’ts!) Conclusions Learn and recognize bad software architectures. Inventories do exist! Lasagna code, Magic numbers, Poltergeists, Error hiding. . . [Antipatterns, Code smells, Fifth-System Effect] 12 / 34
  • 19. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Design Patterns (Do’s!) Recurring solutions to common problems in software design. 13 / 34
  • 20. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Design Patterns (Do’s!) Basic Philosophy Uncouple the software components by adding abstractions (“Java interfaces”), thanks to object-oriented programming. [Wikipedia, Head First Design Patterns] Some Common Patterns Singleton. Factory. Observer. Model-View-Controller (aka. separate GUI and core). 14 / 34
  • 21. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations RAII — Resource Acquisition Is Initialization Most useful design pattern for C++. Automatic release of a resource on leaving scope or on exception ⇒ Never any leak! Applicable to memory allocation, I/O, multithreading. . . class FileWriter { private: FILE* fp_; public: FileWriter(const char* filename) { fp_ = fopen(filename, "w"); } ~FileWriter() { printf("Closing filen"); fclose(fp_); } }; void Demo1() { FileWriter w1("/tmp/hello.txt"); // Leaving scope => closing "w1.fp_" } void Demo2() { FileWriter w2("/tmp/hello.txt"); throw std::runtime_error("Sorry guy"); // Exception => closing "w2.fp_" } 15 / 34
  • 22. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 23. Introduction Best Programming Practices Software Quality Project Management Summary Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations Other Recommendations 1 KISS (“Keep it simple, stupid”) — A code is written once, but read many times by different people! 2 DRY (“Don’t repeat yourself”) — Implement some computation at a single place to ensure consistency. 3 “Premature optimization is the root of all evil” [D. Knuth]. 4 Use exceptions, never return error codes (except in C). 5 Use a build system (CMake, SCons or Visual Studio). 6 Windows-only: Do not create DLL and favor static linking, except if you know what you are doing (ABI, DLL hell)! Learn debugging tools: 7 Debuggers (Visual Studio, Eclipse, gdb. . . ). Linux-only: Valgrind (memory leaks, access violations. . . ). 16 / 34
  • 24. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 25. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 26. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing What is Legacy Code? Legacy code is defined as code without tests. ⇓ Impossible to know when things get broken (i.e. to detect regressions). ⇓ Impossible to refactor. 17 / 34
  • 27. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing “Testing is up to the Testers and the Users!” 18 / 34
  • 28. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing “Testing is up to the Testers and the Users!” Really? Bugs detected at the code level are: Easier to understand, Easier to reproduce, Easier and cheaper to fix, More contained. ⇓ Software engineers are part of the testing process! 18 / 34
  • 29. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 30. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Assertion-Driven Testing (aka. Invariants/Preconditions) #include <assert.h> #include <stdio.h> int factorial(int value) { assert(value >= 0); if (value == 0) return 1; else return value * factorial(value - 1); } int main() { printf("%dn", factorial(-5)); /* => crash */ } 19 / 34
  • 31. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 32. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Unit Testing int main() { printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", } factorial(0)); factorial(1)); factorial(2)); factorial(3)); factorial(4)); factorial(5)); /* /* /* /* /* /* 1 1 2 6 24 120 */ */ */ */ */ */ 20 / 34
  • 33. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Unit Testing int main() { printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", } factorial(0)); factorial(1)); factorial(2)); factorial(3)); factorial(4)); factorial(5)); /* /* /* /* /* /* 1 1 2 6 24 120 */ */ */ */ */ */ ⇒ TEST(Example, Factorial) { ASSERT_EQ(1, factorial(0)); ASSERT_EQ(1, factorial(1)); ASSERT_EQ(2, factorial(2)); ASSERT_EQ(6, factorial(3)); ASSERT_EQ(24, factorial(4)); ASSERT_EQ(120, factorial(5)); } 20 / 34
  • 34. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Unit Testing int main() { printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", printf("%dn", } factorial(0)); factorial(1)); factorial(2)); factorial(3)); factorial(4)); factorial(5)); /* /* /* /* /* /* 1 1 2 6 24 120 */ */ */ */ */ */ ⇒ TEST(Example, Factorial) { ASSERT_EQ(1, factorial(0)); ASSERT_EQ(1, factorial(1)); ASSERT_EQ(2, factorial(2)); ASSERT_EQ(6, factorial(3)); ASSERT_EQ(24, factorial(4)); ASSERT_EQ(120, factorial(5)); } Basic Idea Accumulate a database of tests! 20 / 34
  • 35. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Unit Testing In Practice Use a unit testing framework (e.g. Google Test). Move your main() tests as unit tests. Keep your unit tests small and fast. Add unit tests each time a function or a class is added. Add an unit test for each solved bug. Execute the unit tests as a step of the build process! Even better: Write tests before writing the code (aka. TDD — Test-Driven Development). 21 / 34
  • 36. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Continuous Integration Server (Build + Unit tests) 22 / 34
  • 37. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 38. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Different Flavors of Quality Assurance System testing Integration testing Unit testing Hardware/OS Executable Classes Functions 23 / 34
  • 39. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Integration Tests “End-to-end” tests on the final binaries (black box). Typically less automated and much more lengthy than unit tests (white box). Possible approaches: 1 2 3 Inject stimuli, compare outputs with expected results. GUI automation testing. Challenge the API (cf. Orthanc). Run integration tests (at least) before each release, or even better as part of the nightly builds. System Tests At last, the testing team makes user-level tests. 24 / 34
  • 40. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing Issue Tracker: Link between Engineers, Testers and Users Common Choices Bugzilla, JIRA, FogBugz, Redmine, Trac. Often integrated within the software forge. 25 / 34
  • 41. Introduction Best Programming Practices Software Quality Project Management Summary Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing The Software Quality Iceberg 26 / 34
  • 42. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 43. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 44. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming A New Vision of Project Management The cathedral (monolithic) 27 / 34
  • 45. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming A New Vision of Project Management ⇒ The cathedral (monolithic) The bazaar (agile) 27 / 34
  • 46. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Agility: Cut Down Release Cycles 28 / 34
  • 47. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Agility: Cut Down Release Cycles 28 / 34
  • 48. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Agility: Cut Down Release Cycles ⇒ Features are incrementally added. Software architecture is continuously refactored. 28 / 34
  • 49. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Continuous Testing is at the Center of Agile Development ⇒ The cathedral (monolithic) The bazaar (agile) 29 / 34
  • 50. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 51. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Scrum: Most Popular Agile Methodology 30 / 34
  • 52. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Scrum: The Product Backlog of Orthanc in Trello 31 / 34
  • 53. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 54. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Extreme Programming: Agile Engineering Practices 32 / 34
  • 55. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Extreme Programming: Agile Engineering Practices 32 / 34
  • 56. Introduction Best Programming Practices Software Quality Project Management Summary Agile Methodologies Scrum Extreme Programming Extreme Programming: Agile Engineering Practices 32 / 34
  • 57. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 58. 1 Introduction 2 Best Programming Practices Put Your Code in Revision Control Software Coding Style and Documentation Don’t Reinvent the (Squared) Wheel Design Patterns Other Recommendations 3 Software Quality Software Engineers are Part of the Testing Assertion-Driven Testing Unit Testing Integration and System Testing 4 Project Management Agile Methodologies Scrum Extreme Programming 5 Summary Score Your Project!
  • 59. Introduction Best Programming Practices Software Quality Project Management Summary Score Your Project! Score Your Project! 33 / 34
  • 60. Introduction Best Programming Practices Software Quality Project Management Summary Score Your Project! Any Question? 34 / 34