Skip to content

Code Author

Throughout the years I have worked on many software projects. In most of them, the code header included the author’s name. At first, it seemed natural to have the author’s name. In time I realized having a code author in the header is irrelevant, discouraging, and often negative. In many projects, the header file is dictated by the coding style for the company or the project itself. So, we don’t really have a choice. It’s better to stay consistent and follow the same pattern. Nevertheless, I believe the code author in headers should be avoided for new projects.

First of all, we really don’t need author information. It’s a piece of information that’s easily reachable through source control. You can check out who the original author or subsequent authors. In most cases, nobody even touches the author even if the whole code is rewritten. When it happens, it’s even misleading as the original author didn’t implement the new changes. Therefore, it’s better to rely on revision control instead of manual updates. The version control systems can easily show which changes were made by different authors.

Having a code author can discourage another programmer from changing the code. Programming is often a team effort. The code shouldn’t belong to individuals. Everyone in the team should feel OK to change any piece of code regardless of the person who wrote it. If there’s no sole author for the code, people would feel better when refactoring the code. When the author implemented the code, it probably solved a business problem. In time, the same code probably has to handle more cases. Thus, removing such friction is an important enabler for people who maintain the code.

In some cases, people feel the urge to even delete the code author since they contributed to the code as well. Imagine a code review where someone deletes the author from the header. Would it feel nice? Of course not. The code author can result in a negative environment even if the individuals didn’t intend it. The coding is a collaborative act. Anything that impedes collaboration should be avoided.

In consequence, I see almost no value in specifying a code author in the header. From a practical point of view, we can have better information from source control. From a collaboration perspective, it can potentially become damaging. For new projects, try to avoid code authors and push back on people who want it.

Oh hi there 👋 It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.