Update sus example

This commit is contained in:
Marcus Kammer 2024-05-17 17:14:56 +02:00
parent 8ce9f05ba1
commit 31ca48082e

View file

@ -165,67 +165,101 @@
* System Usability Scale
Ich würde dieses System gerne häufig nutzen.
Das System ist unnötig komplex.
Das System ist einfach zu bedienen.
Ich brauche die Unterstützung einer technischen Person, um dieses System zu benutzen.
Die Funktionen in diesem System sind gut integriert.
Es gibt zu viele Ungereimtheiten in diesem System.
Die meisten Leute würden sehr schnell lernen, dieses System zu benutzen.
Das System ist sehr umständlich zu bedienen.
Ich fühle mich sehr sicher im Umgang mit diesem System.
Ich musste eine Menge lernen, um mit diesem System arbeiten zu können.
#+name: sus-survey
#+name: example-sus-form-en
#+caption: Lisp code to generate a SUS form in HTML.
#+begin_src lisp :results output file :file-ext html
(in-package :user-research-app)
(defpackage sus
(:use #:cl)
(:import-from hunchentoot #:define-easy-handler #:easy-acceptor)
(:import-from spinneret #:*html*)
(:import-from dev.metalisp.sbt/form #:multi-form)
(:import-from dev.metalisp.sbt #:with-page)
(:import-from dev.metalisp.sbt #:find-l10n)
(:import-from dev.metalisp.sbt #:*l10n*)
(:import-from dev.metalisp.sbt/btn #:btn-primary))
(defun generate-sus-survey ()
"Generates an HTML page with questionnaires using questionnaire macros."
(with-output-to-string (spinneret:*html*)
(with-page (:title "System Usability Scale" :main-con t)
(questionnaire "/submit"
(in-package #:sus)
(:ask "Id like to use this system frequently."
:group "sus-1"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(defun sus-form ()
(with-page (:title "SUS Form" :main-con t)
(:form :action "/submit"
:method "post"
(multi-form
(:ask "Id like to use this system frequently."
:group "sus-1"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is unnecessarily complex."
:group "sus-2"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is unnecessarily complex."
:group "sus-2"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is easy to use."
:group "sus-3"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is easy to use."
:group "sus-3"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "I need the support of a technical person to use this system."
:group "sus-4"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "I need the support of a technical person to use this system."
:group "sus-4"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The functions in this system are well integrated."
:group "sus-5"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The functions in this system are well integrated."
:group "sus-5"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "There is too much inconsistency in this system."
:group "sus-6"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "There is too much inconsistency in this system."
:group "sus-6"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "Most people would learn to use this system very quickly."
:group "sus-7"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "Most people would learn to use this system very quickly."
:group "sus-7"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is very awkward to use."
:group "sus-8"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "The system is very awkward to use."
:group "sus-8"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "I feel very confident using this system."
:group "sus-9"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "I feel very confident using this system."
:group "sus-9"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
(:ask "I needed to learn a lot of things to get started with this system."
:group "sus-10"
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
))))
(:ask "I needed to learn a lot of things to get started with this system."
:group "sus-10"
:style nil
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree")))
(format t (generate-sus-survey))
(btn-primary (:type "submit")
(find-l10n "submit" spinneret:*html-lang* *l10n*)))))
(defun handle-server (server)
(lambda (action)
(case action
(start (hunchentoot:start server))
(stop (hunchentoot:stop server)))))
(defparameter *sus*
(handle-server (make-instance 'easy-acceptor :port 8080)))
(define-easy-handler (sus :uri "/") ()
(sus-form))
(define-easy-handler (submit :uri "/submit") ()
(setf (hunchentoot:content-type*) "text/plain")
(format nil "Handled POST parameters: ~a" (hunchentoot:post-parameters* hunchentoot:*request*)))
(format t (sus-form))
#+end_src
#+RESULTS: example-sus-form-en
[[file:example-sus-form-en.html]]
#+begin_src shell :results raw
curl -X POST -d "arg1=value1&arg2=value2" http://localhost:8080/submit
#+end_src