Giter Club home page Giter Club logo

Comments (2)

MarcKaufmann avatar MarcKaufmann commented on June 22, 2024

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.

from congame.

MarcKaufmann avatar MarcKaufmann commented on June 22, 2024

Implemented by f2916bd.

from congame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.