Things to Check Before Pushing Your Code

hamdikap

Hamdi Kaptan

Posted on June 25, 2020

Things to Check Before Pushing Your Code

In this article, I will talk about what you need to check before pushing your code. The scope of the article is checks about your code and the factors that will facilitate the work of those who will review or make edits later ; not about your code performance. Lets get started

1- Naming

Make sure that any variable, function, class name, loop variables do not contain special characters of your mother language.

The names of variables, functions, class names, loop variables has to accurately reflect their purpose and neither be short nor too long.

Other than loop variables, single letter (i, j, k, l) variable names should not be used. In fact, since the variables of the loop serve a purpose, they should get proper naming for their purpose.

2- Readability

Although the lines of comments seem unnecessary in the instant of the software development, it makes it easier to read and modify the codes. Making a description of what the rough draft does for the class, the function or a variable or even a loop does not hurt for the program developer,
it will also provide an advantage for those who will code review the program.

Editing the code in accordance with the standards for more readable code of the software language.
(PEP8, Python) (Swiftlint, Swift) etc.

Logging is very important to know what your code is doing while working. Attention should be paid to the degrees of logging. 

3- Adding, Commiting, Pushing

The place of the code you write in version control systems is very important. The first thing to note is that we are in the right branch. If there is, we should make sure that the epic branches belong to the correct branches.

In your commit, you only need to add the files that you want to affect the entire source code.
Your commit message should be such that it can give an idea of ​​the whole work.

It is very critical that the code you write can be understood by your teammates and who will edit your code later.

💖 💪 🙅 🚩
hamdikap
Hamdi Kaptan

Posted on June 25, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related