Foo, Bar, and Baz: Not Having It

Posted: April 23, 2012 Comments(2)

Foo, Bar, and Baz: Not Having It | The Lingua Pragma Blog.

I never really went public with this, but I always felt inferior when I read sample code containing all sorts of foos, bars, and widgets (not WordPress Widgets). Nothing seemed to have context. I’m really glad to read that I’m not the only one.

This was especially difficult when learning about object oriented programming. Instead of reading about a cup that had a color blue and was empty, it was trying to figure out that a widget had a foo that was bar. I’m not really sure of the history behind the convention, but reading more contextual examples is always so much more valuable to me in comparison.

Get my newsletter

Receive periodic updates right in the mail!
  • This field is for validation purposes and should be left unchanged.

Comments

  1. Ugh, yes. The other week I was researching .NET unit testing frameworks. Which of these makes for more helpful documentation? Which of these do you think I ended up using?

    Rhino:

    stubUserRepository.Stub(x => x.GetUserByName(“ayende”)).Return(theUser);

    Moq:

    mock.Setup(foo => foo.TryParse(“ping”, out outString)).Returns(true);

Leave a Reply

Your email address will not be published.