Posts

Showing posts from February, 2018

How to improve writing code

Preface: Code is something we write to interact with computer but its is important to write clean and understandable code so that other can understand your code & collaborate with it if necessary. In this article I tried to give you some idea how to write good code. Indentation: It does not matter if you use tabs or space just follow the convention of writing code with proper spacing. Many modern IDE gives you the suggestion to write properly indented code. Follow existing code indentation. Do not write more than 120 character in one line. Most IDE shows a vertical line never exceed that. Indentation is very important for reading and writing code.  Name properly: Name your variable or method or class properly. It is said that “codes are for computer to execute and human to understand”, so name properly so that other programmer who read your code understand your intention for writing this code.   Comment why not what: I see people writing code without comment. It is perfectly