We admitted we were powerless over entropy and that our code had become unmanageable.
% ls -l -rwxr-xr-x 1 pek 2008-01-22 logout.cgi.new -rwxr-xr-x 1 joe 2007-03-02 logout.cgi.broken -rwxr-xr-x 1 sam 2006-09-12 logout.cgi.old -rwxr-xr-x 1 ann 2005-03-26 logout.cgi.032605 -rwxr-xr-x 1 lil 2004-06-10 logout.cgi~ -rwxr-xr-x 1 fred 1999-01-08 logout.cgi
Came to believe that a Power greater than ourselves could restore us to sanity.
Made a decision to turn our style over to the care of DCONWAY as we understood him.
unless ( $you->have( $good_reason ) ) { $you->follow( 'conventions' ); }
diff -u
$you->follow( 'conventions' ) unless $you->have( $good_reason );Do:
unless ( $you->have( $good_reason ) ) { $you->follow( 'conventions' ); $you->grumble; $you->get_paid and $you->get_over_it; }
...stylistic limits should be self-imposed, or at most policed by consensus among your buddies.But Damian Conway warns against Intuitive Programmer Syndrome
Made a searching and fearless moral inventory of our code.
% svn mkdir http://http://svn.my.org/code -m init % cd my/file/tree % svn co http://http://svn.my.org/code . % svn add * % svn commit -m 'import' # peek at every thing in /code and toss chunks % svn rm http://svn.my.org/code/crufty -m 'bye'
Admitted to $Boss, to ourselves and to another human being the exact nature of our wrongs.
# serenity prayer use strict; use warnings;
local
for punctuation vars like
$/
Were entirely ready to have Perl::Critic identify all these defects of character.
use Perl::Critic; my $file = shift; my $critic = Perl::Critic->new(); my @violations = $critic->critique($file); print @violations;
Humbly asked Perl::Tidy to remove our shortcomings.
% cat ~/.vimrc map t :%!perltidy
nedit.shellCommands: \ perltidy-pbp:F5::ESL:\n\ perltidy -pbp % > %.tdy && mv %.tdy %\n
Made a list of all persons we had harmed, and became willing to make amends to them all.
my @amends_needed = qw( guy_who_inherited_my_code_at_old_job ); foreach my $person (@amends_needed) { buy_beer( $person ); }
Made direct amends to such people wherever possible, except when to do so would injure them or others.
Continued to take personal inventory and when we were wrong promptly admitted it.
use Data::Dump qw( dump ); # do stuff dump( $self ); dump( \%my_hash );
Sought through prayer and meditation to improve our conscious contact with PBP, as we understood them, praying only for knowledge of their will for us and the power to carry that out.
while ( $you->get( 'older' ) ) { $you->lose( $need_to_be_right ); }
Having had a spiritual awakening as the result of these steps, we tried to carry this message to Perl Mongers everywhere and to practice these principles in all our affairs.