Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often...

8
Linus W. Dietz, Technical University of Munich Johannes Manner, University of Bamberg Dr. Simon Harrer, University of Bamberg Dr. Jörg Lenhard, Karlstad University 1 Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany Teaching Clean Code

Transcript of Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often...

Page 1: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

Linus W. Dietz, Technical University of Munich

Johannes Manner, University of Bamberg

Dr. Simon Harrer, University of Bamberg

Dr. Jörg Lenhard, Karlstad University

1Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Teaching Clean Code

Page 2: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

ObservationUniversity graduates often lack clean coding proficiency

Why?• Focus on functional correctness

• (Too) many students per course

• Insufficient feedback

• No/short software maintenance period → no awareness

Research questions1) How to teach clean code at university?

2) How to tech clean code at scale?

2Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Introduction

Page 3: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

ProgrammingConcept Exercise Interactive

CodeReview

ProgrammingAssignment

LecturerCode Review

TheoreticalConcept

Walk-ThroughCodeReview Oral Exam

Assignment

Lecture

3Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Didactic Concept

Developed and evaluated over seven years at the University of Bamberg• Advanced Java programming courses• Popular among students, won teaching award

Page 4: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

• Time consuming

• Same mistakes over and over

• Corrector must be skilled

• Good feedback is hard to achieve

• Easy to miss small bugs

7Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Assignment Corrections are the Bottleneck!

Page 5: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

• Most common “Common Issues“

• 70 before / after code examples & explanations

• Actionable names

• For Java learners in their 2nd year and later

8Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Knowledge Base

Page 6: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

9Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Page 7: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

• Static code analysis meta tool

• Based on our teaching experience

• Pre-configured with 107 rules

• Adjustable for specific needs

• Built with

• Available under MIT license on Github

https://github.com/LinusDietz/QualityReview

10Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

QualityReview: Automated Didactic Code Review

Page 8: Teaching Clean Code - lynyus.org · Teaching Clean Code. Observation University graduates often lack clean coding proficiency Why? • Focus on functional correctness • (Too) many

• Re-think your teaching concepts: Do students need to maintain code?

• Encourage the students to establish workflows with code reviews

• Improve feedback time and quality1) Knowledge base: Java by Comparison2) Static code analysis: QualityReview

• Lets collaborate!• How can Java by Comparison be of value in your teaching?• Experiments and studies with QualityReview• Integrate QualityReview in automated code assessment frameworks

12Linus W. Dietz (TUM) | Innovative Software Engineering Education Workshop | March 6, 2018 | Ulm, Germany

Call to Actions