Wednesday, May 13, 2020

California Teacher Day Post (Lemay Lesson 3 Part 1 -- Java Basics)

Table of Contents

1. Introduction
2. Update on Downloading Java
3. Lesson 3 Part 1 -- Java Basics
4. More on Java, BlooP, and Hofstadter
5. Another Rapoport Math Problem
6. Traditionalists: SteveH's Music Analogy
7. Reblogging: A Computer Class from Last Year
8. Reblogging: Ramadan & Lunar Calendars
9. Reblogging: SBAC Prep
10. Conclusion

Introduction

National Teacher Appreciation Week may be over, but according to the following link, it's Day of the Teacher here in California:

https://www.cta.org/for-educators/meet-cta/classroom-teachers/dayoftheteacher

I've never heard of this, despite living here in the state -- it's always been overshadowed by the national week. Again, we already know why the nation and states all choose to celebrate teachers right around now -- it's just before the last day of the school.

Notice that the link doesn't tell us whether California Day of the Teacher is always on May 13th, or always on the second Wednesday in May. A quick Google search reveals that it might always be observed on a Wednesday. Last year, the second Wednesday was on the 8th (making the California day a part of the national week), but this year, the second Wednesday isn't until the 13th (making the California day the week after the national week).

In today's post, we'll continue with our study of Java. And I'll also reblog a very interesting post from last year.

Update on Downloading Java

So I tried to download a copy of the JDK so I can finally run Java on my computer. I was able to create an Oracle account, but there continued to be errors in the download -- a window is supposed to open so I can say OK to the end user license agreement, but the window never appears. (Once again, my computer is now five years old, which is ancient -- these sorts of problems are bound to happen.)

But now that I've created an Oracle account, I tried downloading JRE 8.0 again -- and this time, it finally works. (I tried to download it a week ago, but Oracle never asked me to make an account.) So now I could download a Java compiler to go with this JRE.

Once again, I found the compilers at the above link:

https://www.java-made-easy.com/free-java-compiler.html

I tried downloading the Eclipse compiler, since it's the first one listed there and the author at the above link recommended it. And I was able to get it to work.

And so now I can finally run some of the Java programs listed in the Lemay Java text. Once again, this is definitely what I prefer -- simply reading and completely Lemay's text doesn't mean that I've mastered Java. I must be able to code actual programs and get them to work. If I'm to transition to a non-teaching job using Java, then I must be able to show that I can get the computer to work -- otherwise, I'm not a programmer.

I went back and tried the Hello World and other applications from the first two chapters of Lemay. I still won't be able to try the applets, though -- applets run on the Internet, and so I'd still need access to a website where I can post applets. It's still something I'd like to learn someday -- I might need to learn how to create applets in my post-teaching career.

OK, it's now time to move forward in the text.

Lesson 3 Part 1 -- Java Basics


Here is the link to today's lesson:

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

Lesson 3 of Laura Lemay's Teach Yourself Java in 21 Days! is called "Java Basics." Here's how this chapter begins:

Already this week you've learned about Java programming in very broad terms-what a Java program and an executable look like, and how to create simple classes. For the remainder of this week, you're going to get down to details and deal with the specifics of what the Java language looks like. Today you won't define any classes or objects or worry about how any of them communicate inside a Java program. Rather, you'll draw closer and examine simple Java statements-the basic things you can do in Java within a method definition such as main().

As usual, I will focus mainly on the parts where Lemay compares Java to C++. And here's her first mention of the other languages in this lesson:

Java looks a lot like C++, and-by extension-like C. Much of the syntax will be very familiar to you if you are used to working in these languages. If you are an experienced C or C++ programmer, you may want to pay special attention to the technical notes (such as this one), because they provide information about the specific differences between these and other traditional languages and Java.

That I'll do, Lemay -- that I'll do. Here we learn about how spacing and semicolons work in both C++ and Java:

White space in Java statements, as with C, is unimportant. A statement can be contained on a single line or on multiple lines, and the Java compiler will be able to read it just fine. The most important thing to remember about Java statements is that each one ends with a semicolon (;). Forget the semicolon, and your Java program won't compile.

And here's an important comparison to other languages -- how variables work:

Unlike other languages, Java does not have global variables-that is, variables that are global to all parts of a program. Instance and class variables can be used to communicate global information between and among objects. Remember that Java is an object-oriented language, so you should think in terms of objects and how they interact, rather than in terms of programs.

Technically, languages like C++ have global variables, but using them is discouraged. On the other hand, all variables in BASIC and TI-BASIC are global, so we have no choice but to use them.

In this lesson, we finally get to integer variables:

There are four Java integer types, each with a different range of values (as listed in Table 3.1). All are signed, which means they can hold either positive or negative numbers. Which type you choose for your variables depends on the range of values you expect that variable to hold; if a value becomes too big for the variable type, it is silently truncated.

Recall that in my last post, I kept wanting to use int even though I didn't know whether ints even exist in Java. Well, we finally find out today -- Java does indeed have an int type. I'm not going to post Table 3.1 here on the blog -- click the link above to see it. I will say that from the smallest to the largest type, the four integer types are byte, short, int, and long. This is a much wider range than C++ -- the long int of C++ is equivalent to int in Java. Meanwhile, C++ has no tiny byte, so we must use char if we want a single-byte in C++.

Meanwhile, C++ has unsigned int but not Java. In most of the other languages we've learned, all numeric variables are signed.

We also learn that boolean is different in Java than in C++:

Finally, the boolean type can have one of two values, true or false. Note that unlike in other C-like languages, boolean is not a number, nor can it be treated as one. All tests of boolean variables should test for true or false.

When Lemay says that "boolean" (bool) is a number in the C-like languages, she means that in those languages, 0 is false and 1 is true The same holds in not just C++, but TI-BASIC and I believe Pascal as well. In BASIC false is also 0, but for some reason, true is -1 rather than +1. The Logo to which I linked last month is like C++ in that false is 0 and true is 1 -- but Brian Harvey's Berkeley Logo is like Java in that "false and "true are separate from 0 and 1. And finally among the other languages we've learned, BlooP also distinguishes 0/1 from false/true.

We learn that we can define variables to be of class types in Java:

Java does not have a typedef statement (as in C and C++). To declare new types in Java, you declare a new class; then variables can be declared to be of that class's type.

We proceed with comments, which are lines that are ignored by the compiler and are there only for the programmer who's reading the code:

The symbols /* and */ surround multiline comments, as in C or C++. All text between the two delimiters is ignored:
/* I don't know how I wrote this next part; I was working
    really late one night and it just sort of appeared. I
    suspect the code elves did it for me. It might be wise
    not to try and change it.
*/
Code elves -- that's funny, Lemay (rolling my eyes).

Now we learn about special characters, such as \n for newline:

C and C++ programmers should note that Java does not include character codes for \a (bell) or \v (vertical tab).

These are rarely used in C++ anyway -- indeed, I don't even know what "bell" is in C++.

We move on to strings:

A combination of characters is a string. Strings in Java are instances of the class String. Strings are not simply arrays of characters as they are in C or C++, although they do have many array-like characteristics (for example, you can test their length, and access and change individual characters). Because string objects are real objects in Java, they have methods that enable you to combine, test, and modify strings very easily.

In C++ there are often string libraries that we must #include in order to use them in a program, but in Java they are built in.

Our final example for today is the first listing, which is on arithmetic. This pretty much works in Java the way we'd expect it to from C++:


Listing 3.1. Simple arithmetic.
 1: class ArithmeticTest {
 2: public static void main (String args[]) {
 3:     short x = 6;
 4:     int y = 4;
 5:     float a = 12.5f;
 6:     float b = 7f;
 7: 
 8:     System.out.println("x is " + x + ", y is " + y);
 9:     System.out.println("x + y = " + (x + y));
10:     System.out.println("x - y = " + (x - y));
11:     System.out.println("x / y = " + (x / y));
12:     System.out.println("x % y = " + (x % y));
13: 
14:     System.out.println("a is " + a + ", b is " + b);
15:     System.out.println("a / b = " + (a / b));
16: }
17: }
The only unexpected thing here is the letter f at the end of our floats -- Lemay explains that without the f, all numbers with decimal points automatically become doubles.

Oh, and now that I've downloaded Java, I'm able to run this code. My compiler actually gives a few extra digits compared to Lemay's compiler. In line 14, my computer prints 7.0 for b, while Lemay's simply prints 7. This is likely to distinguish float 7 from int 7 -- indeed, several other languages make the same distinction. Also, in line 15, I get 1.7857143 while Lemay gets only 1.78571.

More on BlooP and Hofstadter

I was hoping to get back to BlooP and convert some of those programs to Java. But I still haven't learned enough Java to do so. Yes -- I finally have integers now. But the cornerstone of coding in BlooP is the loop, and I still haven't learned loops yet.

Also, what we learned to code in BlooP are procedures/functions/methods. They have an input and an output value. So far, all I've seen in Java are void functions that don't return a value. In C++, we return a value by ending the function with return followed by the value. I'd wager that the same would be true in Java, but I haven't learned it yet.

But then I told myself, why should I wait? We know that Java is similar to C++, so why don't I just create a new class called Hofstadter and code the four BlooP procedures from that book?

Of course, I made simple changes like replacing bool with boolean, since we already learned from Lemay that boolean is the correct name for that type in Java. Oh, and of course I removed the keyword unsigned (from the minus function) since there are no unsigned integers in Java.

Most of the code seemed to work, but there were still a few compile-time errors. First of all, in the code for "2-to-the-3-to-the," I had two for loops using the counter i. In C++, only the first counter requires me to use int i -- including int on the second i causes an error (at least when I used C++ on the UCLA computers back in the day), but Java insists that I include the second int.

And there was an error in the minus function. Since this function must return an int, the last line of the method must be return followed by the int. In BlooP, we don't need to say OUTPUT because there is a default output value of 0, but Java has no such default value. The C++ version that I wrote has two return values, but both are buried behind if statements, so it's not obvious to the compiler that either would ever be reached. (We know that the algorithm will always terminate, but not our Java compiler.) Thus the compiler flags it as an error. So I added return 0; as the final line. (In fact, now I'm wondering whether the version I wrote will compile in C++ for the same reason -- it probably depends on the particular C++ compiler.)

So this is the version that I was able to compile:

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;
}
}

We notice that this class lacks a main method. This is what Hofstadter refers to as a "call-less program," or an empty "meat grinder." It compiles, but what does it do when there's no main? As it turns out, it keeps wanting to run ArithmeticTest.main instead, since that was the last completed application that I compiled.

I tried adding a main method to Hofstadter -- it took me a while to figure out. But then even though it works, I kept getting another error message at the end of the program -- a run-time error, rather than a compile-time error. And the error persisted even when I tried to go back to Arithmetic Test again, until I just deleted Hofstadter completely.

Of course, I keep trying to do things in Java that I haven't officially learned in Lemay yet, such as having main call other methods. Let's wait until I officially learn this before I attempt to do this again in Java.

Instead, I want to mention another Hofstadter reference. As I mentioned in an earlier post, even though I linked to old Numberphile videos every Pi Day, I wasn't a regular viewer -- that is, until the coronavirus hit. Now I've been going back and watching Numbephile videos from the past year. And on the following video, there is mention of a Hofstadter sequence:



Before you ask, the "Hofstadter" for whom the sequence is named is indeed Douglas Hofstadter, whose book we read last year. Indeed, I mentioned this sequence in our Chapter 5 write-up last year.

Meanwhile, just yesterday, Neil DeGrasse Tyson posted a Numberphile-like video on large numbers:



And speaking of Tyson, FOX just announced its upcoming schedule for the year, and as it turns out, Cosmos won't be back until the fall. So I'll have to wait until late September or early October to watch the first two episodes that I missed. Even though Cosmos was something for me to watch during the school closures, at this rate, it's possible that I will have seen the inside of a classroom by the time those episodes air. But don't worry -- I'll blog about those episodes when they air on FOX, even if the schools have reopened.

Another Rapoport Math Problem

There are a few Geometry problems just around the corner on the Rapoport calendar. But today's problem isn't quite Geometry though:

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

The period of 17 cos(2pi x/13)

We know that the function a cos(bx) has period 2pi/b -- or equivalently, the function a cos(2pi x/p) has period p. Using either of these gives us p = 13. Thus the desired period is 13 -- and of course, today's date is the thirteenth. The only danger in this problem is confusing period with amplitude a, and giving 17 as the answer, but that's not today's date.

Even though we do learn about cosine and sine in the Geometry book, finding the cosine of an angle that's not acute -- or any angle in radians -- isn't thought to be part of Geometry. Instead, this problem would be taught in either Algebra II or Pre-Calc in the unit on threenooklore -- I meant trigonometry.

One problem from a few days ago that would be thought a part of Geometry is:

The maximum number of times a pentagon can intersect a circle

Notice that the maximum number of times a line (or line segment) can intersect a circle is two. Thus we'd expect the max number of times a pentagon, which consists of five line segments, can intersect a circle to be 2 * 5, or ten. And sure enough, the date of this problem was Sunday the tenth (in other words, Mother's Day).

To see that the maximum ten intersections can indeed be achieved, consider a circle of radius r and a regular pentagon. Of course, a regular pentagon inscribed in this circle would intersect it five times, but what if we inscribe it in a circle of radius r + epsilon instead? If epsilon is small (remember, that's what epsilon means -- a small number), then each side of the pentagon will intersect the original circle of radius r twice, making it ten intersections for the entire pentagon.

Traditionalists: SteveH's Music Analogy

I'm labeling this post as traditionalists again. Last week, I mentioned that our main traditionalist, Barry Garelick, had posted again on Cinco de Mayo. But I was waiting for commenters before I discussed that post here on my blog. Well, the time has come for me to return to that post:

https://traditionalmath.wordpress.com/2020/05/05/say-it-enough-times-and-people-believe-it-dept/

There is only one substantial comment here, written by -- you guessed it! -- SteveH. But this is an important comment here. Here SteveH compares the teaching of math to the teaching of another subject -- music. He's made this analogy in his comments several times before, but I've never fully addressed it until now.

One thing I must do here is avoid the fallacy of lumping all of my opponents together. I've made it clear that the traditionalists are my opponents here. Several other traditionalists -- particularly a few posting on the Joanne Jacobs website -- have also mentioned music in their posts. But their arguments are not the same as SteveH's argument here involving music classes.

The problem that I have with full traditionalism, of course, is that many students don't enjoy math, and they'll leave a traditionalist p-set blank unless there's a tutor sitting inches away from them and they can't escape. But if these same students are sitting in a class that they enjoy more -- such as music -- then traditionalist direct instruction will work. The students are more willing to work hard and make sacrifices in order to be successful.

And this is what I observed in the music classes where I've subbed. In a traditionalist math class, there's plenty of drill and practice of basic arithmetic. The equivalent in a band class is F-E-F (also known as Bb-A-Bb) -- the students practice playing these notes on their respective instruments (that is, F-E-F, F-Eb-F, F-D-F, and so on).

Again, students are willing to do things in class if they are easy, fun, or high-status. While practice (basic math or F-E-F) isn't easy or fun in either math or music class, music at least has the benefit of being high-status. Musicians are popular, but mathematicians are just "nerds." Musicians are able to attract dates and mates -- or since this is music, maybe the right term is "groupies." As the famous Dire Straits song goes, it's "money for nothin' and your chicks for free" -- and no, Dire Straits weren't singing about mathematicians in that song.

And of course, students voluntarily sign up for music classes -- they wouldn't even be there if they weren't interested in music. On the other hand, there are plenty of students stuck in Algebra I classes who have no interest in math. The high status of musicians means that students are more willing to work hard in music than in math, which is why music class is traditionalist while math class isn't.

But while that's what some of the Jacobs traditionalists believe, that's not what SteveH says. For according to SteveH, music class is just as anti-traditionalist as math:

SteveH:
They all want the music education model where they hope/assume that students are getting private lessons at home or with private instructors. They get to do the engaging musical part at school, which is more like after-school enrichment. However, rarely does any student without years of private lessons ever get into All State choirs, bands, and orchestras. They are the ones with full musical understanding. The music teachers would really have problems if they didn’t have enough students getting private lessons.

For our state’s Solo and Ensemble Honors adjudication and honors concert, the 15 best student musicians who do get selected to perform have their private lessons teacher listed in the program, not their school’s music teacher. Music teachers know how this world works and don’t fool themselves. It seems that the other educators who want this model drink the rote Kool Aid.

So we can easily figure out SteveH's analogy here. The private music instruction corresponds to private tutors in math. And he keeps mentioning state-level musical performances, which correspond in math to his preferred capstone class, AP Calculus. So what SteveH really wants to say is:

However, rarely does any student without years of private [math tutoring] ever get into [AP Calculus]. They are the ones with full [mathematical] understanding. The [math] teachers would really have problems if they didn’t have enough students getting private [math tutoring].

OK, suppose we take SteveH at face value here. If he's correct that music teachers don't have the students do traditionalist practice, then how do you explain F-E-F? And why wouldn't the teachers give music traditionally, considering that the students would be more receptive to traditionalist direct instruction in music than in math?

Well for starters, a typical band might have as many as a dozen different instruments being played, from brass instruments like the trumpet and trombone, to the woodwinds like the clarinet and flute, to drums and other percussion instruments. I assume that SteveH's private music instructors directly teach their students the basics, including how to finger the different instruments.

And of course to play F-E-F, the students need to know what the notes E and F are. We see that various instruments play these notes differently -- for example, a concert F might be written as a G, D, or other note depending on the instrument. And percussionists have a completely different plan -- pitches like E and F are irrelevant on the drums, as rhythm is emphasized here. But even rhythm differs between the drum and other instruments -- half notes aren't playable on the drums, whereas faster notes like sixteenth notes are more important.

So we can see why the private instructor model is there -- the private teacher can introduce the basics of playing an individual instrument to an individual student. Then the school teacher can gather players of different instruments together to form a band.

SteveH also mentions vocal music here ("All State choirs"). Of course, vocal music is just like instrumental music here -- alto and tenor vocalists have different needs, just as alto and tenor saxophonists have different needs.

How would SteveH teach music better at the schools? If a school teacher wishes to have her own name in the All State program instead of the private instructor's name as SteveH tells us, what must she do? He does mention one hint here:

They get to do the engaging musical part at school, which is more like after-school enrichment.

This implies that if SteveH had his way, it would be reversed so that the music class that meets between 8 AM and 3 PM teaches the basics, while the "after-school enrichment" is when students actually get to perform songs. Of course, this doesn't solve the differentiation problem -- how do players of a dozen different instruments get the basic skills they need during the school day?

It also makes a difference whether this is middle/high school (where students see the teacher for one period a day) vs. elementary school (where a music teacher visits the school once a week). Notice that SteveH doesn't give a timetable for when students should get these in-school lessons in order to make it to All State in high school (as opposed to math, for which he provides a definite timetable -- get to Algebra I by eighth grade in order to make it to AP Calc).

So far, I've only quoted SteveH's first and third paragraphs on teaching music. In his second paragraph, he returns to teaching math:

SteveH:
Schools with full inclusion are now assuming/expecting that parents and tutors will pick up the slack and do the dirty direct teaching work in all subjects. They don’t mind that it’s done. They just don’t want to do it themselves. They don’t want to have to deal directly with the consequences of increasing the range of student ability and willingness and the issues of social promotion at a very low Common Core proficiency level. In math, this means NO assurance of mastery that comes close to a STEM level in K-6. By the typical math split in 7th grade, it’s all over for many. But many educators still claim to offer more mathematical understanding. Are they really that ignorant to the help we parents now have to give at home?

There's that phrase "full inclusion" again -- traditionalists hate the idea of every student being fully included in math class and would rather that some students be excluded. But the key part here is SteveH's reason for why both math and music teachers avoid traditionalist direct instruction:

They don’t mind that it’s done. They just don’t want to do it themselves.

In other words, math and music teachers avoid direct instruction, not because the students don't like it, but because the teachers don't like it.

Actually, SteveH does mention student "willingness" above -- so he admits that not every student is willing to complete the traditionalist p-sets. But he buries this right between "student ability" and "social promotion" -- and these are two important concepts for traditionalists.

Again, differentiation is impossible to avoid in a band of many instruments. But in trying to destroy SteveH's analogy, I've given room for another traditionalist argument -- unlike music, differentiation can be avoided in math. And unfortunately, the traditionalists' solution to avoiding "social promotion" is tracking, with all the problems that tracking leads to. Outside of the mild tracking mentioned in previous posts (the "Path Plan"), I am not an advocate of tracking.

And so what do I advocate, as far as teaching math is concerned? I agree with the traditionalists that direct instruction and p-sets are the most effective way to teach math, with one caveat -- provided that the student doesn't leave the p-set blank. SteveH writes:

Are they really that ignorant to the help we parents now have to give at home?

SteveH often writes stories about his own son's mathematical journey. His son enjoyed traditionally taught math and completing p-sets. His son was bored when his elementary teachers assigned group work or projects, and he looked forward to the end of the project so he could return to a traditionalist p-set, on which he thrived. Far from making the boy hate the subject, traditionally-taught math led him to pursue a degree and a STEM career.

If I were a middle school (or even late elementary) math teacher and I could be guaranteed a class filled with 30 students just like SteveH's son, I wouldn't hesitate to teach a fully traditionalist class with nothing but direct instruction, p-sets, and drill/practice. The problem, of course, is that most students are the opposite of his son -- their affinity for math decreases rather than increases with how traditionalist the class is. They leave p-sets blank and look forward to the end of the assignment so that we could do something, anything, other than traditionally-taught math.

And so my current opinion is to increase the number of students who are like SteveH's son. If there's just one student like him in my class, convince a second student to make sacrifices to learn math. If there are two such students, then find a third. These students will learn math the most effective way, as the traditionalists suggest, and will succeed long after they leave my class.

But at the same time, I acknowledge that there are many students who aren't like SteveH's son. For these students, I must find non-traditionalist activities that they won't just leave blank or throw away.

For now, I at least see that to some traditionalists, music class is more practice-driven than math is, whereas for SteveH, both math and music class suffer from the same problems.

Reblogging: A Computer Class from Last Year

Last year, I posted on May 13th, a Monday. And I must admit that it's one of the most interesting school-year posts that I've ever written.

First, I blogged about a computer class that I subbed in that day:

Today I subbed in a high school math and computers class. Since some of the classes are math, it's worth doing "A Day in the Life" today.

11:25 -- That's right, my day doesn't start until 11:25. There are several reasons. First of all, Mondays in this district are late days. Second, this teacher has only four classes -- periods 4-7 -- because her fifth class is an online computer science course. As a sub, I'm responsible only for the classes that are actually face-to-face.

Fourth period is an AP Computer Science Principles class. This is one of the newest AP tests, with the first administration of this test being just two years ago. There are 34 students in this class -- half of them sophomores, about a third juniors, and the rest seniors.

The AP exam was given three days ago, on Friday. Since this is the first day they're attending this class since taking the exam, I decide to ask them how they felt about the test. Many of them believe that they think they've passed the exam. For many of the sophomores, this is the first AP test they've ever taken, since other tests commonly taken in tenth grade (such as World History) aren't tested until this week, the second week of AP's. I warn the students that it's time to play the waiting game -- they won't get their scores until July or later.

So what are the students doing today now that they've completed the AP exam? Actually, they must take another test now -- the "mock AP" given as the final exam. Many AP teachers give their finals close to the AP rather than wait until finals week, since by then they may be starting to forget what they've learned. Today is Part 2 of the final -- presumably Part 1 was on Thursday (or earlier), as I doubt the teacher would give any part of the final on the same day as the AP itself.

12:05 -- Fourth period leaves and fifth period arrives. This is Exploring Computer Science. Many of these students are freshmen, perhaps preparing to take AP Comp Sci Principles next year.

These students have a choice to make -- either an Hour of Code or an hour of detention. This class actually has a co-teacher, and she helps to make sure that they are on task.

Both computer classes remind me of coding Mondays at the old charter school. Indeed, I can't help but notice that the very first year of the AP Comp Sci Principles exam was the same as the year I spent at the old charter. Thus I wonder whether the coding teacher's intention was to prepare our students to take the AP Comp Sci Principles exam in high school. My eighth graders that year would now be sophomores who might have attempted the AP exam last Friday.

And in fact, as I glance at the final exams and Hour of Code assignments, I see the connections to what the coding teacher tried to teach my eighth graders. Some of the fifth period students appear to be creating video games during their Hour of Code. And even though Java is the language of choice on the main AP Comp Sci exam, in Principles they work in several computer languages. I notice a test question that might have been written in a real language, but it could have been pseudocode (or even Hofstadter's BlooP).

But unfortunately, the coding class two years ago was not a success. And I suspect that part of the reason has to do with my classroom management problems -- even though there was a separate coding teacher, the classes were in my room. Thus many students misbehaved for the coding teacher more than they would have if I'd been a stronger teacher.

12:50 -- Fifth period leaves for lunch.

Returning to 2020, we notice several things about this post.

First, we see that this teacher had a distance learning class last year. This distance learning class has absolutely nothing to do with the coronavirus, since this was last year, months before the beginning of the outbreak. So we observe that some schools have been experimenting with distance learning even before the virus! It was a computer class -- the most logical course to teach via distance learning on computers.

Second, we notice that one of the computer classes I taught was AP Comp Sci Principles. I mentioned this class briefly when we started our study of Java. And as I found out last year, there are many coding languages on the Principles AP, as opposed to just Java on the AP Comp Sci A exam. Even though our focus this year is on Java, it's still good to look at what an actual AP Comp Sci class would look like.

In recent years, the AP's started the first Monday in May. For this year only due to the coronavirus, the AP's were delayed a week, so they didn't begin until two days ago. And the exams are fully online this year.

Finally, notice that I compared this freshman class to coding at my old charter school.

Reblogging: Ramadan & Lunar Calendars

The second big thing I mentioned in my May 13th post last year was Ramadan. Since the Islamic calendar is lunar, the dates of Ramadan have shifted slightly. But we're still technically in Ramadan this year as well.

Last year, my main concern was what affect Ramadan would have on the SBAC and other state standardized tests this year. That's not a problem this year, since the SBAC has been canceled.

This is what I wrote last year about lunar calendars:

The current controversy is in Seattle:

https://thetakeout.com/seattle-school-muslim-ramadan-fast-standardized-test-1833295368

I've added the "Calendar" label to this post, since it's a good time to discuss solar vs. lunar calendars and how religious observances affect the school calendar. (On this blog, I try to limit discussion of religion to the "Calendar"-labeled posts.)

Before we begin, keep in mind that I am not a Muslim. Therefore it's not my place to tell adherents of Islam what their calendar should be like. Here I only wish to discuss calendars and whether there can be a solution to this calendar controversy.

In the link above, we see the following lines:

“This is 100 percent the same thing as making children take their test on Christmas or Easter,” someone commented on Facebook, according to Crosscut.

But here's the problem -- Christmas is always on December 25th. It's easy to avoid making children take a standardized test on Christmas -- just don't give the SBAC at all in December. Meanwhile, Easter admittedly is closer to testing season, and like Ramadan, Easter depends on the moon. But Easter is a lunisolar holiday, so at least it's always predictably in March and April. We see that middle schools wait until May to test. And even at districts such as my old district where spring break has nothing to do with Easter, there will never be an SBAC on Easter because it's a Sunday.

But Ramadan lasts a full month, and so it contains every day of the week. And because it's purely lunar, it can fall during any season. In some years it falls in the spring during testing season, while in other years it's in the fall when there's no testing, and in other years it's in the summer when there's no school, much less any standardized testing.

The problem is that it's inconvenient for users of a solar calendar such as the Gregorian Calendar to accommodate a purely lunar holiday such as Ramadan. Lunisolar holidays are also inconvenient (which is my many districts no longer tie spring break to Easter), but clearly not as much as purely lunar holidays.

Why is the Islamic Calendar purely lunar, unlike the lunisolar Hebrew or Chinese Calendars? It's all because of an interpretation of a verse of the Koran:

(Disclaimer: The author of the link below is a former Muslim.)

http://abdullahsameer.com/blog/the-flawed-islamic-calendar/

Time has completed a cycle and assumed the form of the day when Allah created the heavens and the earth. The year contains twelve months of which four are sacred, three of them consecutive, viz. Dhul-Qa’dah, Dhul-Hijjah and Muharram and also Rajab of Mudar which comes between Jumadah and Sha’ban.

The three consecutive months referred to are the eleventh, twelfth, and first months of the lunar Islamic Calendar. If a Leap Month were to be inserted at the end of the year (to make it lunisolar), then the three holy months would no longer be consecutive. Thus there must be no Leap Months.

It would be convenient for solar calendar users if the Islamic Calendar were lunisolar. But the Islamic Calendar is for Muslims, not for non-Muslim solar calendar users. Once again, it's not up to those who aren't Muslim to dictate what the Islamic Calendar should be like.

But sometimes I wonder, what if there could be a World Peace Calendar that could incorporate all of the major calendars of the world? Surely it would be a lunisolar calendar, since it incorporates both solar and lunar calendars that exist in the world.

Theoretically, every group would have to make some concession to use this calendar. Christians, for example, already have a lunisolar holiday in Easter, but now Christmas would have to become lunisolar as well, as well as all other holidays not currently tied to Easter (saints' days, and so on).

The main accommodation Muslims would need to make is the addition of Leap Months. And it's still possible to do so without violating the Koran verse quoted above. It only states that the 11th, 12th, and first months be consecutive. If we were to add the Leap Month after, say, the tenth month instead, then the three holy months would still be consecutive.

One calendar I once considered using as the World Peace Calendar is the Meyer-Palmen Calendar:

https://www.hermetic.ch/cal_stud/nlsc/nlsc.htm

Many world holidays already fit readily into this calendar. Since the first month (Aristarchus) falls near the spring equinox, this is the month to place both Easter and the Jewish Passover. Then Rosh Hashanah would end up on the first of Galileo. It turns out that Chinese New Year should be on the first of Lilius, since this date always falls between late January and mid-February.

For Muslims, I like the idea of simply declaring the ninth month to be Ramadan (as it already is in the Islamic Calendar). Notice that this month already has an Arabic name -- Ibrahim. Peter Meyer tells us he named the month for an Arabic astronomer -- but it can also represent "Abraham," as in the three Abrahamic religions. This month falls near the winter solstice -- which would be convenient for Muslims, since they'd have a shorter fasting period (in the hemisphere where most Muslims live).

In fact, all three Abrahamic faiths would celebrate a holiday in Ibrahim. For Jews this would be Hanukkah, while Christians can place Christmas in Ibrahim (maybe even on the 25th, so as to agree with the current calendar). Then the twelve days of Christmas and eight days of Hanukkah would extend towards the first of Julius, which would replace both the Gregorian (or Julian!) New Year as well as the end of Ramadan (Eid-al-Fitr). And there would be no standardized testing at this time, since all three Abrahamic faiths are celebrating a major holiday.

But this solution isn't perfect. The Leap Month, Meton, is the thirteenth month. This would violate the Koran's three consecutive holy months. We could instead declare Khayyam to be Leap Month so that Lilius, Meton, and Aristarchus are the three holy months. Notice that Jews would probably declare Lilius to be the Leap Month instead -- this reflects the fact that the Jewish Leap Month is considered to be Adar I, with Purim in Adar II. (Oh, and so as not to leave the calendar of India out, Holi can coincide with Purim, as it often already does.)

Also, we made Ibrahim the fasting month so that Muslims can enjoy a shorter fast. But there are Muslims in the Southern Hemisphere. (Unfortunately, we've heard about the recent tragedy that struck Muslims in Christchurch, New Zealand.) They might not appreciate a calendar where Ramadan is stuck near their summer solstice!

We might try placing the first month near the September equinox instead, so that Ramadan falls near the northern solstice instead. This gives a shorter fast in the south. Some say that a northern summer Ramadan more authentically reflects a pre-Islamic Calendar (Arabic ramada = "to heat"). But then the twelfth month of the hajj would fall in late summer, when it's hot in Mecca. (Since hajj is the pilgrimage to Mecca, only the hemisphere of Mecca matters here.) Our original calendar with the first month at Aristarchus places the pilgrimage in Mecca's late winter.

Of course, we can avoid hemisphere debates by placing Ramadan near an equinox instead. At any rate, I like the idea of the first, second, etc., months in the World Peace Calendar corresponding to the Muslim months -- since they must already concede something (the nonexistence of Leap Months), let's at least accommodate their month numbering. This includes the need for the 11th, 12th, and first months to be consecutive holy months.

Consider David's Lunar Calendar from my January 6th post. This calendar starts near the winter solstice, and so it places its ninth month (Ramadan) near the September equinox. The twelfth month (hajj) becomes late fall and Leap Month is between the seventh and eighth months, so that the 11th, 12th, and first months are still three consecutive holy months. Since Ramadan is near the first day of school, there would be no standardized testing during Ramadan.

If we were to make David's Lunar Calendar the World Peace Calendar though, we should probably leave out the 12-day week and just keep the current seven-day week. The intent of this calendar was to accommodate religions for which the seven-day week matters. (Sorry base 12 advocates, but dozenalism isn't considered to be a religion.)

Finally, note that there are objections to any lunar calendar at all:

(x) the solar year cannot be evenly divided into lunar months
I once read that there may be a very good reason to adopt a lunar calendar -- what if, in the future, we were to build colonies on the moon? If and when that ever happens, lunar months would suddenly become significant. Future lunar colonists could then say:

(x) lunar months are real and the calendar year needs to sync with them
since on the moon, lunar months are very real.

That takes us full circle back to traditionalists. Before we can build lunar colonies, we need to graduate more STEM students to build them. Of the classes I subbed for today, the Algebra I freshmen aren't bound for STEM, at least not according to SteveH (who wants Algebra I in eighth grade). The only class today which the traditionalists would respect is the AP computer class.

Reblogging: SBAC Prep

The SBAC might be canceled this year, but my reblog of old SBAC Prep posts continues. This is in deference to the fact that my most popular posts last year were SBAC Prep.

This is what I wrote last year about today's lesson:

Question 9 of the SBAC Practice Exam is on irrational numbers:

Cheryl claims that any irrational number squared will result in a rational number.

Part A

Drag an irrational number into the first response box that when squared will result in a rational number.

Part B

Drag an irrational number into the second response box that when squared will result in an irrational number.

Here are irrationals that can be dragged: cbrt(2)/sqrt(3), sqrt(3)/sqrt(2), cbrt(2), sqrt(2), pi, sqrt(pi).

This is a tricky one to place. In the Common Core Standards, rational and irrational numbers appear in the eighth grade, and so it's arguably not a high school topic at all. If they do appear in an Algebra I text, it's likely to be in the context of quadratic equations, thus it's a second semester topic.

It's also the first question in the calculator section. Then again, calculators won't really help students with rational and irrational numbers.

Cheryl's idea that the square of an irrational number must be rational is an attractive one. After all, the first irrational numbers we encounter are numbers like sqrt(3), which when squared produces the rational number 3.

But, as Georg Cantor shows us (discussed in old posts), most numbers are irrational. Therefore, the square of most irrational numbers is still irrational. The list of choices includes cube roots, so their squares are still irrational. In fact, Cheryl's conjecture that the square of an irrational must be rational is just like a claim that doubling any fraction produces a whole number (presumably because the most commonly used fractions like 1/2 and 1 1/2 indeed have that property).

The choices involving pi are tricky. We know that the square of sqrt(pi) is pi, which is clearly irrational, and so sqrt(pi) would be dragged into the second box. But to which box should the number pi itself be dragged. I doubt that any high school text explains that pi^2 is irrational. We know that pi is transcendental, and so no integer power of pi can be rational -- but high school students wouldn't be expected to know this. Of course, students can forget about pi and just drag sqrt(pi) or one of the cube roots into the second box, since only one number needs to be dragged there.

So here is a complete answer: only sqrt(3)/sqrt(2) or sqrt(2) can be dragged into the first box. All other numbers are possibilities for the second box.

Both the girl and the guy from the Pre-Calc class correctly answer this question, even though they choose different answers. The girl uses sqrt(3)/sqrt(2) for the first box and cbrt(2) for the second, while the guy uses sqrt(2) for the first box and pi for the second.

Question 10 of the SBAC Practice Exam is on building equations:

A train travels 250 miles at a constant speed (x), in miles per hour.

Enter an equation that can be used to find the speed of the train, if the time to travel 250 miles is 5 hours.

The guiding equation is d = rt, rate times time equals distance. The rate of speed is x, the time is 5, and the distance is 250. Therefore the equation is 5x = 250.

I consider this to be a first-semester Algebra I problem. While we might avoid the formula in middle school (or perhaps even mention dimensional analysis), by the time the students reach Algebra I, I should teach them the formula, the guiding equation.

Both the girl and the guy from the Pre-Calc class correctly answer this question, but I wonder whether the SBAC computer would mark them as correct. The guy writes 250 = x * 5 (and gives the solution as 50 mph). This is correct, but mathematicians usually write 5x not x * 5. The girl writes her equation as s = 250/5. Technically this equation can be used to find the speed, but I suspect SBAC is looking for a multiplication equation, not division with the variable isolated. (Actually, now I definitely think SBAC will mark it as wrong because she uses the variable s when the directions plainly state to use the variable x.)

Conclusion

I've basically covered most of Lesson 3 in today's Part 1. Therefore Part 2 will come up very soon -- and now that I have Java on my computer, I'll be coding everything on my computer as I read it.

No comments:

Post a Comment