Coding Dojo is a practice where software engineers will try to solve a problem in a slower manner and in of full consciousness. Instead of rushing to the solution, engineers will take a step back and look at the problem's nature. After truly understand the problem, a solution will appear naturally.
In 15 November 2014, IMT Solutions in association with University of Science has host a simple Agile Coding Dojo for students majored in Computer Science. I was in charge of this session.
The problem were posed to students during in Dojo named "Batman Application" with a faulted solution Batman that only runs in happy case.
You are given strings of different lengths. If the number of vowels are equal or more than 30% of the string length, then replace ‘iambatman’ for each continuous set of vowels.
For the first mission, I instructed students to form a group of 7-8 people, they need to
- Discuss about the given problem.
- Write acceptance tests for the problem.
- Execute their tests on the provided solution.
- Ask questions regarding the problem.
- Participants asked questions to IMT engineers
After 20 minutes, I closed the first section by asking whether participants
- Only test the happy case.
- Do the boundary testing on the exact 30% case.
- Test the given string is empty or null?
- Wonder about expected behavior:
- if the given string contains special characters like ê, ơ, ư etc...
- if the text has empty spaces in the begin or end.
Participants were shocked at how a simple problem can have many hidden requirements and areas that requires customer collaboration and teamwork communication to truly understand the big picture. Motivated by the experience, participants were excited to re-write the faulted solution that does not only fix the failing case but also meet:
- Accuracy. (does not use float to compare)
- Maintainable. (extract methods and rename variables)
- Reusable. (Configurable threshold and replacing text)
After 30 minutes of hard working, several solutions were submitted, even though none of them met all of expectation; but many of them were promising that proved participants had begun to understand what requires of a professional software engineer. After the conclusion, students have asked lots of questions about software development and test.
- Small prize for best solutions