Skip to content

Correct is only
half the answer.

Your next break
has a condition.

Set a focus timer. When it expires, CodeLock takes the screen. The way back is code that passes every test and meets the runtime budget.

Free
Source available
No account required
No metered application APIs

The interruption

The timer ends. The problem begins.

Fig. 01The desktop shell gives the display to a problem and an editor. This is the lock surface; a browser tab cannot enforce it.

The condition

It works.
It is still
too slow.

Correct output answers one question. The runtime budget asks another: did you find an efficient way to get there?

Read the arithmetic →
Fig. 02Three tests passed. At 420ms against a 189ms budget, this captured demo run is rejected as too slow. Correctness alone does not clear the gate.

The capture records one run, not a benchmark for your machine. Reference runtimes are calibrated per language on your own judge hardware.

Try the arithmetic

A threshold.
Not a feeling.

The default budget is best × 1.35 + 40ms, rounded up to a whole millisecond. Of two timed runs, the faster one counts.

The unlock conditionIllustrative runs

Two Sum · JavaScript

gate = best 108ms × 1.35 + 40ms = 186ms

O(n²)Nested loop over every pair431ms / 412ms → 412ms

still locked · roughly 3.8× slower than the best known answer

All three examples pass the tests. Only one clears the gate. Select an attempt to compare; these timings illustrate the calculation.

The curriculum

1,219 problems.
None of them solved yet.

Problems are grouped by the pattern they teach and climb from foundations upward. The ladder moves with you: clear problems and they harden, step away because a problem was too hard and they ease off.

1,219 problems · 19 familiesYour progress: none yet
  1. 01Foundations60
  2. 02Arrays & hashing385
  3. 03Two pointers72
  4. 04Sliding window44
  5. 05Stack46
  6. 06Binary search38
  7. 07Linked list35
  8. 08Trees44
  9. 09Tries10
  10. 10Heap & priority queue35
  11. 11Backtracking31
  12. 12Graphs37
  13. 13Advanced graphs6
  14. 14Dynamic programming, 1D34
  15. 15Dynamic programming, 2D16
  16. 16Greedy63
  17. 17Intervals33
  18. 18Maths & geometry124
  19. 19Bit manipulation51

Counted from the corpus as it stands, and growing. Nothing is filled in until you solve something. Solve the demo →

Who decides

The page does
not get a vote.

Every test passesANDRuntime ≤ budget

The API signs the session’s unlock token.

The desktop shell checks the signature and the session it belongs to. The page cannot simply declare itself unlocked.

The API does not authenticate requests. Keep the entire stack on your machine or a trusted private network, off the public internet. This is a commitment device for its owner.

The limits, before you install

A commitment.
Not a cage.

Every platform has a way out. The purpose is to make returning to the work a deliberate choice. The hardware is still yours.

Desktop
Electron kiosk shell. Lock state is restored on relaunch; reboot recovery remains unverified.
Ctrl+Alt+Del, ending the process, or a power-off defeats it.
Android
Native overlay and boot receiver exist. Not yet verified on a device.
Force-stop, Safe Mode, uninstall, or revoked permissions defeat it.
iOS
No hard lock. CodeLock reports it as unsupported.
No app can block another through CodeLock. Family Controls is not implemented.
Browser
A place to try the interface, not a lock surface.
A tab can always be closed.
The complete escape ledger, including unverified behavior →

Put a problem
in the way.

Install CodeLock Free. Source available. Yours to run privately.