Using Real Code to Teach Good Programming Practices

Resumo


“Talk is cheap. Show me the code”. Using real code examples is a way of engaging students while teaching Software Engineering. By applying this technique, this paper describes the experience of introducing good development practices in the course “Programming Techniques II”, offered for students of the Bachelor in Computer Science of the Institute of Mathematics and Statistics of the University of São Paulo (IME-USP). At the beginning of the course, students received two exercises: in the first, each student should present a code snippet that they consider well written; in the second, a code snippet that they consider problematic. The snippets were then analyzed in the classroom – with active participation of the students – to map good and bad practices. This process was repeated until reaching theoretical saturation. In the end, the discussions converged on many techniques used to write clean code, thus validating the use of a constructive approach to teach good development practices.
Palavras-chave: ensino, programação
Publicado
07/11/2022
DURELLI, Rafael Serapilha; CORDEIRO, Renato; GOLDMAN, Alfredo. Using Real Code to Teach Good Programming Practices. In: SIMPÓSIO BRASILEIRO DE QUALIDADE DE SOFTWARE (SBQS), 21. , 2022, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 287-295.