Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: An Introduction to Literate Programming with perlWEB

by JavaFan (Canon)
on Jan 13, 2009 at 16:32 UTC ( #735994=note: print w/replies, xml ) Need Help??


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

By way of example, you're in there fixing a bug. Do you fix the prose or the code first?
If that's an argument to literate programming, then that's an argument to write any form of documentation or comments.

Note, I'm not making any argument against or in favour of literate programming.

  • Comment on Re^4: An Introduction to Literate Programming with perlWEB

Replies are listed 'Best First'.
Re^5: An Introduction to Literate Programming with perlWEB
by holli (Monsignor) on Jan 13, 2009 at 18:58 UTC
    I disagree. A bug is bug because it creates an unexpected behaviour which differs from the documentation. Once fixed there should be no reason to touch the docs. Of course it can also be the other way round, the documentation is outdated because of a "urgent feature" got implemented.


    holli, /regexed monk/
      A bug is bug because it creates an unexpected behaviour which differs from the documentation.
      Sillyness.

      Suppose you have a routine like this in your company's application.

      # Calculate the average by adding the parameters and # dividing them by the number of elements. sub avg { my $sum = 0; $sum += $_ for @_; return $sum / @_; }
      Now someone files a bug report, the application dies with a divide by zero error, and the line number the bug happens is in this subroutine.

      Now, you think you get high marks on your end-of-the-year review if you close this report with "Not a bug, the behaviour of the routine matches its documentation"?

      Of course, there are many bugs because the code differs from the documentation. But bugs don't disappear just because the documentation matches the code.

      Now, if you had said "you cannot have a bug if the code matches the specification", you may have something to argue (but even that is something I don't agree with).

        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/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://735994]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2018-07-21 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (449 votes). Check out past polls.

    Notices?