~codersonly/cinema-paradiso

Universal BDD/TDD playground
add behaviour verification
add refreshment test
 add ticket price test

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~codersonly/cinema-paradiso
read/write
git@git.sr.ht:~codersonly/cinema-paradiso

You can also use your local clone with git send-email.

#Cinema Paradiso

Cinema Paradiso is a universal BDD/TDD playground, suitable to run various types of workshops targeting specific aspects of software development and automated testing. This document is aimed at facilitators, for an optimal learning experience don't hand it out to participants. In other words...

IF YOU ARE AN ATTENDEE DON'T READ THIS DOCUMENT FURTHER, IT WILL SPOIL THE FUN!

#Domain Terms

Communicate strictly using these terms with the team and expect it likewise from them.

#Cinema

A rectangular shaped venue filled with chairs in rows and seats. Numbered from 1.

#Show

A screening of a given movie at a certain date/time.

#Ticket

A token with a show, a seat and the price paid.

#Price Class

A range of rows for a tiered price structure. Denoted by roman numbers, starting from I.

#Concession

A fixed discount for juniors, unemployed and pensioners. Set to be 50%.

#Discount Voucher

A single-use token, entitling the bearer to a discount of a certain percentage.

#Advance Reservation

A number of reserved, not yet paid, seats. These expire half-an-hour before the show.

#Reservation Number

A single-use token, entitling the bearer to retrieve the tickets of an advance reservation.

#Faulty Chairs

Seats marked as such can not be sold until unmarked. Existing tickets remain valid.

#Use Cases

Broken down into personas. Ignoring aspects like program, schedules, projectionist, cleaning, etc.

#Cashier

A low-skilled, often temporary, person in the cinema, selling tickets using a POS system.

  • sells arbitrary tickets to shows
  • sells tickets with discount vouchers
  • sells tickets of advance reservations

#Hotline

A low-skilled, often temporary, person in a call centre, assisting visitors over the phone.

  • creates advance reservations
  • cancels advance reservations

#Manager

The overseer of the cinema, responsible for all business and operational concerns.

  • manages the price segments
  • creates discount vouchers
  • monitors the use of vouchers

#Maintenance

A person on site, dealing with the physical infrastructure elements.

  • marks and unmarks faulty chairs

#Owner

A role to be played by someone familiar with this document and the purpose of the workshop.

  • explains domain terms and constraints
  • accepts or rejects deliverables
  • prioritises deliverables and their scope

#Workshops

The above constraints of Cinema Paradiso cater for various workshops, each with a different focus area.

#Seat Allocator

We ask the attendees to create a price engine with the following requirements...

  • books seats in our rectangular room for a certain show
  • receives the desired row number and the number of seats
  • returns optimally allocated tickets keeping to the middle
  • reservations are consecutive blocks of seats in one row
  • additional reservations fill rows up in a balanced manner
  • lacking capacity in the desired row the next best row is booked
  • the fallback row is chosen considering existing allocations

Topics to look out for...

  • the concept and formal definition of the centre seat in a row
  • placing the first reservations of a row in the best possible way
  • the precise and formal strategy for selecting fallback row

#Price Engine

We ask the attendees to create a price engine with the following requirements...

  • calculates the sales totals for all commercial transactions
  • product categories: tickets, refreshments, merchandise
  • maintains the taxes for every product category (volatile)
  • receives sales items with product category and net price
  • accepts discount vouchers (for ticket prices only)
  • calculates the gross sales total (after taxes)

Additionally...

  • taxes are in percentages to be added, can change over time
  • discounts are in percentages to be deducted from the net price
  • figures round to two decimals for every net price, then for gross prices

#Use Cases

Dropping participants in the problem, asking to deliver, an ongoing and fine-grained conversation is expected with the owner, in a tight development cycle.

The conversation is expected to...

  • pick up, understand and use domain terms
  • slice large needs into the smallest possible scope
  • identify the different actors of the use cases
  • get feedback on the results and adjust priorities

The solution is expected to...

  • deliver in a minimal TDD-manner
  • realise these are customer, not developer, tests
  • manifest the facades using interface segregation

The owner is expected to...

  • want to sell tickets first, then add more complexities
  • drive the team in a direction based on their progress
  • pick the suitable abstractions to optimise learnings

The facilitator is expected to...

  • monitor the above objectives and step in when necessary
  • raise some issues immediately, reflect on others at the end
  • remind the team about quality issues, should such arise
  • force the separation of developer tests if such get created

#Fixtures & Doubles

See the Java project in this repository.

#Legacy Code

Coming soon...

#Transformation Priority Premise

Coming soon...

#Creative Commons License

Cinema Paradiso by Coders Only is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0 .

This license requires that reusers give credit to the creator. It allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only. If others modify or adapt the material, they must license the modified material under identical terms.