Skip to main content

Solutions

Each time a warrior completes a kata within a given language, their solution is added to the list of successful solutions for that particular language. After completing a kata you are immediately taken to this page, often giving you an Aha! moment when you realize how others have completed the same task. This moment can be incredibly enlightening if you come across solutions that had a different approach than yours.

Who can see solutions?

Code Warriors are able to view the solutions to a kata under one of the following two conditions:

  1. They have completed the kata: Once you have completed all of the tests and submitted your final version, you will be taken to the solutions page.
  2. They have forfeited their honor: If you choose to give up on the kata, you can click the Unlock Solutions button within the kata trainer. This will forfeit any honor and rank progression that you could earn on the kata. You will then be taken to the solutions page.

Solution Groupings

A basic algorithm is used to try to match new solutions to existing ones, so that the list does not become littered with duplicate solutions. Basic syntax structures, comments, and in some cases, alias method names, will be removed so that solutions can be compared.

When two or more solutions are grouped, then the first submitted one is used as a representative solution from this group and presented on the Solutions page.

Solution page

TBD

Voting

TBD

Comments

TBD

Forking solutions

TBD

Invalid solutions (?)

TBD

  • Penalty for invalidation
  • Automatic invalidation
  • Manual verification (?)

Where to see solutions

TBD

  • Solutions tab on kata
  • Solution page
  • Discourse View solution collapsible
  • Solutions tab in profile (Refactor button)
  • Past solutions tab in trainer