Code Monkey home page Code Monkey logo

teachcode's Introduction

teachcode

A tool to develop and improve a student’s programming skills by introducing the earliest lessons of coding.

Build Status npm version Downloads PRs Welcome code style: prettier Mentioned in Awesome-VuePress Follow on Twitter

Buy Me a Coffee


Chat: Telegram

Donate: PayPal, Patreon

Installation

npm install -g teach-code

How to use

Users are required to solve 30 tasks that take them through the basic constructs of the programming language of their choice. The tasks are designed in such a way that the complexity increases as users progress through the tasks. One can't move forward until the current task is completed. Previously submitted tasks can be viewed if he/she wants but can't be worked on again.

  • teachcode expects you to have a GitHub account. Make sure that you create one if you don't have one. Learn more - Github Signup
  • Navigate to the directory of your choice and type in teachcode init.
  • Choose your track. Currently, we provide two tracks, Python and Javascript
  • Enter your name. We ask for your name mainly for greeting purpose.
  • Enter your GitHub username.
  • Enter your GitHub personal token with repo access. Learn more - GitHub Personal Token
  • Now type in cd teachcode-solutions.
  • Type in teachcode fetchtask.
  • Hurray 🎉 you've got your first task.
  • Type in your solution for the task in the file task1.py (opted learning track) using any code editor of choice. We recommend using VS Code
  • Now type in teachcode submit to submit your solution.
  • Enter your Git credentials when prompted. Learn more - Git Credentials
  • Fetch the next task with teachcode fetchtask.

Available Commands

command description
teachcode init Initializes all the tasks
teachcode fetchtask [key] Fetches the task correponding to the key if provided (defaults to the very next task)
teachcode submit Submits the current task
teachcode showkeys Lists all the keys associated with the submitted tasks

Contributing

Contributions of any kind are welcomed. Make sure that you go through these guidelines.

How should I write a commit message?

This project uses Commitlint to check if the commit messages meet the conventional commit format.

The full pattern is:

type(scope?): subject #scope is optional

body? #body is optional

footer? #footer is optional

Following that pattern, your commit messages should look like these:

feat: activate open collective
chore: correct typo

It should be "guest" and not "gest"
refactor(cli): drop support for node 6

BREAKING CHANGE: you will need to update your node version to keep using this CLI
This closes #123

How should I name my branches?

Prefix your branch names with feat/, docs/ or hotfix/ for feature proposals, documentation and bug fixes, respectively.

License

Licensed under GNU General Public License V3.0.

teachcode's People

Contributors

abhijithneilabraham avatar abhijithvijayan avatar ajomadlabs avatar albinj12 avatar amalj07 avatar annu12340 avatar bdcorps avatar bossbossk20 avatar cazaimi avatar coderaiser avatar dependabot-preview[bot] avatar dependabot[bot] avatar himankpathak avatar jamesgeorge007 avatar jamesjose03 avatar lapinolapidus avatar laurenoutloud avatar rishabhkalakoti avatar ritu7488 avatar sandeepsj avatar sneha-santhosh avatar sreeram-venkitesh avatar ssmale avatar tisoap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

teachcode's Issues

hola estoy probando y luego elimino el issue

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

feat: fetch latest task

Problem
To get the next task, the user first has to go through the keys to get the latest one and paste it with the fetchtask command. Doing it for each task is not really necessary.

Proposed solution
Configure fetchtask to fetch the latest task when no argument is provided

Open to discussion

closed by #57

Edits

Move task-12 to 14,
Move task 13 and 14 to 12 and 13

Unable to init teachcode on Windows Platform

Describe the bug
Unable to init teachcode in Windows.

To Reproduce

N/A
Expected behavior
Teachcode should have created the directory and start running.
Screenshots
Screenshot (27)

Environment Information

OS: Windows 10
Additional context
N/A

Include Golang challenges

Include challenges for Golang by which the users can familiarise themselves with the basic language constructs.

No "initital key" to grab exists!

Describe the bug
After typng in cd teachcode-solutions and being at the CL prompt in that subdir, there is no <key> of any kind to fetch with the teachcode fetchtask <key> command.

Furthermore, when I type teachcode showcommands , I get the following error message:
Config file doesn't exist!

To Reproduce
I am able to reproduce this behavior again and again, just by following the instructions.

Expected behavior
I expected to be presented with a key (though I have no idea what it would be....an integer like "1", maybe?

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Information
I am in using Gnome on Manjaro Linux

Additional context
Add any other context about the problem here.

feat: Include dart challenges

Is your feature request related to a problem? Please describe.
Since the app currently only supports python and javascript. It would be better if the app contains tutorials for multiple languages.

Describe the solution you'd like
I would like to add tasks for dart language

Describe alternatives you've considered
N/A

Additional context
N/A

Better explain the purpose behind creating a personal access token

Describe the bug
The only instructions for creating the access token are here, on github, but they aren't definitive. For example, step 7 under "creating a token" says "Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo." -> And there's an image of 9 checkboxes you can choose from (plus sub-checkboxes).

Additionally, to an outside observer (with very little experience in the realm of personal access tokens) I am a bit wary of creating something that seems to resemble a private key (which should be kept very private) and inserting it into a program I want to test out, for the sake of "Resume Anytime - All completed tasks are pushed to a remote repository which makes it easier to track the user progress." - Can you clarify the purpose of the personal access token and how it's safe (if it is) to enter into your program? :)

To Reproduce
Open browser to read instructions? -> Yes

Expected behavior
Show clearer steps somewhere for creating the token + clearly describe how it's not a risk to enter your "personal access token" into this software.

Screenshots
N/A (if my explanation above isn't clear, I can try to send screenshots)

Environment Information
N/A

Additional context
I am currently teaching some students how to code and I'd love if they could not be scared of the terminal, so I'm super interested in this project!

Drop showcommands

The help information is adequate and it makes no sense to have another command that displays the same information thereby adding to the bundle size.

Include JavaScript challenges

As the next major update include challenges for JavaScript covering all the syntax part with strict emphasis for Es6.

will it not be better to create a web-app using React or other frameworks over the CLI?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

fix: update readme

Readme Update

Currently the readme does not explain clearly about the steps on How to use teachcode cli properly. This can cause serious trouble for beginners who are trying to write code for the first time.

Adopt commitlint standards

We're gonna follow commitlint standards while framing up the commit messages.
Refer these guidelines.

  • install commitlint-cli as a dev-dependency.
  • configure pre-commit hook with husky.
  • update docs to include a dedicated section regarding how to write commit messages based on the standards.

migrate to GitHub Actions

Do you want to request a feature or report a bug?

Request E2E and Linting as CI/CD

What is the current behavior?

No automated CI/CD action occurs.

What is the expected behavior?

As somebody opens a PR or commits against a branch, run the linting and E2E testing as per Issue #28 using GitHub action

As discussed over at https://www.youtube.com/watch?v=LyTUj6YQoBo

GitHub Auth

Present Scenario

Everything happens locally which requires the user to start all over again when using a different machine.

Proposed Solution

Create a GitHub repository to save all solutions that the user submits which solves the above mentioned problem.

Misleading usage information shows up as part of test snapshots

## shows up help message without any args

> Snapshot 1

    `Usage: index <command> [options]␊

    Options:␊
      -V, --version    output the version number␊
      -h, --help       output usage information␊

    Commands:␊
      init             Initialize challenges␊
      submit           Submits current task␊
      fetchtask <key>  Fetches any task as per the key supplied␊
      showkeys         Shows keys of all the completed tasks␊
      showcommands     Shows all commands available`

What intended instead :-

Usage: teachcode <command> [options]␊

Visibility into language challenges addition

Please label this as a discussion thread.

@jamesgeorge007, on going through the code, I found that currently Javascript and Python language challenges are available.

In addition, I found that issues for Golang (#7) and Javascript (#5) exist.

If you, as maintainer would appreciate support for other languages like, Java, Ruby, Dart, etc. I have some suggestions for you:

Increasing language challenges visibility:

  1. Add a table in the README file listing support for languages at the time.
  2. Add also, in the same table the languages which are being worked upon and the languages which have received approval for addition, but work on them is yet to start and the corresponding Github issues
  3. Add guidelines for contributing new languages into the repo
  4. Add a label in the init command, which prints text like: "If you'd like support for a repository, and would want to add it, consider ."
  5. Add a poll for language support.

[Feature Request]: A better approach in validating solutions

Problem
If we give such a solution for task 4 of JS,

console.log('33\n14\nJS\n Hey, this is Task 4 of Python Path!\n Hey, this is Task 4 of Python Path! !\n Hey, this is Task 4 of Python Path! !');

the current program will consider it as the correct solution.
But the user manually solved the problem and just printed the answer he got without using the language constructs.

Proposed solution
The user can operate on a set of unknown test cases which will be taken as input or passed to a predefined function as arguments and the user needs to.
Eg:

function task1(arg) {
    // user needs to do the task on the given argument (arg) and return the output
}

We can give multiple values of arg as testcases

Additional context
The current program is correct as long as the user honestly does the tasks. And adding the test cases will also be an additional work added on top of editing the program. Also, the user will need to understand the basic I/O before attempting the tasks. So the priority of this issue might be kept low for these reasons.

Open to discussion.

Write unit tests

As of now, we're missing out on unit tests which is extremely important.
We're using avajs as the test runner.

  • teachcode init (@Ian-Yy)
  • teachcode submit
  • teachcode fetchtask <key>
  • teachcode showkeys
  • teachcode showcommands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.