[JAVA] [Codewars] A site where you can train from the basics of coding with a browser (Vim can be used with a browser to support 32 programming languages. More than 4000 problems have been posted!)

You can develop a test-first development style using 32 programming languages.

I introduced [Codin Game] the other day, but since there are few simple problems and there is no way to search for problems, like a drill every day. I think [Codin Game] is a little unsuitable for training ... so this time Codewars /) I would like to introduce.

About CodinGame [[CodinGame] A site where you can train from the basics of coding with a browser (You can learn using a pseudo game development environment. Answers can be written by choosing from 25 programming languages!)](Https://qiita. Please see com / javacommons / items / 86efba2d0ce6b2a21fb9) (Because there is a game development style production, first experience [CodinGame] It may be more fun to have it, and if you enjoy it, you may want to read this article as well).

In Codewars, there are 32 types (as of January 10, 2018, BF, C, Clojure CoffeeScript, C ++, Crystal, C #, Dart, Elixir, Erlang, F #, Go, Groovy, Haskell, Java, JavaScript, Kotlin, Lua, Nim, Objective-C, OCaml, PHP, Python, R, Ruby, Rust, Scala, Shell, Solidity, SQL, Swift, TypeScript) programming languages are supported .. However, the difference from CodinGame is that some languages are supported and some are not supported depending on the problem. (Therefore, the threshold for posting questions may be lowered and the number of questions may be large.) ** You can also (repeatedly) challenge a problem once solved using the same language or another language. If you come up with a better algorithm or implementation method, you can try again. ** **

** Codewars allows you to write code, debug, and run tests (provided by the problem creator) on your browser (even if you don't have a development environment on your machine). It can be done with the click of a button, and has the feature that you can submit the answer when you get the approval that it is correct. (So, it's safe with Rakuchin. Also, CodinGame is the same) **

1. Access https://www.codewars.com/ from your Mac / Linux / Windows web browser.

image.png

2. Answer a simple test

image.png

3. Connect to your GitHub account and fill out the required information

image.png

image.png

4. Example of entry when connecting to a GitHub account

image.png

5. Make a selection about the programming language you want to learn (the language selection is unchanged here)

image.png

6. After signing up, go to https://www.codewars.com/dashboard (http://bit.ly/_codewars).

image.png

image.png

7. Look at the problem (Kata) list screen

image.png

image.png

8. Select the question to challenge (Kata)

image.png

9. Read the problem description and start training

image.png

10. IDE (answer creation / test execution screen)

This article gives an example of choosing JavaScript, but you can switch to another language using the "JavaScript" combo box.

image.png

Mediocre answer example


function solution(number){
  console.log("number=" + number);
  let sum = 0;
  for (let i=1; i<number; i++) {
    console.log(i);
    if ((i % 3 === 0) || (i % 5 === 0)) sum += i;
  }
  return sum;
}

11. Source code completed ⇒ execution of this test

image.png

image.png

12. You can see the master's code (the answer of someone other than yourself)

According to @yoskeoka In the "good code" in the screenshot below:

It is said that it will be. (Thank you for your comment @yoskeoka.)

image.png

Go back to 13.7 and look for the problem (Kata)

Or https://www.codewars.com/dashboard (from the menu at the top left of the screenImage.png You may want to go back to (select .amazonaws.com/0/140610/906cb9b2-d1ae-ce62-3c13-e3d25439acf9.png) to solve the recommended problem.

Finally

A project to translate problem sentences into Japanese! !! w (Problems will become more and more challenging!)

Recommended Posts

[Codewars] A site where you can train from the basics of coding with a browser (Vim can be used with a browser to support 32 programming languages. More than 4000 problems have been posted!)
[Codin Game] A site where you can train from the basics of coding with a browser (You can learn using a pseudo game development environment. Answers can be written by selecting from 25 programming languages!)
How to return to the command from the state where you can not enter interactive mode with python of git bash
Convert images from FlyCapture SDK to a form that can be used with openCV