A code editor built for learning

Snipcode gives you a proper editor and a machine to run your code on, without asking you to install a compiler first. Here is what it does and what happens in the seconds after you press run.

Python Java
averages.py

src

averages.py

helpers.py

data

marks.csv

1 from helpers import mean

2 marks = [7, 9, 8]

3 print(mean(marks)

Expected ')' at Ln 3, Col 20

What the editor gives you

Enough of a real development setup to learn on, and none of the parts that get in the way.

An editor that understands the language

Syntax colouring, bracket matching and sensible indentation for Python and Java. It behaves the way an editor should, so the language is the only thing you have to think about.

Mistakes underlined while you type

Snipcode parses your file as you write it and marks the exact line that will not compile. The Problems tab lists them with a line and column number, so you fix the cause instead of reading the fallout.

A terminal that talks back

Output arrives as it is printed, not in one lump at the end. When your program calls for input, the terminal waits and you type the answer straight into it.

Real files and real folders

A workspace is not one lonely file. Make folders, split your code across modules, import between them. The tree on the left works the way you would expect it to.

Bring files in from your computer

Upload what you already have into any folder in the tree. Useful for the data file an exercise reads, or for picking up work you started somewhere else.

Two people, one file, at the same time

Start a Cowork session and somebody else can open the file beside you. You see their cursor and every character as they type it, and they see yours. Invite them with a link, a code you read out, or a square they point a phone camera at. Whoever presses run runs it on their own machine — the code is shared, the terminal is not.

You decide what a guest can do

Somebody joining can be given editing or left watching, and you can change your mind while the session runs. Watching is enforced where it matters rather than by hiding a button: a viewer’s changes are refused before they reach the shared file.

Readable on a phone

Writing code on a phone is miserable and Snipcode does not pretend otherwise. What it does instead is let you read — the brief, the file as you last saved it, what the tests said and what you scored — so "what was I supposed to do again" is answerable from a pocket.

The same editor without a connection

The desktop version keeps your assignments and your work on the computer, runs them with the Python or Java already installed there, and hands them in when the network comes back. It is the same editor, with your own files and your own folders.

Saving you never think about

Every change is written as you make it. Close the tab in the middle of a line and it is waiting for you next time, on whatever device you sign in from.

What happens when you press run

Your code never runs in the browser tab. It goes somewhere safer, and comes back.

  1. 1

    You press run

    The file in front of you is sent to a runner that has been waiting for work. Nothing is compiled or executed on your machine, which is why a slow laptop makes no difference.

  2. 2

    A container starts, just for you

    Your code runs alone in a fresh container with its own memory and its own clock. It cannot see anyone else's session and nobody can see yours.

  3. 3

    Output streams back as it happens

    Every line your program prints is pushed straight to the terminal in your browser. If the program asks for input, what you type goes back down the same connection.

  4. 4

    The container is thrown away

    When the program finishes or the clock runs out, the whole thing is destroyed. Nothing carries over to the next run, so every attempt starts from the same clean state.

Terminal

$ run averages.py

Connecting to sandbox…

How many marks? 3

Average: 8.0

Exited with code 0 in 214ms

The limits, stated plainly

A run is meant to finish while you watch it. These are the ceilings, and they are the reason an accidental infinite loop costs you nothing.

Up to 60 seconds

for a single run

30 seconds idle

waiting on input before it closes

128 MB of memory

for each container

Long running services and anything that needs to reach the wider internet are outside what this is for. It is a place to learn a language, not a server to deploy on.

How marking works on set work

When an exercise comes from a teacher it carries tests. Each one feeds your program some input and compares what it printed against what was expected, character for character. You see the tests your teacher chose to show, run them as often as you like, and know the result before anyone marks anything by hand.

Tests
  • Handles three marks
  • Handles a single mark
  • Handles an empty list

2 of 3 passing

Open a workspace and try it

Create a free account