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.

To Code Is Human

759 views

Published on

Combining the art of programming with the science of cognitive psychology to emerge with a set of simple, proven techniques that enable programmers to work more effectively.

Published in: Leadership & Management
  • Be the first to comment

To Code Is Human

  1. 1. to code is human
  2. 2. programmers are machines that turn coffee into bugs features
  3. 3. software can only be as healthy as the engineers that create it
  4. 4. manage your energy, not your time
  5. 5. get enough sleep
  6. 6. human beings are rhythmic creatures establish a daily routine
  7. 7. your brain is powered by food garbage in, garbage out
  8. 8. motion is life
  9. 9. sleep, diet, and exercise form the foundation for consistent energy
  10. 10. to get the most out of our brains we need to understand how they work
  11. 11. for approximately 40 minutes per day you are completely blind
  12. 12. human working memory can hold 7±2 items at any one time
  13. 13. lines must be less than 80 characters maximum 5-7 lines of code in a method no more than 3 levels of indentation
  14. 14. def self.to_rgb(c) c.length == 3 ? c.scan(/[0-9a-f]/).map {|v| v.to_i(16)*16}) : c.scan(/[0-9a-f]{2}/i).map {|v| v.to_i(16)} end
  15. 15. we have evolved to remember stories
  16. 16. code that reads like well-written prose gets a cognitive fast-track for both comprehension and recall
  17. 17. HEXDIGIT = /[0-9a-f]/i def to_rgb(color) short_to_rgb(color) || long_to_rgb(color) end def short_to_rgb(color) return unless (color =~ /#{HEXDIGIT}{3}/) color.scan(/#{HEXDIGIT}/).map { |v| v.to_i(16) * 16 } end def long_to_rgb(color) return unless (color =~ /#{HEXDIGIT}{6}/) color.scan(/#{HEXDIGIT}{2}/).map { |v| v.to_i(16) } end
  18. 18. decisions are hard
  19. 19. discipline is overrated build effective habits instead
  20. 20. the reward cycle
  21. 21. test-driven development
  22. 22. human speech is really distracting because we have evolved to focus on it
  23. 23. pair programming
  24. 24. create an environment where excellence is the path of least resistance
  25. 25. werve.net | @matadon

×