Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:ftfy r.e. idioms... (Score 1) 373

He's no longer with us thanks to his horrible attitude. It was all about coding in job security and being perceived as some sort of guru, complete with the dribbling out just enough information to keep you guessing.

Upon being presented with the coding style guidelines and team best practices, his response was "we do things differently, I'm not going to change how I code."

That should have been a red flag.

As for Java, I could be so lucky... :)

Comment Re:ftfy r.e. idioms... (Score 1) 373

All valid points, but I still say that one scans better than the other, and at 3 AM that becomes an issue. Especially when I get woken up by one of our lower tier folks who is trying to figure out why it doesn't work, asking me to decipher it for him. Turns out the issue was that he failed to check whether the open had succeeded. It didn't. So I added the croak and did some more repairs, with a rewrite for legibility's sake coming up.

This guy never met an array or hash that he didn't turn into a reference just for gits and shiggles. Seriously. Every single damned one. I don't think I ever saw a native @ or % in his code (except for @_).

Comment Re:Duff's Device (Score 1) 373

Oh so this!

I have had to tell cow-orkers to knock that crap off. They've got the job, and from this point on the only thing that will impress us is code that can be maintained by anyone else on the team, even if they have not set eyes on it in years.

Programmer did:

my $something = [];
open my $filehandle, '<', $filename or croak "Can't read file";
push @$something, <$filehandle>;
close $filehandle;

How about:

open(my $filehandle, '<', $filename) or croak "Can't read file";
my @something = <$filehandle>;

Much more succinct, gets rid of a pointless use of an array reference (seriously, it was used as an array in that function only, never passed around or returned), and at the end of the day, is far more readable.

Slashdot Top Deals

"Only the hypocrite is really rotten to the core." -- Hannah Arendt.