Repository of development projects which demonstrate various mini solutions to problems in various languages that demonstrate how the language is utilized.
Always review the code you are running before executing it. These examples are intended for learning purposes, but you are running other people's code on your machine which may do harmful things. We try to review all code before it is accepted but cannot ensure its safety every time
This project is not open for public submission just yet. Once the objectives of each exercise are more clearly defined and ordered it will be opened up for public contribution. There will be strict commenting and compilation requirements so others may learn from the submitted examples.
For any particular problem there are going to be a large number of possible solutions. The goal is to demonstrate core language features and best practices. For some projects where there are multiple, equally valid solutions which cannot exist within the same project the folders should be named:
1a Project Name 1b Project Name 1c Project Name
The following objectives should be addressed where it is applicable to the language being demonstrated. Comments should be included which clearly show how the objective works. Include instructions on how to compile/run the example.
- Hello World
Create a program that prints "Hello World" to standard output.
- Comments
Create a runnable program that contains examples of different types of comments.
- Variables
Create a runnable program that initializes variables of all the built-in data types.
- Mathematical Operations
Create a runnable program that initializes several numerical variables and performs various mathematical operations on them showing the results.
- Conditionals
Create a runnable program that has multiple execution paths based on simple or complex conditions. Show if, if/else, nested ifs, and switch statements as possible.
- Type Conversion
Create a runnable program and initializes variables of all the built-in types and converts them to any of the other built-in types as possible.
- Arrays
Create a runnable program that initializes several arrays of different types and sizes. Demonstrate setting/getting the values of different elements.
- Loops
Create a runnable program that demonstrates the different looping mechanisms of the language.
- Functions
Create a runnable program that demonstrates executing functions. Show passing of parameters and providing return values.
- Recursion
Create a runnable program that demonstrates executing a recursive function and how parameters are managed between invocations.
- Command-line Arguments
Create a runnable program that accepts arguments from the command-line invocation. Do not rely on external libraries to implement (does not need to be robust, error tolerant)
- Environment Variables
Create a runnable program that accesses environment variables (e.g. $PATH) or built-in globals. Demonstrate the ability to create global variables within your own programs.
- Project Organization
Create a runnable program that shows how a project should be organized to accommodate more complex project structure.
- Import Libraries
Create a runnable program that pulls in code from an external provider. Show how to get the code, where it comes from, and how to invoke it.
- Automated Documentation
Create compilable codebase that contains automated documentation output for it.
- Logging
Create a runnable program that produces logging output instead of print statements.
- Exceptions
Create a runnable program that creates an exception and then handles the error.
- Files
Create a runnable program that demonstrates how to read and write a file.
- Command-line Arguments v2
Create a runnable program that accepts command-line arguments that uses flags and validates required parameters and argument types. May use external library to facilitate the advanced parsing.
- Random
Create a runnable program that can generate random numbers from 0-1; from 0...N; non-normal distribution (if available)
- Time
Create a runnable program that gets the current timestamp; does math to compare, add, subtract times.
- Interactive STDIN/OUT
Create a runnable program that prompts for and receives input from STDIN.
- Formatted Output
Create a runnable program that prints formatted output for dates, numbers and padding for strings.
- String Manipulation
Create a runnable program that shows how to search a string, match against regex patterns, create substrings
- Structured File Parsing
Create a runnable program that can parse YAML, JSON, XML and properties file types.
- Sorting
Create a runnable program that performs a simple sort (manually) on a list of items.
- Sorting v2
Create a runnable program which uses a larger list of elements and built-in or external library to sort the elements.
- Simple Object
Create a simple object type that contains a few properties (variables) and several functions.
- Enumeration
Create an enumeration type.
- Advanced Objects
Create an object that has more advanced functionality
- Packaging
Create a project that can be packaged and distributed to a third party.
- Object to String
Create a project that demonstrates how an object can be converted to a string for printing or logging.
- Sorting Custom Objects
Create a runnable program that uses a custom object type and sorts it within a list type.
- Serializing Objects
Create a program that serializes a custom object type to one or more external formats: Binary, String, JSON, XML, etc.
- Inheritance
- Inheritance v2
- Automated Testing
Create a project that uses automated testing to validate the functionality of the program. Attempt to include unit and integration tests where mocking of external resources is used.
- Resource Files
Create a runnable program that is capable of accessing files that are included within its packaging.
- Threading
Create a runnable project that uses multiple threads which demonstrate how to start a thread, block on critical code sections, detect when threads are completed.
- Performance Monitoring
- Debugger
- Aspect Programming
- Database
Create a runnable program that connects to a database (provided by Docker) where it loads data and queries the database and iterates through the results.
- HTTP
- HTTPS
- HTTP Mutual Authentication
- UI Application
- REST
- Large Numbers
Create a runnable program that demonstrates how to deal with large integer types or decimal values with high precision.
- Symmetric Encryption
- Asymmetric Encryption