Why you shouldn’t write Comments your code

Bending the Clean Architecture Principles

Anthony Trad
8 min readAug 15, 2022

Introduction

While you can really be triggered by the title, this topic is not new and controversial enough for me to think about. I am also wrongly biased by this. Whenever we review a PR and I see some comments inside a function, I automatically sort of consider the dev on the other hand a junior. I know those assumptions are not either real or true, but I can guarantee that every developer have some sort of coding style and does not always see the other end as “worthy”.

Back from your university and College years, you get introduced to programming and algorithms and you get that first impression that we should use complex functions and algorithms all the time. And while using those, it gets easily a standard and common practice to explain yourself along the way.

It is really a shame that one of your first impressions is not really applicable in the Software Development industry. While I am working on my bias, let me prove you why !

What

Let’s start with a small example to showcase what I am talking about. I am sure you have done some data fetching with your time so let’s say we are working on a Todo list application. This is one of the most demo application one can see and each course does take this example as starter.

Let’s elevate that, shall we? ;)

--

--

Anthony Trad

Senior Software Engineer focused on .NET and the Cloud. Reconsidering major principles and patterns, ideas are my own.