SlideShare a Scribd company logo
1 of 25
to code is human
programmers are machines
that turn coffee into bugs features
software can only be as healthy
as the engineers that create it
manage your energy, not your time
get enough sleep
human beings are rhythmic creatures
establish a daily routine
your brain is powered by food
garbage in, garbage out
motion is life
sleep, diet, and exercise
form the foundation for consistent energy
to get the most out of our brains
we need to understand how they work
for approximately 40 minutes per day
you are completely blind
human working memory can hold
7±2 items at any one time
lines must be less than 80 characters
maximum 5-7 lines of code in a method
no more than 3 levels of indentation
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
we have evolved to remember stories
code that reads like well-written prose
gets a cognitive fast-track
for both comprehension and recall
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
decisions are hard
discipline is overrated
build effective habits instead
the reward cycle
test-driven development
human speech is really distracting
because we have evolved to focus on it
pair programming
create an environment
where excellence
is the path of least resistance
werve.net | @matadon

More Related Content

Viewers also liked (7)

Funciones mentales y emoción ma gabriela
Funciones mentales y emoción ma gabrielaFunciones mentales y emoción ma gabriela
Funciones mentales y emoción ma gabriela
 
La anorexia de Kafka
La anorexia de KafkaLa anorexia de Kafka
La anorexia de Kafka
 
Revista de Quimica
Revista de Quimica Revista de Quimica
Revista de Quimica
 
EMR ch19
EMR ch19EMR ch19
EMR ch19
 
Jesus meu guia é - LEONARDO GONÇALVEZ
Jesus meu guia é - LEONARDO GONÇALVEZJesus meu guia é - LEONARDO GONÇALVEZ
Jesus meu guia é - LEONARDO GONÇALVEZ
 
Presentacion exonerados 2
Presentacion exonerados 2Presentacion exonerados 2
Presentacion exonerados 2
 
Diapositivas cultura yudis 1
Diapositivas cultura yudis 1Diapositivas cultura yudis 1
Diapositivas cultura yudis 1
 

Similar to To Code Is Human

Computer and Programming
Computer and Programming Computer and Programming
Computer and Programming
Mahsa Ch
 
Iaetsd robo control sytsem design using arm
Iaetsd robo control sytsem design using armIaetsd robo control sytsem design using arm
Iaetsd robo control sytsem design using arm
Iaetsd Iaetsd
 

Similar to To Code Is Human (20)

Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
Coding
CodingCoding
Coding
 
Computer basics slideshare
Computer basics slideshareComputer basics slideshare
Computer basics slideshare
 
Introduction Microsoft Word
Introduction Microsoft WordIntroduction Microsoft Word
Introduction Microsoft Word
 
Cuadernillo inglés Tecnico
Cuadernillo inglés TecnicoCuadernillo inglés Tecnico
Cuadernillo inglés Tecnico
 
Lecture 2 - Introductory Concepts
Lecture 2 - Introductory ConceptsLecture 2 - Introductory Concepts
Lecture 2 - Introductory Concepts
 
smart note writer
smart note writersmart note writer
smart note writer
 
Computer and Programming
Computer and Programming Computer and Programming
Computer and Programming
 
IRJET- KC Draw using Arduino
IRJET- KC Draw using ArduinoIRJET- KC Draw using Arduino
IRJET- KC Draw using Arduino
 
Smart note maker
Smart note makerSmart note maker
Smart note maker
 
Iaetsd robo control sytsem design using arm
Iaetsd robo control sytsem design using armIaetsd robo control sytsem design using arm
Iaetsd robo control sytsem design using arm
 
INTRODUCTION TO INFORMATION TECHNOLOGY -SARASWATHI RAMALINGAM
INTRODUCTION TO INFORMATION TECHNOLOGY -SARASWATHI RAMALINGAMINTRODUCTION TO INFORMATION TECHNOLOGY -SARASWATHI RAMALINGAM
INTRODUCTION TO INFORMATION TECHNOLOGY -SARASWATHI RAMALINGAM
 
PERFORMANCE MEASUREMENT ANALYSIS OF RANDOM ACCESS MEMORY, L2 CACHE AND L1 CAC...
PERFORMANCE MEASUREMENT ANALYSIS OF RANDOM ACCESS MEMORY, L2 CACHE AND L1 CAC...PERFORMANCE MEASUREMENT ANALYSIS OF RANDOM ACCESS MEMORY, L2 CACHE AND L1 CAC...
PERFORMANCE MEASUREMENT ANALYSIS OF RANDOM ACCESS MEMORY, L2 CACHE AND L1 CAC...
 
Automatic writing machine based on Arduino
Automatic writing machine based on ArduinoAutomatic writing machine based on Arduino
Automatic writing machine based on Arduino
 
IRJET- Computer vs Human Brain: An Analytical Approach and Overview
IRJET-  	  Computer vs Human Brain: An Analytical Approach and OverviewIRJET-  	  Computer vs Human Brain: An Analytical Approach and Overview
IRJET- Computer vs Human Brain: An Analytical Approach and Overview
 
INTRODUCtion to computing.pptx
INTRODUCtion to computing.pptxINTRODUCtion to computing.pptx
INTRODUCtion to computing.pptx
 
Computer science basics for nonit students
Computer science basics for nonit studentsComputer science basics for nonit students
Computer science basics for nonit students
 
Introductiontopcoperationsncii 130724004019-phpapp01
Introductiontopcoperationsncii 130724004019-phpapp01Introductiontopcoperationsncii 130724004019-phpapp01
Introductiontopcoperationsncii 130724004019-phpapp01
 
Characteristics of computer.pptx
Characteristics of computer.pptxCharacteristics of computer.pptx
Characteristics of computer.pptx
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
 

Recently uploaded

Agile Coaching Change Management Framework.pptx
Agile Coaching Change Management Framework.pptxAgile Coaching Change Management Framework.pptx
Agile Coaching Change Management Framework.pptx
alinstan901
 
internship thesis pakistan aeronautical complex kamra
internship thesis pakistan aeronautical complex kamrainternship thesis pakistan aeronautical complex kamra
internship thesis pakistan aeronautical complex kamra
AllTops
 
The Psychology Of Motivation - Richard Brown
The Psychology Of Motivation - Richard BrownThe Psychology Of Motivation - Richard Brown
The Psychology Of Motivation - Richard Brown
SandaliGurusinghe2
 
Beyond the Codes_Repositioning towards sustainable development
Beyond the Codes_Repositioning towards sustainable developmentBeyond the Codes_Repositioning towards sustainable development
Beyond the Codes_Repositioning towards sustainable development
Nimot Muili
 
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTECAbortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
Abortion pills in Riyadh +966572737505 get cytotec
 

Recently uploaded (17)

Marketing Management 16th edition by Philip Kotler test bank.docx
Marketing Management 16th edition by Philip Kotler test bank.docxMarketing Management 16th edition by Philip Kotler test bank.docx
Marketing Management 16th edition by Philip Kotler test bank.docx
 
Safety T fire missions army field Artillery
Safety T fire missions army field ArtillerySafety T fire missions army field Artillery
Safety T fire missions army field Artillery
 
digital Human resource management presentation.pdf
digital Human resource management presentation.pdfdigital Human resource management presentation.pdf
digital Human resource management presentation.pdf
 
Agile Coaching Change Management Framework.pptx
Agile Coaching Change Management Framework.pptxAgile Coaching Change Management Framework.pptx
Agile Coaching Change Management Framework.pptx
 
Leaders enhance communication by actively listening, providing constructive f...
Leaders enhance communication by actively listening, providing constructive f...Leaders enhance communication by actively listening, providing constructive f...
Leaders enhance communication by actively listening, providing constructive f...
 
Dealing with Poor Performance - get the full picture from 3C Performance Mana...
Dealing with Poor Performance - get the full picture from 3C Performance Mana...Dealing with Poor Performance - get the full picture from 3C Performance Mana...
Dealing with Poor Performance - get the full picture from 3C Performance Mana...
 
How Software Developers Destroy Business Value.pptx
How Software Developers Destroy Business Value.pptxHow Software Developers Destroy Business Value.pptx
How Software Developers Destroy Business Value.pptx
 
internship thesis pakistan aeronautical complex kamra
internship thesis pakistan aeronautical complex kamrainternship thesis pakistan aeronautical complex kamra
internship thesis pakistan aeronautical complex kamra
 
The Psychology Of Motivation - Richard Brown
The Psychology Of Motivation - Richard BrownThe Psychology Of Motivation - Richard Brown
The Psychology Of Motivation - Richard Brown
 
Intro_University_Ranking_Introduction.pptx
Intro_University_Ranking_Introduction.pptxIntro_University_Ranking_Introduction.pptx
Intro_University_Ranking_Introduction.pptx
 
Independent Escorts Vikaspuri / 9899900591 High Profile Escort Service in Delhi
Independent Escorts Vikaspuri  / 9899900591 High Profile Escort Service in DelhiIndependent Escorts Vikaspuri  / 9899900591 High Profile Escort Service in Delhi
Independent Escorts Vikaspuri / 9899900591 High Profile Escort Service in Delhi
 
Strategic Management, Vision Mission, Internal Analsysis
Strategic Management, Vision Mission, Internal AnalsysisStrategic Management, Vision Mission, Internal Analsysis
Strategic Management, Vision Mission, Internal Analsysis
 
Beyond the Codes_Repositioning towards sustainable development
Beyond the Codes_Repositioning towards sustainable developmentBeyond the Codes_Repositioning towards sustainable development
Beyond the Codes_Repositioning towards sustainable development
 
International Ocean Transportation p.pdf
International Ocean Transportation p.pdfInternational Ocean Transportation p.pdf
International Ocean Transportation p.pdf
 
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTECAbortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
Abortion pills in Jeddah |• +966572737505 ] GET CYTOTEC
 
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professionalW.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
W.H.Bender Quote 62 - Always strive to be a Hospitality Service professional
 
Reviewing and summarization of university ranking system to.pptx
Reviewing and summarization of university ranking system  to.pptxReviewing and summarization of university ranking system  to.pptx
Reviewing and summarization of university ranking system to.pptx
 

To Code Is Human

Editor's Notes

  1. “dhh stick with rails” — focus on computational efficiency but neglect our most important tools software engineering — not algorithms — human infrastructure old joke: “mathematicians turn coffee into theorems”
  2. mind is an incredible machine to get the most out, learn how it works and how to maintain good investment is quality machines — best investment in human infra start with hardware
  3. fail to care for hardware then software suffers — piku and anti-work body not infinite capacity — what do we want to optimize hardware for? strength/speed probably not important consistent energy delivery — often ignored but keeps us in the zone
  4. people obsess over getting more hours pulling all-nighters, caffeine / nootropic drugs (alcohol joke) goal is quality hours — image if all your hours were in the zone most fundamental thing to getting quality hours…
  5. don’t cut sleep to get more time — better hours, not more hours wake at regular time, go to bed when tired — even weekends (jetlag) alcohol reduces REM, sleep just as long, but less rested my tool: bedtime on iOS — sleep important because it sets daily rhythm
  6. our bodies have two rhythms: daylight and food (jetlag) eating, sleeping, waking, and working at the same time every day reduces stress, increases energy, and boosts focus my tools: calendar everything, same schedule on weekends
  7. you don’t need to live off organic tofu but your brain can only work as well as the fuel you put in insulin sensitivity and energy spikes my tools: weekly meal planning, slow carbs, avoid processed food
  8. exercise — documented benefits; endorphins, blood flow == brain good don’t focus on the best, focus on what you will actually do try things until you find what you like my tools: first step / incrementalism / progress tracking
  9. can not stress how important these are consistent energy puts us at the top of our game great hardware requires great software — to write great software…
  10. good rubyists know the quirks of the language creative professionals — most valuable tools are our minds like any tool — optimal use — limitations there’s a lot you might not know about your brain…
  11. saccade blindness — narrow focus for the eye, so it moves actually the fastest motion in the human body > 20 degrees == head movement (half monitor) long lines and functions are exhausting to scan principle discovered by ancient typographers
  12. limit to your working memory — degrades not drops remember “almost right” ever lose track of things while in a function? this is why
  13. heard this before — joel spolsky and uncle bob complaint: arbitrary rules, like straightjacket, bigger terminals now you understand why? cognitive and physical limits why matters — you can follow the rules and still end up with
  14. extreme example — plenty of “small code” like this in production this code (basically) follows all the rules — is “small code” not “readable code” three bugs are hidden in this mess readability really matters — because of how our memories work
  15. writing 10k years, talking for millions of years through oral tradition — method of loci (cicero the roman) remember my story about the piku bug?
  16. code that reads like a story has a fast-track to understanding and long-term memory …and saves energy! if we refactor the above snippet…
  17. everything is much clearer knowing the rule is good, knowing why helps you apply it another interesting aspect of human psychology
  18. decision use energy (remember energy?) — limited per day story: inmates up for parole, interviews fall back on path of least resistance discipline means choosing to do the right thing
  19. habits are decisions that you have made beforehand can’t rely on discipline — teach your brain to do the right thing automatically many “best practices” are just good habits that leverage the brain one example…
  20. reward cycle — dopamine and serotonin motivates with anticipation — then rewards — reward fades how people get addicted to exercise — new car becomes just a car this is motivation — this is why you do… everything; in programming
  21. the goal is the feature, not writing tests put the busywork first and it becomes part of the goal tld relies on discipline, saps energy
  22. birds sounding the alarm when a predator nears Wernicke's area right behind the ear — speech processing engagement headphones block most sound what if you could productively engage?
  23. engages the speech area of your brain, removes distraction real-time code review (remember that reward cycle?) review-later *can* work, but it takes more energy and discipline energy is a biggie
  24. stable energy and health through diet, exercise, sleep, and regularity use memory limits, reward cycle, and decision fatigue to your advantage by building habits for a successful career — as well as a happy life
  25. always forget — write articles on how to CTO from management to teaching software engineering any questions?