de:lehre:programmierkonzepte:ws2017:16:index
16. Formatierung
- Themen
- Warum ist Code-Formatierung wichtig?
- Vertikale Formatierung
- Horizontale Formatierung
- Konsistenz: Konventionen und automatische Codeformatierung
- Folien
Zentrale Aspekte
- Codeformatierung ist zu wichtig, um sie zu ignorieren –
oder darum zu eifern. - Formatierung offenbart die Sorgfalt und Professionalität,
die ein Programmierer in seine Arbeit investiert hat. - Formatierung erhöht die Les- und Wartbarkeit von Code.
Die investierte Disziplin überlebt den eigentlichen Inhalt. - Zusammenhänge und getrennte Konzepte sollten sich in
horizontaler und vertikaler Formatierung widerspiegeln. - Konsistenz ist wichtiger als der konkrete Inhalt.
Regeln sollten vom ganzen Team akzeptiert werden.
Weiterführende Literatur
Eine kommentierte und handverlesene Liste mit weiterführender Literatur zum Thema. Die Auswahl ist zwangsläufig subjektiv.
Die Ausführungen folgen in weiten Teilen jenen in [Martin, 2008Martin, Robert C. (2008): Clean Code. A Handbook of Agile Software Craftmanship, Prentice Hall, Upper Saddle River, New Jersey], Kapitel 5. Weitere hilfreiche Erläuterungen zur Formatierung von Quellcode finden sich in Kapitel 31 in [McConnell, 2004McConnell, Steve (2004): Code Complete. A practical handbook of software construction, Microsoft Press, Redmond, Washington] und, wenn auch eher versteckt, in Kapitel 1 in [Kernighan, 1999Kernighan, Brian W.; Pike, Rob (1999): The Practice of Programming, Addison Wesley, Boston].
- Kernighan, Brian W.; Pike, Rob (1999): The Practice of Programming, Addison Wesley, Boston
- Martin, Robert C. (2008): Clean Code. A Handbook of Agile Software Craftmanship, Prentice Hall, Upper Saddle River, New Jersey
- McConnell, Steve (2004): Code Complete. A practical handbook of software construction, Microsoft Press, Redmond, Washington
de/lehre/programmierkonzepte/ws2017/16/index.txt · Zuletzt geändert: 2020/09/30 21:35 von 127.0.0.1