Once when I was around 11 years old I was sitting in a physics lesson with a limited quantity of protractors and we were slowly passing them around in order to draw an angle. Being the devious short cutter that I was at such a young age, I decided not to wait and just trace a drawing someone else made. This was to the horror of my physics teacher at the time who stopped dead in his tracks and shouted "NO! PHYSICS IS ABOUT ACCURACY!"
He had a point and this is something that is also very true in the programming world.
To avoid blind faith, you should be aware of the following mistakes:
Failure to check return types
Failure to check your data models
Assuming data within your database is correct or is in the format you expect it to be
Let's take this to a more extreme level; take this code:
<?php $isAdmin = false; extract($_GET); if ($isAdmin === true) { echo "Hey ".$name."; here, have some secret information!"; }
In the preceding...