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

Communicating Code - Windy City Rails 2015

Kyle Crum
September 18, 2015

Communicating Code - Windy City Rails 2015

The code you write is like your handwriting. It makes sense to you, but others might not understand what you write or why you write it. In many ways, writing code is the easy part. Ensuring that your colleagues understand your intentions is more difficult.

This talk will focus on how to communicate effectively in your code.

Kyle Crum

September 18, 2015
Tweet

Other Decks in Programming

Transcript

  1. Design Principles S O L I D Single Responsibility Open/Closed

    Liskov Substitution Interface Segregation Dependency Inversion
  2. Design Principles S O L I D Single Responsibility Open/Closed

    Liskov Substitution Interface Segregation Dependency Inversion KISS
  3. Design Principles S O L I D Single Responsibility Open/Closed

    Liskov Substitution Interface Segregation Dependency Inversion KISS DRY
  4. Design Principles S O L I D Single Responsibility Open/Closed

    Liskov Substitution Interface Segregation Dependency Inversion KISS YAGNI DRY
  5. 2 kinds of classes • Things (models, views, controllers, view

    models). Has state. • Processes Easy Naming
  6. 2 kinds of classes • Things (models, views, controllers, view

    models). Has state. • Processes Hard Naming Easy Naming
  7. ?

  8. ?

  9. What does this say? • Has state • Can be

    passed as argument / variable
  10. vs.

  11. vs.

  12. +

  13. ok?

  14. = =

  15. = =

  16. False Economy • You saved on typing. • Everyone else

    spends more time reading/ understanding.
  17. Good Commit Messages Handle payments of $0 With a marketing

    promotion, some buyers are able to buy low-cost, free shipping items for free. - Skip credit card processing when >= $0 - Create a payment for $0 for tracking
  18. Good Commit Messages Handle payments of $0 With a marketing

    promotion, some buyers are able to buy low-cost, free shipping items for free. - Skip credit card processing when >= $0 - Create a payment for $0 for tracking What
  19. Good Commit Messages Handle payments of $0 With a marketing

    promotion, some buyers are able to buy low-cost, free shipping items for free. - Skip credit card processing when >= $0 - Create a payment for $0 for tracking What Why
  20. When we know what and why • Understand the code

    better. • Understand each other better
  21. When we know what and why • Understand the code

    better. • Understand each other better • Happier, more productive team.
  22. When we know what and why • Understand the code

    better. • Understand each other better • Happier, more productive team. • Programming is fun!