Hi all! I lead antispam team and several machine learning teams at Mail.ru Group. The subject of this article is self-development for team leads/managers. But in reality many techniques and recipes do not depend on the role at all. This really concerns me because machine learning is developing extremely fast, and it takes a lot of time to stay up to date. So the question about what should be done for development and how is quite topical.
Of course, the content of this article is not the ultimate truth but just a description of the results of my continuing quest. It tells about approaches based on books and workshops, trials and errors, which have worked for me. It'll be good to have a discussion with you in comments.
As I have to make job interviews quite often, I ask all applicants a question: «What do you expect from your manager?» Apart from typical answers («being able to set objectives well», «giving feedback» and so on), in 95 % of instances they say that manager should be an expert. That is, people expect their manager to boost their professional skills. So we managers are partially under pressure from the environment trying to wear two hats all the time and split our time somehow between people management and our expert fields (dev and ML in my case).
Indeed, our value for our companies depends on how we split our efforts between these two work areas. If one leads a team of five and commits 100 % of the time to dev, not paying attention to people management, then the team will work at random. Which means that such a leader's value for the company is very low. On the other hand, if one is doing not exactly what he or she wants to do, then the motivation in daily work may be not so high. One just doesn't feel happy on a daily basis. The answer to questions like «Am I happy?» or «Am I doing what I want to do» may be «No», and this can strongly undermine one's motivation.
Every good manager knows that time needs to be allocated to personal development. So, imagine that you are sitting at your desk after hours when there's nobody in the office and thinking what skill to train.
Example: you lead a small backend team, and you all are about to face introduction of Kubernetes. You have a vague idea of what it really is. In addition, your distributed system designing skill is below average. There are two recommended books about Kubernetes and system design before you. Which one to read?
Another example: you and your team had to redesign the system because of your last error in design, which means a doubling of effort. At the same time, you spent a half of your time budget procrastinating and were unable make yourself work effectively. So, you thought less about the design process, your team, control, and so on. What to spend your time on? A recommended two-day Time Management workshop or a book about System Design? The answers can be not obvious.
What to train?
Let's figure out what really can be trained. To do this, let's build a pyramid where at the base are fundamental competencies, which are essentially responsibility, drive for results, communication paradigm (those well-known «win-win», «win-lose», and so on) and passion at work. They will be discussed here quite soon.
Then goes personal effectiveness: how well and effectively you work during the working day, and how good are your time management, training, planning, self-fulfillment, and so on.
Above these are soft skills (which really include personal effectiveness, but I've put it on a separate tier due to its importance). The majority of those skills are related with communication. This is a rather broad subject. As an example, consider skills that are common to managers, such as people and project management, presentation skills, decision-making, negotiating, and so on.
Above these are primary professional skills (Hard Core Skills): databases, understanding of how distributed systems work, some fundamental machine learning processes in my case.
Finally, on the top are «modern» professional skills (Hard Contemporary Skills) which change from time to time in our inventory: specific programming languages, knowledge of certain libraries, databases, and so on.
Personal development priorities
You can invest as much time as you want in learning specific languages, libraries and databases. The main thing is to understand where exactly to invest. At any point in time, you need to understand it clearly what you are doing and for what. I prioritize lower tiers of the pyramid because upper tiers depend on them. For example, development of personal effectiveness will free up time for learning a language or improving presentation skills.
Say, you develop your personal effectiveness. Consider two situations: you either work eight hours a day and perform well, or you spend only four hours a day (we all have been in both situations). In the first case, you really have twice more time for both personal development and work, so the lower is the tier the longer is the term of investments you make.
If you succeed in building your fundamental competencies such as responsibility and drive for results, they will remain with you all your life, you will never lose them. Communication skills and personal effectiveness will remain for tens of years because different paradigms change from time to time. Consider messengers and phones as an example. While 30 years ago one could work undisturbed, without distractions, now there are new difficulties due to notifications from messengers, Facebook and others. So we need to rearrange ourselves from time to time. Extensive use of VR or being connected can turn our lives around and dramatically change requirements for skills.
Hard Core Skills will remain useful for around ten years. For example, the distributed system design skill was not required 15 or 20 years ago, but now it is in high demand. Some of today's dev methods will remain useful for several years. They will transform into core professional skills (neural networks, for example) from time to time. While around 5 or 10 years ago it was the domain of few researchers, today it is the cornerstone of machine learning.
It's obvious to me from this reasoning that it's better to dedicate time to learning Time Management rather System Design. In turn, learning System Design is preferable to Kubernetes. I'm going to tell you about the two lower tiers as the upper ones are more or less clear.
There are four fundamental skills (as I learned at Nina Afonina's workshops):
- Drive for results
- Communication paradigm
- Passion at work
A quick example: antispam and stark realities of working in such a team. Spammers keep attacking our email service all the time. Adapting to the protection system constantly, they create such a pressure that we have to make new features on a recurring basis. As soon as you make something, you have to devise something new. This looks pretty much like the eternal struggle of weapon and armor. Such powerful nonstop pressure once resulted in a huge technical debt because we didn't have enough time for all the required protection subsystems.
Let's review a generalized picture of team lead in our team who faces the challenges described above.
A person with a less developed sense of responsibility (whom we try to avoid) would hardly want to resolve issues when it comes to tackling challenges and breaking the system. «It's always been like this, the project's a mess, this can't be made good, we have 100 services, it'll always be like this, I can't change this.»
If a team lead has a moderate sense of responsibility, he or she will take responsibility understanding that situation can be changed. Perhaps, the team lead will try to convince the manager to allocate more time for that and will be able to do many things. But when such a team lead faces major issues (for example, mail service is down for an hour because of a bug in prod), he or she backs up and tries to shift responsibility to teammates: «We don't have enough testers, we don't allocate enough time, this is SRE’s fault.»
A highly responsible person will assume responsibility both for her own work and for the team. Such a person understands that an error made by someone in the team is her own mistake too. An indispensable element is proactive behavior: learn from mistakes and do your best to prevent recurrence. As a result, the issue goes away over time.
Drive for results
Consider the example of antispam again. Hundreds of millions of images come to our services. To process them, we introduce neural networks which are a high-load system. A team lead with low drive for results will not be able to make a sound action plan. Most probably, there will be approximate target dates and approximate goals. As a result, tasks will be almost never fulfilled when due.
With moderate drive for results, there is already some plan and understanding of risks. If you come to agreement that a task will be fulfilled in a quarter, then it will most probably take 3 to 5 months. But the goal will change if there are major obstacles: «Our estimation of the service's capabilities was wrong, we don't have enough servers, there are no resources, so we will launch the feature only for a part of users or for specific images.»
With high drive for results, there is always Plan B. The main thing is that not goals but ways to achieve them change when major obstacles arise. At the moment, when we encounter this issue, we try to make steps that are non-trivial for us: ask to pay for servers from others' budget because ours is exhausted; or take servers from somebody's current cluster and add to ours, and write something or help in some other way in exchange.
But no matter how great you are as a developer or a team lead, all your technical skills will be by an order of magnitude less effective unless you resolve issues in the project. In other words, you should take responsibility, follow up the task and do this when due and with appropriate quality. Any task that is not 100 % fulfilled remains with you. Tasks will pile up like a snowball.
How to train skills of responsibility and drive for results?
The scale described earlier helped me a lot. Using it, I was able to define my current position and understand what I lacked. Since then, I've run retrospective analyses every month, every quarter and every year asking myself questions: «What risks I didn't consider in the project?», «Where I could have been more result-driven?», «Where I attempted to shift responsibility to others?», «Were there any conflict situations?», and so on. I always try to learn something new, and to train this skill as well.
We are talking about «win-win» and «win-lose», that is, about how focused you are on yourself and on others. It should be noted here that evolution of nature is based on some agents' combining to become something bigger. For example, cells combined in our bodies can do much more than each one acting separately. Genes combine into DNA, animals gather in groups, and so on. When a country makes war with another and captures its resources, the resources change hands. But when there is commerce instead of war, it is mutually beneficial cooperation, and everybody wins as a result.
If you believe that «win-win» is not a very good strategy, then you should learn more about the evolution of life and survival of creatures. :)
Helping others is more than just a good strategy in our world — it makes us better. Helping another person in good faith provides a sense of accomplishment because of sympathy. Ways to help others are common to all, so I'm going to focus on a non-trivial thing: spread of ideas.
Richard Dawkins suggested that ideas are like viruses. They infect people's minds and are spread from person to person. Ideas evolve, go through natural selection and so on. Successful ideas establish themselves in people's minds, unsuccessful ideas fade. «There are no bad people, there are people with bad ideas« Sam Harris.
At the same time, good ideas do not spread by themselves. When you learn something good and valuable, you should project it to others. There is a lot of information noise and nonsense around us, so healthy information is like a sunbeam in darkness.
Passion at work
Let's proceed to passion at work. To develop, one should firstly want to do that. Secondly, do that well. To want to do something, one needs resources of the body, including brain. There are four types of resources: physical, emotional, intellectual and spiritual (goals and values). If some of those resources are limited, then it will be hard enough to find motivation for development. For example, there can hardly be any development if you haven't slept two nights in a row. It is also hard to find motivation for changing something when you are exhausted by a workplace conflict. A common problem is lack of resources of several types at the same time. For example, conflict with manager and divergence of one's own goals and values from company's.
You think: «I should go on vacation. I'll spend a couple of weeks in tropical paradise, and everything will work out when I'm back.» In reality, this doesn't work. Rest replenishes only physical resources and relieves emotional tension as a maximum. But as soon as you get back to work, the same things go round and round again. This is why you should strictly follow top bottom direction in replenishing your resources.
How to do this?
As to spiritual resources, it's important to define your values first of all. Note that it is essential to write them down as a priority list. Once I made such a list several years ago, I understood that my work was my first priority, although, ideally, my family, close ones and friends should be placed higher in the list. Then I concluded that I didn't devote enough time to them, so I set a goal for myself to communicate more with others — my friends and peers. But setting a goal is not enough. You need to understand how to pursue it. I began to plan this activity among others in ToDoist. For example, I defined a task: to meet up with my family or friends for a little poker game, for example, once in a month. It is important here that value-oriented goals are a plus both for me and for others (within the context of the «win-win» strategy I've described earlier). In this case, it is important that it is not only you who is happy about the event.
To replenish your intellectual resources (learning new things or enjoying your hobby), you should do what you like to do. I decided that I should develop myself both at the workplace and at home. I read books and listen to podcasts. Even when I lack development in some way due to workload, I can always learn something new when I'm out of the office. Then I feel that I'm not stagnating. This way or another, many ideas I've learned find use both in my personal life and in work.
Emotional resources are filled first of all with positive emotions. We in this country are not too good at celebrating our wins and successes, not to mention praising others. Once you've launched a new product or feature, it makes sense to buy a cake or pizza and celebrate with your team. When you see someone do something well, say something to give the person a credit. Apart from being pleased, people will begin to share such behavior. With time, members of your team will do the same, thus creating a positive atmosphere.
Physical resources. Sleeping, eating and exercises. Nothing new. But I'd like to discuss two extremes in distribution of load.
- Daily schedule. Say, you get up at the same time every morning, eat healthy three times a day and exercise three times a week. You optimize yourself to this schedule and most of the time everything runs like clockwork. You perform quite well and are buoyant and cheerful as long as you stick to it. But there is a downside. When something is different from what you are used to (for example, you've slept a couple of hours less), this can make you feel bad all day. For 10 years, I was in a state where I could spend half of the day just to recover after having just an hour less of sleep.
- Stochastic loads. At some point, I decided to undergo a random load experiment. The idea was to do rather extreme things from time to time. For example, to sleep only two hours a day, to work without holidays, to go to a music festival on holidays, and so on. As a result of this, the body is subjected to a regular stress (the main thing is that it is moderate, not «fatal»). This way you can see how your body works in extreme circumstances. The underlying idea behind this can be that human body is designed for life in primitive conditions, like in prehistoric times, where there is no daily schedule. For example, you do nothing all day because you have food. Then a tiger shows up suddenly, so you run for 10 minutes as fast as you can, then rest again, then hunt a mammoth for two hours, eat mammoth meat for two days, then starve for three days, and so on. The idea is that your body is well suited to such unexpected and irregular loads. It's exactly due to the practice of random loads that I can sleep only two hours a day without feeling broke. Profit!
Goals and motivation
Let's proceed to goal-setting and review its downside.
Say, the goal is to improve KPI by 10 %. For us at antispam this means less spam complaints from users in mailbox.
As you progress to this goal in the course of a half-year to one year, you always refer to the final result. Essentially, you are constantly dissatisfied with the fact that you are still not at the final point. But when you achieve your goal, your joy is short-lived, and you set new goals.
Another point: every goal must always be measurable. Such a goal is very difficult to set as people are not really good at planning in general (planning fallacy is that people think they can plan (с) E. Yudkowsky). And, indeed, it's hard to tell what will happen in the future. So the goal can turn out to be underestimated and easy. And then you have a feeling of fulfillment: you can stop working on your task and ask for an increase in pay for the success. Although you could have tried to do even better.
Or, otherwise, the goal can turn out to be unachievable. This causes a persistent lack of motivation since your brain discharges dopamine as you progress towards a goal that promises a good chance of success. It turns out that the result is poor no matter how hard you try.
One is tempted to follow the motto: «Goals are for losers» (taken from «How to Fail at Almost Everything and Still Win Big» by Scott Adams which I highly recommend you to read. You can find it here). So what is for «successful» people then? They can use systems that will allow them to increase the chance of success with goals.
Let's see the difference from examples. Say, you wish to earn more or have a career promotion. You can set a goal for yourself: get the position of your boss or a similar position elsewhere in the market. You live in the shadow of this goal, trying to do something, maybe set someone up, or you brokenly search for a similar job in the market. It turns out that you optimize a short-term goal which is in your way to a long-term goal instead of just choosing a much more promising strategy and job.
Alternatively, you can adopt a system for yourself which will make you more valuable in the employment market. Your value for both your company and the market will increase as you gradually develop your skills and widen your knowledge. So, when an opportunity for promotion arises, you will be ready to get it. This approach is not related directly with time (this is a plus) since, I would remind, people tend to plan things extremely poorly, including the time to achieve a goal.
(Source: presentation of the book by Scott Adams)
Concept of the system designates a feeling of progress (which maintains stable supply of dopamine to the brain and, consequently, feeling of satisfaction and happiness) as a counter to goals. You constantly learn something and understand that you do something to approach your goal everyday. This brings emotional comfort.
Another example: you can set a goal to lose 5 kilos, or you can follow a healthy diet which will lead you to the desired result and improve your health in general over time (not necessarily in the nearest future).
Consider public speaking as an example. For me, public speaking is a stress. I'm an introvert. I like to spend time with a book or playing a game. But there are motivators: some altruistic philosophy — to bring something useful, to project good ideas, good image, networking, and so on. So, instead of speaking N times in M months, I designed a system for myself: to speak in public whenever there is a chance to, and proactively create opportunities by registering for all suitable conferences. After that, I just follow the plan without thinking and tackle all the challenges as they arise. This can lead to a single speaking event in the whole year, or there may be ten events (as I had in 2019). None of the options will disappoint me, provided that I know that I've done all what is needed as part of the efforts planned.
Motivation is now clear: we have reasonable goals and will. The only challenge remains to do it well. Let's proceed to personal effectiveness.
I perceive personal effectiveness mostly as a struggle against procrastination.
It's important to understand here that any state of inventiveness and productivity can be managed. All it takes is to define factors that increase probability of getting into such states.
Here, again, we return to evolutionary psychology, to the fact that human brain is more suited to life in the wild rather than in the office. As Daniel Kahneman, author of «Thinking, Fast and Slow» (available here), figured out, people think totally irrationally. In 95 % of instances, they make decisions by instinct, on the basis of heuristics that were typical in ancestral environment. For example, people most often elect presidents according to the appearance: if he has a strong chin, then he is a good leader.
The part of the brain that is responsible for rational thinking is very lazy. It rarely gets involved and affects our decisions. If you set a goal for yourself to eat healthy, and your peers buy a pizza for a little birthday party, then your inherent reflexes will force you to reach out and have a piece. It may well be that the rational part of you will not be able to affect your actions. Indeed, it takes strong will to resist the temptation to act «spontaneously». Hence, it can be concluded that you should organize your environment in such a way that it would be quite easy for the ancient heuristic part of your brain to make the right decisions.
What does it mean?
You are tempted to play a video game instead of preparation for a speech? In this case, choose a place for preparation where there is no console. One of my peers, for example, leases a PS4 for limited time.
Want to browse through social media instead of working? Take care to block access to entertainment websites at /etc/hosts level, so that more time is required to restore access to them. During these seconds, you can change your mind and get back to the point. Try to perceive yourself as a robot, program yourself and your environment so as to make the right decisions.
To make such decisions (to program the environment in the right way), you need to wait until the «moment of power» comes, that is, when you are well slept out, fed, healthy and ready to take on the day (many experience this state during New Year holidays, just when it's time to define new yearly goals). For me, Sunday evening is such a moment. I sit down and make a plan for the week ahead. If I start planning in the morning on Monday when I'm broke, then my plans will be alike.
Way to efficiency
It's important to understand what it is that you want to program yourself and your environment for. Trace your decisions to see which of them do work and which don't, and where you make mistakes. For example, on Mondays, I run retrospective analyses of how I procrastinated a week before, so as to find regularities.
At some point I realized that the phone is very distracting for me while I'm at work. Whenever I sit down and start doing something, I start receiving messages at once and get distracted. For this reason, I set up my phone so that it asks me every time why I'm holding it in my hand. I got it clear for myself that the phone is made for me, not otherwise. On the first screen, there is nothing interesting, so I'm sure that nothing will catch my eye when I take the phone. Messengers are hidden in a separate folder on the third screen and never show up. In addition, I disabled all notifications. Display does not light up when I take the phone. I check all messengers only when it's convenient for me to do that, not when somebody writes to me. The only way to reach me at once is a call. My peers and close ones know that.
Second example: information noise. Our memory is associative. What you consume and what you have on your mind strongly affects your thoughts. At some point, I realized that news is mostly information noise. I have no news services on my working laptop — they are blocked at /etc/hosts level.
When I was preparing this article, I intentionally visited a news website. And what do I see on the first page? News about where food on presidential flights comes from. So insightful! Over time, I stopped reading news almost completely. I tend to get all relevant information from my friends and close ones, sponging on them in a sense. I don't call on anybody to lead a life like this, otherwise there will be nobody for me to hear the news from. But I recommend to limit news reading substantially. This will free up a lot of time. It's better to read a book than to skip through news and social media.
In addition to regular retrospective analyses, it is very useful to watch how you react. Meditation, a trendy thing today, will help you enhance your observation, that is, eye for details. Many would imagine a Buddhist sitting in lotus pose when they hear that. In reality, meditation is just a focus exercise: sit down, your back straight, close your eyes and watch your breath, listen to your body and feelings. Inhale, exhale. If you get distracted and think about your work, say to yourself: «OK, enough of work, get back to breathing.» Keep doing this exercise for 5 to 20 minutes.
As it turns out, this is infinitely difficult to do because of various thoughts filling your head. Even those you don't want to have. Just try to remain seated for 60 seconds thinking about nothing. I guarantee that none of you would be able to do that, even if your life depended on that. Meditation is a sort of a gym exercise for your brain. It trains focus and understanding of what is happening in your head, what thoughts come to mind, so that you can manage them as soon as they appear before they capture 100 % of your attention.
The practice of meditation improves concentration and ability to enter flow state. Now I tend to use headphones more rarely since irrelevant sounds are usually annoying and distracting. Every time I have thoughts that are not directly related with my current task, I notice them quickly and switch back to work.
In addition, meditation perfectly trains emotional intelligence: the ability to recognize and manage your own and others' emotions. Emotions are very short-lived. For example, someone cuts you off when you drive, and you get angry. The anger itself will go away in a few seconds. But after that you start thinking: «That guy cut me off. Now it's payback time!» Such thoughts start and spin up the flywheel of emotions which, in turn, give rise to other thoughts. This cycle can continue for a pretty long time, but there is a significant difference in quality of life between experiencing negative emotions for 10 seconds or 10 minutes.
The last example: stress and disturbance before and during public speaking. It appears that one can learn to recognize the moment of initiation of anxiety before it grows into disturbance leading to stress, and switch your attention to something else. This practice allows me to limit my inner turmoil on speech day to a couple of minutes.
As you train recognition of your own emotions, you learn to recognize emotions of others at the same time, because the same mirror neurons are responsible for that in both cases. This is surely a profit for communication.
You can begin to meditate using an app for meditation which introduces and leads you through the process (I recommend Headspace or Waking Up). After a year of using a meditation app, I joined Silence Retreat for two weeks of intense meditations, 18 hours a day, which affected me even more. Use links below to learn more about the trip (in Russian): part1, part2, part3, part4, part5.
Manager's task is to maximize output of the team as a whole. If you are a team lead with five people in your team, but you don't manage them and don't enhance their performance, then your effectiveness is very low. On this subject, I recommend you to read «High output management» by Andrew Grove, CEO of Intel (you can find it here).
Manager's task is to do the most valuable work which leads to the maximum increase in team's output at any point in time.
A manager’s output = his output + the output of his team
If there is a technical debt issue, it's your job to resolve it. If people are leaving the team, and you have to immerse in management for a month, then you should forget about self-development in machine learning for some time.
Of great help is understanding that your task is to do work which is the most valuable for the whole business. This is the value you bring. You don't get nervous anymore when the time balance is not observed. For example, you have refined all processes within your team so that everything runs like clockwork, but your adding effect from supervising the team is close to zero. Perhaps, in this case it would make sense to hand the team over to someone else and focus on something that will bring more value.
The second part of the equation is that manager's effectiveness is composed of outputs of both his or her own team and other teams which the manager can affect:
A manager’s output = the output of his team + the output of the teams under his influence
when you see an issue in an adjacent team and you can resolve it, you should do that. Many wouldn't like this idea, at least because they tend to see helping others as a waste of their own time.
At some point I thought that my ceiling depends on those whom I can affect. They, in turn, affect others, and so on. If I develop members of my team to enhance their performance as an effective manager, then it makes sense for me to focus on those who prefer «win-win» strategy. I can project on them my ideas of developing other people. In turn, they will develop their people. That is, dedicating just a few hours to development of a «win-win» team member will allow me to put on my long-awaited third hat and watch the effect of my actions spread.
Finally, I came to a conclusion that the priority in choice between self-development in the area of people management or dev shifts towards development of people since dedicating some time to development of your teammates can produce a much greater effect.
- It makes sense to invest in longer-term skills because they will remain with you longer, and they affect all the rest.
- It makes sense to build out a system for self-development rather than goals, because this is much more comfortable from a psychological point of view, and this allows you to optimize longer-term goals.
- Program yourself and your environment. Perceive yourself as a robot. Keep in mind that we all are rational only at some rare moments and work to program your environment.
- You should maximize output of all those who you affect.
Hope I could project enough of my ideas on you. You will try some of them. I think, they will help you, and then you will spread them further.