OT Annoying Habits (Was: when format strings attack)

Discussion in 'Python' started by Carroll, Barry, Jan 19, 2007.

  1. 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

    541-302-1107
    ________________________
    We who cut mere stones must always be envisioning cathedrals.

    -Quarry worker's creed


    > -----Original Message-----
    > From: Steven D'Aprano [mailto:]
    > Sent: Friday, January 19, 2007 11:30 AM
    > To:
    > 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:
    >
    > http://www.joelonsoftware.com/articles/Wrong.html
    >
    >
    >
    > --
    > Steven.
    >
     
    Carroll, Barry, Jan 19, 2007
    #1
    1. Advertising

  2. Carroll, Barry

    Aahz Guest

    In article <>,
    Carroll, Barry <> wrote:
    >
    >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 () <*> http://www.pythoncraft.com/

    Help a hearing-impaired person: http://rule6.info/hearing.html
     
    Aahz, Jan 19, 2007
    #2
    1. Advertising

  3. 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.
     
    Steven D'Aprano, Jan 20, 2007
    #3
  4. Carroll, Barry

    gonzlobo Guest

    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
     
    gonzlobo, Jan 20, 2007
    #4
  5. "Steven D'Aprano" <> wrote:

    > 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
     
    Hendrik van Rooyen, Jan 20, 2007
    #5
  6. Carroll, Barry

    Ben Finney Guest

    Re: OT Annoying Habits

    "Hendrik van Rooyen" <> writes:

    > "Steven D'Aprano" <> wrote:
    >
    > > .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
     
    Ben Finney, Jan 20, 2007
    #6
  7. Carroll, Barry

    Dane Jensen Guest

    On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote:
    > "Steven D'Aprano" <> wrote:
    > > 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
     
    Dane Jensen, Jan 20, 2007
    #7
  8. Carroll, Barry

    rzed Guest

    Dane Jensen <> wrote in
    news::

    > On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote:
    >> "Steven D'Aprano" <> wrote:
    >> > 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
     
    rzed, Jan 20, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nils Weisensee

    IE interpretation habits...

    Nils Weisensee, Mar 4, 2005, in forum: HTML
    Replies:
    3
    Views:
    437
    Jan Faerber
    Mar 6, 2005
  2. Replies:
    9
    Views:
    345
  3. Carroll, Barry
    Replies:
    7
    Views:
    259
    Dennis Lee Bieber
    Jan 20, 2007
  4. Carroll, Barry
    Replies:
    2
    Views:
    265
    Neil Cerutti
    Jan 20, 2007
  5. Replies:
    32
    Views:
    1,050
    Andrea Francia
    Nov 10, 2008
Loading...

Share This Page