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 foo
s, bar
s, and widget
s (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.
Comments
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);
Amen brother!