10 ms·
IsOdd (and IsEven) as a Service
- rich_sasha 4y agoIs there a websocket interface for better scalability?
- deleted 4y ago[deleted]
- userbinator 4y agoI'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.
- bruce511 4y agoWhile 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...)
- ge96 4y agoRecent meme
- asddubs 4y agosure, you might think the concept is odd, but actually it's not https://isodd.dev/isodd.dev https://isodd.dev/isodd.dev it is instead, in fact, not a number
- sundvor 4y agoI 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?
- deleted 4y ago[deleted]
- avinassh 4y agomay I introduce you to my own service called gg-flip [0] and the SaaS version GaS? [1] [0] - https://github.com/avinassh/gg-flip https://github.com/avinassh/gg-flip [1] - https://avi.im/gg-flip/ https://avi.im/gg-flip/
- mastax 4y agoAnd there's already a spam comment on it
- Jamie9912 4y agoisodd.dev’s server IP address could not be found.
- lern_too_spel 4y agoYou can register it. https://get.dev/?search-input=isodd https://get.dev/?search-input=isodd
- adamisom 4y agois that odd?
- RheingoldRiver 4y agoI don't know, it's down
- fwlr 4y agoIf 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
- FpUser 4y agoI'll up the ante and will write isPowerOfTwo microservice.
- minitoar 4y agoDoes it support base 11?
- deleted 4y ago[deleted]
- swatcoder 4y agoTruly 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.
- crummy 4y agoThis 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.
- fbdab103 4y agoLacking 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.
- klabb3 4y agoI 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.
- craz8 4y agoI think Azure has an internal a service just to generate 429 http response codes - they send us so many of them!
- teaearlgraycold 4y ago> And the off-by-1 errors??! I read ??! as a trigram
- Awelton 4y agoWait until people hear about modulo
- KRAKRISMOTT 4y agoModulo 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.
- rafaelrc 4y agoWait until people hear about bitwise and
- DanHulton 4y agoIt'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.
- graderjs 4y agoPedantic 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.
- KRAKRISMOTT 4y ago> 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!
- DanHulton 4y agoI 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? =)
- graderjs 4y agoHaha. 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
- xtagon 4y agoNow we just need an "Is isOdd Down?" health check/downtime detector
- Vanit 4y agoOkay this one got a laugh out of me.
- KRAKRISMOTT 4y agoHow did you get Elixir to run on AWS Lambda?
- roncesvalles 4y agoBy transpiling it to JavaScript, obviously.
- zoover2020 4y agoYou can bring your own runtime
- IIAOPSW 4y agoIn 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
- itronitron 4y agoHere's hoping the author releases it as an app, then I could refer to it when I get into arguments at the Roulette table.
- KRAKRISMOTT 4y agoFeature suggestion: add an endpoint powered by ChatGPT that can determine whether a program will terminate. Finance needs to track server expenses for ESG metrics.
- larsnystrom 4y agoAt 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.
- iaseiadit 4y agoLately 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!
- deleted 4y ago[deleted]
- orf 4y agoI want to self host this on my cloud Kubernetes platform, which CNI network plugin should I use?
- throwaway15492 4y ago> The back-end is Rust and Elixir using AWS lambda, and the Blockchain. IMHO it's missing a ChatGPT (or other LLM) integration
- spicybright 4y agoStill doesn't beat /dev/null as a service in my book! https://devnull-as-a-service.com/ https://devnull-as-a-service.com/
- frogcoder 4y agoThis 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!
- brokenmachine 4y agohttps://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.