63 comments

[ 3.9 ms ] story [ 131 ms ] thread
And there's already a spam comment on it
With 19 upvotes. Jokes aside, why hasn't this shit been solved yet?
Yeah there should be isSpam as a service! /s
I'm approximately 95% confident that this is satire. It's not 100%, based purely on Poe's Law and what the software industry has become.
While hopefully it is satire, it would also make a good college level exercise.

There's suffient nuance and opportunity to be creative, while at the same time requiring some basic skills to set up (server, dns, https,and so on.)

Then for those more advanced there are creative extensions to implement - support any base, support text, in multiple languages, support formulas (is result odd or even) and so on.

Back in my university days we'd take trivial problems like this and "extend" them in creative ways faaar beyond the assignment. It both stretched or skills, and also taught us something about feature creep.

As in, sometimes it's OK not to build the perfectly generic, useful in all cases, megolith when a simple x % 2 == 1 will do.

(no wait %2 is slow, let's just &1 instead...)

I guess I realised before opening the site, but special mention for the backed by blockchain part. I kind of lost it on that.

Perhaps the next version will have ChatGPT enhancements?

(comment deleted)
If the author is looking to satirize this when it comes to monetization they should offer an SLA with price discrimination on number of 9s of uptime
I'll up the ante and will write isPowerOfTwo microservice.
But will it scale?
Exponentially
I set it up and you whacked it outta that park. Congratulations!
Make sure to choose the proper containerization technology.
I'll provide the plumbing upon which all will rely: isTrue
That's a profound thing to be offering.
If only to see the chaos on April 1st when the logic flips...
Does it support base 11?
(comment deleted)
Truly not the kind of algorithm you'd want to write yourself. Do you really want to be scouring your own code usages when the CVE inevitably comes? Will you even notice if you get exploited? And the off-by-1 errors??! Plus, you know IEEE is just going to go and increase the width of integers again soon. Moving targets everywhere. What a mess. I'd easily put $5 per month per seat towards this. Maybe more. Brilliant project.
This is just some random dev though. Soon an equivalent service will be bundled with your office 365 subscription, backed with five nines of reliability and a corporate support plan.
Lacking an appropriate license, I am more concerned that Amazon is going to rip off the code and host a service without the developer seeing a dime.
I actually wish Amazon came and standardized oddness, like with S3. Currently there’s a lot of providers, we had to switch to another for gdpr reasons (our old provider collected our users’ shoe sizes with each request, long story). But then they weren’t api compatible so we are now using a service adapter service.

Oh, and remember to always wrap your isOdd requests in a retry loop with exponential backoff.

I think Azure has an internal a service just to generate 429 http response codes - they send us so many of them!
What are you serious? What have software engineer become if this is worth $5 to you. It's ridiculous.
I’d pay $6 but I keep getting redirected to the other service.
Wait until people hear about modulo
Modulo is security critical. It is the basis of all number theory (and by proxy, cryptography). We should have a self hosted version that can run behind the firewall.
Wait until people hear about bitwise and
It's great that the author built this as an api-first service for maximum compatability, but what would really help adoption and make it a lot easier to use is per-language libraries. Why write all the request sending and parsing yourself, when you could instead simply write:

  try { 
    const isOdd = require('isOdd')({ apiKey: 'xxx', ...options });
  }
  catch (e) {
    if (typeof e === 'IsOddAuthenticationException') {
      console.log('Could not connect to issOdd service.  Is your API key correct?');
    }
    else {
      console.log(e);
    }
  }

  try {
    const is43Odd = await isOdd(43);
  }
  catch (e) {
    console.log(e);
  }

  console.log(is43Odd ? '43 is odd!' : 'Sorry, 43 is not odd.
Pedantic quibble: the is43Odd variable is out of scope for the final log statement. Let's push it into the PR queue and circle back to this after we clear our outstanding merges.
> Pedantic quibble: the is43Odd variable is out of scope for the final log statement. Let's push it into the PR queue and circle back to this after we clear our outstanding merges.

The const should have been a var. Get off my lawn!

I love you preface an actual legitimate bug with "pedantic quibble." What do you do when you see an actual pedantic quibble like about whitespace? Tip? =)
Haha. Oh, you know...it's part of the satire. Something like: pointing out an actual bug in pseudo code in a joke is type of pedantic quibble HN comment threads are known throughout all the lands to espouse.

Hmm, if I saw an actual outside-joke pedantic quibble? I'd probably lose my mind and go on an hours long rant about the declining state of HN comment threads. Hahah. Or maybe...Shrug sigh and move on? Or maybe...I probably wouldn't even see it...it's such a part of the background noise here. Or maybe...I'd laugh and try to engage humorously with the poor soul.

Wait...was this a pedantic quibble, was that what you just did? o.O hahah

Use ES6 style imports for better compatibility with other bundlers
(comment deleted)
Now we just need an "Is isOdd Down?" health check/downtime detector
Okay this one got a laugh out of me.
In the not to distant past this was a meme on /r/shittyprogramming. Everyone contributed one. There was deep learned iseven, number theoretic iseven, recursive iseven, enterprise iseven etc. My personal contribution:

    def isEven(x):
        '''returns true if even''
        return True
Here's hoping the author releases it as an app, then I could refer to it when I get into arguments at the Roulette table.
Feature suggestion: add an endpoint powered by ChatGPT that can determine whether a program will terminate. Finance needs to track server expenses for ESG metrics.
At first I was worried the overhead of a service call would slow things down, but my worries were put at rest when I saw it was implemented in a low level, high performance language such as Rust.

Also, Elixir and the actor model is such an obvious match for this problem space!

Definitely happy to put this tool in my tool belt.

Lately I’ve been relying on AI to write IsOdd classes for me when the need arises. I tell it what I need, and it works out all the messy details. No more third-party libraries!
Is there a websocket interface for better scalability?
(comment deleted)
I want to self host this on my cloud Kubernetes platform, which CNI network plugin should I use?
> The back-end is Rust and Elixir using AWS lambda, and the Blockchain.

IMHO it's missing a ChatGPT (or other LLM) integration

This service is lacking a major feature and too complicated!

Almost half of the time, I need to know if a number is even. Why doesn't it provide an end point for that?! Don't even tell me about the 409 status code. Am I suppose to know it's an even number when it returns an odd number to me? I only recognize status code 200, all other are errors, don't make this so complicated!