Slide 1

Slide 1 text

CSE360 Introduction to Software Engineering Lecture 07: Clean Coding Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu Office Hours: By appointment

Slide 2

Slide 2 text

Previously …

Slide 3

Slide 3 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 3 Agile in a Nutshell

Slide 4

Slide 4 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 4 Agile in a Nutshell

Slide 5

Slide 5 text

Clean Coding

Slide 6

Slide 6 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 6 Clean Code • Use Javadoc for Classes and Public Methods • DRY – Do not Repeat Yourselves • KIS – Keep It Simple • Readability – Make it simple to read for another human

Slide 7

Slide 7 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 7 Assignment 2 - Refactor 1. Clock (Runnable, Thread, Timer) 2. Calculator – be creative with the space 3. Draw a Flag (any country) 4. Add an animation (something like sparky dancing) 5. Convert miles to kilometers, pound to kilogram 6. MouseListener in action: draw a dot in the place that the user click 7. Draw a Chessboard 8. Split your space into 4 (2 rows, 2 columns) and add in each space either a widget, an image, or a draw 9. An infinite counter 0 to 9 (Runnable, Thread, Timer) 10. Surprise me!

Slide 8

Slide 8 text

CSE360 – Introduction to Software Engineering Javier Gonzalez-Sanchez [email protected] Summer 2022 Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.