Your thoughts on a Rosetta Code like project for users to learn common programming languages and have reference implementations on their local computer.

3    26 Apr 2016 22:19 by u/Clueless-Joe-Jackson

I would like to re-familiarize myself with coding, and get up to speed with common languages. I am already familiar with how to program, but I am very rusty on language syntax. I wanted to find a project that could 1) be a general language reference I could keep on my local PC and 2) have problems that I could work through to learn several common languages.

So I created a project called [punchcards](https://github.com/CluelessCodeJackson/punchcards), It is in very early stages, and if I can find a similar existing project I'll use it.

The project will contain folders of both reference implementations of those language in a source code file as well as source code files with the actual code stripped away that users can use to practice on.

For example, I started working on [HelloWorld](https://github.com/CluelessCodeJackson/punchcards/tree/master/1-helloworld). You will notice there are two files for Python3, python3-helloworld.py and python3-helloworld-ref.py The file [python3-helloworld-ref.py](https://github.com/CluelessCodeJackson/punchcards/blob/master/1-helloworld/python3-helloworld-ref.py) version of the file contains a working source code file that can be run and prints "Hello World". The file [python3-helloworld.py](https://github.com/CluelessCodeJackson/punchcards/blob/master/1-helloworld/python3-helloworld.py) is the same file above minus the actual code. This allows the user to practice filling in the code and see if it runs, and referring to the reference implementation if they need to.

Following the HelloWorld folder, the next set of folders would then contain source code files that cover the language syntax to accomplish those tasks (math operations, arrays, program control), and moving into more complex topics like sorting algorithms.

It would then finish with a few folders containing different short programming challenges that a user could then use to practice on.. For instance I worked on is [FizzBuzz](https://github.com/CluelessCodeJackson/punchcards/tree/master/l-shortchallenges/FizzBuzz). Here I have one version in powershell that is a [working version](https://github.com/CluelessCodeJackson/punchcards/blob/master/l-shortchallenges/FizzBuzz/powershell-fizzbuzz-ref.ps1). And another version with the [code stripped out](https://github.com/CluelessCodeJackson/punchcards/blob/master/l-shortchallenges/FizzBuzz/powershell-fizzbuzz.ps1).

The goal would be that if a person were to work through all of the code for a particular language, they would have a pretty solid foundation for writing in that language. In addition, if they ever forgot how to do something they could quickly look up an example on their local PC.

I would like to hear your thoughts on this. Am I just spinning my wheels on something like this? Does it have some potential that others may fine useful?

2 comments

1

I feel generally positive about this. As long as you find it useful I say keep going with it. Will you continue communicating about it here?

0

Cool idea.

I'd go a little further than Hello World possibly a simple form that saves to a DataBase. This would be:

What's you name? Hello not World but Hello Name!

I recommend this because it covers the most basic functionality of programs.

The next step up would be: apples or oranges.

Which do you prefer? Apples or Oranges?

You prefer Oranges. That's ok too!

This second step would allow you to build an array, save the choice and display it.

Another much more concept of consider is design patterns. Getting a simple grasp of these patterns is difficult because of how they are worded. Provide a simple example for each and that alone would draw a lot of attention to what you are doing.

Check out Laracasts for the Laravel framework. There are a lot of videos that you could look to for how that person approached a lot of issues that most programmers have. Even though that site is for php and Laravel a lot of the material should crossover conceptually.