raas, rounding as a service: the joke api that rounds numbers

raas stands for rounding as a service. it's an api that does one thing, round numbers, and it's sold as if it were critical infrastructure. it has three pricing plans and a trademarked name for each method, and every response tells you how much precision you've lost.
on 2 march i posted it on linkedin, written like a real b2b launch, and it got 419 impressions and 4 reactions. then i posted it on reddit, where it passed 440,000 views and was the most viewed post of that day on the front page of r/programmerhumor.
the joke has to look like a product
the rule was that the page, skimmed, would pass for any old saas. the headline says "enterprise-grade decimal management". underneath are the usual three badges: "99.999% uptime sla", "soc 2 type ii" and < 0.3ms latency. none of the three is true, and the api itself disproves the third.
the pricing follows the same pattern. the free plan includes "community support (reddit)". pro costs $49 a month and offers "priority latency (+40ms faster)". enterprise costs $99 and includes a "rounding insurance policy" and on-premise deployment. under all three plans, in small print: "all plans include 256-bit aes encryption for your decimals. because security." the "schedule a demo" button leads to a rick roll.
the three methods are three functions from javascript's standard library, each with a trademarked name:
| parameter | product name | plan | what it does |
|---|---|---|---|
settle | Gravitational Decimal Settling (GDS)™ | free | Math.floor |
elevate | Aspirational Decimal Elevation (ADE)™ | pro | Math.ceil |
smart | Smart Rounding™ | enterprise | Math.round |
the joke is the gap between the copy and the code. the site describes smart rounding as "ai-adjacent proximity snapping" that algorithmically evaluates your decimal's delta from the neighbouring integers. it's Math.round.
the api really works
anyone can make a joke landing page. what makes it hold up is that when someone copies the example from the home page and tries it, a real api answers, in the same tone. the core is seven lines:
if (methodParam === "smart") {
result = Math.round(num);
} else if (methodParam === "elevate") {
result = Math.ceil(num);
} else {
result = Math.floor(num);
}
the rest is wrapping. the first version already rounded in exactly the same way. all of the joke went in later in a single commit, which took the route from 87 to 116 lines, and none of the new lines round anything. this is the response shown in the readme:
{
"status": "success",
"data": { "original_value": 4.82, "rounded_value": 5, "precision_loss": 0.18 },
"metadata": {
"algorithm_used": "Smart Rounding™",
"computation_time_ms": 112.45,
"is_integer": true
}
}
precision_loss is the difference between the number you send and the one you get back, so you know how much information you've destroyed. is_integer is true because the result comes from Math.floor, Math.ceil or Math.round. it's only false in one case. if you send Infinity, the api responds "status": "success" with every value set to null, because json has no way to write infinity.
computation_time_ms is my favourite field. the home page promises under 0.3 ms, and the api adds between 40 and 120 ms of made-up latency:
const fakeLatency = Math.random() * 80 + 40;
the errors are part of the product too. each one uses the right http status code, with a corporate message:
appleorbananareturn a 418 i'm a teapot: "cannot apply mathematical truncation to fruit." the 418 comes from rfc 2324, the april fools' joke about coffee pots from 1 april 1998. a pear, on the other hand, doesn't count as fruit and returns a 422.- anything else that isn't a number returns a 422 unprocessable entity, which asks you for "a compliant 'number' query parameter".
- a method that doesn't exist returns a 400: "is not a recognized corporate rounding strategy".
- a method from a plan above yours returns a 402 payment required: "the 'smart' algorithm is locked behind a higher paywall." the http standard has kept 402 reserved for future use for decades. here it does what the name says.
the repository is part of the joke too
the readme has the badges of a serious project: build passing, 99.999% uptime, a $14 million series a and 8,432 dependencies. it only accepts pull requests from "developers with at least 15 years of experience in decimal mitigation". at the end there's a note for the team: "please stop committing the .env file. dave, this is your last warning."
the .env is, of course, in the repository. the commit that adds it also removes the .env* line that create-next-app puts in the .gitignore by default. to push the file, i first had to undo the protection against pushing it. inside there's:
- a
REDIS_CACHE_URLwith the comment "used for caching the number 4". ENABLE_QUANTUM_FLOORING=false, because "it was occasionally rounding 2 down to 1".- a database called
fractional_reserve_db, which stores "the decimals we shave off from the free tier users".
the same joke on reddit and on linkedin
i wrote the first linkedin post in the tone of linkedin launches: "we're delegating hyper-complex tasks to ai, but we're still managing our own decimals locally? it's madness." 419 impressions, 4 reactions. on reddit, the same satire passed 440,000 views.
i don't have the data to know why. what i can see is a difference in context. on linkedin, a parody of a b2b launch post reads as one more b2b launch post, because it looks too much like the rest of the feed. on r/programmerhumor, you know it's a joke before you read a word, and whoever reads it knows what Math.round does.
the other data point is the second post. on 9 march i went back to linkedin to explain what had happened on reddit, and it got 783 impressions, almost double the first. on linkedin, explaining the joke's success worked better than the joke itself.
on github, the repository has 21 stars and no forks. the api, meanwhile, still answers that it can't truncate fruit.