Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Extracting wisdom from stupidity

948 views

Published on

This talk is about 'thinking'. Most of the time we take the process for granted, but so much of our daily lives depends on effective use of this most basic of abilities.
So how does this pertain to extracting wisdom from stupidity?

I hope to show you not _what_, but _how_ I learned by being stupid - and that the programmers love of logic can sometimes be as much an asset as an obstacle.

Published in: Self Improvement
  • Be the first to comment

  • Be the first to like this

Extracting wisdom from stupidity

  1. 1. THE STORY OF A RAFFLER Extracting wisdom from stupidity
  2. 2. About me Ramon de la Fuente Future500 B.V. @f_u_e_n_t_e SweetlakePHP
  3. 3. –Edward de Bono “The purpose of the book has been to shift attention from the problems themselves to the way the mind tackles them”
  4. 4. Stupidity The words "stupid" and "stupidity" entered the English language in 1541. Since then, stupidity has taken place along with "fool," "idiot," "dumb," "moron," and related concepts as a pejorative appellation for human misdeeds, whether purposeful or accidental, due to absence of mental capacity. Stupidity is a quality or state of being stupid, or an act or idea that exhibits properties of being stupid.
  5. 5. Code experiment • 1. Write throw-away code • 2. That performs some function • 3. Wait, what??
  6. 6. Domcode Raffler Rules • 1. Accept a filename as the first CLI argument. • 2. The file will contain a n delimited list of names • 3. Echo a single random name from the list
  7. 7. –Johnny Appleseed “Type a quote here.”
  8. 8. Code experiment • 1. Write a raffler • 2. Using every “array_” function in PHP • 3. Exactly once
  9. 9. Insight
  10. 10. Sequential
  11. 11. Strategic
  12. 12. Logical Thinking Lateral Thinking
  13. 13. Logical Thinking Lateral Thinking A B C A B C Y
  14. 14. Logical Thinking Lateral Thinking A B…Y Z A Z C Y
  15. 15. Evolution
  16. 16. Evolution
  17. 17. Evolution
  18. 18. Evolution –Matt Groening
  19. 19. The Six Stages of Debugging 1. That can't happen. 2. That doesn't happen on my machine. 3. That shouldn't happen. 4. Why is that happening? 5. Oh, I see 6. How did that ever work?
  20. 20. The Six Stages of Debugging 1. That can't happen. 2. That doesn't happen on my machine. 3. That shouldn't happen. 4. Why is that happening? 5. Oh, I see 6. How did that ever work?
  21. 21. • It forces you to plan before you code. • It virtually eliminates coder's block. • Writing Unit tests will improve the design. Test Driven Development?
  22. 22. Scenario: Starting a game Given the dictionary provides "coconut" When I start a game using the dictionary Then there should be 11 guesses available And the revealed word should be "_______" Test Driven Development?
  23. 23. Scenario: Starting a game Given the dictionary provides "coconut" When I start a game using the dictionary Then there should be 11 guesses available And the revealed word should be "_______" Test Driven Development?
  24. 24. Scenario: Starting a game Given the dictionary provides "coconut" When I start a game using the dictionary Then there should be 11 guesses available And the revealed word should be "_______" Test Driven Development?
  25. 25. Problem Solving
  26. 26. Problem Solving
  27. 27. Problem Solving
  28. 28. Better solution Problem Solving Barely working solution
  29. 29. Problem Solving
  30. 30. Better solution Problem Solving Barely working solution
  31. 31. Problem Solving
  32. 32. Problem Solving
  33. 33. ✓ ✗✓ Problem Solving
  34. 34. Problem Solving
  35. 35. Problem Solving
  36. 36. Problem Solving SINGLETONS GOTO SERVICE LOCATOR
  37. 37. Problem Solving SINGLETONS GOTO SERVICE LOCATOR
  38. 38. Problem Solving
  39. 39. Problem Solving
  40. 40. Problem Solving
  41. 41. Problem Solving
  42. 42. Problem Solving
  43. 43. –Edward de Bono “Excellent thinking is of no use if based on an incorrect assumption”
  44. 44. Problem Solving You solve a Rubik’s Cube layer by layer, by applying fixed sequences of moves, leaving previously solved layers intact.
  45. 45. Problem Solving You solve a Rubik’s Cube layer by layer, by applying fixed sequences of moves, leaving previously solved layers intact. a programming problem general patterns
  46. 46. Building a Raffler
  47. 47. Building a Raffler
  48. 48. Building a Raffler
  49. 49. Building a Raffler • Separate by return value • Add complexity score • Group similar functions together • Create composable blocks
  50. 50. Building a Raffler
  51. 51. Building a Raffler
  52. 52. Building a Raffler /* returns original array */ .
  53. 53. Building a Raffler
  54. 54. Building a Raffler
  55. 55. Building a Raffler
  56. 56. Building a Raffler
  57. 57. Building a Raffler
  58. 58. Relevance?
  59. 59. Relevance? “…do I use this interface, or not?” – Senior developer
  60. 60. Relevance? “…do I use this interface, or not?” – Junior developer
  61. 61. Relevance? “…I don’t understand how this can happen” “…how could I make this happen??”
  62. 62. Further reading
  63. 63. “Experience is a museum for mistakes” – Edward de Bono
  64. 64. Feedback on Joind.in: 16863 @f_u_e_n_t_e

×