Skip to content

fredrikmork/clean-code-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Clean Code Workshop

Length: ~ 3 hours

This module is split into five parts, and the course includes hands on coding, a lecture and presentations of the code you just made.

Part 0: Plan, Goals and Motivation

Length: 10 minutes

Q: What do you associate with clean code?

Part 1: Presentation

Length: 30-45 minutes

  • Story of a time I messed up (not writing clean code)
  • Meaningful Names: Class, Functions and Variables
  • Functions and Classes: Keep Them Small! Should do one thing, explanatory names.
  • DRY KISS
  • Comments and Documentation
  • Formatting
  • Error Handling
  • TDD and Testing
  • Consistency
  • Code Smells: Argumnents, dead code, duplication, information at the wrong level of abstraction, understand the algorithm, conventions, negative conditionals, don't be arbitrary, use datatypes
  • Example of Code Transformed From Bad Code To Clean Code

Part 2: Improve the Code

Length: 90 minutes

Use your knowledge and the piece of information you have just learned to tidy up the already working code. Maybe you found an error within the program?

Rules for number to roman numerals and vice versa

Other site

Choose one of the following:

Pro tip: you can use this online compiler online compiler If you want to test the code in the repo in this online compiler you must paste it inside the main program:

using System.Collections.Generic;
using System;
using System.Linq;

public class RomanNumeralsConverter
{
   -> Here for the proposed solution

    public static void Main(string[] args) //Delete this if you are using the proposed solution
    {
    -> Here for presentation-code
    }
}

Part 3:

Length: 20-30 minutes You can either choose option a) or option b).

  • a) - Joint review, everyone presents how they cleansed their code with the presented principles.

  • b) - Pair review, group up and present your solution to each other.

Part 4: Conclusion and Discussion

Length: 10 min

What have we learned from this? In pairs; list 2 things you have learned and present them to the rest of the group.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages