Educational board games for programmers

    There is an interesting situation on the labor market in Java development. There are more than 100,000 active resumes by developers, and one vacancy falls on one resume. At the same time, employers and recruitment agencies complain about the lack of personnel, and, despite thousands of resumes, finding a good specialist is hard. For example, a Java developer is a scarce product: it is rare, their cuts are not affected, salaries are growing, and competition is falling. We will not investigate the causes of the phenomenon, but will talk about one of the ways how to solve this problem.



    You can look for technical specialists for a long time, but the work does not wait, so you have to hire not enough qualified personnel and train in the process. Of the options: self-study in your free time or courses and seminars in the workplace, but you can choose games.Artyom Larin ( artem_larin ) will explain why traditional teaching methods are unreliable and why games are better than others in some ways.

    Special team board games not only teach complex topics of software development, actively involving each participant, but also form a common technical language in the team, as well as solve the teambuilding problem and form a corporate culture.



    About the speaker: Artyom Larin in Java since 2004. He works as a leading developer, and as a senior, periodically trains colleagues, leads lectures and internal training seminars. Unfortunately, there was a negative learning experience that led Artyom to the idea that board games are what is needed in development.



    It will be about how to pump not hard, but hard technical skills in a team. The report consists of two parts: humanitarian and creative. Even if you are not a techie, in the second part you will have to strain your humanitarian brains, because without technical information, nowhere - I will talk about hard skills and their leveling.

    IT Issues


    I believe that there is a big problem in IT - and this is staff shortage . The issue has been discussed many times, there are statistics from hh.ru and publications on this topic. Just in case, check the statistics ourselves. If you enter “Java” in the hh.ru search engine, we will see 5-6 thousand jobs in Russia, and the number of resumes on the same hh.ru is more than 100 thousand. It seems that there is no shortage of developers - the resume is an order of magnitude larger than the vacancies .

     



    Let's look from the other side. The site hh.ru has a special index, which is called the hh-index. This is the ratio of active resumes and vacancies. For a Java request, it is approximately equal to one: for one vacancy, one resume. Again it turns out that there is no personnel shortage? The company needs a programmer, it opens a vacancy, and, according to the index, the senior must immediately come, get a job and close the vacancy.

    The lord "must" come, but does not come. The figures say that there is no personnel shortage, but in the real world, and not in the world of the hh-index, it is. Java is a super-scarce profession. There is a bloody head-hunting behind Java seniors: HRs and recruiters besieging them with offers to get a job. On average, one Java developer receives 5-6 offers , even if employed.

    What is the matter? Where did staff shortage come from? From my personal interview experience, I believe that the problem is that most job seekers who send resumes and come for interviews have insufficient education and low qualifications. But since there is staff shortage, companies are forced to hire these people and train on their own - people with high qualifications spend their time educating people with low skills.

    We cannot defeat personnel starvation - only to state. Therefore, we adapt and solve the problem on the other hand - we train. Let's think about how to educate people in the IT industry.

    Ways to learn in the IT industry


    In 1980, National Training Laboratories in the United States conducted research on the effectiveness of different training methods. It turned out that lectures and reading books have extremely low efficiency - only 5-10% . Next is watching video lectures and listening to audio. The maximum efficiency of 90% is the training by people of other people - mentoring and the immediate application of the acquired knowledge in practice.

     



    Based on the training pyramid, we will conduct an express analysis of IT training methods.

    Courses


    Surely you met contextual advertising on the Internet that promises to turn beginners into professional programmers: "Become a developer in 3 months." I myself took such courses several times for the sake of interest, and advised them to my students. I can say that yes, these courses are effective, but they have two problems: only basic knowledge  is given in the courses - they will not turn the june into a senior, and the effectiveness of training is not higher than 20% . Courses are an inefficient way, so we will forget about it.

    Internal workshops


    I really love the internal seminars and have held them many times. I believe that they are effective only if the audience interacts interactively with the teacher. Unfortunately, this is rarely the case. Usually people come to a seminar, take seats and passively listen to a lecturer while drinking seagulls. No interactivity, low efficiency - maximum 50% . Therefore, seminars can also be forgotten.

    Conferences


    The goal of the conference is to introduce industry news, but not hardcore training. Conferences are communication , fresh ideas, but not training - the effectiveness in this case is only 5-30%. Conferences are also not what we need.

    Self learning


    I, like most of my friends, programmers, came into the profession through self-education. This is an effective method, I would give it 75% efficiency , if not for one huge drawback - a list of books to study.



    This is a list that I give to people who want to become Java developers and write real industry code. When I show it to newcomers, I see fear, despair and hopelessness in their eyes . Enthusiasm is quickly dying away.

    To become a programmer, a person needs to go through the “plateau of despair”. According to this concept, after a person has received initial knowledge in the wake of enthusiasm, a long period comes when he no longer receives knowledge and self-esteem is rapidly falling.



    By analogy with the “plateau of despair” I introduced the concept of “wall of despair”. This is a wall of 15 thick books, which does not allow hundreds of thousands of beginning developers with hh.ru to get into the cherished 5 thousand active vacancies of senior and middle.



    It turns out that in order to become a developer, a beginner spends time on self-education, and not on a family or a hobby. It seems that this method is also not very good.

    Mentoring and Coaching


    This is the most effective way, according to the pyramid of learning - 90% efficiency . But he also has drawbacks that do not allow calling this method a “magic pill”.

    Mentoring is always a 1: 1 ratio , that is, one mentor and one menti - the learner . In my practice, I have not seen cases where one mentor can train 10 people. Mentoring scales very poorly and  distracts seniorsfrom the main job. I can say personally on my own - I had 2 menti, maximum. And at the same time, half of my working time, and sometimes more, was spent on mentoring, and not on solving production problems for which I was paid money. Therefore, 3-4 people or more, it is impossible to mentor, if we talk about high-quality mentoring.

    Long term studies  - 1-2 years. In my experience, a programmer has been working for an average of 2 years in a company. It turns out a sad picture: you mentor a person, drive knowledge into him, and then someone quits - either you, or he, and all mentoring goes nowhere.

    Mentoring is effective, but because of the shortcomings, I thought - why not find some way that would be effective as mentoring, but without the minuses: fun, interesting, and scalable. Thinking, I came up with the idea of ​​games - it's fun, I like people and solves the problems of mentoring.

    Games!


    What games do we know? Checkers, chess, spools and dominoes are an intellectual occupation, despite the simplicity.



    Cards  are also an intellectual game. Who does not like the classic, there is "Magic: The Gathering". Many IT people love this game, including me. Many IT companies host entire tournaments dedicated to her.



    All these games are games for entertainment, not for programmers, and I wondered - are there any games for programmers? And I found, for example, such a game.



    The player operates with color blocks, compiles the source code from them to control the astronaut. Obviously, the game is completely childish, I would say - kindergarten. She does not turn the player into a senior.

    Then the game is abruptly: 3D-landscape and three-dimensional hero-robot.



    In some C-like language, you need to write pseudo-code to control the robot.

    Below is a screenshot of the third game I found.


    Here, again, on a pseudo-code, you need to write a program to control the character: move it through the maze, open and close doors, manipulate objects.

    All other games are similar to these three, and all have many serious flaws.

    Game disadvantages


    These games teach only basic concepts  - such as variables, loops, functions - something that even juniors learn at the institute. Games are divorced from real industrial tasks , because they have neither multithreading, nor transactionality - all that the senior or middle knows. Games like this are not taught, and this is their problem.

    The player controls the character or the "robot" , while in reality the seigneurs and middles work with very complex business objects. And besides, the player is always alone , while in IT they work in teams. Any software project is a team work. Since many programmers grew out of introverts and teamwork is often difficult for us, I would like the game to pump team skills as well.

    Personal gaming experience


    At the same time, there is a rich culture of board games in the world: Munchkin, Magic: The Gathering, Dungeons & Dragons. But, unfortunately, I did not meet the “desktop” for programmers.

    Personally, I and my whole family: wife, daughter and cat Tishka, we love the “desktops”. Moreover, my daughter and I love to create them. We came up with the game according to the popular at one time program “Revizorro” and other various adventure games. In these plain photos there are 3 examples of our “desktops”.



    How did I come up with the idea of ​​board games for programmers? I went through four stages: the negative experience of training employees, the disappointing analysis of current games , the experience of playing “tricks” and the  experience of creating them. All this led me to the "desktop" for programmers. Indeed, why not make the game yourself?

    Game requirements


    How much should it be futuristic or down to earth?



    A short game session  is no more than 15-20 minutes, because as planned, you need to play this game during working hours. Playing for more than 20 minutes, people will get carried away and drop out of the production process, and the bosses will walk and mow. Therefore, 20 minutes is ideal: we played and went on to work.

    The game should teach real industrial tasks that real seniors and middles face: multithreading, JPA, databases and concurrent data structures. These are the topics that often do not allow juniors to jump in the head a certain technical level and become seniors. I’m talking not only about Java, but in general about all languages, including Python, C ++ - everywhere there is multithreading, databases and concurrent structures.

    The next task that the game should solve is to pump skills in teamwork: the formation of a single technical language within the team and the ability to discuss code. Now almost every company has a code review, and a situation is often encountered: developers, especially beginners, see the source code, but cannot describe in words what is happening in it. They can write code, but they cannot discuss it - there is no technical dictionary in the head. I would like the game to pump this technical dictionary. In addition, having a technical language helps you write quality documentation.

    Team building is a requirement that HR will enjoy. I'm not talking about teambuilding, where people gather and drink alcohol, but about meetings where they discuss the source code. Such team building is also there, and the task of the game lies in it.

    To please the lord and the team.I want the game to be liked personally by me, as the senior and the host of this game, and the team - so that it would be interesting, fun, maybe even somewhere provocatively.

    The last requirement is very important - the game must be a real live board game, no online, only offline . Several times I was asked to write an online version of this game, but I always refused. Many are familiar with the game of Go, but not everyone knows that in a real Chinese game, black chips are made of basalt, and white - from a special sea shell. Plastic chips are no longer Go's game. The Chinese are sensitive to tactile sensations during the game - they should be part of it. I think exactly the same. Therefore, my game should also be lively and give tactile pleasure.

    An example of "Tables"


    The game I developed is called "Who Stole the Monitor?" Since we are all techies, we know that the monitor is not the TV we are watching at work, but the concept of multithreading. The task of the game is to collaboratively introduce the team to deadlock in Java multithreading . Players in a team do not compete with each other, but together solve a common problem - a real team building. I chose the topic of multithreading, because this is the bar for the June, through which he often cannot jump, and start writing real good industrial code. Business requires large capacities from us, and  almost every industrial program is multithreaded . Therefore, it is critical for both business and programmers to know what multithreading is.

    Game elements


    The first element is the Source Code field on a large sheet of thick cardboard. It shows a certain piece of code - in our language Java.



    The next element is the wands of the current lines . These are colored frames made of wire.



    Each player in turn moves his stream staff through the source code, thus displaying the current progress bar.



    The game has two playing fields. The first is a state machine  - squares and arrows with inscriptions.



    I took the state machine from the standard Java documentation. Every senior, middle and even a junior should know this state machine by heart, but in my experience not all Java developers know it, many write code without this knowledge. One of the objectives of the game isto pump skills in knowing the state machine of Java threads .

    The next element is double-sided stream tokens .



    On one side, closed eyes are drawn - this means that the stream is inactive. On the other side - a running man - the flow is active.

    I will illustrate how the chips move around the state machine. If the thread started to work, then the player moves the status token to the new”  state - the initial state when the thread has just been created.



    During the game, as a result of some events, the player moves the chip to the “ runnable” state , not forgetting to turn it over with the side on which the running little person is drawn, which means that now its flow is working.



    The next element of the game ismonitor cards .



    These cards first lie on the common stack, and then the players take them into their own hands. Each monitor is attached to a Java object, of which there are two: “one” and “two”.

    The last element is the hours of the flows .



    Probably all techies know that threads can "fall asleep" for a certain time. To measure this time in the game, there are watches where you can move the hands.

    Consider a few moves from a game session.

    Game Session Example


    We have three players:

    • Michael works for the “main” thread - the main Java thread.
    • Eugene - stream "t1".
    • Svetlana - the stream "t2".

    Each of the players puts himself in the place of one of the streams and lives his life in the process of the game. So he understands what it means to be a Java thread.

    Michael moves the stream wand to the first line of code.



    Eugene and Svetlana are still sleeping - their threads have not been created, and Mikhail moves his stream staff to the next line of code where it Thread t1 = new Thread() is written - this means that the stream will be created by Eugene "t1".



    Eugene does not yawn, takes his stream chip and puts it in the “runnable” state - the side with the running man.

    Teamwork Example


    Svetlana tells Eugene:

    • Eugene, why did you put the chip of your stream not in the "new" state, but immediately in the "runnable" state?

    • Why not?

    It can be seen that Eugene is the most inexperienced junior in the team, but Svetlana is more experienced and says:

    • Eugene, according to the state machine, the initial state of the flow is “new”.

    Eugene agrees with Svetlana and moves the chip of his flow to the correct position.



    This is an example of how the team transfers knowledge during the game. The game goes on ...

    At a certain turn, Michael makes a comment to Eugene:

    • Eugene, you entered the synchro block, but forgot to do something ...

    • Exactly, I forgot to pick up the monitor of this object!

    Eugene takes the monitor of the " one" object . It turns out that the stream "t1" Eugene owns this monitor.



    Then comes the game: many moves, omissions, work with the clock. Read more on the video or on the slides in the presentation .

    At the end of the game, Eugene has one monitor, and Svetlana has another, and the flow of each of them is blocked by the expectation of monitors . As a result, both the stream “t1” and the stream “t2” are in the “blocked” state, that is, we observe deadlock.

    During the game session, each of the players will personally check, feel what deadlock is, how it arises and what it is.

    conclusions


    The game session is short . In 20 minutes, people communicate, discuss tasks, exchange experience and knowledge, work in a team. You can train not just one person, but a whole team - the game scales 1: n .

    Players experience the experience - real and lively. Each player puts himself in the place of the flow, lives his life as his own and solves the real industrial problem . Deadlock - this is a serious problem - the reason for many bugs, including "floating" - heisenbug, which not everyone can fix.

    Board Game - Live. For example, in the process of capturing the monitor, people pick up cards, move flow chips, feel the game with their hands. Several channels of perception are involved and knowledge is deposited deeper.

    Game experience


    I’ll talk a little about the real experience of using this game. There was a case that I remember well. Three people participated in the game: one of the players worked only on Delphi, the second on C ++, and the third player knew only Haskell.

    My task was to teach them Java threading in 20 minutes. In 5 minutes I briefly told the rules, and then I watched with interest the team dynamics according to Tuckman .



    First a storm, then normalization - the team played on their own without my help, discussed the moves, and reached the finals, enriched with knowledge. Everyone was satisfied.

    What else can you learn in the game


    In addition to deadlock, other important multi-threaded themes can be used in this game mechanics:

    • Race conditions  - race of streams in which usually even seniors usually do not understand.
    • The wait / notify mechanism .
    • The join / isAlive mechanism .

    What games can still be made?


    In addition to multithreading, you can beat other important sections, for example, state machines . If you see squares with arrows on the diagram, then this is a state machine.

    You can gamify the state machine of JPA entities and the life cycle of JEE / Spring components. As an example, I will show how to make a game for a state machine of a JPA entity.

    We open the section of images of Google, we drive in "The machine of states of the JPA-entity".



    We find the visually appealing state machine, beautifully format it in any editor, and voila - the game is ready.



    You can make games on any serious topics with which the seniors work and in which the juniors “swim”.

    • JEE transactional mechanisms.
    • SQL isolation levels.
    • Data Structures: Queues, Stacks, HashMap.
    • The structures of the java.util.concurrent package.

    Everywhere, players will put themselves in the place of mechanisms or structures, and living their lives, master complex topics.

    When I was preparing for the report, it occurred to me that with the help of such game mechanics it is possible to teach people even business requirements . Often I met situations where programmers write a business product with a poor understanding of how this product works. Using gamification, you can train programmers in the business requirements of the product they write.

    Game development


    The game is collaborative, but you can add an element of competition. For example, give players reputation chips . If one player makes a remark to another or transfers knowledge, a chip exchange takes place: the person to whom the remark was made gives the chip to the one who corrected him. According to the results of the game, the number of reputation chips is calculated, who has more of them wins.

    Decision making  is a necessary element of many “desktops”. If you enter it into this game, it will become tougher. And if you cut the field along the source code and randomly rearrange the lines at the beginning of each game session, then each time we get a new game field. The element of chance will add interest.

    Game updates can be monitored on a  Linkedin account.Artyom Larina or on GitHub. From here you can download the elements and try to implement the game at home.

    This report is just one of those that helped us understand the relevance of the topic of training and knowledge transfer. As a result, on April 26th we are conducting KnowledgeConf fully dedicated to this. Both about modern non-standard methods of training, and about the transfer of experience to beginners, there will be many useful reports . Join us, and the problem of employee growth and sharing knowledge in a team will cease to be unsolvable for you.

    Also popular now: