Code examples are generally succinct but fully functional applications. All development tutorials involving code should have a matching example that is available for reference or download. Smaller snippets of the example code are then used in the tutorial to guide a developer through the steps to complete the application.
More fully-featured and less succinct examples may be alternatively called a demo. The purpose of a demo may be as more of a showcase for what can be achieved, or accompany an article, and a corresponding tutorial might not be a necessity. However, the code can still provide value as a reference tool for developers, even without any article or tutorial that references it.
As with API documentation, examples should be written with meterify in mind, such as naming conventions. This may primarily come up with variables. To maintain consistency, all examples should use the following for including the necessary dependencies: