Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify form building #22

Closed
MarcKaufmann opened this issue Feb 11, 2021 · 2 comments
Closed

Simplify form building #22

MarcKaufmann opened this issue Feb 11, 2021 · 2 comments
Assignees
Labels
async help wanted Extra attention is needed

Comments

@MarcKaufmann
Copy link
Owner

Currently, even making a one-question form is a boiler-plate fest that rivals Java. Other software shines for making surveys (Qualtrics in particular), primarily thanks to GUIs. While I don't expect us to compete with Qualtrics, I would like to stop competing with Java.

  1. @Bogdanp : Quick discussion of what should be possible in the short-term
  2. @MarcKaufmann : build a bunch of surveys (plan for upcoming week) and identify pain points and common defaults that form-building tools should use
  3. build the tools
@MarcKaufmann MarcKaufmann added enhancement New feature or request help wanted Extra attention is needed labels Feb 11, 2021
@MarcKaufmann MarcKaufmann added async and removed enhancement New feature or request labels Feb 25, 2021
@MarcKaufmann
Copy link
Owner Author

To give an idea, compare the below syntax for defining a question with answers from 1 to 5 versus the current versions (see here]. The improvement in this case is only that

  • there is no need to keep the form* and rw parts in synch
  • there is no need for the rendering boilerplate (as long as one is happy to use the defaults)
  • the bots' behavior can be defined at the site where such behavior is easy to understand, and in a way that can be used both for marionette-driven bots or direct-request bots.

From the survey perspective, the question, possible answers, correct and wrong answer (if applicable) should all be defined in one place. And various answers should be defined as parameters for a bot, including defaults. E.g.:

(make-question clear-instructions?
               #:question "How clear were the instructions of the study on a scale from 1 (very unclear) to 5 (very clear)?"
               ;; Provide exhaustive options or contract or set of predicates? Essentially validators.
               #:answers (in-range 1 5 1)
               ;; There may be a need for an additional category of validators, i.e. ensuring some answers jointly satisfy a property, so maybe #:answers isn't really like validators.
               #:bots (hash 'unclear 2
                            'clear   4))
; In study, pick default bot
; ...
(make-step 'survey ; has multiple questions
           survey-handler
           transition
           #:for-bot (hash 'clear-instructions? 'unclear
                           'other-question 'other-answer'))
; Or to make a custom bot
(define custom-bot-for-survey
  (make-bot (hash 'clear-instructions? 'clear)) ; Rest is set to default values

; Or if an answer was not yet named, can provide here the answer
(define custom-bot-thinks-really-unclear-survey
  (make-bot (hash 'clear-instructions? 1)))

The names on inputs are hooks for the bots, if we want hooks for other behaviors we might want to generalize things. E.g. if someone is going to use javascript for some interaction, or for clicking on links.

@Bogdanp : There are a few moving parts to this (defining helper functions/macros to reduce boiler-plate, integrate with bots). For the bot part, we should play around with the bot-models a bit more to get a feel for them; for the syntax, it all depends how easy you believe it will be to have some sugar for the common form input types.

@MarcKaufmann
Copy link
Owner Author

Implemented by f2916bd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants