All Projects → it-shark-pro → js-assignments

it-shark-pro / js-assignments

Licence: MIT license
Javascript assignments, tasks and katas

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to js-assignments

shortest-tutorial-ever
A list of the shortest tutorials ever.
Stars: ✭ 14 (-33.33%)
Mutual labels:  practice
first-contributions
This repository is for the first time contributors. Test and practice how to contribute
Stars: ✭ 21 (+0%)
Mutual labels:  practice
RNAlbumsPractice
react-native practice albums' project.
Stars: ✭ 15 (-28.57%)
Mutual labels:  practice
extracurricular
An initiative to increase the visibility of open source opportunities within the Elixir community.
Stars: ✭ 50 (+138.1%)
Mutual labels:  practice
codewars python solutions
My CodeWars solutions in Python.
Stars: ✭ 111 (+428.57%)
Mutual labels:  practice
codeforces-timer
A Google Chrome extension which adds a timer to practice timed problem solving on codeforces
Stars: ✭ 20 (-4.76%)
Mutual labels:  practice
pw
Best websites a Programmer should visit
Stars: ✭ 27 (+28.57%)
Mutual labels:  practice
FA
Репозиторий практик факультета ИТиАБД направления Прикладной Информатики в Финансовом Университете при Правительстве РФ
Stars: ✭ 26 (+23.81%)
Mutual labels:  practice
lkm-sandbox
Collection of Linux Kernel Modules and PoC to discover, learn and practice Linux Kernel Development
Stars: ✭ 36 (+71.43%)
Mutual labels:  practice
start-machine-learning
A complete guide to start and improve in machine learning (ML), artificial intelligence (AI) in 2022 without ANY background in the field and stay up-to-date with the latest news and state-of-the-art techniques!
Stars: ✭ 3,066 (+14500%)
Mutual labels:  practice
interview-practice
Questions and solutions (in Java) for technical CS interview problems
Stars: ✭ 21 (+0%)
Mutual labels:  practice
break-the-ice-with-python
The repository is about 100+ python programming exercise problem discussed, explained, and solved in different ways
Stars: ✭ 2,165 (+10209.52%)
Mutual labels:  practice
coding-for-food
Coding for food
Stars: ✭ 19 (-9.52%)
Mutual labels:  practice
ruby drills
A deliberate practice framework to help you learn Ruby
Stars: ✭ 30 (+42.86%)
Mutual labels:  practice
Data-Structures-and-Algorithms--A-Comprehensive-Guide
Data Structures & Algorithms - A Comprehensive Guide
Stars: ✭ 15 (-28.57%)
Mutual labels:  practice
dojos
This is where the Novoda team do all their hacking
Stars: ✭ 74 (+252.38%)
Mutual labels:  practice
Python
covers python basic to advance topics, practice questions, logical problems in python, web development using html, css, bootstrap, jquery, DOM, Django 🚀🚀. 💥 🌈
Stars: ✭ 29 (+38.1%)
Mutual labels:  practice
Competitive-Programming-Solutions
COMPETITIVE PROGRAMMING PRACTICE QUESTIONS
Stars: ✭ 28 (+33.33%)
Mutual labels:  practice
GrooveScribe
Sheet Music Creation, Groove Experimentation, and Practice Tool for drummers.
Stars: ✭ 85 (+304.76%)
Mutual labels:  practice
prefeel-lib
web application for team members to typing library
Stars: ✭ 20 (-4.76%)
Mutual labels:  practice

Build Status Hackage-Deps Greenkeeper badge GitHub release

Brest IT Shark

IT Shark

Javascript Assignments

DON'T FORGET to send your results! Send Results

Docs

Yet another javascript assignments. There are a lot of interactive javascript resources for beginners, but most of them are online and do not cover the modern programming workflow. There are some excellent training resources on github (https://github.com/rmurphey/js-assessment, https://github.com/mrdavidlaing/javascript-koans, https://github.com/vasanthk/js-bits etc) but they are not exactly simulate the everyday programming process. So the motivation of this project is to show TDD process in the wild to the beginners. Assingment tests are implemented in various ways to feel a difference and gain the experience what manner is good, what is bad and what is ugly.

Another idea is to prepare assignment to cover all standard javascript functions, to drilling and mastering skills. Some tasks are practical, but some tasks are rather synthetic.

And the last idea is to inure trainees to work using unit test and feel uncomfortable when programming without tests.

To start javascript assignments please follow the next steps:

How to fork this repo

  • Click the Fork button at the top-right corner of this page and the repository will be copied to your own account.
  • Run git clone https://github.com/<your-account>/js-assignments.git from command line to download the repo.

How to setup travis-ci

  • Open https://travis-ci.org/ and sign in with your github account.
  • Activate your forked repo js-assignments.
  • Edit local README.md file and update all links (just replace all occurrences of 'it-shark-pro' with your account name).
  • Commit and push updated README.md to github:
  git add README.md
  git commit -m "Update the links"
  git push origin master

How to setup work environment

  • Download and install the latest Nodejs.
  • Run npm install from you repository folder to download the required modules. All dependent modules will be located in the node_modules folder.
  • Open your favorite editor and complete tasks.
  • Open your terminal and use npm test command to run all tests. You can run single file by passing it as argument npm test ./test/01-strings-tests.js.
  • The local repo folder has the following structure:
    node_modules - app dependences restored by npm install command, you can delete this folder and restore later again.
    task - folder with tasks modules, it's your main folder.
    test - folder with tests modules to verify the tasks completion.

How to implement assignments using TDD fashion

Now you are ready to implement assignments. Tasks modules are located in the task folder. Each module consists of several tasks for specified topic. Each task is usually a regular function:

  /**
   * Returns the result of concatenation of two strings.
   *
   * @param {string} value1
   * @param {string} value2
   * @return {string}
   *
   * @example
   *   'aa', 'bb' => 'aabb'
   *   'aa',''    => 'aa'
   *   '',  'bb'  => 'bb'
   */
  function concatenateStrings(value1, value2) {
     throw new Error('Not implemented');
  }

Resolve this task using the following TDD steps:

  • Run unit tests and make sure that everything is OK and there are no failing tests.
  • Read the task description in the comment above the function. Try to understand the idea. If you got it you are to write unit test first, but unit tests are already prepared :) Skip step with writing unit tests.
  • Remove the throwing error line from function body
     throw new Error('Not implemented');

and run the unit tests again. Find one test failed (red). Now it's time to fix it!

  • Implement the function by any way and verify your solution by running tests until the failed test become passed (green).
  • Your solution work, but now time to refactor it. Try to make your code as pretty and simple as possible keeping up the test green.
  • Once you can't improve your code and tests are passed you can commit your solution.
  • Push your updates to github server and check if tests passed on travis-ci.
  • If everything is OK you can try to resolve the next task.

How to debug tasks

To debug tests you can use Node inspector. To install it just run npm install -g node-inspector in your terminal. Then follow next steps:

  • Add debugger; to the first line of your task.
  • Run your test file with npm run test-debug ./test/01-strings-tests.js.
  • In another terminal run node-inspector and copy link from the output.
  • Open the link in your favorite browser. You should see Chrome Developers Tools like interface where you can debug your tasks.
  • When you found and fix your issue, close the browser's tab with the debug tools, stop the node-inspector by pressing Ctrl-C, stop the test runner by pressing Ctrl-C, remove the debugger; from your task.

How to debug (beginner's way)

There is an easier way to debug for beginners with free Visual Studio Code:

{
    "version": "0.2.0",
    "configurations": [
        {
           ...
           "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
           ...
           "args": ["./test/01-strings-tests.js"],
           ...
         },
         ...
     ]
}
  • Click in the gutter to the left of the line number to set the breakpoint. Press F5 to run debug.
  • NOTE: The launch.json is stored in the .vscode project folder.

Contribution

Feel free to contribute into this project. New tasks and katas are welcome.

ESLint

To fix linting execute:

npm run lint -- --fix
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].