/sample-programs-template

Track your own learning with this Sample Programs template

Primary LanguagePythonMIT LicenseMIT

Sample Programs Template

Since early 2018, I've been managing a repository called Sample Programs. The goal of that project was to create a repository containing as many code snippets in as many programming languages as possible. As the repo grew, we added many features to it including automated testing, README generation, and wiki generation. All of that comes together now in a template where you can implement solutions in whatever programming languages you like. Feel free to use this template to track your learning or demonstrate your knowledge. It may well serve as a solid portfolio for you someday. If you have any questions about how to use this template, check out the contributing document in the Sample Programs repo. With that said, let's talk about what this template supports.

Programming Languages

Unlike the Sample Programs repo, the Sample Programs template repo only supports languages with an official Docker image for testing. As a result, here is the official list of supported programming languages:

Language Documentation Image Naming Convention
C Documentation gcc hyphen
C ++ Documentation gcc hyphen
Go golang hyphen
Java Documentation openjdk pascal
Python Documentation python underscore
Ruby Documentation ruby hyphen

In the table above, you might have noticed the naming convention column. The terms in that column indicate the expected naming convention of the code files for the associated language. For example, files in Java are expected to be named in pascal case (e.g., HelloWorld.java). Below you'll find a list of all the possible naming conventions with examples:

  • hyphen (default): hello-world.lang
  • pascal: HelloWorld.lang
  • underscore: hello_world.lang

See the default naming convention column in the projects table below for the proper naming convention for each project.

Projects

Like the Sample Programs repo, the Sample Programs template repo only supports projects that have documentation and testing. As a result, here is the official list of supported projects:

Project Requirements Default Naming Convention
Baklava Requirements baklava
Binary Search Requirements binary-search
Bubble Sort Requirements bubble-sort
Capitalize Requirements capitalize
Convex Hull Requirements convex-hull
Even/Odd Requirements even-odd
Factorial Requirements factorial
Fibonacci Requirements fibonacci
File IO Requirements file-io
Fizz Buzz Requirements fizz-buzz
Hello World Requirements hello-world
Insertion Sort Requirements insertion-sort
Job Sequencing Requirements job-sequencing
Longest Common Subsequence Requirements lcs
Longest Palindromic Substring Requirements lps
Linear Search Requirements linear-search
Merge Sort Requirements merge-sort
Minimum Spanning Tree Requirements mst
Palindromic Numbers Requirements palindromic-number
Prime Numbers Requirements prime-number
Quine Requirements quine
ROT-13 Requirements rot-13
Reverse a String Requirements reverse-string
Roman Numeral Conversion Requirements roman-numeral
Selection Sort Requirements selection-sort
Sleep Sort Requirements sleep-sort

As always, if you're interested in how this projects are tested, check out the official documentation.