This is part two of my series, The DX Files: Improving Drupal Developer Experience.
Many Drupal APIs accept a boolean argument (TRUE or FALSE) to determine some behavior. I believe that practice should be banned in all but exceptional cases, instead using a defined constant with a descriptive name.
Here is a perfect example from Drupal core:
<?php
$output = node_view($node, FALSE, TRUE);
?>
Now, quick! Who can tell me what passing FALSE as the second argument and TRUE as the third argument means?