EBoard 20: Numeric recursion
This class will be recorded! Its use is limited to members of the
class. Please do not share with others.
Approximate overview
- General administrative stuff [~10 min]
- Q&A [~10 min]
- Quiz [~10 min]
- Lab [~60 min]
Administrative stuff
Notes and news
- No class Thursday and Friday. Take a breather. Do some work for CSC
- Embrace capitalism. Spend time with family. Whatever works best
for you.
- SoLA 2 has a late due date. That is only for students who arranged an
extension on SoLA 2 for specific reasons. Others who turn in work late
will receive a 0.
- When I ask you to post an answer in the chat (it’s rare), please do
so even if someone else seems to have posted something similar. I use
those as another quick check on understanding.
- Extensions on all quiz makeups until 8am Monday. I’ll get those up
in the hour after class.
- I prefer that you do quiz makeups asap.
- I will likely post a solution to a problem related to higher-order-e
soon.
- If you did not turn in a mini-project, please arrange a meeting with me
next week. If my normal bookings don’t work, please let me know avaialble
times.
Tutoring reminders
- Please use our tutors! They like to work.
- Don’t use them for help on the quizzes or learning assessments.
- Evening tutoring will be available
- 8-10 p.m. Sundays through Thursdays
- 3-5 p.m. Sundays
- In the “Drop in tutoring” channel on the CS team.
- Sam will generally not be available during these times.
- Individual tutors are temporarily unavailable. We’re recruiting more.
- Don’t let this stop you from requesting one.
Upcoming activities
Attend (or watch recording) and send a one-paragraph reflection.
- None currently scheduled.
Upcoming work
- Redo of Mini-project 2
(due Monday the 30th at 10:30 p.m. CST)
- Mini-project 2 was returned last night.
- Redo of Mini-project 3
(due Monday the 30th at 10:30 p.m. CST)
- Depending on the time availability of our mentors, I may grade
this one.
- Mini-project 4
(due Wednesday, December 2 at 10:30 p.m. CST)
- Reading for Monday
- Quiz today: Patterns of recursion and match keyword.
- Quiz Monday: Numeric recursion
Getting to E on MP2
- Here’s the list of comments on MP2, revisited.
- Feel free to ask questions about them on the appropriate thread in the
Q&A channel.
- You can also ask specific questions about the comments you received via
chat, although I may not respond promptly.
Some deal breakers (drop you to R)
- You don’t seem to be using the
error procedure in check-equal?.
- You aren’t computing the Luhn value correctly because you’re not adding
the digits in the doubled number.
- Your procedure names do not match the requirements. For example,
I don’t see a procedure called
luhn-check? or luhn-16-check? even
though that’s what the instructions called for. (The instructions
currently call for luhn-16-check?. But the first set called for
luhn-check?. If you redo, use the 16.)
- Your
luhn-16-check? procedure rejects correct strings with spaces
in them because they don’t have 16 characters. Make sure to delete
the spaces before checking the length.
- I don’t see you using decomposition in any meaningful way. The
assignment did ask for it.
- It doesn’t look like your ISBN computation deals with the “X” at the
end of the string.
Formatting, documentation, and such (keeps you from E)
Booleans (keeps you from E)
(if TEST #t #f) violates the Zen of Booleans. Please fix.
- Comparing a Boolean function to #t also violates the Zen of Booleans.
Please fix.
Code quality (keeps you from E)
- The computation of the ISBN is ugly. Can you find a cleaner way to do it?
- You should not count on particular Unicode values, such as 32 or 48.
Please use
char->integer.
(That will also make it easier for the reader.)
More generally, don’t use “magic numbers” that the reader won’t
necessarily understand.
- Please don’t redo expensive computations. (This issue won’t keep you
from E on this mini-project, but it will on the next.)
- You seem to accept “X” in the middle of ISBN’s. That’s not valid.
- Rather than doing separate
seq-num->num and char->integer procedures,
why not have a simple digit->value procedure that takes a character
that represents a digit as an input, and returns the corresponding
value?
- What’s the difference between
add-numbers and +? If there is none,
what’s the point of defining add-numbers.
- Does not embrace “The Zen of Booleans”. (I’ll try to put together
a handout on this.)
Things to know (no effect right now)
- We appreciate that you are giving detailed comments in the
documentation. However, we prefer a short comment that explains
what the procedure does more than a longer comment on how. For
example,
(valid-isbn? str) could just say “Verifies that str
represents a valid ISBN.”
- The custom in Racket is to separate words in a procedure name
with dashes. For example,
add-first-second rather than
addfirstsecond. It reduces the cognitive load on the reader.
- I prefer focused citations. Not “Sam helped me” but “Sam helped
me on figuring out how to convert characters to the corresponding
number.” Not “I used ‘this web page’” but “I found ‘this helpful
procedure’ on ‘this web page’.”
- As long as you make a reasonable attempt at citations (and
it’s appropriate to get that help), I consider it acceptable.
You need not cite the course Web site or the Racket reference
pages (but you can/should).
- Some faculty expect not only details but a wide range of
citations, including to the textbook or equivalent.
- Some of you got “Did Sam give you permission to turn this in late?”
I appreciate that my graders are checking such things. I only recall
giving one person an extension beyond the day extension.
Some positives
- Nice documentation!
- Nice citations. Thanks for taking the time to do those.
- Good research in finding other procedures that will help!
Q&A
There seem to be new LAs that were not there yesterday. Did other people have that problem?
We’ll talk offline.
Please let me know ASAP (like send a chat NOW) if you are in this situation.
When will we get MP3 back.
As soon as possible.
Where can we see the list of MP2 critiques?
In today’s eboard.
Quiz
- Bring up yesterday’s lab.
- Bring up reading on recursive skeletons and pattern matching.
- Bring up DrRacket.
- Take a deep breath.
Lab
- Make sure to negotiate submission with your partner(s) in advance.
- You should know the rest of the drill.