Codility has developed a new custom coding task option, allowing authors to define conditions and expected behavior evaluated by unit tests.
Candidates receive explicit requirements specified through unit tests and are free to write code using more complex entities, to meet the unit test requirements. This approach offers authors a way to write tests for a broader range of problems with less effort and a lower risk of errors. Moreover, this way of testing is closer to how developers write and test code in practice. Candidates also benefit, as they now can use their creativity and problem-solving skills more freely.
The new custom coding task currently supports 20+ programming languages including:
Python, Javascript, C#, Java 17, PostgreSQL, C++, Ruby, TypeScript, PHP, Kotlin, Go, Dart, Scala, Rust, Swift, Elixir, R, Bash, HTML+CSS.
Getting Started:
To create your own custom coding task, navigate to Create task and select "+ Create task". Upon selecting this option, you'll find a list of task styles available and you can select Technology-specific coding to begin creating your content. You can also select Technology-agnostic coding if you'd like to build tasks similar to our Fundamental coding tasks.
Task Details:
Once you're on the editor, the first section to complete is the Task Details. Here you'll be able to complete the following fields for your task:
- Name
- Think of a name that will be easy to find for you and your colleagues to find in your Task Library.
- Synopsis
- Write a short summary of what the task is about.
- Time limit
- We recommend setting a more relaxed time for candidates to solve the task.
- Description
-
This is the text your candidates will see in the Codility code editor.
-
Make sure the requirements and instructions are clear, so your candidates can easily understand the problem they will be solving.
-
As you work through completing each section, it is designed to autosave your work as you switch between sections. You can reference the top right of the page to see the saved confirmation for reference.
Problem Description:
Now that you've completed the task details, it's time to work on the next section of the editor, the Problem description.
In this step, you'll be presented with a file tree that consists of 3 files: tests, initial, and golden. Each file will end with the extension related to the language your task is in. For example, if we were creating a Python task then you would see the files of tests.py, initial.py, and golden.py in the file tree.
- Tests file: Here is where you would write the unit tests for the task you have created.
- Initial file: This file is where you can specify the starting code available to the candidate when the task first loads in the editor.
- Golden file: The golden file is where you can write your perfect solution for the described problem you've created.
If your task requires working with multiple files, you can add more files and folders as needed:
Once you've completed the file tree for your task, be sure to use the Run Tests option to validate your content. The Run Tests option will evaluate your Golden file against the test cases you created and ensure the output matches the expected unit test. If a unit test fails, you will see which unit test the Golden solution failed so that you may review and edit as needed.
If you are creating a task that will be used in an interview, you can use the Interviewer hints toggle (on the right side from the Task description):
This will open an additional section of the task which can be viewed only by the interviewer and will bring additional context. With the help of these hints, interviewers will have guidance during an interview and will be able to properly introduce a task to a candidate, give the candidate tips and tricks while they are trying to resolve the task, and see possible solutions.
Publish Task:
Once you're happy with your task, the final step is to Publish your task. You will find the Publish Task button located at the top right. During this step, we will automatically evaluate the AI Resistance of your custom task. This process may take a few minutes to complete and you will have the option to Skip and Publish if you prefer.
You'll then be able to see your published task in the library and have the ability to use the "Try task out" button if you'd like to give it a test drive.
(Important note: Trying a task out does not deduct an invite from your account balance).
Additionally, when searching for your task in the Task Library, you'll find it located under your Company Name's tab. Any unpublished Technology-specific task will be available for you to review and continue editing under Create tasks.
Feel free to reach out to your Customer Success Manager or support@codility.com if you have any additional questions.