Uri Guttman wrote: >>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> writes: > > SHC> Uri Guttman wrote: > >>>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> writes: > SHC> Call it paranoid defensive programming. ;) > >> > >> overly paranoid imo. but that doesn't mean the bugs aren't out to get > >> ya! :) > > SHC> Just because you're not paranoid doesn't mean computers don't hate me. > > computers don't hate you. you hate yourself and so you commit bad code > full of bugs. self flagelation programmer style! :) > > uri >
No, it comes from maintaining other people's bad code for too many years. It means, among other things, that all variables have acceptable values at all times. By acceptable, I mean a valid value or a pre-determined not-applicable value. If I was writing the code in the example, it would be: $station = $Station_for{$cli_station_code} || $NA{station} or help( 'station', $cli_station_code ); Even if elsewhere: our %NA = ( ... station => '', ... ); The extra arguments for help() is to provide context-sensitive diagnostics. -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/