Skip to content

Commit a769b29

Browse files
hobovskyDonaldKellettSteffan153kazk
authored
Tutorial: create first kata (#224)
* Migrated from old wiki * Navigation * Autoformat with Prettier * Organization, navigation * Navigation * Organization * Organization * Organization * Organization * Fill in TODOs * Add note on required honor * Apply suggestions from code review Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Update content/authoring/kata/create-first-kata.md Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Remarks from code review * Apply suggestions from code review Co-authored-by: Steffan <40404519+Steffan153@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: kazk <kazk.dev@gmail.com> * tone down the language a bit * Apply suggestions from code review Co-authored-by: Steffan <40404519+Steffan153@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: kazk <kazk.dev@gmail.com> Co-authored-by: Steffan <40404519+Steffan153@users.noreply.github.com> Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: kazk <kazk.dev@gmail.com> Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> * Apply suggestions from code review Co-authored-by: Steffan <40404519+Steffan153@users.noreply.github.com> * Redo 'avoid duplicates'; hold back with approving translations * formatting * organization Co-authored-by: hobovsky <hobovsky@users.noreply.github.com> Co-authored-by: Donald Sebastian Leung <donaldsebleung@gmail.com> Co-authored-by: Steffan <40404519+Steffan153@users.noreply.github.com> Co-authored-by: kazk <kazk.dev@gmail.com>
1 parent 087bca6 commit a769b29

File tree

8 files changed

+272
-96
lines changed

8 files changed

+272
-96
lines changed

content/authoring/index.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,16 @@ next: /authoring/kata/
55

66
# Authoring of Codewars Content
77

8-
## Overview
8+
All content available on Codewars is created by members of the Codewars community. It's ideas of Codewars users that get turned into kata, and the fact that users are familiar with plenty of programming languages allows for a large number of available translations.
99

10-
All content available on Codewars is created by members of the Codewars community. It's ideas of Codewars users that get turned into kata, and only the fact that users are familiar with plenty of programming languages allows for a large number of available translations.
10+
This section of the documentation is meant mostly for authors and translators who would like to introduce new challenges and make them available for other Codewars users. Creating a kata or translating it, even an easy one, is a difficult task. It requires a much wider set of skills compared to that of just solving a kata. Unlike problem solvers, authors need to master skills related to software development in general, as well as problem design, writing good test suites, documenting the task and its requirements, and communicating with reviewers.
1111

12-
This section of the documentation is meant mostly for authors and translators, who would like to introduce new challenges and make them available for other Codewars users. Creating a kata or translating it, even an easy one, is a difficult task. It requires a much wider set of skills compared to the one required for just solving a kata. Unlike problem solvers, authors need to master skills related to software development in general, as well as to design of the problems, writing good test suites, documenting the task and its requirements, and communicating with reviewers.
12+
To support users in creating good quality kata and translations, a set of help pages were created with articles related to content authoring activities: tutorials explaining how to create and translate a kata, and a reference of [guidelines][authoring-guidelines] and requirements that every author should follow to make sure that a piece of content created by them meets quality criteria.
1313

14-
To support users in creating good quality kata and translations, a set of help pages were created with articles related to content authoring activities: tutorials explaining how to create and translate a kata, and a reference of [guidelines][guidelines-authoring] and requirements that every author should follow to make sure that a piece of content created by them meets quality criteria.
14+
For more details, see help pages related to creating a specific type of content:
15+
- [Creating a kata][authoring-kata]
16+
- [Creating a translation][authoring-translation]
1517

16-
## Creating a Kata
17-
18-
_TBD: improve this stub_
19-
20-
Users new to creating kata can use [tutorial(TODO)](/authoring/kata/).
21-
22-
Some [languages](/languages/) also have a page dedicated to creating a kata, with code examples and best practices.
23-
24-
Every kata author should follow [kata authoring guidelines](/authoring/guidelines/kata/).
25-
26-
After being published, every kata goes through the [beta process](/concepts/kata/beta-process/) and is subject to a series of [reviews](/curating/kata/).
27-
28-
## Translating a Kata
29-
30-
_TBD: improve this stub_
31-
32-
New translators can use [tutorial(TODO)](/authoring/translation/).
33-
34-
Some [languages](/languages/) also have a page dedicated to creating a kata, with code examples and best practices.
35-
36-
Every translator should follow [translation authoring guidelines](/authoring/guidelines/translation/).
37-
38-
After being published, every translation goes through a series of [reviews](/curating/translation/) before it can be approved.
39-
40-
41-
[guidelines-authoring]: /authoring/guidelines/
42-
[docs-curating]: /curating/
18+
[authoring-guidelines]: /authoring/guidelines/
19+
[authoring-kata]: /authoring/kata/
20+
[authoring-translation]: /authoring/translation/

content/authoring/kata/create-first-kata.md

Lines changed: 227 additions & 0 deletions
Large diffs are not rendered by default.
14.6 KB
Loading
15.8 KB
Loading

content/authoring/kata/index.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
---
2-
kind: tutorial
32
sidebar: authoring
43
next: /authoring/
54
prev: /authoring/translation/
65
---
76

8-
# How to create a kata
7+
# Kata
98

10-
_This page is a stub._
9+
_TBD: improve this stub_
1110

11+
## Requirements
1212

13+
To create a new kata, a user needs to earn the ["Create Kata" privilege][reference-privileges]. After reaching the required amount of Honor, the privilege is granted and the user can select the **"New Kata"** option from their profile menu.
14+
15+
16+
## Kata Editor
17+
18+
Kata are created with the [kata editor](/references/ui/kata-editor/)
19+
20+
Users new to creating kata may refer to the [tutorial(TODO)](/authoring/kata/).
21+
22+
Some [languages](/languages/) also have a page dedicated to authoring kata, with code examples and best practices.
23+
24+
Every kata author should follow [kata authoring guidelines](/authoring/guidelines/kata/).
25+
26+
After being published, every kata goes through the [beta process](/concepts/kata/beta-process/) and is subject to a series of [reviews](/curating/kata/).
27+
28+
29+
[reference-privileges]: /references/gamification/privileges/
30+
[docs-curating]: /curating/

content/authoring/translation/index.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
---
2-
kind: tutorial
32
sidebar: authoring
43
prev: /authoring/kata/
54
next: /authoring/guidelines/
65
---
76

8-
# How to translate a kata
7+
# Translations
98

10-
_TBD: this page was imported from the old CW wiki and needs to be reviewed/redacted._
9+
_TBD: improve this stub_
10+
11+
New translators may refer to the [tutorial(TODO)](/authoring/translation/).
12+
13+
Some [languages](/languages/) also have a page dedicated to authoring kata, with code examples and best practices.
14+
15+
Every translator should follow [translation authoring guidelines](/authoring/guidelines/translation/).
16+
17+
After being published, every translation goes through a series of [reviews](/curating/translation/) before it can be approved.
1118

1219
<!--
1320
TODO: this page would relate to creating both initial language version, as well as new translation

content/references/ui/kata-editor/index.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,4 @@ next: /references/ui/kata-trainer/
1313

1414
## What is the Kata Editor?
1515

16-
The Kata Editor is the authoring tool used to create and modify kata. It is accessible through the profile menu, found in the top right corner of this site. Only users who have earned the [[Create Kata|Privileges]] privilege.
17-
18-
## Anatomy of a Kata
19-
20-
In order to create a kata you must first understand the elements of a kata.
21-
22-
### Name
23-
24-
The name is used to uniquely identify a kata. You can be creative with the name that you use. Best practice is to use a name that gives other users a good idea of what type of challenge they will be getting themselves into.
25-
26-
### Discipline
27-
28-
The discipline is the category that the kata belongs to. You should pick the category that best describes what the kata is intended to focus on. As of now there are four categories
29-
30-
- Reference - Focuses on core language and API knowledge.
31-
- Algorithm - Focuses on the logic required to complete the task.
32-
- Bug Fix - Focuses on taking existing code, determining the issue and fixing it.
33-
- Refactor - Focuses on taking existing code and making it better.
34-
35-
### Description
36-
37-
The description field is used to provide instructions to the users who will be training on the kata. This field recognizes [[Github/Codewars flavored markdown|Markdown-Formatting]]. You can use the preview tab to see the markdown.
38-
39-
For complex katas you may need to create a lengthy description in order to fully describe the requirements. For easier katas it is best to keep the description as short and concise as possible. Feel free to use code block examples within the description. It is always best to use the three back tick (```) code block style instead of indentation.
40-
41-
### Describing code examples for multiple languages
42-
43-
The markdown we provide adds an additional feature useful for displaying code blocks of multiple languages. If you use the ``` [language name] markdown format for indicating which code syntax should be used then you can define all of the languages examples within the description field. When your markdown is displayed it will filter out the languages that are not relevant (based off of the current context). In order for this to work you must use the language's full name and have your examples grouped together without any additional content in between them.
44-
45-
The following is an example of how to provide example code blocks for both javascript and coffeescript:
46-
47-
~~~
48-
```javascript
49-
var a = []
50-
```
51-
```coffeescript
52-
a = []
53-
```
54-
~~~
55-
56-
### Final Solution
57-
58-
When creating your kata you will probably want to start with the final solution and test fixture code blocks. If you are used to TDD then you will write your tests within the test fixture and then you will create a fully working solution within the final solution code block. If you need to load some preloaded code then you may need to do that before working on the final solution code block.
59-
60-
### Initial Solution
61-
62-
After you have a working solution then you will want to next focus on getting the code setup for how other users will initially see it. The way in which you setup your initial solution code will depend heavily on the discipline that you have selected. For bug and refactor disciplines you will end up needing to include almost working or already fully working code within this block. For reference and algorithm disciplines you will likely only include skeleton code. Perhaps an empty function/method called "solution" or some other code that has missing code that needs to be completed. Sometimes you may just want to include some comments to help get the user started, but no actual code.
63-
64-
The initial solution block is required so you will have to include something (at the very least some comments) in order for the kata to be able to be published.
65-
66-
### Preloaded
67-
68-
The preloaded code block is an optional feature that you can use if you need it. Its useful for when you want to load some code that mimics an API that your kata is based around. Its also useful if you want to define some code that needs to be used within the solution, but shouldn't be editable within the solution itself. For example maybe you want to create a kata that asks a user to add an item to an array. It would be better to define the array within the preloaded code block so that the user already has the array created for them, and will be more likely to just add an item to the array using the appropriate array method, instead of updating the array constructor to include the value (and bypassing using an array method all together).
69-
70-
### Test Fixture
71-
72-
The test fixture is used to write code that will validate the kata solution.
73-
The entire set of code in this block acts as a single test case. To validate solution code
74-
you can use the Test.expect(passed_boolean, optional_message) method. More advanced testing methods are also available. Check out the kata test framework documentation for more information.
16+
The Kata Editor is the authoring tool used to create and modify kata. It is accessible through the profile menu found in the top right corner of this site. Only users who have earned the [[Create Kata|Privileges]] privilege may access the Kata Editor.

gridsome.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ module.exports = {
127127
"/authoring/guidelines/kata/",
128128
],
129129
},
130+
{
131+
title: "Tutorials",
132+
items: ["/authoring/kata/create-first-kata/"],
133+
},
130134
],
131135
},
132136
{

0 commit comments

Comments
 (0)