About this Workshop
In order to reach this goal, you have to develop your software design skills. You need to learn how to replace the "IF Strategy" with more effective design strategies that will enable you to reduce the complexity of your software system and deliver new functionalities on time and in a sustainable way.
Course Info
Format
Live: 4x2 hour sessions (max 8 participants) over two weeks.
Video: 30 breakdown sessions for a total of 8 hours.
Language
English
Delivery Options
Live online, onsite, in-house, recorded video.
Trainer
Francesco Cirillo
IS THIS TRAINING FOR YOU?
This Course is ideal for Software Developers and Technical Coaches.
WHAT DO YOU NEED FOR YOUR TRAINING?
No previous knowledge is needed. Much passion is required!
It is strongly recommended to watch the video Three Bowling Kata Solutions"
JOIN THE CONVERSATION
Are you interested in asking questions, clarify specific aspects of the Challenge, or share your solution? The Bowling Kata Community is the place for you.
CERTIFICATE OF ATTENDANCE
This Certificate is delivered to all the participants who have attended the four sessions of the online course.
Objectives
I am a Software Developer and this is my goal:
- I want to stop applying the "IF Strategy" (=IF (new condition) { new code}] to deal with new requests!
- I want to stop debugging my code in an intricate forest of nested IFs
- I want to be able to reduce the complexity of my software system every time I develop a customer request.
- I want my code to be understandable at first glance to me and to all my team members.
The Story Behind this Workshop
What is the "IF Strategy"?
The "IF Strategy" is a way of dealing with growth, change and complexity in software development.
Whenever we need to deal with a change in the behaviour of our software system, we CAN do it by introducing an IF statement (the "Let's Put an IF Syndrome") :
IF ( new condition ) { new code }
Why do developers apply it?
Because it is simple:
- Put an IF
- Add a condition
- Add the related behaviour
Done! The problem seems to be solved forever.
But... What does really happen to your software system over time?
Of course, by consistently applying the "IF Strategy" the structural complexity of your system will grow over time.
One IF at a time, you will make your system more complex to be read, tested, even debugged.
It will become "easier" to duplicate code. Inevitably, you will end up accumulating technical debt all the time.
calculateWageFor(Person aPerson) {
...
IF=> IF(aPerson.type == Person.EMPLOYEE) {
ordinaryHourlyWage = 15;
overtimeHourlyWage = 20;
IF=> IF(aPerson.status == Person.PARENTALLEAVE) {
ordinaryHourlyWage= ordinaryHourlyWage * .70; // 70%
IF=> IF(aPerson.daysOffLeft() > 10) {
ordinaryHourlyWage = ordinaryHourlyWage * 0.9; // 90%
}
}
salary = aPerson.ordinaryWorkHours *
ordinaryHourlyWage +
aPerson.overtimeWorkHours *
overtimeHourlyWage;
}
IF=> IF(person.type == Person.MANAGER) {
fixedWage = 3000;
monthlyBonus = lastYearsProfit * .10 / 12; // 10% monthly
IF=> IF(aPerson.status == Person.PARENTALLEAVE) {
monthlyBonus= monthlyBonus * .60; // 70%
IF=> IF(aPerson.daysOffLeft() > 10) {
fixedWage = fixedWage * 1; // 90%
monthlyBonus= monthlyBonus * 1; // 70%
}
}
salary = fixedWage + monthlyBonus;
}
IF=> IF(person.type == Person.CONSULTANT) {
dailyFee = 300;
workHours = aPerson.workHours();
realDays = workHours / 7;
salary = realDays * dailyFee;
}
return salary;
}
Defusing the "IF Strategy"
By replacing the "IF Strategy" with more effective evolutionary design techniques you can break the vicious circle that starts every time you receive a new customer request:
=> 1. new IF(s) =>
=> 2. more complexity (=less readable and testable code, system hinders change) =>
=> 3. more technical debt =>
By defusing the "IF Strategy," you will be able to reduce the complexity of your software system over time.
It will be easier to define a "no-shortcut" design strategy to be applied even under strict deadlines and deliver your customer requests on time without accumulating technical debt.
To defuse the "IF Strategy," you have to learn to deal with two dIfferent aspects:
Technical Aspect -
You have to learn how to replace the "IF Strategy" with other evolutionary design techniques that will enable you to grow a software product capable of "embracing change." This means that you need to develop your skills to:
- Distinguish dangerous IFs from physiological IFs.
Dangerous IFs are those that you use when you apply the "IF Strategy" in an evolutionary context. These IFs make a system degenerate into a Code Monster!
- Get rid of bad IFs.
You also have to know how to transform those dangerous IFs into healthy design structures and modules able to reduce the complexity of your software system.
- Visualize the design dependencies implied in your software system
and be able to organize them in a conscious way, confidently and without rush.
- Identify effective solutions without running the risk of over design.
A dangerous IF can be eliminated in many different ways. Not all of them are able to reduce the complexity of your software system.
- Grow software incrementally
maintaining maximum quality and delivering the highest possible number of functionalities.
- Use Objects and Patterns in an incremental way to flatten the cost of change curve.
- Monitor the cost of change
related to your software product in order to measure if your design solutions are really reducing the complexity of your system.
Psychological Aspect -
You have to learn how to stop and think in order to find a suitable design solution, even if your feel under the pressure of a strict deadline. You don't need to rush. You need to learn how to get help by the current design of your software system.