the fundamental law of programming

The Equation

R = (S * C) / D if G <= C
R = 0 if G > C

Variables

R - Rate of Progress

The rate at which you make progress toward your goal. Unbounded. Higher is better.

S - Skill [0, 1]

ValueMeaning
0Complete beginner. Never programmed before.
0.3Knows a language, can follow tutorials.
0.5Competent. Can build things independently.
0.7Senior level. Deep understanding of systems.
1.0Mastery.

C - Control [0, 1]

ValueMeaning
0No control at all. A fixed output. A screenshot.
0.2Squarespace. Drag and drop. Tiny configuration surface.
0.4Raylib. Simple API, hides most decisions from you.
0.6Unity/Unreal. Lots of knobs but within a framework.
0.8Custom renderer. You own the architecture.
1.0Raw syscalls and GPU registers. Total control.

D - Difficulty (0, 1]

ValueMeaning
0.01Press a button, thing happens.
0.2Raylib. DrawCube().
0.5Unity. Manageable but real learning curve.
0.7Custom renderer. Manual GPU memory management.
0.9Vulkan from scratch.
1.0Writing your own OS and graphics driver.

Note: D is (0, 1] not [0, 1] because D = 0 would mean zero difficulty, giving infinite progress, which does not exist. There is always some friction.

G - Goal Complexity [0, 1]

ValueMeaning
0.1Pong.
0.3Simple 3D game, few objects.
0.5Medium game, real scenes.
0.7Large open world, custom rendering.
1.0AAA engine, everything custom.

A tool can only achieve goals where G <= C. If the goal exceeds the tool's control, your rate drops to zero. You cannot get there.

Examples

Beginner using Raylib

S = 0.3, C = 0.4, D = 0.2, G = 0.1

G <= C, so R = (0.3 * 0.4) / 0.2 = 0.6

Beginner using a Custom Renderer

S = 0.3, C = 0.8, D = 0.7, G = 0.1

G <= C, so R = (0.3 * 0.8) / 0.7 = 0.34

Raylib wins. The beginner moves faster despite having less control.

Expert building a large scene with Raylib

S = 0.9, C = 0.4, D = 0.2, G = 0.7

G > C, so R = 0. Cannot get there.

Expert building a large scene with a Custom Renderer

S = 0.9, C = 0.8, D = 0.7, G = 0.7

G <= C, so R = (0.9 * 0.8) / 0.7 = 1.03. Achievable.

Interpretation

In the beginning, S is low and G is low, so you maximize R by minimizing D. Pick the easiest tool.

In the end, S is high and G is high, so you maximize R by maximizing C. Pick the tool that gives you the most control.

"In the beginning you want results, in the end all you want is control." - Eskil Steenberg


edit this page