Overview of the Diff Catalog

Overview of the Diff Catalog The Diff Catalog lets you access all you Diffs. Each Diff is an encapsulated “Mini Pull Request”, i.e. holds a PR title, a description and a set of file changes. You can view, edit, delete and create Diffs from this page.

Note: We use the wording “Pull Request” to stand for a defined change in code. This is not a real Pull Request, but a simulated one. On other platforms, it’s called a Merge Request, but means the same thing.

Viewing Diffs

Viewing a Diff A single Diff consists of a general title, and has several details.

  • Languages: Define the languages used in the Diff, e.g. TypeScript, JavaScript, Python, etc.
  • Coding Level: Define the difficulty level of the Diff, or the skill level required to solve it.
  • PR Title: The title of the Pull Request. This is part of the challenge that the candidate will see.
  • PR Description: A detailed description of the changes in the Pull Request. This is part of the challenge that the candidate will see.

Editing Diffs

Editing a Diff

Details

In the basic view, you can edit all the details as described above. You can also delete the Diff. Please note that the PR title will be visible to the candidate, so make sure it’s clear and concise. The Diff Title is for internal use and will not be visible to the candidate.

Adding Annotations

Adding Annotations You can add annotations to the code by clicking the small blue “+” icon that appears when you hover over the code. These will not be visible to the candidate, but can be used to mark special or tricky areas in the code. When you create an interview later, you can check if the candidate found these points.

Basic Markdown is supported in the annotations, so you can bold, italicize, or add bullet points, too!

Click on “Create Annotation” to save the annotation.

Editing the Source

The source edit view accepts a special kind of code, called a diff chunk. This is a standard way to represent changes in code. You can find more information on the Unified Diff Format on Wikipedia.

Did you know? You can add “.diff” to any Github Pull Request link and get the raw code for the changes. This is the same format that we use in Diffy!

Creating Diffs

Import from Github

  • Click on the “Get Github Token” button in the Diff catalog. A window will open where you can log in to Github and authorize Diffy to access your repositories.
  • After you have authorized Diffy, you can click on “Import from Github” in the Diff catalog. Diff Import Dialog Select a repo from the list, and the PRs will be loaded. You can then select a PR and import it as a Diff. The content of the PR will be copied to the Diff, and you can edit it as needed.

Next: Applications