jimmycuadra / lita-key-value

A Lita handler for storing snippets of text.
MIT License
5 stars 1 forks source link

Would a PR to make this more like the hubot 'remember' script be accepted? #2

Closed justintime closed 9 years ago

justintime commented 9 years ago

We're migrating from Hubot to Lita. We use the hubot-remember script to provide essentially the same functionality as this handler.

Ultimately, we really enjoy the natural language approach the hubot script uses for this feature.

I could create a new handler that borrowed heavily from this handler's codebase, but I think it might be better to just have this handler answer for both styles. Would you be open to a pull request for that?

jimmycuadra commented 9 years ago

Short answer: no.

Long answer: In my experience, the natural language style for commands that Hubot has traditionally used is not a pattern I like to follow in my handlers. It makes them harder remember and often creates annoying little issues in how they're parsed. ChatOps is sometimes described as a "shared command line," and I that's how I like to think of bot commands. There are several features in Lita and its ecosystem of plugins that support this approach.

That said, if it's an approach your team prefers, there's no reason why you shouldn't be able to. One of the planned features for Lita 5, tracked at jimmycuadra/lita#100, is specifically intended to address this issue of wanting a custom interface to an existing handler. Trying to support lots of different styles in the plugin's codebase will tend to get crufty and confusing, so it's desirable to let people choose how to interact with bits of functionality themselves.

I don't have an ETA on Lita 5 right now – it'll likely be on the order of months – so just creating your own handler is probably the best bet for now. The idea of "store arbitrary data under an arbitrary key" is pretty common when you think about it from a data/logic perspective, and it's really the interface/messaging that separates the use cases. This is another part of what ChatOps is about: letting teams customize their workflows to their particular tastes. Another way to say it is, there might be similar logic between lita-key-value and hubot-remember, but the semantic differences are enough to make them two separate things.

justintime commented 9 years ago

Perfect. Thanks so much for the details, I appreciate it.

On Thursday, April 30, 2015, Jimmy Cuadra notifications@github.com wrote:

Short answer: no.

Long answer: In my experience, the natural language style for commands that Hubot has traditionally used is not a pattern I like to follow in my handlers. It makes them harder remember and often creates annoying little issues in how they're parsed. ChatOps is sometimes described as a "shared command line," and I that's how I like to think of bot commands. There are several features in Lita and its ecosystem of plugins that support this approach.

That said, if it's an approach your team prefers, there's no reason why you shouldn't be able to. One of the planned features for Lita 5, tracked at jimmycuadra/lita#100 https://github.com/jimmycuadra/lita/issues/100, is specifically intended to address this issue of wanting a custom interface to an existing handler. Trying to support lots of different styles in the plugin's codebase will tend to get crufty and confusing, so it's desirable to let people choose how to interact with bits of functionality themselves.

I don't have an ETA on Lita 5 right now – it'll likely be on the order of months – so just creating your own handler is probably the best bet for now. The idea of "store arbitrary data under an arbitrary key" is pretty common when you think about it from a data/logic perspective, and it's really the interface/messaging that separates the use cases. This is another part of what ChatOps is about: letting teams customize their workflows to their particular tastes. Another way to say it is, there might be similar logic between lita-key-value and hubot-remember, but the semantic differences are enough to make them two separate things.

— Reply to this email directly or view it on GitHub https://github.com/jimmycuadra/lita-key-value/issues/2#issuecomment-98002715 .