Wprowadzenie, kt贸rego nie trzeba czyta膰 :)
Min膮艂 prawie rok od chwili wydania
Oprogramowania szytego na miar臋.... Prowadzi艂em sporo
warsztat贸w w oparciu o t臋 ksi膮偶k臋 i mailowa艂em z czytelnikami. Z zadawanych pyta艅 wnioskuj臋, 偶e nie jest do ko艅ca jasne, w jaki spos贸b stosowa膰 techniki zadawania pyta艅 w szczeg贸艂owych kontekstach. Opisane sposoby prowadzenia rozmowy z klientem s膮 cz臋sto widziane w izolacji od "reszty 艣wiata".
Rozmawiamy sobie, zadajemy pytania, konkretyzujemy, ale co dalej? My przecie偶 pos艂ugujemy si臋: user stories, taskami, use cases, bounded contexts, architektur膮 itd. Jak to sklei膰 z technikami zadawania pyta艅? Przecie偶 w tych wszystkich wymienionych obszarach zadawanie pyta艅, konkretyzowanie, definiowanie problemu ma swoje zastosowanie. Albo inaczej: user stories, taski, use cases, bounded contexts, architektur膮 s膮
efektem zadawania pyta艅. A zatem pytanie brzmi:
jak zadawa膰 pytania, aby otrzyma膰: USs, UCs, tasks, BCs, zdekomponowan膮 architektur臋?
T臋 umiej臋tno艣膰 zadawania pyta艅 prowadz膮cych do w/w artefakt贸w nazywam
conversation patterns. Termin ten ukuli艣my podczas
iDDD Tour w Krakowie, kiedy
Vaughn Vernon da艂 nam par臋 minut na przedstawienie paru spostrze偶e艅 nt. wyodr臋bniania modelu dziedzinowego podczas rozmowy z ekspertem. Tak powsta艂a kr贸tka prezentacja
Conversation Patters for Ubiquitous Language (je艣li nie by艂o Ci臋 na
iDDD Tour, musisz u偶y膰 wyobra藕ni, aby z艂apa膰 o co chodzi:)).
Tyle tytu艂em wst臋pu. Zacznijmy od User Stories.
Literalne stosowanie szablonu
Kr贸tki przegl膮d przez histori臋 rozwoju US mo偶esz przeczyta膰 na stronie
Scotta Amblera. W ka偶dym razie popularn膮 obecnie ich form膮 jest
As a...I want...so that...
.
Ten bardzo sprytny schemat formu艂owania US u艂atwia ekspertowi formu艂owanie my艣li i oczekiwa艅. Jest bardzo prosty, lecz pod t膮 prostot膮 kryje si臋 mn贸stwo niuans贸w, bez zrozumienia kt贸rych, powstaj膮 karykatury US. Zobaczmy do czego mo偶e doprowadzi膰 literalne stosowanie tego szablonu:
- Jako U偶ytkownik chc臋 si臋 zalogowa膰, aby si臋 zalogowa膰 :)
- Jako U偶ytkownik chc臋 si臋 zalogowa膰, aby skorzysta膰 z systemu
- Jako U偶ytkownik chc臋 klikn膮膰 prawym przyciskiem myszy i zobaczy膰 menu kontekstowe po to, aby wybra膰 interesuj膮c膮 mnie opcj臋
- Jako Likwidator chc臋 zwi臋kszy膰 rezerw臋 szkodow膮, aby post臋powa膰 zgodnie z wewn臋trzn膮 procedur膮 T-1000
- Jako PO chc臋 doda膰 pracownika do bazy, aby mie膰 go w systemie
Kilka s艂贸w komentarza. (1,2) s艂abuj膮 je艣li chodzi o precyzyjne sformu艂owanie korzy艣ci (frazy po
so that...
). Czy korzy艣ci膮 dla u偶ytkownika jest to, 偶e
si臋 zaloguje? W膮tpliwe. 呕e
skorzysta z sytemu? By膰 mo偶e, ale mo偶liwe, 偶e u偶ytkownikowi chodzi o to, aby
dosta膰 si臋 do swojego konta?
Je艣li chodzi o (3) r贸wnie偶 jest k艂opot z korzy艣ci膮. Jasne, 偶e
wybranie interesuj膮cej opcji ma sens, je艣li m贸wimy o tworzeniu menad偶era okien, albo biblioteki GUI, lecz a aplikacji biznesowej
wybranie interesuj膮cej opcji nie jest korzy艣ci膮 lecz specyfikacj膮 interfejsu u偶ytkownika.
W (4) jest lepiej. Czy
post臋powanie zgodnie z procedur膮 T-1000 sprawi, 偶e dzi臋ki oprogramowaniu b臋dziemy mogli odnosi膰 wi臋cej korzy艣ci? pozyska膰 wi臋cej klient贸w? zarabia膰 wi臋cej pieni臋dzy? Bez szerszego kontekstu trudno jednoznacznie stwierdzi膰. Brzmi dobrze.
Nieco inaczej jest w (5). To, 偶e PO wypowiada US, nie oznacza, 偶e to on chce danej funkcjonalno艣ci, i 偶e on odniesie z niej korzy艣膰. Oczywi艣cie warto u偶ywa膰 US do opisywania potrzeb interesariuszy (brzydkie s艂owo:)) -
@see Stakeholder Stories, lecz w tym przypadku rola nie zosta艂a w艂a艣ciwie dopasowana do potrzeby i korzy艣ci. PO mo偶e chcie膰 np. 艂adniejszy layout, popraw臋 bezpiecze艅stwa. Funkcjonalno艣ci raczej rzadko.
S艂owa s膮 wa偶ne w US [@see rozdzia艂: Co to znaczy my艣le膰 biznesowo?]
Tak naprawd臋 US nie jest niczym innym ni偶 parafraz膮 [@see
Technika parafrazy] tego, co ekspert powiedzia艂, spisan膮 w ustandaryzowany spos贸b. Pos艂uguj膮c si臋 struktur膮 rozmowy [@see rozdzia艂
Sztuka zadawania pyta艅], formu艂ujesz pojedyncze wypowiedzi rozm贸wcy w jak najbardziej konkretny spos贸b.
Tak jak sugeruje tytu艂 posta i akapitu, s艂owa kt贸rych u偶ywasz w spisywaniu US maj膮 znaczenie. Zerknij na rysunek. To, co m贸wi Tw贸j ekspert mo偶esz zapisa膰 co najmniej z u偶yciem s艂ownictwa trojakiego rodzaju:
Biznesowego - s艂owa pochodz膮 z dziedziny biznesowej np.:
Jako Klient chc臋 obejrze膰 mo偶liwe do za艂o偶enia lokaty, aby wybra膰 najodpowiedniejsz膮 do moich potrzeb
Rozwi膮za艅 - s艂owa dotycz膮 konkretnych rozwi膮za艅 i sugeruj膮 j a k co艣 ma dzia艂a膰, np.:
Jako Klient, chc臋 wej艣膰 na zak艂adk臋 mo偶liwych do z艂o偶enia lokat, aby zaznaczy膰 najodpowiedniejsz膮 do moich potrzeb.
Technikali贸w - s艂owa pochodz膮 z 偶argonu technicznego np.:
Jako Klient, chc臋 wy艣wietli膰 listbox ofert, aby najlepsz膮 doda膰 do mojego rachunku.
Oczywi艣cie to tylko typologia. Wi臋c Twoje parafrazy tego, co m贸wi rozm贸wca, mog膮 miksowa膰 s艂ownictwo r贸偶nego rodzaju. W tym miejscu chc臋 Ci zasugerowa膰, aby艣
u偶ywa艂 przede wszystkim s艂ownictwa bizensowego. Dlaczego?
Pow贸d 1. Tak jak na rysunku mi臋dzy tymi grupami s艂贸w wyst臋puje relacja podrz臋dno艣ci. Najwy偶ej umieszczony jest biznes, najni偶ej technikalia. Zmiany r贸wnie偶 przebiegaj膮 z g贸ry na d贸艂. Dan膮 potrzeb臋 biznesow膮 mo偶na zrealizowa膰 na kilka sposob贸w, kt贸re mog膮 si臋 zmienia膰. Je艣li wi臋c klient stwierdzi, 偶e woli nowe strony zamiast zak艂adek, to spowoduje to du偶o zmian w wymaganiach. Je艣li b臋dziesz trzyma膰 si臋 s艂ownictwa biznesowego, to zmiany w konkretnych rozwi膮zaniach nie b臋d膮 a偶 tak bolesne.
Pow贸d 2. To zesp贸艂 jest odpowiedzialny za proponowanie klientowi rozwi膮za艅 i za znalezienie najlepszego. Klient jest odpowiedzialny za swoje potrzeby. Pami臋taj:
User Stories s膮 efektem konwersacji.
Pow贸d 3. U偶ywaj膮c 偶argonu technicznego kastrujesz domen臋. Gubisz wa偶ne poj臋cia biznesowe, regu艂y za nimi stoj膮ce. Jest du偶a szansa, 偶e stworzysz architektur臋 nieadekwatn膮 do wymaga艅 (@see
Jak zniszczy膰 sw贸j kod?).
Zatem celem jest to, aby wej艣膰 na poziom biznesu, z jego perspektywy sformu艂owa膰 US i u偶ywaj膮c swojego do艣wiadczenia technicznego, zaproponowa膰 konkretne rozwi膮zania.