You are probably being recorded (and transcribed)
Approximate overview
If you’d like to suggest token events, please let me know in advance of class.
What did it mean that SoLA 6 was optional?
It meant that you didn’t have to do it.
But I don’t have to do any SoLAs!
It was a bit more optional than most.
Will the new questions on SoLA 6 appear on other SoLAs?
Yes. You can pretend that they are new for SoLA 7. There will also be a few other new ones for SoLA 7. (We need about 5–6 new LAs per SoLA.)
I’m almost out of token space. Will you add more?
Yes. I guess I should read those.
Do therapy dogs count for tokens?
Yes. But I prefer if you remind me so that they get on the list (so that I can remind others).
Do yoga and forest bathing count for tokens?
Yes. But I prefer if you remind me so that they get on the list (so that I can remind others).
Can we talk about loop invariants?
We will do a loop invariants problem on Thursday.
The person closer to the board is Driver A. The person further from the board is Driver B.
Make sure that the name of the repo ends with -maven.
What’s this with (str) -> ...?
That’s a lambda, a cool feature of Java when you have interfaces that specify only one function.
This build a new Predicate with a test method whose body is the ellipses.
SearchUtils.search(strings, (str) -> str.length() < 5);
Are there other ways to make predicates?
Sure. You could use an anonymous inner class or you could even make a named class.
What would the AIC look like?
Predicate<String> lessThanFiveChars = new Predicate<String>() { public boolean test(String str) { ... } // test(String) };
How do I iterate an Iterable?
With a for-each loop.
for (TYPE VAR : ITERABLE) { ... } // for
How should we find the midpoint of the region given by lb and ub?
Most people use
(lb + ub) / 2.
I prefer
lb + (ub - lb) / 2.
You could also use
lb / 2 + ub / 2 + ..., where the ellipses handle the issue that both might be odd. This one is probably safest.