Hacker News new | ask | show | jobs
by nicoburns 1411 days ago
I feel like AI is a poor fit for this domain, because the whole point of using a tool like this would be to check/ensure correctness. Perhaps it should at least also offer a precise translation back the other way?

Scheduled tasks are hard enough to debug as it is. The last thing I want to do is add more indeterminism!

2 comments

Yes - the Cron schema is probably not the best schema.

It was designed to be easy to fit most things into one line.

It can express pretty much everything imaginable. But it's not designed to do that easily.

Maybe it'd be better to come up with a schema that's better suited for expressing non-trivial crons - and converting that to & from crontab format.

English is also not the best language for expressing this type of thing...

This reminds me of the "English to regular expressions" that was on here a few weeks back, and got it right about 10% of the time.

We have created structured, unambiguous domain languages for a reason. Converting from English is ambiguous at best, impossible at worst.

But isn't translating from English (or some other natural language) is what a programmer does when constructing a regular expression or a cron job? So it is possible, although humans make mistakes, too. Maybe fewer, or different mistakes than "AI", but still, fundamentally it's the same.

Maybe an alternative to natural language processing could be pattern recognition from a number of user supplied examples, and its expression in an unambiguous domain language. That's also what programmers do.

> But isn't translating from English (or some other natural language) is what a programmer does when constructing a regular expression or a cron job?

No, I wouldn't say so. Even if the programmer is given the schedule from someone else (in English), they have additional context and can ask clarifying questions that this AI doesn't have.

That's my point. Without additional context, humans would make the same mistakes. Having all information that humans have, this AI could perform at human level.

One of the hardest aspects of software development is communicating with the customer, for humans and AI alike. But a translation from layman English to machine code has to happen, at some point.

You are describing it as if the developer writing the regex/cron has no prior involvement with the app, project, or company and is brought on to transcribe a specification from English to code and nothing else. In that situation an AI-driven translator app makes a lot of sense, but that doesn't match reality.

The software developer has a lot of context with the app and project that cannot be easily passed into the translator (whether AI or human). Going from that state of knowledge to the code by an intermediate, compressed, lossy, ambiguous step of natural language is necessarily inefficient. Whether that translator is operating at human level or not is not the point, going through English is the problem.