Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Guess why books for children use short sentences.
Because they are geared toward people who are still learning the requisite language skills.
Guess why most programming introductions start with printing Hello, world.
Because they are geared toward people who are still learning the requisite programming skills. And Mathematical introductions don't begin with integrals and derivatives either, but that misses the point as entirely as your two examples.

One of the tasks of a programmer is to manage complexity. The size of a routine is a trait that is causally unrelated to complexity except in trivial cases. It is true that relatively shorter routines are often a by-product of good complexity management, but not by virtue of shortness itself. The aim should never be about making something smaller, it should be about making it simpler (and simpler for a routine can be with respect to several variables, both locally and globally).

$simpler != $shorter;
In fact, as some studies have shown, simpler (in terms of errors, changes required, and even comprehensibility) is not even correlated with smaller size (within upper bounds ranging from 100 to 500 line routines). And with that in mind, I'll paraphrase Einstein: routines should be made as simple as possible, but no simpler!. People who equate smaller with simpler often overshoot the target.
I do not know of any study. I don't care much about studies either, since few are done using the right context and variables.
Well, the head-in-the-sand tactic is a common defense of personal opinion.

In reply to Re: Re: Re: Re: Short routines matter more in OO? by Anonymous Monk
in thread Short routines matter more in OO? by tilly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2021-09-23 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?