Skip to content

Repository of development projects which demonstrate various mini solutions to problems in various languages that demonstrate how the language is utilized.

Notifications You must be signed in to change notification settings

mrisher23/language_learning_exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Learning Exercises

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.

  1. Hello World

Create a program that prints "Hello World" to standard output.

  1. Comments

Create a runnable program that contains examples of different types of comments.

  1. Variables

Create a runnable program that initializes variables of all the built-in data types.

  1. Mathematical Operations

Create a runnable program that initializes several numerical variables and performs various mathematical operations on them showing the results.

  1. 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.

  1. 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.

  1. Arrays

Create a runnable program that initializes several arrays of different types and sizes. Demonstrate setting/getting the values of different elements.

  1. Loops

Create a runnable program that demonstrates the different looping mechanisms of the language.

  1. Functions

Create a runnable program that demonstrates executing functions. Show passing of parameters and providing return values.

  1. Recursion

Create a runnable program that demonstrates executing a recursive function and how parameters are managed between invocations.

  1. 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)

  1. 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.

  1. Project Organization

Create a runnable program that shows how a project should be organized to accommodate more complex project structure.

  1. 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.

  1. Automated Documentation

Create compilable codebase that contains automated documentation output for it.

  1. Logging

Create a runnable program that produces logging output instead of print statements.

  1. Exceptions

Create a runnable program that creates an exception and then handles the error.

  1. Files

Create a runnable program that demonstrates how to read and write a file.

  1. 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.

  1. Random

Create a runnable program that can generate random numbers from 0-1; from 0...N; non-normal distribution (if available)

  1. Time

Create a runnable program that gets the current timestamp; does math to compare, add, subtract times.

  1. Interactive STDIN/OUT

Create a runnable program that prompts for and receives input from STDIN.

  1. Formatted Output

Create a runnable program that prints formatted output for dates, numbers and padding for strings.

  1. String Manipulation

Create a runnable program that shows how to search a string, match against regex patterns, create substrings

  1. Structured File Parsing

Create a runnable program that can parse YAML, JSON, XML and properties file types.

  1. Sorting

Create a runnable program that performs a simple sort (manually) on a list of items.

  1. Sorting v2

Create a runnable program which uses a larger list of elements and built-in or external library to sort the elements.

  1. Simple Object

Create a simple object type that contains a few properties (variables) and several functions.

  1. Enumeration

Create an enumeration type.

  1. Advanced Objects

Create an object that has more advanced functionality

  1. Packaging

Create a project that can be packaged and distributed to a third party.

  1. Object to String

Create a project that demonstrates how an object can be converted to a string for printing or logging.

  1. Sorting Custom Objects

Create a runnable program that uses a custom object type and sorts it within a list type.

  1. Serializing Objects

Create a program that serializes a custom object type to one or more external formats: Binary, String, JSON, XML, etc.

  1. Inheritance
  2. Inheritance v2
  3. 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.

  1. Resource Files

Create a runnable program that is capable of accessing files that are included within its packaging.

  1. 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.

  1. Performance Monitoring
  2. Debugger
  3. Aspect Programming
  4. 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.

  1. HTTP
  2. HTTPS
  3. HTTP Mutual Authentication
  4. UI Application
  5. REST
  6. Large Numbers

Create a runnable program that demonstrates how to deal with large integer types or decimal values with high precision.

  1. Symmetric Encryption
  2. Asymmetric Encryption

About

Repository of development projects which demonstrate various mini solutions to problems in various languages that demonstrate how the language is utilized.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published