in reply to Little things ;)

I have some things that come back to bite me ... a few are :
# getting just the year $y = (localtime($utc))[5]+1900; # Basic hash un-rolling # (this is an example, better var names in real life) foreach my $a (sort keys %hash) { foreach my $b (sort keys %{ $hash{$a} }) { # co-workers stumble at the line above } } # in an OO module sub print_stats { $_[0]->{fh}->stats(); } # lastly, co-workers are often confussed by : use strict;
I am sure there are others, but these are ones i have had in the past few weeks.
$ perl -e 'do() || ! do() ;' Undefined subroutine &main::try

Replies are listed 'Best First'.
Re: Re: Little things ;)
by Caillte (Friar) on Dec 13, 2001 at 18:08 UTC

    Perlsonally I think that, if we didn't do things like these from time to time, people would start to realise how easy our job is ;)

    This page is intentionally left justified.

      If we make life harder than it needs to be for us and for the people who follow us, then we don't deserve our jobs.

      There is far more job security in, "So and so gets things done and makes us all look good" than there is in, "Who does that so and so think he is? He thinks he can't be replaced because nobody else will understand what he did!" And, truth be told, this is rightly so. If you place subtle and not so subtle traps for those who would follow you, you are being a liability to those around you.

        I've worked for people who created job security by keeping essential information to themselves. This resulted in wonderful things like an important bit of scientific equipment where the data has a mysterious offset of somewhere around 8-12 seconds, only one person had the source and he refused to admit that there was a problem.

        This was the same guy who wrote his own DOS-based multitasking system. The manual for it said 'commands are case-insignificant' but typing the same command with different capitalisation could give different results.

        There are many more examples of similar behaviour from the same job.

        Kevin O'Rourke