4 stories
·
0 followers

“Hello world” is the hard part

1 Share

Kernighan and Ritchie’s classic book The C Programming Language began with a sample C program that printed “hello world.” Since then “hello world” has come describe the first program you write with any technology, even if it doesn’t literally print “hello world.”

Hello-world programs are often intimidating. People think “I must be a dufus because I find hello-world hard. At this rate I’ll never get to anything interesting.”

The problem is that we confuse the first task with the easiest task. Hello-world programs are almost completely arbitrary. You can’t deduce what a compiler is named, where files must be located, how they must be formatted, etc. You have to be told. The amount of arbitrary material you need to learn is greatest up-front and slowly decreases.

When I started programming I thought I’d quickly get past the hello-world stage and only write substantial programs from then on. Instead, I’ve it seems I’ve spent a substantial chunk of my career writing hello-world programs with no end in sight.

***

No discussion of hello-world programs would be complete without mentioning possibly the most intimating hello-world program: the first Windows program in Charles Petzold’s Programming Windows book. I was only able to find the program from the Windows 98 edition of his book. I don’t recall whether it differs much from the program in his first edition.


/*------------------------------------------------------------
   HELLOWIN.C -- Displays "Hello, Windows 98!" in client area
                 (c) Charles Petzold, 1998
  ------------------------------------------------------------*/

#include <windows.h>

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
     static TCHAR szAppName[] = TEXT ("HelloWin") ;
     HWND         hwnd ;
     MSG          msg ;
     WNDCLASS     wndclass ;

     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
     wndclass.lpfnWndProc   = WndProc ;
     wndclass.cbClsExtra    = 0 ;
     wndclass.cbWndExtra    = 0 ;
     wndclass.hInstance     = hInstance ;
     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;
     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;
     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
     wndclass.lpszMenuName  = NULL ;
     wndclass.lpszClassName = szAppName ;

     if (!RegisterClass (&wndclass))
     {
          MessageBox (NULL, TEXT ("This program requires Windows NT!"), 
                      szAppName, MB_ICONERROR) ;
          return 0 ;
     }
     
     hwnd = CreateWindow (szAppName,                  // window class name
                          TEXT ("The Hello Program"), // window caption
                          WS_OVERLAPPEDWINDOW,        // window style
                          CW_USEDEFAULT,              // initial x position
                          CW_USEDEFAULT,              // initial y position
                          CW_USEDEFAULT,              // initial x size
                          CW_USEDEFAULT,              // initial y size
                          NULL,                       // parent window handle
                          NULL,                       // window menu handle
                          hInstance,                  // program instance handle
                          NULL) ;                     // creation parameters
     
     ShowWindow (hwnd, iCmdShow) ;
     UpdateWindow (hwnd) ;
     
     while (GetMessage (&msg, NULL, 0, 0))
     {
          TranslateMessage (&msg) ;
          DispatchMessage (&msg) ;
     }
     return msg.wParam ;
}

LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
     HDC         hdc ;
     PAINTSTRUCT ps ;
     RECT        rect ;
     
     switch (message)
     {
     case WM_CREATE:
          PlaySound (TEXT ("hellowin.wav"), NULL, SND_FILENAME | SND_ASYNC) ;
          return 0 ;
          
     case WM_PAINT:
          hdc = BeginPaint (hwnd, &ps) ;
          
          GetClientRect (hwnd, &rect) ;
          
          DrawText (hdc, TEXT ("Hello, Windows 98!"), -1, &rect,
                    DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;
          
          EndPaint (hwnd, &ps) ;
          return 0 ;
          
     case WM_DESTROY:
          PostQuitMessage (0) ;
          return 0 ;
     }
     return DefWindowProc (hwnd, message, wParam, lParam) ;
}

Read the whole story
markcf
3661 days ago
reply
Share this story
Delete

Could the eagles have flown Frodo into Mordor?

1 Share

Comments: " Could the eagles have flown Frodo into Mordor? "

URL: http://www.sean-crist.com/personal/pages/eagles/index.html


Could the eagles have flown Frodo into Mordor?

I probably wrote this page around 2000. At least, it must have been some point before Usenet was a complete ruin.

Feel free to write to me about this if you want to argue about it or can think of additional points. But, please do read the article first. Most of the emails bring up points which are already covered here and have been hashed over many times. This article distills many discussions on the subject going back to the 1980's.

On rec.arts.books.tolkien, there is periodic debate whether the eagles could have flown the Ring into Mordor, saving Frodo and Sam the hazardous journey on foot.

Following is a possible plan along these lines:

Plan: After the Council of Elrond, but before the Company departs from Rivendell, Gandalf goes up to the Misty Mountains, hails the eagles, and discusses the matter with them to secure their cooperation and to coordinate the plan. The Grey Company travels as they did in the text, passing thru Lórien and traveling down the Anduin on boats. At some point on the Anduin, the company lands on the east bank, abandons the boats, and travels on foot north of the Emyn Muil thru the uninhabited Brown Lands. They then turn south and end up at some point along the Ered Lithui around a hundred miles east of Cirith Gorgor, directly north of Mount Doom on the north side of the mountains. The eagles rendezvous with the company at some pre-arranged spot just north of the Ered Lithui. It's likely that Aragorn (or someone else) would have previously traveled in the Brown Lands and would be able to designate some landmark as a suitable meeting place. An eagle carries Frodo to Mount Doom in a single flight, possibly accompanied by other eagles and by other members of the Grey Company. Frodo goes into Sammath Naur and throws the Ring into the Cracks of Doom.

My contention is that there is nothing in the text to rule out such a plan, and that it is simply a hole in the plot of an otherwise excellent book that the issue is never brought up. This is not to say that LoTR is in any way a bad book; it merely shows that even as excellent a writer as Tolkien does not always succeed at perfectly harmonizing the various entities which he has placed in his world. As Tolkien himself says,

"The most critical reader of all, myself, now finds many defects, minor and major, but being unfortunately under no obligation either to review the book or to write it again, he will pass over these in silence, except one that has been noted by others: the book is too short." (LoTR I, 9-10)

Under the variant of the "eagles" plan outlined above, some of the objections to the plan become non-issues. For example, one writer on r.a.b.t. objected that the eagles could not fly all the way from the Shire to Mordor carrying the Ringbearer. This is true, but this problem, like several others, does not come up in the plan I've outlined.

Below, I will discuss some of the common objections to this scenario.

1. "If the eagles could fly the Ringbearer to Mt. Doom so easily, it wouldn't be a very good story."

I agree. Clearly, The Lord of the Rings wouldn't be nearly as good a story if the dreadful travel into Mordor by Frodo and Sam were neatly snipped out and replaced by a flight with the eagles.

However, this is a story-external reason, and it does not solve the hole in the plot. The characters in the story, behaving within their own plane of reality, would not choose their course of action based on what has the best dramatic or literary effect; they would seek to eliminate the threat from the East with the least effort and risk, and if it appears to them that the "eagles" plan is the best one, it is the one they would choose.

Tolkien acknowledges that the eagles are problematic as a literary device; it is difficult to constrain these powerful entities once they exist in Tolkien's world:

"The Eagles are a dangerous 'machine'. I have used them sparingly, and that is the absolute limit of their credibility or usefulness. The alighting of a Great Eagle of the Misty Mountains in the Shire is absurd; it also makes the later capture of G. [Gandalf] by Saruman incredible, and spoils the account of his escape." (Letter 210)

So while I agree that having the eagles fly Frodo into Mordor would not be nearly as good a story line, this isn't the kind of answer I'm looking for; the question I'm asking is what there is within the internal logic of Middle-Earth which prevents this plan from working.

2. "It is way too risky for the eagles to carry the Ring into Mordor; Sauron would spot them immediately."

Some individuals assume that Sauron would immediately notice the eagles flying into his realm and would understand the nature of the threat. Under closer examination, it is not so obvious that Sauron would notice the eagles.

How would Sauron identify the threat? One possibility is that he would see the eagles approaching by means of the Palantír. However, I think it can be strongly argued that the Palantír would not show the eagles unless Sauron directed the Palantír to focus on the particular area where they are flying; the Palantír is not an alarm bell. Further, we know that the flight path charted above is not where his attention was mainly directed:

"...His eye watches that way [the Black Gate] all the time..." (II, 294) "No, no indeed," said Gollum. "Hobbits must see, must try to understand. He does not expect attack that way [Cirith Ungol]. His eye is all around, but it attends more to some places than to others. He can't see everything at once, not yet. [...] He thinks that no one can come to the Moon-tower without fighting big battle at the bridges, or getting lots of boats which they cannot hide and He will know about." (II, 316)

The Ered Lithui are a chain of mountains 300-400 miles long (roughly the distance between Boston and Washington DC, or between London and Glasgow), and it is considered impossible to enter Mordor by climbing over them; even one as sneaky and as skilled at climbing as Gollum knows of no way into Mordor except thru Cirith Gorgor and Cirith Ungol. For this reason, it is unlikely that Sauron would devote much attention to watching the Ered Lithui or the uninhabited Brown Lands.

There appear to be certain kinds of things which attract Sauron's attention, such as Frodo's gaze when he is seated on Amon Hen and is wearing the Ring. Sauron also is immediately aware when Frodo puts on the Ring in Sammath Naur. As long as Frodo does not put on the Ring during the eagle flight, however, it is not obvious that Sauron's attention would be attracted.

We know that Frodo went on foot all the way thru Mordor from Cirith Ungol to Mt. Doom carrying the Ring without Sauron spotting him; so the mere fact that something is carrying the Ring doesn't mean that Sauron will immediately spot it. The only thing which makes an eagle more visible is the fact that it's flying. However, the eagle has the advantage that there's far less time for Sauron to spot it, while the Ring-carrying Frodo was on foot in Mordor for many days.

It's important to note that once the eagles fly into Mordor, the game is no longer one of stealth but speed. Even if Sauron does immediately notice the eagles, he will not necessarily be able to respond in time. We aren't told exactly how long it took the eagles to fly from the Black Gate to Mt. Doom, but my guess is that it could not have been over an hour, and the flight I propose above is slightly shorter.

After Frodo and Sam entered Mordor thru Cirith Ungol, Sauron had fully ten days to contemplate the purpose of their mission into Mordor, and did not realize that their plan was to destroy the Ring until the last moment. Given that the Mouth of Sauron refers to the intruders as "spies", Sauron's most likely thought would be that the eagles are merely flying over his realm for reconnaisance purposes. Thus, even if Sauron notices the eagles, his response would not necessarily be an appropriate one to prevent the Ring from being destroyed (such as having the Nazgûl fly directly to Mt. Doom to intercept the eagles).

3. "Sauron would send the flying Nazgûl after the eagles."

It is likely that he would. However, there is a very good change that the Nazgûl would not reach the eagles in time to foil the threat.

First, the Nazgûl are almost certainly not always airborne; the flying mounts must rest sometimes. It would presumably take at least a few minutes to take the flying mounts out of their stables, harness them, and get the Nazgûl aloft. We are not told where the flying mounts are stabled (Barad-dûr would be a fair guess), but unless it is very close to Mt. Doom, the Nazgûl have little chance of catching up with the eagles unless they chanced to be aloft already.

Second, the Nazgûl would have to be able to fly faster than the eagles to be able to catch up with them. We are not specifically told whether the eagles are faster than the Nazgûl, but there is at least an oblique suggestion that they are:

"Then come, and let your brother go with us, and some other of your folk who is most swift! For we have need of speed greater than any wind, outmatching the wings of the Nazgûl." (III, 280; emphasis is mine.)

Finally, we know that the eagles are willing to attack the flying Nazgûl, because they do so at the last battle before the Black Gate. An entirely possible series of events would be for some of the eagles to attack the Nazgûl and hold them back long enough to allow the eagle carrying the Ringbearer to reach Mt. Doom.

4. "Orcs stationed along the border of Mordor would shoot arrows at the eagles."

As noted above, the Ered Lithui were considered to be a secure border, and it is not clear why Sauron would waste troops to patrol a border from which no land-based invasion is possible. So it is not clear that there would be orcs along the Ered Lithui to start with.

Even if some orcs were stationed there, however, we know that eagles can fly very high:

"Look!" cried Legolas, pointing up into the pale sky above them. "There is the eagle again! He is very high. He seems to be flying now away, from this land and back to the north. He is going with great speed. Look!" "No, not even my eyes can see him, my good Legolas," said Aragorn. "He must be far aloft indeed. I wonder what is his errand, if he is the same bird I have seen before[...]" (II, 30)

Aragorn is said to have very good eyesight (see, for example, the scene on Weathertop, where his keener vision leaves him no doubt about the identity of the black spots on the road). If the eagles can fly so high that Aragorn cannot see them, we can conclude that they are capable of flying out of bowshot from the ground.

5. "Orcs stationed at Mt. Doom would shoot arrows at the eagles as they land."

This is a reasonable counter to the argument under the previous heading. We do in fact know that there were occasions when there were workers in the vicinity of Mt. Doom:

"Often blocked or destroyed by the tumults of the Mountain's furnaces, always that road was repaired and cleared again by the labours of countless orcs."

There's at least one fairly clear piece of evidence that there wasn't normally a standing garrison of orcs near Mt. Doom. On the road in western Gorgoroth, Frodo and Sam find a water cistern from which they drink and refill Sam's water bottle. If orcs were regularly stationed around Mt. Doom, we would expect cisterns for their use there; but we are specifically told that Frodo and Sam could find no water there. The most likely explanation is that when orcs were in the area to clear the road, they were there only temporarily and not very frequently, and that water was specially hauled in on those unusual occasions.

Even if there were orcs in the area, however, it's not clear that orcs working on the road would have bows and arrows handy, particularly since they're in the heart of Mordor guarded by mountains and fortresses. They'd presumably have work tools in their hands, not bows and arrows. The taskmasters would probably have whips, but it's not clear why they'd have bows and arrow at hand.

More to the point, it strikes me as very unlikely that Sauron would have had large numbers of orcs clearing the road in the middle of the war. This would probably hold true even if the defenders of the West had not deliberately provoked a concentration of Sauron's forces around Cirith Gorgor. That work can wait until later; right now, the orcs' strength is needed elsewhere.

6. "Sauron would cause Mt. Doom to erupt, frying the eagles."

We do know that Sauron is capable of some degree of control over Mt. Doom, since it is said to be at his bidding that the cloud of smoke and ash covers the sky. We do not know whether he would be able to cause Mt. Doom to erupt at a moment's notice, without first building up pressure, etc.

Even if Sauron can cause Mt. Doom to erupt immediately, we know from the actual story that the eagles are capable of navigating into Mordor and locating and rescuing Frodo and Sam, despite the major eruption which was taking place. Even if Sauron did manage to catch the eagles in the eruption, however, could this melt the Ring? If Sauron does manage to figure out that the eagles are carrying the Ringbearer, he might opt not to cause Mt. Doom to erupt, just for this very reason.

7. "Sauron himself would go to Mt. Doom to intercept the Ringbearer."

The question here is, how would Sauron traverse the roughly 50 miles between Barad-dûr and Mt. Doom in time to stop the Ringbearer?

If Sauron were on foot or even on horse, he would have no chance of overtaking the eagles. If he were on a winged mount such as that used by the Nazgûl, he'd be up against the same problems as those discussed above in connection with the Nazgûl.

At least one writer on r.a.b.t. suggested that Sauron might himself be able to fly. The only place in Tolkien's writings where we see Sauron fly is way back in the First Age, when he changes himself into a bat to fly away from Lúthien (Silmarillion, 212). Whether Sauron could still change into other forms at the end of the Third Age is a subtle question. We know that his powers are greatly reduced over what they previously were, and we also know that he has lost at least some of his shape-shifting ability; i.e. he cannot put on a fair form any longer. My view would be that there is nothing to support the suggestion that Sauron is able to change into a flying form in the late Third Age. If he could, we would expect him to have done so when Frodo put on the Ring in Sammath-Naur.

8. "The Valar would prohibit the eagles from such a direct intervention against Sauron."

I am surprised that this argument comes up as often as it does, because I am aware of no textual support for this idea. The eagles quite frequently involve themselves in the fight against Sauron (or against evil in general):

  • They rescue Bilbo, Thorin, & Co. from the orcs and wolves.
  • They participate in the Battle of Five Armies.
  • They rescue Gandalf from Orthanc.
  • They rescue Gandalf again from Zirak-Zigil.
  • They directly attack the flying Nazgûl during the last battle.
  • They fly into Mordor to rescue Frodo and Sam.

Given all this heavy involvement, it would be extremely surprising if the Valar specifically prohibited the eagles from flying the Ringbearer into Mordor. Tolkien nowhere mentions such a prohibition.

The only support I can see for this argument is very indirect: namely, that the eagles are said to be the representatives of Manwë, and in the Third Age, Manwë is maintaining a policy of the Valar not intervening directly in the affairs of Middle-Earth. But the eagles do often intervene in the struggles of Middle-Earth, and there's no indication that they were under some restriction in this case. If the eagles were prohibited from being involved directly in the struggle against Sauron, we might expect that they would have withdrawn to Valinor long ago rather than remain in Middle-Earth.

9. "The hobbits had a special resistance to the Ring, but the eagles did not."

I'm aware of nothing in the text which would suggest that an eagle could not resist the Ring long enough to make the flight into Mordor. Eagles are said to be sturdy creatures. If they're bold enough to attack the flying Nazgûl (and there are very few in Middle-Earth who can stand up to the Nazgûl), I find it hard to believe that they would fall thrall to the Ring so quickly.

Later comment:

On other web pages, two separate people responded to this point.

One person pointed out that being "sturdy" and "bold" does not necessarily make you particularly resistant to the Ring. After all, Boromir was certainly sturdy and bold, but he eventually yielded to his desire to take the Ring after travelling with Frodo. I have to agree with this point.

Perhaps "strength of character" would be a better choice of words. Tolkien sets up a clear contrast between the moral character of Boromir and of Faramir (Boromir, according to Faramir, had been impatient that his father is steward not king; Boromir clearly desires the Ring upon first seeing it; and in the end Boromir fails to resist the temptation of the Ring. Faramir, by contrast, rejects the Ring even when there is nothing to stop him from taking it).

We don't see any instance in LotR where an eagle is faced with this kind of moral crisis, so we can't make any firm conclusions one way or the other about strength of character among eagles. But this absence of information again makes my point: Tolkien did not include any specific information in the text to rule out the "eagles" plan. Tolkien does not tell us that the eagles have a weaker strength of character more like that of Boromir, and not a stronger one like that of Aragorn, Gandalf, Faramir, or Galadriel.

Somebody else wrote the following:

Not mentioned is my favorite objection, which is that Gwaihir, the Lord of the Eagles, is ... a being of great power, and as such should not be trusted carrying the One Ring, even indirectly. The corrupting strength of the Ring is clearly stronger as one approaches Mordor--Sam and Frodo both understand that wearing the Ring within Mordor would be catastrophic. In Tolkien's universe, power calls to power, and there is every reason to believe that the Lord of the Eagles would fall completely under the spell of the Ring as he approached Mt. Doom.

As I mention elsewhere on this page, Tolkien doesn't tell us exactly how long it takes for Gwaihir and the other eagles to fly from the Black Gate to Mt. Doom to rescue Frodo and Sam, but I would guess that it could not be more than an hour or so. The Ring becomes stronger as it nears Mt. Doom, but could even this strengthened Ring wholly take over the will of an eagle in as little as an hour? Tolkien doesn't give us the information to answer this question one way or the other (thus, cannot say that he has ruled out the "eagles" plan on these grounds).

However, I would be very surprised if this were so. There is no instance in the text where the Ring takes control of anyone's will this quickly (even taking into consideration that the Ring was not as strong earlier in the story). Powerful individuals such as Gandalf and Aragorn travel with the Ringbearer over a period of months without being corrupted by it.

A further point is this. When Sam carries Frodo on his back, he is surprised that Frodo is unexpectedly light: "...he had expected to share in the dreadful dragging weight of the accursed Ring. But it was not so." (III, 268). At least with regard to weight, the Ring affects the Ringbearer much more than the one carrying the Ringbearer. It is not unreasonable to speculate that this is true not only of mere weight, but also of the degree to which the Ring affects the will. In any case, I think it is far from obvious that the Ring would be able to entirely take over the will of the eagle carrying Frodo in as little as an hour or so.

10. "The eagles only participate in the struggle against evil when they choose to."

We know that it is possible to ask favors of the eagles. Radagast asks the eagles for help, leading inadvertently to the rescue of Gandalf from Orthanc. Gandalf asks the eagles to fly to Mt. Doom to rescue Frodo and Sam. Galadriel is actually said to be able to command the eagles:

"Do not let me fall!" I gasped, for I felt life in me again. "Bear me to Lothlórien!" "That is indeed the command of the Lady Galadriel who sent me to look for you, he answered." (II, 135)

11. "The Ring became heavier and more powerful as it came closer to Mt. Doom. If the eagles had carried Frodo in, he would not have had time to build up the strength of will to destroy the ring."

Indeed, Frodo does change and grow over time as a result of the various trials he undergoes. There are numerous references which make this clear. Some of these injuries weakened him (such as the Nazgûl's knife injury to his shoulder), but I think I would agree that Frodo became better able to resist the Ring over time.

On the other hand, it also appears that the effects of a ring of power upon its bearer are cumulative over time. The Nazgûl, for example, did not become better able to resist the domination of Sauron the longer they bore their rings; rather, as time went on, they faded into wraiths, coming completely under the domination of their rings. Consider also the discussion of the effects of the Ring on Sméagol and on Bilbo; it appears that that the effect was cumulative. I think that a good case can be made that the longer Frodo bears the Ring, the more the Ring eats into his mind and will.

So there are two opposing factors here: Frodo becomes stronger over time; but the longer he bears the Ring, the more it works upon him. We don't have any precise knowledge of how the two stacked up against each other, and there is no reason to suppose that the wise had such knowledge, either. At best, this argument appears to be a draw. Therefore, I doubt that this consideration would have greatly affected the decision made at the Council of Elrond.

For reference, here are some dates of major events:

  • September 22, 3001: Ring passes to Frodo after Bilbo's farewell feast.
  • December 25, 3018: Fellowship departs from Rivendell
  • February 26, 3019: Breaking of the fellowship
  • March 5: Frodo hides near the Black Gate.
  • March 25: Destruction of the Ring at Mt. Doom

Suppose we take March 5 as the date where Frodo might have made his rendezvous with the eagles north of the Ered Lithui. If the Ring were destroyed on this same day, Frodo would have had only 20 days less to either become stronger or weaker, depending on which of the two forces is greater. Would a mere 20 days make much difference in either direction, out of the 17 years where Frodo bore the Ring? Frodo might have been strengthened by his terrible journey into Mordor, but it was in these 20 days that the Ring was at its strongest because of its proximity to Mt. Doom, and arguably, it was best able to work on Frodo's will during this time. I think that there are just too many uncertainties here for it to be claimed on these grounds that the "eagles" plan can be ruled out.

12. "Sauron is a powerful Maia, and it's reasonable to assume that he has powers which we aren't told about which he could use against the eagles."

Here we get down to brass tacks about what is meant by "a hole in the plot".

It is probably true that not all of Sauron's powers are explicitly enumerated in LoTR or elsewhere. For example, we can imagine (as one writer on r.a.b.t. suggested) that Sauron could throw fireballs at the eagles.

My point, however, is that we aren't told of any such powers. My question is not what fan-fiction we can add to the story to rule out the "eagles" plan; my question is what Tolkien has written which rules it out. Once he has placed the eagles in the world of his sub-creation, the possibility of the "eagles" scenario is open, and so far as I am aware, there is nothing in Tolkien's writing to rule it out. For this reason, I am calling it a hole in the plot.

Discussion

To mind, the strongest argument that there is nothing to rule out the "eagles" plan, and that this is simply a hole in the plot, is that the matter is not discussed at the Council of Elrond. Every possible plan is discussed: sending the Ring to Tom Bombadil to keep, guarding it in Imladris or Lórien or the Havens, sending it across the ocean, dropping it into the ocean, using it, etc. In each instance, there is a good explanation given to rule out the plan; this is the literary device by which Tolkien sets up the quest to Mt. Doom as the direction which the story must take.

In all of this discussion, no mention is made of the possibility that the eagles could help in taking the Ring to Mt. Doom. If Tolkien wanted to rule out the possibility, this would be the perfect opportunity to do it, by inserting dialog such as the following around pages I 348-9:

"Then," said Glorfindel, "let us send messages to the eagles, and then pass by foot and boat to the Brown Lands, and meet there with the eagles, who shall fly with the Ringbearer to Orodruin." "Nay," said Gandalf. "For the Valar have prohibited the eagles from participating so directly in the downfall of the Dark Lord." OR: "Nay," said Gandalf. "For I feel in my heart that the creature Gollum has yet some role to play, and he will not be able to do so if we fly with the eagles into the Dark Land." OR: "Nay," said Gandalf. "For the Dark Lord is capable of throwing fire over many miles, and he would be able to stop the eagles from their flight."

Since Gandalf had just related his rescue from Orthanc just prior to the discussion of the various possible plans, the eagles would have been in the thought of everybody at the Council of Elrond, and it is very likely that somebody would have brought the possibility up. But they do not, and I think there are two possible explanations: 1) the possibility never occurred to Tolkien, or 2) Tolkien realized he had a problem and opted not to draw attention to it. In either case, the matter should be counted as a hole in the plot.

In connection with the Council of Elrond, it should be noted that nobody present knew that the Nazgûl would be remounted on flying steeds. Knowing what they knew then, it is very likely that they would have attempted an eagle flight into Mordor, not knowing that they would encounter the flying Nazgûl. In this case, the quest might have failed, but this would simply be the outcome of the characters acting on what they knew at the time. Once again, the fact that this would make a poor story does not solve the story-internal problem.

Some of the risks brought up in objection to the "eagles" plan are legitimate concerns. However, the path into Mordor on foot was also extremely risky, and from the perspective of those sitting at the Council of Elrond, the "eagles" plan was not obviously much more risky.

In creating a world, it is extremely difficult to get everything to harmonize just right, and even Tolkien doesn't do it perfectly. There are at least a few other instances which I'm aware of: there is a footnote in Unfinished Tales where Christopher Tolkien points out the hole in the plot where the water-fearing Nazgûl could not have gotten to the Shire without crossing the bridgeless Greyflood; and Tolkien himself admits that the idea of the Nazgûl fearing water was "difficult to sustain". There is also the case where Saruman imprisons Gandalf, but inexplicably does not attempt to take the Ring of Fire from Gandalf, even tho Saruman coveted the Ring and begrudged the fact that Cirdan had given it to Gandalf (Unfinished Tales, 389-90). Even Tolkien, arguably the best fantasy writer to have ever lived, doesn't get it right 100% of the time.

Read the whole story
markcf
4276 days ago
reply
Share this story
Delete

The Zeigarnik Effect and Quest Logs

11 Comments and 24 Shares

What do waiters in a 1920s Venetian restaurant and today’s average role-playing game fan have in common? They both tend to remember what they have yet to finish.

Sometime during the 1920s, Russian psychologist Bulma Zeigarnik was sitting in an Austrian restaurant (or maybe German; accounts differ) when she noticed something peculiar: waiters displayed an unusual ability to remember complex orders while they were being filled, allowing them to deliver the right combination of food to the right tables. But oddly, that information vanished from memory as soon as the eats were put in place (or maybe it was after the bill was paid; again, accounts differ). It didn’t seem to have much to do with sustained mental effort or chanting the incomplete orders under their breath to hold them in short-term memory. Instead, the orders that hadn’t yet been filled just seemed to nag at the waiters’ minds until they were checked off as complete.

Back in her lab, Zeigarnik pursued this idea and ran some experiments (Zeigarnik, 1927) involving the completion of various tasks or puzzles. Some of the subjects performing the tasks were interrupted, then everyone was asked to describe what tasks they had done. Like the waiters remembering what orders still needed to go to what tables, subjects were far more likely to recall the tasks they had started but hadn’t completed.

This “Zeigarnik effect” subsequently entered the psychology lexicon to describe how we tend to find it easier to recall a task –and the details surrounding it– when we feel like we have begun to undertake it, but been unable to complete it. Apparently we as humans don’t like it when we begin something and don’t finish it, and such circumstances create an internal tension and preoccupation with the task. Completing the task provides closure, release of the tension, and –not to put too technical a term on it– goodie feelie type feels.

Okay, before I leave this area I need to ...ah man. That's a lot of stuff!

When I played Skyrim, this is all I could picture at night when trying to go to sleep.

And we see this all the time in games, particularly role-playing games where in-game journals get crammed full of unfinished quests, errands, and tasks. Ever wring your hands over a huge list of incomplete quests or feel hesitant to progress the main quest until all those little side missions are checked off? To see the effect in action the next time you play a RPG try at the end of your gaming session to recall as many open quests as you can relative to completed quests.

And MMOs like World of Warcraft are the worst with this stuff, as anyone who has collected 13 out of 14 Goretusk livers can attest. Once we begin one of these tasks, they hang around in the back of our mind and are much easier to recall than completed tasks. Researchers Scott Rigby and Richard Ryan specifically call out the Zeigarnik effect in their book Glued to Games: How Video Games Draw Us In and Hold Us Spellbound:

MMOs are designed so that your list of tasks is never done. No sooner do you complete one, then two more pop up to take its place. Like a digital game of whack-a-mole, accomplishment only brings more unfinished business. As soon as you finish or “turn in” a quest, you are immediately offered another one with an even bigger reward. Or perhaps completion of one “unlocks” the opportunity to receive many new quests at once. Quests are often linked together in a series that helps move a story along, but never provides much closure. If I need to find 12 jewels to complete my quest, I will not stop at 11.

We also see this happen in empire building game series like Sim City or Civilization. The “just one more turn” is a direct result of the Zeigarnik effect, since that one more turn is almost always in the service of completing some structure, upgrade, technology, or conquest.

Familiar with the "just one more turn" phenomenon? Isn't it funny how it usually happens because you're waiting for some upgrade to finish?

Familiar with the “just one more turn” phenomenon? Isn’t it funny how it usually happens because you’re waiting for some upgrade to finish?

And researchers have continued to study the Zeigarnik effect and refine models associated with it. Schiffman and Greist-Bousquet (1992), for example, found that people over-estimated how long they spent on interrupted tasks, even when the time spent was the same as completed tasks (probably compounded by the availability heuristic, which causes us to overestimate how big or frequent something is based on how easy it is to recall examples of it). Other researchers have noted how the Zeigarnik effect isn’t completely reliable and have explored moderating factors like how motivated people are to do the task (e.g., Reeve, Cole, & Olson 1986), the nature of the interruption, or task difficulty.

But regardless of whether the effect shows up every time a task is interrupted, it does often happen. The next time you find yourself thinking “just two more turns until this research is complete” or “I just need to kill the trolls to make this quest log entry go away” remember Bulga Zeigarnik and her waiters filling orders for hot dogs and waffles. Or something. I honestly don’t know what they eat in Austria.

Reeve, J., Cole, S., and Olson, B. (1986). The Zeigarnik Effect and Intrinsic Motivation: Are They The Same? Motivation and Emototion, 10(3), 233-245.

Rigby, S. and Ryan, R. (2011). Glued to Games: How Video Games Draw Us In and Hold Us Spellbound. Santa Barbara, California: Praeger.

Schiffman, N., Greist-Bousquet, S. (1992). The effect of task interruption and closure on perceived duration. Bulletin of the Psychometiric Society, 30 (1), 9-11.

Zeigarnik, B. (1927). Uber das Behalten yon erledigten und underledigten Handlungen. Psychologische Forschung, 9, 1-85.

Read the whole story
markcf
4277 days ago
reply
popular
4277 days ago
reply
Share this story
Delete
10 public comments
fivemetalshrike
4264 days ago
reply
This is the reason I don't finish a lot of RPGs, heh. I can't progress until my list is empty.
Philadelphia, PA, USA
jslade
4265 days ago
reply
Interesting read.
Newfoundland, Canada
oliverzip
4267 days ago
reply
why it's easier to recall a task you have to do, than a task you have done.
Sydney, Balmain, Hornsby.
aorage
4268 days ago
reply
I'm guilty of this each time I step away from a session of LOTRO.
Decatur, GA
nampuom
4268 days ago
reply
Надо будет почитать про http://www.psychwiki.com/wiki/Zeigarnik_Effect
WorldMaker
4277 days ago
reply
I've been growing some sort of allergic reaction to this, I think. Something to do with the humongous pile of back log games and projects I've been accumulating.
Louisville, Kentucky
skorgu
4277 days ago
reply
I appear to be nearly immune to this.
smadin
4277 days ago
reply
This is clearly an effect that's stronger with some people than with others, too.
Boston
anonymous_bw
4268 days ago
I agree, I enjoy having tasks to do, if we didn't have them after awhile the game wouldn't be as interesting. Mind-set has to be more relaxed about "to-do" lists
Courtney
4277 days ago
reply
so THIS is why I need to stay the fuck away from WoW! neat, it has a name.
Portland, OR
mwclarkson
4278 days ago
reply
Interesting.
Providence RI USA

What does randomness look like?

6 Comments and 12 Shares

800px-V-1_cutaway

On 13 June 1944, a week after the allied invasion of Normandy, a loud buzzing sound rattled through the skies of battle-worn London. The source of the sound was a newly developed German instrument of war, the V-1 flying bomb. A precursor to the cruise missile, the V-1 was a self-propelled flying bomb, guided using gyroscopes, and powered by a simple pulse jet engine that gulped air and ignited fuel 50 times a second. This high frequency pulsing gave the bomb its characteristic sound, sound, earning them the nicknamebuzzbombs.

From June to October 1944, the Germans launched 9,521 buzzbombs from the coasts of France and the Netherlands, of which 2,419 reached their targets in London. The British worried about the accuracy of these aerial drones. Were they just falling haphazardly over the city, or were they hitting their intended targets? Had the Germans really worked out how to make an accurately targeting self-guided bomb?

Fortunately, they were scrupulous in maintaining a bomb census, that tracked the place and time of nearly every bomb that was dropped on London during World War II. With this data, they could statistically ask whether the bombs were falling randomly over London, or whether they were targeted. This was a math question with very real consequences.

Imagine, for a moment, that you are working for the British intelligence, and you’re tasked with solving this problem. Someone hands you a piece of paper with a cloud of points on it, and your job is to figure out if the pattern is random.

Let’s make this more concrete. Here are two patterns, from Steven Pinker’s book, The Better Angels of our Nature. One of the two patterns is randomly generated. The other imitates a pattern from nature. pattern imitates a naturally forming pattern. Can you tell which is which?

pinker-glow-worms-and-stars-plot

Thought about it?

Here is Pinker’s explanation.

The one on the left, with the clumps, strands, voids, and filaments (and perhaps, depending on your obsessions, animals, nudes, or Virgin Marys) is the array that was plotted at random, like stars. The one on the right, which seems to be haphazard, is the array whose positions were nudged apart, like glowworms

That’s right, glowworms. The points on the right records record the positions of glowworms on the ceiling of the Waitomo cave in New Zealand. These glowworms aren’t sitting around at random, they’re competing for food, and nudging themselves away from each other. They have a vested interest against clumping together.

Update: Try this out for yourself. After reading this article, praptak and roryokane over at hacker news wrote a script that will generate random and uniform distributions in your browser, nicely illustrating the point.

Try to uniformly sprinkle sand on a surface, and it might look like the pattern on the right. You’re instinctively avoiding places where you’ve already dropped sand. Random processes have no such prejudices, the grains of sand simply fall where they may, clumps and all. It’s more like sprinkling sand with your eyes closed. They key difference is that randomness is not the same thing as uniformity. True randomness can have come with clusters, like the constellations that we draw into the night sky.

Here’s another example. Imagine a professor asks her students to flip a coin 100 times. One student diligently did the work, and wrote down their results. The other student is a bit of a slacker, and decided to make up fake coin tosses instead of doing the experiment. Can you identify which student is the slacker?

Student 1:

THHHTHTTTTHTTHTTTHHTHTTHT

HHHTHTHHTHTTHHTTTTHTTTHTH

TTHHTTTTTTTTHTHHHHHTHTHTH

THTHTHHHHHTHHTTTTTHTTHHTH

Student 2:

HTTHTTHTHHTTHTHTHTTHHTHTT

HTTHHHTTHTTHTHTHTHHTTHTTH

THTHTHTHHHTTHTHTHTHHTHTTT

HTHHTHTHTHTHHTTHTHTHTTHHT

Take a moment to reason this through.

The first student’s data has clusters – long runs of up to eight tails in a row. This might look surprising, but it’s actually what you’d expect from random coin tosses (I should know – I did a hundred coin tosses to get that data!) The second student’s data in suspiciously lacking in clusters. In fact, in a hundred coin tosses, they didn’t get a single run of four or more heads or tails in a row. This has about a 0.1% a 0.01% chance of ever happening, suggesting that the student fudged the data (and indeed I did).

Image by Scott Adams.

Trying to work out whether a pattern of numbers is random may seem like an arcane mathematical game, but this couldn’t be further from the truth. The study of random fluctuations has its roots in nineteenth century French criminal statistics. As France was rapidly urbanizing, population densities in cities began to shoot up, and crime and poverty became pressing social problems.

371px-Adolphe_Quételet_by_Joseph-Arnold_Demannez

In 1825, France began to collect statistics on criminal trials. What followed was perhaps the first instance of statistical analysis used to study a social problem. Adolphe Quitelet was a Belgian mathematician, and one of the early pioneers of the social sciences. His controversial goal was to apply probability ideas used in astronomy to understand the laws that govern human beings.

In the words of Michael Maltz,

In finding the same regularity in crime statistics that was found in astronomical observations, he argued that, just as there was a true location of a star (despite the variance in the location measurements), there was a true level of criminality: he posited the construct of l’homme moyen (the “average man”) and, moreover, l’homme moyen moral. Quetelet asserted that the average man had a statistically constant “penchant for crime,” one that would permit the “social physicist” to calculate a trajectory over time that “would reveal simple laws of motion and permit prediction of the future” (Gigerenzer et al, 1989).

Quitelet noticed that the conviction rate of criminals was slowly falling over time, and deduced that there must be a downward trend in the “penchant for crime” in French citizens. There were some problems with the data he used, but the essential flaw in his method was uncovered by the brilliant French polymath and scientistSiméon-Denis Poisson.

Simeon_Poisson

Poisson’s idea was both ingenious and remarkably modern. In today’s language, he argued that Quitelet was missing a model of his data. He didn’t account for how jurors actually came to their decisions. According to Poisson, jurors were fallible. The data that we observe is the rate of convictions, but what we want to know is the probability that a defendant is guilty. These two quantities aren’t the same, but they can be related. The upshot is that when you take this process into account, there is a certain amount of variation inherent in conviction rates, and this is what one sees in the French crime data.

In 1837, Poisson published this result in “Research on the Probability of Judgments in Criminal and Civil Matters“. In that work, he introduced a formula that we now call the Poisson distribution. It tells you the odds that a large number of infrequent events result in a specific outcome (such as the majority of French jurors coming to the wrong decision). For example, let’s say that on average, 45 people are struck by lightning in a year. Feed this in to Poisson’s formula, along with the population size, and it will spit out the odds that, say, 10 people will be struck by lightning in a year, or 50, or a 100. The assumption is that lightning strikes are independent, rare events that are just as likely to occur at any time. In other words, Poisson’s formula can tell you the odds of seeing unusual events, simply due to chance.

By Randall Munroe

One of the first applications of Mr. Poisson’s formula came from an unlikely place. Leap sixty years ahead, over the Franco-Prussian war, and land in 1898 Prussia. Ladislaus Bortkiewicz, a Russian statistician of Polish descent, was trying to understand why, in some years, an unusually large number of soldiers in the Prussian army were dying due to horse-kicks. In a single army corp, there were sometimes 4 such deaths in a single year. Was this just coincidence?

A single incidence of death by horse kick is rare (and assumedly independent, unless the horses have a hidden agenda). Bortkiewicz realized that he could use Poisson’s formula to work out how many deaths you expect to see. Here is the prediction, next to the real data.

Number of Deaths by Horse Kick in a year Predicted Instances (Poisson) Observed Instances
0 108.67 109
1 66.29 65
2 20.22 22
3 4.11 3
4 0.63 1
5 0.08 0
6 0.01 0

See how well they line up? The sporadic clusters of horse-related deaths are just what you would expect if horse-kicking was a purely random process. Randomness comes with clusters.

By Ryan North

I decided to try this out for myself. I looked for publicly available datasets for deaths due to rare events, and came across the International Shark Attack File, that tabulates worldwide incidents of sharks attacking people. Here’s the data of shark attacks in South Africa.

Year Number of Shark Attacks in South Africa
2000 4
2001 3
2002 3
2003 2
2004 5
2005 4
2006 4
2007 2
2008 0
2009 6
2010 7
2011 5

The numbers are fairly low, with an average of 3.75. But compare 2008 and 2009. One year has zero shark attacks, and the next has 6. And then in 2010, there are 7. You can already imagine the headlines crying out, “Attack of the sharks!“. But is there really a shark rebellion, uprising, or would you expect to see these clusters of shark attacks due to chance? To find out, I compared the data to Mr. Poisson’s prediction.

shark_attacks_south_africa

“Anyone else see the shark fin?” Nice catch, by @Gareth_Elms

In blue are the observed counts of years with a 0,1,2,3.. shark attacks. For example, the long blue bar represents the 3 years in which there were 4 shark attacks (2000, 2005 and 2006). The red dotted line is the Poisson distribution, and it represents the outcomes that you would expect if the shark attacks were a purely random process. It fits the data well – I found no evidence of clustering beyond what is expected by a Poisson process (p=0.87). I’m afraid this rules out the great South African shark uprising of 2010. The lesson, again, is that randomness isn’t uniform doesn’t mean uniformity .

Which brings us back to the buzzbombs. Here’s a visualization of the number of bombs dropped over different parts, reconstructed by Charles Franklinusing the original maps in the British Archives in Kew.

london buzzbomb distribution

Note: A clarification. The plot above shows the distribution of bombs that were dropped over London. The question I’m asking is, if you zoom in to the part of the city most heavily under attack (essentially the mountain that you see in the figure above), are the bombs being guided more precisely, to hit specific targets?

It’s far from a uniform distribution, but does it show evidence of precise targeting? At this point, you can probably guess how to answer this question. In a report titled An Application of the Poisson Distribution, a British statistician named R. D. Clarke wrote,

During the flying-bomb attack on London, frequent assertions were made that the points of impact of the bombs tended to be grouped in clusters. It was accordingly decided to apply a statistical test to discover whether any support could be found for this allegation.

Clarke took a 12 km x 12 km heavily bombed region of South London, and sliced it up in to a grid. In all, he divided it into 576 squares, each about the size of 25 city blocks. Next, he counted the number of squares with 0 bombs dropped, 1 bomb dropped, 2 bombs dropped, and so on.

In all, 537 bombs fell over these 576 squares. That’s a little under one bomb falling per square, on average. He plugged this number into Poisson’s formula, to work out how much clustering you would expect to see by chance. Here’s the relevant table from his paper:

poisson table buzzbombs

Compare the two columns, and you can see how incredibly close the prediction comes to reality. There are 7 squares that were hit by 4 bombs each - but this is what you would expect by chance. Within a large area of London, the The bombs weren’t being targeted. They rained down at random in targeted, it was more like a devastating, city-wide game of Russian roulette.

The Poisson distribution has a habit of creeping up in all sorts of places, some inconsequential, and others life-altering. The number of mutations in your DNA as your cells age. The number of cars ahead of you at a traffic light, or patients in line before you at the emergency room. The number of typos in each of my blog posts. The number of patients with leukemia in a given town. The numbers of births and deaths, marriages and divorces, or suicides and homicides in a given year. The number of fleas on your dog.

From mundane moments to matters of life and death, these Victorian scientists have taught us that randomness plays a larger role in our lives than we care to admit. Sadly, this fact offers little consolation when the cards in life fall against your favor.

“So much of life, it seems to me, is determined by pure randomness.” - Sidney Poitier

References

Shark attacks and the Poisson approximation. A nice introduction to using Poisson’s formula, with applications including the birthday paradox, one of my favorite examples of how randomness is counter-intuitive. applications.

From Poisson to the Present: Applying Operations Research to Problems of Crime and Justice. A good read about the birth of operations research as applied to crime.

Applications of the Poisson probability distribution. Includes a list of many applications of the Poisson distribution.

Steven Pinker’s book The Better Angels of our Nature has many great examples of how our intuition about randomness is generally wrong.

Want to know more about the accuracy of the flying bombs? The story is surprisingly rich, involving counterintelligence and espionage. Here’s a teaser.

Read the whole story
markcf
4347 days ago
reply
popular
4348 days ago
reply
Share this story
Delete
5 public comments
ibloom
4347 days ago
reply
Historical use of statistics Poisson distribution
Bethesda, MD. USA
sredfern
4348 days ago
reply
Let me tell you about my raging maths hard-on right now.
Sydney Australia
samuel
4348 days ago
reply
This is so, so good. Random doesn't look random.
Cambridge, Massachusetts
supine
4348 days ago
Cue discussion on "how 'random' is the iTunes shuffle feature?" Sigh.
gazuga
4349 days ago
reply
I've dived afternoons away between the archives of this blog and Johannes Koelman's Hammock Physicist. The world needs more science writing like this.
Edmonton