Janek, Yes, I could have shorter lines at the cost of the number of lines. Personally, I like taking things like this: -------------------------------------- if ($thisvar eq $thatvar and $thatvar eq $anothervar){ print "all three were the same\n"; } -------------------------------------- And making them this: -------------------------------------- print "all three were the same\n" if ($thisvar eq $thatvar and $thatvar eq $anothervar); -------------------------------------- It just seems to me that a lesser number of lines the interpreter has to trudge through, the better. I guess for me, multiple lines are more of a burden than long lines.
There are a few small blurbs of code in Form.pm that are exact copies, but the two sections of code only have about 5 lines that are exactly the same which are intertwined with others that are not. I actually spent a few hours looking this up and down attempting to discover if I could eliminate additional code by putting it in another sub. I at length came to the conclusion of what I currently have. David ----- Original Message ----- From: "Janek Schleicher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 11:46 AM Subject: Re: Form.pm perl-dvd wrote at Wed, 03 Jul 2002 19:22:49 +0200: > .... > Yes, my lines of code are long. For this I apologize. I work on 1600x1200 with >Homesite > which > doesn't wrap lines unless I ask it to. You know, if you have the same circumstances >as I do, it > sure makes for easy reading (less vertical lines, and all same command on the same >line and so > on). I think nearly nobody still works with computers having problems to show more than 80 characters in a row. I also think Ovid won't really have such a problem. But I could imagine he has similar reasons like me to avoid long lines of code. Nowadays we print newspapers with very big dimensions. Why do we still use columns ?? Because we can better read it that way. And readability is the mose important part of a computer program. Even without the aspect of readability long lines of code are an alert signal. It's like having a description of something with long and difficult sentences. >From a teacher's view it's a sign that the pupil still doesn't understand the problem correctly. And even if he/she does, the next reader won't. There's nearly always a possibility to reduce the line length. (The design is improved by it, too). The trick is like in real language. Split complex statements (like complex sentences) in a sequence of simpler ones. Reduce also doubled code (Remember: Copying Code is a real crime :-) ) Greetings, Janek PS: One year ago, I took a bet with my colleagues. I said, every ugly code could be rewritten in a normal way with sub sensfull sub routines in 80 columns, 50 rows (was Java in Perl I would said 25). Also I could imagine there is such one, it helped us all to fight against the evil :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]