Friday, June 18, 2021

Juneteenth Observed Post (Stewart Chapter 14: Dark Stars)

Table of Contents

1. Introduction
2. An Error on the Rapoport Calendar
3. Another Interesting Rapoport Problem
4. Stewart Chapter 14: Dark Stars
5. Lemay Lesson 14: Windows, Networking, and Other Tidbits
6. Drivers for Lemay's Windows
7. Conclusion

Introduction

You might have missed the announcement that I made at the bottom of my last post, and so I'm going to repeat it here. I'm seriously considering leaving the teaching profession very soon. It's become obvious by now that I almost certainly won't ever be hired as a full-time math teacher. It's because my resume is considered weak -- most districts won't give me a second glance, and the few that do interview me, I never hear back from after the interview.

The purpose of this blog is for me to keep track of my career as a math teacher. But it appears that I won't ever be a math teacher again -- and it's mainly because of decisions I made before even starting this blog. I won't repeat the long story, since I already gave it in the second half of my last post. Once again, if I leave the teaching profession and embark on a new career, then this blog no longer serves a purpose, and so I'll stop blogging altogether.

Until then, I'll keep blogging about Geometry, but also on my progress towards a non-teaching career. I will return to two of last summer's reading projects -- Ian Stewart and Laura Lemay. And Lemay's book on Java is more important, since coding might become a part of my non-teaching career.

Meanwhile, today is the newest federal holiday -- Juneteenth National Independence Day. This is what I wrote last year on Juneteenth Eve:

June 19th is Juneteenth -- the day that slavery was finally abolished in Texas, the last former Confederate state to end the practice.

I've mentioned Juneteenth on the blog before -- mainly in connection with another day associated with emancipation -- April 16th, when slavery ended in DC. I was trying to explain why income tax returns are due after April 15th in some years. (DC Emancipation Day -- just like Veteran's Day or the Fourth of July -- is observed a day early in years when it falls on a Saturday. Since the IRS is in DC, it would be closed on Friday, April 15th, so that taxes are due on Monday, April 18th in such years.)

Some businesses have responded by giving their workers half- of full-days off on Friday. And there is now a movement to make Juneteenth the newest federal holiday.

And that's exactly what happened in 2021. And just like the aforementioned holidays, when June 19th falls on a Saturday, the federal holiday is on the Friday before. So today is Juneteenth Observed.

Interestingly enough, Rebecca Rapoport anticipated the new holiday -- hers is one of the few calendars that already has Juneteenth printed on it.

An Error on the Rapoport Calendar

There are two reasons why I feature Rapoport problems on the blog. One is when I blog on a day when she features a Geometry problem. Well, today's problem definitely isn't Geometry -- instead, it's about numbers that can be written as the sum of three distinct primes in two different ways.

The other reason is if I found an error on the calendar, even if it's on a non-posting day. And that's exactly what happened between my last posting day and today. The fact that it's on a Geometry problem is a bonus for the blog.

Within the past week on her Daily Epsilon on Math 2021, Rebecca Rapoport wrote:

What is the shortest distance from A to B on the outside of the box?

(Here are the givens from the diagram: AB is a space diagonal. Dimensions of the box are 4 * 5 * 8.)

Sometimes when this sort of problem is given, it's stated in terms of a bug crawling on the exterior of the box -- what is the shortest path from A to B for the bug?

The way to think about this is to unfold the box into a net, and then measure the length of the path from A to B on the net. The resulting path works out to be the hypotenuse of a right triangle, with one of the dimensions of the box as a leg and the sum of the other two dimensions as the other leg. There are in general three ways to unfold the box, depending on which dimension becomes a leg. Well, the question asks for the shortest distance, so we should choose whichever leg results in the shortest hypotenuse.

Let's choose 5 as the leg, and so 4 + 8 = 12 becomes the other leg. By the Pythagorean Theorem:

5^2 + 12^2 = c^2
25 + 144 = c^2
169 = c^2
13 = c

And so the desired distance is 13 -- and of course, the date of the problem was the thirteenth. But the problem is, how do we know that 13 is the shortest distance? Checking the other two possibilities, we see that if 4 is a leg, the other leg is 5 + 8 = 13 -- and if 13 is a leg, the hypotenuse is more than 13. So we look at the final possibility, where 8 is a leg and 4 + 5 = 9 is the other leg:

8^2 + 9^2 = c^2
64 + 81 = c^2
145 = c^2
c = sqrt(145)

And sqrt(145) is just slightly more than 12 -- it's approximately 12.04. This is much less than 13, and so the shortest distance must be sqrt(145), not 13. Rapoport's calendar is in error.

Since Rapoport gave this problem on Sunday, June 13th, 13 was the intended answer -- but as usual, Twitter users mentioned the other possibilities. Rapoport only checked the distance for one of the three possible nets and completely forgot the other two nets -- and yes, she did acknowledge the error after the Twitter users caught it.

Another Interesting Rapoport Problem

Yesterday there was another problem worth discussing on the Rapoport calendar. This problem is completely visual -- there's nothing to say about it except what's in the diagram. So let me describe it to the best of my ability:

There are four interlocking circles -- Circles M, N, O, P. Lying on Circle M are Points L, O. Lying on Circle N are Points K, L, O. Lying on Circle O are Points L, M, N, P. Lying on Circle P are Points O, Q.

Also, we have the following lengths: MO = NK = PQ = 17, KL = 25.5, OL = x.

How do we solve this problem? Well, we notice that MO is a radius of both Circles M and O, and its length is 17. Thus the desired length OL is also a radius of Circle O, and so its length is 17. Therefore x must equal 17 -- and of course, yesterday's date was the seventeenth.

But this raises a question -- how do we know that O is actually the center of the circle? Of course, when I described the problem to you, I called it "Circle O" -- and circles are named for their centers. But notice that I just named it Circle O in order to provide the information from the diagram concisely -- it isn't explicitly stated that O is the center of the circle.

Well, it's considered a standard assumption in Geometry that if a point in the interior of a circle is marked with a dark dot, then that point is the center of the circle. This notation is used throughout the U of Chicago text, most notably in Chapter 15 on circles. And in the diagram, M, N, O, P are all labeled with dots, thus they are the centers of the circles in whose respective interiors they lie. (Also, my choice to call it O rather than any other letter of the alphabet suggests that it's the center, but again, I'm the one who chose that letter.)

But this doesn't seem satisfactory -- after all, O lies on Circles M, N, P. So it might be labeled with a dot because it's a special point common to these three circles, not because it's itself the center of a circle. It just seems more satisfying if we could really prove that it's the center of its circle. (Notice that we're actually taking it for granted that M, N, P really are circle centers -- but unlike O, there's no compelling reason for M, N, P to be labeled with dots unless they're circle centers. But O, on the other hand, does have a compelling possible reason to be labeled other than it being the center, which is why it seems that it needs to be proved.)

Notice that KL = 25.5, which is half again the length of the radius of Circle N. I can't help but wonder whether we can perform some sort of angle chase that eventually leads to Angle LMO = 60, thus proving that Triangle LMO is equilateral (and hence OL = 17 that way). But that clearly doesn't work -- trig gives us Angle KLN = arccos(-1/4) = 104 (approx.) and Angle KNL = 38, and there's no way to get from there to LMO = 60.

The other way to prove that Circle O is the center of its circle is to notice that O is common to three circles, M, N, P, all with the same radius. So it might be possible to get from there to prove that O must be the center of the circle containing M, N, P.

Consider Lesson 15-4 of the U of Chicago text. This lesson is called "Locating the Center of a Circle," which is exactly what we're trying to do here -- locate the center of the circle through M, N, P. We begin by finding the perpendicular bisector of MN -- the locus of all points equidistant from M, N. We don't know where this line is, but we do know one point on this line -- Point O. After all, MO = NO = 17, as MONO are radii respectively of Circles M, N and these are known to be 17. Thus O must lie on the locus of all points equidistant from M, N -- namely the perpendicular bisector of MN.

Likewise, O must lie on the perpendicular bisector of MP, since it's equidistant from M, P. These two perpendicular bisectors intersect at the circle of the circle through M, N, P -- and we already know that O lies on both lines. As two lines intersect in at most one point, that point is exactly O. Therefore, O must be the center of the circle. QED

And with O as the center of the circle and its radius MO = 17, we conclude OL = 17, as OL is also a radius of Circle O. Our answer is now satisfactory.

Stewart Chapter 14: Dark Stars

Chapter 14 of Ian Stewart's Calculating the Cosmos is called "Dark Stars." If you recall from last year, each chapter begins with a quote:

"HOLLY: Well, the thing about a black hole, its main distinguishing feature, is -- it's black. And the thing about space, the color of space, your basic space color is -- it's black. So how are you supposed to see them?"

-- Red Dwarf, Series 3 episode 2: 'Marooned'

As you've probably figured out from the quote, the "dark stars" in the chapter title are black holes. But Stewart opens the chapter not with a black holes, but a white rock:

"Flying to the Moon has long been a human dream. Lucian of Samosata's satirical True Fictions, dating from about 150 AD, includes imaginary trips to the Moon and Venus."

But we can't go anywhere beyond our planet unless we can exceed its escape velocity, which works out to be 11.2 kilometers per second:

"You still feel its gravitational force -- remember, law of universal gravitation -- but the force falls away so rapidly that you don't grind to a halt."

As the author tells us, the solar system has a larger escape velocity -- 42.1 kilometers per second. But the question here is, can there be an object whose escape velocity exceeds the speed of light?

"Not only does such a mass trap all the light it emits; it disappears from the universe altogether, hidden behind a one-way ticket to oblivion called an event horizon."

According to Stewart, the mathematical equations for studying black holes are difficult, but one trick is to assume that a black hole is spherical, since spheres are symmetrical:

"So instead of the three dimensions of space, you have to consider only one, which is much easier. In 1915 Karl Schwarzschild exploited the idea to solve the Einstein equations for the gravitational field of a massive sphere, modeling a large star."

And he came up with the concept of a Schwarzschild radius -- as long as the radius of a massive object exceeds this radius, it will act like just an ordinary object. But what happens if the object is smaller than this radius?

"What happens then depends on the detailed physics, and at the time this was mainly guesswork. By 1939 Robert Oppenheimer had calculated that sufficiently massive stars will indeed undergo gravitational collapse in such circumstances, but he believed that the Schwarzschild radius bounds a region of spacetime in which time comes to a complete stop."

The author tells us that time only stops from the perspective of an external observer. For an internal observer, something different happens:

"In these coordinates there's no singularity at the Schwarzschild radius. Instead, it constitutes an event horizon: a one-way barrier whose outside can influence its inside, but not the other way round."

Once we cross the event horizon, it's impossible to escape. So we can never know what it's like to cross the event horizon:

"In this case we can't send a probe into a black hole and bring it out again, or even receive radio signals from it (which travel at the speed of light and also can't escape), so there's no way to find out what the reality is."

At this point, Stewart describes the solution to the field equations for a spinning black hole -- which makes sense, since most objects in space spin:

"It shows that, instead of a single spherical event horizon, there are two critical surfaces at which physical properties change dramatically."

Here the author includes his first image of the chapter -- it includes the event horizon (sphere) and ergosphere (ellipsoid) for a spinning black hole. The ergosphere surrounds the event horizon -- it's where particles can actually gain energy from the black hole.

"I'll use a simplified image with only one dimension of space plus the usual one of time, but this can be extended to the physically realistic case with three dimensions of space."

And now Stewart includes his second image of the chapter -- Hermann Minkowkski's representation of relativistic spacetime. The present is at the vertex of a double-cone -- one cone representing the past and the other the future. Worldlines show the motion of particles -- these paths stay inside the light cone, from the past cone through the present vertex to the future cone.

Let me quote the author's next few sentences, as these are highly relevant on this Geometry blog:

"In Euclid's geometry, the natural transformations are rigid motions, and these preserve distances between points. The analogues in special relativity are Lorentz transformations, and these preserve a quantity called the interval."

Recall that these "natural transformations" or "rigid motions" are translations, reflections, rotations, and glide reflections -- that is, isometries or Common Core transformations. So to those traditionalists who oppose the teaching of Common Core Geometry, here you go -- an appearance of transformations outside of a Common Core math class. And the Lorentz transformations are just like Common Core transformations, except in spacetime.

"In general relativity, gravity is included by allowing Minkowski's flat plane to bend, mimicking the effects of a gravitational force, as in the picture on page 25."

Page 25, by the way, is all the way near the end of the first chapter. This is one of the chapters that we read on the blog last summer.

Instead, let's look at the picture on the current page. It's the Roger Penrose diagram of Schwarzschild black hole. I've mentioned Penrose on the blog before in connection Physics and Geometry. Stewart describes this image as follows:

"The arrowed curve is the worldline of a spacecraft falling into the black hole by crossing its (event) horizon, and hitting the central singularity (zigzag line)."

In the next picture, there's a Penrose diagram of Schwarzschild black hole/white hole pair. The author explains how this works:

"Mathematically we glue two copies of the metric together, reversing time in one by rotating the picture through 180 degrees, to get the complete picture."

This is the idea that every black hole is connected to a white hole via a "wormhole" -- and it's often speculated that matter can travel into a new universe. We continue to extend the drawing:

"Similarly, add another diamond on the right representing a parallel wormhole and antiverse. But this is just the start."

This leads to the next image -- the Penrose diagram of a rotating (Kerr) black hole. The worldline begins in our universe and passes through a black hole, wormhole, and white hole into a new universe.

"It implies that they're natural consequences of the mathematical structure of a rotating black hole -- structures for spacetime that are logically consistent with known physics, hence reasonable consequences of it. That's what black holes look like geometrically, but how can they arise in reality?"

One physicist who extensively studied black holes was Stephen Hawking -- and we featured him earlier on the blog. He explained how black holes can emit particles, which we now call Hawking radiation:

"But Hawking realized that quantum effects can cause a black hole to emit radiation from its event horizon. Quantum mechanics permits the spontaneous creation of a virtual particle-antiparticle pair, as long as they annihilate each other very shortly afterwards."

But then the black hole absorbs one of these particles, allowing the other to escape. As for whether black holes are real, scientists debated whether an object called Cygnus X-1 is a black hole:

"In 1974 Thorne and Hawking had a bet about it: Thone said it was a black hole and Hawking said it wasn't."

Even though Hawking lost the bet, we still don't know for sure whether Cygnus X-1, or any other observed object, is a black hole. By the way, after this book was published, two more candidate black holes, each about 1000-2000 light years away, have been proposed in the past 12 months. (This nearest black hole candidate is known as HR 6819.)

"Most astronomers accept that such observations show the existence of black holes in the conventional relativistic sense, but there's no definitive evidence that this explanation is correct."

Indeed, we're not sure whether collapsing stars actually become black holes. Instead, they might turn into "gravastars," which have a cold, dense shell and a springy interior:

"This theory came form re-examining the relativistic scenario for a black hole in the light of quantum mechanics."

Unlike black holes, gravastars preserve rather than destroy information. And gravastars can be quite large -- in fact, the author surmises:

"Perhaps our universe is actually the inside of a huge gravastar. Among Einstein's predictions, over a century ago, was the occurrence of gravitational waves, which create ripples in spacetime like those in a pond."

And just before this book was published, such gravitational waves were finally detected. On this note, Stewart concludes the chapter as follows:

"The last word on black holes is not yet in, and there's no reason to suppose that our current understanding is complete -- or correct."

Lemay Lesson 14: Windows, Networking, and Other Tidbits

We will resume our study of Java with Lesson 14 of Lemay's online text. Last summer, we started Lesson 13, but there's a lot to understand in that chapter -- and the timing of it, placing Lesson 13 right at the end of summer and just before my long-term subbing began, didn't work out. This summer, I'll start with Lesson 14 (which makes it easier -- the Stewart and Lemay chapter numbers match) -- but we'll eventually circle back to Lesson 13 and other material we might have glossed over.

Here is the link to today's lesson:

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

Lesson 14 of Laura Lemay's Teach Yourself Java in 21 Days! is called "Windows, Networking, and Other Tidbits." Here's how it begins:

Here you are on the last day of the second week, and you're just about finished with applets and the awt. With the information you'll learn today you can create a wide variety of applets and applications using Java. Next week's lessons provide more of the advanced stuff that you'll need if you start doing really serious work in Java.

Yes, it took us over a year to complete the "second week" of this course. Lemay assumes that we're reading one of her chapters per day, but in reality, I'm taking the time to understand each lesson. (This is why I'm calling them "lessons," not "days.") But I really do want to reach that advanced stuff and serious work that she plans on showing us "next week." (OK, that one might be true -- I might actually start Lesson 15 in about a week.)

Oh, and there's one more warning -- one of the topics for this lesson is networking:

  • Networking-how to load new HTML files from a Java-enabled browser, how to retrieve files from Web sites, and some basics on how to work with generic sockets in Java.

Peeking ahead, I see that Lemay's examples involve retrieving files from specific websites that I might not be able to reach. So today I'll only focus on the material that I can actually do.

We begin with windows:

The Java awt classes to produce windows and dialogs inherit from a single class: Window. The Window class, which itself inherits from Container (and is therefore a standard awt component), provides generic behavior for all window-like things. Generally you don't use instances of Window, however; you use instances of Frame or Dialog.

And as Lemay tells us here, a frame is a type of window:

Frames are windows that are independent of an applet and of the browser that contains it-they are separate windows with their own titles, resize handles, close boxes, and menu bars. You can create frames for your own applets to produce windows, or you can use frames in Java applications to hold the contents of that application.

The first two listings are all about frames. We must compile these two together, since the first listing uses BaseFrame, which we define in the second listing.

Listing 14.1. A pop-up window.
 1:import java.awt.*;
 2:
 3:public class PopupWindow extends java.applet.Applet {
 4:    Frame window;
 5:
 6:    public void init() {
 7:      add(new Button("Open Window"));
 8:      add(new Button("Close Window"));
 9:
10:      window = new BaseFrame("A Popup Window");
11:      window.resize(150,150);
12:      window.show();
13:    }
14:
15:    public boolean action(Event evt, Object arg) {
16:       if (evt.target instanceof Button) {
17:          String label = (String)arg;
18:          if (label.equals("Open Window")) {
19:              if (!window.isShowing()) 
20:                  window.show();
21:          }
22:          else if (label.equals("Close Window")) {
23:              if (window.isShowing())
24:                  window.hide();
25:          }
26:          return true;
27:       }  
28:       else return false;
29:    }
30:}
Listing 14.2. The BaseFrame class.
 1:import java.awt.*;
 2:
 3:class BaseFrame extends Frame {
 4:  String message = "This is a Window";
 5:
 6:  BaseFrame(String title) {
 7:    super(title);
 8:    setFont(new Font("Helvetica", Font.BOLD, 12));
 9:  }
10:
11:  public void paint(Graphics g) {
12:     g.drawString(message, 20, 20);
13:  }
14:}

Lemay makes an typo here. In BaseFrame, she calls the constructor BaseFrame1, with an extra 1 symbol there. So I delete it. The Window methods resize, show, and hide are all listed as "deprecated," but I don't know the alternate methods, since showing and hiding are what the buttons are supposed to do -- the purpose of this applet.

Also, for some reason the words "This is a Window" don't appear on my BaseFrame. The title, "A Popup Window" appears, but not the text. I'm not sure what the problem is here.

Oh, there is one more thing that I see here:

You may have noticed, if you started up that pop-up window applet to play with it, that the new window's close box doesn't work. Nothing happens when you click the mouse on the box.

When I tried running it with the BaseFrame1 error, the new BaseFrame appears -- but then it's completely impossible to close it, since the runtime error causes PopupWindow to crash. I know that in C++ we have stray pointers and memory leaks, so this is a stray window.

Let's move on to the next topic for this lesson, menus:

Each new window you create can have its own menu bar along the top of that window. Each menu bar can have a number of menus, and each menu, in turn, can have menu items. The awt provides classes for all these things called, respectively, MenuBarMenu, and MenuItem. Figure 14.3 shows the menu classes.

Menus are demonstrated in the next listing, called BaseFrame2. (Oh, so that explains the author's error from earlier -- she originally wanted a BaseFrame1 since there's a BaseFrame2, but she ended up calling it just BaseFrame instead.)

Listing 14.3. BaseFrame with a menu.
 1:import java.awt.*;
 2:
 3:class BaseFrame2 extends Frame {
 4:  String message = "This is a Window";
 5:
 6:  BaseFrame2(String title) {
 7:    super(title);
 8:    setFont(new Font("Helvetica", Font.BOLD, 12));
 9:
10:    MenuBar mb = new MenuBar();
11:    Menu m = new Menu("Colors");
12:    m.add(new MenuItem("Red"));
13:    m.add(new MenuItem("Blue"));
14:    m.add(new MenuItem("Green"));
15:    m.add(new MenuItem("-"));
16:    m.add(new CheckboxMenuItem("Reverse Text"));
17:    mb.add(m);
18:    setMenuBar(mb);
19:  }
20:
21:  public boolean action(Event evt, Object arg) {
22:    String label = (String)arg;
23:    if (evt.target instanceof MenuItem) {
24:      if (label.equals("Red")) setBackground(Color.red);
25:      else if (label.equals("Blue")) setBackground(Color.blue);
26:      else if (label.equals("Green")) setBackground(Color.green);
27:      else if (label.equals("Reverse Text")) {
28:         if (getForeground() == Color.black) {
29:            setForeground(Color.white);
30:         } else setForeground(Color.black);
31:      }
32:      repaint();
33:      return true;
34:    } else return false;
35:  }
36:  
37:  public void paint(Graphics g) {
38:     g.drawString(message, 20, 20);
39:  }
40:
41:  public boolean handleEvent(Event evt) {
42:     if (evt.id == Event.WINDOW_DESTROY) hide();
43:      return super.handleEvent(evt);
44:  }
45:}

OK, I entered this code, but there's a problem -- this is just a BaseFrame2. There's no applet, no driver that actually displays the menu. Lemay writes:

In the sample code on the CD, I created a new class called BaseFrame2 for this part of the example, and a new class PopupWindowMenu.java to be the applet that owns this window. Use PopupWindowMenu.html to view it.

But of course, I don't have any CD, nor any other way to see it.

Well, last year during our study of Java, for each lesson we study, I write my own code to show that I understand the lesson. So I might as well write my own PopupWindowMenu driver, and let that be my own project for the day. But here's the thing -- recall that PopupWindow didn't work for me. The new window appeared with a title, but no text appeared in the new window.

Drivers for Lemay's Windows

Let's try it anyway. We'll make it just like PopupWindow except that we don't need any buttons, so all it needs is an init method:

import java.awt.*;
public class PopupWindowMenu extends java.applet.Applet {
    Frame window;
    public void init() {
      window = new BaseFrame2("A Popup Window Menu");
      window.resize(1500,1500);
      window.show();
    }
}

Once again, the new window doesn't show any text. But it does show the menu -- and the menu changes the background colors correctly. The only menu item that doesn't work is "Reverse Text"-- obviously because there's no text to reverse. But at least I do see the checkmark on "Reverse Text" work right.

I also notice an error message, which might explain why the text isn't appearing:

Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

at BaseFrame2.action(BaseFrame2.java:22)

Hmm -- we are having trouble making the text (a String) appear, so perhaps this is the problem. But it references line 22, which is:

22:    String label = (String)arg;

which has nothing to do with the text to be displayed -- the String message:

 4:  String message = "This is a Window";

This is definitely something for me to investigate at some point. Oh, and I was able to close the box on its own, since we added the handleEvent method.

Lemay continues with dialog boxes:

Dialog boxes are functionally similar to frames in that they pop up new windows on the screen. However, dialog boxes are intended to be used for transient windows-for example, windows that let you know about warnings, windows that ask you for specific information, and so on. Dialogs don't usually have title bars or many of the more general features that windows have (although you can create one with a title bar), and they can be made nonresizable or modal (modal dialogs prevent input to any other windows on the screen until they are dismissed).

Here is the author's listing:

Listing 14.4. The TextDialog class.
 1:import java.awt.*;
 2:
 3:class TextDialog extends Dialog {
 4:  TextField tf;
 5:  BaseFrame3 theFrame;
 6:
 7:  TextDialog(Frame parent, String title, boolean modal) {
 8:    super(parent, title, modal);
 9:
10:    theFrame = (BaseFrame3)parent;
11:    setLayout(new BorderLayout(10,10));
12:    setBackground(Color.white);
13:    tf = new TextField(theFrame.message,20);
14:    add("Center", tf);
15:    add("South", new Button("OK"));
16:    resize(150,75);
17:  }
18:
19:  public Insets insets() {
20:    return new Insets(30,10,10,10);
21:  }
22:
23:  public boolean action(Event evt, Object arg) {
24:    String label = (String)arg;
25:    if (evt.target instanceof Button) {
26:      if (label == "OK") {
27:         hide();
28:         theFrame.message = tf.getText();
29:         theFrame.repaint();
30:      }
31:    }
32:    else return false;
33:    return true;
34:  } 
35:}

Hmm -- notice that this listing is missing two functions. We need another base frame, BaseFrame3, in addition to the driver. But at this point I'm a bit confused. Lemay writes:

There are a few things to note about this code. First of all, note that the TextDialog class has a reference back up to its parent frame. It needs to reference this so it can update that frame with the new text information. Why does the dialog need to update the frame, rather than the frame figuring out when it needs updating? Because only the dialog knows when it's been dismissed. It's the dialog that deals with the change when the user presses OK, not the frame. So the dialog needs to be able to reach back to the original frame. Line 5 defines an instance variable to hold that reference.

But what exactly is the parent frame here? Is it the driver applet? But the driver applet is not exactly the same as a frame. Perhaps the applet needs to call a frame, which in turn calls the text dialog -- but then what do we do. Does the applet call the text dialog, or does the base frame, or what?

And I admit it -- I'm completely stumped! I wish that Lemay would just tell us the driver, since I can't figure it out. And there's no point proceeding to Listings 14.5 and 14.6 -- both of these access sites on the web, and I don't know what these sites are.

So we're done with Lesson 14, but it leaves a sour taste in my mouth -- not being able to display the text in the first three listings, and then not being able to begin the last three.

Conclusion

I've added the "Calendar" label to this post, since I have several things to say about schedules due to two calendar-related developments in the past week.

The first, of course, is the new federal holiday, Juneteenth. Notice most schools have already started summer break, so Juneteenth is expected to have little effect on the school calendar.

But one thing I know is that some schools open the last week in August -- before Labor Day, but too late to end the semester before winter break. The reason for this is Thanksgiving -- once schools started taking that entire week off, it was considered preferable to start school the week before Labor Day than extend school a week later in June. With school starting the week before Labor Day, it ends just before June 19th -- that is, Juneteenth.

It's almost as if schools were already observing Juneteenth -- starting school the last week in August guarantees that it ends before newest holiday. But I suspect that the actual "do not pass" date for the school year wasn't Juneteenth, but the summer solstice, on the 20th or 21st. After all, it's "summer break," so it should start by the summer solstice.

One of the last holdouts against starting before Labor Day here in Southern California are the Waldorf schools, which I discussed in an earlier post:

https://myemail.constantcontact.com/WSOC-June-2021-Newsletter.html?soid=1103630267292&aid=BgUBoQzDiG0

According to this link, the last day of school was today, even though it's a federal holiday. And high school graduation isn't until tomorrow, on Juneteenth itself. (Waldorf schools are also known to have a late birthday cutoff date, May 31st, so that students with June birthdays graduate at age 19.) This problem only occurs when Labor Day is on its latest possible date -- September 7th. In all other years, Waldorf graduation is before Juneteenth. 

Notice that schools don't necessarily have to give all federal holidays off -- in fact, many California schools don't give Columbus Day off. I wonder whether, by the next time Labor Day falls on the 7th (in the 2026-27 school year), both the last day of school and graduation will be changed to Thursday in order to avoid the federal holiday on Friday and Saturday.

In past posts, I also suggested adding federal holidays to the calendar, particularly during long stretches without such a holiday. Many people welcome a holiday in June, namely a month previously without a federal holiday. But I point out that Memorial Day and Fourth of July are only five weeks apart -- about the same interval between Labor Day and Columbus Day, or MLK Day and Presidents' Day. In fact, it turns out that many of our holidays are 1/11 of a year apart -- suggesting that they would all fall around the same day of the month on the Eleven Calendar. (The only federal holidays that don't follow this pattern are the "holiday" holidays -- Thanksgiving, Christmas, and New Year's -- and now Juneteenth.)

So my preferred times for new holidays fill in the gaps -- late March, late April, and early August. And it might be helpful to consider diversity as well, since African Americans are now represented by two federal holidays, MLK Day and Juneteenth. If we let Cesar Chavez Day be the late March holiday, then Hispanics are included. Again, the LAUSD has proposed a late April holiday, but we must find a way to avoid offending either Armenian-Americans or Turkish-Americans. If we rename Columbus Day to Indigenous Peoples Day, then Native Americans are included. All that's left would be to find an early August holiday that represents Asian Americans.

So that's what Juneteenth would look like on the Eleven Calendar. As for the Usher Calendar, a Juneteenth holiday would follow the pattern of all other holidays -- it must be fixed to a certain day of the week. The third Monday in June would place it three weeks after Memorial Day (and 41 weeks after Labor Day, which would fit the Waldorf school calendar as well.) I sort of like the idea of placing it in the June 13th-19th, so that it would always fall on a June ----teenth, fitting its name. But June 13th-19th on the Usher Calendar would be a Saturday -- not much of a federal holiday (although Juneteenth celebrations in Southern California often fell on that Saturday before the pandemic).

And that leads to the other development -- the proposal to expand the college football playoff. While I mentioned an eight-team plan in previous posts, the current proposal would include 12 teams.

I wrote that an expanded playoff might lead to the Usher definition of Thanksgiving, since the goal will be to fit the tournament between Thanksgiving and MLK Day. Indeed, it's possible that the playoff will begin in the 2026-27 season, when the holiday is on November 26th. Then in 2030 and 2031, if turkeys aren't eaten until November 27th-28th, that will lessen the time allotted for the playoffs unless the holiday is moved up to the November 20th-26th range, thus matching Usher Thanksgiving.

Thus ends this post. I wish everyone a happy Juneteenth. Enjoy the new holiday, but remember the Texas slaves whose freedom was given on this day.

No comments:

Post a Comment