Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 59921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:04:52+00:00 2026-05-10T18:04:52+00:00

This was something originally discussed during a presentation given by Charles Brian Quinn of

  • 0

This was something originally discussed during a presentation given by Charles Brian Quinn of the Big Nerd Ranch at acts_as_conference. He was discussing what he had learned from instructing a Ruby on Rails Bootcamp to many people both new to programming and new to Rails.

One particular slide that stood out was along the lines of never using foo and bar as examples when trying to teach someone to program. His reasoning was very simple.

Which is easier to understand?

baz = foo + bar 

or

answer = first_number + second_number 

It’s happened many times myself when explaining something and I immediately jump to the go to foo bar placeholders but then realize my mistake and make the example make a lot more sense by using a real world scenario.

This is especially applicable when trying to teach someone who has had no programming exposure and you end up needing explain foo and bar before explaining what you’re actually trying to teach.

However, using foo and bar for experienced programmers seems OK, though I personally think, along with Charles, that it’s something that needs to change.

A quick SO search for ‘foo’ returns over 20 pages of results with foo being used in more ways that I can comprehend. And in some cases where I’m reading a question on a particular language and I’m doing so to help understand that language better. If applicable variable names are used instead of foo and bar, it makes it much easier to understand and interpret the problem. So for seasoned developers, the construct seems a bit flawed as well.

Is this a habit that will ever be able to be kicked? Why do you choose to foo bar or to not foo bar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:04:52+00:00Added an answer on May 10, 2026 at 6:04 pm

    It strictly depends on what are you trying to teach. Sometimes, when showing a programming example, you have to declare a few things just for the snippet to be ‘complete’, and those few things are not the core of what you are showing.

    For example, if you want to show how to throw an exception, I believe it is ok to present a snippet like

    public void foo() {      // Do some things     if (errorCondition) {       throw new Exception('Error message');    }  } 

    Since the point in it is showing exceptions, there is no point in caring about the method name, so foo is ‘legal’ in this context, or at least for me.

    What I would not accept (in this same example) would be

    public void foo() {      // Do some things     if (bar) {       throw new Exception(baz);    }  } 

    as it is obscuring what you are trying to teach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 97k
  • Answers 97k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I've had subversion corrupt repos on me. However, I should… May 11, 2026 at 7:29 pm
  • Editorial Team
    Editorial Team added an answer I figured it out! All I had to do was… May 11, 2026 at 7:29 pm
  • Editorial Team
    Editorial Team added an answer What do you expect to happen in it's place? The… May 11, 2026 at 7:29 pm

Related Questions

When I create a view in SQL Server 2005 and someone later opens it
I have a a strange problem with nuke modules i've been developing for a
I've got a very simplistic game set up on the iPhone. Things move around,
This originally was a problem I ran into at work, but is now something

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.