• This repository has been archived on 07/Oct/2022
  • Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Powers multi-language support for CodeCrafters challenges

This repository was previously used to power multiple language support for CodeCrafters challenges.

IMPORTANT: The content in this repository has since been migrated to challenge-specific repositories like this:

New PRs must be sent to the above repositories. We're still updating docs around contributing support.

Table of Contents

Objective

The language one uses for a CodeCrafters challenge is an integral part of the challenge experience. A few questions to think about:

  • Is it easy to setup locally?
  • Does the standard library have all required functions to complete the challenge?
  • Are there any tricky areas where people are likely to get stuck?

We'll tackle these problems through a combination of:

  • Sample code to get started
  • Troubleshooting advice in the README
  • Helpful language-specific hints in stages wherever applicable

Components

For a language to be supported in a specific challenge, we need the following things in place:

  • A Dockerfile, which'll be used to build the container where code is evaluated.
  • A starter repo, like this one.

Dockerfile

You'll need one Dockerfile per language version supported. These'll be placed under the dockerfiles/<course> folder.

The Dockerfile needs to setup the language + all required dependencies, and make the tester executable available at /bin/tester.

Wherever possible, utilize Docker's build cache.

Starter Repo

The starter repo needs to contains the following files:

  • codecrafters.yml
  • README.md
  • An executable script / entry point, based on the challenge. your_docker.sh for Docker, your_git.sh for Git etc.
  • An app folder, that contains boilerplate code that the user will build upon. This code must also include a section that can be commented out to pass the first stage.

Any language-specific code must adhere to common conventions or style guides for that language.

Since starter repos for different languages are likely to have a lot of similar code, we use templates to create these. The raw files are under starter_templates, the compiled versions are under compiled_starters.

Constraints

Fast build times

Slow build times drastically affect the codecrafters challenge experience. Building an image for a language and executing the starter should be snappy - ideally under 1 second.

To achieve this, we use Docker's build caching.

Easy to start

The experience of downloading a repository, running it locally, receiving results via a git push etc. can be pretty daunting to a new user who isn't used to how CodeCrafters works.

We make this easier by adding a concise step-by-step README, and also including all code needed to pass the first stage.

Contributing

Thank you for considering contributing to this project!

Here's a detailed guide on Adding support for a new language. If you need help, feel free to ask in the Discord server.

More Repositories

1

build-your-own-x

Master programming by recreating your favorite technologies from scratch.
254,762
star
2

learning-stipends

Companies that support engineers with learning stipends
202
star
3

build-your-own-redis

Definition for the redis challenge.
Dockerfile
79
star
4

build-your-own-git

Definition for the git challenge.
Shell
72
star
5

frontend

Rebuild complex systems from scratch
JavaScript
52
star
6

build-your-own-sqlite

Definition for the sqlite challenge.
Shell
34
star
7

build-your-own-bittorrent

Definition for the bittorrent challenge.
C++
31
star
8

build-your-own-docker

Definition for the docker challenge.
Dockerfile
13
star
9

sqlite-starter-rust

Rust
12
star
10

build-your-own-interpreter

Definition for the interpreter challenge.
Shell
11
star
11

redis-starter-go

Golang starter for the 'Build Your Own Redis' challenge
Go
11
star
12

build-your-own-http-server

Definition for the http-server challenge.
Shell
10
star
13

legacy-course-sdk

Shared code to test course definitions
Ruby
10
star
14

docker-explorer

A test program to help with the Docker challenge
Go
9
star
15

redis-tester

Go
8
star
16

redis-starter-python

Python starter for the 'Build Your Own Redis' challenge
Python
7
star
17

course-sdk

A rewrite of course-sdk, with better developer ergonomics
TypeScript
7
star
18

sqlite-starter-go

Go starter code for "Build your own SQLite"
Go
6
star
19

build-your-own-shell

Definition for the shell challenge.
Shell
5
star
20

docker-starter-c

C starter for the 'Build your own Docker' challenge
C
5
star
21

build-your-own-grep

Definition for the grep challenge.
Dockerfile
5
star
22

redis-starter-rust

Rust
5
star
23

sqlite-starter-python

Python starter code for "Build your own SQLite"
Python
4
star
24

git-starter-rust

Starter repo for the Build your own Git challenge
Rust
4
star
25

docker-starter-rust

Rust
4
star
26

coderbot-poc

A fully autonomous agent that can solve a CodeCrafters challenge
Ruby
3
star
27

docker-starter-swift

Swift
3
star
28

docker-tester

Go
3
star
29

redis-starter-haskell

Haskell starter code for the "Build your own Redis" challenge
Haskell
3
star
30

redis-starter-csharp

C#
2
star
31

fly-api-proxy

Deploy this inside your Fly organization to access the Fly machines API without setting up WireGuard.
Makefile
2
star
32

code-walkthroughs

Source code for CodeCrafters Code Walkthroughs
2
star
33

git-starter-ruby

Ruby
2
star
34

sqlite-tester

Go
2
star
35

sqlite-starter-swift

Swift
2
star
36

sqlite-starter-csharp

C#
2
star
37

docker-starter-go

Golang starter for the 'Build Your Own Docker' challenge
Go
2
star
38

docker-starter-php

PHP
2
star
39

coderbot

Ruby
2
star
40

git-tester

Go
2
star
41

docs

Documentation for codecrafters users and contributors
Ruby
2
star
42

grep-starter-go

Go
1
star
43

http-server-starter-go

Go
1
star
44

redis-starter-java

Java
1
star
45

git-starter-go

Go
1
star
46

oci-image-executor

Executes an OCI image using firecracker.
Go
1
star
47

ember-codemirror

1
star
48

redis-starter-ruby

Ruby starter for the 'Build Your Own Redis' challenge
Ruby
1
star
49

torrentcli

1
star
50

http-server-tester

Go
1
star
51

instant-pull-request-action

Create Pull Requests automatically when a branch is pushed to
TypeScript
1
star
52

builder

Builds images for execution on CodeCrafters.
1
star
53

shell-tester

Tester for the shell challenge.
Go
1
star
54

docker-starter-python

Python
1
star
55

react-starter-javascript

JavaScript
1
star
56

build-your-own-paul-test

Definition for the paul-test challenge.
Go
1
star
57

cli

CodeCrafters CLI to run tests
Go
1
star
58

redis-starter-clojure

Clojure
1
star
59

sample-sqlite-databases

Sample databases for the "Build your own SQLite" challenge
1
star
60

bittorrent-tester

Tester for the "Build your own BitTorrent" challenge
Go
1
star