Does your code require Comments?
D o you comment your code often? If the answer is yes, you need to rethink on how you could avoid or reduce the number of times you write comments? Why? There is nothing wrong in commenting the code, what’s wrong is writing the code that requires comments to explain what it is doing. As a developer, instead of focusing on writing comments, one should strive for writing self-explanatory code. Take a look at below C# code snippet, It would be very difficult to understand the code if that comment wasn’t there. So how do you avoid commenting if it is difficult to understand the code without it? Makes sense Right? Ok, now take a look at below code snippet. With slight modifications, like putting the block of code inside the function with meaningful name, I’ve managed to avoid the comment, the reader of the code should not get confused now. There is another problem with the commented version of the code, what if the requirement changes? Like remove all the spaces, in this...