Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

RE: Suggestion for dealing with unfeasibly long code lines

by draconis (Scribe)
on Jun 20, 2000 at 17:50 UTC ( [id://19007]=note: print w/replies, xml ) Need Help??


in reply to Suggestion for dealing with unfeasibly long code lines

In addition to what the others have said I also belive it to be a matter of programming "style". One could have easily stated the example as this:
foreach (@example) { $unfeasibly_long_variable_name_I_should_know_better_really += $why_do_people_not_learn_to_break_lines / $_; }
This way - the code still remains readable, maintainable without needing to "figure out" where things begin and end. So monks that post may consider this as an alternative to "run-on" statements. This of course dos not apply to the obfuscated code.

Replies are listed 'Best First'.
RE (2): Suggestion for dealing with unfeasibly long code lines
by nuance (Hermit) on Jun 20, 2000 at 18:18 UTC

    Perhaps it's not immediately apparent from what I wrote that I totally agree with you. If you look closely at the example you have rewritten, you will see that the variable names I chose suggested the line break you supplied. Without doubt your rewrite is the "preferred solution".

    My proposal is not aimed at monks who know how to break lines. Lots of people post stuff that "breaks" the formatting of the page. It is unlikely that these people will "learn" how to do it properly. If my proposal was implememted it gives a way to "fix" the code that occasionally gets posted by even the best.

    Part of the problem is that a lot of "root" nodes are not editable once they have been submitted. Even if you see a problem in the thing you have just posted it is impossible to "fix" it. Then there is the problem with anonymous monks who do not even know how to use <font> tags. This is not a criticism of anonymous monks who have not visited the site before, the use of code tags is not intuitive, you need to be told about them and how to use them. Anonymous Monks (and monks posting for the first time) often post unreadable code that gets filled like normal text. If we have a problem getting them to use font tags, then we will surely have a problem educating them to break lines in sensible places. There is also the problem that different people use different screen resolutions and different font sizes in their browser. Things that fit correctly on your screen may not fit correctly on mine.

    So yes I agree, people should learn how to post. While they are learning, it makes the site less usable and we will always (hopefully) have new members "learning" how to post. I don't think your "solution" fixes the problem.

    Nuance

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-19 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found