Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
47d3756
Migrated from old wiki
hobovsky Jan 7, 2021
f56aad4
Navigation
hobovsky Jan 7, 2021
0d66c61
Autoformat with Prettier
hobovsky Jan 7, 2021
b64f7c7
Organization, navigation
hobovsky Jan 7, 2021
fdbe2ee
Merge branch 'create-first-kata' of https://github.com/codewars/docs …
hobovsky Jan 7, 2021
0cfa23a
Navigation
hobovsky Jan 7, 2021
238aa78
Organization
hobovsky Jan 7, 2021
c93dad8
Organization
hobovsky Jan 7, 2021
0cb3441
Organization
hobovsky Jan 7, 2021
d9c9d41
Organization
hobovsky Jan 8, 2021
2fc2e4a
Fill in TODOs
hobovsky Jan 8, 2021
55c3082
Add note on required honor
hobovsky Jan 8, 2021
5256165
Apply suggestions from code review
hobovsky Jan 9, 2021
b7028e8
Apply suggestions from code review
hobovsky Jan 9, 2021
fe8ae25
Apply suggestions from code review
hobovsky Jan 9, 2021
f076913
Update content/authoring/kata/create-first-kata.md
hobovsky Jan 9, 2021
e618511
Apply suggestions from code review
hobovsky Jan 9, 2021
8610ad1
Apply suggestions from code review
hobovsky Jan 9, 2021
533b354
Remarks from code review
hobovsky Jan 9, 2021
663e28d
Apply suggestions from code review
hobovsky Jan 10, 2021
7bbe89d
Apply suggestions from code review
hobovsky Jan 11, 2021
5ed130f
tone down the language a bit
hobovsky Jan 16, 2021
a0af773
Apply suggestions from code review
hobovsky Jan 16, 2021
e61992c
Apply suggestions from code review
hobovsky Jan 17, 2021
053e612
Apply suggestions from code review
hobovsky Jan 22, 2021
4b51ea9
Apply suggestions from code review
DonaldKellett Jan 23, 2021
dabd3fa
Redo 'avoid duplicates'; hold back with approving translations
hobovsky Feb 20, 2021
fa9df81
formatting
hobovsky Feb 20, 2021
9fce20f
organization
hobovsky Feb 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 9 additions & 31 deletions content/authoring/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,16 @@ next: /authoring/kata/

# Authoring of Codewars Content

## Overview
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.

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.
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.

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.
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.

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.
For more details, see help pages related to creating a specific type of content:
- [Creating a kata][authoring-kata]
- [Creating a translation][authoring-translation]

## Creating a Kata

_TBD: improve this stub_

Users new to creating kata can use [tutorial(TODO)](/authoring/kata/).

Some [languages](/languages/) also have a page dedicated to creating a kata, with code examples and best practices.

Every kata author should follow [kata authoring guidelines](/authoring/guidelines/kata/).

After being published, every kata goes through the [beta process](/concepts/kata/beta-process/) and is subject to a series of [reviews](/curating/kata/).

## Translating a Kata

_TBD: improve this stub_

New translators can use [tutorial(TODO)](/authoring/translation/).

Some [languages](/languages/) also have a page dedicated to creating a kata, with code examples and best practices.

Every translator should follow [translation authoring guidelines](/authoring/guidelines/translation/).

After being published, every translation goes through a series of [reviews](/curating/translation/) before it can be approved.


[guidelines-authoring]: /authoring/guidelines/
[docs-curating]: /curating/
[authoring-guidelines]: /authoring/guidelines/
[authoring-kata]: /authoring/kata/
[authoring-translation]: /authoring/translation/
227 changes: 227 additions & 0 deletions content/authoring/kata/create-first-kata.md

Large diffs are not rendered by default.

Binary file added content/authoring/kata/img/new_kata-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/authoring/kata/img/new_kata-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 21 additions & 3 deletions content/authoring/kata/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
---
kind: tutorial
sidebar: authoring
next: /authoring/
prev: /authoring/translation/
---

# How to create a kata
# Kata

_This page is a stub._
_TBD: improve this stub_

## Requirements

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.


## Kata Editor

Kata are created with the [kata editor](/references/ui/kata-editor/)

Users new to creating kata may refer to the [tutorial(TODO)](/authoring/kata/).

Some [languages](/languages/) also have a page dedicated to authoring kata, with code examples and best practices.

Every kata author should follow [kata authoring guidelines](/authoring/guidelines/kata/).

After being published, every kata goes through the [beta process](/concepts/kata/beta-process/) and is subject to a series of [reviews](/curating/kata/).


[reference-privileges]: /references/gamification/privileges/
[docs-curating]: /curating/
13 changes: 10 additions & 3 deletions content/authoring/translation/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
---
kind: tutorial
sidebar: authoring
prev: /authoring/kata/
next: /authoring/guidelines/
---

# How to translate a kata
# Translations

_TBD: this page was imported from the old CW wiki and needs to be reviewed/redacted._
_TBD: improve this stub_

New translators may refer to the [tutorial(TODO)](/authoring/translation/).

Some [languages](/languages/) also have a page dedicated to authoring kata, with code examples and best practices.

Every translator should follow [translation authoring guidelines](/authoring/guidelines/translation/).

After being published, every translation goes through a series of [reviews](/curating/translation/) before it can be approved.

<!--
TODO: this page would relate to creating both initial language version, as well as new translation
Expand Down
60 changes: 1 addition & 59 deletions content/references/ui/kata-editor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,4 @@ next: /references/ui/kata-trainer/

## What is the Kata Editor?

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.

## Anatomy of a Kata

In order to create a kata you must first understand the elements of a kata.

### Name

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.

### Discipline

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

- Reference - Focuses on core language and API knowledge.
- Algorithm - Focuses on the logic required to complete the task.
- Bug Fix - Focuses on taking existing code, determining the issue and fixing it.
- Refactor - Focuses on taking existing code and making it better.

### Description

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.

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.

### Describing code examples for multiple languages

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.

The following is an example of how to provide example code blocks for both javascript and coffeescript:

~~~
```javascript
var a = []
```
```coffeescript
a = []
```
~~~

### Final Solution

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.

### Initial Solution

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.

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.

### Preloaded

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).

### Test Fixture

The test fixture is used to write code that will validate the kata solution.
The entire set of code in this block acts as a single test case. To validate solution code
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.
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.
4 changes: 4 additions & 0 deletions gridsome.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ module.exports = {
"/authoring/guidelines/kata/",
],
},
{
title: "Tutorials",
items: ["/authoring/kata/create-first-kata/"],
},
],
},
{
Expand Down