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

The Bipolar Programmer

The Bipolar Programmer

My StarTechConf 2013 talk

Ee64bbdcdeffabc6d4166a96e6d2a0d5?s=128

Jano González

October 26, 2013
Tweet

Transcript

  1. THE BIPOLAR PROGRAMMER

  2. $ whoami

  3. @janogonzalez

  4. @hop_in

  5. A TALE OF TWO DEVELOPERS

  6. HACKER V/S  THINKER

  7. HACKER

  8. GET THINGS DONE

  9. FAST

  10. HACKS

  11. MAINTENANCE NIGHTMARE

  12. NEEDS MORE DUCT TAPE

  13. THINKER

  14. THINKS ABOUT ABSTRACTIONS

  15. THINKS ABOUT MAINTAINABILITY

  16. TOO MANY ABSTRACTIONS

  17. ANALYSIS PARALYSIS

  18. NEEDS MORE LAYERS

  19. MY HISTORY

  20. A TRILOGY OF MOVIES

  21. THE HACKER YEARS

  22. THE HACKER YEARS

  23. THE LEARNING YEARS

  24. THE UML YEARS

  25. THE UML YEARS

  26. THE HACKER WAS GONE

  27. UML, RUP, GoF, XML, ETC.

  28. STOCKHOLM SYNDROME

  29. EVOLUTION?

  30. THE ONE TRUE WAY™

  31. THE PATH?

  32. FEAR

  33. I WAS SO WRONG!

  34. EVERYDAY LIFE  IS THE PATH

  35. ENTER RUBY

  36. SMALLTALK IN PERL’S DISGUISE

  37. HAPPY THINKER

  38. THINKER class AccountProtectionProxy def initialize(real_account, owner) @subject = real_account @owner

    = owner end ! def method_missing(name, *args) check_access @subject.send(name, *args) end ...
  39. OMG! GoF NEVER WAS SO EASY

  40. HAPPY HACKER

  41. HACKER $1 if str ~= /(foo)+/

  42. ONE LINERS FTW!

  43. HACKER ❤ THINKER

  44. LET’S WORK TOGETHER

  45. HARMONY

  46. HARMONY (1..42).select(&:even?). map { |n| n * 2 }. reduce(&:*)

  47. EXPRESS YOURSELF

  48. EXPRESS YOURSELF File.open('my.txt').each do |line| puts line if line =~

    /jano/ end
  49. THE PATH

  50. THE PATH IS NO PATH

  51. THE PATH

  52. WORKING TOGETHER

  53. HACKER

  54. EXPLORE NEW TERRITORY

  55. THINKER

  56. FIND ACCEPTANCE CRITERIA

  57. DEFINE COMPONENTS

  58. BALANCE

  59. DELIVER VALUE V/S DIMINISH TECHNICAL DEBT

  60. CREATIVITY V/S STANDARDIZATION

  61. EXAMPLE

  62. CASE STATEMENT V/S FACTORY + COMMANDS

  63. EXAMPLE case account_type when :premium then # do stuff when

    :standard then # do stuff when :personal then # do stuff end
  64. EXAMPLE class PremiumAccount def initialize # do stuff end !

    def execute(context) # do stuff end end
  65. EXAMPLE class AccountFactory def self.create(type) name = "#{type.capitalize} Account" klass

    = Kernel.const_get(name) klass.new end end
  66. EXAMPLE AccountFactory .create(account_type) .execute(context)

  67. IMPLICIT V/S EXPLICIT

  68. CLARITY V/S DRY

  69. CLARITY V/S SRP

  70. NOW V/S FUTURE

  71. MY HUMBLE ADVICE

  72. LEARN ABOUT BEST PRACTICES

  73. DON’T FOLLOW BLINDLY YOUR FUNCTIONAL GURU

  74. DON’T FOLLOW BLINDLY YOUR OO GURU

  75. TESTS + REFACTORING

  76. HOW TO IMPROVE

  77. HACKER

  78. LEARN ABOUT OOP & PATTERNS

  79. TRY IMMUTABILITY & SEQUENCES

  80. DO SEPARATE RESPONSIBILITIES

  81. THINKER

  82. LEARN ABOUT ONE LINERS

  83. TRY CODE GOLF

  84. DO EVIL STUFF

  85. EVERYONE

  86. READ A LOT OF CODE

  87. WRITE A LOT OF CODE

  88. ONE LAST ADVICE

  89. कഁ཭

  90. SHU कഁ཭

  91. HA कഁ཭

  92. RI कഁ཭

  93. None
  94. CONCLUSIONS

  95. RUBY GIVES YOU FREEDOM

  96. LETS YOU STRIVE FOR BALANCE

  97. AVOID CARGO CULT

  98. GOOD ADVICE V/S LAWS

  99. THERE IS NO TRUE PATH

  100. IF YOU MEET THE BUDDHA IN THE ROAD, KILL HIM!

  101. FOLLOW YOUR ❤

  102. THANK YOU! ❤

  103. IMAGES ! • http://commons.wikimedia.org/wiki/File:Yin_yang.svg • http://upload.wikimedia.org/wikipedia/commons/archive/f/ f4/20050917122925%21Janus-Vatican.JPG