Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102008
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Refactoring in a large code base |
| Date | Fri, 22 Jan 2016 23:34:37 +1100 |
| Lines | 55 |
| Message-ID | <mailman.165.1453466081.15297.python-list@python.org> (permalink) |
| References | <n7qpel$a3j$1@dont-email.me> <b433ab3a-251c-4b28-b041-dd5660305693@googlegroups.com> <mailman.161.1453449273.15297.python-list@python.org> <87bn8ec90z.fsf@elektro.pacujo.net> <93ffa9a5-b245-414e-b255-7f182e22e799@googlegroups.com> <874me5digp.fsf@elektro.pacujo.net> <mailman.162.1453461547.15297.python-list@python.org> <defa02cd-0132-4f1d-8019-d6ad31d217d2@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de WYQYRXmtZKx2SJRZ/WPABgrTMjkxaC3h4r/QpXvf1ZoA== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'cpython': 0.05; 'friday,': 0.07; 'sanity': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; '22,': 0.09; 'cleaned': 0.09; 'exceeds': 0.09; 'inclusion': 0.09; 'input,': 0.09; 'mess': 0.09; 'utf8': 0.09; 'bug': 0.10; 'jan': 0.11; "(it's": 0.16; '2016': 0.16; "chris'": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'instruction,': 0.16; 'lexer': 0.16; 'modules,': 0.16; 'program?': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'looked': 0.16; 'drawing': 0.18; 'shipped': 0.18; 'steve': 0.18; 'language': 0.19; 'library': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'proposed': 0.20; 'ascii': 0.22; 'denied': 0.22; 'developers.': 0.22; 'parser': 0.22; 'trying': 0.22; 'code,': 0.23; 'code.': 0.23; 'examples': 0.24; 'thus': 0.24; 'header:In-Reply-To:1': 0.24; "i've": 0.25; "doesn't": 0.26; 'developers': 0.26; 'chris': 0.26; 'fri,': 0.27; 'product.': 0.27; 'right.': 0.27; 'separate': 0.27; 'least': 0.27; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; 'pieces': 0.27; "skip:' 10": 0.28; 'actual': 0.28; '"do': 0.29; 'reduced': 0.29; 'instruction': 0.29; 'code': 0.30; "can't": 0.32; 'point': 0.33; 'source': 0.33; 'designs': 0.33; "he's": 0.33; 'similar': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'i.e.': 0.35; 'propose': 0.35; 'unicode': 0.35; 'quite': 0.35; 'something': 0.35; "isn't": 0.35; 'but': 0.36; 'too': 0.36; 'project': 0.36; 'there': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'say': 0.37; 'suggestion': 0.37; 'wanted': 0.37; 'doing': 0.38; 'january': 0.38; 'received:209': 0.38; 'why': 0.39; "didn't": 0.39; 'rather': 0.39; 'mark': 0.40; 'still': 0.40; 'some': 0.40; 'back': 0.62; 'today,': 0.62; 'making': 0.62; 'management': 0.64; 'experience.': 0.66; "they're": 0.66; 'power': 0.72; 'skill': 0.76; '9:19': 0.84; 'chrisa': 0.84; 'complexity': 0.84; 'hood': 0.84; 'improved.': 0.84; 'subject:base': 0.84; 'utc+5:30,': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=prQth3u/njp2vNFmK5XFiB4/6PnybqdDi8WR1xua82I=; b=qVz8fuZz9YrTqhMKwP8X7I1mI25krAFN6xw98ZEcUOUm/q+EiFAJmjNGKjayn5GLJT AjljG6CL8MWYgKdtD3iiaBG25luAsuhlmKwSrnIRX2vcyC++RcZrxN96u5pqhSZBYLoh kFAPF352AaEOSSCwA9mcwKWhwAn7IOUNGHudEf9BCuVKaGXGquqzGWuxzsCAeXs1QPsp NlMGAnnXUmNLaBTOtpplKn96bMlBs6h1oxpP9I+mGPH2eapUpk68Qsv4SoUHGaYQKhMr xCm3GZ9ewS3oO0xY89dPh2irXpcWgfEQEnz7Szx8cMa96DwMVlnWcaYsaYwyNP2z1NQL lvhQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=prQth3u/njp2vNFmK5XFiB4/6PnybqdDi8WR1xua82I=; b=lMrgoMt5rJTx1hdDCRmdpsgXTUdyuWXdTg8AteffYFavNXNA6Ck4h2bmyh22/+1uOW Zuv/w51TMpEE+GHjpSMJDs4AeArXr8O7ZYbTMiWj4mJf3YInAfq1XkO/4wnnz4hIKUxD 8SISVYQil9z9TL/QgoYVtN47gT0CPAm98ezk9VPR0AT06Y2nY1bV+jlY9s1hoBWFHQIk iXC1jVyyHVgud0YyWmVT9oe2Qnu9WTR9Fpb94nMZYSlzJN1dqnv1vuUtayQDHQ0Odabn d600RUa9mfFw5sTevtRthFAObQUaxf2mqZHkPfaXdt7/nPDV9uTVjkK8FNZFgtfnVSQL TTYQ== |
| X-Gm-Message-State | AG10YOSo/1An6B2CPdQlS51F1w2IhTZnbS2UgvRD4Mg7rBRp+6e22PmxLEtEv+k1zVnip+Qddedys07GLr97zg== |
| X-Received | by 10.107.14.73 with SMTP id 70mr3303142ioo.31.1453466077651; Fri, 22 Jan 2016 04:34:37 -0800 (PST) |
| In-Reply-To | <defa02cd-0132-4f1d-8019-d6ad31d217d2@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:102008 |
Show key headers only | View raw
On Fri, Jan 22, 2016 at 11:04 PM, Rustom Mody <rustompmody@gmail.com> wrote: > On Friday, January 22, 2016 at 4:49:19 PM UTC+5:30, Chris Angelico wrote: >> On Fri, Jan 22, 2016 at 9:19 PM, Marko Rauhamaa wrote: >> > The knowhow, vision and skill is apparently very rare. On the product >> > management side, we have the famous case of Steve Jobs, who simply told >> > the engineers to go back to the drawing boards when he didn't like the >> > user experience. Most others would have simply surrendered to the >> > mediocre designs and shipped the product. >> > >> > We need similar code sanity management. Developers are given much too >> > much power to mess up the source code. That's why "legacy" is considered >> > a four-letter word among developers. >> >> So what do you do with a huge program? Do you send it back to the >> developers and say "Do this is less lines of code"? >> >> CPython is a large and complex program. How do you propose doing it "right"? > > Put thus 'generistically' this is a rhetorical question and makes Marko look like > he's making a really foolish point > > Specifically, what little Ive seen under the CPython hood looked distinctly improvable. egs. > > 1. My suggestion to have the docs re. generator-function vs generator-objects > cleaned up had no takers > 2. My students trying to work inside the lexer made a mess because the extant lexer is a mess. > I.e. while python(3) *claims* to accept Unicode input, the actual lexer is > an ASCII lexer special-cased for unicode rather than pre-lexing utf8 to unicode > > These are just specific examples that I am familiar with Yes, there are some parts of CPython that can be improved. That's true of every large project (it's said that every program has at least one bug and could be shortened by at least one instruction, from which it can be deduced that every program can be reduced to a single instruction that doesn't work). Regarding lexers specifically, I have never seen any full-size language parser that I've wanted to tinker with. They're always highly optimized pieces of code, dealing with innumerable edge and corner cases, and exploring them is always like dipping my toe into something that's either ice-cold water or highly caustic acid, and I can't tell which. > Chris' general point still stands, viz take the large and complex program that is cpython > and clean up these messinesses: You will still have a large and complex program Right. You could definitely spin off *some* of CPython into a separate project (flip through the standard library - quite a few of those modules, if proposed for stdlib inclusion today, would be denied "better on PyPI"), but my point isn't that it can't be improved, but that there's an irreducible complexity to it that exceeds the "rewrite in a quarter" mark by a huge margin. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 14:20 +0000
Re: importing: what does "from" do? Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-21 07:52 -0700
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 15:12 +0000
Re: importing: what does "from" do? Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-21 08:59 -0700
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 16:30 +0000
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 16:41 +0000
Re: importing: what does "from" do? Steven D'Aprano <steve@pearwood.info> - 2016-01-22 03:22 +1100
Re: importing: what does "from" do? John Gordon <gordon@panix.com> - 2016-01-21 15:31 +0000
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 15:37 +0000
Re: importing: what does "from" do? John Gordon <gordon@panix.com> - 2016-01-21 15:44 +0000
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 15:46 +0000
Re: importing: what does "from" do? John Gordon <gordon@panix.com> - 2016-01-21 15:59 +0000
Re: importing: what does "from" do? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-21 15:53 +0000
Re: importing: what does "from" do? Steven D'Aprano <steve@pearwood.info> - 2016-01-22 03:28 +1100
Re: importing: what does "from" do? Rustom Mody <rustompmody@gmail.com> - 2016-01-21 23:03 -0800
Refactoring in a large code base (was: importing: what does "from" do?) Ben Finney <ben+python@benfinney.id.au> - 2016-01-22 18:54 +1100
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 10:29 +0200
Re: Refactoring in a large code base Rustom Mody <rustompmody@gmail.com> - 2016-01-22 01:21 -0800
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 12:19 +0200
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-22 22:19 +1100
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 13:54 +0200
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-22 23:28 +1100
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 15:00 +0200
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-23 00:26 +1100
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 15:48 +0200
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-23 01:09 +1100
Re: Refactoring in a large code base Rustom Mody <rustompmody@gmail.com> - 2016-01-22 04:04 -0800
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 14:21 +0200
Re: Refactoring in a large code base Thomas Mellman <tmellman@web.de> - 2016-01-22 12:27 +0000
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-22 23:34 +1100
Re: Refactoring in a large code base Rustom Mody <rustompmody@gmail.com> - 2016-01-22 05:30 -0800
Re: Refactoring in a large code base Marko Rauhamaa <marko@pacujo.net> - 2016-01-22 15:43 +0200
Re: Refactoring in a large code base Rustom Mody <rustompmody@gmail.com> - 2016-01-22 05:58 -0800
Re: Refactoring in a large code base Chris Angelico <rosuav@gmail.com> - 2016-01-23 01:08 +1100
Re: Refactoring in a large code base "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-22 11:45 +0000
csiph-web