SlideShare a Scribd company logo
ERRORS
How cognitive bias prevent you from using them
http://bit.ly/gugu-talk-errors
“‘Error’ is a bad name for good
data.
Feathers, Michael. 2018: Tweet
Availability
heuristic
We expect things to work, ignoring
the usefulness of error
A biased prediction, due to the
tendency to focus on the most salient
and emotionally-charged outcome.
Gabriel, P. Richard: The Rise of Worse Is Better
How I learned to program
How I program after
10 years
“Good judgement is the result of experience,
experience is the result of bad judgement.
Fred Brooks
Treat errors and logs the same
Assert, measure and don’t forget to learn!
Log messages have 10 parts
1. Messages
● Choose one:
○ What happened?
○ What didn’t happen?
○ What should be done?
● DDD (the shit out of) them:
○ Make usage of ubiquitous language
○ The same error should always
produce the same message (allowing
to group them)
Not easy to make them good,
impossible if you don’t start using
them
2. Contexts
● Important details:
○ When it happened?
○ Where it happened?
■ Application name
■ Environment
■ Hostname
○ Severity
○ Facility
● Details to aid debug:
○ User information
○ Stack trace
○ HTTP call being made
○ What file/line generated it?
○ Request ID
● Usually follow a filterable pattern
The devil is on the details
Day-to-day vocabulary
Error
Emergency, Alert, Critical or Error
A database drop, an update without
“where”, hardware failure, resource
stealing, an attack or an old lady
scraping metal to sell… shit happens.
When they happen, we usually have
contingency. But there is a limit to it,
so we act quickly on those - so they
don’t become defects.
2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
Defect
What customers should never face
We never want end-users seeing
errors.
We know them as bugs, but using a
more specific term for when end-users
are affected speeds communication
and resolution.
2008. Pryce, Nat: Throw Defect
Warning
Notice, Info and Debugs
Fixing bugs is also known as
debugging, logs aid on that.
Remember those `var_dump` calls?
Make them log messages and use the
severity based on the likelihood of
defects happening because of them.
2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
Is this message Good or Bad?
Database error
@augustohp not found
Missing DB_DSN environment variable
404: Page not found
Where can you find good error messages?
● Database error messages, care for how variable they are
● HTTP errors are few and precious, not a bingo
● PHP errors are very informative, care for variables as well
When to use variable messages?
Be mindful of who they are for
2002. Spolsky, Joel: The Law of Leaky Abstractions
Hardware
OS
I/O
Language
Framework
App
Abstraction level
2002. Spolsky, Joel: The Law of Leaky Abstractions
Hardware
OS
I/O
Language
Framework
App
Errors “leak” from lower
levels
What if alerts are used?
Cry wolf
You must never filter which error
is relevant
Anthropic bias is when evidence is
biased by “observation selection
effects”.
You don’t want to base your
assumptions over someone’s
observation.
2012. Bostrom, Nick: Anthropic Bias - Observation Selection Effects in Science and Philosophy
Alert over frequency
Monitorama EU 2013 - Lindsay Holmwood: Psychology of alert design
“Abstractions save us time working, not learning.
Joel Spolsky
The PHP cookbook for Errors
Dirty tricks for the day to day
2014. Pascutti, Augusto: Logs - O que eles comem, onde vivem e como se reproduzem
PHP Configuration
Development
You want to see every nasty error
; php.ini
display_errors = On
error_reporting = -1
log_errors = On
error_log = /var/log/php_error.log
Production
Make them sexy, and log them
; php.ini
display_errors = Off
error_reporting = -1
log_errors = On
error_log = /var/log/php_error.log
Chain exceptions
Create 2 base exceptions
2008. Pryce, Nat: Generic Throws
Exception ideas
2008. Pryce, Nat: Throw Defect
Exceptions are for
exceptional cases
C2 Wiki: Don’t use Exceptions For Flow Control
Use monolog (PSR-3)
Aggregate using Syslog
2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
“I would advise students to pay more attention to
the fundamental ideas rather than latest
technology.
The technology will be out-of-date before they
graduate.
Fundamental ideas never get out of date.
David Lorge Parnas
Conclusions
● Errors are not problems
● Treat them like logs
● Log eases debugging
Can I help you make more
mistakes?
Questions? Suggestions?! Beer time?
Credits
● Fonts in use are Ubuntu (Ubuntu) and Gentium Basic (Sil International)
● Theme is based on Solarized color-scheme by Ethan Schoonover

More Related Content

Similar to Erros: Como eles vivem, se alimentam e se reproduzem? - Augusto Pascutti

97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknow97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknow
REHAN KHAN
 
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docxRyan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
jeffsrosalyn
 
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docxRyan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
rtodd599
 
The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012
DefCamp
 
Works For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug ReportsWorks For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug Reports
SALT Lab @ UBC
 

Similar to Erros: Como eles vivem, se alimentam e se reproduzem? - Augusto Pascutti (20)

Selective 97 things every programmer should know
Selective 97 things every programmer should knowSelective 97 things every programmer should know
Selective 97 things every programmer should know
 
97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknow97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknow
 
Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
 
10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programming10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programming
 
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docxRyan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
 
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docxRyan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
Ryan ArcherTopic Panic AttacksSpecific Purpose To inform my.docx
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
sri indu 1213 it
sri indu 1213 itsri indu 1213 it
sri indu 1213 it
 
Software Entomology or Where Do Bugs Come From?
Software Entomology or Where Do Bugs Come From?Software Entomology or Where Do Bugs Come From?
Software Entomology or Where Do Bugs Come From?
 
Pragmatic programmer 2
Pragmatic programmer 2Pragmatic programmer 2
Pragmatic programmer 2
 
The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012
 
Tom Canavan Joomla Security and Disaster Recovery
Tom Canavan Joomla Security and Disaster RecoveryTom Canavan Joomla Security and Disaster Recovery
Tom Canavan Joomla Security and Disaster Recovery
 
Works For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug ReportsWorks For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug Reports
 
Devoxx Belgium 2022 - Debugging distributed systems
Devoxx Belgium 2022 - Debugging distributed systemsDevoxx Belgium 2022 - Debugging distributed systems
Devoxx Belgium 2022 - Debugging distributed systems
 
Arnhem JUG March 2023 - Debugging distributed systems
Arnhem JUG March 2023 - Debugging distributed systemsArnhem JUG March 2023 - Debugging distributed systems
Arnhem JUG March 2023 - Debugging distributed systems
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014
 
Code - Fu: Defensive Programming
Code - Fu: Defensive ProgrammingCode - Fu: Defensive Programming
Code - Fu: Defensive Programming
 
Code - Fu: Defensive Programming
Code - Fu: Defensive ProgrammingCode - Fu: Defensive Programming
Code - Fu: Defensive Programming
 
6 easy bug tracking tips & tricks every developer should know!
6 easy bug tracking tips & tricks every developer should know!6 easy bug tracking tips & tricks every developer should know!
6 easy bug tracking tips & tricks every developer should know!
 
What does "monitoring" mean? (FOSDEM 2017)
What does "monitoring" mean? (FOSDEM 2017)What does "monitoring" mean? (FOSDEM 2017)
What does "monitoring" mean? (FOSDEM 2017)
 

More from iMasters

More from iMasters (20)

O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro
O que você precisa saber para modelar bancos de dados NoSQL - Dani MonteiroO que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro
O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro
 
Postgres: wanted, beloved or dreaded? - Fabio Telles
Postgres: wanted, beloved or dreaded? - Fabio TellesPostgres: wanted, beloved or dreaded? - Fabio Telles
Postgres: wanted, beloved or dreaded? - Fabio Telles
 
Por que minha query esta lenta? - Suellen Moraes
Por que minha query esta lenta? - Suellen MoraesPor que minha query esta lenta? - Suellen Moraes
Por que minha query esta lenta? - Suellen Moraes
 
Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...
Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...
Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...
 
ORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalves
ORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalvesORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalves
ORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalves
 
SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...
SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...
SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...
 
Arquitetando seus dados na prática para a LGPD - Alessandra Martins
Arquitetando seus dados na prática para a LGPD - Alessandra MartinsArquitetando seus dados na prática para a LGPD - Alessandra Martins
Arquitetando seus dados na prática para a LGPD - Alessandra Martins
 
O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...
O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...
O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...
 
Desenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana Chahoud
Desenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana ChahoudDesenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana Chahoud
Desenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana Chahoud
 
Use MDD e faça as máquinas trabalharem para você - Andreza Leite
 Use MDD e faça as máquinas trabalharem para você - Andreza Leite Use MDD e faça as máquinas trabalharem para você - Andreza Leite
Use MDD e faça as máquinas trabalharem para você - Andreza Leite
 
Entendendo os porquês do seu servidor - Talita Bernardes
Entendendo os porquês do seu servidor - Talita BernardesEntendendo os porquês do seu servidor - Talita Bernardes
Entendendo os porquês do seu servidor - Talita Bernardes
 
Backend performático além do "coloca mais máquina lá" - Diana Arnos
Backend performático além do "coloca mais máquina lá" - Diana ArnosBackend performático além do "coloca mais máquina lá" - Diana Arnos
Backend performático além do "coloca mais máquina lá" - Diana Arnos
 
Dicas para uma maior performance em APIs REST - Renato Groffe
Dicas para uma maior performance em APIs REST - Renato GroffeDicas para uma maior performance em APIs REST - Renato Groffe
Dicas para uma maior performance em APIs REST - Renato Groffe
 
7 dicas de desempenho que equivalem por 21 - Danielle Monteiro
7 dicas de desempenho que equivalem por 21 - Danielle Monteiro7 dicas de desempenho que equivalem por 21 - Danielle Monteiro
7 dicas de desempenho que equivalem por 21 - Danielle Monteiro
 
Quem se importa com acessibilidade Web? - Mauricio Maujor
Quem se importa com acessibilidade Web? - Mauricio MaujorQuem se importa com acessibilidade Web? - Mauricio Maujor
Quem se importa com acessibilidade Web? - Mauricio Maujor
 
Service Mesh com Istio e Kubernetes - Wellington Figueira da Silva
Service Mesh com Istio e Kubernetes - Wellington Figueira da SilvaService Mesh com Istio e Kubernetes - Wellington Figueira da Silva
Service Mesh com Istio e Kubernetes - Wellington Figueira da Silva
 
Elasticidade e engenharia de banco de dados para alta performance - Rubens G...
Elasticidade e engenharia de banco de dados para alta performance  - Rubens G...Elasticidade e engenharia de banco de dados para alta performance  - Rubens G...
Elasticidade e engenharia de banco de dados para alta performance - Rubens G...
 
Construindo aplicações mais confiantes - Carolina Karklis
Construindo aplicações mais confiantes - Carolina KarklisConstruindo aplicações mais confiantes - Carolina Karklis
Construindo aplicações mais confiantes - Carolina Karklis
 
Monitoramento de Aplicações - Felipe Regalgo
Monitoramento de Aplicações - Felipe RegalgoMonitoramento de Aplicações - Felipe Regalgo
Monitoramento de Aplicações - Felipe Regalgo
 
Clean Architecture - Elton Minetto
Clean Architecture - Elton MinettoClean Architecture - Elton Minetto
Clean Architecture - Elton Minetto
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 

Erros: Como eles vivem, se alimentam e se reproduzem? - Augusto Pascutti

  • 1. ERRORS How cognitive bias prevent you from using them http://bit.ly/gugu-talk-errors
  • 2. “‘Error’ is a bad name for good data. Feathers, Michael. 2018: Tweet
  • 3. Availability heuristic We expect things to work, ignoring the usefulness of error A biased prediction, due to the tendency to focus on the most salient and emotionally-charged outcome. Gabriel, P. Richard: The Rise of Worse Is Better
  • 4. How I learned to program
  • 5.
  • 6. How I program after 10 years
  • 7.
  • 8. “Good judgement is the result of experience, experience is the result of bad judgement. Fred Brooks
  • 9. Treat errors and logs the same Assert, measure and don’t forget to learn!
  • 10. Log messages have 10 parts
  • 11. 1. Messages ● Choose one: ○ What happened? ○ What didn’t happen? ○ What should be done? ● DDD (the shit out of) them: ○ Make usage of ubiquitous language ○ The same error should always produce the same message (allowing to group them) Not easy to make them good, impossible if you don’t start using them
  • 12. 2. Contexts ● Important details: ○ When it happened? ○ Where it happened? ■ Application name ■ Environment ■ Hostname ○ Severity ○ Facility ● Details to aid debug: ○ User information ○ Stack trace ○ HTTP call being made ○ What file/line generated it? ○ Request ID ● Usually follow a filterable pattern The devil is on the details
  • 14. Error Emergency, Alert, Critical or Error A database drop, an update without “where”, hardware failure, resource stealing, an attack or an old lady scraping metal to sell… shit happens. When they happen, we usually have contingency. But there is a limit to it, so we act quickly on those - so they don’t become defects. 2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
  • 15. Defect What customers should never face We never want end-users seeing errors. We know them as bugs, but using a more specific term for when end-users are affected speeds communication and resolution. 2008. Pryce, Nat: Throw Defect
  • 16. Warning Notice, Info and Debugs Fixing bugs is also known as debugging, logs aid on that. Remember those `var_dump` calls? Make them log messages and use the severity based on the likelihood of defects happening because of them. 2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
  • 17. Is this message Good or Bad?
  • 21. 404: Page not found
  • 22. Where can you find good error messages? ● Database error messages, care for how variable they are ● HTTP errors are few and precious, not a bingo ● PHP errors are very informative, care for variables as well
  • 23. When to use variable messages? Be mindful of who they are for
  • 24. 2002. Spolsky, Joel: The Law of Leaky Abstractions Hardware OS I/O Language Framework App Abstraction level
  • 25. 2002. Spolsky, Joel: The Law of Leaky Abstractions Hardware OS I/O Language Framework App Errors “leak” from lower levels
  • 26. What if alerts are used?
  • 27. Cry wolf You must never filter which error is relevant Anthropic bias is when evidence is biased by “observation selection effects”. You don’t want to base your assumptions over someone’s observation. 2012. Bostrom, Nick: Anthropic Bias - Observation Selection Effects in Science and Philosophy
  • 28. Alert over frequency Monitorama EU 2013 - Lindsay Holmwood: Psychology of alert design
  • 29. “Abstractions save us time working, not learning. Joel Spolsky
  • 30. The PHP cookbook for Errors Dirty tricks for the day to day 2014. Pascutti, Augusto: Logs - O que eles comem, onde vivem e como se reproduzem
  • 32. Development You want to see every nasty error ; php.ini display_errors = On error_reporting = -1 log_errors = On error_log = /var/log/php_error.log
  • 33. Production Make them sexy, and log them ; php.ini display_errors = Off error_reporting = -1 log_errors = On error_log = /var/log/php_error.log
  • 35.
  • 36. Create 2 base exceptions
  • 37. 2008. Pryce, Nat: Generic Throws
  • 39. 2008. Pryce, Nat: Throw Defect
  • 40.
  • 41. Exceptions are for exceptional cases C2 Wiki: Don’t use Exceptions For Flow Control
  • 43. Aggregate using Syslog 2001. Lonvick, C.: The BSD syslog Protocol (IETF RFC 3164)
  • 44.
  • 45. “I would advise students to pay more attention to the fundamental ideas rather than latest technology. The technology will be out-of-date before they graduate. Fundamental ideas never get out of date. David Lorge Parnas
  • 46. Conclusions ● Errors are not problems ● Treat them like logs ● Log eases debugging
  • 47. Can I help you make more mistakes? Questions? Suggestions?! Beer time?
  • 48. Credits ● Fonts in use are Ubuntu (Ubuntu) and Gentium Basic (Sil International) ● Theme is based on Solarized color-scheme by Ethan Schoonover