Re: Python3.0 has more duplication in source code than Python2.5

2009-02-10 Thread Дамјан Георгиевски
> I have made the same analysis to some commercial source code, the > dup60 rate is quite often significantly larger than 15%. commercial code sucks often .. that's why they hide it :) -- дамјан ( http://softver.org.mk/damjan/ ) Scarlett Johansson: You always see the glass half-empty. Woody Al

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-08 Thread Gabriel Genellina
On Sun, Feb 8, 2009 at 9:12 AM, Terry wrote: I have made the same analysis to some commercial source code, the dup60 rate is quite often significantly larger than 15%. En Sun, 08 Feb 2009 07:10:12 -0200, Henry Read escribió: I don't think code duplication rate has strong relationship to

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-08 Thread Henry Read
I don't think code duplication rate has strong relationship towards code quality. On Sun, Feb 8, 2009 at 9:12 AM, Terry wrote: > On 2月8日, 上午8时51分, Terry wrote: > > On 2月8日, 上午12时20分, Benjamin Peterson wrote: > > > > > Terry gmail.com> writes: > > > > > > On 2月7日, 下午7时10分, "Diez B. Roggisch"

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月8日, 上午8时51分, Terry wrote: > On 2月8日, 上午12时20分, Benjamin Peterson wrote: > > > Terry gmail.com> writes: > > > > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > > > Do you by any chance have a few examples of these? There is a lot of > > > > idiomatic code in python to e.g. acquire and relea

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月8日, 上午12时20分, Benjamin Peterson wrote: > Terry gmail.com> writes: > > > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > > Do you by any chance have a few examples of these? There is a lot of > > > idiomatic code in python to e.g. acquire and release the GIL or doing > > > refcount-stuff. If

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> yet the general tone of the responses has been more defensive than i would > have expected. i don't really understand why. nothing really terrible, > given the extremes you get on the net in general, but still a little > disappointing. I think this is fairly easy to explain. The OP closes with

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread andrew cooke
Steve Holden wrote: >> You'd best hope the copied section was thoroughly reviewed otherwise >> you're >> duplicating a flaw across X other sections. And then you also best hope >> that >> whoever finds said flaw and fixes it is also smart enough to check for >> similar constructs around the code ba

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Jeroen Ruigrok van der Werven
-On [20090207 21:07], Steve Holden (st...@holdenweb.com) wrote: >This is probably preferable to five different developers solving the >same problem five different ways and introducing three *different* bugs, no? I guess the answer would be 'that depends', but in most cases you would be correct, ye

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> This is probably preferable to five different developers solving the > same problem five different ways and introducing three *different* bugs, no? With the examples presented, I'm not convinced that there is actually significant code duplication going on in the first place. Regards, Martin --

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Steve Holden
Jeroen Ruigrok van der Werven wrote: > -On [20090207 18:25], Scott David Daniels (scott.dani...@acm.org) wrote: >> This analysis overlooks the fact that 3.0 _was_ a major change, and is >> likely to grow cut-and-paste solutions to some problems as we switch to >> Unicode strings from byte strings.

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Jeroen Ruigrok van der Werven
-On [20090207 18:25], Scott David Daniels (scott.dani...@acm.org) wrote: >This analysis overlooks the fact that 3.0 _was_ a major change, and is >likely to grow cut-and-paste solutions to some problems as we switch to >Unicode strings from byte strings. You'd best hope the copied section was thoro

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> But the duplication are always not very big, from about 100 lines > (rare) to less the 5 lines. As you can see the Rate30 is much bigger > than Rate60, that means there are a lot of small duplications. I don't find that important for code quality. It's the large chunks that I would like to see d

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> And I'm not saying that you can not have duplication in code. But it > seems that the stable & successful software releases tend to have > relatively stable duplication rate. So if some software has an instable duplication rate, it probably means that it is either not stable, or not successful.

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Scott David Daniels
Terry wrote: ... I'm not saying that you can not have duplication in code. But it seems that the stable & successful software releases tend to have relatively stable duplication rate. This analysis overlooks the fact that 3.0 _was_ a major change, and is likely to grow cut-and-paste solutions t

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Benjamin Peterson
Terry gmail.com> writes: > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > Do you by any chance have a few examples of these? There is a lot of > > idiomatic code in python to e.g. acquire and release the GIL or doing > > refcount-stuff. If that happens to be done with rather generic names as > >

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Diez B. Roggisch
Terry schrieb: On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: Does that say something about the code quality of Python3.0? Not necessarily. IIUC, copying a single file with 2000 lines completely could already account for that increase. It would be interesting to see what specific files have gaine

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > > Does that say something about the code quality of Python3.0? > > Not necessarily. IIUC, copying a single file with 2000 lines > completely could already account for that increase. > > It would be interesting to see what specific files have gained > la

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-06 Thread Martin v. Löwis
> Does that say something about the code quality of Python3.0? Not necessarily. IIUC, copying a single file with 2000 lines completely could already account for that increase. It would be interesting to see what specific files have gained large numbers of additional files, compared to 2.5. Regar

Python3.0 has more duplication in source code than Python2.5

2009-02-06 Thread Terry
I used a CPD (copy/paste detector) in PMD to analyze the code duplication in Python source code. I found that Python3.0 contains more duplicated code than the previous versions. The CPD tool is far from perfect, but I still feel the analysis makes some sense. |Source Code | NLOC | Dup60