programming is
70% coding to prevent users from f****ing up
30% to do the job
if the user can screw things up, they will...
i suppose it is a rather cynical view of people, but unfortunately also true...
I recently wrote an ASP application (yeah I know😃 ) where about 30 lines of code did the actual work, 200 or so lines were dedicated to checking inputs and preventing errors or stopping malicious users from trying to access the DB
Note: Humans on average use 13% of our brainpower, half of that is dedicated to finding better ways to blow each other up...