Skip to content

remove all "foos" and "bars" #261

Open

Description

@timruffles

foos and bars are horrible in example code as it gives no context on why you'd do something.

Activity

  1. dashed commented on Dec 18, 2014

    @dashed
  2. timruffles commented on Dec 18, 2014

    @timruffles
    CollaboratorAuthor

    ?

  3. chrisranderson commented on Feb 7, 2015

    @chrisranderson

    Agreed. They could at least be named "some" and "another" so it's easier to remember which function or variable is which. "first" and "second" could work too.

    Foo and bar just add mental strain to the examples:
    var foo = {name: 'kitten'}
    foo.name; // kitten
    foo['name']; // kitten

    var get = 'name';
    foo[get]; // kitten

    foo.1234; // SyntaxError
    foo['1234']; // works

    Why would you ever name foo kitten? It makes it harder to remember what's going on. Easier to use var person, and person.name. If you keep to a theme throughout the document I bet it would erase a lot of the foo bar overhead.

  4. hugotox commented on May 29, 2015

    @hugotox
    Contributor

    foo and bar are specially confusing for non english speakers (like me) because we can't translate/understand these words

  5. timruffles commented on Sep 29, 2015

    @timruffles
    CollaboratorAuthor

    Still a long way to go:

    $ ack -hc '\b(foo|bar|baz|qux)\b' doc/en/
    164
  6. roccomuso commented on Nov 3, 2015

    @roccomuso
    Contributor

    Totally Agree.

  7. timruffles commented on Nov 4, 2015

    @timruffles
    CollaboratorAuthor

    PRs would be gratefully accepted on this one. Puns win extra points.

    On Tue, Nov 3, 2015 at 9:28 PM, Rocco Musolino notifications@github.com
    wrote:

    Totally Agree.

    —
    Reply to this email directly or view it on GitHub
    #261 (comment)
    .

  8. siddharthkp commented on Oct 9, 2017

    @siddharthkp
    Contributor

    My tiny contribution: #373

  9. alieldeba commented on Oct 18, 2022

    @alieldeba

    agreed with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions