Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE360 Tutorial 02

CSE360 Tutorial 02

Introduction to Software Engineering
Clean Coding
(202205)

Javier Gonzalez-Sanchez
PRO

May 30, 2022
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

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

    View Slide

  2. Previously …

    View Slide

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

    View Slide

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

    View Slide

  5. Clean Coding

    View Slide

  6. 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

    View Slide

  7. 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!

    View Slide

  8. 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.

    View Slide