Comments (2)
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*
andrw
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.
Implemented by f2916bd.
from congame.
Related Issues (20)
- Why does `->jsexpr` make the load time faster when displaying files on admin? HOT 1
- koyo reloading issue HOT 3
- Long load time after lobby? DB issue? HOT 2
- Improve error message/blame when `make-step` used incorrectly
- redirect loop when enrolling from identity and first step has `skip` HOT 2
- email messages to identity need to be implemented HOT 1
- Add enrollment code to signup on congame (not identity) servers HOT 1
- `user-manager-verify` contract error HOT 1
- Study instances are launched based on name instead of id and thus have to be unique HOT 1
- get `identity-url` from DB when sending emails to identity users HOT 1
- congame-web/components/identity breaks the build
- Postgres `remaining connection slots are reserved for non-replication superuser connections` HOT 1
- Checking enrollment code: why do we need to drop the protected continuation? HOT 1
- PDF `save-file!` fails for one pdf file HOT 8
- How to get rid of the 'session expired' error at the top? HOT 1
- Impersonate does not work anymore HOT 1
- sub-study does not seem to put the `required` value HOT 5
- New package fails to compile but succeeds after changing file
- `formular` as final page of study seems not to work
- dashboard takes 50 seconds to load on login
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from congame.