As a preface
You sit in front of the monitor, disassemble your morning mail, and suddenly the air around you starts to quiver.
- What's happening?!
Everything darkens sharply, and for several long moments nothing is seen or heard. Only your own heartbeat. The next moment the light returns ...
')
- Where I am? What kind of place is it?
Starting to speak, your attention is attracted by a man in a robe with a hood pulled over his eyes.
- Greetings,% UserName%, you are a mage stronghold! We know that you are able to use the Source of Power. I will tell you about him. The source contains five Forces - Earth, Air, Water, Fire and Spirit. Earth represents sustainability, Air - freedom, Water - change, Fire - power, Spirit - discipline. In most cases, to perform the necessary action is quite enough any one part out of five. So streams of Fire allow you to light a candle and control the burning of the flame. But more complex tasks require weaving streams from a larger number of Forces. For example, someone who would like to influence the weather would need to simultaneously weave streams of Air, Water and Spirit. But in order to start learning, you will have to pass a test ...
What was it?
The fact is that I was tired of preaching in an attempt to introduce engineering agile practices.
I don’t know about you, but among the developers I’ve come across with, no more than 10% really knew agile-zen. This is a very sad statistic. And I wondered if something could be done about it?
When mastering complex areas is always the case. At first, everything is very difficult and it continues for some time, then suddenly it becomes easy and familiar. For example, with driving a car such a topic, especially on the mechanics. So, modern engineering practices (auto tests, CI, CD and other DevOps) are mastered in approximately the same way. The problem is that in the eyes of the majority the process of mastering looks something like this:
For those who are just starting to learn agile practices, it seems that there is too much effort involved, that it will never end and that it will always be like this. But those who have already mastered these practices, know that at some point there is a switch in the brain and it becomes sharply easier. Practitioners become relatives and after that you can’t imagine how to live without them.
And how to motivate people to reach the end in the difficult path of mastering agile practices?
At the moment of despair and disbelief in my strength, I miraculously got a course on gamification (I have already noticed more than once that when it is needed, something suddenly interesting and useful appears in my life). Gamification is a great tool for learning and motivation. Maybe this is what you need?
As a goal for my gambling system, I defined a decrease in the number of errors in the production by 20% while increasing the speed of making changes by 20%.
According to my logic, step-by-step development of new work skills by the participants of the gamified system (hereinafter referred to as players) will lead to an independent conclusion about the need to apply modern engineering practices. And the best modern practices that have been mastered and applied should lead to the achievement of these goals.
As it probably already became clear, for my system I chose a magical theme.
Magic is subject to special principles - it is a kind of magical physics. Spells are built by interlacing streams of forces of different types in the desired sequence and in the correct pattern. Streams of power can be 5 types - fire, water, earth, air and spirit.
Each Force is related to some useful skill as follows:
- Earth is sustainability. The quality of the product - auto-tests + code review;
- Air is freedom. Freedom from support / maintenance, the creation of documentation and the transfer of QA and operation;
- Water is a change. Creation of a program code tolerant to changes - minimization of technical debt (refactoring + code review);
- Fire is power. Burning routine - internal automation. The use of various tools and utilities that increase productivity;
- Spirit is a discipline. Decomposition of your work and daily bringing some piece of work to the state “Done” (Get things done in action).
To weave a spell, you must first accumulate the necessary strength for the spell. The accumulated strength of the tasks:
- Decomposing and heading out - in the task tracking system, you need to bring (sub) the task (s) with a total labor intensity of ~ 4 hours to the “Ready” state (+3 Spirit);
- Runische - it is necessary to document the work done on Gherkin (+4 Air);
- Technical debt is a redhearted payment - it is necessary to reduce the cyclomatic complexity in the program code (+5 Water and +2 Fire);
- Life is too short for manual testing - write an autotest for the current development (+5 Earth and +3 Fire);
- Joint classes - write 3 reviews for the work of colleagues (code review) (+2 Spirit and +1 Air).
Task example:
Technical debt payment is red.
It is necessary to find the smells of the code and get rid of them.
- What? How can the code smell?
- Yes, it definitely cannot smell ... but it doesn’t tinkle easily.
To complete the task you need:
- Calculate cyclomatic complexity before making changes to the code;
- Perform functional refactoring;
- Calculate cyclomatic complexity after making changes to the code. The metric should decrease by at least 5;
- Leave a comment in your profile with a link to the task being performed, a description of the work performed (the name of the optimized method and the module in which it is located) and the metric before and after making changes;
- Agree with 2 colleagues for cross-review. As a result, each colleague should leave a response to the comment from clause 3 with an assessment of the work performed and the rationale for the assessment. The cross-review period is limited to 3 business days;
- get a well-deserved power based on cross-reviewer ratings.
Ideally, the complexity of the methods should not exceed the value of 15-19.
Cross-reviewers in the evaluation must proceed from the following criteria:
Evaluation | Strength | Comment |
---|
one | 1 water | Cyclomatic complexity has decreased, but errors have been made when making changes |
2 | 2 Waters | The cyclomatic complexity has decreased, no errors were noticed, but the code did not make it clearer |
3 | 3 Waters | The cyclomatic complexity has decreased, no errors have been noticed, the code has become a little more understandable, but there are significant comments on the refactoring performed (for example, the logical part of the code for selecting the method is incorrect) |
four | 4 waters
1 Fire | The cyclomatic complexity has decreased, no errors have been noticed, the code has become clearer, but there are some remarks (for example, the naming of variables or new methods) |
five | 5 Waters
2 fires | The cyclomatic complexity has decreased, no errors have been noticed, the code has become clearer, there are no comments on the refactoring performed. |
In the event that the author of refactoring does not agree with the review, he may turn to the circle of archmage for the purpose of revising the assessment.
You can spend the accumulated Forces on spells. There is a public book of spells, which contain all the currently open weaving (list of spells open, players can offer new spells to the master system). Each weave has a cost, and may also have a number of restrictions, for example, the current player level (novice, adopted or magician), recovery time (how often a spell can be woven), etc. Spell examples:
- Arcane Intelligence - if within 5 working days a player performs at least 3 daily tasks each day, then the player receives double the amount of energy spent on the spell
- Time spell;
- Come to work later / leave early;
- Protection from routine work;
- The philosopher's stone is the transformation of one accumulated Power into another.
Also, for outstanding results held magician has the opportunity to enter the highest council to participate in decision-making.
System scaling
The described gamified system can be “screwed” to almost any unit. To do this, you need to complete a few steps:
- To compare the strength and skills that need to be instilled in personnel;
- Create tasks, "pumping" skills from the previous paragraph. Moreover, the task does not necessarily have to strictly correspond to any particular force;
- Come up with weaving for the book of spells, so that the staff could spend the accumulated resources somewhere;
- Balance the amount of accumulated resources with the cost of weaving. For example, I was repelled by the key weaving “time off”. According to my idea, it can be woven about once every 18-20 working days, if you complete all the tasks every day. The cost of the rest of the weaving has already been adjusted on the basis of the degree of “interestingness” relative to “time off”.
It is not necessary for each unit to use its own “instance” system, they can coexist as different schools / areas of magic (for example, magicians, priests, shamans, druids, etc.). This opens up a wide scope for further development of the system, for example, collective PvE content.
As a conclusion
For 3 months of operation of the gamified system in the pilot team, I got a stunning result:
- Began to cover the code with tests;
- Moved to git;
- Individual ownership of the code is no longer as pronounced;
- The sections of the code, which everyone was afraid to touch with the words “do not touch,” are now gradually brought to normal appearance;
- Team members learn from each other, because code-review is not so much a control tool as a mutual learning tool;
- The number of mass incidents has decreased (I want to believe that the reason is mainly in gamification and agile practices);
- At times, the desire to learn something new among the team members has increased;
- On the approach start using build servers.
I tried to achieve all this in a variety of ways throughout 2016.
As a next step, I'm thinking of using quest chains to adapt new employees. As planned, in the form of a game a new person should quickly understand how the internal processes are organized and join the team.
Here I want to offer in the comments jointly about the use of the described system in other services related to IT - project office, QA, operational services.
It would also be interesting to think together about interesting ideas for weaving (I want to make a spellbook thicker).
And also, I would appreciate any feedback.
Having finished his story, the author makes a loop of Fire, passes through it the intertwined Air with Spirit, then weaves the stream of Water and fixes the pattern tying around the stream of the Earth. The pattern stabilizes and the portal begins to flicker in its place. He takes a step into the portal and disappears ...