Let's take another example, okay? Let's take the following code. This code was written just a few weeks ago in my team. Yes, my team and I are not, you know, not innocent. And we're having the same problems from time to time even though we are all experienced and we are working together for quite some time now. But it still happened.
So here we are looking at two ways to achieve the same functionality which is to call a function, create item, and get a new item instance as a result. While the first option is to call the function and put in all the parameters one after another, the second option defines an interface which owns the exact same properties and the given request parameter for the function should be should comply to that interface. Now we're not, we do not have time to dig in which one is better, so I'm not going to discuss it right now. But you're probably familiar with these kind of coding dilemmas that sometimes even rising in a code review process. And those dilemmas can lead up a passionate discussion that quickly escalates to an entire team rumble, okay, and this is exactly what happened in my team just a few weeks ago, and it was over Slack, okay, with more than 15 messages around this issue. So, imagine that.
So, again, what I want you to take from this session is how to spot those moments and to either win the game or avoid it in the first place. What I found working to reduce the level of drama around such issues is to ask myself two main questions. One is whether this is reversible, and the second is how fast can I know that I made a mistake, okay, that I made the wrong decision. Now, if the issue is reversible, okay, I mean, if the decision I make and implement the code by that decision is reversible, then good, problem solved, okay, no need to emphasize over and over this same discussion. And if it is not reversible, well, I'm really doubt about that because I'm not familiar with almost any kind of software field that is not, you know, cannot change the software by over the air update or whatever. The second thing is to define a fast point, okay. We need to know what would be the KPIs, what will indicate us that we made a good decision, a wrong decision, or a good decision, also. And also we need to own a backout strategy. It means that if we consider two or more approaches, and we picked one, and we probably guessed that we might want to switch to another one, so we need to have a backup strategy so the transition will be, you know, as seamless as possible for users in case the decision implemented and on production. Another lesson I'd like to share is that if the issue is critical and you don't get to a decision within 10, 20 minutes, maybe a bit later, but, you know, try to bound the argument in a certain timeframe. So if you don't make a decision within this timeframe, just consult the jury. Okay? This jury should be someone you're all agree on and appreciate their knowledge. And by the way, it should not be the manager or the team leader or whatever. Okay? Don't put them in this awkward situation where they have to choose between you or someone else in the team. Okay? It's not their job and it's unpleasant for everyone. Also, I want to emphasize some meat around seniority level. Now being a senior in a team doesn't mean that the decision is yours to decide. And the decision is yours to make. Okay? It means that you are the team advisor.
Comments