Skip to content
Mogger

Codebase Mog

Would a senior engineer read this code and merge it as is?

Text inputcodebase-mogVersion 1

Judges a code snippet or a README on craft: correctness, clarity, naming, structure, and fitness for purpose. It reads only what is pasted, so a fragment is judged as a fragment.

What it looks for

  • Correct, idiomatic code for its language
  • Precise names and small, single-purpose units
  • Errors and edge cases handled on purpose
  • No dead code, magic values, or needless cleverness
  • For a README: what it is, how to run it, and why

Input

Send the text in text, up to 10,000 characters. This formula refuses images, so a call is always billed at the text rate: 1 unit, with up to 8 text formulas in one request (try it with Bio Mog and Tweet Mog).

The call returns noul, the probability from 0 to 1 that the answer is yes, and mogs, the verdict. The pass/fail boundary is set on the server and never returned. Use mogs as the decision and noul to rank.

Examples

Scored ahead of time with version 1. Each verdict uses the pass/fail boundary in force now.

  • TypeScript: parse a duration

    /** Parses "1h30m", "45s", or "2h" into milliseconds. Throws on anything else. */
    export function parseDuration(input: string): number {
      const trimmed = input.trim();
      const match = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(trimmed);
      if (trimmed === "" || match === null) {
        throw new RangeError(`Invalid duration: ${JSON.stringify(input)}`);
      }
      const [, hours = "0", minutes = "0", seconds = "0"] = match;
      return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1000;
    }
    MOGS
  • README: a retry helper

    # @example/retry
    
    Retry an async function with exponential backoff and full jitter. 40 lines, no dependencies.
    
    ## Install
    
        npm install @example/retry
    
    ## Use
    
        import { retry } from "@example/retry";
        const user = await retry(() => fetchUser(id), { attempts: 5, baseMs: 100 });
    
    Retries only when the function throws. Delay n is a random value between 0 and baseMs * 2^n, capped at maxMs (default 10000). After the last attempt, the last error is rethrown unchanged.
    
    ## Why
    
    Most retry helpers retry everything, including errors that will never succeed. Pass shouldRetry(error) to decide per error.
    MOGS
  • Python: an average, approximately

    def calc(l):
        t = 0
        for i in range(len(l)):
            if l[i] != None:
                t = t + l[i]
        try:
            return t / len(l)
        except:
            return 0
    DOES NOT MOG
  • README: the best project ever

    # My Project
    
    This is the best project ever made. It is blazing fast, insanely powerful, and the only tool you will ever need.
    
    ## Installation
    
    Just install it.
    
    ## Usage
    
    Run the code.
    
    TODO: add docs
    DOES NOT MOG

Try it

Scored examples show their result at once. Your own text needs an API key and spends 1 unit per run.

Codebase Mog

Text inputcodebase-mog

Would a senior engineer read this code and merge it as is?

Examples

Pre-computed, free

Scores text. No image.

501 / 10,000

Counted in characters after trimming. Never stored.

Get a key

Kept in this browser tab only, never sent anywhere but the API.

Costs 1 unit

Paste an API key to score your own input. Examples above are free.

Result
Pre-computed
MOGS

TypeScript: parse a duration, scored when the example was added. No request was sent.

POST /api/v1/mog
{
  "formula": "codebase-mog",
  "text": "/** Parses \"1h30m\", \"45s\", or \"2h\" into milliseconds. Throws on anything else. */\nexport function parseDuration(input: string): number {\n  const trimmed = input.trim();\n  const match = /^(?:(\\d+)h)?(?:(\\d+)m)?(?:(\\d+)s)?$/.exec(trimmed);\n  if (trimmed === \"\" || match === null) {\n    throw new RangeError(`Invalid duration: ${JSON.stringify(input)}`);\n  }\n  const [, hours = \"0\", minutes = \"0\", seconds = \"0\"] = match;\n  return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1000;\n}"
}
Response
no request

Pre-computed when the example was added. A live call returns the same results object plus cost, quota, and request_id.

{
  "results": {
    "codebase-mog": {
      "mogs": true,
      "noul": 0.832,
      "version": 1
    }
  }
}
Codebase Mog, TypeScript: parse a duration: mogs. Noul 0.83. Pre-computed.