OT Annoying Habits (Was: when format strings attack)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carroll, Barry

    OT Annoying Habits (Was: when format strings attack)

    Greetings:

    Personally, I don't think top-posting is the most annoying newsgroup
    habit. I think it's making a big fuss about minor inconveniences.

    One of the nicest things about being human is the amazing flexibility of
    our brains. For example, if a block of text isn't arranged in the order
    we're used to, we can easily rearrange it mentally and read it anyway.
    Oriental and Arabic peoples, for example, do this each time they read
    something written in English. It's EASY, once you get used to it!

    It took me about 3 seconds to realize that Mr. D'Aprano' Q&A session was
    laid out bottom-to-top instead of top-to-bottom. After that, it made
    perfect sense. While it was a excellent way to demonstrate his
    argument, it failed to prove his point, because, while top-to-bottom may
    be the way he reads things, it isn't the way _everyone_ reads things.

    So, as far as I'm concerned, post your posts in whatever manner works
    for you. If it's in English, I'll figure it out. If not, well, there's
    always Babelfish. ;^)

    Regards,

    Barry
    barry.carroll@p sc.com
    541-302-1107
    _______________ _________
    We who cut mere stones must always be envisioning cathedrals.

    -Quarry worker's creed

    -----Original Message-----
    From: Steven D'Aprano [mailto:steve@RE MOVE.THIS.cyber source.com.au]
    Sent: Friday, January 19, 2007 11:30 AM
    To: python-list@python.org
    Subject: Re: when format strings attack

    On Fri, 19 Jan 2007 10:43:53 -0800, John Zenger wrote:
    Perhaps it is not as severe a security risk, but pure Python
    programs
    can run into similar problems if they don't check user input for %
    codes.
    Please don't top-post.

    A: Because it messes up the order that we read things.
    Q: Why?
    A: Top-posting.
    Q: What is the most annoying newsgroup habit?

    Example:
    >>k = raw_input("Try to trick me: ")
    Try to trick me: How about %s this?
    >>j = "User %s just entered: " + k
    >>print j % "John"
    Traceback (most recent call last):
    File "<pyshell#8 >", line 1, in ?
    print j % "John"
    TypeError: not enough arguments for format string
    That's hardly the same sort of vulnerability the article was talking
    about, but it is a potential bug waiting to bite.

    In a serious application, you should keep user-inputted strings
    separate
    from application strings, and never use user strings unless they've
    been
    made safe. See Joel Spolsky's excellent article about one way of doing
    that:

    Way back in September 1983, I started my first real job, working at Oranim, a big bread factory in Israel that made something like 100,000 loaves of bread every night in six giant ovens the size of…




    --
    Steven.

  • Aahz

    #2
    Re: OT Annoying Habits (Was: when format strings attack)

    In article <mailman.2916.1 169240529.32031 .python-list@python.org >,
    Carroll, Barry <Barry.Carroll@ psc.comwrote:
    >
    >Personally, I don't think top-posting is the most annoying newsgroup
    >habit. I think it's making a big fuss about minor inconveniences. =20
    Thing is, nobody will ignore your posts for following standard Usenet
    conventions, but some of us will definitely ignore your posts if you
    don't. It's your choice how much attention you want.
    --
    Aahz (aahz@pythoncra ft.com) <* http://www.pythoncraft.com/

    Help a hearing-impaired person: http://rule6.info/hearing.html

    Comment

    • Steven D'Aprano

      #3
      Re: OT Annoying Habits (Was: when format strings attack)

      On Fri, 19 Jan 2007 12:20:26 -0800, Carroll, Barry wrote:
      It took me about 3 seconds to realize that Mr. D'Aprano' Q&A session was
      laid out bottom-to-top instead of top-to-bottom. After that, it made
      perfect sense.
      Three seconds, compared to about thirty milliseconds if it were written in
      the normal fashion. That's an inefficiency of about two orders of
      magnitude. Multiply that by a few hundred news posts and emails that you
      might read in a day, and, well, I think that makes it a big deal. That
      means top posting is to effective communication what exchange-sort is to
      quicksort.

      I use the analogy advisably: just as there is overhead to quicksort that
      makes it slower for sufficiently small lists, so there is overhead to
      in-line posting that makes top posting easier for the reader under quite
      restricted circumstances: you're reading the posts in order, and the
      entire thread (or at least the relevant parts of it) are still in short
      term memory.
      While it was a excellent way to demonstrate his
      argument, it failed to prove his point, because, while top-to-bottom may
      be the way he reads things, it isn't the way _everyone_ reads things.
      There are, as far as I know, no human languages that write from the
      bottom of the page upwards.

      But even if there are such languages, we're on an English language
      newsgroup, not Martian, and so we should (whenever possibly) adapt English
      conventions.
      So, as far as I'm concerned, post your posts in whatever manner works
      for you. If it's in English, I'll figure it out. If not, well, there's
      always Babelfish. ;^)
      Or perhaps I should say:

      ..snoitnevnoc
      hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton ,puorgswen
      egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve tuB



      --
      Steven.

      Comment

      • gonzlobo

        #4
        Re: OT Annoying Habits (Was: when format strings attack)

        I should write a python script to read this. :)
        >.snoitnevnoc
        >hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton ,puorgswen
        >egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve tuB

        Comment

        • Hendrik van Rooyen

          #5
          Re: OT Annoying Habits (Was: when format strings attack)

          "Steven D'Aprano" <steve@REMOVE.T HIS.cybersource .com.auwrote:
          Or perhaps I should say:
          >
          .snoitnevnoc
          hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton ,puorgswen
          egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve tuB
          First I thought it was Welsh or Cornish or something.

          Then it was like being in my first year of school again-
          reading letter by letter. Never realised how difficult it is.

          I suppose it will improve with practice.

          - Hendrik

          Comment

          • Ben Finney

            #6
            Re: OT Annoying Habits

            "Hendrik van Rooyen" <mail@microcorp .co.zawrites:
            "Steven D'Aprano" <steve@REMOVE.T HIS.cybersource .com.auwrote:
            >
            .snoitnevnoc
            hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton ,puorgswen
            egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve tuB
            >
            First I thought it was Welsh or Cornish or something.
            >
            Then it was like being in my first year of school again-
            reading letter by letter. Never realised how difficult it is.
            >
            I suppose it will improve with practice.
            Alternatively, you could consider it to be an active impediment to
            understanding, which, no matter how convenient it may be for the
            person writing it, is against the norms of written English and
            inconsiderate of the reader.

            With that in mind, you might convince those who write their messages
            that way to conform to the norms of written English for the sake of
            communication.

            --
            \ "No wonder I'm all confused; one of my parents was a woman, the |
            `\ other was a man." -- Ashleigh Brilliant |
            _o__) |
            Ben Finney

            Comment

            • Dane Jensen

              #7
              Re: OT Annoying Habits (Was: when format strings attack)

              On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote:
              "Steven D'Aprano" <steve@REMOVE.T HIS.cybersource .com.auwrote:
              Or perhaps I should say:

              .snoitnevnoc
              hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton
              ,puorgswen egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve
              tuB
              >
              First I thought it was Welsh or Cornish or something.
              >
              Then it was like being in my first year of school again-
              reading letter by letter. Never realised how difficult it is.
              >
              I suppose it will improve with practice.
              Not to steer this topic even futher off topic, but this is something that's
              been on my mind lately...

              The biggest problem with it that the letters were forwards and not also
              backwards (and the parens). But then, it's my understanding that as a
              left-handed person, reading and writing backwards is far easier for me than
              for the majority that is right-handed. Have any other lefties found that the
              case?

              -Dane

              Comment

              • rzed

                #8
                Re: OT Annoying Habits (Was: when format strings attack)

                Dane Jensen <careo@fastmail .fmwrote in
                news:mailman.29 41.1169295400.3 2031.python-list@python.org :
                On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote:
                >"Steven D'Aprano" <steve@REMOVE.T HIS.cybersource .com.auwrote:
                Or perhaps I should say:
                >
                .snoitnevnoc
                hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM
                ton ,puorgswen egaugnal hsilgnE na no er'ew ,segaugnal hcus
                era ereht fi neve tuB
                >>
                >First I thought it was Welsh or Cornish or something.
                >>
                >Then it was like being in my first year of school again-
                >reading letter by letter. Never realised how difficult it is.
                >>
                >I suppose it will improve with practice.
                >
                Not to steer this topic even futher off topic, but this is
                something that's been on my mind lately...
                >
                The biggest problem with it that the letters were forwards and
                not also backwards (and the parens). But then, it's my
                understanding that as a left-handed person, reading and writing
                backwards is far easier for me than for the majority that is
                right-handed. Have any other lefties found that the case?
                How would anybody know? As a left-hander, I have found it easy
                enough to read backwards, but then, being left-handed forces a
                certain habit of adaptability in any case. Maybe that makes it
                easier to read backward, but that is not a task I'm often called
                on to do. It takes practice regardless.

                This subthread reminds me of my *highly secure* plaintext
                encryption system that would render the sentence

                <But even if there are such languages, we're on an English
                language newsgroup, not Martian, and so we should (whenever
                possibly) adapt English conventions>

                as

                <Sno itne vn ochsi lgn etpa daylbisso, pr'ev en eh Wdluohs
                ewosdnan aitramton, puo Rgswene, gau gn al hsilgn (enanoere
                wsegaugn) alhcu Seraere htfinevetub>

                I think it looks vaguely Esperantonic (Esperantoid? Esperantic?),
                if anything.

                --
                rzed

                Comment

                Working...