Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #72644

Re: OT: This Swift thing

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'assignment': 0.07; 'comment,': 0.09; 'etc).': 0.09; 'happens.': 0.09; 'someone,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'boards': 0.16; 'braces,': 0.16; 'editor,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'gained': 0.16; 'notation': 0.16; 'precede': 0.16; 'followed': 0.16; 'so.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'translated': 0.19; 'written': 0.21; 'code,': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'mathematical': 0.24; 'tend': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; "i've": 0.25; 'possibly': 0.26; 'this:': 0.26; 'values': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'michael': 0.29; 'am,': 0.29; "doesn't": 0.30; 'especially': 0.30; 'message- id:@mail.gmail.com': 0.30; '(which': 0.31; 'code': 0.31; 'comments': 0.31; 'easier': 0.31; 'dropped': 0.31; 'indentation': 0.31; 'allows': 0.31; 'run': 0.32; 'quite': 0.32; 'text': 0.33; 'becomes': 0.33; 'programmers': 0.33; 'style': 0.33; 'actual': 0.34; 'screen': 0.34; 'could': 0.34; 'basic': 0.35; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'similar': 0.36; 'two': 0.37; 'sometimes': 0.38; 'auto': 0.38; 'structure': 0.39; 'expression': 0.60; 'flat': 0.60; 'most': 0.60; 'lost': 0.61; 'back': 0.62; 'show': 0.63; 'more': 0.64; 'facilities': 0.69; 'fact,': 0.69; 'sharing': 0.69; 'subject:This': 0.74; 'paper': 0.75; '1:00': 0.84; 'psuedo-code': 0.84; 'refuses': 0.84; 'room.': 0.84; 'seriously,': 0.84; 'stubbornly': 0.84; 'to:none': 0.92; 'lot,': 0.93
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=HgU3fgtqpEF8M9svmFz8yKTHxZ5Se/Bv5jQqjbUEo1U=; b=EutET6my+ze1VxTU85CBokoyaExCywnlXEm4K3SaVk5n/n7urchooNSjGUS+Vjn/zf aQ5H+nMs+a/0eU9wOGLzllXha0GHCNy/NdThdLeRRclu7E3I+SY5thIBLFTplK92Svf7 dq/iDZ8KcnRacQX6w5W8sodqNrvu0jG7gEjcptkwZ8hOVx8xNVcaKO9AVDxn9TxoSOAR WxfzHeygyesdy8kxT1TJy5Kw7O5a4I7H+VcX0T8jZqNWYHvY6LHyRRuaCJEdfk8DzZsz nVY1+n1B2DkKAjMxHpKgesnNBIKzZpbGzQrOWa611MBF+Y08Ge/4gQUKnAbuE0QVkbR6 MylQ==
MIME-Version 1.0
X-Received by 10.58.237.199 with SMTP id ve7mr3170023vec.66.1401895575314; Wed, 04 Jun 2014 08:26:15 -0700 (PDT)
In-Reply-To <538F3493.6040102@gmail.com>
References <34564700423508781.788278sturla.molden-gmail.com@news.gmane.org> <CANc-5UyPyvGJRizcz2f7N=KPvo3TH6LcWGxeSWHbgOm1XvYUuA@mail.gmail.com> <CAAu18hd8Spu98vcx6M+JQqZiYXXXu38et1i2quSNy506i=ESYA@mail.gmail.com> <mailman.10642.1401828200.18130.python-list@python.org> <lmlftv$6ii$1@speranza.aioe.org> <538F3493.6040102@gmail.com>
Date Thu, 5 Jun 2014 01:26:15 +1000
Subject Re: OT: This Swift thing
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.10706.1401895577.18130.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1401895577 news.xs4all.nl 2858 [2001:888:2000:d::a6]:38110
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:72644

Show key headers only | View raw


On Thu, Jun 5, 2014 at 1:00 AM, Michael Torrie <torriem@gmail.com> wrote:
> Do programmers not psuedo-code on paper or white boards anymore?

I pseudocode in a text editor, these days. Sometimes that pseudocode
gets reworked into code; more often it becomes comments that precede
the code (which may or may not get dropped once the code's working).

"Executable pseudo-code" is all very well as a concept, but there's an
awful lot that I can write down that doesn't run as Python. For
instance, Python stubbornly insists that assignment be written like
this:

x = expression

and flat out refuses to accept this:

4*x*x + 3*x + y + 50 = (x*y + z) * (x + z)

I mean honestly. I've translated all the mathematical notation into
programming style (asterisks for multiplication, etc). Why can't
Python take the values for y and z and give me back a value for x?

But seriously, this is the sort of thing that will most likely end up
as a comment, followed by the solved-for-x version (which will quite
possibly not be a single line of code, with something this complicated
- especially as there could be multiple solutions or no solutions).
And that transformation isn't really much easier in Python than any
other language with similar mathematical facilities (I used to do this
sort of thing in REXX back in the 90s). For the basic structure of the
code (which is where Python *does* look more like pseudo-code), I tend
to write actual code straight away; in a good editor, you can write
C/Java/Pike/etc code with auto indentation if you put in your braces,
so there's no advantage to leaving them off (as there would be on a
whiteboard).

Have we lost something by not working on whiteboards? I don't think
so. In fact, we've gained a lot, because I can pull up an editor,
share my screen with someone, and show my work directly as it happens.
A whiteboard allows that only if the two people are physically sharing
a room.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: OT: This Swift thing Sturla Molden <sturla.molden@gmail.com> - 2014-06-03 20:43 +0000
  Re: OT: This Swift thing Marko Rauhamaa <marko@pacujo.net> - 2014-06-04 00:19 +0300
    Re: OT: This Swift thing Steven D'Aprano <steve@pearwood.info> - 2014-06-04 04:30 +0000
      Re: OT: This Swift thing Marko Rauhamaa <marko@pacujo.net> - 2014-06-04 08:23 +0300
  Re: OT: This Swift thing Mark H Harris <harrismh777@gmail.com> - 2014-06-03 16:49 -0500
    Re: OT: This Swift thing Chris Angelico <rosuav@gmail.com> - 2014-06-04 08:01 +1000
    Re: OT: This Swift thing "Eric S. Johansson" <esj@harvee.org> - 2014-06-03 19:22 -0400
    Re: OT: This Swift thing Chris Angelico <rosuav@gmail.com> - 2014-06-04 09:29 +1000
    Re: OT: This Swift thing "Eric S. Johansson" <esj@harvee.org> - 2014-06-03 19:36 -0400
    Re: OT: This Swift thing Steven D'Aprano <steve@pearwood.info> - 2014-06-04 04:54 +0000
      Re: OT: This Swift thing Mark H Harris <harrismh777@gmail.com> - 2014-06-04 09:43 -0500
    Re: OT: This Swift thing Skip Montanaro <skip@pobox.com> - 2014-06-04 09:24 -0500
      Re: OT: This Swift thing Mark H Harris <harrismh777@gmail.com> - 2014-06-04 09:53 -0500
        Re: OT: This Swift thing Terry Reedy <tjreedy@udel.edu> - 2014-06-04 18:18 -0400
          Re: OT: This Swift thing Mark H Harris <harrismh777@gmail.com> - 2014-06-04 18:23 -0500
            Re: OT: This Swift thing Terry Reedy <tjreedy@udel.edu> - 2014-06-04 22:43 -0400
              Re: OT: This Swift thing Steven D'Aprano <steve@pearwood.info> - 2014-06-05 08:39 +0000
                Re: OT: This Swift thing Chris Angelico <rosuav@gmail.com> - 2014-06-05 18:52 +1000
                Re: OT: This Swift thing Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-05 08:27 -0400
                Re: OT: This Swift thing Rustom Mody <rustompmody@gmail.com> - 2014-06-05 05:56 -0700
                Re: OT: This Swift thing Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-05 15:12 +0000
                Re: OT: This Swift thing Rustom Mody <rustompmody@gmail.com> - 2014-06-05 08:39 -0700
                Re: OT: This Swift thing Rustom Mody <rustompmody@gmail.com> - 2014-06-05 08:44 -0700
                Tabs (was Re: OT: This Swift thing) Terry Reedy <tjreedy@udel.edu> - 2014-06-05 15:05 -0400
                Re: Tabs (was Re: OT: This Swift thing) Terry Reedy <tjreedy@udel.edu> - 2014-06-05 18:23 -0400
                Re: Tabs (was Re: OT: This Swift thing) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-05 20:52 -0400
        Re: OT: This Swift thing CHIN Dihedral <dihedral88888@gmail.com> - 2014-06-15 03:08 -0700
    Re: OT: This Swift thing Michael Torrie <torriem@gmail.com> - 2014-06-04 09:00 -0600
    Re: OT: This Swift thing Chris Angelico <rosuav@gmail.com> - 2014-06-05 01:26 +1000
  Re: OT: This Swift thing Kevin Walzer <kw@codebykevin.com> - 2014-06-03 19:39 -0400
    Re: OT: This Swift thing Sturla Molden <sturla.molden@gmail.com> - 2014-06-04 01:53 +0200
  Re: OT: This Swift thing Andrea D'Amore <anddamNOALPASTICCIODICARNE+gruppi@brapi.net> - 2014-06-04 09:47 +0200

csiph-web