Warning! You are being recorded (and transcribed).
Approximate overview
CHANGES.rkt file (summarizes your changes)
when you want the graders to look at your redo.Academic/Scholarly
Cultural
Peer
Sam probably screwed this up. Check the calendar or pioneers.grinnell.edu.
Wellness
Misc
How do we balance “not everyone has a last name” with “some people are too lazy to enter their last name”?
Names aren’t great identifiers. They are repeated.
We can set up systems that discourage people from leaving out data.
Write a procedure, (name->string name), that takes a name
and converts it to the appropriate string. name->string should
work no matter what representation we use, even if we use a
representation we have not yet covered.
> (name->string qe2)
"Queen Elizabeth II"
> (name->string clay)
"Roy Clay Sr"
A solution and a thought process.
;;; (name->string name) -> string?
;;; name : name?
;;; Convert a name to a string, no matter how names are implemented.
(define name->string
(lambda (name)
...))
I have
name-title (which returns string or #f),name-given (always returns a string),name-middle (which returns a string or #f),name-family (which returns a string or #f), andname-suffix (which returns a string or #f)(define name->string
(lambda (name)
(string-append
(if (name-title name)
(string-append (name-title name) " ")
"")
(name-given name)
(if (name-middle name)
(string-append " " (name-middle name))
"")
(if (name-family name)
(string-append " " (name-family name))
"")
(if (name-suffix name)
(string-append " " (name-suffix name))
""))))
I should probably clean up the code a bit.
(define name->string
(let ([helper (lambda (str-or-false)
(if str-or-false
(string-append " " str-or-false)
""))])
(lambda (name)
(string-append
(if (name-title name)
(string-append (name-title name) " ")
"")
(name-given name)
(helper (name-middle name))
(helper (name-family name))
(helper (name-suffix name))))))
One alternate. Make a list! Look up documentation.
(define name>string
(lambda (name)
(string-join (filter string?
(list (name-title name)
(name-given name)
(name-middle name)
(name-family name)
(name-suffix name)))
" ")))
Suppose we were planning to represent names as strings with the
components separated by vertical bars. For example,
"|Barack|Hussein|Obama|II" or "Queen|Elizabeth|||II". Sketch
how you would write procedures like name-given and name-family
that extract the various parts of the name. You might, for example,
use string-split.
A solution and a thought process.
(define name-prefix
(lambda (name)
(list-ref (string-split name "|") 0)))
(define name-given
(lambda (name)
(list-ref (string-split name "|") 1)))
Are we permitted to use a page of notes on quizzes?
Of course.
In (hash-ref hash key ""), what does the “” do?
If you give
hash-refthree parameters, the last one is the “default”, which is returned if the key is not in the hash.
What does the “Do not click THIS button” do?
Attempts to register you for classes (it’s normally the register button), but all classes are marked as full, so it tells you to join the waiting lists and therefore makes you sad because the “Join Waiting List” feature does not yet work.
What are your opinions regarding our vendor?
Ellucian SelfService (or whatever Ellucian we are using) is not necessarily designed for schools like Grinnell nor registration processes like we try to use. Perhaps it is unsurprising that it does not work properly all the time.
I am frustrated that it yet again is adding stress to students’ lives.