Writing code you won't hate tomorrow
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Writing code you won't hate tomorrow

on

  • 8,351 views

As developers we write code everyday, only to frown at it a week after that. Why do we have such a hard time with code written by others and ourselves, this raging desire to rewrite everything we see? ...

As developers we write code everyday, only to frown at it a week after that. Why do we have such a hard time with code written by others and ourselves, this raging desire to rewrite everything we see? Writing code that survives the test of time and self judgment is a matter of clarity and simplicity. Let's talk about growing, learning and improving our code with calisthenics, readability and good design.

Statistics

Views

Total Views
8,351
Views on SlideShare
8,102
Embed Views
249

Actions

Likes
242
Downloads
987
Comments
7

10 Embeds 249

https://twitter.com 204
https://www.linkedin.com 28
https://www.silabe.com.br 5
http://blog.jetbrains.com 4
http://professional.local.edit.bloomberg.com 3
http://www.slideee.com 1
https://tweetdeck.twitter.com 1
http://newsblur.com 1
http://eltortugazo.com 1
http://lanyrd.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

15 of 7 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Writing code you won't hate tomorrow Presentation Transcript

  • 1. Writing code that lasts. Rafael Dohms
 @rdohms photo: djandyw.com
  • 2. Writing code 
 you won’t hate tomorrow. Rafael Dohms
 @rdohms photo: djandyw.com
  • 3. Let me introduce you to someone…
  • 4. No Tests. Wrote his own framework. 500 line methods. Used Singletons!
  • 5. photo: Rob Allen (@akrabat)
  • 6. REWRITE ALL THE CODE!
  • 7. Real Developers, SHIP STUFF. photo: Glyn Lowe Photoworks
  • 8. How do we find balance? photo: Kalexanderson
  • 9. Code has an expiration date photo: CarbonNYC
  • 10. Code is perishable, it rots. photo by: massdistraction
  • 11. Code Evolves photo by: kevin dooley
  • 12. Languages evolve. photo by: raneko
  • 13. You evolve. photo by: Kaptain Kobold
  • 14. Complexity 
 kills Comprehension photo: osbornb
  • 15. Bad Design photo: miskan
  • 16. Bad specs
  • 17. NIH source: Urban dictionary photo by: John 'K'
  • 18. NIH | nɒt ɪnˈventɪd hɪə |
 Not Invented Here —The German art of humiliating any technology, agricultural product, or (medical) scientific work that has not been invented or produced in Germany, Switzerland, or Austria. source: Urban dictionary photo by: John 'K'
  • 19. The Solution™ photo: Ian Sane
  • 20. Improve code
  • 21. Improve code make it easier to comprehend
  • 22. Improve code make it easier to comprehend make it flexible
  • 23. Improve code make it easier to comprehend make it flexible make it tested
  • 24. Improve code make it easier to comprehend make it flexible make it tested make it easier to replace, refactor
  • 25. Improve code make it easier to comprehend make it flexible make it tested make it easier to replace, refactor make it not exist
  • 26. Good Design Concepts
  • 27. SOLID Single Responsibility
 Open and Close
 Liskov substitution
 Interface Segregation
 Dependency Inversion photo by j_regan
  • 28. photo by lofink STUPID Singleton
 Tight Coupling
 Untestability
 Premature Optimization
 Indescriptive Naming
 Duplication
  • 29. Design Patterns photo by halloweenstock
  • 30. Composer
  • 31. PIE Proudly
 Invented
 Elsewhere
  • 32. guzzle/guzzle HTTP client for RESTful API clients photo by j_regan
  • 33. morrisonlevi/ardent A library of collections for PHP
  • 34. Readability photo: Morgenland
  • 35. paragraphs photo: Trossachs Photography
  • 36. whitespace
  • 37. R&D Team for MIH/Naspers São PauloCape Town
  • 38. Object Calisthenics photo by: boston_public_library
  • 39. Calisthenics /ˌkaləsˈTHeniks/ Calisthenics are a form of dynamic exercise consisting of a variety of simple, often rhythmical, movements, generally using minimal equipment or apparatus. photo by: boston_public_library
  • 40. Its about perception, not rules or standards photo by: david_a_l
  • 41. #1 Only one indentation level per method. photo by: justinliew
  • 42. #2 Do not 
 use else photo by: justinliew
  • 43. #3 Wrap primitive types, if they contain behavior photo by: justinliew
  • 44. #4 Only one 
 -> per line photo by: justinliew
  • 45. #5 Do not abbreviate. photo by: justinliew
  • 46. #6 Keep your classes small. photo by: justinliew
  • 47. #7 Limit your instance variables to less then 5 photo by: justinliew
  • 48. #8 Use first class collections photo by: justinliew
  • 49. #9 Use getters and setters. photo by: justinliew
  • 50. #10 Document your code. photo by: justinliew
  • 51. Your turn.
  • 52. Improve yourself!
  • 53. Read lots of code!
  • 54. Write simple code.
  • 55. Try Object Calisthenics for a month.
  • 56. Use someone else’s code.
  • 57. Share bite size libraries.
  • 58. Thank you. http://slides.doh.ms http://doh.ms @rdohms we are hiring! https://joind.in/11594 please rate me!
  • 59. http://l.doh.ms/oc-links Video recording Slides Books Resources on 
 Object Calisthenics