I would like to make my programs much less of a hassle to extend or create, I am imagining a scenario where the end user has a variety of check box options that affect how the program interacts. Something like in a word processor where you say underline, or bold, or to a game where you say, include this feature exclude that one. Just options in general. How does one create dynamic options that modify the programs behavior without making the program dependent on that feature should one decide to remove that option completely? And what is this type of programming called?Does one use global variables, (despite some languages suggesting otherwise)I guess maybe an alternative (metaphorical) way to form this question would be: How do I make my code look more like lego blocks and less like one of those wooden three dimensional puzzles?Example you can use: Deck of cards, options to remove all the jacks, or all the kings.
Linking a modular option to a program without creating a dependence
programming practices
It's called a plugin/hook architecture.  It's very common for content management systems, bug trackers, and version control software.  Basically, instead of making direct dependencies, you let plugins register callbacks that get called at certain points, called hooks.  For example, a lot of source control software lets you register pre-commit hooks.  Whenever someone is about to make a commit, the source control software calls all the registered callbacks for the pre-commit hook.  It passes things like the commit message as arguments.  If any of the callback functions return false, it won't allow the commit.  This lets a customer write a plugin that requires certain information in the commit message without having to change the core software.