Coder Social home page Coder Social logo

holman57 / hardcode Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 85.78 MB

A flashcard-style Question-and-Answer system for memorizing the syntax of common programming languages.

Home Page: https://holman57.github.io/hardcode/

Dart 0.83% Python 0.40% JavaScript 98.53% HTML 0.24%
flashcards learn-to-code learning memorization-game programming-languages syntax

hardcode's Introduction

HardCode

A flashcard-style Question-and-Answer system for memorizing the syntax of common programming languages.

Target Languages x 18

C Python3 Go
C++ PowerShell PHP
C# Bash Rust
Java JavaScript Ruby
Kotlin TypeScript Lua
Scala Dart
R Swift

Structure

Question Hierarchy

  1. Language
  2. Variables
    1. Declaration
      1. Multi-Choice
        1. Primitive Types
          1. Integer Assignment
    2. Mutability
      1. Multi-Choice
    3. Multiple Declaration
      1. Multi-Choice
  3. Control Flow
    1. Decision-Making
      1. if-then, if-then-else, switch
    2. Looping
      1. for, while, do-while
    3. Branching
      1. break, continue, return

questions.json Format

{
  "Language": ["C", "Python", "Go", ... ],
  "Variables": {
      "Rust Int Variable Types": [string],
      "Int Variable Names": [string],
      "Random Variables": [string],
      "Variable Permutations": [string],
      "Declaration": {
          "Multi-Choice": {
              "Type": string,
              "Sub-Type": string,
              "Question": [string],
              "True-False": [string],
              "Answers": {
                "Correct": {
                    "C": [string] ,
                    "Python": [string] ,
                    "Go": [string] ,
                    ...
                },
                "Incorrect": [
                  {
                    "Name": string,
                    "Pattern": string,
                    "Priority": int
                  },
                  ...
                ]
      "Mutability": [],
      "Multiple Declaration": []
    }
  },
  "Control Flow": []
}

String Interpolation Pattern Match

First Parse

  • [language] : The programming language corresponding to the question.

Second Parse

  • [$|@|None]
  • [var|val|int|Int|let|None]
  • [local|var|val|int|Int|let|None]
  • [: Integer|: Int|: number| int|None]
  • [:=|=]
  • [;|None]
  • [mut |None]
  • [DECLARE |None]
  • [ INT|None]
  • [SET |None]

Third Parse

  • [random int variable]
    • [a-z]
      • Priority: 1
    • (myVar|myvariable|myNum|num|amount|total|quantity|count|rate|limit)
      • Priority 1
    • [xynij]
      • Priority: 1
  • [random integer]
    • [0-9]{1}
      • Priority: 1
    • [0-9]{1,2}
      • Priority: 1
    • [0-9]{1,4}
      • Priority: 1
    • [0-9]{1,6}
      • Priority: 1
  • [random rust data type]
    • (i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usuze)

hardcode's People

Contributors

holman57 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.