23.03.2011 Artykuły

Clean Code with Robert C. Martin

Do you know Uncle Bob? Yes, that's this guy who know how to turns bad code into clean. And he can teach you his techniques.

Even bad code can function. But if code isn't clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn't have to be that way?

We have invited Robert C. Martin a.k.a Uncle Bob for two-day Clean Code Workshop to learn the principles and practices of Clean Code as described in his book:

Clean Code: A Handbook of Agile Software Craftsmanship.

This Clean Code course alternates between lecture and exercise so that you can experience, first-hand, the practices and disciplines of these fundamental topics.

Learning objectives:

  • Professionalism, Craftsmanship, and Clean Code.
  • Choosing Meaningful Names
  • Writing Clean Functions
  • The Proper Use of Comments
  • Coding Style and Formatting
  • Object Oriented Programming vs. Procedural Programming.
  • Error Handling
  • Boundaries between Subsystems
  • Unit testing, and Test Driven Development
  • Writing Clean Classes
  • Systems
  • Plan vs. Emergence
  • Concurrency
  • Smells and Heuristics.

Participants:

Dedicated for Java/C#/C++programmers that would like to create better code. Basic programming skills required.

Learning Outcomes

  • An attitude of professional craftsmanship.
  • How to tell the difference between good and bad code.
  • How to create write good code and transform bad code into good code.
  • How to create good names, good functions, good objects, and good classes.
  • How to format code for maximum readability.
  • How to implement complete error handling without obscuring code logic.
  • Effective unit testing and refactoring techniques.

Exercises

This is an exercise driven course. Each topic is driven home through the use of hands-on exercises in which the students must work together to write new code, or alter existing code to resolve, enhance and improve the quality of the code.

Scope

Day 1

  • Clean Code
    • There Will Be Code
    • Bad Code
    • The Total Cost of Owning a Mess
    • The Grand Redesign in the Sky
    • What is Clean Code?
    • A review of expert opinions.
    • Schools of Thought
    • The Boy Scout Rule
  • Meaningful Names
    • Use Intention Revealing Names
    • Avoid Disinformation
    • Make Meaningful Distinctions
    • Use Pronounceable Names
    • Use Searchable Names
    • Avoid Encodings
    • Avoid Mental Mapping
    • Class Names
    • Method Names
    • Don’t be Cute
    • One Word per Concept
    • No Puns
    • Solution Domain Names
    • Problem Domain Names
  • Functions
    • Small!
    • Do One Thing.
    • One Level of Abstraction
    • Switch Statements
    • Function Names (again).
    • Arguments and Parameters
    • Side Effects
    • Command Query Separation
    • Exceptions
    • DRY – Don’t Repeat Yourself.
    • Structured Programming
  • Comments
    • Why and When to Write Comments
    • Explain Yourself in Code
    • Good Comments
    • Bad Comments
  • Formatting
    • The Purpose of Formatting
    • Vertical Formatting
    • The Newspaper Metaphor
    • Horizontal Formatting
  • Summary

Day 2

  • Objects and Data Structures
    • Data Abstraction
    • Data/Object Anti-symmetry
    • The Law of Demeter
    • Data Transfer Objects
  • Error Handling
    • Use Exceptions not Return Codes
    • Write your try/catch Statements First
    • Use Unchecked Exceptions
    • Provide Context with Exceptions
    • Define Exception Classes for Callers
    • Define Normal Flow
    • Don’t Return Null
    • Don’t Pass Null
  • Boundaries
    • Using Third Party Code
    • Exploring and Learning Boundaries
    • Learning Log4J
    • Learning Tests are Better than Free
    • Using Code that Does Not Yet Exist.
    • Clean Boundaries
  • Unit Tests
    • The Three Laws of TDD
    • Keeping Tests Clean
    • Domain Specific Testing Language
    • One Assert
    • F.I.R.S.T.
  • Classes
    • Class Organization
    • Small Classes
    • The Single Responsibility Principles (SRP)
    • Maintaining Cohesion
    • Organizing for Change
  • Smells and Heuristics
    • Dozens and dozens of them.
  • Conclusion

If you are interested in organizing this training for you contact us.