Write Code Knowing You Will be Blamed

Otherwise known as "maintain line history as much as possible".

This is bad because if you wanted to change an argument you would have to change the line history.

printf("Uknown Cop %s %s %s %s", $a, $b, $c, $d);

This is better

  "Unkown Cop %s %s %s %s",


  • Always leave trailing commas

  • For long arguments, consider splitting them over multiple lines

Last updated