Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33720
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <andriy.kornatskyy@live.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.016 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'frameworks': 0.05; '21,': 0.07; 'happen,': 0.07; 'python': 0.09; 'agrees': 0.09; 'counting': 0.09; 'excluding': 0.09; 'metrics': 0.09; 'def': 0.10; 'read.': 0.13; 'language': 0.14; 'essential': 0.15; 'attention,': 0.16; 'chris,': 0.16; 'contrived': 0.16; 'perfect.': 0.16; 'pushes': 0.16; 'readability.': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'code.': 0.20; 'to:name:python-list@python.org': 0.20; 'skip:- 40': 0.21; 'thanks.': 0.21; 'regardless': 0.21; 'assuming': 0.22; 'controlled': 0.22; 'statement': 0.23; 'this:': 0.23; 'to:2**1': 0.23; 'project,': 0.24; 'header:In-Reply-To:1': 0.25; 'setting': 0.26; 'set.': 0.27; 'lines': 0.28; 'overhead': 0.29; 'date:': 0.29; 'url:mailman': 0.29; 'source': 0.29; 'code': 0.31; 'point': 0.31; 'url:python': 0.32; 'url:listinfo': 0.32; 'material': 0.33; 'from:addr:live.com': 0.33; 'to:addr:python-list': 0.33; 'agree': 0.34; 'wrong': 0.34; 'list': 0.35; 'nov': 0.35; 'principal': 0.35; 'open': 0.35; 'pm,': 0.35; 'there': 0.35; 'subject:': 0.36; 'serve': 0.36; 'but': 0.36; 'url:org': 0.36; 'depends': 0.36; 'email addr:python.org': 0.36; 'too': 0.36; 'bad': 0.37; 'level': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'easier': 0.38; 'things': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'short': 0.39; 'where': 0.40; 'end': 0.40; 'url:mail': 0.40; 'your': 0.60; 'you.': 0.61; 'face': 0.61; 'bring': 0.62; "you'll": 0.62; 'email name:python-list': 0.62; 'email addr:gmail.com': 0.63; 'strategy': 0.64; 'choose': 0.65; 'results': 0.65; 'of:': 0.65; 'teach': 0.69; 'benefit': 0.70; 'goal': 0.74; 'score': 0.75; '+1100': 0.84; 'complexity': 0.84; 'dense': 0.84; 'excessive': 0.84; 'forward,': 0.84; 'charset:windows-1251': 0.97 |
| X-Originating-IP | [194.44.213.194] |
| X-EIP | [mUgGWtZ/IgdpSfXkT1dQ04rP+kkyw0Kw] |
| X-Originating-Email | [andriy.kornatskyy@live.com] |
| From | Andriy Kornatskyy <andriy.kornatskyy@live.com> |
| To | <rosuav@gmail.com>, "python-list@python.org" <python-list@python.org> |
| Subject | RE: Web Frameworks Excessive Complexity |
| Date | Wed, 21 Nov 2012 14:45:48 +0300 |
| Importance | Normal |
| In-Reply-To | <CAPTjJmqGfNCgAHcQQ=XDm4hK8zj3P9gy+T-DbF8U5zeME8D7ng@mail.gmail.com> |
| References | <CAPTjJmqGfNCgAHcQQ=XDm4hK8zj3P9gy+T-DbF8U5zeME8D7ng@mail.gmail.com> |
| Content-Type | text/plain; charset="windows-1251" |
| Content-Transfer-Encoding | quoted-printable |
| MIME-Version | 1.0 |
| X-OriginalArrivalTime | 21 Nov 2012 11:45:48.0207 (UTC) FILETIME=[BFBBD3F0:01CDC7DD] |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.142.1353498416.29569.python-list@python.org> (permalink) |
| Lines | 66 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1353498416 news.xs4all.nl 6916 [2001:888:2000:d::a6]:40707 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33720 |
Show key headers only | View raw
Chris,
The focus of development team is controlled by setting a metric threshold or just excluding some. So you do not have an overhead for the development team from the point it set forward, assuming them team committed to adherence it.
Your strategy for perfection may vary. You can start with 8 for CC in new project, or with a higher level of 15 in an existing project. Where you end up / the team agrees upon, depends on team commitment to the goal you set. There is no gold median, there is just recommendation, how you fluctuate from it and what reason you face with depends on team.
Thanks.
Andriy
----------------------------------------
> Date: Wed, 21 Nov 2012 22:21:23 +1100
> Subject: Re: Web Frameworks Excessive Complexity
> From: rosuav@gmail.com
> To: python-list@python.org
>
> On Wed, Nov 21, 2012 at 10:09 PM, Andriy Kornatskyy
> <andriy.kornatskyy@live.com> wrote:
> > We choose Python for its readability. This is essential principal of language and thousands around reading the open source code. Things like PEP8, CC, LoC are all to serve you one purpose: bring your attention, teach you make your code better.
>
> But too much focus on metrics results in those metrics improving
> without any material benefit to the code. If there's a number that you
> can watch going up or down, nobody's going to want to be the one that
> pushes that number the wrong direction. So what happens when the right
> thing to do happens to conflict with the given metric? And yes, it
> WILL happen, guaranteed. No metric is perfect.
>
> Counting lines of code teaches you to make dense code. That's not a
> good thing nor a bad thing; you'll end up with list comprehensions
> rather than short loops, regardless of which is easier to actually
> read.
>
> 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": return x+y*2
> if mode=="bar": return x*4+y
> if mode=="quux": return x+math.sin(y)
> return x
>
> Okay, this is a stupid contrived example, but tell me which of those
> you'd rather work with, and then tell me a plausible metric that would
> agree with you.
>
> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Web Frameworks Excessive Complexity Robert Kern <robert.kern@gmail.com> - 2012-11-20 20:07 +0000
Re: Web Frameworks Excessive Complexity Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-21 01:43 +0000
Re: Web Frameworks Excessive Complexity Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-11-21 09:33 +0100
RE: Web Frameworks Excessive Complexity Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-21 14:09 +0300
Re: Web Frameworks Excessive Complexity Chris Angelico <rosuav@gmail.com> - 2012-11-21 22:21 +1100
Re: Web Frameworks Excessive Complexity Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-21 11:43 +0000
RE: Web Frameworks Excessive Complexity Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-21 14:47 +0300
Re: Web Frameworks Excessive Complexity Chris Angelico <rosuav@gmail.com> - 2012-11-22 09:12 +1100
Re: Web Frameworks Excessive Complexity Modulok <modulok@gmail.com> - 2012-11-21 22:22 -0700
RE: Web Frameworks Excessive Complexity Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-21 14:45 +0300
Re: Web Frameworks Excessive Complexity Robert Kern <robert.kern@gmail.com> - 2012-11-21 11:47 +0000
csiph-web