Positive and negative reinforcement in teaching programming

Muscle Pain is a Reminder of Mistakes.

Let’s imagine an intern. It is a very sophomoric person who does not know anything and has to be taught. You can consider an intern as a 6year-old child. Herewith, the internship is a kindergarten. In kindergarten, children learn to communicate with peers, paint pictures, sign, and do a lot of other different things. During the internship, people learn programming, testing, understanding of the tasks and reasons, why they are doing the tasks, and what tasks can be considered as completed ones. Just to be clear. Our interns are our students. We teach them from scratch.

    There are several stages of internship:

  1. 1. Applying for the internship. We do not have any requirements for interns, and we usually accept everyone.
  1. 2. The trial period lasts for 2 weeks of remote work. This period is important to identify the behavior of interns and whether they have problems with self-discipline. We ask ourselves if they can achieve their goals independently, or they are needed a person who will motivate them all the time.
  2. 3. The last stage is the internship in our office. Here we start mentoring them and help to improve their skills.
  1. 4. The aim of the internship is to grow up a professional who will create value for the company and clients as soon as possible.

The internship is painful because we have to work with people who do not always understand what and why they do. It is necessary to go easy on with them, lecture them and explain them several times what they should do.

Herewith I have already been working with interns for a long time. I tried a lot of different approaches and I am still looking for the ways how to spend less time for making people out of interns. During the period, I made a lot of mistakes and that is how the internship looks now.

The internship now

At first, an intern does tasks from our internship program for several months. As soon as he can bring a minimum value to a project, we reserve the person to any project under the supervision of the mentor. In this case people develop faster since there appears code review and the mentor explains what intern does right and what — wrong.

This is the difference between intern who is almost a junior developer and student who has just come to the office. In addition, every intern has two mentors — morning and evening ones. Both mentors spend about an hour of their own time for communication with interns. In the evening the mentor helps to interns more: he suggests the ways to decide problems and tells how he would solve the task. Morning mentor asks theory and examines interns.

I am morning mentor. In the morning, we usually discuss the following issues:

  1. Why do we have to write tests?
  2. Why is testing so necessary?
  3. Why do we need to write code?
  4. How to complete tasks.

However, during the internship we face two problems:

  1. Discipline. It is major problem across all our country.
  2. The speed of learning. People do not learn new material as fast as we want.

Punctual people come to the office at 9 am sharp, others come at 9:15 and 9:30. However, we do not criticize people for being late. Issues with discipline appear in other places. We have the written document about the working process of our staff. It is necessary to track time, commit regularly and report on the progress of tasks.

For example, if the intern does not send pull-requests regularly I come to him, ask to follow the rules and explain why it is important. However, interns do not always take my comments into account. In addition, the intern may not write comments in JIRA and does not ask for help.

There may be two reasons for such behavior:

  1. A person does not understand why commits, pull-requests, comments and other proceedings are necessary.
  2. A person is not self-disciplined enough.

The first problem can be solved by creating situations when process described in documentation is really useful. For instance, person finished his part of a task. Task moved to another guy. This guy always asks questions from first one and disturbes him from work. By just saying: «It there were comments, the problem would not appear», — we make a person to write comments more often.

Negative reinforcement

The situation is more difficult with discipline. In 2015 I solved the problem with being late through push-ups. If a person was late, he would do from 1 to 100 push-ups. Repetitions was choosen randomly.

Recently, I have decided to apply this method to interns who do not send pull-requests, report on tasks or do not follow the formula to write stand-ups.

The rules are very simple:

  1. For 1 unlogged hour, you should do 30 reps
  2. For 1 unsent pull request — 50 reps
  3. If you do not understand fundamental things, you should do 20 repetitions.

Herewith:

  1. On Mondays and Tuesdays, interns do exercises for legs.
  2. On Wednesdays and Thursdays — for a back
  3. On Fridays — for arms and chest.

Muscle pain is a reminder of mistakes.

The rules are simple: interns do exercises for making mistakes. It is also important to make exercises more difficult for people who like to violate rules. If an intern makes mistakes for several days in a raw, he gets more difficult exercises:

  1. 1st day — squats.
  2. 2nd day — burpee.
  3. 3rd day — push-ups.

Happily, no one gets to the 3rd day :)

This approach works only because it is not a punishment. This is the negative reinforcement. The difference between punishment and negative reinforcement is that the influence is over at the moment when a person gives up to act undesirably.

However, motivation should also exist, shouldn’t it?

Positive reinforcement

Besides, physical exercises, that correct undesirable behavior, there should be an encouragement of efforts. Since if we always punish people, we will destroy all their motivation and they will stop working.

Positive reinforcement is giving goodies. This can be almost everything: smile, praise, fruits or candies. The practice has shown that when you share goodies with interns, they work more effectively.

In the morning, we discuss different topics in the question-answer format. I ask guiding questions and wait for the correct answer. Herewith, I praise people for right direction of thought or correct answers. In addition to answers, I ask good questions. Now I give goodies to interns for every positive action:

Sending all the merge requests.

  1. Logging all working time.
  2. Having no issues with writing comments in tasks.
  3. Correct or almost correct answers.

Positive and negative reinforcement works for me as well. If people make mistakes, it is negative reinforcement for me. If they work well — positive one.

By the way, positive and negative reinforcement can be also used in animal training. For example, dogs are influenced by both positive and negative reinforcement: tasty food and choke collar. While cats can be trained with positive reinforcement only since negative one has no effect on them.

You may not believe me, but the situation is the same with people.

Conclusion

The happiness of the person who has done exercises for two days in a row and now got a good thing is huge. It is equal to pure childish joy.

Anyway positive and negative reinforcements can switch with each other. For instance today is push-ups for negative one. Tomorrow it can be something like making snowflakes from paper, or read a poem, or read a poem by heart, or give a talk. For positive reinforcement we have many options: bottle of whiskey, candies, mandarines, vitamins or geek devices like raspberry pi, arduino.

Now I use chocolate candies as goodies.

P.S. If the topic seems interesting to you, comment about this. I will write about this more often.

The next article will tell about the internship in details.

Custom Software and Mobile App Development.
PM tools

Top open source project management tools

Top open source project management...

Top open source project management tools

If you ask any project manager what he is dreaming of, he will most likely answer that he would like to get some sleep and that the product...

No-Code and Low-Code Development.

No-code and low-code development

No-code and low-code development

No-code and low-code development

The no-code and low-code development market is booming. Some people, including specialists, believe that no-code and low-code are the future of the...

Transportation Industry in IT

Transportation industry opportunities in IT

Transportation industry opportunities...

Transportation industry opportunities in IT

It’s hardly possible to name an industry in which high technology has never been used so far. Transportation is no exception. Like with any business,...