New documentation for Codewars. Still work in progress.
codewars / docs Goto Github PK
View Code? Open in Web Editor NEWThe Codewars Docs :construction: WIP
Home Page: https://docs.codewars.com
License: MIT License
The Codewars Docs :construction: WIP
Home Page: https://docs.codewars.com
License: MIT License
pictures of the different items (categories, glossary, ...) are pretty big, but have no effect. The user has to aim for the text below.
Extend the link area to the related picture.
A couple of pages related to beta process and beta kata:
Changes are collected in #131 and it's still work in progress, but any ideas, remarks and reviews are welcome.
"Getting started" docs contain links to other areas of docs, which are not available yet. Currently these links are just placeholders marked with TODO, and they need to be filled in when a linked document becomes available.
Occurrences, dumped from VSCode "Find" window:
I:\prv\CodeWars\repos\docs\content\getting-started\community.md
20,34: See this [detailed documentation (TODO: direct link to Labels reference? same link than the one at the end of the "Communication" part)]() about the different kinds of labels and their use.
22,46: Discourse posts support [Markdown formatting (TODO: link to Markdown reference)](), so you can use some styling, or present your code neatly with [code formatting blocks (TODO: direct link to chapter on code blocks in Markdown docs)]().
22,171: Discourse posts support [Markdown formatting (TODO: link to Markdown reference)](), so you can use some styling, or present your code neatly with [code formatting blocks (TODO: direct link to chapter on code blocks in Markdown docs)]().
30,135: There's a set of rules you should follow to keep interaction with other users a good experience for both sides. You can find them in _(TODO: where? Code of Conduct, some discourse guidelines?)_.
38,9: - [Chat (TODO: link when ready)]() on Zulip,
39,19: - Codewars [forum (TODO: link to Discourse forum)]()
I:\prv\CodeWars\repos\docs\content\getting-started\finding-kata.md
31,64: Details of kata search page are described in [UI documentation (TODO: insert link to documentation of kata search panel)](), but here are some useful hints for beginners:
I:\prv\CodeWars\repos\docs\content\getting-started\kata-solved.md
21,59: More information on ranks and progress can be found [here (TODO: add link to docs on progress)]().
25,160: 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)]().
25,208: 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)]().
I:\prv\CodeWars\repos\docs\content\getting-started\setting-up.md
17,52: You can find all options described in detail [here (TODO: insert link to actual documentation of UI)](), and below are listed ones useful to get you running as soon as possible:
22,137: - **Clan** - fill this in if you'd like to team up with your friends, group, or organization. More on Codewars clans can be found [here (TODO: link to clans doc)]()
28,96: - **Default Catalog List View** - default setting for **"Status"** filter on kata [search page (TODO: link to docs on kata search page)](). Beginners are advised to set it to **"Approved Only"**, but if you want to participate in [beta evaluation process (TODO: link to docs on beta process)](), you can set it to any value you like.
28,256: - **Default Catalog List View** - default setting for **"Status"** filter on kata [search page (TODO: link to docs on kata search page)](). Beginners are advised to set it to **"Approved Only"**, but if you want to participate in [beta evaluation process (TODO: link to docs on beta process)](), you can set it to any value you like.
39,63: Again, detailed description can be found in [UI documentation (TODO: insert link to actual documentation of UI)](), but things needed to get you started are briefly explaned below:
I:\prv\CodeWars\repos\docs\content\getting-started\solving-kata.md
9,69: 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`.
22,282: t-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.
39,287: empt, 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.
Add data/glossary.yml
listing Codewars terms and definitions. Generate a page from it and reference to it from other documents.
Use DocSearch when we have contents written. The current search works only for the headers from MarkdownPage
.
See #65
We need some documentation for new users. This document should provide information to help them get started without overwhelming them with too many new concepts.
We should discuss what needs to be included first.
Placeholder: https://github.com/codewars/docs/blob/master/content/getting-started.md
Feel free to comment for any thoughts. Also, assign yourself to let the other members know you're going to work on it.
To keep this usable: if you wanna suggest ideas, post a reply to this issue. The maintainer/assignee will then update the present message.
In addition, if you may find from time to time some of the following acronyms:
- term: Test Driven Development
description: A software development process ...
acronym: TDD
see: /path/to/a-page/
links:
- title: Test-driven Development (Wikipedia)
url: https://en.wikipedia.org/wiki/Test-driven_development
type Term {
id: string; // (Optional on the user's side) Slugified word. Must be unique. Assigned with `slugify(term)` if unspecified.
term: string; // The term in our glossary
description?: string; // Description of the term in Markdown. Converted to HTML during build.
acronym?: string; // (Optional) acronym form.
see?: string; // (Optional) path to a PAGE in our docs. The title will be set automatically
links?: // (Optional) List of external links
{title: string; url: string}[];
}
The id
can be used to link directly to the word
Use |
on the first line
Markdowns are supported
term
property (using markdowns)links
: for external links. Opens the link in a new tabsee
: for internal links, but only to a page, not to an anchor in the page. Opens the link in the current tab. ...
- description: See [example tests](/glossary/#example-tests-id)
Careful with descriptions/strings that contains a colon :
...
description: |
for katas: blablabla // -> WORKS
description: for katas: blablabla // -> FAILS
when selecting code in code blocks, the background is very dark and the selection is "highlightened" in dark brown, making it close to invisible (it's even worse in light mode, since the outer background is making the selection harder to see).
something with "higher contrast"...
Currently, the width of the different pages on docs.codewars may be pretty narrow. In full screen mode, I get this:
Would be nice(r) to either:
This problem makes the glossary rather massive too: the middle column is as narrow there as it is in the picture above, making some longer definitions looking pretty... "bad" (see the preview of the PR #31 )
We should write documentation with purpose and target audience in mind.
Lines 9 to 36 in 409a7cd
Reference: https://documentation.divio.com/
Currenlty pages describing a language supported by Codewars are quite comprehensive, but I think they could be both standardized and a bit richer. I thought about including following information:
✔️ - already is there
❌ - is not there, IMO important
❓ - could be useful, but not sure
What do you think? What else would you add?
The links are showing up at the same indentation (in red) than the words to define
link indentation = 2 * description indentation
?)Prepare some kind of HOWTO about creating translations and translations best practices.
I have some idea in my head, but if anyone would like to share theirs, go ahead.
Breakdown of #5 .
Move https://github.com/codewars/codewars.com/wiki/Kata section to new docs.
I plan to move all pages in one go, in initial approach do not focus too much on the content, but move files, update markdowns, add navigation, fix errors etc. Content organization issues will probably appear in the process, and then we can think what move where and how to tag it.
Any ideas, as usually, are very welcome.
I noticed I use "Katas" while hobovsky use "Kata" as plural. Unnamed already talked about that too.
We should always use the same way throughout the whole documentation, so which one will it be?
Move "Honor & Ranks" page from old wiki to new docs (breakdown of #5).
I will think how to organize stuff there to make it clearer and more exhaustive, but if anyone has any ideas or suggestions for this section, Please post them here.
I guess everything is in the title...
See #65
I can't do this right now, and I don't want to forget:
Troubleshooting FAQ could use some additional bullet points in "confusing tests output" section:
all in the title...
todo:
On this page: https://docs.codewars.com/references/ all uppercase links come before lowercase links, what makes for example ZUT
appear on the middle page.
Centralization of sets of rules to follow or informations when writting docs.
Technical matters:
Content matters:
Troubleshooting:
For creating new documents:
The default hierarachy MUST be precisely followed, because it's used as a base to atuomatically build the ToC.
# Page Title
: must be unique in the document. This is name of the page## Section Title
### Subsection Title
Note: you cannot make "jumps" in the heirarchy, like forgetting ##
on purpose and go straight to ###
. This will cause rendering errors.
See for example this page: https://docs.codewars.com/getting-started/registering/
The sidebar on the left is created in the gridsome.config.js document, a the root level.
The Table of Content (ToC) is automatically created when the page is rendered according to the headers used in the document. Hence this implies some constraints on those headers/titles:
To put at the beginning of the pages, so that the documents are associated with the related "'stuff" (fields are optional):
---
description: ""
kind: reference
topic: markdown
sidebar: docs
prev: /docs/writing-content/
next: /docs/settings/
tags:
- docc
- deploy
- short
---
Warnings:
kind:tutorial
doesn't work, but kind: tutaorial
does)perv/next
have to be rendered path, not file paths (see links section)See #8 (ext. documentation: https://documentation.divio.com/).
External links: just like usual:
[text](https://...)
For links to terms of the glossary, use the following syntax: [text](/glossary/#id)
, where the id
is either the slugified term
itself (lowercased string, replacing whitespaces with hyphens) or the id
filed if manually defined (code file: glossary ; related issue: #23 ).
For other internal links to the docs, use the path of the rendered page (not to be confused with the file path!).
For example, if the Markdown file is at content/foo/bar.md
, its (rendered) path is /foo/bar/
.
Exceptions are index.md
files: they are treated like index.html
so content/foo/index.md
is at /foo/
.
file: docs/content/references/markdown/extensions.md
link; [check the Codewars Mardown extensions](/references/markdown/extensions/)
file: docs/content/references/markdown/index.md
link; [check the Mardown reference page](/references/markdown/)
Alternative syntax using "references", for internal or external links:
It's possible to define references
so that the complete path of the link doesn't decrease the readability of the text:
link: [check the Codewars Mardown extensions][mark-ref]
reference: [mark-ref][/references/markdown/extensions/]
put preferably all the references at the end of the file (see example here)
Use regular html comments:
<!---sqrtgstg--->
#74 (comment): Inspiration can be taken from Google's developer documentation style guide.
Some points to kee in mind:
Codewars
, not "CodeWars"Kata
, Kyū
, Dan
, Kumite
(#63)user(s)
Pictures can be stored in a subdirectory if needed. Preferably called img
if used.
Related code:
<ThemedImage
alt="Follow Button"
sources={{
light: require("./img/follow_light.png").default,
dark: require("./img/follow_dark.png").default,
}}
/>
See #164
Documentation: See https://gridsome.org/plugins/gridsome-plugin-remark-container
:::keyword optional_title
some content
:::
Examples of info boxes (that's how they look at the moment of writing, but they can be modified, extended, or styling can be changed), with in order: tip
, note
, details
, important
, warning
, danger
(related: #7)
If you need to temporarily deactivate the linter (ex: "the data is built in suach a way..." raises an error asking to change for built-in
), use this:
<!--- textlint-disable -->
...(your problematic paragraph here)
<!-- textlint-enable -->
or
<!--- For false positive "built in" -->
<!--- textlint-disable terminology -->
...
<!--- textlint-enable terminology -->
If you get everything in red in the pull request, here are some things to check:
Details
on the result of the linter check to see if some words or expressions are considered invalid (see above)If the linter is ok but not the other checks, verify that
#
as title###
, you must have #
and ##
somewhere beforeIf all checks are green and the ToC or the sidebar aren't showing up:
From #124:
For "how to write comments effectively", we can do a Codewars version of Getting Answers (or How To Ask Questions The Smart Way). We should have something to point to with good examples when we have a user who doesn't know how to ask a question or opens issues too quickly. We can also show this before their first comment in the future.
Breakdown of #139.
Any ideas and/or links to existing stuff are welcome.
For kata description, we should have some recommended style (what to include, how to structure, etc).
I will also include a note that not all guidelines fit all types kata and some of them can be ignored if not applicable.
Proposed guidelines:
At the moment, these kind of links can be assigned to Terms
objects:
links
propertysee
propertyIt's not possible to link terms of the glossary between them
Be able to link terms of the glossary to one another, like:
- Example tests: blablabla
...- Sample tests: see example tests
Add... something... and what's needed with it so that one (or even both) of the following is possible:
Term.term
property of the target- term: Sample tests
description: "See [example tests](#Example-tests)."
- term: Sample tests
description: ""
anchoredTo: "Example tests"
or possibly, to avoid to have to update that new property if a term
is changed:
- term: Example tests
description: ...
anchor: ThisWouldBeAnAnchor
...
- term: Sample tests
description: ""
anchoredTo: ThisWouldBeAnAnchor
And that would automatically add the link below the term in the glossary, linke the links
or see
properties.
the anchor
property could be by default a "slugification" of the term
propoerty as long as it's not defined.
Both would be optionnal.
Link to Zulip when we're ready to allow normal users to join. Write some guide to educate users how to communicate effectively.
I'm going through @Kask's message on zulip, and I'm wondering if we shouldn't try to only use the [text][refLink]
syntax: this way, the actual links are stored once and for all at the bottom of the file, so if ever an update is needed, it's way easier to maintain.
Opinions?
Example (the index page for the markdowns):
Codewars supports [Markdown][wiki-markdown].
More specifically, [GitHub Flavored Markdown][gfm] (strict superset of [CommonMark][common-mark]) and few [Codewars extensions][extensions].
<!-- the following lines are defining the links and aren't visible in the rendered page -->
[wiki-markdown]: https://en.wikipedia.org/wiki/Markdown
[common-mark]: https://commonmark.org/
[gfm]: https://github.github.com/gfm/
[extensions]: /references/markdown/extensions/
I'll update #74 accordingly.
Here we can discuss more in detail what should be added there. I'll store some ideas at the same time.
First, a lot of things when it'll come to explain how to write "good tests" will be pretty generic. So I believe we might actually writte that generic version first, listing there some of the usual traps to avoid.
Then a more precise guide, python specific.
Here are some ideas to use as a stump:
it
block rather than at the top level or in a describe
block, especially for the random tests. This way, when the tests are passed, the user doesn't end up with a wall of Test Passed!
in the output panel (in addition, this allowes to see the timings for the block(s) without the need to scroll all the way down.(or not!? B4B)
add snippet explaining how to access the solution of the user (length/chars constraint)
Feel free to dump some ideas.
This is a reminder coming from this message in Finish the Markdown reference/tutorial:
(B4B)
- Do you (plural) think we need a tutorial or recipe about markdowns yet?
- If so, do we make it a stand alone thing, or do we rather incorporate it to something else (like, writing descriptions)?
(kazk)
Not really for Markdown itself, but I think we should have something for "how to write comments effectively" and also "how to write kata descriptions". For kata description, we should have some recommended style (what to include, how to structure, etc).
Docs could use a set of recipes with guidelines on authoring: creating kata, translations, writing tests, etc.
My current idea is to create structure of docs with following sections:
What do you think?
See #74 how to do this.
Prepare light mode equivalents of screenshots, put img references in md files.
Remove the placeholder docs from the starter and fix any affected parts (e.g., sidebar, missing fields).
Suggestion from kazk:
Any idea where CoC and organizational stuff would fit in current docs and in repo?
Maybe under
/community
.
/community
overview/community/teams/
organizational stuff. List of admins, mods, explain crown/shield, etc./community/rules/
list of things that's not allowed within the Codewars community. The current CoC might need rewrite, I read somewhere that it's better to list things you're not allowed to do explicitly rather than listing how you should behave because the latter can be subjective.
I do not have a good idea how to reorganize CoC, so maybe, for the start, I will just import existing one. I will think about it.
Another question would be navigation: how to get there from the landing page? Use some other kind
of doc? Or make it a concept
of community?
Ideas are welcome!
WARNING
those links are from the first version of the troubleshooting page (before splitting)
244: to create: [code formatting TODO](https://github.com/Codewars/Codewars.com/wiki/Markdown-Formatting)
250: to create: [this Codewars wiki page TODO](https://github.com/Codewars/Codewars.com/wiki/Kata-Discourse)
260: Zulip? [general TODO](https://gitter.im/Codewars/Codewars.com)
Zulip? [kata solving help TODO](https://gitter.im/Codewars/Codewars.com/kata-solving-help)
file (once merged): https://github.com/codewars/docs/blob/master/content/recipes/troubleshooting-solutions/troubleshooting-your-solution.md
We agreed that some forms should not be used. We were also advised to avoid some constructs. Maybe we could enforce them with additional linter rules? There's already rule for CodeWars
, so maybe we could also have:
Maybe you can think of some more. They don't have to be errors, they can be warnings if appropriate (yeah, I read through warnings, usually)
What do you think?
For some screenshots, it might be better to use the version matching the current theme (dark mode on/off).
This should be possible using dark:hidden
and dark:block
variants:
<div class="block dark:hidden">
![alt](./light.png)
</div>
<div class="hidden dark:block">
![alt](./dark.png)
</div>
Wrapping in <div>
because we can't use <img>
tag with relative paths in Markdown at the moment.
#62 added a stub page for basic Markdown syntax and we need to complete it. The page should be minimal and easy to scan. Any nonstandard Markdown features were extracted into a separate page.
Basic Markdown that most users use is extremely simple and should focus on that. For example, GitHub's Markdown Cheat Sheet looks like this:
Include the syntax for:
I'm not sure if it's worth including the result. For most of them, it'll look very similar to the original syntax and it's pretty obvious. It can look slightly different on Codewars because different libraries are used and CSS is different. For Headers, it'll also mess with the table of contents as well.
/concepts/kata/translations.md
has some placeholders to be filled in with links to documentation which is yet to be written:
To get a better idea about how the thing will eventually work:
So, I guess every "entry point" for documentation will land as an icon in the bottom part of the screen. This leads to some questions:
reading through https://github.com/codewars/docs/blob/master/src/pages/Index.vue, it seems they are automatically displayed in the order the components are inserted into this file (g-link
parts). Right?
Like, to have line separations or something in the home page to split some icons from others?
On this, and if the previous point is possible, I'd see the following:
Here is the critical point, imo. 'Time to define some ways of splitting the docs so that we can have a better idea about where we are going.
I'd go for the followings (in random order and non exhaustive, ofc), the idea being that those categories could contain sub parts possibly used at several different places:
getting started (not sure if it's good to have it doubled with the link in the center of the page but...). See #40
codewars general informations, that would roughly be filled with :
codewars UI (detailed/exhaustive version of what I suggested to add to the "getting started" part. Not entirely sure it deserves a specific topic, tho)
beta process
kata authoring and translating
(I put the info there otherwise it could be lost in zulip at some point: authoring tutorial: give credit to the original source when needed
)
Codewars' users
tutorials (possibly linking other parts in the previous sections).
Maybe a FAQ section would be a good addition. That would only be another way for the users to go/access to informations spreaded in other places (idea comming from @Steffan153 's post on zulip )
Here are my 2 cents...
@kazk: is that in your line of thougths for the docs?
Some other ideas randomly stored there
We currently have two Python test framework docs.
Based on these, we should create:
The guide should describe how to write tests. The reference should list all the assertion functions and example usages.
Later, we can also add another page for specific topics, e.g., writing random tests.
Feel free to comment for any thoughts. Also, assign yourself to let the other members know you're going to work on it.
Move "Privileges" page from old wiki to new docs (breakdown of #5).
I will think how to organize stuff there to make it clearer and more exhaustive, but if anyone has any ideas or suggestions for this section, please post them here.
Any hint on where it should be located in current docs could be helpful.
Here are listed the topic
fields used throught the whole documentation, in alphabetic order.
Topics are used to identiify the subject of the page/group of pages. It is (will) be used to build the table of contents.
Goal: avoid spreading the same topic on different keywords (like test
, tests
, testing
, ...)
I have more than 1500 reputation and already created a couple of Javascript kata
I´d like to create a sql kata, but I have no clue about how to start with
Is there a tutorial or a complete example that I could have a look at?
I can only see the test cases but I don't know how to setup the initial data (create table, inserts, etc) or the expected result.
thanks a lot
C++ kata often produce unhelpful assertion messages, because authors do not know how to work with stringizers and other mechanisms of Snowhouse framework.
See Getting better output for your types for reference and provide some example how to create a stringizer for custom or library types (std::pair<int, int>
being quite common), and where to put it in the kata (preloaded, tests?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.