Thanks Greg, The intent and argument is much clearer with the text you refer to.
: ) On 24 Nov 2014 18:47, "Greg Wilson" <gvwil...@software-carpentry.org> wrote: > Hi all, > > The 95% figure comes out of thin air - if you'd like to adjust it to 99%, > and recalculate the overall odds of correctness, that would be fine. In > fact, I believe the original version of the text was something like: > > "...if there's a 95% chance of each line being correct, the odds of the > whole function being right are only 41%. Even if 99% of lines are correct, > the odds are only 84%, which is still uncomfortably low." > > Do you think that would be clearer? > > Cheers, > Greg > > > On 2014-11-24 1:10 PM, Shoaib Sufi wrote: > > I didn't assert that it was the point. > > Thanks for the reference. > On 24 Nov 2014 17:51, "Aron Ahmadia" <a...@ahmadia.net> wrote: > >> From McConnell's summary in Code Complete: >> >> > Industry average experience is about 1-25 errors per 1000 lines of >> code for delivered software. >> >> Of course, that's production code that has presumably been through far >> more testing and other forms of quality assurance than scientific code. >> The 95% number is just an assumption for an example, not a precise >> citation. Greg may know of a better number for scientific code, but I >> don't think that's really the point of the exercise. >> >> On Mon, Nov 24, 2014 at 12:44 PM, Shoaib Sufi < >> shoaib.s...@manchester.ac.uk> wrote: >> >>> Hi Aron, >>> >>> What I mean is where does the assumption of a line of code being 95% >>> correct come from. >>> >>> Thank you for helping me think more clearly about the question I wanted >>> to ask. >>> >>> Best >>> Shoaib >>> >>> >>> >>> On Mon, Nov 24, 2014 at 5:38 PM, Aron Ahmadia <a...@ahmadia.net> wrote: >>> > It's a function of statistics, assuming each of the lines of code is an >>> > independent distribution that is either correct or wrong. >>> > >>> > Given the input assumption (95% of all source code lines are correct as >>> > written the first time), then the code is correct if the individual >>> lines >>> > are all correct, which has probability P = 0.95^17. This is more >>> correctly >>> > rounded to 42%, but it's in the right ballpark :) >>> > >>> > On Mon, Nov 24, 2014 at 12:34 PM, Shoaib Sufi < >>> shoaib.s...@manchester.ac.uk> >>> > wrote: >>> >> >>> >> Hi, >>> >> >>> >> At the bottom of: >>> >> >>> >> >>> https://github.com/swcarpentry/bc/blob/gh-pages/novice/r/04-cond-colors-R.Rmd >>> >> >>> >> It states: >>> >> >>> >> 'Our final heatmap function is 17 lines long, which means that if >>> >> there's a 95% chance of each line being correct, the odds of the whole >>> >> function being right are only 41%. Before we go any further, we need >>> >> to learn how to test whether our code is doing what we want it to do, >>> >> and that will be the subject of the next lesson.' >>> >> >>> >> Where is the reference for making a statement like that - i.e. % >>> >> chance of errors based on function length. >>> >> >>> >> Thanks >>> >> Shoaib Sufi >>> >> >>> >> _______________________________________________ >>> >> Discuss mailing list >>> >> Discuss@lists.software-carpentry.org >>> >> >>> >> >>> http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org >>> > >>> > >>> >> >> > > _______________________________________________ > Discuss mailing > listDiscuss@lists.software-carpentry.orghttp://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org > > > -- > Dr. Greg Wilson | gvwil...@software-carpentry.org > Software Carpentry | http://software-carpentry.org > >
_______________________________________________ Discuss mailing list Discuss@lists.software-carpentry.org http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org