Saturday, May 30, 2020

Lemay Lesson 5: Arrays, Conditionals, and Loops

Table of Contents

1. Introduction & Rapoport Problem of the Day
2. More Rapoport Geometry Problems
3. Traditionalists: The Sunblock Solution
4. Traditionalists: Supply Your Own Interpretation
5. Lemay Lesson 5: Arrays, Conditionals, and Loops
6. More on Java, BlooP, and Primes
7. Fever Pitch and Akeelah and the Bee
8. French in Action
9. Reblogging: SBAC Prep
10. Conclusion

Introduction & Rapoport Problem of the Day

Today on her Daily Epsilon of Math 2020, Rebecca Rapoport writes:

Find x.

[All the given information is in the diagram. An angle of measure x degrees appears in the unit circle in the standard position in Quadrant I, with sqrt(3)/2 shown as the distance along the horizontal axis.]

Ordinarily, I only highlight Rapoport at the top of the post when it's a Geometry question. But you can easily argue that this is unit circle trigonometry rather than Geometry. Then I'll counter by saying that we can just ignore the unit circle -- we have a right triangle with an acute angle x, hypotenuse 1, and sqrt(3)/2 as the length of the adjacent leg. Then this becomes a pure Geometry problem.

And let's try solving it geometrically, then. We can either use the Pythagorean Theorem to find the length of the missing leg (1/2), or recognize that this is a 30-60-90 triangle directly without finding the missing leg at all. That sqrt(3) factor gives it away that it's 30-60-90.

Therefore x, our desired angle, is 30 degrees -- and of course, today's date is the thirtieth. (If we use unit circle trig instead, we end up seeking x in Quadrant I such that cos x = sqrt(3)/2, so x = 30. Then again, our Geometry method today is based on special right triangles in Chapter 14, which we failed to reach before the coronavirus closure.)

Yes, today is May 30th. It is Decoration Day -- the traditional Memorial Day -- before we began to observe the holiday on a Monday nearly 50 years ago.

Today lies right between the dates of Pentecost as observed by Jews and Christians. The Jewish Pentecost (called Shavuot in Hebrew) was yesterday, 50 days after the start of Passover. (The "pente-" in Pentecost means "five," as in "fifty.") The Christian Pentecost is also 50 days after another holiday, Easter instead of Passover. Because the days are counted inclusively (like fence posts), it's actually 49 days, or seven weeks, after Easter, and hence both Easter and Pentecost are always on Sundays.

This year, Pentecost has an additional significance -- here in California, churches and synagogues may reopen with limited capacity, just in time for the religious holiday. But it's actually dependent on each county -- large counties with more coronavirus cases such as LA County are less likely to open houses of worship than rural counties with fewer cases.

On the Andrew Usher Calendar -- where Easter is always the Sunday in the April 5th-11th range --Pentecost Sunday is always the day before Memorial Day Monday. This follows a general pattern on the Usher Calendar where many religious holidays fall near secular celebrations.

More Rapoport Geometry Problems

There was another Geometry problems on the Rapoport calendar earlier this week:

If EF = 17 and HE = 23, what is AB?

[Here is the given info from the diagram: two circles are drawn with three common tangents -- the tangent lines are AB, CDEF, with A, C, E on one circle and B, D, F on the other. The point where Lines AB and EF intersect is G, and the point where lines CD and EF intersect is H.]

This is very obviously a question where the Two Tangents Theorem is required -- a theorem that appears all the time on the Rapoport Calendar, yet not in the U of Chicago text. This theorem tells us that two tangent segments to a circle with a common endpoint are congruent.

Using this theorem, we deduce the following lengths:

HC = HE = 17
HD = HF = 6 (from the given diagram, F is between H and E, which we abbreviate as H-F-E)
CD = 29 (from the given diagram, C-H-D)

But so far, none of these values involve the tangent line containing points A, B, and G.

Let's look at the diagram once more. There are three common tangents to the two circles, and we know that AB and EF intersect (at G), as do CD and EF (at H). This raises the question -- do the lines AB and CD intersect anywhere?

Well, it appears the way they're drawn on the diagram that they do indeed intersect (albeit beyond the edge of the diagram), so let's call this point I. Then we can apply Two Tangents to point I, so that we have IA = IC and IB = ID. It also appears that I-A-B and I-C-D. So from IB = ID, we can rewrite this as IA + AB = IC + CD, from which we subtract IA = IC to obtain AB = CD.

And we already know that CD = 29. Therefore AB, our desired length, is 29 -- and of course, this problem was for yesterday, the 29th.

It is a bit unsettling, though, that we had to assume that AB and CD intersect at I -- that these lines intersect is strongly suggested by the diagram, but not directly stated. But I suspect that even if the tangents AB and CD were parallel, AB would still equal CD. From Radius-Tangent, the radii OA and OC would indeed be perpendicular to their respective tangents AB and CD, so by Two Perpendiculars and Perpendicular to Parallels, OA and OC are parallel to each other -- but since both contain O (an argument that we've seen before in the U of Chicago text), the three points are collinear, A-O-C. So AC is a diameter that's perpendicular to both AB and CD. So ABDC is a rectangle -- and opposite sides of a rectangle are congruent.

Traditionalists: The Sunblock Solution

Our main traditionalists have been active lately. Barry Garelick posted the following a week ago, on May 23rd -- one day too late for me to mention it in my last blog post:

https://traditionalmath.wordpress.com/2020/05/23/the-sun-block-solution/

In 1987, then Dept of Interior Secretary Donald P. Hodel when questioned about the deterioration of the ozone layer in the atmosphere suggested that people wear hats, sunglasses and protective sun creams to protect against skin cancer. He was soundly criticized for a statement that addressed the symptoms but not the cause.
A similar attitude is seen in education–particularly math education–from vendors promoting the next shiny new thing designed to cure educational woes. I just finished reading two articles. The first is a PR puff piece written by “guest contributor” praising the program “Teach to One”. It discusses that students who lack foundational skills in math is a big problem–but “personalized learning” offers a solution to this ill.
“It’s difficult to teach a class that engages both lower-ability and higher-ability children because you can’t always address multiple needs simultaneously. Traditional teaching approaches will always leave some students behind.”

Yes, I discussed the ozone layer recently on the blog, since Neil DeGrasse Tyson mentioned it in one of his Cosmos episodes. But here Garelick is using it as an analogy. It's better not to wear sunblock, but simply the ozone layer. Likewise, to him, it's better not to come up with this new "Teach to One" method, but simply teach traditionalist math.

One commenter here is one of our well-known traditionalists, Ze'ev Wurman:

Ze'ev Wurman:
I commiserate with your disgust. But I’d like to point out that Education Next has long ceased to be willing to shake the educational establishment. Now it became mostly middle-of-the-road publication promoting venture-funded ideas.

Here Wurman refers to Education Next, one of the articles linked to in Garelick's post. Let me post the link to that article:

This became painfully obvious to me when shortly after reading the puff piece in the South Florida Reporter, I read another one in Education Next. The article was very detailed with graphs, charts and examples. It was authored by Joel Rose whose bio at the end reads: “Joel Rose is co-founder and chief executive officer at New Classrooms, which published The Iceberg Problem, from which this essay is adapted.

Garelick and Wurman say that Education Next used to "shake the educational establishment." To them, the "establishment" is all for reform methods, and "shaking" it means promoting the methods that traditionalists prefer.

The main commenter in this thread, as usual, is SteveH:

SteveH:
“It’s difficult to teach a class that engages both lower-ability and higher-ability children because you can’t always address multiple needs simultaneously. Traditional teaching approaches will always leave some students behind.”
Bwa Ha Ha! All K-6 schools are now about full inclusion and social promotion. All of their differentiated instruction (learning) techniques are complete failures, and I saw many of them with my son. The classroom ability and willingness range is much larger!!! Traditional teaching had a lower range, gave grades, and used summer school or keeping kids back a year. I distinctly remember that effect on students. Now kids get fuzzy non-grade rubrics that are meaningless.
And once again, SteveH is promoting hard-core tracking. Indeed, he mentions tracking again a little later in this comment:

SteveH:
Yes! They can regroup kids at the same level with common needs into a separate room with their own full time teacher and call it a different grade. If they regroup this way in mixed classroom, then why not put up a partition or a wall or just put them into a separate room with their own teacher? If they don’t have common ability grouping or don’t have constant teacher attention, then they will have to user computers individually. Any other solution is just play learning to cover over the assumptions and trade-offs of full inclusion they really don’t want to talk about. They just claim better understanding and send out a lot of BS.

And once again, SteveH criticizes "full inclusion." We know by now that to SteveH, anything other than tracking is "full inclusion" and deserves to be ridiculed. Traditionalists hate the idea of everyone being included and prefer the partial exclusion known as tracking.

SteveH:
High schools use a full inclusion environment, but everyone is sorted academically into separate classes. K-6 schools need to do this, but they choose not to. Social, not academic reasons drive that decision, but they do not want to admit that they can’t pull it off. They just keep trying new things like “Teach to One” where the goal is to try once again to cover over reality.

Any form of tracking in elementary school -- beyond the mild tracking presented in previous posts as "The Path Plan" -- is something I'm opposed to.

Actually, I'm now rethinking about the Path Plan in the wake of the coronavirus. The Path Plan describes how elementary students can have a reading level, or "path," distinct from their math level by having multiple teachers throughout the day. At the time I wrote this, I'd believed that schools would reopen normally in the fall with social distancing a distant memory.

But now it appears that social distancing will stretch pass the first day of school -- I mentioned this at the end of my last post. The Path Plan won't work until after the pandemic is over and distancing is no longer needed.

I do assume that SteveH's discussion here refers to what to do during normal times, when pandemic is no longer a factor. Thus the "computers" he mentions here have nothing to do with distance learning during the coronavirus. Instead, his computers take the place of tracking -- students receive the "personalized learning," at their own level, that they would have received under hard-core tracking.

By the way, normally I wouldn't link to Joanne Jacobs and its main traditionalist, Bill, on the same day as linking to Garelick's blo9g. But one of Bill's comments is also about tracking, so I'll lump it in here with SteveH's tracking post.

https://www.joannejacobs.com/2020/05/group-students-by-ability-not-age/

The article linked above suggests giving elementary kids high school-like schedules so that they can be grouped at different levels for different subjects. I oppose this -- this is why my Path Plan only gradually increases the number of teachers a student sees in a day. (The original article was dated 2017, so coronavirus wasn't a factor here.)

Here's what Bill writes:

Bill:
Most public school systems had eliminated grouping students by ability by the late 70’s/early 80’s due to the “self-esteem” issues kids would have (as they wouldn’t have a self esteem issue if they don’t graduate from high school and cannot find a job)?

I've mentioned the ability to get a job here -- many parents would object to their child being placed on a lower track because they fear their young ones won't get a job from the lower track. But here Bill seems to be making the opposite argument -- a student who simply can't handle high-track work is more likely to get a job by passing from the low track than by failing from the high track! (It's likely that Bill is thinking about the German system here, where the lower track prepares students for a lower-paying job in the trades.)

If Bill is correct, then parents of students who can't handle the high track should be happy that their kids are placed on the low track where they have a chance of success. But instead, we know that during the era mentioned in his comment (the late 1970's and early 1980's), parents complained that their children were being tracked too low.

Once again, it's impossible to discuss tracking without bringing up race. The parents of low-track students complained when they saw the skin colors of the other students sitting in the low-track classes and compared them to the skin colors of the students sitting in the high-track classes.

As usual, it's tough to figure out how to implement hard-core tracking without racial segregation. It's possible that one way to solve the tracking/race problem once and for all is to have parents, not teachers or administrators, be the ones to place students on various tracks. Teachers can give parents data to help them make a decision -- it's ultimately up to parents to decide whether to take this information at face value or not.

(Once again, coronavirus complicates this argument as well. It's been mentioned in the news a lot that a higher proportion of blacks have been affected by the virus than whites. Thus it's possible for white parents to push for segregation -- keep their white children away from black children in other to avoid exposing them to the blacks' higher coronavirus rate.)

Traditionalists: Supply Your Own Interpretation

On Wednesday, Barry Garelick posted yet again. This is what happens when I miss one of his posts -- I end up falling behind and need to cover two of his posts in one of mine:

In this PR piece of yet another “personalized learning” math software, this paragraph stands out:
Zearn Math builds deep understanding of concepts and flexible problem-solving skills through an emphasis on visualization, drawing to solve, and concrete representations of abstract concepts. The curriculum’s focus on inclusivity and accessibility aims to create a sense of belonging in the math classroom for all students by fostering the development of tenacious, lifelong learners. Each day, students learn in flexible and feedback-rich environments and are supported in accessing grade-level math with on-ramps and personalized feedback embedded throughout the curriculum, which includes over 800 digital lessons.

One of the commenters here is called "Darren." I clicked on the link, and -- you guessed it! -- it's Darren Miller of "Right(-wing) on the Left Coast." He doesn't comment often on Garelick's site -- his last comment there was nearly two years ago.

Darren:
The more online programs I see, the •less• highly I think of them. The more buzzwords I see, the more suspicious I am. Still, this company will have more than a few school districts throwing plenty of tax dollars at them.
What is the evidence of effectiveness?
Of course, it's not the online part that worries Darren -- it's the anti-traditionalist part, as represented by Darren's "buzzwords" (such as "understanding"). He and Garelick would favor online education if it's traditionalist, just as they favor in-person education that's traditionalist.

Chester Draws:
“which includes over 800 digital lessons”
In NZ a high school kid who takes Maths all the way from Year 9 to Year 13 would receive near enough 800 lessons of Maths. Given that some are tests etc, they would get at least 600 separate teaching lessons, and perhaps more teaching sessions, given that some lessons you teach two (albeit related) things.
Oops -- Zearn is an elementary program, so high school math has nothing to do with it. I assume that NZ refers to "New Zealand" -- I always knew that Draws isn't American, since he often refers to things that don't exist here (such as "Year 13"). Now I finally know his nationality.

SteveH:
What does STEM-level readiness mean in K-6? It requires the ability for individual kids to complete proper homework P-sets to at least 80% correct and getting at least that on tests of skills – on a track where they meet the criteria for getting on the algebra in 8th grade track with an 80% chance of success.

Yes, we already know that traditionalists like SteveH strongly favor "proper" P-sets and Algebra I in eighth grade. As usual, he forgets that many students would simply leave the P-sets blank -- these students will get a score of 0%, not 80%, and will end up not learning at all.

SteveH:
Many parents don’t worry much about K-6 because they think that there is time in high school to correct. That’s not the case and I tutored capable students who just thought they were bad at math. Some called themselves stupid. No. They were not taught properly.

So in other words, in class the students said that they "were bad at math," and the class they attended was anti-traditionalist -- it didn't assign P-sets. Now suppose these students had been given P-sets -- would they have completed them, or just left them blank?

Then they come to SteveH to tutor them, and he teaches them traditionally. Of course the students actually do the P-sets this time -- SteveH is sitting a few feet away from them, so they can't escape him the way they can escape their teacher when there's 20-30 other kids in the class. They complete the P-sets and learn math -- and then SteveH laments that math can't be taught this way in their original classroom.

Notice that Garelick titles his post "Supply Your Own Interpretation," and here he explains why:

Supply your own interpretation in the comments below. Let’s see what you can come up with. Particularly these key sentences. Winners will be announced in a separate post.

So, what are we waiting for? I will supply my own interpretation of the Zearn description. And hey -- maybe I'll be the "winner" he'll announce in his next post. Then again, I doubt I'll win -- his blog is, after all, a traditionalist echo chamber. The "winner" will be some traditionalist who says something like "Zearn won't work, because it isn't traditionally taught math."

Draws already gives his interpretation of the third statement, so let me focus on the first two:

Zearn Math builds deep understanding of concepts and flexible problem-solving skills through an emphasis on visualization, drawing to solve, and concrete representations of abstract concepts.

Some students have trouble understanding abstract concepts (such as fraction arithmetic), and so it helps them when they draw visual concrete representations. In particular, they want to add the denominators, and the pictures are there to remind them why they shouldn't add them.

The curriculum’s focus on inclusivity and accessibility aims to create a sense of belonging in the math classroom for all students by fostering the development of tenacious, lifelong learners. 

This one's easy. Students who are included and find math accessible feel that they belong in the classroom -- and are less likely to leave worksheets blank. On the other hand, students who are excluded by traditionalists and find math inaccessible are likely to leave traditional P-sets blank -- and these are the students Zearn hopes to reach.

Lemay Lesson 5: Arrays, Conditionals, and Loops

Here's the link to today's lesson:

http://101.lv/learn/Java/ch5.htm

Lesson 5 of Laura Lemay's Teach Yourself Java in 21 Days! is called "Arrays, Conditionals, and Loops," and here's how this chapter begins:

Although you could write Java programs using what you've learned so far, those programs would be pretty dull. Much of the good stuff in Java or in any programming language results when you have arrays to store values in and control-flow constructs (loops and conditionals) to execute different bits of a program based on tests.

As usual, we'll be comparing Java to C++. Lemay begins this chapter with arrays:

Arrays in Java, as in other languages, are a way to store collections of items into a single unit. The array has some number of slots, each of which holds an individual item. You can add and delete items to those slots as needed. Unlike in other languages, however, arrays in Java are actual objects that can be passed around and treated just like other objects.

Here's one difference between C++ and Java -- in Java, we can use new directly in the array declaration -- we normally don't do this in C++:

The first way is to use the new operator to create a new instance of an array:
String[] names = new String[10];
That line creates a new array of Strings with 10 slots (sometimes called elements). When you create a new array object using new, you must indicate how many slots that array will hold. This line does not put actual String objects in the slots-you'll have to do that later.

And Lemay explains that even before we put objects in the arrays, they contain default values:

When you create an array object using new, all its slots are initialized for you (0 for numeric arrays, false for boolean, '\0' for character arrays, and null for objects). You can then assign actual values or objects to the slots in that array.

Recall that when we compared BlooP to Java, we found out that unlike BlooP, Java doesn't have default return values for methods -- we must directly state when an int function returns zero. But when it comes to int arrays, 0 is the the default value after all.

Lemay also explains what null is in Java, and how it's different from C and C++:

Note that the Java keyword null refers to a null object (and can be used for any object reference). It is not equivalent to zero or the '\0' character as the NULL constant is in C.

We now learn how to access the elements of an array:

myArray[subscript];
The myArray part of this expression is a variable holding an array object, although it can also be an expression that results in an array. The subscript part of the expression, inside the brackets, specifies the number of the slot within the array to access. Array subscripts start with 0, as they do in C and C++. So, an array with 10 elements has 10 array slots accessed using subscript 0 to 9
.
Note that all array subscripts are checked when your Java program is run to make sure that they are inside the boundaries of the array (greater than or equal to 0 but less than the array's length). Unlike in C, it is impossible in Java to access or assign a value to an array slot outside the boundaries of the array (thereby avoiding a lot of the common problems and bugs that result from overrunning the bounds of an array in C-like languages).

In this regard, Java's arrays are just like C++'s. On the other hand, BASIC arrays are different:

10 DIM A(10)

Then both A(0) and A(10) refer to distinct elements -- so DIM A(10) actually creates an array with eleven elements.

Once again, I find the part where Lemay explains about references to objects in Java -- which she compares to pointers in C++ -- a bit confusing:

An important thing to note is that an array of objects in Java is an array of references to those objects (similar in some ways to an array of pointers in C or C++). When you assign a value to a slot in an array, you're creating a reference to that object, just as you do for a plain variable. When you move values around inside arrays (as in that last line), you just reassign the reference; you don't copy the value from one slot to another. Arrays of primitive types such as ints or floats do copy the values from one slot to another.

Let's get to our first listing:

Listing 5.1. Various simple array operations.
 1: class ArrayTest {
 2:
 3:    String[] firstNames = { "Dennis", "Grace", "Bjarne", "James" };
 4:    String[] lastNames = new String[firstNames.length];
 5: 
 6:    void printNames() {
 7:      int i = 0;
 8:       System.out.println(firstNames[i] 
 9:          + " " + lastNames[i]);   
10:      i++;
11:       System.out.println(firstNames[i] 
12:         + " " + lastNames[i]);
13:       i++;   
14:       System.out.println(firstNames[i] 
15:          + " " + lastNames[i]);
16:       i++;   
17:      System.out.println(firstNames[i] 
18:          + " " + lastNames[i]);
19:    }
20:   
21:    public static void main (String args[]) {
22:      ArrayTest a = new ArrayTest();
23:       a.printNames();
24:       System.out.println("----------");
25:       a.lastNames[0] = "Ritchie";
26:       a.lastNames[1] = "Hopper";
27:      a.lastNames[2] = "Stroustrup";
28:       a.lastNames[3] = "Gosling";
29:       a.printNames();    
30:   }
31:}
The line where we must create a new ArrayTest object a is a bit weird, but I see why it's there -- unlike C++, all methods are members of objects, and all programs are classes. So in order to use a method, we must make a new object of that class. This object doesn't actually do anything except call the method.

Lemay explains who the four names in this program are:

Who are the people in this example? They're inventors of computer programming languages. Dennis Ritchie is the inventor of C, Bjarne Stroustrup did C++, Grace Hopper is credited with COBOL, and, finally, James Gosling is the principal designer of Java.

We also learn about multidimensional arrays -- or their Java equivalent:

One last thing to note about arrays before we move on to the rest of this lesson is about multidimensional arrays. Java does not directly support multidimensional arrays. However, you can declare and create an array of arrays (and those arrays can contain arrays, and so on, for however many dimensions you need) and access the arrays as you would C-style multidimensional arrays:

int coords[][] = new int[12][12];
coords[0][0] = 1;
coords[0][1] = 2;

We now move on to blocks. Both C++ and BlooP use blocks as well:

A block statement is simply a group of Java statements surrounded by braces ({}). You've seen blocks a whole lot already; you've used a block statement to contain the variables and methods in a class definition, and inside that block you've also used blocks to hold the body of a method definition. The opening brace opens the block, and the closing brace closes the nearest closing block. Easy, right?
You can also use blocks even further, inside method definitions. The rule is that you can use a block anywhere a single statement would go. Each statement inside the block is then executed sequentially.

The next topic is if statements. Nearly every language has such conditional statements, and we recall that Lesson 2-3 of the U of Chicago text is all about IF statements in BASIC.

An optional else keyword provides the alternative statement to execute if the test is false:
if (x < y)
    System.out.println("x is smaller than y");
else System.out.println("y is bigger");
There's not much difference from C++ here, except for this:

The difference between if conditionals in Java and C or C++ is that the test must return a boolean value (true or false). Unlike in C, the test cannot return an integer.

So true has nothing to do with 1, and false has nothing to do with 0 -- just as null has nothing to do with 0 earlier. Java avoids identifying these terms with integers.

Here's the next listing:

Listing 5.2. The Peeper class.
 1: class Peeper {
 2:
 3:    void peepMe(int val) {
 4:       System.out.println("Value is " 
 5:          + val + ". ");
 6:       if (val % 2 == 0) 
 7:         System.out.println("Peep!");
 8:    }
 9:    
10:   public static void main (String args[]) {
11:      Peeper p = new Peeper();
12:      
13:       p.peepMe(1);      
14:       p.peepMe(2);
15:        p.peepMe(54);
16:       p.peepMe(77);
17:      p.peepMe(1346);
18:    }
19: }
This method prints the word Peep! if the input is even.

At this point we learn about the ternary operator ?:, which works just as in C++.

Our next main example is switch:

Many languages have a shorthand version of the nested if that is (somewhat) easier to read and allows you to group the tests and actions. Called a switch or case statement, in Java it's called switch and behaves as it does in C:

switch (test) {
    case valueOne:     
      resultOne;
      break;
    case valueTwo:     
      resultTwo;
      break;
    case valueThree:   
      resultThree;
      break;
    ...
    default: defaultresult;
}

Here's the next listing:

Listing 5.3. The NumberReader class.
 1: class NumberReader {
 2:
 3:    String convertNum(int val) {
 4:       switch (val) {
 5:          case 0: return "zero ";
 6:          case 1: return "one ";
 7:         case 2: return "two ";
 8:          case 3: return "three ";
 9:          case 4: return "four ";
10:         case 5: return "five ";
11:         case 6: return "six ";
12:         case 7: return "seven ";
13:          case 8: return "eight ";
14:          case 9: return "nine ";
15:          default: return " ";
16:       }
17:   }
18:    
19:    public static void main (String args[]) {
20:      NumberReader n = new NumberReader();
21:      String num = n.convertNum(4) + n.convertNum(1)  + n.convertNum(5);
22:      System.out.println("415 converts to " + num);
23:   }
24:}
We move on to the for loop, with which we are also familiar:

The for loop, as in C, repeats a statement or block of statements until a condition is matched. for loops are frequently used for simple iterations in which you repeat a block of statements a certain number of times and then stop, but you can use for loops for just about any kind of loop.
The for loop in Java looks roughly like this:

for (initialization; test; increment) {
    statements;
}

Remember, as I found out accidentally, one difference between Java and C++:

initialization is an expression that initializes the start of the loop. Variables that you declare in this part of the for loop are local to the loop itself; they cease existing after the loop is finished executing.

And we receive this warning:

Note that a common mistake in C that also occurs in Java is to accidentally put a semicolon after the first line of the for loop:

for (i = 0; i < 10; i++);
    System.out.println("Loop!");

Before we move on to the next listing, I notice that Lemay makes an error here. She creates a new class called NamesLoop, which acts just like ArrayTest except it uses a loop in its single method, namely printNames method. But then she writes:


11:  public static void main (String args[]) {
12:      ArrayTest a = new ArrayTest();
13:       a.printNames();

that is, she has the new class NamesLoop create an object a of the old class ArrayTest and then has a call the old class's printNames method!

For laughs, I decided to run Lemay's version on my compiler anyway. It still works -- likely because I saved the ArrayTest class in the same project, so NamesLoop can access it. The output is still the same because both methods work identically -- the difference is that one class uses a for loop while the other doesn't.

I'll post the next listing, except I'll change it to the correct class in Line 12 as Lemay intended:

Listing 5.4. A modified array test with loops.
 1: class NamesLoop {
 2:
 3:    String[] firstNames = { "Dennis", "Grace", "Bjarne", "James" };
 4:    String[] lastNames = new String[firstNames.length];
 5: 
 6:    void printNames() {
 7:      for (int i = 0; i < firstNames.length; i++) 
 8:          System.out.println(firstNames[i] + " " + lastNames[i]);   
 9:    }
10:   
11:   public static void main (String args[]) {
12:      NamesLoop a = new NamesLoop();
13:       a.printNames();
14:       System.out.println("----------");
15:       a.lastNames[0] = "Ritchie";
16:       a.lastNames[1] = "Hopper";
17:      a.lastNames[2] = "Stroustrup";
18:       a.lastNames[3] = "Gosling";
19:       
20:      a.printNames();    
21:}
22:}


We move on to while loops:

while and do loops are exactly the same as in C and C++ except that their test conditions must be booleans.

Here is the next listing:

Listing 5.5. while loops to copy array elements.
 1: class CopyArrayWhile {
 2:   public static void main (String args[]) {
 3:       int[] array1 = { 5, 7, 3, 6, 0, 3, 2, 1 };
 4:       float[] array2 = new float[array1.length];
 5:       
 6:        System.out.print("array1: [ ");
 7:       for (int i = 0; i < array1.length; i++) {
 8:          System.out.print(array1[i] + " ");
 9:        }
10:       System.out.println("]");
11:   
12:       System.out.print("array2: [ ");
13:       int count = 0;
14:       while ( count < array1.length && array1[count] != 0) {   
15:              array2[count] = (float) array1[count];
16:              System.out.print(array2[count++] + " ");
17:      }
18:        System.out.println("]");
19:    }
Once again, on my compiler, all floats point with a decimal point. So my second array looks like:

array2: [ 5.0 7.0 3.0 6.0 ]

with each term having a point-zero. Only four terms print before the sentinel value of 0 .

Here is the next listing, which uses a do while loop:


Listing 5.6. A simple do loop.
 1: class DoTest {
 2:    public static void main (String args[]) {
 3:      int x = 1;
 4:  
 5:      do {
 6:        System.out.println("Looping, round " + x);
 7:        x++;
 8:      } while (x <= 10);
 9:    }
10: }
Once again, recall that the Repeat loop of TI-BASIC is just like Pascal's Repeat. This is similar to the do while loop of Java/C++, in that the loop always runs at least once. The difference is that, whereas Repeat stops when the condition is true, do while stops when it is false.

Here is our final listing, which uses something called a "labeled loop" to break out of:


Listing 5.7. A labeled loop example.
 1: class LabelTest {
 2:    public static void main (String arg[]) {
 3:  
 4:      foo: 
 5:      for (int i = 1; i <= 5; i++)
 6:        for (int j = 1; j <= 3; j++) {
 7:           System.out.println("i is " + i + ", j is " + j);
 8:           if (( i + j) > 4) 
 9:           break foo;
10:        }
11:      System.out.println("end of loops");
12:    }
13:}
In C++ and TI-BASIC, labels are used only for goto statements, which are discouraged. But Java uses labels for other loops. As for goto statements in Java:


Q:
Does Java have gotos?
A:
The Java language defines the keyword goto, but it is not currently used for anything. In other words, no-Java does not have gotos.

So Java completes the gradual decline of goto, from its appearance in BASIC ("spaghetti code") to its disappearance in Java.

Java, BlooP, and Primes

In this lesson, Lemay gives one more example that we skipped over. She tells us that while it's usually an error to place a semicolon right after a for statement, there actually can be a time when we'd really like to have an empty for loop. This is desirable when we have let the for statement itself do all the work that's needed, so nothing needs to be inside the loop. Here's her example:

You can also have an empty statement for the body of your for loop, if everything you want to do is in the first line of that loop. For example, here's one that finds the first prime number higher than 4000 (it calls a method called notPrime(), which will theoretically have a way of figuring that out):

for (i = 4001; notPrime(i); i += 2)
    ;
Hey, that reminds us -- didn't we earlier write a primes function in BlooP and convert it to Java? In each of my Java posts, I'd like to do some coding of my own, beyond what Lemay writes. And this project is perfect -- this line is missing a primes method, while the primes method that we wrote earlier was missing a main method (an empty meat grinder). I considered giving it a main method earlier, but at the time, we hadn't technically learned how to write for loops (so I was jumping ahead by providing a primes method in the first place).

Here is the class from 2-3 weeks ago where we defined a primes method:

class Hofstadter {

double twotothethreetothe(int n) {
     int cell0 = 1;
     for (int i=1; i<=n; i++)
          cell0 *= 3;
     double cell1 = 1.0;
     for (int i=1; i<=cell0; i++)
          cell1 *= 2.0;
     return cell1;
}

int minus(int m, int n) {
     if (m<n)
          return 0;
     for (int i=0; i<=m; i++)
          if (i+n==m)
               return i;
     return 0;
}

boolean isprime(int n) {
     if (n<2)
          return false;
     for (int i=2; i<n; i++)
          if (n%i==0)
               return false;
     return true;
}

boolean isgoldbach(int n) {
     for(int i=2; i<n; i++)
          if (isprime(i) && isprime(minus(n,i)))
               return true;
     return false;
}

}

Oops, there's a problem here -- earlier we wrote an isprime method, but Lemay suggests writing a notprime method instead.

There are two ways to fix this. We can either write notprime, which is simple -- in isprime, we just change true to false and vice versa. The other is to use !(isprime), where ! is called the negation operator. I prefer the second -- this project is supposed to be independent from Lemay. It's clearly inspired by something Lemay wrote, but it doesn't need to be identical. So I've decided that I'd rather use my isprime method than create a notprime method.

So let's write our main method now. First of all, we must create an object from which to call the isprime method -- since this class is named Hofstadter, that's the object type.

Next, notice that in Lemay's example, her line starts with for(i=4001; -- that is, the variable i is never declared. We now know that declaring i here would make it local to the loop itself (which is empty) -- there'd be no way to use it (or print it) after the loop is complete. In order to print the value of the prime we'd find, we should declare i before the loop. Here int i; is sufficient -- we don't need to initialize i, since we'll give it the value 4001 in the very next line.

So here is our main method:

public static void main(String args[]) {
     Hofstadter h = new Hofstadter();
     int i;
     for(i=4001; !(h.isprime(i)); i+=2)
          ;
     System.out.println(i);
}

The output for this class is 4001 -- it turns out that this number is already prime, and so the loop runs only once. I wonder whether Lemay knew that 4001 is prime when she wrote this. To make this more interesting, let me change it to find the first prime greater than 5000 instead.

When I make this change, the next prime turns out to be just 5003. Well, at least the loop runs more than once this time. It turns out that the next prime after 8000 is 8009, so this is the most interesting case in this range. So let me assert my independence from Lemay and choose 8000 in my class.

So here is the final version:

class Hofstadter {

double twotothethreetothe(int n) {
     int cell0 = 1;
     for (int i=1; i<=n; i++)
          cell0 *= 3;
     double cell1 = 1.0;
     for (int i=1; i<=cell0; i++)
          cell1 *= 2.0;
     return cell1;
}

int minus(int m, int n) {
     if (m<n)
          return 0;
     for (int i=0; i<=m; i++)
          if (i+n==m)
               return i;
     return 0;
}

boolean isprime(int n) {
     if (n<2)
          return false;
     for (int i=2; i<n; i++)
          if (n%i==0)
               return false;
     return true;
}

boolean isgoldbach(int n) {
     for(int i=2; i<n; i++)
          if (isprime(i) && isprime(minus(n,i)))
               return true;
     return false;
}


public static void main(String args[]) {
     Hofstadter h = new Hofstadter();
     int i;
     for(i=8001; !(h.isprime(i)); i+=2)
          ;
     System.out.println(i);

}
}

Fever Pitch and Akeelah and the Bee

The week after Memorial Day have been known in recent years as Bee Week. It's the week that two national competitions for young students are held -- the Scripps National Spelling Bee and the National Geographic Bee. Of course, both of those have been cancelled by the coronavirus.

I've mentioned on the blog before that one of my favorite movies is Akeelah and the Bee. First released in 2006, the film is about a girl who participates in the National Spelling Bee. I consider it to be one of the four big inspirational school movies, along with Freedom Writers, McFarland USA, and of course Stand and Deliver.

And since I own this movie on DVD, I try to watch it every year, around the time of the actual National Spelling Bee. Indeed, I watched it two nights ago, on Thursday, since the national finals are typically held on a Thursday.

And with the schools closed and there being no Geometry classes for me to discuss, I've decided to post a full review of Akeelah and the Bee for my annual viewing, right here on the blog.

By the way, I've been watching other movies during the shutdown as well. With most live sports cancelled, I will watch a randomly chosen sports flick on certain nights, and in fact I randomly selected Fever Pitch the night before watching Akeelah. Released the year before Akeelah, Fever Pitch is all about the Boston Red Sox and their World Series 2004 championship run.

Hmm, perhaps I should be reviewing Fever Pitch here on the blog, not Akeelah. Indeed, the male lead of Fever Pitch, Ben Wrightman, is a Geometry teacher. Thus technically speaking, Fever Pitch is more relevant to this Geometry blog than Akeelah, which has nothing to do with teaching math at all, much less Geometry.

OK, I guess I will review Fever Pitch as well -- specifically the parts relevant to Ben's math class. I turned on the captioning and caught the following lines near the start of the film:

Ben: I teach Honors Geometry, ninth grade. And every year I pick a few promising math students to meet someone who's pursued mathematics as an educational discipline and has made practical use of that education.

(And that someone is a beautiful woman named Lindsey:

Lindsey: All right, the client I'm working for now is this really cool company called Marquis Jet, and they're trying to figure out how to make renting private jets more affordable. Are any of you in the habit of looking at numbers? You know, addresses, license plates, phone numbers, and adding them up and rearranging them in you head to make more interesting patterns?
Young Guy: Oh my God, she knows my secret shame!

OK, so we see from this excerpt that Ben is trying to get some of his students to think more about careers related to STEM. We never find out exactly what Lindsey's job is or how it's related to math, but it appears that it's related to finances (making things more affordable). Then again, it might also be related to engineering (producing a jet more cheaply).

There are four students on this field trip -- two guys and two girls. We know how important it is to motivate more girls to pursue a STEM career, so it's good that there are two girls on this trip, plus the worker they meet on the trip is also a woman.

These students are freshmen in Honors Geometry, so they most likely took Algebra I the previous year as eighth graders. So these students are already on SteveH's STEM track. Then again, it might be nice for a teacher of younger students (say Grades 4-6) to go on this field trip. Knowing how math is used in the real world might motivate them to work harder -- and those are the students who will strive to excel on the traditionalist P-sets that SteveH insists are necessary to a STEM degree.

That's it for the math part of the movie. The main plot is all about Ben asking Lindsey on a date and ultimately becoming her boyfriend. But he's a huge Red Sox fan, and Lindsey fears that he loves the Red Sox more than he loves her.

Whenever I'm watching a movie that mentions schools, I'm always obsessed with whether the school calendar is accurate (ever since Frosty the Snowman had kids attending school on Christmas Eve). It's mentioned that every year during spring break, Ben and his buddies travel down to the Red Sox spring training camp in Florida. But this is an error -- last month, I explained that schools in Boston close for spring break not during Easter, but during Patriots' Day, the third Monday in April. But this isn't during spring training, but the regular season -- indeed, every year on Patriots' Day, the Sox host a game at Fenway Park starting at 11 AM (at the conclusion of the Boston Marathon).

Of course, this calendar error was made in order to make the scene where Ben reveals to Lindsey that he's a Red Sox fan more dramatic. Lindsey's talking about her spring break plans, and Ben gets down on one knee and proposes to her -- that he'll take her to Opening Day.

When this movie first came out, I'd thought that it was produced to celebrate the Red Sox and their first championship in 86 years. But in reality, the film was produced before they won the World Series -- in the original screenplay, Ben gets the girl but the Red Sox lose yet again. Instead, the ending was rewritten as the Curse of the Bambino was finally broken.

I enjoyed watching Fever Pitch, though as a Southern Californian, I would have liked it more had it focused on one of our local teams. Both local teams have reason to hate the Red Sox -- the Dodgers because they won the 2018 Series while allegedly stealing signs (including Mookie Betts, who is now a Dodger), and the Angels because their fans often outnumber Halo fans at Angel Stadium. But these days with no live sports, watching a movie about any team is better than nothing.

At least the other movie takes place right here -- Akeelah and the Bee. So let me get to the main feature of the night.

Akeelah Anderson is a seventh grade girl at Crenshaw Middle School in Los Angeles. As the movie opens, we learn that she's an excellent speller. But she is caught ditching class by her principal, who threatens to make her attend summer school unless she signs up for the school spelling bee. (Recall that some of the runners in McFarland were similarly blackmailed into joining the school's Cross Country team.) She signs up and wins the school bee, thus advancing to the district spelling bee.

As I mentioned before, with all school movies, I'm on the lookout for calendar errors. At the start of the movie, Akeelah is described as an 11-year-old (who, as we find out later, is already in seventh grade because she's skipped a grade.) When Akeelah comes home from her school bee, she turns on ESPN that night and is intrigued by the Scripps National Spelling Bee, and she spends the entire film prepping for the following year's national bee. Thus one full year passes -- yet at the end of the film, she's described as still being 11 years old.

We also know that the real national spelling bee is just after Memorial Day. Yet the school bee -- which occurs on the same day as the (previous year's) national bee, occurs in April. And indeed, she spends about a month preparing for the district bee, which still takes place before summer vacation.

The top ten spellers at the district bee advance to the regional/state bee. Akeelah originally finishes in eleventh place, but qualifies for the regional bee anyway when another speller is caught cheating:

Cheater's Mom: He knew the word! I mean it's one we studied. He knew it.
Official: Ma'am, did you help your child spell the word? Ma'am, this is serious business.
Mom: Oh, you're damn right right it's serious! You are gonna give these kids ulcers. Do you know how long he has studied for this? He knew that word.
Boy: No, I didn't.

A major theme in this movie is race. Akeelah is a black girl who attends an inner-city school. At the district bee, her competitors are mostly of other races, including Javier, who is Hispanic, and Dylan, who is Chinese.

The Los Angeles neighborhoods mentioned in the movie are real, including the Crenshaw District, Beverly Hills, Santa Monica, and Woodland Hills. But there is no Crenshaw Middle School (though there is a high school by that name) -- the closest real middle school in that area is Audubon. And Beverly Hills and Santa Monica are separate cities with their own respective districts, so they wouldn't participate in the LAUSD district bee. But Woodland Hills, a suburb, really is part of LAUSD, so it's correct to have them compete in the district bee. It's in the San Fernando Valley, which is why Akeelah, who takes a long bus ride there to meet Javier and Dylan, sees "valley girls" sitting in a convertible.

Dylan is coached by his father, and recommends that Akeelah get a coach as well. Her coach is Josh Larabee, a retired professor from UCLA. (Go Bruins!) Over the summer, he teaches her that most words in English come from Latin or Greek, and so it's good for her to know her classical roots.

When she returns to school in the fall, Akeelah goes to the regional bee at USC (Boo Trojans!), where the top three qualify for the national bee. But she gets in trouble with her mother, who finds out that she's gone to the bee without permission. We learn that Akeelah's father has died of gun violence, and so her mother has her hands full with Akeelah and her older siblings -- her oldest brother is an Air Force pilot, her sister is herself a single parent, and the last brother is a gang member who is often escorted home by the cops. With all of this going on, the mother doesn't watch to deal with her youngest daughter and the bee. Right in the middle of the regional bee, she threatens to pull Akeelah from the competition.

The principal and Coach Larabee convince her mother to let the girl finish the bee. While all of this is going on, Javier, the last speller before it's Akeelah's turn, stalls for time in one of my favorite scenes of the film. He asks for the part of speech, origin, and example sentence for his word, and even asks for the word in a song. As it turns out, his word is ratatouille, a French vegetable dish -- and also, as it happens, it's the name of a Pixar film that came out the year after Akeelah. Most Pixar films contain many songs -- so if Javier had waited an extra year, he could have had the word ratatouille in an actual song!

Akeelah, Dylan, and Javier are the three qualifiers who advance to the national bee. At this point, I note the calendar again -- we know that it's now December because the newspaper that reports Akeelah's story mentions Kwanzaa (which, as I explained in previous posts, is an African-American holiday in December). Also, Akeelah buys Coach Larabee a Christmas present.

There's also especially poignant scene here where we learn that just as Akeelah has lost her father, Coach Larabee has lost a young daughter, Denise. Thus Akeelah and her coach end up seeing each other as a second family to make up for the loved ones that they've lost.

In the spring, Akeelah, her principal, coach, mother, oldest brother, and best friend Georgia all travel to Washington DC for the national bee:

Georgia: Oh, forget flight attendant. I'm gonna be a pilot! What's wrong with him (Javier)?
Akeelah: He has an aversion to heights.
Javier: It's an aversion to plummeting. I may puke.
Akeelah: My brother's in the Air Force and he says that fear is all in your head. Here. He gave me this (Air Force pin) for good luck. Don't worry, I won't impale you. You know, I never really thanked you for helping me at the state bee.
Javier: No biggie.
Akeelah: Actually, it was very chivalrous. (She kisses Javier on the cheek.)
Javier: Wow! I'm not thinking about the plane at all any more.
Akeelah: Well, in that case... (She opens the plane window.)

Here's a short montage from the national spelling bee:

Akeelah: The language of origin, please?
Javier: Any alternate pronunciations?
Jacques Bailey (the pronouncer from the real spelling bee): Gastromorph.
Dylan: May I have a definition, please?
Jacques: Latin.
Girl: Escharotie.
Javier: Madrigal.
Katie (bee announcer): That is correct.
Boy: May I have the definition, please?
Jacques: From earliest known time.
Boy: Aboriginally.
Katie: Correct.
Dylan: Language of origin? Empleomania.
Jacques: Any ratio without a separation of two phases.
Akeelah: M-I-S-C-I-B-L-E. Miscible.
Katie: If you're just joining us, we're in the eighth round of the national spelling bee with only thirty spellers remaining.

Earlier during their training, Coach Larabee tells Akeelah that she should study the winning words from previous competitions, and specifically mentions staphylococci, the 1987 winner. As it turns out, many of the words in the national bee in the movie are also winning words. Dylan's final word was logorrhea, the 1999 winner. And the 1995 winning word, also in the movie, was xanthosis.

After Javier finishes in fifth place, the next two go down quickly, leading to a final showdown between Akeelah and Dylan. At this point, Dr. Reilly began reading from the special list of 25 championship words.

There are several errors at this point. First of all, after Akeelah sees Dylan's overbearing coach/father, she wants to throw the competition for Dylan, knowing that it's his last chance to win while she can always try again next year. Dylan had finished second the previous year -- indeed, at the start of the movie when Akeelah turns on ESPN, she can see Dylan with his head turned down in shame as the winner is announced. But at that point, Akeelah was in seventh grade -- which means that she should now be in eighth grade, making it her last year of eligibility as well. (She had to go to summer school, but the "blackmail" agreement had been that training with Coach Larabee counted as summer school, so she advanced to the next grade.) The film probably should have started with Akeelah in sixth, not seventh, grade, for the scenes about "next year" to make sense.

The rules for the championship round are a little tricky -- partly because the rules have changed several times over the decades. It begins with Dylan spelling his first word, and then Akeelah misspells xanthosis, and then Dylan misspells xanthosis as well. It's explained that if a contestant misspells a word, the opponent must spell that same word plus an additional final word to win. This rule might have been in effect in the past, but not in the 21st century. Note that the championship words should begin when there are three spellers left, but the movie cleverly has the third and fourth place finishers be eliminated in the same round, so that there are only two spellers in the last rounds.

Indeed, it all depends on rounds. Dylan went first in his round, and so after Akeelah misspelled her word xanthosis, the round ends, and Dylan should have proceeded directly to his final word to win. If on the other hand, Dylan misspelled his first word, then since Akeelah hasn't gone yet in that round, she would have needed to spell her own word (xanthosis) plus her final word to win.

With two of the 25 words left to go, it's stated that if both spellers are correct with their respective words, they will be co-champions. At the time, the filmmakers couldn't have known what the actual rules for ties/co-champs are since it hadn't happened in decades (and under old rules), but the ties that occurred in the real spelling bees from 2014-16 reveal the actual tiebreaker rules.

First of all, suppose that Dylan misspelled the 24th word (logorrhea). Then Akeelah would have needed to spell her own word plus a final word -- but there was only one word left. Likewise, if Dylan had been correct but Akeelah incorrect, Dylan would have needed to spell a final word. So because of this, Dylan and Akeelah should have been declared co-champs after the 23rd word -- and this is what happened in 2014 and 2015. Instead, in the movie, Dylan was told that he had won the spelling bee before Akeelah was given her last word. This couldn't happen under the actual rules.

In 2016, the furor over back-to-back ties led to Scripps changing the tiebreaker rules -- instead of 25 words, there would be 25 rounds of championship words. Just like the old 25th word, the 25th round can only occur when there was only one speller left after the 24th round, so that the 25th round would consist of only the final word needed for that speller to win. Otherwise, co-champs would be declared after the 24th round -- which was exactly what happened again.

So in 2017 and 2018, a written tiebreaker test was given to all spellers before going on stage -- if after 25 rounds there were multiple spellers left, the test would determine the winner. But for some reason, that test wasn't given last year -- and it was definitely needed. The bee took so long that they ended up declaring eight champions. I have no idea whether the championship word list was ever reached, as the field was never whittled down to a final three. Oh, and last year, each of the eight co-champs was declared a winner after he or she spelled the last word, just as (incorrectly) shown in the film.(It's possible that the written tiebreaker test might have been reinstated this year, but we'll never know due to the coronavirus.)

The movie ends as Akeelah correctly spells her final word, pulchritude. She and Dylan are declared co-champs, and they both raise the trophy together. The film goes full-circle, as pulchritude (meaning "beauty") is the word that she misspelled on the day that she first met Coach Larabee.

If this movie were being made today, it might not have been set in LA. Last year at the real bee, it's revealed that there's a major spelling club, not in Woodland Hills, but in Dallas, Texas. And in fact, three of the eight co-champs last year were North Texan. Also, instead of making Dylan a Chinese character, his nationality would have been South Asian/Indian. Seven of the eight co-champs last year were of Indian descent, and South Asians have dominated the bee over the past decade or so.

On the other hand, Akeelah, unlike the heroes of Freedom Writers, McFarland, and Stand and Deliver, is not a real person. Sometimes I like to wish that there's a real Akeelah out there, all grown up and living a successful life after winning her prize, but there isn't. The closest there is to a real Akeelah is probably Jody-Anne Maxwell, the 1998 champion. She is a dark-skinned Jamaican who likely faced some of the same challenges that Akeelah does in the movie.

The movie has been criticized by some for its racial depictions -- Coach Larabee has been described as a "whitewashed" black man (especially when he becomes a grammar dictator who criticizes Akeelah's vernacular speech), and also, Dylan and his father have been said to represent negative stereotypes of Asian-Americans. Most likely, a Jody-Anne and the Bee film would have avoided both of these problems -- Jody-Anne's coach probably didn't criticize her Jamaican accent, and there might not have been any characters like Dylan or his dad.

But I would have been glad that it's an LA movie if I'd finished the year at my old charter school. At the end of the school year was eighth grade graduation, which all middle school teachers would have attended -- but then there would have been nothing for Grade 6-7 students to do. The usual thing to do in this situation is to leave a video for them to watch -- and I would have chosen Akeelah and the Bee, especially considering that it would have been the right time of year. I would hope that some of the Grade 6-7 kids would have seen themselves in Akeelah, since the charter school was located not far from where Akeelah is said to live. Her neighborhood in the movie is their real-life neighborhood.

Before I leave the spelling bee, here's a link to a virtual spelling bee that some students decided to hold in lieu of the live bee. Most of the participants are eighth graders -- unlike Akeelah, they can't wait until next year to win:

https://www.cnn.com/2020/05/28/opinions/national-spelling-bee-covid-19-shankar/index.html

Spelling bees will always hold a special place in my heart, ever since I won three straight school spelling bees during Grades K-2. I still have the first place trophies.

Well, that's all I have to say about the movies I watched recently. It's too bad that I don't own a copy of Stand and Deliver -- otherwise I could have watched it 2-3 weeks ago, on the day of the real AP Calculus exam (the online one, of course).

I've mentioned race a lot in today's post -- this is, after all a traditionalists' post. I wonder whether Akeelah, who finds Crenshaw Middle School so "boring," would have succeeded if hard-core tracking still existed.

But I won't touch the big racial incident in the news (the one in Minnesota) with a ten-foot pole. It's an extremely polarizing subject, and I wish to stick to education on this blog. I will say this, though -- if schools had been open now, it might be on the minds of some students, and they might talk about the incident in a class I'm subbing for. I try to keep discussion of race to a minimum on the blog -- and when I do mention it, it's under the lens of traditionalism in education. Everything that I wrote about race in this post is sufficient for this blog, and that's all I'll say on this matter.

French in Action

As I've mentioned before on the blog, when I was in high school, I took French. Sometimes we would watch videos in that class too, including the French in Action series from PBS. The videos are entirely in French, as a professor tells us a story.

The reason I'm bringing this up now is that some of the earlier episodes take place le vingt-neuf mai, which is French for "the 29th of May" -- yesterday's date. And so every year on that date, I like to go back and think about the French in Action series.

Well, apparently, French in Action has been declared a "cult classic":

https://fiafans.org/about/

« Nous allons inventer une histoire… » repeats the gray-haired Capretz with a twinkle in his eye as the adventure begins. Robert (« Rhobehrrrr » played by Charles Mayer), an easily disoriented « American » lad in a Yale T-shirt with suspiciously good French (his mother was French, supposedly) is visiting Paris “pour se trouver.” He falls for Mireille (Valérie Allain), a beautiful blonde studying art history at the Sorbonne. Mireille lives with her parents and her sassy younger sister Marie-Laure (Virginie Contesse) at 18, rue de Vaugirard. Throughout the series they are stalked by a mysterious mustachioed man in black (Jean-Claude Cotillard, who also serves as the show’s mime and, interesting to note, is the father of Marion Cotillard who would have been all of nine years old when FIA was filmed).

By the way, my favorite character was probably Marie-Laure. It was funny to see the mischievous ten-year-old girl always begging her older sister for some chocolates!

At the link above, there's a description of the 25-year reunion of the FIA actors in 2012, which was held just before Professor Capretz passed away. Most of the main actors met at Yale that day, except for Virginie Contesse, the actress who played Marie-Laure. She was finally spotted on a comment thread a few years after the reunion.

I began taking French as an eighth grader. Our teacher only showed us a few episodes of FIA. One reason is that one of the first things the professor says in Lesson 2 (as Lesson 1 is an introduction) is:

Nous allons apprendre le francais.

This can be translated as "We are going to learn French." The first two words nous allons means "we go" or "we are going" -- it's a form of the verb aller, to go. Most French verbs ending in -er are regular verbs, but the lone exception is aller. In our French I text, the irregular verb aller was taught relatively late in the text, and we moved very slowly through the text. Because of this, our teacher wanted to wait until we reached aller in the text before showing us any FIA episodes, especially with this verb being introduced so early in the series.

As I've mentioned on the blog, I switched districts early in my freshman year -- the year when I was taking French II. Both schools moved slowly through their texts -- indeed, at both schools, we continued with the French I text until we were deep into French II. But in my new school's text, the verb aller was introduced much earlier -- even before any regular -er verbs! Thus my new teacher showed us FIA a little more often than my old teacher did.

Here is a link to a transcript of the entire series:

http://french-in-action.narod.ru/French_in_Action.pdf

Today isn't the 29th of May, but the 30th (le trente mai). If we skip ahead to Lecon 15, we see that it takes place the next day, on May 30th, so we can read it today. (The word lecon has a cedilla on the C so that it's pronounced as an S. Thus lecon is pronounced like -- and means -- "lesson.") Here Robert is at the Sorbonne, a Parisian university, where he runs into Mireille, the girl he met on the 29th. They go for a walk, and they run into her younger sister, Marie-Laure. We find out that she's not at school that morning because apparently, May 30th was a Wednesday that year. (French students often have a mid-week break on Wednesday, but they make it up with a half-day on Saturday.)

And the first thing that the cheeky Marie-Laure says to Robert upon meeting him is:

MARIE-LAURE: Vous êtes le petit ami de Mireille? Vous êtes anglais?

which means, "Are you Mireille's boyfriend?" (Marie-Laure, you devil you!) Of course, he can't be Mireille's boyfriend because they just met the previous day! Then the ten-year-old asks Robert whether he's English, to which he responds:

ROBERT: Pourquoi? J'ai l'air anglais?

which means, "Why? Do I look English?" Marie-Laure continues to guess, until she finally discovers that he's American. Actually, Robert is half-French, which explains why he's fluent in the language (though the actor who plays him is actually Canadian).

The unofficial French in Action Day, May 29th, usually falls during the French Open, a major tennis tournament held on clay courts. No, Robert and Mireille never watch anyone play tennis during the series, even though it's at the right time of year. (This year due to the coronavirus, the French Open has been delayed four months, to late September/early October.)

Also, notice that FIA Day usually occurs during Spelling Bee Week. Here's a connection -- many English words that ultimately derive from Latin also pass through French (1066 and all that). In recent bees, I was actually able to spell some championship words -- those with a French origin.

On FIA Day, I found the following link to some episodes of the show, and so I decided to watch some of them:

https://www.dailymotion.com/video/xj7udf

I watched the first episode, and then two lessons I chose at random (au hazard), 34 and 50. In Lecon 34, while the family is having dinner, a strange person knocks on the door. Marie-Laure answers it, and then she tells her mother who was at the door:

MARIE-LAURE: Ben, non, c'était une fausse bonne soeur.
MME BELLEAU: Comment le sais-tu?
MARIE-LAURE: Elle avait de la moustache!

The girl tells her mother that the stranger at the door claims to be a nun (une bonne soeur), but she knows that she was a fake (fausse) because she had la moustache (no translation needed there).

In Lecon 50, Robert, Mireille, and three of their friends are planning a trip around France. They discuss some of the sights they wish to see:

HUBERT: Ce qu'il y a d'intéressant en Auvergne, ce sont des eaux.
COLETTE: Les os de jambon?
HUBERT: Ha, ha, ha, elle est bien bonne! ... Les eaux thermales!

Yes, she's so funny, that Colette! You see, it's a pun that makes sense only in French. Hubert is talking about seeing les eaux, which means waters (as in geysers, les eaux thermales). But Colette thinks he's talking about les os, or bones (as in legs of ham, les os de jambon). Both eaux and os are pronounced identically in French -- as the letter O, since final consonants in French aren't pronounced.

(In fact, most of the girls on this show are quite funny. In Lecon 34, Mireille is asked by her parents how to convert their grange -- or barn -- into a garage. She replies that it's easy -- just remove the R and add an A!)

Well, I certainly had a fun time for FIA Day this year. Again, it was something to watch these days when there is nothing to do.

Reblogging: SBAC Prep

Last year, May 30th was a Thursday, but I didn't sub that day, nor did I post much. All I wrote last year was SBAC Prep, which I will reblog here:

Question 31 of the SBAC Practice Exam is on right triangle trigonometry:

Consider this right triangle.

[The right angle is at S, ST = 21, and RT = 35.]

Determine whether each expression can be used to find the length of side RS. Select Yes or No for each expression.

                 Yes  No
35 sin(R)
21 tan(T)
35 cos(R)
21 tan(R)

Let's first look at the two involving 35 times something R. We notice that 35 is the hypotenuse and relative to angle R, the desired side RS is the adjacent side, so we need the cosine. Thus 35 cos(R) is yes, while 35 sin(R) is wrong.

Now we check out the 21 times tangent something. We see that the desired side RS is opposite angle T while 21 is adjacent to it. So the tangent of T is RS/21. Thus 21 tan(T) is yes, while 21 tan(R) is no.

Both the girl and the guy from the Pre-Calc class answer the first three parts correctly. But the guy leaves the last part blank while the girl answers it correctly. Since the guy knows that 21 tan(T) is yes, it's most likely an accidental omission on his part.

Question 32 of the SBAC Practice Exam is on the graphs of quadratic functions:

Given the function
y = 3x^2 - 12x + 9,
  • Place a point on the coordinate grid to show each x-intercept of the function.
  • Place a point on the coordinate grid to show the minimum value of the function.
To find the x-intercepts of this parabola, let's factor the function:

y = 3x^2 - 12x + 9
y = 3(x^2 - 4x + 3)
y = 3(x - 1)(x - 3)

So the x-intercepts are at (1, 0) and (3, 0). Since the function vanishes when x is 1 or 3, it follows that the axis of symmetry, hence the vertex, is at x = 2. There are other ways to find the vertex, but it's best just to take the mean of the x-intercepts if we've already found them.

Let's now find the y-value of the vertex:

y = 3x^2 - 12x + 9
y = 3(2)^2 - 12(2) + 9
y = 12 - 24 + 9
y = -3

Therefore the vertex is at (2, -3). The SBAC only requires students to plot these three points -- once again, I'm not sure whether the full parabola can be graphed on the computer interface.

The girl from the Pre-Calc class correctly graphs these three points and tries to graph a parabola, even though her graph looks more like a V-shape. But the guy, unfortunately, makes an error in factoring:

y = 3x^2 - 12x + 9
y = 3(x^2 - 4x + 3)
y = 3(x - 4)(x + 1)

and so his x-intercepts are at (4, 0) and (-1, 0). In other words, he graphs y = 3(x^2 -3x - 4) instead of the correct graph. This counts as both a sign error as well as confusing the needed sum and product during factoring.

So what does the guy do for his vertex? For the x-value, it appears that he wants to make his parabola look symmetrical. The mean of his two x-intercepts is 1.5. But the vertex he draws ends up being closer to x = 2, which is unwittingly the correct value. He seems to choose a random value of y -- his vertex is at (2, -4), one unit below the correct vertex of (2, -3).

Ironically, the guy's graph actually looks more like a parabola than the girl's graph. But the girl is the one who correctly find the intercepts and minimum.

Conclusion

Today there was a successful space launch. Bob Behnken and Doug Hurley are the first astronauts to launch from American soil in nearly a decade. Once again, it demonstrates the power of math and other STEM courses.

Next week would have been finals week in my old district. As far as I know, it still is -- but after the AP testing snafu, I wonder whether any teachers will even bother with finals. In this district, grades can drop at most one letter, so it's possible that failure to take the final may result in a one-letter drop for some students.

Because next week would have been the start of summer break, I'll be starting many of my summer blogging plans in my next post.