code relay
code relay
Start Now!

Rapid fire open source coding.

What can you do in 15 minutes?

Welcome to codeRelay : The fastest and easiest way to contribute to open source!

Code Relay is a platform for contributing to open source code. What makes code relay unique is that instead of writing a whole bug fix, you make incremental progress and then pass it along to the next contributor. Like how you only run part of a race in a relay race and then pass the baton off to the next runner.

Code Relay is to coding as a relay race is to running:

  1. Just like a relay breaks up a footrace into a series of smaller races, Code Relay breaks up an issue into a series of small tasks!

  2. In the same way that a different athlete runs each leg of a relay race, Code Relay assigns each task to a different contributor.

You can start your first task right now:

Code Relay is back!

  1. Send an email to contribute@coderelay.io or open an issue code-relay repo
    Subject or issue Title: Contribute
    Body: Programming language/framework you want to work with
  2. By 7 a.m. Pacific time the next day, Code Relay will reply with your first task! Spend 15 minutes or less on it, break it down into smaller tasks, etc. Then pass it on to the next contributor. All the fun of coding without the responsibility.

That's it! Go from click to commit in 15 minutes!

Your name, email address, or any other personal information is not sold to or shared with any third-parties. Check out our privacy policy

Or keep reading to learn more about Code Relay.

Happy Winter!: ❄️Enjoy the snow❄️

CodeRelay: What is it?

Code relay is a development platform for writing open source software using the code-relay workflow.

Code Relay Workflow:

  1. An open source Maintainer uploads a task to Code Relay.
  2. do {
  3. Code Relay assigns this task to a Contributor.
  4. The Contributor only completes a small part of the task, passing the rest on to the next Contributor.
  5. } while(task_is_not_yet_complete);

Analogies:

  • Code relay is to coding as a relay race is to running.
  • Stack Overflow questions meets Github pull-requests

Let's break that down:

Open source maintainers, the owners and lead developers of open source projects, submit tasks to code relay. (Are you a maintainer? Learn how to submit tasks here)

Tasks like

  • Add some unit tests for this function
  • Document this class
  • Look for a fix for this issue

Code Relay assigns these tasks to "Contributors"

Become a Contributor!

Send an email to contribute@coderelay.io.

Code Relay will reply with a task.

So, Code Relay has replied to your email and assigned you a task. You are probably thinking:

You: "So, now I have to complete this task, right?"

Answer: No!

This is code relay, relay as in relay race. Your job is to take this task, and make incremental progress. You could:

  • Divide the task into two or more smaller tasks
  • Lookup relevant parts of the documentation.
  • Narrow the scope of the task.

It's not a marathon all-night coding session. You get in, and get out within...let's say 15 minutes!

That's it.

  • No hunting for issues tagged: "good-first-bug".
  • No ignored pull-requests.
  • No hassle
Just you and the code.

Code Relay: Why?

Here's something you may or may not know: the world runs on open source software. But, let's not sugarcoat things: up until now, open source was hard, thankless, work. Work done by a small number of dedicated and passionate volunteers. Volunteers who are now facing burn-out and the stark realities of people and companies using the fruits of their labor without giving back.

So let's give back. Let's give back with a vengeance. If each of us spent a few minutes a day, we could contribute an enormous amount of code, measured in billions of lines. No kidding. Let me show you, but first, let me introduce you to our goal:

Goal: Every software developer in the world to use CodeRelay for 5 minutes every day.
  • There are about 25 million software developers in the world (and growing!!).
  • Code relay takes a contributor about 5 minutes* to divide a task, and in that time, the developer contributes about two lines[1] of code

If we can get every one of the to spend 5 minutes a day working on open source code, using code relay. We will get:

25 million * 2 lines of code * 365 days = 18 billion lines of code per year!!

18 billion lines of code!

For comparison, that's enough to write :

  • left-pad: 400 million times
  • Chromium: 2000 times over
  • The linux kernel: 500 times
  • And all of Google's source code for all of their many services: 6 times[2]!
Every year! This is open source's missing link! We can make our own web browsers, operating systems, anything you can dream of. The future is now, so let's make it a good one.

[1] Two lines in 5 minutes is our goal. We don't have any actual statistics on this yet. Refer to thewiki to check up on this goal's progress.

[2]Source is here. Admittedly, the data looks a little outdated, and everyone knows that lines-of-code is a shaky measurement at best, but this is just some back-of-the-napkin math

Have better data? Please make a pull request here

Try it out!

Now that you took 5 minutes to learn what Code Relay is all about and why, the next logical step is to spend the next 5 minutes trying it out:

Start Now!

  1. Send an email to contribute@coderelay.io or open an issue code-relay repo
    Subject or issue Title: Contribute
    Body: Programming language/framework you want to work with
  2. By 7 a.m. Pacific time the next day, Code Relay will reply with your first task! Spend 15 minutes or less on it, break it down into smaller tasks, etc. Then pass it on to the next contributor. All the fun of coding without the responsibility.

That's it! Go from click to commit in 15 minutes!

Your name, email address, or any other personal information is not sold to or shared with any third-parties. Check out our privacy policy

Want to learn more about Code Relay?

Code Relay: When and where?

Any time. Any place.

FAQ:

Q: Does Code Relay cost anything?

No. Code Relay is free for both Maintainers and Contributors. Code Relay exists to make the world a better place.

Q: What do you mean when you say 'open source'?

All tasks submitted to Code Relay must be for a project licensed with an Open Source Initiative (OSI) approved license, which means the project meets OSI's definition of open source.

Practically, this ensures that all of your contributions are going to help the community, not to do someone's job for them.

Q: Does Code Relay replace GitHub, GitLab, etc.

No. This platform is meant to be used with those services, not replace them.

Q: Does code-relay replace the pull-request workflow

No. Code relay is meant to supplement current workflows, not replace.

Q: What backend are you using? Is it open source, where is the repo?

There isn't one, yet. Right now, I (@mmulet) respond to each email personally. When code relay grows large enough that it needs an automated backend, I intend to build it using code relay, and it will be open source.

Welcome to the bottom of the page.

Since you have ventured this far down, I have a treat for you. Below is the code for a game of life using the code for this game of life as the input!

Recursive life!

It's editable too, so happy hacking!

2 fps
"use strict";
var __rest =
  (this && this.__rest) ||
  function (s, e) {
    var t = {};
    for (var p in s)
      if (
        Object.prototype.hasOwnProperty.call(
          s,
          p
        ) &&
        e.indexOf(p) < 0
      )
        t[p] = s[p];
    if (
      s != null &&
      typeof Object.getOwnPropertySymbols ===
        "function"
    )
      for (
        var i = 0,
          p = Object.getOwnPropertySymbols(
            s
          );
        i < p.length;
        i++
      ) {
        if (
          e.indexOf(p[i]) < 0 &&
          Object.prototype.propertyIsEnumerable.call(
            s,
            p[i]
          )
        )
          t[p[i]] = s[p[i]];
      }
    return t;
  };
const lifeCanvasId = "life";
const codeId = "code";
const playGame = () => {
  if (globalThis.oldCode == null) {
    firstTimeSetup();
  }
  const cnvs = document.getElementById(
    lifeCanvasId
  );
  const context =
    cnvs === null || cnvs === void 0
      ? void 0
      : cnvs.getContext("2d");
  if (!context || !cnvs) {
    return;
  }
  context.font = "13px monospace";
  const color = "#282c34";
  let timeSinceLastDrawFrame = 0;
  let timeOfLastFrame = performance.now();
  let firstState = true;
  let evenOdd = false;
  const runLoop = (
    totalTimeElapsed
  ) => {
    if (!globalThis.runningLife) {
      return;
    }
    requestAnimationFrame(runLoop);
    timeSinceLastDrawFrame +=
      totalTimeElapsed -
      timeOfLastFrame;
    timeOfLastFrame = totalTimeElapsed;
    if (
      timeSinceLastDrawFrame >=
      globalThis.msDelay
    ) {
      firstState = false;
      timeSinceLastDrawFrame = 0;
      globalThis.cells =
        globalThis.theNextCells;
      nextState();
    }
    if (firstState) {
      evenOdd = !evenOdd;
      if (evenOdd) {
        return;
      }
    }
    drawCells(
      context,
      cnvs.width,
      cnvs.height,
      color,
      timeSinceLastDrawFrame /
        globalThis.msDelay
    );
  };
  requestAnimationFrame(runLoop);
};
const maxCells = 300;
let stationaryColor =
  "rgb(255,255,255)";
let stationaryCharacter = "m";
const firstTimeSetup = () => {
  var _a;
  codeToCells();
  const cnvs = document.createElement(
    "canvas"
  );
  cnvs.id = lifeCanvasId;
  const code = document.getElementById(
    codeId
  );
  const ratio =
    window.devicePixelRatio || 1;
  const w = code.offsetWidth;
  const h = code.offsetHeight;
  cnvs.width = w * ratio;
  cnvs.height = h * ratio;
  cnvs.style.width = `${w}px`;
  cnvs.style.height = `${h}px`;
  (_a =
    cnvs === null || cnvs === void 0
      ? void 0
      : cnvs.getContext("2d")) ===
    null || _a === void 0
    ? void 0
    : _a.scale(ratio, ratio);
  code.replaceWith(cnvs);
  globalThis.oldCode = code;
};
const codeToCells = () => {
  const code = document.getElementById(
    codeId
  );
  if (!code) {
    return;
  }
  const cells = [];
  let x = 0;
  let y = 0;
  for (const node of code.childNodes) {
    const { text, color } = nodeToText(
      node
    );
    for (const char of text) {
      switch (char) {
        case "\n":
          y += 1;
          x = 0;
          continue;
        case " ":
          x += 1;
          continue;
        default:
          break;
      }
      cells.push({
        x,
        y,
        character: char,
        color,
      });
      x += 1;
    }
  }
  globalThis.cells = cells;
  nextState();
};
const nodeToText = (node) => {
  var _a;
  if (node.nodeType == 3) {
    return {
      text:
        (_a = node.textContent) !==
          null && _a !== void 0
          ? _a
          : "",
      color: "white",
    };
  }
  return {
    text: node.innerText,
    color: getComputedStyle(node).color,
  };
};
const nextState = () => {
  const {
    newLiveCells,
    newBornCells,
    dyingCells,
  } = nextCells(globalThis.cells);
  globalThis.theNextCells = newLiveCells;
  globalThis.newBornCells = newBornCells;
  globalThis.dyingCells = dyingCells;
};
const nextCells = (liveCells) => {
  const newCellMap = new Map();
  for (const liveCell of liveCells) {
    setupAdjacentCells(
      liveCell,
      newCellMap
    );
  }
  const newLiveCells = [];
  const newBornCells = [];
  const dyingCells = new Set();
  const stationaryOdds =
    (0.25 * globalThis.msDelay) / 1000;
  for (let _a of newCellMap) {
    const [_, _b] = _a,
      { count, live } = _b,
      cell = __rest(_b, [
        "count",
        "live",
      ]);
    if (
      count != 3 &&
      (!live || count != 2)
    ) {
      if (live) {
        dyingCells.add(
          cell.y * maxCells + cell.x
        );
      }
      continue;
    }
    if (
      live &&
      Math.random() < stationaryOdds
    ) {
      if (Math.random() < 0.5) {
        const oldColor = cell.color;
        cell.color = stationaryColor;
        stationaryColor =
          oldColor !== null &&
          oldColor !== void 0
            ? oldColor
            : stationaryColor;
      } else {
        const oldCharacter =
          cell.character;
        cell.character = stationaryCharacter;
        stationaryCharacter =
          oldCharacter !== null &&
          oldCharacter !== void 0
            ? oldCharacter
            : stationaryCharacter;
      }
    }
    newLiveCells.push(cell);
    if (!live && cell.parent != null) {
      newBornCells.push(cell);
    }
  }
  return {
    newLiveCells,
    newBornCells,
    dyingCells,
  };
};
const setupAdjacentCells = (
  liveCell,
  newCellMap
) => {
  const key =
    liveCell.y * maxCells + liveCell.x;
  for (let row = -1; row <= 1; row++) {
    for (
      let column = -1;
      column <= 1;
      column++
    ) {
      setupCell(
        liveCell,
        key,
        row,
        column,
        newCellMap
      );
    }
  }
};
const setupCell = (
  parentCell,
  key,
  row,
  column,
  out
) => {
  var _a, _b;
  const {
    character,
    color,
    x,
    y,
  } = parentCell;
  const newKey =
    key + column + row * maxCells;
  const newCell =
    (_a = out.get(newKey)) !== null &&
    _a !== void 0
      ? _a
      : {
          count: 0,
          x: x + column,
          y: y + row,
        };
  if (newKey == key) {
    newCell.live = true;
    newCell.character =
      Math.random() < 0.00005
        ? "🐑"
        : character;
    newCell.color = color;
  } else {
    newCell.count += 1;
    if (
      newCell.live &&
      Math.random() < 0.2
    ) {
      if (Math.random() < 0.5) {
        newCell.color = color;
      } else {
        newCell.character = character;
      }
    }
    if (
      !newCell.live &&
      newCell.count <= 3
    ) {
      const odds =
        newCell.count == 2
          ? 0.5
          : 0.333333;
      const isParent =
        newCell.character == null ||
        Math.random() < odds;
      newCell.character = isParent
        ? character
        : newCell.character;
      if (isParent) {
        newCell.parent = parentCell;
      }
      newCell.color =
        Math.random() < odds
          ? color
          : (_b = newCell.color) !==
              null && _b !== void 0
          ? _b
          : color;
    }
  }
  out.set(newKey, newCell);
};
const drawCells = (
  ctxt,
  width,
  height,
  blankColor,
  frameProgress
) => {
  const cells = globalThis.cells;
  const newBornCells =
    globalThis.newBornCells;
  const dyingCells =
    globalThis.dyingCells;
  ctxt.fillStyle = blankColor;
  ctxt.fillRect(0, 0, width, height);
  const transparencyColor =
    1 - frameProgress;
  for (const {
    x,
    y,
    character,
    color,
  } of cells) {
    ctxt.fillStyle = color;
    if (
      dyingCells.has(y * maxCells + x)
    ) {
      ctxt.globalAlpha = transparencyColor;
    }
    ctxt.fillText(
      character,
      x * 7.16,
      y * 15 + 12
    );
    ctxt.globalAlpha = 1;
  }
  for (const {
    x,
    y,
    character,
    color,
    parent,
  } of newBornCells) {
    ctxt.fillStyle = color;
    const newX =
      (x - parent.x) * frameProgress +
      parent.x;
    const newY =
      (y - parent.y) * frameProgress +
      parent.y;
    ctxt.fillText(
      character,
      newX * 7.16,
      newY * 15 + 12
    );
  }
};
playGame();
Okay, here's one last easter egg for you