-
Notifications
You must be signed in to change notification settings - Fork 0
Wind of Change
Fr, 11:00, Clovis, Egga Hartung
In this kata (and probably also in production) you never want to have a red build. You want to be able to react to changes quickly. Don't let refactorings break your code (not even temporarily).
Sometimes you need to start the next feature before you have finished what you're implementing at the moment. Don't make this shift of priorities let you lose progress on unfinished features.
This kata should not be done in pairs, but by groups of 3-6 people. The product manager (PM) reveals the feature requests one-by-one and verbally to a representative of each group - outside of the room. Also the PM creates a lot of pressure on the representatives to deliver features as early as possible. The PM also tries to get the groups to commit on delivery times for features (still only talking to isolated representatives).
- Write a method
String encrypt(String)
that implements the Cesar Cipher (ROT13) for the 26 upper case letters of the English alphabet, e.g.A -> N
,N -> A
. Other characters don't exist. - When finished make sure that lower case characters get converted to upper case during encryption. Also leave all non-alphabet characters untouched, e.g. a space stays a space.
- When nearly finished make sure that a custom alphabet can be given in the constructor, e.g. the ordering of the 26 characters can be changed to make the operation unpredictable.
- When right into the implementation, but long before finished add an int parameter that can configure the offset which is being used for rotation, e.g. for an offset of 1:
A -> B
. This makes the encryption asynchronous, so make sure to also offer a decryption method to reverse the operation. - When the custom alphabet is finished, but before the custom offset is finished (!), support a second alphabet that get rotated independently of the first alphabet (but using the same offset rules).
- When the custom offset is finished implement an increasing offset that increments by one after the encryption of each alphabet character.
- After the custom offset is finished, but before the increasing offset is finished, add the possibility to give another int that defines how often the text gets en- or decrypted.
Results of a property based test approach at the bar: https://github.com/Egga/katas/blob/master/modules/porperty_based_testing/src/test/java/de/egga/CesarCipherTest.java
Results of property based test approach done within the kata (45min) by Aki and Vincent https://github.com/rinkkasatiainen/properties-of-wind-of-change
(a link to Property based Game of life )