Employee Churn and Software Rewrites

Leadership, Programming·Management Teams

When knowledge walks out the door, so does the reasoning for many decisions that led to the current architecture along with it.

We all know that rewriting something from scratch is rarely a good idea. The most common time for people to fall into the “big rewrite” trap is when the original authors are no longer around to explain and defend it. Writing code itself is far easier than reading it, so given the chance, often developers will opt to start from scratch. As systems grow, evolve and become increasingly complex, the ability to understand it as a whole goes down. So we take what we know of the system and believe that we can create a more straightforward representation of it by starting again. But in the same vein as Gall’s Law, any complex system has evolved from one simpler that worked, and over time, any rewrite is destined for the same fate if taken over by a new set of developers. It’s too much work to understand the existing system because it’s complex. We don’t understand the system, so we take nothing but assumptions into our rewrite.

So how can you protect yourself from this endless cycle of rewrites? The most straightforward but most challenging solution is to ensure that you don’t have any employee churn. All the authors of the system stay on the team and never leave. Simple in theory, difficult in practice. Another simple but complex solution is to try and architect your software into discrete modules, which are individually easy to understand and refactor, but that can then be composed together to form a more complex system; Think microservices. The trouble is that there is a lot we don’t know about a system when we start, so unless you’re staying on top of your tech debt and refactoring your code to match your evolving understanding of the problem, then you will end up with a “big ball of mud”. Clear and up-to-date documentation can help. Especially documentation that explicitly calls out designs (Design Docs) and individual decisions (ADRs). But who reads documentation anyways?

This isn’t to say that there aren’t times when a rewrite is a good idea. Not all systems built for the challenges of their time will necessarily address the challenges of today, so starting from scratch may be the optimal solution. And when the original authors of the system are present to acknowledge the shortcomings of a system and how a new architecture could address them, that can be a strong signal that it may not be a rewrite for rewrite’s sake.

Team Health > Team Output

Leadership·Leadership Management Teams

The majority of my time so far as Head of Engineering has been spent looking at the team’s health. Team health is a broad term, as it encompasses more than “is the team doing okay?”. At a minimum, it means, are people on the team engaged and happy, right through to, are there processes and documentation in place to support them in the day-to-day process of delivering software.

Managers tend to spend a lot of their time looking at just the output of their team. Are we delivering? How can we deliver faster? How can we write better code? etc. But unless you have your underlying team health in order, this is the wrong thing to be thinking about.

If you’re the coach of a football team, the aim of the team is to score goals and win matches. So you could spend all your time focusing on drills, improving core skills, and practising shots. But what if all the players on the team are sick or injured? All the will in the world won’t win you the championship if no one is in good shape. You need to let your players rest and recover before you focus on their skills and scoring. The health of the team underpins everything about the output of the team.

Stop Working In Your Team and Start Working On Your Team

Leadership·Leadership Management Teams

As Engineering leaders, it’s easy to get swept up by the day-to-day grind of delivering software. Code quality, broken builds, deployments that didn’t go according to plan, 1:1s, conflicts, stakeholders, and all the other things that fight for attention as we try to satisfy the organisation’s needs. This is us, working in our teams. We’re getting into the weeds of what’s going on and helping firefight issues as they come up. But to be effective in our role, we need to take a step back and think about how we can be working on our teams. To look for and cut through all the noise and waste. How can we improve our processes to build more robust software? How can we improve our ways of working to go faster? Where are we missing data that would allow us to make better decisions? If we’re not doing these things and just getting stuck in the details with the rest of the team, then what are we bringing to the table as leaders?

Not so remote

Leadership·Teams

Fostering a team feeling when everyone is remote can be extremely difficult. It’s easy to feel like you are working in a total silo, and can be made worse if everyone is spread across distant timezones. Being able to function as a team is a key component to project success. Feeling isolated and alone when problems come up can make work frustrating and stressful at times. Here are a few ways to try and overcome that:

  • Try and arrange core hours where the whole team is available and together on Skype/HipChat/Slack.
  • A weekly call with everyone to update on work, issues and client feedback.
  • A daily call between project managers and members of the team to chat about current progress and the project as a whole.
  • Code sharing sessions. Show code to other members on the team and explain what features are and how you’ve gone about implementing them.

Small teams and interruptions

Programming, Leadership·Teams Productivity

It’s hard for non-programmers to understand just how bad interruptions are when it comes to being a productive coder. While most jobs suffer from the same problems of “getting back into the flow” after being interrupted, programming is especially difficult as normally programmers are trying to hold a number of structures in their head at any one time so as to solve whatever problem it is that they are working on.

In most small companies, the development team is might only consist of three or four people and in such a small team with a large backlog to deliver, it’s not normally the teams size that is the main factor in being able to deliver large amounts of work, but all the small interruptions that happen during daily business. Asking a developer that is sitting close by about when a feature will be ready or whether something can be fixed/changed is all too tempting and easy to do. Why IM or email when you can just shout across the room. It only takes a few 10-20 second interruptions to change a productive three to fours hours into just maybe one or two.

Once a company grows these sorts of problems can be smoothed out by having someone act as a barrier to the developers, shielding them from minor questions/requests and letting them continue with their work until free to discuss them. Small companies don’t have the luxury of assigning someone that role so need to find other means to minimising that contact. It’s important that someone sets some ground rules. It could be as simple as there is a set period of time every day that programmers should not be disturbed or communication should be limited to IM and email if possible. Just removing the constant stream of “Is X ready yet?”, “Did you get a chance to look at Y?” or “Would it be possible to do Z?” would mean a huge productivity boost for your programmers and overall deliverables for your company.

Broken Window Policy of Programming

Programming·Teams

There comes a point in every software projects life where everything just feels wrong. No one wants to touch the code as it stinks and everyone working on the project just feels demotivated and would rather just go home then have to do anything more on it. On projects like this, when it comes to adding new features or bits of code, because everything else is such a mess, the changes are just hacked in rather than being properly thought out and coded up well.

We’ve all been there and the frustrating thing is that our opinion of the project, from good to bad, seems to happens over night. If you sit down and think back, you can probably pick out all the things that were just shoved in that eventually led to the project becoming a mess, but at the time we never chose to do anything about. It’s almost always a case of deferring better solutions or a round of refactoring to some point in the future. “I’ll knock this up now and come back to it later.”. The problem is that later never comes. This is the essence of technical debt. You may only go into debt by a fraction, but do it a few times and eventually all those fractions add up. Until one day when you go to check your balance, you find yourself swimming in the middle of the ocean with no land in sight.

Implementing a broken window policy can go a huge way towards keeping a project healthy. If there is a broken window (bad code) fix it as-soon-as-possible. It doesn’t have to be that instant (although if you can, you should), but fix it. Part of the policy also means trying not to break windows yourself. Write the best code you can, as often as you can. Set the benchmark of quality for the rest of the team, even if they don’t follow suit. The danger is that many people are very “me too” about things. “Well if such-and-such can do it like this, then so can I *hack* *hack* *hack*”.

Of course we all write crap from time to time. TBH most of the stuff I write is crap. But I honestly feel more motivated to work on code that’s been loved and looked after, rather than something that’s hanging together by a thread.

From 0 to 100mph

Leadership·Teams Rant

Drivers to your cars

Get a car, fill it with gas, put some sparkly rims on it, dress it up in a body-kit, stick some brand name decals on it and step back. What happens? nothing. Nothing happens without the driver. Nothing happens without someone getting in the drivers seat, turning the key and stepping on the gas. When it comes to performance and chatting about car lap times, a lot of people will say, that the average Joe in the same car won’t even come close to the same lap times as the pros. The same is true of software teams.

Get a project, fill it with time, assign some developers to it, dress it up in a “respected” language, stick some brand name methodologies on it and step back. What happens? A whole world of pain. Pain happens without a driver. Pain happens without someone getting into the drivers seat, making sure the whole team is constantly onboard and steering them forward.

Change follows the leader

Change needs a leader. Someone who can inspire and lead the team out of the darkness and into the light. I suppose what’s really needed is a project Jesus. The one true light and way. Someone who can mentor and guide those less informed on the various subjects, so that they can go forth and do likewise. Someone who can keep an Eagle eye view of the whole project and swoop in when things start to go a bit off course. Someone to be the general go to guy. I don’t mean bug the poor guy every five minutes, but use their knowledge to forward yourself. Read their code, study their tests and bounce ideas off them.

The collective is not enough

For a team to change, it’s not enough for the team to suddenly try and change course. A rudderless team will go nowhere, or funnily enough probably in a circle. While few may be motivated, and some willing, it’s likely that a few will stand their ground. Flipping burgers is a departure from making subs, but it’s all in the game. The evangalists and the nay-sayers each have their demons and each can just as easily de-rail the train to the end goal.

When change comes about, those who championed the ideas or were motivated to put them into action are fuelled and ready to go, but energy quickly runs out when faced with un-answerable questions because of the knowledge hole in the team. “The client wants this task done asap, how does this affect the sprint?”, “I’ve got this class here which calls this class and this other method, how do I unit test it?”, “Who knows how to set-up a CI server?”. The answers to theses questions are readily available on the internet, but a lot of it can be very subjective as well. Everyone has their limit. It’s tempting to by-pass the iteration and just slip the new task in, because it’s hard to tell a client you’re going to bump something from this iteration to meet their request when you’re not used to doing it. It’s tempting to skip testing that method, because it’s hard to refactor the code to make it testable when you’re not used to doing it. It’s too tempting to keep making builds by hand, because it’s too painful to learn how to implement CI when you’re not used to it.

Understanding and team buy-in

For change to be most effective, the whole team must understand why change needs to happen and how all the seemingly independant parts come together to achieve a common goal. If we don’t understand why, then we can never know how. But the why and the how put together does not always lead to the actual practice. For years I knew why TDD was better. I knew that I should be doing it. I knew that I should be writting my tests first, but I still didn’t. I knew how (or at least I thought I did), but I didn’t bother. The most obvious answer as to why I never did it is laziness, but I think the problem runs deeper then that. Yes, laziness is a factor, ignorance is another, but overall I hadn’t bought into the idea of TDD. I had not invested enough time to ever feel the benefits or to convince me that this is what I need to be doing. I had become de-sensitised to the pain of regular coding and debugging. It was only in that ‘a-ha’ moment, where testing and coding seemed to just flow and work, that I bought into it totally. I was convinced and couldn’t imagine ever going back.

People need to believe in the change and rally round it. People need to feel like it’s for their own benefit (which it is!) and not just for the company they work for (which in the end also benefits!). Work done in dis-belief and cynicism is never a job well done. You get out, what you want put in.