Skip to content

Commit 8d34cc4

Browse files
hobovskyBlind4Basicskazk
authored
Getting started: solving kata (#72)
* getting started: solving kata - initial commit * Solving kata: test, attempt, unlock * Linter : typo * Autoformat with Prettier * Getting started: reward for solved kata * Autoformat with Prettier * Solving kata: feedback * Fix linter error * Autoformat with Prettier * Update solving-kata.md * Review remarks Added link to TDD article on Wikipedia Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> * Autoformat with Prettier * Review remarks Co-authored-by: kazk <kazk.dev@gmail.com> * split "solving" into two separate pages * typos * Autoformat with Prettier * Add "kata solved" to side bar * fixed capitalization of header, removed unneccessary image * Description of actions, and not buttons * typo * Autoformat with Prettier * Review remarks Co-authored-by: kazk <639336+kazk@users.noreply.github.com> * Review remarks Co-authored-by: kazk <639336+kazk@users.noreply.github.com> * Review remarks Co-authored-by: kazk <639336+kazk@users.noreply.github.com> Co-authored-by: hobovsky <hobovsky@users.noreply.github.com> Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> Co-authored-by: kazk <kazk.dev@gmail.com> Co-authored-by: kazk <639336+kazk@users.noreply.github.com>
1 parent ec4e83a commit 8d34cc4

File tree

7 files changed

+70
-8
lines changed

7 files changed

+70
-8
lines changed
-140 KB
Binary file not shown.
10.2 KB
Loading
3.7 KB
Loading
68.7 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
sidebar: getting-started
3+
prev: "/getting-started/solving-kata/"
4+
next: "/getting-started/solutions/"
5+
---
6+
7+
# When a Kata is Solved
8+
9+
Finally this great moment happened: tests output panel is all green, and you were able to submit your solution. Congratulations! It's time to collect your reward. It's also a good time to share some feedback, to guide others who'd encounter the same kata.
10+
11+
## Rewards
12+
13+
You worked hard to solve your last challenge, and after you succeeded, you definitely deserve a reward. Each solved tasks rewards you in two ways: progressing your rank, and granting some amount of Honor points. The more difficult kata you solve, the bigger the reward.
14+
15+
### Rank
16+
17+
Rank level reflects your experience and knowledge you have gained by solving kata. You start at the lowest rank of 8 kyū, and each correct solution brings you closer to a higher rank. You can see your rank progress toward next level on your profile page:
18+
19+
![rank progress](./img/solving_01_rank-progress.png)
20+
21+
More information on ranks and progress can be found [here (TODO: add link to docs on progress)]().
22+
23+
### Honor
24+
25+
Honor points are rewarded by contributing to Codewars in many ways, and solving a kata is one of them. By earning Honor points you gain additional [privileges (TODO: link to docs)]() and climb [leaderboards (TODO: link to docs)]().
26+
27+
## Feedback
28+
29+
After you have successfully solved a task, you can let others know how you liked it. One way to do this is to leave your satisfaction vote:
30+
31+
![satisfaction vote](./img/solving_02_vote.png)
32+
33+
You can also participate in discussion on a kata. If you wish to log an issue about this specific kata, such as poorly worded descriptions or issues with test cases, then you can leave a comment in discourse section. More on this in the next part.
Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
---
22
sidebar: getting-started
33
prev: "/getting-started/finding-kata/"
4-
next: "/getting-started/solutions/"
4+
next: "/getting-started/kata-solved/"
55
---
66

77
# Solving Kata
88

9-
<!--
10-
TODO Trainer, submitting a solution
11-
TODO Solution troubleshooting
12-
TODO forfeiting a kata
13-
TODO reward: honor, progress, privileges
14-
TODO satisfaction voting
15-
-->
9+
After opening a kata page, you are presented with the [kata details (TODO: link to kata details panel doc)]() view with general information about it. Read carefully through the description, and if you are ready to face the challenge, you can start your training by clicking on `TRAIN`.
10+
11+
## Kata Trainer
12+
13+
Welcome to the kata trainer! You use this view to take your attempts on solution, write the code and run tests. A few tips to get you started:
14+
![kata trainer](./img/solving_03_trainer.png)
15+
16+
### Solution editor
17+
18+
You use solution editor to write code which solves the task. You can type the code straight into the editor, but if you want, you can use your favorite IDE and just copy your solution from it and paste it here.
19+
20+
### Testing with sample tests
21+
22+
Codewars promotes the [Test Driven Development](https://en.wikipedia.org/wiki/Test-driven_development) approach. This means that you are encouraged to write not only code for your solution, but also add as many tests in `Sample Tests` panel as you can think of (see [Writing Tests (TODO: add link to explanation how to add more sample tests)]() to see how), for various scenarios, inputs, and edge cases. Most kata will have provided you some sample tests to get you going, while others will not, in which case some test documentation will be shown instead.
23+
Every time you run sample tests by clicking `TEST`, system will execute them against your solution, and tell you if it passed all of them, or maybe failed some. When some sample test fails, you know you need to work on your solution some more. When all sample tests pass, you can either add some more test cases for scenarios not tested yet, or, if you believe your solution is ready, you can go to next step.
24+
25+
### Attempting to pass the full test suite
26+
27+
When your solution is thoroughly tested, it passes all sample tests you created, and you cannot think of any new test cases to add, you can run full test suite against your solution. Passing it is necessary to have the kata marked as solved.
28+
29+
You cannot see full tests until you solve the kata. Full test suite is usually much larger than sample tests, and it contains test cases for various inputs, data configurations, edge cases, performance, etc. Even if your solution passes all sample tests, it still can fail attempt against full tests. If tests output panel turns red, do not worry! You can edit and run your solution as many times as you need.
30+
31+
When tests output panel turns green and your solution passes all the tests, congratulations! Task is solved, and you are awarded with Honor points and your progress increases (more on rewards on the next page).
32+
33+
### Submitting the final version
34+
35+
Some users like to write code golfed or creative/clever solutions, but most try to write production quality code. After you have completed all of the test cases, you will be given an opportunity to cleanup your code so that it's "code review" ready. After submitting, your solution is stored in the system and available for others to see, comment, and vote.
36+
37+
## When tests fail over again
38+
39+
Sometimes you just cannot get your solution right. Output panel is red after every attempt, kata might appear broken, or you receive some errors you do not understand and you have no idea what's going on. Don't worry, there are many ways to get help. See [Troubleshooting your Solution (TODO: add link to FAQ)]() FAQ to get some advice.
40+
41+
## Unlocking solutions
42+
43+
You can learn from solutions of other users even if you do not solve the kata! If kata is too difficult, or for some reason you do not want to solve it, but you still would like to see solutions, you can unlock them by forfeiting all eligibility to any reward you could get from solving the exercise. When you unlock solutions, you immediately gain access to all information about kata just as if you have finished it: solutions of other users, code of full test suite, etc. Although be warned, because this way you get no reward, even if you solve this kata in the future, for example in another language.

gridsome.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = {
5050
"/getting-started/setting-up/",
5151
"/getting-started/finding-kata/",
5252
"/getting-started/solving-kata/",
53+
"/getting-started/kata-solved/",
5354
"/getting-started/solutions/",
5455
"/getting-started/community/",
5556
],

0 commit comments

Comments
 (0)