Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Happy Path, Sad Path
Search
Pierre de La Morinerie
September 30, 2015
Programming
2
250
Happy Path, Sad Path
A journey through warnings, errors, complexity and 🎄 at Captain Train.
Pierre de La Morinerie
September 30, 2015
Tweet
Share
More Decks by Pierre de La Morinerie
See All by Pierre de La Morinerie
Que choisir pour de l'UI : XIBs / Storyboards / Code
kemenaran
0
850
Fail better — Presenting errors in Cocoa
kemenaran
3
1.2k
Other Decks in Programming
See All in Programming
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
260
はじめての Go * WASM * OCR
sgash708
1
120
オレを救った Cline を紹介する
codehex
15
13k
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.4k
iOSでQRコード生成奮闘記
ktcryomm
2
130
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
PEPCは何を変えようとしていたのか
ken7253
3
310
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
120
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
300
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.1k
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
180
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
290
Featured
See All Featured
Docker and Python
trallard
44
3.3k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Thoughts on Productivity
jonyablonski
69
4.5k
Typedesign – Prime Four
hannesfritz
41
2.5k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Designing for humans not robots
tammielis
250
25k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Site-Speed That Sticks
csswizardry
4
420
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
440
The Art of Programming - Codeland 2020
erikaheidi
53
13k
How to Ace a Technical Interview
jacobian
276
23k
Transcript
None
A journey through warnings, errors and Happy Path, Sad Path
Captain Train Un site pour acheter des billets de train.
Super rapidement.
Dans toute l’Europe Captain Train
Captain Train Comment conserver la rapidité malgré la complexité ?
Happy Path – La recherche
Happy Path – La recherche
Happy Path – Le Panier
Happy Path – Le paiement
Happy Path – Le billet
Happy Path Simple.
Sad Path Tout ne se passe pas toujours aussi bien.
Sad Path – La réservation
Sad Path – La réservation
Sad Path – La réservation
Sad Path – La réservation
Sad Path – La réservation
Sad Path – La réservation
Sad Path – La réservation
Sad Path – Le Panier
Sad Path – Le Panier
Sad Path – Le Panier
Sad Path – Le paiement
Sad Path – Le Paiement
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Sad Path – Les Billets
Happy Path - Sad Path Contraintes métier Gérer la complexité
Happy Path - Sad Path • Collecter les informations progressivement
Ce qu’on veut
Happy Path - Sad Path • Collecter les informations progressivement
• Prévenir les confusions fréquentes Ce qu’on veut
Happy Path - Sad Path • Collecter les informations progressivement
• Prévenir les confusions fréquentes • Informer en cas d’erreur Ce qu’on veut
Happy Path - Sad Path Ce qu’on pourrait faire
Happy Path - Sad Path Ce qu’on pourrait faire
Happy Path - Sad Path Ce qu’on veut vraiment Éviter
de faire déteindre le Sad Path sur le Happy Path
Happy Path - Sad Path Ce qu’on peut faire à
la place • Partir du cas optimiste
Happy Path - Sad Path Ce qu’on peut faire à
la place • Partir du cas optimiste • Rajouter des étapes seulement si nécessaire
Happy Path - Sad Path Ce qu’on peut faire à
la place • Partir du cas optimiste • Rajouter des étapes seulement si nécessaire • Contextualiser les messages
Happy Path - Sad Path Contextualiser les messages « Ce
train ne part pas de la gare demandée. »
Happy Path - Sad Path Contextualiser les messages « Ce
train ne part pas de la gare demandée. » « Ce train ne part pas de Paris, mais de Massy- Palaiseau, à 30km de Paris. »
Happy Path - Sad Path Contextualiser les messages « Pour
faire cette opération, contactez votre administrateur. »
Happy Path - Sad Path Contextualiser les messages « Pour
faire cette opération, contactez votre administrateur. » « Pour ajouter un passager, contactez Delphine ou Jean-Luc. »
Happy Path - Sad Path Quelques patterns • Chaîner les
dialogues avec des Promesses • Tests d’intégration • Tests utilisateurs
Happy Path - Sad Path Chaîner des dialogues avec des
promesses function addToCartClicked() { return luggagesDialog.prompt().then(() => { return birthdateDialog.prompt(); }).then(() => { return identificationDialog.prompt(); }).then(() => { return book(); }); }
Happy Path - Sad Path Chaîner des dialogues avec des
promesses function payButtonClicked() { return similarTicketDialog.prompt().then(() => { return duplicateTicketDialog.prompt(); }).then(() => { return invalidCouponDialog.prompt(); }).then(() => { return payDialog.prompt(); }); }
Happy Path - Sad Path Tests d’intégration visit('/pay'); click('Payer'); andThen(function()
{ assert.present('Le paiement a été refusé'); });
Happy Path - Sad Path Tests utilisateurs
Happy Path - Sad Path Tests utilisateur
Happy Path - Sad Path Tests utilisateur
Happy Path - Sad Path Tests utilisateur
Happy Path - Sad Path Tests utilisateur
Happy Path - Sad Path Tests utilisateur
Happy Path - Sad Path Bref • Maîtrisez vos contraintes
métier • Simple ≃ rapide
Pierre de La Morinerie Frontend Developer — pierre@captaintrain.com
Merci ! Pierre de La Morinerie Frontend Developer — pierre@captaintrain.com