Wicked Bad Ruby

Wicked Bad Ruby

Bad code doesn't exist, but code quality is a real and hard issue to address.
Presentation given at Wicked Good Ruby Boston 2012

C69521d6e22fc0bbd69337ec8b1698df?s=128

Matt Aimonetti

October 12, 2013
Tweet

Transcript

  1. Matt Aimonetti Boston 2013 W I C K E D

    BAD RUBY
  2. @mattetti http://matt.aimonetti.net Matt Aimonetti

  3. @mattetti http://matt.aimonetti.net Matt Aimonetti Steve Martocci

  4. @mattetti http://matt.aimonetti.net Matt Aimonetti Steve Martocci

  5. of Ruby programming “17,520 hours”

  6. None
  7. None
  8. Avdi Grimm “the messiest, nastiest big-ball-of-mud code I have seen

    in my entire career has been in Rails projects.”
  9. Matt Van Horn “I once saw a Rails controller over

    3KLOC long with 500 line create and update methods that were 85% cut & pasted from each other.”
  10. there isn’t such thing as bad code

  11. println "Hello World"

  12. name “Code is neither good or evil, but only a

    place for good and evil” Caesar Marcus “coder” Aurelius
  13. good / bien (fr) / bueno (es) “having desirable quality”

  14. bad / mauvais (fr) / malo (es) “undesirable”

  15. Not scientific terms • Religion • Ethics • Philosophy

  16. Spice Girls “So tell me what you want, what you

    really, really want”
  17. 1. define expected outcome

  18. 2. evaluate solutions

  19. 3. implement

  20. 4. re-evaluate

  21. Me “you aren’t paid to write ‘good’ code, you’re paid

    to deliver great products”
  22. don’t write code

  23. materialize ideas

  24. understand what you are building business objectives timeline proposition value

    players risk factors ...
  25. emo code

  26. delivered the expected outcome

  27. but then...

  28. hard to understand

  29. hard to maintain

  30. hard to scale

  31. slow

  32. Every other Hacker News comment “You’re doing it wrong”

  33. None
  34. Sandi Metz “Classes can be no longer than one hundred

    lines of code”
  35. Sandi Metz “Methods can be no longer than five lines

    of code”
  36. Some StackOverflow Rubyist “You can’t write good code unless you

    use TDD”
  37. None
  38. • fast iterations • level of confidence • robustness •

    syntax beauty • abstraction level • simplicity • known patterns • performance • limited dependencies • test first • learning curve
  39. Amy Hoy “If you try to dictate to other people

    what their values should be, you’re an asshole”
  40. communicate!

  41. focus on the outcome while learning & improving

  42. @mattetti

  43. @mattetti @sandimetz @kytrinyx