Expanding on Vikrant Singh Chauhan's idea with examples and explanations...
One of the simplest habits is to leverage the compiler/interpreter when coding logical equality phrases. For example, the conditional statement
if (bob == 6) {-do something-};
The likeliest thing to go wrong is to neglect the second "=", giving the assignment statement
if (bob = 6) {-do something-};
This says, assign 6 to bob. Presuming that the assignment is legal, the logical value of the assignment is TRUE, and the conditional operation will be performed EVERY time the statement is encountered, regardless of the original value of bob before it became 6. That error produces two bugs for the price of one: 1) bob probably has the wrong value; 2) the test always resolves to TRUE. To avoid this trap, never write equality tests in the order {variable_name == literal} - always test logical equality in the order {literal == variable_name}. This rule rewrites our example case as:
if (6 == bob) {-do something-};
This removes any possibility of a sneaky error like
if (6 = bob) {-do something-};
No compiler/interpreter is going to allow you accidentally to reassign the value of a literal.