Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- Is Tight Code Best?


spikey - 12:12 pm on Sep 19, 2006 (gmt 0)


I'm not sure how much code you've got; but I find consistency important. Nobody else looks at my Perl, but I have a few integrators who work with my PHP. Once they've gotten used to my style things are fine, until I do something out of the ordinary, then there's confusion.

I have a certain way of coding similar situations (e.g. I'll retrieve data as objects and use accessor methods) and my integrators get used to that. When there's a reason for me to do it different (e.g. retrieve it as a hash) my integrators then need to figure out how that works (which usually means asking me). Teaching them my style once (or making them figure it out) is fine. I don't think all the comments or simplification in the world will avoid that.

There are certain things I really like in Perl that may make it harder to read (e.g. map {}). My opinion is that it's not the worst thing in the world to make someone learn how this works as long as they only have to learn it once and you make use of it throughout the code. I think every programmer has their "toolbox". I dislike it when someone makes some code really tight just to be nerdy and the rest of their code is loose/sloppy.

So my choice is with C as long as you're consistent.

Admitedly, there are times when I purposefully make things confusing, just as a matter of territory, but that's another topic ;)


Thread source:: http://www.webmasterworld.com/perl/3079222.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com