36
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH Secrets of creation of Secrets of creation of reliable + maintainable (= cost effective) reliable + maintainable (= cost effective) software software Jonatan Kazmierczak Jonatan Kazmierczak

Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Embed Size (px)

Citation preview

Page 1: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH

Secrets of creation of Secrets of creation of reliable + maintainable (= cost effective) reliable + maintainable (= cost effective) softwaresoftware

Jonatan KazmierczakJonatan Kazmierczak

Page 2: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Why is it important?

we and our customers want to be cost effective

we want to create reliable and maintainable software we want to help our customers to do the same

Page 3: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

We want to avoid expensive failuresWe want to avoid expensive failures

Page 4: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

About author

senior consultant at Trivadis creator of Class Visualizer creates software for 28 years top rated participant in contests

in programming and data science:HackerRank, TopCoder, Code Jam

conference speaker fan of Atari XL/XE demos

Page 5: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

About author – cont.www.hackerrank.com/jonatan_k

1st rank in Java 1st rank in JavaScript Top 1% in functional programming in Scala Top 1% in SQL Medalist in algorithmic contests

Page 6: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Agenda

Stable ground Clear boundaries Solid foundation Proper construction Quality assurance Summary Questions / Comments

Page 7: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Mottos

"80% of the lifetime cost of a piece of software goes to maintenance" – Java Code Conventions (12.09.1997, Sun Microsystems)

“Everything should be made as simple as possible”– Albert Einstein (probably)

Page 8: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Stable groundStable ground

Page 9: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Stable ground

Clear purpose of the software

Page 10: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Stable ground

Clear requirements classified as

mandatory (must have) desired (should have) optional (nice to have)

Page 11: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Stable ground

Requirements – challenges usually incomplete and not clear enough at the beginning will be extended afterwards some may be changed or removed

Page 12: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Stable ground – checkpoint

Is there an existing product fulfilling the purpose and most of requirements ?

Usually it is cheaper and safer to buy it →than to create the own one

Page 13: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Clear boundariesClear boundaries

Page 14: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Clear boundaries

Clear constraints

cannot change dramatically afterwards→

Page 15: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Clear boundaries

Defined input and output – how to interact with the software

will be extended and maybe changed in the future→

Page 16: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Clear boundaries – checkpoint

Do we have a clear picture of input, output and constrainsof the new software?

Page 17: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Solid foundationSolid foundation

Page 18: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Architecture

allowing to fulfill requirements in the simplest way allowing the software to be:

easily extended possible to change

with limited dependencies on external libraries and tools each dependency can become a project killer→

Page 19: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Design

easy to maintain and to extend clear picture of flows (what, not necessarily how) interfaces (UI, REST, API)

UI mockups highly recommended →

Page 20: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Proper constructionProper construction

Page 21: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementation

starting with mockups of exposed interfaces– for easy integration and verification

Page 22: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementation

correct syntactically, logically, functionally easy to maintain and to extend

Page 23: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementationeasy to maintain and to extend

as simple as possible + clean = easy to understand– with meaningful, descriptive names

with logging tested (discussed later) boilerplate code should be generated

– regeneration should be possible with constants and enums representing:

magic numbers, strings, sets of allowed values

Page 24: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementationeasy to maintain and to extend

best choice of used classes/interfaces first - language API next - existing external libraries last - eventual new libraries

stateless and immutable whenever possible minimal needed visibility/scope no useless/unused code and comments

Page 25: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementationeasy to maintain and to extend

no redundancy/duplications proper exception handling/throwing formatted properly to ensure maximal readability following (language-specific) coding rules and conventions

Page 26: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementation– easy to (re)build

built by execution of one simple command (not only from IDE) fast build for developers long-running build for automated verification outcome: distributable package

Page 27: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Implementation

documented

– especially public APIs / interfaces

Page 28: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Quality assuranceQuality assurance

Page 29: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Quality assurance– involving people

working in pairs review of everything:

requirements, architecture, design, implementation

Page 30: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Quality assurance– automated

sending notifications in case of new problem(s) build unit tests

at least partially written not by author of tested code→

verification of coding rules and conventions

Page 31: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Quality assurance– automated

smoke test integration tests static code analysis system / end-to-end tests

Page 32: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

SummarySummary

Page 33: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

What do you need to be successful

Stable ground Clear boundaries Solid foundation Proper construction Quality assurance

Page 34: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Questions / CommentsQuestions / Comments

Page 35: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Cost effective software – Jonatan Kazmierczak – TechEvent 2017

Session Feedback – now

Please use the Trivadis Events mobile app to give feedback on each session

Use "My schedule" if you have registered for a session;

Otherwise use "Agenda" and the search function

If the mobile app does not work, use the web browser URL: http://trivadis.quickmobileplatform.eu/ User name: <your_loginname> (such as "svv") Password: sent by e-mail...

Page 36: Trivadis TechEvent 2017 Secrets of creation of reliable + maintainable (=cost effective) software by Jonatan Kazmierczak

Thank you!Thank you!Jonatan KazmierczakJonatan Kazmierczak