My Hive Posts

    Have you Reviewed Someone's Code

    As a Utopian Moderator, there are numerous times we have to go through the code which we do not have much knowledge. Now reviewing that code is one of the challenging jobs, why because when you are going through the code you try to understand the context of the code and why the contributor has written it.

    Thus one of the reasons we ask the developers to write comments is that to know the context and what is he trying to do with the code. Without the comments the code presented is just piece of code which might be a solution to some problem, but if we do not know the problem we cannot judge efficiently that the code is written is good enough to be a solution to that problem or it can be written in a better way.

    PC : https://www.flickr.com/photos/cloneofsnake/4291278859

    For example, if I ask someone to solve some problem, I know what is the context we are talking about and most probably I will understand all the code written even if I am not very much familiar of that programming language.

    Along with reviewing we are also learning some of the logic which we might not know in the past. Thus its a win situation for us too.

    Since as I already mentioned, the importance of commenting the code is not limiting for the users or moderators who are reviewing your changes. It will also be helpful for you in the future to know why have you chosen that logic (though refactoring will also help us to achieve that). But when you are refactoring please also try to explain what have you achieved after refactoring.

    When you think that there are better ways to do the logic rather than what you have written do write a question in the comment asking for suggestions or improvements.