FooBar or FizzBuzz Discombobulation

I saw many programmers creating tutorials for other programmers using these short and funny names for functions, classes, methods etc. I would consider it as a bad practice in general.

Let me explain why.

Here is an example showing binding data and methods to a class which is a part of encapsulation in OOP: 

If I write a comment to this code “Foo can change _bar using Fizz() and Buzz()” it will sound like gibberish but “Car can change _velosity using Accelerate() and Decelerate()” is actually make sense.

One could disagree and say that sometime we need a full abstraction from real world. True, but the solution was already invented in Algebra. There are x and y for you.  

Ask yourself what code you would like to review. The one containing meaningful names or the one that full of Fizz, Buzz and Fizzbuzz?…

Summary

I think using FooBar or FizzBuzz naming in tutorials is a bad idea. It makes more confusion than fun

Leave a Reply

Your email address will not be published. Required fields are marked *