Re: Web Frameworks Excessive Complexity

2012-11-22 Thread Thomas Bach
On Wed, Nov 21, 2012 at 12:49:52PM -0800, rh wrote: > > wheezy + "myvirtualenv" = 3.3MB > pyramid = 92MB $ mkvirtualenv --no-site-packages -p python2.7 pyramid $ pip install -U distribute $ pip install pyramid $ du -h .virtualenvs/pyramid 22M .virtualenvs/pyramid $ du

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Modulok
> On Wed, Nov 21, 2012 at 10:43 PM, Steven D'Aprano > wrote: >> On Wed, 21 Nov 2012 22:21:23 +1100, Chris Angelico wrote: >> >>> Counting complexity by giving a score to every statement encourages code >>> like this: >>> >>> def bletch(x,y): >>> return x + {"foo":y*2,"bar":x*3+y,"quux":math.sin(

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Chris Angelico
On Wed, Nov 21, 2012 at 10:43 PM, Steven D'Aprano wrote: > On Wed, 21 Nov 2012 22:21:23 +1100, Chris Angelico wrote: > >> Counting complexity by giving a score to every statement encourages code >> like this: >> >> def bletch(x,y): >> return x + {"foo":y*2,"bar":x*3+y,"quux":math.sin(y)}.get(mod

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Chris Rebert
On Wed, Nov 21, 2012 at 10:57 AM, rh wrote: > On Wed, 21 Nov 2012 10:12:26 -0800 > Chris Rebert wrote: >> On Wed, Nov 21, 2012 at 9:49 AM, rh >> wrote: >> > On Tue, 20 Nov 2012 20:41:42 +0300 >> > Andriy Kornatskyy wrote: >> > I'm looking at different technology right now on which to base a >>

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
Kornatskyy > To: python-list@python.org > From: richard_hubb...@lavabit.com > Subject: Re: Web Frameworks Excessive Complexity > Date: Wed, 21 Nov 2012 09:49:39 -0800 > > On Tue, 20 Nov 2012 20:41:42 +0300 > Andriy Kornatskyy wrote: >

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Chris Rebert
On Wed, Nov 21, 2012 at 9:49 AM, rh wrote: > On Tue, 20 Nov 2012 20:41:42 +0300 > Andriy Kornatskyy wrote: >> Cyclomatic (or conditional) complexity is a metric used to indicate >> the complexity of a source code. Excessive complexity is something >> that is beyond recommended level of 10 (thresh

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 12:47, Andriy Kornatskyy wrote: Hm... what serves an evidence purpose for you? Well-done empirical studies, like the one I gave you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to inte

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
: Re: Web Frameworks Excessive Complexity > Date: Wed, 21 Nov 2012 12:26:26 + > > On 21/11/2012 12:17, Andriy Kornatskyy wrote: > > > > Agreed. I think we have pretty much the same point of view on this. > > > > All these metrics advise you... this is again depen

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 12:17, Andriy Kornatskyy wrote: Agreed. I think we have pretty much the same point of view on this. All these metrics advise you... this is again depends how you look at this. If you are a new comer to a project, you usually spend some time on code review, talk to people, read d

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
analysis give you an initial picture, how it fits with your own vision, etc. Convince or accept? Andriy Kornatskyy > To: python-list@python.org > From: robert.k...@gmail.com > Subject: Re: Web Frameworks Excessive Complexity > Date: Wed, 21 Nov 2

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 11:02, Andriy Kornatskyy wrote: Robert, You would never get a better product by accident. The meaning of better product might differ from team to team but you can not ignore excessive complexity. Earlier or later you get back to that code and refactor it, thus existence of such

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
I believe for the quality of code you produce. Thanks. Andriy > From: steve+comp.lang.pyt...@pearwood.info > Subject: Re: Web Frameworks Excessive Complexity > Date: Wed, 21 Nov 2012 11:43:10 + > To: python-list@python.org > > O

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Robert Kern
On 21/11/2012 01:43, Steven D'Aprano wrote: On Tue, 20 Nov 2012 20:07:54 +, Robert Kern wrote: The source of bugs is not excessive complexity in a method, just excessive lines of code. Taken literally, that cannot possibly the case. def method(self, a, b, c): do_this(a) do_that

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
. Thanks. Andriy > Date: Wed, 21 Nov 2012 22:21:23 +1100 > Subject: Re: Web Frameworks Excessive Complexity > From: ros...@gmail.com > To: python-list@python.org > > On Wed, Nov 21, 2012 at 10:09 PM, Andriy Kornatskyy > wrote: >

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Steven D'Aprano
On Wed, 21 Nov 2012 22:21:23 +1100, Chris Angelico wrote: > Counting complexity by giving a score to every statement encourages code > like this: > > def bletch(x,y): > return x + {"foo":y*2,"bar":x*3+y,"quux":math.sin(y)}.get(mode,0) > > instead of: > > def bletch(x,y): > if mode=="foo": r

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
> From: ulrich.eckha...@dominolaser.com > Subject: Re: Web Frameworks Excessive Complexity > Date: Wed, 21 Nov 2012 09:33:09 +0100 > To: python-list@python.org > > Am 21.11.2012 02:43, schrieb Steven D'Aprano: > > On Tue, 20 Nov 2012 20:07:54 +, Robert K

RE: Web Frameworks Excessive Complexity

2012-11-21 Thread Andriy Kornatskyy
. Thanks. Andriy > To: python-list@python.org > From: robert.k...@gmail.com > Subject: Re: Web Frameworks Excessive Complexity > Date: Tue, 20 Nov 2012 20:33:46 + > > On 20/11/2012 20:22, Andriy Kornatskyy wrote: > > > >

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Ulrich Eckhardt
Am 21.11.2012 02:43, schrieb Steven D'Aprano: On Tue, 20 Nov 2012 20:07:54 +, Robert Kern wrote: The source of bugs is not excessive complexity in a method, just excessive lines of code. Taken literally, that cannot possibly the case. def method(self, a, b, c): do_this(a) do_tha

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Steven D'Aprano
On Tue, 20 Nov 2012 20:07:54 +, Robert Kern wrote: > The source of bugs is not excessive complexity in a method, just > excessive lines of code. Taken literally, that cannot possibly the case. def method(self, a, b, c): do_this(a) do_that(b) do_something_else(c) def method(self

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
On 20/11/2012 20:22, Andriy Kornatskyy wrote: Robert, I respect your point of view and it definitely make sense to me. I personally do not have a problem to understand CC but agree, method LoC is easier to understand. Regardless the path your choose in your next refactoring (based on method

RE: Web Frameworks Excessive Complexity

2012-11-20 Thread Andriy Kornatskyy
> To: python-list@python.org > From: robert.k...@gmail.com > Subject: Re: Web Frameworks Excessive Complexity > Date: Tue, 20 Nov 2012 20:07:54 + > > On 20/11/2012 19:46, Andriy Kornatskyy wrote: > > > > Robert, > >

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
On 20/11/2012 19:46, Andriy Kornatskyy wrote: Robert, Thank you for the comment. I do not try relate CC with LOC. Instead pointing to excessive complexity, something that is beyond recommended threshold, a subject to refactoring in respective web frameworks. Those areas are likely to be pote

RE: Web Frameworks Excessive Complexity

2012-11-20 Thread Andriy Kornatskyy
coverage with unit tests) thus have certain degree of interest to both: end users and framework developers. Thanks. Andriy Kornatskyy > To: python-list@python.org > From: robert.k...@gmail.com > Subject: Re: Web Frameworks Excessive Complexity &g

Re: Web Frameworks Excessive Complexity

2012-11-20 Thread Robert Kern
On 20/11/2012 17:41, Andriy Kornatskyy wrote: Cyclomatic (or conditional) complexity is a metric used to indicate the complexity of a source code. Excessive complexity is something that is beyond recommended level of 10 (threshold that points to the fact the source code is too complex and refa

Web Frameworks Excessive Complexity

2012-11-20 Thread Andriy Kornatskyy
Cyclomatic (or conditional) complexity is a metric used to indicate the complexity of a source code. Excessive complexity is something that is beyond recommended level of 10 (threshold that points to the fact the source code is too complex and refactoring is suggested). Here is a list of web f