Inherently, they aren't bad, but generally you'll be working on a project with multiple people and everyone doesn't know your thought process like you. Another rule of thumb is to keep scope as small as possible. This allows for more efficient bug hunting. If you get an error, wrong result, etc... you can quickly narrow it down to a module or function to step through to figure out what the issue is. With a global variable, it could be modified anywhere, so the hunting takes longer.