Defining Variables in Unit 3

15 views
Skip to first unread message

Bob Kahn

unread,
Jan 14, 2019, 7:33:20 PM1/14/19
to Bootstrap-Teachers
Hello all, 
Please forgive me if this is a simple question, but I have tendency to get hung up on simple things occasionally. 
In the breakdown of lessons in the teacher guide for unit 3, it says "Defining Variables" but then throughout the text there is never any mention of defining variables but defining values. 
This has me a perplexed. When we define eye-color or tilt for example, are those not variables and the racket code used determines their value?
So, as I understand it, we define a variable "x" to have a certain value "blue" or  to rotate prize 45 degrees.
Am I think about this correctly?
Thank you, 
Bob 

Schanzer (Director)

unread,
Jan 16, 2019, 7:20:51 AM1/16/19
to Bootstrap-Teachers
Hi Bob - you've actually asked about something that is a source of great debate here at Bootstrap!

We take our vocabulary very seriously, so here's a question for all the teachers here: what do you call x and y, below?

(define x 42)
(define (f y) (+ y 2))

They are both names for things, that's for sure. But they have different behaviors. x, for example, is defined to be 42. That's all it ever will be, and to say otherwise would be incorrect. y, on the other hand, can stand for many different values, depending on the inputs to the function f. We feel confident that "variable" is the right name for y -- it's a name for quantity that varies, after all! But what do we call x? There's nothing "variable" about it!

This exact same issue exists in the math world - ask a math teacher what x and y are:

x = 42
f(y) = y + 2

We've been talking to the folks at the math forum, and they agree that y is most definitely a variable and that it feels awkward to call x the same thing. At Bootstrap, we've made the decision to call x a value for now, and that lesson title should be renamed from "defining variables" to "defining values"! In fact, why wait? I've just renamed the lesson now. Thanks for bringing this to our attention, and for raising this point!

Bob Kahn

unread,
Jan 16, 2019, 9:27:28 AM1/16/19
to bootstra...@googlegroups.com
Thank you. Funny. That has always bothered about x = whatever. 
So this leads me to three more questions. 

1. When I was reviewing this yesterday with students, I called eye-color a variable and "blue" the value, and I said the value of the variable eye-color is blue.  According to your explanation above, I would call eye-color value and blue the value for value eye-color? This doesn't seem right. 

2. How would we treat prize, big, and tilt then, the same way as we treat x?  

3. What about age? My students set up all the definitions to be able to convert an age into minutes in Wescheme. I realize, that age is static unless you change it, but that is the beauty of programming is that you CAN change it and get a different result. 

It seems there is a difference maybe if you write it on paper vs in a program. 



------------------------
Bob Kahn 
MS Ed Tech Specialist and CS/Robotics Teacher

Brentwood School
100 South Barrington Place 
Los Angeles, CA 90049

“Society grows great when [people] plant trees whose shade they know they'll never sit in." 
         - Greek proverb...maybe. 



--
You received this message because you are subscribed to a topic in the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bootstrap-discuss/PMg_oOr2X_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bootstrap-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Engelberg

unread,
Jan 16, 2019, 4:09:05 PM1/16/19
to bootstra...@googlegroups.com
(define x 42)

Have you considered calling x a "name", and this as "defining names" or "defining names for values"?

My own instinct would be to reserve the word "value" for the things on the right side of an assignment, i.e., the results of an evaluation, not for the names.

Eric Allatta

unread,
Jan 16, 2019, 4:37:49 PM1/16/19
to bootstra...@googlegroups.com
FWIW I always say "named values" and refer to "variables" or "parameters" for inside a function (unless I'm speaking too quickly, which happens often). For second year students I say "bound identifier". I specify "value" or "type" depending on the context of the discussion. By the end of Bootstrap Data Science I'm calling every name an identifier bound to a value, whose type could be a function.

--
You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Eric Allatta
CS Department
Academy for Software Engineering (AFSE)
40 Irving Pl., 10003

NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Permanent student records data is protected by federal law (FERPA), and shall not be disclosed except to the student, those with a defined educational responsibility for the student, and the parent(s) and legal guardians of the individual student. Please use due care when working with and sharing electronic records.

Schanzer (Director)

unread,
Jan 23, 2019, 11:15:05 AM1/23/19
to Bootstrap-Teachers
Thanks for posting, Mark and Eric. This is definitely something that deserves broad attention,

We've been looking at 'define-name' and 'define-fun' as possible keywords, to both disambiguate the two forms (and get even-better error messages!) and to give some clarity to what the named value is called. This is very much an area where we'd like to hear from the community at large, so please feel free to weigh in!
Reply all
Reply to author
Forward
0 new messages