Fail Fast. Into User's Face.

/10@yegor256 1
Fail Fast.

Into User’s Face.
Yegor Bugayenko
/10@yegor256 2
be arrogant
/10@yegor256 3
int len(File f) {
if (f == null) {
return -1;
}
}
int len(File f) {
if (f == null) {
throw new Exception(
“file can’t be NULL”
);
}
}
/10@yegor256 4
try {
stream.read();
} catch (IOException ex) {
ex.printStackTrace();
}
try {
stream.read();
} catch (IOException ex) {
throw new RuntimeException(
“failed to read stream”,
ex
);
}
/10@yegor256 5
void push(int x) {
if (pos < array.length) {
array[pos++] = x;
}
}
void push(int x) {
if (pos >= array.length) {
throw new Exception(
“array is full”
);
}
array[pos++] = x;
}
/10@yegor256 6
@Override
void save() {
// not implemented yet
}
@Override
void save() {
throw new Exception(
“not implemented yet”
);
}
/10@yegor256 7
file.delete();
if (!file.delete()) {
throw new Exception(
“failed to delete file”
);
}
/10@yegor256 8
User find(int id) {
if (/* not found */) {
return null;
}
// continue...
}
User find(int id) {
if (/* not found */) {
throw new Exception(
“user not found”
);
}
// continue...
}
/10@yegor256 9
fix
report
use
deploy
/10@yegor256 10
www.yegor256.com
1 of 10

Recommended

Need It Robust? Make It Fragile! by
Need It Robust? Make It Fragile!Need It Robust? Make It Fragile!
Need It Robust? Make It Fragile!Yegor Bugayenko
1.7K views12 slides
Data File Handiling File POINTERS IN C++ by
Data File Handiling File POINTERS IN C++Data File Handiling File POINTERS IN C++
Data File Handiling File POINTERS IN C++subham sahu
159 views12 slides
Inheritance by
InheritanceInheritance
Inheritanceآصف الصيفي
95 views3 slides
working with files by
working with filesworking with files
working with filesSangeethaSasi1
27 views18 slides
ATS Internals by
ATS InternalsATS Internals
ATS InternalsChao Xu
187 views11 slides
Ajax - a quick introduction by
Ajax - a quick introductionAjax - a quick introduction
Ajax - a quick introductionStefan Pettersson
561 views19 slides

More Related Content

What's hot

Clone database using_active_duplicate by
Clone database using_active_duplicateClone database using_active_duplicate
Clone database using_active_duplicateViaggio Italia
226 views3 slides
Hands On Spring Data by
Hands On Spring DataHands On Spring Data
Hands On Spring DataEric Bottard
1.6K views39 slides
Commit2015 kharchenko - python generators - ext by
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - extMaxym Kharchenko
658 views26 slides
2015 555 kharchenko_ppt by
2015 555 kharchenko_ppt2015 555 kharchenko_ppt
2015 555 kharchenko_pptMaxym Kharchenko
2K views46 slides
Matthew Vignau: Memory Management in SharePoint 2007 Development by
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentMatthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentSharePoint Saturday NY
420 views25 slides
Sensu wrapper-sensu-summit by
Sensu wrapper-sensu-summitSensu wrapper-sensu-summit
Sensu wrapper-sensu-summitLee Briggs
108 views18 slides

What's hot(20)

Clone database using_active_duplicate by Viaggio Italia
Clone database using_active_duplicateClone database using_active_duplicate
Clone database using_active_duplicate
Viaggio Italia226 views
Hands On Spring Data by Eric Bottard
Hands On Spring DataHands On Spring Data
Hands On Spring Data
Eric Bottard1.6K views
Commit2015 kharchenko - python generators - ext by Maxym Kharchenko
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko658 views
Matthew Vignau: Memory Management in SharePoint 2007 Development by SharePoint Saturday NY
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentMatthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 Development
Sensu wrapper-sensu-summit by Lee Briggs
Sensu wrapper-sensu-summitSensu wrapper-sensu-summit
Sensu wrapper-sensu-summit
Lee Briggs108 views
JSLab. Домников Виталий. "ES6 генераторы и Koa.js" by GeeksLab Odessa
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
JSLab. Домников Виталий. "ES6 генераторы и Koa.js"
GeeksLab Odessa582 views
Sample file processing by Issay Meii
Sample file processingSample file processing
Sample file processing
Issay Meii609 views
What's new in PHP 5.5 by Tom Corrigan
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
Tom Corrigan19.2K views
Introducing PHP Latest Updates by Iftekhar Eather
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
Iftekhar Eather1.3K views
Making Mongo realtime - oplog tailing in Meteor by yaliceme
Making Mongo realtime - oplog tailing in MeteorMaking Mongo realtime - oplog tailing in Meteor
Making Mongo realtime - oplog tailing in Meteor
yaliceme2.9K views
Jakarta Commons - Don't re-invent the wheel by tcurdt
Jakarta Commons - Don't re-invent the wheelJakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheel
tcurdt739 views
Java 7 - short intro to NIO.2 by Martijn Verburg
Java 7 - short intro to NIO.2Java 7 - short intro to NIO.2
Java 7 - short intro to NIO.2
Martijn Verburg3.4K views
Asynchronen Code testen by ndrssmn
Asynchronen Code testenAsynchronen Code testen
Asynchronen Code testen
ndrssmn717 views
No dark magic - Byte code engineering in the real world by tcurdt
No dark magic - Byte code engineering in the real worldNo dark magic - Byte code engineering in the real world
No dark magic - Byte code engineering in the real world
tcurdt2.1K views
Program to-copy-contents-of-one-file-to-another by blacktricker
Program to-copy-contents-of-one-file-to-anotherProgram to-copy-contents-of-one-file-to-another
Program to-copy-contents-of-one-file-to-another
blacktricker1.5K views
Sequential Async Call by Sirius Fang
Sequential Async CallSequential Async Call
Sequential Async Call
Sirius Fang104 views
Deep Dumpster Diving by RonnBlack
Deep Dumpster DivingDeep Dumpster Diving
Deep Dumpster Diving
RonnBlack654 views

Viewers also liked

How Do You Know When Your Product is Ready to be Shipped? by
How Do You Know When Your Product is Ready to be Shipped?How Do You Know When Your Product is Ready to be Shipped?
How Do You Know When Your Product is Ready to be Shipped?Yegor Bugayenko
1.1K views16 slides
How Much Immutability Is Enough? by
How Much Immutability Is Enough?How Much Immutability Is Enough?
How Much Immutability Is Enough?Yegor Bugayenko
1.7K views22 slides
OOP Is Dead? Not Yet! by
OOP Is Dead? Not Yet!OOP Is Dead? Not Yet!
OOP Is Dead? Not Yet!Yegor Bugayenko
1.7K views12 slides
Who Manages Who? by
Who Manages Who?Who Manages Who?
Who Manages Who?Yegor Bugayenko
1.5K views11 slides
Meetings Or Discipline by
Meetings Or DisciplineMeetings Or Discipline
Meetings Or DisciplineYegor Bugayenko
1.7K views10 slides
Continuous Integration is Dead by
Continuous Integration is DeadContinuous Integration is Dead
Continuous Integration is DeadYegor Bugayenko
267 views14 slides

Viewers also liked(19)

How Do You Know When Your Product is Ready to be Shipped? by Yegor Bugayenko
How Do You Know When Your Product is Ready to be Shipped?How Do You Know When Your Product is Ready to be Shipped?
How Do You Know When Your Product is Ready to be Shipped?
Yegor Bugayenko1.1K views
How Much Immutability Is Enough? by Yegor Bugayenko
How Much Immutability Is Enough?How Much Immutability Is Enough?
How Much Immutability Is Enough?
Yegor Bugayenko1.7K views
Practical Example of AOP with AspectJ by Yegor Bugayenko
Practical Example of AOP with AspectJPractical Example of AOP with AspectJ
Practical Example of AOP with AspectJ
Yegor Bugayenko1.4K views
How Immutability Helps in OOP by Yegor Bugayenko
How Immutability Helps in OOPHow Immutability Helps in OOP
How Immutability Helps in OOP
Yegor Bugayenko1.9K views
ORM is a perfect anti-pattern by Yegor Bugayenko
ORM is a perfect anti-patternORM is a perfect anti-pattern
ORM is a perfect anti-pattern
Yegor Bugayenko2.3K views
RABIES IN TUNISIA:Evolution and result of « National Program of Rabies Control » by Pasteur_Tunis
RABIES IN TUNISIA:Evolution and result of « National Program of Rabies Control »RABIES IN TUNISIA:Evolution and result of « National Program of Rabies Control »
RABIES IN TUNISIA:Evolution and result of « National Program of Rabies Control »
Pasteur_Tunis2.4K views

Similar to Fail Fast. Into User's Face.

A topology of memory leaks on the JVM by
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVMRafael Winterhalter
7.1K views36 slides
Java 7 by
Java 7Java 7
Java 7Bipul Sinha
447 views15 slides
Java 104 by
Java 104Java 104
Java 104Manuela Grindei
332 views33 slides
JavaScript - Like a Box of Chocolates by
JavaScript - Like a Box of ChocolatesJavaScript - Like a Box of Chocolates
JavaScript - Like a Box of ChocolatesRobert Nyman
8.1K views100 slides
5. Ввод-вывод, доступ к файловой системе by
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системеDEVTYPE
967 views47 slides
DIWE - File handling with PHP by
DIWE - File handling with PHPDIWE - File handling with PHP
DIWE - File handling with PHPRasan Samarasinghe
936 views67 slides

Similar to Fail Fast. Into User's Face.(13)

JavaScript - Like a Box of Chocolates by Robert Nyman
JavaScript - Like a Box of ChocolatesJavaScript - Like a Box of Chocolates
JavaScript - Like a Box of Chocolates
Robert Nyman8.1K views
5. Ввод-вывод, доступ к файловой системе by DEVTYPE
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
DEVTYPE967 views
Impress Your Friends with EcmaScript 2015 by Lukas Ruebbelke
Impress Your Friends with EcmaScript 2015Impress Your Friends with EcmaScript 2015
Impress Your Friends with EcmaScript 2015
Lukas Ruebbelke752 views
Ch3(working with file) by Chhom Karath
Ch3(working with file)Ch3(working with file)
Ch3(working with file)
Chhom Karath174 views
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec... by julien.ponge
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
julien.ponge789 views
스위프트를 여행하는 히치하이커를 위한 스타일 안내 by Jung Kim
스위프트를 여행하는 히치하이커를 위한 스타일 안내스위프트를 여행하는 히치하이커를 위한 스타일 안내
스위프트를 여행하는 히치하이커를 위한 스타일 안내
Jung Kim1.2K views
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin by soft-shake.ch
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch546 views

More from Yegor Bugayenko

Can Distributed Teams Deliver Quality? by
Can Distributed Teams Deliver Quality?Can Distributed Teams Deliver Quality?
Can Distributed Teams Deliver Quality?Yegor Bugayenko
269 views23 slides
Are You Sure You Are Not a Micromanager? by
Are You Sure You Are Not a Micromanager?Are You Sure You Are Not a Micromanager?
Are You Sure You Are Not a Micromanager?Yegor Bugayenko
245 views16 slides
On Requirements Management (Demotivate Them Right) by
On Requirements Management (Demotivate Them Right)On Requirements Management (Demotivate Them Right)
On Requirements Management (Demotivate Them Right)Yegor Bugayenko
220 views16 slides
My Experience of 1000 Interviews by
My Experience of 1000 InterviewsMy Experience of 1000 Interviews
My Experience of 1000 InterviewsYegor Bugayenko
219 views20 slides
Are you sure you are not a micromanager? by
Are you sure you are not a micromanager?Are you sure you are not a micromanager?
Are you sure you are not a micromanager?Yegor Bugayenko
251 views15 slides
Quality Assurance vs. Testing by
Quality Assurance vs. TestingQuality Assurance vs. Testing
Quality Assurance vs. TestingYegor Bugayenko
660 views25 slides

More from Yegor Bugayenko(20)

Can Distributed Teams Deliver Quality? by Yegor Bugayenko
Can Distributed Teams Deliver Quality?Can Distributed Teams Deliver Quality?
Can Distributed Teams Deliver Quality?
Yegor Bugayenko269 views
Are You Sure You Are Not a Micromanager? by Yegor Bugayenko
Are You Sure You Are Not a Micromanager?Are You Sure You Are Not a Micromanager?
Are You Sure You Are Not a Micromanager?
Yegor Bugayenko245 views
On Requirements Management (Demotivate Them Right) by Yegor Bugayenko
On Requirements Management (Demotivate Them Right)On Requirements Management (Demotivate Them Right)
On Requirements Management (Demotivate Them Right)
Yegor Bugayenko220 views
My Experience of 1000 Interviews by Yegor Bugayenko
My Experience of 1000 InterviewsMy Experience of 1000 Interviews
My Experience of 1000 Interviews
Yegor Bugayenko219 views
Are you sure you are not a micromanager? by Yegor Bugayenko
Are you sure you are not a micromanager?Are you sure you are not a micromanager?
Are you sure you are not a micromanager?
Yegor Bugayenko251 views
Zold: a cryptocurrency without Blockchain by Yegor Bugayenko
Zold: a cryptocurrency without BlockchainZold: a cryptocurrency without Blockchain
Zold: a cryptocurrency without Blockchain
Yegor Bugayenko282 views
How to Cut Corners and Stay Cool by Yegor Bugayenko
How to Cut Corners and Stay CoolHow to Cut Corners and Stay Cool
How to Cut Corners and Stay Cool
Yegor Bugayenko318 views

Recently uploaded

Using Qt under LGPL-3.0 by
Using Qt under LGPL-3.0Using Qt under LGPL-3.0
Using Qt under LGPL-3.0Burkhard Stubert
13 views11 slides
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...TomHalpin9
6 views29 slides
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
15 views19 slides
ADDO_2022_CICID_Tom_Halpin.pdf by
ADDO_2022_CICID_Tom_Halpin.pdfADDO_2022_CICID_Tom_Halpin.pdf
ADDO_2022_CICID_Tom_Halpin.pdfTomHalpin9
5 views33 slides
Dapr Unleashed: Accelerating Microservice Development by
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice DevelopmentMiroslav Janeski
13 views29 slides
Understanding HTML terminology by
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminologyartembondar5
7 views8 slides

Recently uploaded(20)

Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin96 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
ADDO_2022_CICID_Tom_Halpin.pdf by TomHalpin9
ADDO_2022_CICID_Tom_Halpin.pdfADDO_2022_CICID_Tom_Halpin.pdf
ADDO_2022_CICID_Tom_Halpin.pdf
TomHalpin95 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski13 views
Understanding HTML terminology by artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar57 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok16 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic15 views
Navigating container technology for enhanced security by Niklas Saari by Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy14 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable12 views
Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino7 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta9 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ11 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi216 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 5 views
FIMA 2023 Neo4j & FS - Entity Resolution.pptx by Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j17 views

Fail Fast. Into User's Face.