Maintainability and Clean Code
Advanced Programming, Lecture 11
Advanced Programming, Lecture 11
29
0.0 (0)
Kartei Details
Karten | 29 |
---|---|
Sprache | Deutsch |
Kategorie | Informatik |
Stufe | Universität |
Erstellt / Aktualisiert | 26.03.2021 / 03.04.2021 |
Lizenzierung | Keine Angabe |
Weblink |
https://card2brain.ch/box/20210326_maintainability_and_clean_code
|
Einbinden |
<iframe src="https://card2brain.ch/box/20210326_maintainability_and_clean_code/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>
|
Maintainability
- degree of effectiveness and efficiency with which the product can be modified
- consists of
- Analysability
- Modularity
- Reusability
- Modifiability
- Testability
Why is Maintainability important?
- reduces costs during maintenance
- enables other 7 characteristics of software product quality (security, functional suitability, performance)
How is Maintainability achieved?
- writing clean code
- improves internal and external quality of product
Clean Code - Definition
- clear, understandable, comprehensible, logical and disciplined implementation of code
- code is designed to be easy to read, change, expand and maintain
Conventions - Idea and Problem
Idea:
- improve readability by creating common look and feel
Problems:
- Conventions are ignored (no knowledge)
- Conventions differ between languages and communities
Convention - English
Reasons for other Languages
- harder to write english commentaries/find names
- bad english skills could lead to misunderstandings/typos
Reasons for using English:
- English communities are much larger
- for help of english community, dont have to translate
- no mixture of english programming language and local language
- you should be able to read and speak fluent English
Convention - which to use
- use language default
- detailed guidelines available
- style switches necessary when working on multiple projects within the same team or project with multiple languages
- decide in your team on a standard
- keep consistent
- one style over all languages
- maybe switching styles between teams
Bad Smells - Definition
- indications of poor coding and design choices that may lead to bad maintainability
- technically not incorrect
- indicate weaknesses and could be slowing down development or increase risk of bugs
- code vs architectural level