SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
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

Contenu connexe

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

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 knowMuhammad Ahsan
 
97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknow97 thingseveryprogrammershouldknow
97 thingseveryprogrammershouldknowREHAN KHAN
 
Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project PresentationShiv Prakash
 
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 programmingHugo Shi
 
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.docxjeffsrosalyn
 
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.docxrtodd599
 
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!)Acquia
 
sri indu 1213 it
sri indu 1213 itsri indu 1213 it
sri indu 1213 itjignash
 
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?Noah Sussman
 
The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012The importance of logs - DefCamp 2012
The importance of logs - DefCamp 2012DefCamp
 
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 RecoveryJohn Coonen
 
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 ReportsSALT Lab @ UBC
 
Devoxx Belgium 2022 - Debugging distributed systems
Devoxx Belgium 2022 - Debugging distributed systemsDevoxx Belgium 2022 - Debugging distributed systems
Devoxx Belgium 2022 - Debugging distributed systemsBert Jan Schrijver
 
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 systemsBert Jan Schrijver
 
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 2014Alan Richardson
 
Code - Fu: Defensive Programming
Code - Fu: Defensive ProgrammingCode - Fu: Defensive Programming
Code - Fu: Defensive ProgrammingSovTech
 
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!Thomas Peham
 
What does "monitoring" mean? (FOSDEM 2017)
What does "monitoring" mean? (FOSDEM 2017)What does "monitoring" mean? (FOSDEM 2017)
What does "monitoring" mean? (FOSDEM 2017)Brian Brazil
 

Similaire à 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)
 

Plus de iMasters

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 MonteiroiMasters
 
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 TellesiMasters
 
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 MoraesiMasters
 
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...iMasters
 
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çalvesiMasters
 
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 -...iMasters
 
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 MartinsiMasters
 
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...iMasters
 
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 ChahoudiMasters
 
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 LeiteiMasters
 
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 BernardesiMasters
 
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 ArnosiMasters
 
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 GroffeiMasters
 
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 MonteiroiMasters
 
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 MaujoriMasters
 
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 SilvaiMasters
 
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...iMasters
 
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 KarklisiMasters
 
Monitoramento de Aplicações - Felipe Regalgo
Monitoramento de Aplicações - Felipe RegalgoMonitoramento de Aplicações - Felipe Regalgo
Monitoramento de Aplicações - Felipe RegalgoiMasters
 
Clean Architecture - Elton Minetto
Clean Architecture - Elton MinettoClean Architecture - Elton Minetto
Clean Architecture - Elton MinettoiMasters
 

Plus de 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
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 

Dernier (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

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