The Sample Programs READMEs Now Feature Missing Solutions

The Sample Programs READMEs Now Feature Missing Solutions Featured Image

Have you ever tried helping out the Sample Programs repo but wasn’t sure where to start? Well, hopefully we’ve solved that issue by including missing solutions in the READMEs for each programming language. I’m really excited about this feature, and I hope you are too!

Table of Contents

The History of the Sample Programs READMEs

Back in 2018, I launched the Sample Programs repo with the intent to learn about many different programming languages. As the repo grew, I began to think about ways to document those languages through GitHub’s README system. Early iterations of the READMEs included a list of implemented solutions for that language (e.g., Hello World in Python).

Over time, these READMEs included more and more information from fun facts about the language to language resources. I found this really cool because we basically had a growing collection of documentation for every language in the repo. Here’s a sample of what that looked like:

# Sample Programs in Python

Welcome to Sample Programs in Python! To find documentation related to the Python 
code in this repo, look [here][trc-python-docs].

## Sample Programs

Below, you'll find a list of code snippets in this collection.
Code snippets preceded by :warning: link to an article request 
issue while code snippets preceded by :white_check_mark: link
to an existing article which provides further documentation.

- :warning: [Baklava in Python][baklava-article-issue]
  - Solution borrowed from @erayak via the [baklava repo][baklava-repo]
- :white_check_mark: [Binary Search][binary-search-article]
- :white_check_mark: [Bubble Sort in Python][bubble-sort-article]
- :warning: [Capitalize in Python][capitalize-article-issue]
- :warning: [Convex Hull in Python][convex-hull-article-issue]
- :white_check_mark: [Even Odd in Python][even-odd-article]
- :white_check_mark: [Factorial in Python][factorial-article]
- :white_check_mark: [Fibonacci in Python][fibonacci-article]
- :white_check_mark: [File IO in Python][file-io-article]
- :white_check_mark: [Fizz Buzz in Python][fizz-buzz-article]
- :warning: [Game of Life in Python][game-of-life-article-issue]
- :white_check_mark: [Hello World in Python][hello-world-article]
- :white_check_mark: [Insertion Sort in Python][insertion-sort-article]
- :warning: [Job Sequencing with Deadlines in Python][job-sequencing-article-issue]
- :warning: [Longest Common Subsequence][lcs-article-issue]
- :warning: [Longest Palindromic Subsequence][lps-article-issue]
- :white_check_mark: [Merge Sort in Python][merge-sort-article]
- :warning: [Minimum Spanning Tree][minimum-spanning-tree-article-issue]
- :white_check_mark: [Prime Number in Python][prime-number-article]
- :white_check_mark: [Quick Sort in Python][quick-sort-article]
- :warning: [Quine in Python][quine-article-issue]
- :white_check_mark: [Reverse a String in Python][reverse-a-string-article]
- :white_check_mark: [Roman Numeral Conversion in Python][roman-numeral-article]
- :warning: [ROT-13 in Python][rot-13-article-issue]
- :white_check_mark: [Selection Sort in Python][selection-sort-article-issue]
- :warning: [Sleep Sort in Python][sleep-sort-article-issue]

## Fun Facts

- Debut: 1990
- Developer: Python Software Foundation
- Typing: Dynamic
- License: Python Software Foundation License
- [Zen of Python][zen-of-python]

## References

- [Python Wiki][python-wiki]
- [Python Docs][python-website]
- [Python REPL][python-online-repl]

[baklava-repo]: https://github.com/toturkmen/baklava
[python-online-repl]: https://repl.it/languages/python3
[python-website]: https://www.python.org/
[python-wiki]: https://en.wikipedia.org/wiki/Python_(programming_language)
[zen-of-python]: https://www.python.org/dev/peps/pep-0020/

[binary-search-article]: https://sample-programs.therenegadecoder.com/projects/binary-search/python/
[bubble-sort-article]: https://sample-programs.therenegadecoder.com/projects/bubble-sort/python/
[even-odd-article]: https://sample-programs.therenegadecoder.com/projects/even-odd/python/
[factorial-article]: https://sample-programs.therenegadecoder.com/projects/factorial/python/
[fibonacci-article]: https://sample-programs.therenegadecoder.com/projects/fibonacci/python/
[file-io-article]: https://therenegadecoder.com/code/file-io-in-python/
[fizz-buzz-article]: https://therenegadecoder.com/code/fizz-buzz-in-python/
[hello-world-article]: https://therenegadecoder.com/code/hello-world-in-python/
[insertion-sort-article]: https://sample-programs.therenegadecoder.com/projects/insertion-sort/python/
[merge-sort-article]: https://sample-programs.therenegadecoder.com/projects/merge-sort/python/
[prime-number-article]: https://sample-programs.therenegadecoder.com/projects/prime-number/python/
[quick-sort-article]: https://sample-programs.therenegadecoder.com/projects/quick-sort/python/
[reverse-a-string-article]: https://therenegadecoder.com/code/reverse-a-string-in-python/
[roman-numeral-article]: https://sample-programs.therenegadecoder.com/projects/roman-numeral-conversion/python/
[trc-python-docs]: https://sample-programs.therenegadecoder.com/languages/python/

[baklava-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/190
[capitalize-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/390
[convex-hull-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/391
[game-of-life-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/237
[job-sequencing-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/70
[lcs-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/90
[lps-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/392
[minimum-spanning-tree-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/393
[quine-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/223
[rot-13-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/305
[selection-sort-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/110
[sleep-sort-article-issue]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/394

However, eventually we launched a website which hosted a lot of the documentation for all of the languages. As a result, there was an overlap of content that became redundant. At the same time, I was finding it really challenging to ask folks to provide code snippets as well as update the READMEs when needed. As a result, I decided to automate them. Here’s a sample of what the automation looked like:

# Sample Programs in Python

Welcome to Sample Programs in Python! To find documentation related to the Python 
code in this repo, look [here](https://sample-programs.therenegadecoder.com/languages/python).
Otherwise, below you'll find a list of code snippets in this collection. 
Code snippets preceded by :warning: link to a GitHub 
issue query featuring a possible article request issue. If an article request issue 
doesn't exist, we encourage you to create one. Meanwhile, code snippets preceded 
by :white_check_mark: link to an existing article which provides further documentation.
    

- :warning: [Baklava in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+baklava+python)
- :white_check_mark: [Binary Search in Python](https://sample-programs.therenegadecoder.com/projects/binary-search/python)
- :white_check_mark: [Bubble Sort in Python](https://sample-programs.therenegadecoder.com/projects/bubble-sort/python)
- :warning: [Capitalize in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+capitalize+python)
- :warning: [Convex Hull in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+convex+hull+python)
- :white_check_mark: [Even Odd in Python](https://sample-programs.therenegadecoder.com/projects/even-odd/python)
- :white_check_mark: [Factorial in Python](https://sample-programs.therenegadecoder.com/projects/factorial/python)
- :white_check_mark: [Fibonacci in Python](https://sample-programs.therenegadecoder.com/projects/fibonacci/python)
- :white_check_mark: [File Io in Python](https://sample-programs.therenegadecoder.com/projects/file-io/python)
- :white_check_mark: [Fizz Buzz in Python](https://sample-programs.therenegadecoder.com/projects/fizz-buzz/python)
- :warning: [Fraction in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+fraction+python)
- :warning: [Game Of Life in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+game+of+life+python)
- :white_check_mark: [Hello World in Python](https://sample-programs.therenegadecoder.com/projects/hello-world/python)
- :white_check_mark: [Insertion Sort in Python](https://sample-programs.therenegadecoder.com/projects/insertion-sort/python)
- :warning: [Job Sequencing in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+job+sequencing+python)
- :warning: [Lcs in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+lcs+python)
- :white_check_mark: [Linear Search in Python](https://sample-programs.therenegadecoder.com/projects/linear-search/python)
- :warning: [Lps in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+lps+python)
- :white_check_mark: [Maximum Subarray in Python](https://sample-programs.therenegadecoder.com/projects/maximum-subarray/python)
- :white_check_mark: [Merge Sort in Python](https://sample-programs.therenegadecoder.com/projects/merge-sort/python)
- :warning: [Minimum Spanning Tree in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+minimum+spanning+tree+python)
- :white_check_mark: [Prime Number in Python](https://sample-programs.therenegadecoder.com/projects/prime-number/python)
- :white_check_mark: [Quick Sort in Python](https://sample-programs.therenegadecoder.com/projects/quick-sort/python)
- :warning: [Quine in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+quine+python)
- :warning: [Reverse String in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+reverse+string+python)
- :warning: [Roman Numeral in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+roman+numeral+python)
- :warning: [Rot 13 in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+rot+13+python)
- :white_check_mark: [Selection Sort in Python](https://sample-programs.therenegadecoder.com/projects/selection-sort/python)
- :warning: [Sleep Sort in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sleep+sort+python)

Now, I really liked this automated process because it meant we no longer had to ask folks to update the README. The repo would do that for them. Of course, as with many things in my life, I always want to keep improving them.

The Current Sample Programs README

These days, the Sample Programs README features additional sections for things like testing. In addition, I even included a credit line at the bottom of each README, so folks could use the tools to create their own READMEs. That said, the biggest update is the inclusion of missing code snippets. Here’s what the looks like today for the Python README (with a copy of the permalink to the rendered versionOpens in a new tab.):

# Sample Programs in Python

Welcome to Sample Programs in Python! To find documentation related to the Python code in this repo, look [here.](https://sample-programs.therenegadecoder.com/languages/python)

## Sample Programs List - 31/40 :smile:

In this section, we feature a list of completed and missing programs in Python. See above for the current amount of completed programs in Python. If you see a program that is missing and would like to add it, please submit an issue, so we can assign it to you.

### Completed Programs

Below, you'll find a list of completed code snippets in Python. Code snippets preceded by :warning: link to a GitHub issue query featuring a possible article request issue. If an article request issue doesn't exist, we encourage you to create one. Meanwhile, code snippets preceded by :white_check_mark: link to an existing article which provides further documentation. To see the list of approved projects, check out the official Sample Programs projects list.

- :warning: [Baklava in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+baklava+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/baklava)]
- :white_check_mark: [Binary Search in Python](https://sample-programs.therenegadecoder.com/projects/binary-search/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/binary-search)]
- :white_check_mark: [Bubble Sort in Python](https://sample-programs.therenegadecoder.com/projects/bubble-sort/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/bubble-sort)]
- :white_check_mark: [Capitalize in Python](https://sample-programs.therenegadecoder.com/projects/capitalize/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/capitalize)]
- :warning: [Convex Hull in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+convex+hull+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/convex-hull)]
- :white_check_mark: [Even Odd in Python](https://sample-programs.therenegadecoder.com/projects/even-odd/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/even-odd)]
- :white_check_mark: [Factorial in Python](https://sample-programs.therenegadecoder.com/projects/factorial/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/factorial)]
- :white_check_mark: [Fibonacci in Python](https://sample-programs.therenegadecoder.com/projects/fibonacci/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/fibonacci)]
- :white_check_mark: [File Io in Python](https://sample-programs.therenegadecoder.com/projects/file-io/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/file-io)]
- :white_check_mark: [Fizz Buzz in Python](https://sample-programs.therenegadecoder.com/projects/fizz-buzz/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/fizz-buzz)]
- :white_check_mark: [Fractions in Python](https://sample-programs.therenegadecoder.com/projects/fractions/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/fractions)]
- :warning: [Game Of Life in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+game+of+life+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/game-of-life)]
- :white_check_mark: [Hello World in Python](https://sample-programs.therenegadecoder.com/projects/hello-world/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/hello-world)]
- :white_check_mark: [Insertion Sort in Python](https://sample-programs.therenegadecoder.com/projects/insertion-sort/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/insertion-sort)]
- :warning: [Job Sequencing in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+job+sequencing+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/job-sequencing)]
- :warning: [Lcs in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+lcs+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/lcs)]
- :white_check_mark: [Linear Search in Python](https://sample-programs.therenegadecoder.com/projects/linear-search/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/linear-search)]
- :warning: [Lps in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+lps+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/lps)]
- :warning: [Maximum Array Rotation in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+maximum+array+rotation+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/maximum-array-rotation)]
- :white_check_mark: [Maximum Subarray in Python](https://sample-programs.therenegadecoder.com/projects/maximum-subarray/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/maximum-subarray)]
- :white_check_mark: [Merge Sort in Python](https://sample-programs.therenegadecoder.com/projects/merge-sort/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/merge-sort)]
- :warning: [Mst in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+mst+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/mst)]
- :warning: [Palindromic Number in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+palindromic+number+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/palindromic-number)]
- :white_check_mark: [Prime Number in Python](https://sample-programs.therenegadecoder.com/projects/prime-number/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/prime-number)]
- :white_check_mark: [Quick Sort in Python](https://sample-programs.therenegadecoder.com/projects/quick-sort/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/quick-sort)]
- :warning: [Quine in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+quine+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/quine)]
- :white_check_mark: [Reverse String in Python](https://sample-programs.therenegadecoder.com/projects/reverse-string/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/reverse-string)]
- :white_check_mark: [Roman Numeral in Python](https://sample-programs.therenegadecoder.com/projects/roman-numeral/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/roman-numeral)]
- :warning: [Rot 13 in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+rot+13+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/rot-13)]
- :white_check_mark: [Selection Sort in Python](https://sample-programs.therenegadecoder.com/projects/selection-sort/python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/selection-sort)]
- :warning: [Sleep Sort in Python](https://github.com//TheRenegadeCoder/sample-programs-website/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sleep+sort+python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/sleep-sort)]

### Missing Programs

The following list contains all of the approved programs that are not currently implemented in Python. Click on the name of the project to easily open an issue in GitHub. Alternatively, click requirements to check out the description of the project.

- :x: [Depth First Search](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Depth+First+Search+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/depth-first-search)]
- :x: [Dijkstra](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Dijkstra+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/dijkstra)]
- :x: [Duplicate Char Counter](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Duplicate+Char+Counter+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/duplicate-char-counter)]
- :x: [Import Export](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Import+Export+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/import-export)]
- :x: [Josephus Problem](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Josephus+Problem+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/josephus-problem)]
- :x: [Jump Search](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Jump+Search+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/jump-search)]
- :x: [Longest Word](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Longest+Word+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/longest-word)]
- :x: [Remove All Whitespace](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Remove+All+Whitespace+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/remove-all-whitespace)]
- :x: [Transpose Matrix](https://github.com/TheRenegadeCoder/sample-programs/issues/new?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+Transpose+Matrix+in+Python) [[Requirements](https://sample-programs.therenegadecoder.com/projects/transpose-matrix)]

## Testing

The following list shares details about what we're using to test all Sample Programs in Python.

- Docker Image: python
- Docker Tag: 3.7-alpine

See the [Glotter project](https://github.com/auroq/glotter) for more information on how to create a testinfo file.

---

This page was generated automatically by the Sample Programs READMEs tool. Find out how to support [this project](https://github.com/TheRenegadeCoder/sample-programs-readmes) on Github.

I love this new automated README because now folks can see progress for a particular language. For example, Python is currently sitting at 31/40 completed scripts. In the new missing programs section, you can see the 9 scripts that are missing, and you can even click the name of the project to open an issue for it. Now, I’ll no longer have to direct folks to the official list of projects. They’re all right there in the README. No more confusion!

How README Automation Works

If the automation itself isn’t all that interesting to you, perhaps knowing how they’re generated will get your attention. In short, I created two libraries that suit my needs: SnakeMDOpens in a new tab. and SubeteOpens in a new tab.. SnakeMD is the library I created to render markdown using Python and Subete is the library I created to browse the code snippets in the Sample Programs repo.

Together, we can use SnakeMD and Subete to browse the Sample Programs repo and generate the READMEs. It seems sort of obvious, but that’s how these READMEs are put together. Interestingly, if you want to see how this actually happens, you can check out the library that does it all: RonbunOpens in a new tab.. There you’ll see exactly how I make use of Subete and SnakeMD. Here’s a little snippet for context:

def _build_readme(self, language: LanguageCollection) -> None:
    """
    Creates a README page from a language collection.
    :param language: a programming language collection (e.g., Python)
    :return: None
    """
    page = Document("README")

    # Introduction
    page.add_header(f"Sample Programs in {language}")
    page.add_element(_get_intro_text(language))

    # Sample Programs Section
    program_list = _generate_program_list(language)
    page.add_header(_generate_program_list_header(
        language.total_programs(),
        self.repo.total_approved_projects()),
        level=2
    )
    page.add_paragraph(
        f"""
        In this section, we feature a list of completed and missing programs in {language}. See above for the
        current amount of completed programs in {language}. If you see a program that is missing and would like to 
        add it, please submit an issue, so we can assign it to you. 
        """.strip()
    )

    # Completed Programs List
    page.add_header("Completed Programs", level=3)
    page.add_paragraph(
        f"""
        Below, you'll find a list of completed code snippets in {language}. Code snippets preceded by :warning: 
        link to a GitHub issue query featuring a possible article request issue. If an article request issue 
        doesn't exist, we encourage you to create one. Meanwhile, code snippets preceded by :white_check_mark: 
        link to an existing article which provides further documentation. To see the list of approved projects, 
        check out the official Sample Programs projects list. 
        """.strip()
    ).insert_link("Sample Programs project list", "https://sample-programs.therenegadecoder.com/projects/")
    page.add_element(MDList(program_list))

    # Missing Programs List
    missing_programs_list = _generate_missing_program_list(str(language), language.missing_programs())
    page.add_header("Missing Programs", level=3)
    page.add_paragraph(
        f"""
        The following list contains all of the approved programs that are not currently implemented in {language}.
        Click on the name of the project to easily open an issue in GitHub. Alternatively, click requirements
        to check out the description of the project. 
        """.strip()
    )
    page.add_element(MDList(missing_programs_list))

    # Testing
    page.add_header("Testing", level=2)
    test_data = language.testinfo()
    if not test_data:
        page.add_paragraph(
            """
            This language currently does not feature testing. If you'd like to help in the efforts to test all of 
            the code in this repo, consider creating a testinfo.yml file with the following information:
            """
        )
        page.add_code("folder:\n  extension:\n  naming:\n\ncontainer:\n  image:\n  tag:\n  cmd:", lang="yml")
    else:
        page.add_paragraph(
            f"The following list shares details about what we're using to test all Sample Programs in {language}."
        )
        page.add_unordered_list([
            f"Docker Image: {test_data['container']['image']}",
            f"Docker Tag: {test_data['container']['tag']}"
        ])
    glotter = page.add_paragraph("See the Glotter project for more information on how to create a testinfo file.")
    glotter.insert_link("Glotter project", "https://github.com/auroq/glotter")
    page.add_horizontal_rule()
    page.add_element(_generate_credit())

    self.pages[language.pathlike_name()] = page

It’s not super pretty, but it gets the job done. When all is said and done, we commit the new READMEs back to the Sample Programs repo using GitHub Actions. If you’re interested in doing anything like this yourself, let me know! I’ll write a more detailed explanation.

What Else Would You Like to See in a README?

As always, I’m open to expanding the current features in the README. That’s the beauty of automation. Perhaps some day I’ll put together some data visualization that can go in the READMEs. That would make me very happy inside.

With that said, that’s all I have today. If you’re interested in sticking around, check out some of the following articles:

Likewise, here are some resources for folks getting into Python (#ad):

Otherwise, take care! See you next time.

Sample Programs Repo News (16 Articles)—Series Navigation

Everyone once in awhile, I like to update y’all on what’s going on in the Sample Programs repo. At this point, I’ve written quite a few updates, so I figured it might be helpful to group them as a series.

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife, playing Overwatch and Phantasy Star Online 2, practicing trombone, watching Penguins hockey, and traveling the world.

Recent Posts