5 extra steps to take after your code works

Photo by Vi Nowak on Pexels.com
Audio recording of this post

You’ve written that final line of code and are pretty sure it should work now, you run it to double-check the code does what you were aiming to do, aaaand… It works! Yahoo! You did it! Now it feels like a good time to commit, push for review, sit back, breathe out, celebrate a bit, and jump to the next awesome feature in your long list of fascinating ideas! But wait for a second, there might be a few more things that would be nice to do before you ship your solution.

First of all, congrats! You wrote a code that works! This is a necessary step in the process of creating software, yet not the final one. 

There is a nice post titled “Always do extra”. Although it’s focused on mastering hard skills and growing the expertise, the idea that outstanding developers always do extra steps resonated with me. Here I’m sharing five more steps great developers take after their code works.

1. Take care of the readers

Good product leaders know their customers and care about them, good writers know and care about their readers. There is a lot in common between writing and software development, so good developers know and care about their code consumers.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand

Martin Fowler

That quote clearly states there are two types of consumers of your code: computers and humans. While the code you just created can be successfully digested by a computer, it works after all! Can you tell the same about other developers? Will they understand your awesome idea? How much effort is required to understand your solution?

Those are great questions to ask yourself. In most cases, software development is a team sport. You’ll improve code written by your fellows, and they will build on top of your solutions. Chances are high there are different players in your team with different skills, experience, and domain area knowledge. So it’s time to make sure the code reads well by people with different backgrounds. 

Although it may sound simple there are many things under that cover and it’s not about code style or prettifying its look, I assume there are linters and formatters already in place to automatically make sure team agreements about code style are followed. There are things like naming variables and methods, commenting on unobvious solutions or decisions, extracting pieces of functionality into reusable functions, applying the right design patterns, and many more. If you’re not familiar with those I’d recommend starting with Clean Code by Robert C. Martin (aka Uncle Bob).

If you already know the theory and have experience in making code readable, here is the tip from professional writers – take a pause before starting code cleanup and switch to something else for a while. When you get back you’ll be able to read the code with fresh eyes and more effectively spot areas for improvement.

2. Respect other contributors

Unless you just started with a clean project, the enhancement you made is not the first one to be shipped. So the reasonable question to ask yourself is are old features working after my change? I doubt your fellow developers and precious users will be happy to discover one day that the feature they love and successfully used yesterday doesn’t work anymore.

To answer that question you’d need to run some tests. How you do it depends on the state and size of the project, the specifics of the code changed, available tools, the overall dev process, and some additional factors. 

In the best case, you have a good continuous integration pipeline (CI) with a decent set of automated tests that will run every time changes are pushed into the repository and the merge will be blocked if at least one of them fails. However, even if you have them you can save your time by running locally a subset of the automated tests covering the areas of the code which might be affected by your change. This will save you from getting back to the code after CI catches some mistakes for you. But it is worth doing only if the time and effort to launch the test environment locally is relatively small, otherwise, delegate this task to CI.

If you’re not so lucky and don’t have a good CI, there are at least two things that would be nice to do. First – try to run all automated tests you have or at least test critical paths of the project which potentially might be affected by introduced changes. Second – start talking to your team about the values of CI and automated testing, you may find a few good hints in this post.

3. Protect your solution

No matter if you were lucky or not on the previous step, I hope you see the value of CI and automated testing. So it’s time to make sure your own code has some protection.

The first kind of protection – automated tests – is needed to signal other developers if they unintentionally break your code. Depending on the scope of the feature, its importance, and complexity you might need unit, integration, end-to-end tests, or a mix of them. There is no single right answer on how much and which tests you need to write, you’d need to decide on the right balance of those yourself. Ideally, tests for the happy path, some expected unhappy paths, and maybe edge cases would be added. Doing so also highlights that those unhappy paths and edge cases were taken into consideration.

Tip: thinking about how to test your code early in the process leads to less coupled and better-structured solutions. Read TDD by Example book for more thoughts and examples on this approach even if you are not going to follow the test-driven development process. 

The second kind of protection – error boundaries – is needed to prevent the whole application from exploding if there is a mistake in your code. Depending on what are you working on this kind of protection might be not needed, e.g. if unhandled exceptions are a necessary part of the solution. However, consciously thinking through them and adding or not adding catchers where necessary is worth doing.

4. Add extra clues

Photo by Carolyn on Pexels.com

There are good chances that the solution you’ve just made will be used not only by developers in your team or other teams in your org, and in the case of a popular product, there will be lots of people relying on your code. So it’s worth taking care of them as well by writing some docs, creating demos, or any other hints which would explain your solution from the product user perspective.

For example, QA folks would be happy with testing instructions to reproduce and test new changes, and end-users would be happy by getting up-to-date instructions in the product docs. Community members could benefit if a new library feature is listed in the docs with a good demo of how to apply it. 

In many cases, this step might be not needed, but creating a habit of taking a pause and thinking about it will positively impact the product. People will love your solutions and product much more if it’s clear and easy to use them.

5. Take care of reviewers

We are humans and we’re not immune to mistakes, that’s why the code review process exists, and hope you have it in your team as well. Taking some steps to help your reviewer will make the process faster and more efficient.

Here are a few things to consider:

  • Commit messages.
  • PR description. 
  • Find and ping the right reviewer.

Let’s start with commit messages. Good commit messages are a valuable source of useful information for the reviewer. Those are hints and a history of work progress on the issue. So worth reviewing them before pushing changes to the remote repository and editing where necessary. Interactive rebase is your best friend in this process.

PR description. It is usually the first thing reviewer will read to understand what’s the PR is about. They have plenty of their own work to do so it’s naive to assume that PR reviewer always has the same or more deep knowledge of the issue you were working on. Despite that lots of information could be derived from commit messages, PR description is an important element to onboard a reviewer. It’s a good idea to have a clear and concise title of the PR, a link to the issue it fixes, a short description of main changes introduced, testing instructions to run/reproduce old and new behavior, screenshots in case of visual changes, links to designs and other important discussions where key decisions were made, and so on. The key point is to save the reviewer’s time searching for all of this info to understand your work and properly review your code.

Once your PR is ready for review, the final important step towards effective review is to pick the right reviewer. Unless this process is fully automated or documented in your team you’d need to make a decision here as well. Hope by that time you have a good understanding of which parts of the codebase are affected by your changes, so requesting a review from a teammate who is familiar and knowledgeable in that domain is a good idea. Taking reviewer experience into account is also important, e.g. it would be an arguable choice to ask a new or a junior developer to solely review complex change affecting many parts of the codebase. Sometimes asking two or more people to review the changes is reasonable, especially if those are critical ones.


If you’ve done all the steps above, you must be in a good position! Go ahead and send your awesome change for the review! You’ve done a great job by taking those extra steps, however, that’s not the end of the journey yet. The code review is a really nice and interesting process and deserves its own story.

In the end, I want to share a great quote made by WordPress one day – Code is poetry. It’s not a coincidence you’re called an author even if you don’t feel like a traditional writer at all. No matter if your code is a poem, novel, short passage, or anything else, you have the readers! And it would be nice to think about them and love them as I do now while writing this post! 

Take care of the consumers of your code!

Opinion: Top 3 leadership skills

Photo by Towfiqu barbhuiya on Pexels.com
Audio recording of this post

Being a leader implies a broad set of responsibilities and requires skills that differ from individual contributors’ skills. I was thinking about it yesterday morning and then the question came to my head “what are the most important ones?”. Huh, the wheels immediately started spinning in my head trying to find the answer.  Then I remembered that limitations foster creativity (here are two posts on this topic), so I decided to add a limit of 3 skills to make the exercise even more fun. So here are the top 3 of my choice.

1. Communication

“Communication is oxygen” sounds like a mantra in my head not only because it’s part of the Automattic creed, but because I feel it with my bones. I doubt there is a leadership book exists which doesn’t mention communication as one of the top skills for leaders or managers. I also think communication is the most powerful weapon in the leader’s toolbelt.

There is a lot already said and written about it, but through this year I’ve realized that being good at communication is not just being able to speak or write well and without mistakes. It’s much more – from understanding the theory of information processing by humans to resolving conflicts, from effectively expressing yourself to listening and creating a space for others to share, from stretching people to supporting them, from mentoring and coaching individuals to learning from them, and so on. 

As you can see, communication is a very broad topic, so mastering and practicing various aspects of it will never hurt.

2. Sense of balance

Leadership is a very inaccurate science. There is no one size fits all solution and many recommendations depend on the context. That’s why I believe it’s crucial to seek, define, and regularly check the balance which works well for your case. That applies basically to everything – the amount of uncertainty affordable in the projects and processes, the amount of autonomy and control you want to have in a team, the amount of tech debt taken into sprints, the amount of time spent on learning and self-development, saying yes or no to many ideas and initiatives; the list may go very long.

No matter what was your past experience, it takes time to adjust balance in your current context, so pure curiosity, observations, and regular feedback loops are your best friends in finding the right balance.

3. Self-care

Supporting your team and its individuals is another extremely impactful way of leading the team to success. However, you won’t be able to do it well if your battery is drained. That’s why I think taking care of yourself is necessary, required, and mandatory in that role. If you like many others experience impostor syndrome or feel guilty about taking care of yourself, it’s time to reach out for support. Talk to your lead, talk to your peers, consider working with a coach or a therapyst, because sometimes it’s really hard to cope with. And last but not least don’t forget that simple aircraft instruction “Put the mask on yourself first”.


Note: this is purely my opinion as of today, after being more than one year in that role with a fully distributed team, after experiencing a team growth from 4 to 12 people, after experiencing a team split, team focus shift, delivering multiple projects, switching team focus, talking to and learning from many great leads, mentors, and coaches around me.

I’m curious what would be your top 3, so I would be happy if you share them in the comments under the post.

Voice behind the blog

Photo by Dmitry Demidov on Pexels.com
Audio recording of this post

I’m pretty new to blogging but what I like about it so far is that it’s a great way of sharing an individual perception of reality. That’s why I think the author’s identity is an essential part of the blog. That’s why many blogs have an “About” page and it’s a great way of getting familiar a bit with the author of the posts you read and hopefully enjoy.

Another great thing about people is they are very different and creative by nature and that applies to their blogs and about pages as well. However, so far I’ve seen only text and images as the most common content on the about page, mine about page is not exclusion. That’s perfectly fine, especially if you like me have the good old stereotype that “blogging is writing and writing is text and images”. However, Blogging for beginners course by WordPress.com Courses and folks at Automattic, challenged that setting in my head, and I realized it’s not like that anymore. Somehow my brain ignored the fact that video-based services like YouTube, Instagram (to some extent), Tik-Tok, and so on have millions of content creators who are bloggers. Podcasts became very popular too and can be considered voice-based blogging! So why not use voice, audio, and video in the classical web-based blog?! Why not use other media in addition to text and image on the About page to share your identity with readers and establish a better connection?! I don’t have a good answer for you 😛

So here we are, got to the point and the key purpose of this post – to connect the dots and give you a chance to hear the voice behind the blog. I don’t know yet if I’ll make audio recordings of the following posts, but I smile every time when I imagine how my voice sounds in your head while you read the posts.

Thanks for listening/reading and hope you’re not annoyed by the voice 🙂

Output vs Outcome

TLDR; Working hard and working smart are not the same things. The first ensures a lot of work is done, the second – moves you forward to the desired destination. Focus on what really matters can significantly boost individual/team/company effectiveness.

Last week I’ve read this post from The ReadMe Project about effective communication which resonated with me. The gist is that truly effective communication leads to the desired outcome rather than desired output. I think this rule could and should be applied to many other things as well: the code we write, the decisions we make, the projects we lead, the products we create, the actions or inactions we make, and so on.

The key difference between the two to my understanding is the output designates the artifact of the work like feature, document, message, post, etc, while the outcome defines the desired impact you want to achieve like improved user experience, change in the audience behavior, metric growth and so on. That’s why the outcome is what really matters and not the output.

I’m not saying the output is not important; on the contrary, I believe the output is very important. However, most of the time the outcome can be achieved in several different ways but often people focus on the output they planned to create and forget about the desired outcome, or don’t think about it at all. So far I’ve seen two very common patterns: doing something without thinking about the outcome and losing the focus on the outcome in the process. 

Not thinking about the outcome

This is usually caused by the too-narrow thinking which might have many various reasons underneath it ranging from not enough experience to dangerous not my problem mentality. In simple cases, the situation could be improved by clarifying the context for the activity, organizing learning or mentorship, or providing feedback. In complex cases, a more thorough investigation is needed to find the root of the problem and work with it.

Losing focus in the process

This applies to longer activities like projects, roadmaps, etc. Before the kick-off, at the planning phase, it’s quite common to keep the final purpose in mind to define what output is required to achieve the project goals. However, in the execution phase, that sense of initial purpose vanishes very soon and, if completely lost, can often lead to irrational or even wrong decisions. 

There are two key reasons for this: different levels of thinking and different levels of involvement from people between planning and execution phases. The planning phase assumes strategic thinking and deeper involvement from leadership (explicit or implicit), while the execution phase requires tactical thinking and deeper involvement from the implementation team.

To maintain the focus on outcome and make it part of the team or organization culture there are a few simple things needed:

  1. Create context for people operating on the tactical level. Make sure they understand the desired outcome and indicators of success. Worth mentioning is that the outcome is more important than output.
  2. Make the outcome a part of the progress tracking. First of all, it’s important to track the progress of the longer initiatives, so if you don’t do this yet it’s time to think about it. Second, make sure the desired outcome is part of the tracking progress, either via metrics or as a reminder of what you’re trying to achieve in the end.
  3. Reiterate the final goal/mission regularly to refresh it in people minds.

Although things above look simple, doing them consistently is tough, but only consistency will be able to build a new habit with time.

Examples

Output thinking

We should ship a new payment method X by the end of the month.

Outcome thinking

We help merchants and shoppers in Europe to sell and buy with their favorite payment method by adding a new payment method X to our product.

I need to create a weekly/monthly/quarterly report for my manager.

I’m providing the summary to my manager so they can do their work more effectively.

I need to gather feedback from peers and stakeholders.

I’m trying to make a better decision by incorporating the knowledge, experience, and unique perspective of my peers and stakeholders.

Validation

How do I know if somebody, including myself, is focused on the outcome over output? One of the best ways to check this is a five whys technique. Although the technique is originally intended to get to the root of the problem in this case it helps to see if you sense the root of intention:

  1. What am I doing at the moment and what should be the result of the activity? => Output.
  2. Why this result is important? => Outcome 1.
  3. Why outcome 1 is important? => Outcome 2.
  4. Why …

Ideally, after a few iterations, you should see the movement towards the mission statement (personal, team, or company). If it’s not happening, that it’s a good signal to step back and rethink if the task or even the whole project is still relevant, but that’s another story.


That’s it, I encourage you to raise your awareness about the outcomes you’re trying to achieve as it’s what really matters in the end.

Success diary – a simple tool with multiple powers

Photo by Pixabay on Pexels.com

TLDR; Are you lacking confidence? Don’t feel satisfied with your daily progress? Struggling with providing positive feedback to your reports, peers, or managers? You should try success diary practice! Every day, even the tough one, has positive moments and elements of success. Training yourself to spot it can help you in many ways!

Some time ago I was reading Bodo Shaeffer’s book “A dog called Money”. Despite being a very good book for kids and adults about dealing with money it mentions a fantastic tool called “success diary”. You need to write down at least 5 elements of success every day and that’s it. The idea sounds simple, isn’t it? But the power is huge, especially for leaders.  In the book, the diary was aiming to improve the self-confidence of a person, but after practicing it myself for almost a year I’m pretty sure it gives much more than that.

Success diary powers

Reflection 

Reflection is a great practice helping to increase awareness, performance and boost growth. While doing exercise you create a space for yourself to step back, look at your day and observe it in a different way. I was surprised how many great things could go unnoticed in the flow of tasks without such a reflection. 

Positive focus

Since you’re intentionally looking for success you tune your brain to search for it and filter out everything not matching “your request”. By doing so you train the brain to spot success even in small things.

Acknowledgment

By writing items down you consciously recognize and acknowledge your success. If you’re familiar with git it’s like committing new items to a success repository inside your brain. As an outcome, your satisfaction, confidence, and motivation are growing.  

Satisfaction

The third inborn intention is Sense of Accomplishment.

mentalhealthstrength.com

It feels good to accomplish something, right? Every item in your daily success list is an accomplishment. No matter if it is small or huge, it positively contributes to the sense of accomplishment and maintains it with time. If you look back in the diary after 30 days you’ll get at least 150 items. Do it for a year and you’ll be successful at least 1825 times! 

Confidence

Have you heard of Impostor syndrome? It’s very common in tech and often can lead to lower self-confidence and belief in own abilities. The success diary helps here by building a positive track of records. When feeling a lack of confidence or fear of failure just open the diary on the last page and start reading back until the feeling goes away, it should help 😉

Motivation 

You did the exercise yesterday and you know you’ll do it again today, tomorrow, and so on. This habit motivates you to prepare for success! So you might take some extra effort or plan some wins for the days ahead.

How does it help leaders?

There are few more bonuses for leaders making their life easier at work.

First of all, for yourself, it helps to fight the lack of immediate accomplishments after transitioning from an Individual contributor role. I wrote a bit about it in my previous post.

Secondly, as a leader, it’s your responsibility to acknowledge and celebrate team success as well as to provide feedback, including positive ones, to your direct reports, peers, and managers. The success diary trains your muscles to spot success not only in yourself but around you too! So it will be much easier to provide positive feedback or recognize the achievements of others and will lead to better team morale.

My experience

I practiced the success diary for almost a year, every day, and stopped only when I felt I don’t need it anymore because I noticed I started doing it automatically in my mind. In the beginning, I was struggling to spot success. Sometimes I was staring at a blank page for minutes or stuck after 2-3 items. The key mistake was to look for huge or big wins only and to neglect smaller ones. After some time it got to the habit and I could easily write 5 – 10 items within several minutes. Moreover, I started noticing signs of success around me and noticed I have a better mood in general.


Is it cheating or gaming? No, I don’t think so, at least if you are being honest with yourself. It doesn’t mitigate mistakes or failures, it doesn’t keep you always positive either, but it supports you in stormy and good days as well as gives powers to support people around you. 

Tune your mind for success and enjoy it!

Baby steps in blogging: four weeks

Photo by Lachlan Ross on Pexels.com

I’ve started my blogging experiment four weeks ago (a couple of weeks before publishing the experiment post). This is a quick recap of how things are going on so far.

Experiment vision is still valid, which is great 🙂 

I spend 30 mins every day on blogging activities, including weekends and vacation days. There were a couple of busy days when I skipped blogging and compensated on the next day, so it’s more of 30 mins/day on average now, but still fine to me.

I’m writing regularly and publish one post weekly for 3 weeks in a row! I noticed there are days when it’s harder to write and thoughts are not willing to shape into a nice story, but that’s fine too. It would be naive to expect writing goes smoothly any day no matter what’s going on around you. 

I’ve started reading more blogs but I don’t track how many. So it’s hard to say where I am compared to the target of one post per day, but my gut feeling says I’m behind and can do better. Anyway, I enjoyed some posts and subscribed to a couple of blogs. Love this one by Paolo in particular.

I’ve published my first book review post which was holding me from reading new books. Now I started reading a new book and very much enjoy both its contents and the fact I’m reading again 🤓

I’ve started Blogging for beginners course and slowly learn new things when not writing. After a couple of modules, it already gave me a few interesting ideas and thoughts. 

Last but not least I’ve migrated my old site to WordPress.com and can focus on writing now. I had a few challenges during the migration and have some ideas for improvements in the onboarding process, but haven’t shared them with internal teams at Automattic yet.

This is where I am now after the first 28 days baby steps in blogging. I’m happy with the progress and curious to see the results at the next milestone of 90 days.

Mind shift: from engineer to lead

Photo by Pixabay on Pexels.com

TLDR; There is a significant difference between individual contributor and team lead roles. The lead’s focus is on multiplying a compound value delivered by the team, rather than accomplishing something on their own. So the mind shift is necessary to transition into a leadership role successfully. 

Have you been thinking about stepping into a leadership role or just get “promoted” to team lead? That’s great, congratulations! The leadership role is great and has lots of fun, challenges, and interesting cases, but it requires a different mindset compared to the engineering role.

Note: further I’ll use the terms engineer, developer, and individual contributor interchangeably. Although it’s debatable and some people prefer one title over the other, however, the difference is not so important in the context of this post.

Promotion or not?

Apparently, the transition from individual contributor to team lead is a big change, but let’s take a look if it is a promotion at all? 

It has some elements of promotion. E.g. you’ll have direct reports, some of them even might be your previous peers or you could get a compensation raise (happens pretty often, but not always). Also, there are many talks in the industry stating that team leadership is an obvious next career step for any senior-level developer. 

I can’t agree with the last statement because the leadership role implies a significant change in expectations from the candidate, responsibilities, and skills necessary to be good at it. On top of that, I truly believe stepping into a leadership role requires a significant mind shift. This makes the whole change closer to career path switch rather than promotion.

So you can decide for yourself if it’s a promotion or not, but the size of the change remains significant no matter what you decide 🙂

How successful team lead looks like?

When I was considering a team lead role the coach asked me: “How successful team lead looks like in your mind?”. I was absolutely sure how a good developer looks like – they write high-quality code, do great code reviews, decompose complex problems into simple ones, know a bunch of tech tools and fundamentals, mentor more junior peers, are able to drive complex feature development, communicate well with stakeholders, etc. But at the same time, I didn’t have a good answer for the same question about a team lead, only a bunch of random ideas. I was surprised, I thought it must be obvious, but it wasn’t.

After that, I started searching the Internet for possible answers, asked a few people in the company, including my lead, and was very much surprised by the range of answers I got. Some answers were overlapping but the priority of them was different 🤔 At the same time, I noticed the definition of the lead role, its key responsibilities, and even titles were different from post to post. Team leads, tech leads, engineering managers, all had interleaving descriptions and similarities as well as significant differences in their scope. Later I came across this post describing five engineering manager archetypes and that was a very good explanation of the observed answers range.

At the same time, there were common patterns among all the answers. Success was defined at the group level, rather than at the individual level. The leader was considered successful when the team is successful as a group. The leader is focused on multiplying team effect by supporting team members in different ways: setting focus and vision, fostering tech decisions, recruiting the best people, helping each team member to grow, creating a safe environment, establishing and improving processes, supporting team morale and so on. You see there is no mention of working on features, crafting architecture, or learning the latest fancy tech. It’s a completely different role compared to engineering with its own different focus.

What about the code?

What about writing the code then?! I am good at it, does it mean I have to stop and don’t code anymore? Well, the reality is that you shouldn’t write the code anymore. It is not your focus anymore, it’s your team focus. There are a couple of exceptions though – if you’re in a pure tech lead role with somebody else wrangling the remaining responsibilities or if the team you lead is relatively small (up to 4 people) so you might have some time left for working on code. I also know a few leads with full-size teams who are able to book the slot in their calendar for coding work while keep doing all the rest, but the size of the slot is never above 10% and according to their words it’s really hard to fit in.

Does it mean all the experience you got about the code, architecture, patterns, and a ton of other things not needed anymore? Of course not! It’s tremendously helpful for understanding the essence of software development, the process, and the way engineers think.

The shift from writing the code to doing many other things but not code also has a very interesting side effect – it’s harder to sense the feeling of accomplishment. When writing the code it’s obvious – you fixed the bug or shipped PR you got that feeling immediately! With a leadership role it’s different. The impact of your words, actions, and inactions may become noticeable long after you made them or even be left unnoticed (at least without explicit acknowledgment). So as a leader you’d need to adjust your brain to cope with the absence of that immediate accomplishment feeling and find your own ways of validating you’re on the right track, but that’s a topic for another post story.


There are many more differences between leadership and engineering, and I’ve only scratched the surface of that iceberg. However, it should be enough to see that successful transition requires a shift in the mindset. The shift takes time no matter how well you are prepared in theory, so if you’re in the middle of a transition give yourself time to become a better leader for your team and you won’t regret it! If you’re only about to dive into leadership just know, it’s doable and it’s much better to step in being aware of the mind shift. 

Good luck and happy leading!