Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^7: An Introduction to Literate Programming with perlWEB

by holli (Abbot)
on Jan 13, 2009 at 20:45 UTC ( [id://736079]=note: print w/replies, xml ) Need Help??


in reply to Re^6: An Introduction to Literate Programming with perlWEB
in thread An Introduction to Literate Programming with perlWEB

That's just an example of a missing edge case. Even when fixed, the original documentation is still valid and does not need to be altered in any way.


holli, /regexed monk/

Replies are listed 'Best First'.
Re^8: An Introduction to Literate Programming with perlWEB
by JavaFan (Canon) on Jan 13, 2009 at 21:21 UTC
    # Calculate the length of a segment by taking the square root of the # differences of the squares of the sum of the x and y coordinates sub segment_length { my ($p1, $p2) = @_; sqrt(($p1->{x} + $p2->{x})**2 - ($p1->{y} + $p2->{y})**2) }
    Bug 715: segment_length doesn't calculate the length of segments correctly. Bug 715 closed by holli: Not a bug, subroutine work as I documented it.
    # Return a random integer 1 .. 6 to simulate a die roll. # Seed the random number generator with the current time before calcul +ating. sub roll { srand(time); 1 + int rand 6; }
    Bug 4519: Due to a seeding the random number generator each time, 'roll' isn't producing random results. Bug 4519 closed by holli: Not a bug. I documented the fact it's seeding the random number generator each time.
    # CSS file span.important {color: green} # Green stands out!
    Bug 20123: important text should be red. Bug 20123 closed by holli: Not a bug, I documented it to be green.
    my $code = $cgi->param("sql_query"); $dbh->do($code); # This is dangerous.
    Bug 40385: All the tables have been dropped!. Bug 40385 closed by holli: I documented that it is dangerous, so it's not a bug.

    But I guess they are all edge cases as well?

      You're sneering without reason. I said if the documentation is correct and the code is not, fixing the bug does not require updating the documentation. You can come up with as many stupid examples as you want, but that's still correct.

      Last post on this subject.


      holli, /regexed monk/
        I said if the documentation is correct and the code is not, fixing the bug does not require updating the documentation.
        Actually, you didn't. BrowserUK brought up the situation where code and documentation agreed (and hence, both need fixing), to which I responded. On my response, you wrote:
        A bug is bug because it creates an unexpected behaviour which differs from the documentation.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-19 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found