Resources for working developers

Tutorials, guides, documentation and snippets you can copy straight into your project. Written by engineers, reviewed by engineers.

12 resources

DocumentationReference

Authentication reference

API keys, OAuth 2.0 and short-lived tokens across every DeveloperJar API.

  • Docs
  • Security
Read
SnippetJavaScript

Retry with exponential backoff

A small, dependency-free retry helper with jitter for flaky network calls.

JavaScript
async function retry(fn, { retries = 4, base = 300 } = {}) {
  for (let i = 0; ; i++) {
    try { return await fn(); }
    catch (err) {
      if (i >= retries) throw err;
      const wait = base * 2 ** i + Math.random() * 100;
      await new Promise(r => setTimeout(r, wait));
    }
  }
}
  • JavaScript
  • Reliability
SnippetPython

Chunk any iterable in Python

Process large lists in fixed-size batches without loading everything into memory.

Python
from itertools import islice

def chunked(items, size):
    it = iter(items)
    while batch := list(islice(it, size)):
        yield batch
  • Python
  • Performance
SnippetBash

Delete merged Git branches

One line to tidy your local repo after a busy sprint.

Bash
# keep main and the current branch
git branch --merged | grep -v "\*\|main" | xargs -n 1 git branch -d
  • Git
  • Productivity