text:
Muggles' Guide to Harry Potter/Books/Deathly Hallows/Characters

Development
Throughout the series, there is continual character development that begins in earnest in the fourth year (Harry Potter and the Goblet of Fire), the year deeper emotions emerge in each character, and particularly the three main heroes. That Harry is not inherently bent toward evil is well established in the fifth year (Harry Potter and the Order of the Phoenix). However, in the final book, Harry is fully humanized, being more than the "good" hero, but also a person with a full range of emotions, even selfishness. For adolescence, this includes love interests that are increasingly complicated, awareness of the lines that blur good and evil. Sometimes things aren't completely black and white, which leads to growth and clarity of one's views of others (especially those whom one has idolized).

As an example, Dumbledore is viewed as "good" throughout the series, but throughout Harry Potter and the Deathly Hallows, and by his own admission in King's Cross, he is seen as capable of "evil" choices too. Putting the search for the Hallows above his family, which ended in his sister's death, cost him dearly in terms of his own view of self, his relationship with his brother, and his awareness of his own limitations on possessing power.

Harry takes a similar journey through temptation. Like "real people in real life," it is only in Harry's being presented with the option to selfishly seek and possess power through the Hallows, or to willingly make his desires subordinate to the needs of others, that he becomes fully matured. Horcruxes or Hallows? Hallows or Horcruxes? The question perplexes Harry for a time. Should he choose what is easy or what is good? What is good or what is evil? What is beneficent or what is selfish? Power or purpose? Harry could not mature, nor could he or anyone else know who he truly was as a person, until he faced this personal trial and triumphed over the temptation in order to live out the actions that define him as ultimately good. Harry must complete the mission he has been given regarding the Horcruxes, and ultimately Voldemort, (which, per the prophecy, only he is capable of finishing) in order to remain selfless and "good."

There is less to say about Hermione and Ron with regard to character development, but we do have a chance in this final book to see each of them experience opportunities to take on the responsibility of leadership. Interestingly, Ron also has to deal with the same "coming of age" realizations that have been described about Dumbledore and Harry above. He has, to this point, believed that Harry "had the answers." Thus, he must also confront who the friend he has idolized really is; Harry is a human boy with some great talent and exceptional luck, but who still lacks understanding for things that have not been revealed to him.

Here, Hermione is able to display not only her academic knowledge, but also her insights into people, relationships (except when it comes to Ron), and emotions. From this view, it is easy to see why Hermione was not disillusioned by the "real" Harry, since she has already had to bail him out before with the knowledge he lacked, and spent previous encounters explaining to the boys why girls, boys, and people in general do some of the things they do. Quite apart from the physical (the author has told us her birthday falls in September, making her six months older than Ron and ten months older than Harry), she is emotionally more mature from the start than either Harry or Ron, because she grasps who they are, has grace for their weaknesses, and has a clear view of her role in their relationships and common mission. She only loses sight of this for a couple of weeks, as she grieves Ron's walking out on them, but recovers enough to take the lead while Harry is engaged in his own aforementioned struggle to come of age and enter adulthood.

Three aspects of each characters' development empower Harry's and his comrades' triumph of good over Voldemort's and his Death Eaters' evil:

 * 1) Love - it provides power and courage (to Harry and the rest) that Voldemort has never known, a selfless purpose for fighting to win, and is even able to protect others through powering "ancient magic".
 * 2) Wisdom - is also a weakness of Voldemort, and a strength that Harry can tap into with the help of those around him. He does not come to it completely alone, but in the end is able to connect all the dots, as Dumbledore did. Yet Harry establishes his own identity and even a bit of authority by bringing the crayons along to colour in the picture. We are not discussing mere information or knowledge, but a depth of understanding that digs deeper, to get past the "how?" of things and straight to the "why?". This is what saves Harry in the end: he truly grasps the full meaning of the prophecy, his role and why it is his, why Voldemort is weak in this area, and the implications of not only the connection between their wands, but the also the blood they share (since Voldemort stole a few drops when he regained his body), and thus, why he will be able to defeat Voldemort and live (more on this here) . A second aspect of wisdom, which Harry, Ron, and Hermione will come to accept is that things are not always as they seem. Nothing is black and white, nor easily interpreted. Dumbledore didn't die because of someone else's choices, but due to his own greed and actions. Snape was not the consummate evil character always searching for a means to betray or destroy them all in support of Voldemort. He was, in fact, motivated to protect Harry by his unrequited love for Lily Potter: a choice made consistently in the face of the pain it caused him by Harry's constant reminders, physically both by his similarity to his father, reminding Snape of his father's character who inflicted humiliation and suffering upon Snape, and his constant reminder of Lily because he had Lily's eyes. Similarly, Harry's good father was capable of being a cruel bully, his mother of befriending a Slytherin, etc.
 * 3) Selflessness - One might be tempted to attach this to love, and indeed love is often the motivation, but there is still a point at which it is a separate issue. One must take action, and do something externally that demonstrates their internal choices. Harry triumphs over his personal desires for the Hallows, and pursues the Horcruxes instead. Ron triumphs over his disillusionment and anger and sacrifices his own pride (ego) to rejoin his companions on the mission and catalyze them back into action. Hermione, at the crucial juncture, puts the needs of the mission, Harry, and the many that it will save before her desire for a relationship and connection with Ron. They all prove themselves capable of being selfless, as do the members of the Order of the Phoenix, and of Dumbledore's Army, (like Neville, who winds up a hero in his own right) and all those who stand to fight for what is good rather than settle for what is easy. Harry, in the end, must willingly choose to lay down his life, and in so doing actually ensures his comrades' safety and his own survival (more on this here).

According to the author, a key event in Harry's maturation occurs in Harry Potter and the Deathly Hallows. Up until that time, he has basically reacted, going where he was led, with one apparent exception: he chose to attempt to protect the Philosopher's Stone, with assistance from Ron and Hermione, as early as the first book. It could be argued that he was led to that decision by circumstance, as evidence had been dragged under his nose that someone was after the Stone, and there was no adult who seemed willing to accept that evidence; but it was debatable whether he had actually made a wise choice. Apart from that, throughout the series up until the episode at Shell Cottage, Harry acts either as he is instructed to act, or in a way that places him directly between Voldemort and his goals, as best Harry understands them. In the events at Shell Cottage, though he finally understands that Voldemort wants the Elder Wand and is about to get it, Harry refuses to enter the race, instead speaking with Ollivander about wand lore, and with Griphook about Gringotts Bank, in order to work around Voldemort's plans instead of trying to face him head on. From that point on, Harry heads in his own direction, largely unsteered by what Voldemort is doing. Whether that can be classed as "development" or not is uncertain; it does seem to be a clear maturation.

Any discussion of maturation on Harry's part must finally include the penultimate confrontation between Harry and Voldemort. Harry has learned through Snape's memories that Harry's fate is to be killed by Voldemort. While the prospect fills him with fear, he yet moves towards his doom, aware that his own death should protect those he cares about (the defenders of Hogwarts) from further injury at Voldemort's hand. It is his choice to make that sacrifice, and it is a hard one; yet he chooses the path of sacrifice, rather than running away from it as he has in earlier books.


text:
Muggles' Guide to Harry Potter/Books/Deathly Hallows/Analysis

Overall
A major point in the final book is the completion of the greater picture, which Rowling finesses better than anyone speculated. The major issues are the dual-core phoenix wands, the Elder Wand, the soul tie or mind connection, the shared blood, and Voldemort's demise and Harry's survival in light of the prophecy about them both. Each aspect has a clue in the past history of the series, which plays into the larger picture of the completion of the full plot at the end:

 * 1) First, since previous books have confirmed its contents and truthfulness, the Prophecy gives the framework around which everything must fit. "Either must die at the hand of the other, for neither can live while the other survives," has to be finished, and Harry was already marked by Voldemort as the person to whom the prophecy refers. Their two wands' dual core connection is explained by Dumbledore in the King's Cross chapter, but it should be added that since Voldemort had used Harry's blood in his restoration, prior to the duel that led to the "Priori Incantatem" effect, both wands would have recognized the other wizard as both kin and owner. Thus, Voldemort tries a different wand (Lucius Malfoy's), but lacks the wisdom to grasp the full implication of its failure (Harry finally gets it, and it is truly on his own, because he makes the connections once the flaws in Dumbledore's and Voldemort's plans are revealed)... neither of their own wands could have destroyed the other person, making possession of the Elder Wand quite important.
 * 2) This is also a point where both Dumbledore's and Voldemort's plans are flawed. Neither recognized that the Elder Wand would see first Draco and, after Draco's defeat, Harry as its owner. Voldemort thought he could be the owner by killing Snape, who had acted on Dumbledore's wishes to the end (despite the personal cost and risk to himself, even Snape proved to be selfless), and Dumbledore may have failed to recognize Draco's "Expelliarmus" as a "defeat" that potentially transferred ownership of the wand to Draco. While Dumbledore did understand that a wand would transfer its allegiance to the person who removed it by force from its current owner, he was clearly planning to die unchallenged, and thus break the wand's power by leaving no wizard from which one could forcefully capture the wand. As is affirmed, Dumbledore made good guesses, but he often arranged back up in case he, or a situation, went wrong. In this case, Dumbledore likely planned either to be entombed with the wand, or to have the wand given peacefully to Snape; in either case, the wand's power would have died with Draco had Harry not captured Draco's wand.
 * 3) The mind/soul connection between Harry and Voldemort is also brought full circle and explained. From the moment it is first guessed at, to the end of the sixth book, everyone around him, including Harry, is in a hurry to shut this connection down. Even during the final book, he is often cajoled to at least attempt Occlumency although he was never good at it. Ironically, it is this connection that allows Harry access to vital knowledge of Voldemort's actions and plans, and is the means by which he knew Parseltongue, knowledge which helped save his life in Harry Potter and the Chamber of Secrets. As is mentioned in the associated article, it is possible that occlumency would not have worked in any case; it is unknown whether the magic designed to defend one against another wizard trying to retrieve your memories will also work to defend against a wizard attempting to force thoughts and images into your mind, and it is unknown whether it would be possible to defend against images coming from a soul shard attached to one's own soul.
 * 4) "Harry as a Horcrux" was created by Voldemort's carelessness during his first reign of terror. Harry must kill this piece of Voldemort's soul within him without killing himself. Yet, per the prophecy, there is no way around things: either Harry or Voldemort must die, and Harry initially believes that this means he is expected to kill Voldemort. Harry, learning of Voldemort's soul fragment within himself, finally understands he must die in order to defeat Voldemort. Once he dies, what he learns makes sense on several levels. It eliminates the soul fragment within Harry, one of only two remaining soul fragments left to hold Voldemort in this life. This makes Voldemort almost vulnerable, now he is very close to the point where he can actually be killed. Harry has come to understand that the Elder Wand does not owe any allegiance to Voldemort, but can only hope that by capturing Draco's wand, he will appear to the Elder Wand as the wizard who wrested it away from Dumbledore. Voldemort unwittingly makes himself a Horcrux for Harry, although it might not be called that, by taking his blood earlier. In taking Harry's blood to regenerate himself, Voldemort ensures that Harry will not die if Voldemort kills him. The blood ties Harry to Voldemort's life, therefore Harry will live. It is mentioned elsewhere in this book that this protection does not extend to attempts by anyone else to kill Harry; thus we must assume a campaign to make Voldemort reserve Harry's death for himself.

When all is done, Harry is good to the end, for many reasons. His selfless choice to face Voldemort without fighting back ensures the same charm of love his mother gave him, is now given to all of his comrades defending Hogwarts. (As Harry points out, this is probably why the attacks of Voldemort and the Death Eaters won't stick when they come back to Hogwarts with Harry's body.) He chooses not to reunite the Hallows and makes decisions that will hopefully remove their power, except for the cloak. He chooses to come back to the pain in his body and life, rather than take the easy path to join his family in peace, in order to complete the defeat of Voldemort. However, he also chooses to accept and trust the help and vested interests of others, so it is possible that Harry makes the final leap of maturity needed to make a difference... he puts aside his need to be linked to his family of the past (which he could have chosen) in order to bring hope (rather than despair) to his present "family of friends." This final thought is supported by the epilogue of the final chapter that indicates that his godson Teddy, son of Lupin and Tonks, may marry into the family of the friends who have become family comprised of Harry and Ginny, Bill and Fleur, and Ron and Hermione, who are now all related by marriage.

Why did Harry not die?
We should take a moment here to discuss the complexities of the interrelationship between Voldemort and Harry in the last few chapters of the book. It is not immediately clear why Voldemort does not kill Harry, or why Harry does not die when Voldemort does, there being a blood link there.

First, we should look at the wands. While an interrelation between Voldemort's wand and Harry's has been established, and it is mentioned that the events in the cemetery have made Harry's wand proof against anything Voldemort can throw against him, this is discounted by Christmas. At that point, a charm Hermione uses ends up breaking Harry's wand, and it no longer plays a part in the events. Voldemort, not knowing this, abandons his own wand in favour of the Elder Wand of legend. The Elder Wand will not harm Harry because it accepts Harry as its master – contrary to the apparent path through history, it is not murder that defeats the bearer of the wand, but forcible removal of the wand, so the wand became Draco Malfoy's when Malfoy disarmed Dumbledore, and Malfoy was in turn deprived of his own wand by Harry. Harry is careful to check this with Ollivander in Shell Cottage; this is the point where he begins to understand about the Hallows, and starts choosing his own fate accordingly. (It was Malfoy's wand Harry was holding when he defeated Voldemort. Presumably the Elder Wand recognizes the wand that stood against it, possibly in addition to the bearer.) At the same time, Harry cannot be killed by Voldemort because of the blood linkage – as he is using Harry's blood, he provides that protection. Granted, this may seem far-fetched, as Voldemort certainly had Riddle blood in him, but he had murdered Tom Sr. and suffered no ill effects. Then again, Tom Sr. didn't care about Tom Jr., and possibly didn't even know he existed. As what activates the protection, is being willing to die for someone rather than allowing them to be killed, and neither Tom Sr. nor Tom Jr. would die for the other, there was no protection there.

When Harry approaches Voldemort at the end of the book, then, Voldemort's curse knocks Harry's soul into the waystation, but it is then his option whether to go on or return. If he goes on, taking Voldemort with him, there will still be one Horcrux in Nagini to allow Voldemort to return. However, as the Elder Wand won't harm Harry, he has the option to return, and he chooses that option. As Dumbledore says that the soul fragment within Harry is now gone, the only Horcrux left is Nagini. Once Nagini is dead, thanks to Neville, there is nothing holding Voldemort's soul to the earth.

There is still the blood link, but that is unidirectional: Lily did not die to save Voldemort, did she? So every time that Voldemort uses the Killing Curse against Harry, it will rebound upon him. The first time it rebounded, when Harry was one, it killed Voldemort, but his soul, still held to the earth by five Horcruxes and the soul shard adhering to Harry, remained in Albania. The second time, it partially rebounded, killing the soul fragment in Harry, but Voldemort returned in the same body because he came back with Harry, as he had gone to "King's Cross" with Harry. The third time, with no Horcruxes left, it killed Voldemort outright.

There is, of course, an alternate explanation. Xeno Lovegood had said earlier that the three "Hallows, if united, will make the possessor the Master of Death". We believe that he is quoting the legend when he says this because his speech cadence seems to be written differently than his usual speech. Harry has, at this point, effectively united the three Hallows: the Elder Wand has transferred its allegiance to Harry, the holder of the wand which disarmed Dumbledore; the Invisibility Cloak is under his shirt; and he has been using the Resurrection Stone to navigate through the Forbidden Forest. It is possible that, having become the Master of Death by having united and possessed all three Hallows, Harry will now be the Master of Death until he decides to pass on. It is unknown whether loss of any of the Hallows to another would end his mastery; but it is certain at this point that Harry has become, perhaps unknowingly, the Master of Death, and so may have been able to make the choice himself whether to go on, or return to the land of the living. This also might explain why Dumbledore was in the Waystation waiting for Harry; we know that he had the Elder Wand and the Resurrection Stone in his possession in Harry Potter and the Half-Blood Prince, and Harry's bringing the Cloak into Dumbledore's office might well have been enough to give Dumbledore also the necessary power over Death to allow him to await Harry's arrival.

What is the nature of the bond between Harry and Petunia Dursley?
We know that Petunia does not like Harry, and Harry absolutely loathes living at Privet Drive. Yet there must be something that keeps them together. At the beginning of Harry Potter and the Order of the Phoenix, Vernon Dursley, discovering that Harry is becoming a magnet for trouble that can hurt his family as well as Harry, orders Harry out of his house. Petunia seems to agree with Vernon's decision, until the Howler reminds her of Dumbledore's earlier letter, which we must presume was the one left on the Dursley doorstep with Harry at the beginning of the series. At that point, Petunia abruptly rationalizes Harry remaining with them, forcing Vernon to back down. Obviously there is a blood relationship between them, as Lily Potter was Petunia's sister. Petunia, however, throughout the series, acts as though Harry has been thrust upon them; she has not accepted this burden willingly. What is compelling her to keep Harry? And why is Harry required to return to Privet Drive every summer? Granted, it does not have to be for the whole summer – at the beginning of Harry Potter and the Half-Blood Prince, for instance, Dumbledore, who obviously is privy to the details of the spells involved, collects Harry from Privet Drive after only a fortnight. What exactly is the nature of the bond that requires Harry to stay with Petunia?

It is stated over and over that Harry's protection came from Lily's sacrifice, and that until he reaches 17 that protection will come from her blood – and Petunia being Lily's sister, a blood relative, means that Lily's blood is in Petunia as well. That protection, which is only protection from Voldemort's direct action, as it was Voldemort's direct action that Lily died trying to prevent, ends when Harry reaches the age of majority and is unable under Wizarding tradition to claim Petunia's home as his own. In the first chapter of Harry Potter and the Philosopher's Stone, Dumbledore says he has reinforced that ancient magic, but it seems that it is that tie of blood relation which counts.

The word "blood" is used in particular so that we can see the transfer of the source of immunity from Petunia to Voldemort himself in the cemetery in Harry Potter and the Goblet of Fire.

As it was Lily's sacrifice that saved Harry's life, it is the shelter under Lily's blood (by way of Petunia) that keeps Harry protected for the first seventeen years of his life. However, this does not provide any protection to Petunia, as Lily certainly did not die to save Petunia's life. While there is no way that this can be anything except speculation, it is possible that what Dumbledore was achieving with his "reinforcements" was extending Harry's protection so that it protected his home as well as himself. This would explain why the Order were taking the Dursleys away at the beginning of Harry Potter and the Deathly Hallows. With Harry reaching his majority and no longer able to (even grudgingly) call Privet Drive "home", his protection there was ending, and the protection afforded the rest of the family by Dumbledore's reinforcements was likewise ending.

The suggestion has been made that Petunia herself might have had some input into this magical bond. After all, her sister Lily, as we have seen, was a very powerful witch. At an age where most witches are able to produce only undisciplined magic, Lily, without a wand, was able to control the magic she was able to do, causing a flower to open and close on command. This ability seems to be uncommon in the Wizarding world; Harry's magic was largely out of his control, and of the other wizards we have seen, Tom Riddle, alone of those under school age, seemed to be able to control the magic he could do. Is it possible that Petunia had some magical ability as well, that was tapped to protect Harry? In fact, no; the author has said that Petunia was doomed to be a Muggle for all of her life. While the author had said at one point that some character would do magic late in life, and there was speculation that this would be either Petunia or Dudley, in an interview following the publication of Harry Potter and the Deathly Hallows the author stated that the plot had shifted since that time, and the character who had been intended to be a late-blooming witch or wizard had not required that ability. It is possible that Dudley has some trace of magical ability, as he was able to sense the Dementors in Harry Potter and the Order of the Phoenix, but he never seemed to be able to perform magic. Even if he had had magical abilities, he was largely out of the secret of Harry's background, and would not have been able to help consciously in any event, being underage.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
SQL Dialects Reference/Administration

While this topic is not directly about SQL language, it is sufficiently close to gather information about frequently undertaken administrative tasks together.

Dumping database
Dumping the database involves creation of a file that stores all the data (rows) and the schema for this data from the desired databases/tables. Most usually it's done as a series of SQL statements, combining CREATE DATABASE / CREATE TABLE statements to recreate the schema and INSERT statements to refill the rows — thus, usually the resulting file can be directly imported using command-line SQL client by simple execution of queries. However, sometimes other output formats are desired and some databases (at least MSSQL) lack the ability to serialize the database as SQL statements from command-line dumper client.

 * }

Command-line SQL query

 * }

title: SQL Dialects Reference/Administration


text:
Semiconductor Electronics/Semiconductor

Semiconductors are materials that behave as conductors in certain cases and insulators in certain cases. This makes them ideal for electronics. By making a semiconductor behave like a conductor and insulator alternatively means that we have a switch.

 * /Group IV of Periodic Table/
 * Silicon
 * Germanium
 * /Doping/
 * /Semiconductor Behavior/

title: Semiconductor Electronics/Semiconductor


text:
Semiconductor Electronics/Diode

Introduction
Diode is a marvelous device that passes current only in one direction. Its not necessary that a diode is made of semiconductor, it could be made using vacuum tube valve technology or using electromagnetic switch or using a crystal. We over here concentrate about Semiconductor Diode Alone.

Diode section of Semiconductor Electronics teaches the reader what an Diode is ? How it works ? How it can fail ? It teaches the physics and science behind the operation of the diode.

Diodes can be used for various applications like Voltage Rectification & Regulation, Clipping & Clamping of voltages, making digital logic circuits, modulation, photo-voltaics and so on. Light Emitting Diodes (LED's) are used for light production in visible and invisible region of Electromagnetic spectrum. Many nations have switched their traffic light to LED's so that they have higher operational efficiency. PIN diodes are used for electricity production from light, they constitute much of Solar Cells. Apart from this diodes have many other application which my limited knowledge has failed to take notice.

For a person to be a successful Electronic Engineer, the knowledge, mathematics and science behind a working diode is a must.

Diode Construction

 * [[Image:SE_Diode_Construction.svg|200px]]

A diode is formed by joining two equivalently doped P-Type and N-Type semiconductor. When they are joined an interesting phenomenon takes place. The P-Type semiconductor has excess holes and is of positive charge. The N-Type semiconductor has excess electrons. At the point of contact of the P-Type and N-Type regions, the holes in the P-Type attract electrons in the N-Type material. Hence the electron diffuses and occupies the holes in the P-Type material. Causing a small region of the N-type near the junction to lose electrons and behaves like intrinsic semiconductor material, in the P-type a small region gets filled up by holes and behaves like an intrinsic semiconductor.

 * [[Image:SE_Diode_Depletion_Region.svg|200px]]

This thin intrinsic region is called depletion layer, since its depleted of charge (see diagram above) and hence offers high resistance. Its this depletion region that prevents the further diffusion of majority carriers. In physical terms the size of the depletion layer is very thin.

Zero Bias

When a diode is zero biased, that is has no bias, it just stays. Almost no current passes through the diode. However if you connect the anode and cathode of the diode you might be able to observe small voltage or current that is insignificant. This is because the electromagnetic spectrum thats present in our environment by default(Microwave background, heat, light, Radio waves) knocks off electrons in the semiconductor lattice that constitutes current. For practical reasons this current can be considered zero.

Reverse Bias

 * [[Image:SE_Reverse_Biased_Diode.svg|200px]]

In reverse bias the P-type region is connected to negative voltage and N-type is connected to positive terminal as shown above. In this condition the holes in P-type gets filled by electrons from the battery / cell (in other words the holes get sucked out of the diode). The electrons in N-type material is sucked out of the diode by the positive terminal of the battery. So the diode gets depleted of charge. So initially the depletion layer widens (see image above) and it occupies the entire diode. The resistance offered by the diode is very huge. The current that flows in reverse bias is only due to minority charge which is in nano amperes in silicon and micro amperes in high power silicon and germanium diodes.

Forward Bias

 * [[Image:SE_Forward_Biased_Diode.svg|200px]]

In forward bias the P-Region of the diode is connected with the positive terminal of the battery and N-region is connected with the negative region. During the forward bias the following process occurs. The positive of the battery pumps more holes into the P-region of the diode. The negative terminal pumps electrons into the N-region. The excess of charge in P and N region will apply pressure on the depletion region and will make it shrink. As the voltage increases the depletion layer will become thinner and thinner and hence diode will offer lesser and lesser resistance. Since the resistance decreases the current will increase (though not proportional) to the voltage.

At one particular voltage level Vf called the threshold / firing / cut-off voltage the depletion layer disappears (overwhelmed by the charge) and hence from this point on the diode starts to conduct very easily. From this point on the diode current increases exponentially to the voltage applied.

Ideal Diode
An Ideal diode has the following characteristics.
 * Zero Forward Resistance . An ideal diode has zero forward resistance. This means if current passes through a diode, it produces no heat loss. In other words an ideal diode in its forward bias acts like a closed switch in a electrical circuit.
 * Infinite Reverse Resistance
 * Zero Saturation Current IS
 * Infinite Operating Range

Types of Diode

 * /Zener Diodes/
 * /Light Emitting Diodes/
 * /LED/
 * /Varicap/
 * /Software/

Further Readings

 * Rectification Basics: Electronics for Beginners

title: Semiconductor Electronics/Diode


text:
Semiconductor Electronics/Reference

Books
1.Electronic Devices and Circuit Theory-Sixth Edition- Robert L.Boylestad, Louis Nashelsky - Prentice Hall

2.Semiconductors

Web Links
1. History of Transistor

2. Introduction to Semiconductor Technology

3. How Stuff Works

4. Semiconductor Subway

5. MIT's Open course ware

6. How Chips are made

title: Semiconductor Electronics/Reference


text:
C Sharp Programming/Keywords/params

The keyword is used to describe when a grouping of parameters are passed to a method, but the number of parameters are not important, as they may vary. Since the number isn't important, the keyword must be the last variable in a method signature so that the compiler can deal with the parameters which have been defined first, before dealing with the params.

Here are examples of where it will, and will not work:

A good example of this is the method. The method allows a user to pass in a string formatted to their requirements, and then many parameters for the values to insert into the string. Here is an example:

The String.Format method has taken a string, and replaced the {0}, {1}, {2} with the 1st, 2nd and 3rd parameters. If the keyword did not exist, then the  would need an infinite number of overloads to cater for each case.

title: C Sharp Programming/Keywords/params


text:
User talk:TyrannicalDuck

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:17, 7 August 2007 (UTC)

title: User talk:TyrannicalDuck


text:
User talk:Rianb

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:17, 7 August 2007 (UTC)

title: User talk:Rianb


text:
User talk:25member

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:17, 7 August 2007 (UTC)

Physics
G'day, before you get too far down the track on your Physics Textbook, have you see our Physics bookshelf? Webaware talk 07:13, 15 August 2007 (UTC)

Creating links
I just wanted to let you know that when you are creating your book, you cannot make links such as Summary. This will point to a new book called "Summary", and that is not what you want. If you want to create a new page, you must title it as Physics Textbook/Summary. I fixed many of the links in the book for you yesterday, but you have created more today that need to be fixed as well. I can do it when I get home (I have a bot that can help). Just make sure that when you make new links that you follow the correct format. --Whiteknight (Page) (Talk) 16:32, 16 August 2007 (UTC)

title: User talk:25member


text:
User talk:Zoncept~enwikibooks

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:17, 7 August 2007 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Zoncept. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Zoncept~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:55, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:40, 19 April 2015 (UTC)

title: User talk:Zoncept~enwikibooks


text:
User talk:Arunprktm~enwikibooks

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:17, 7 August 2007 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Arunprktm. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Arunprktm~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 22:57, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 04:34, 19 April 2015 (UTC)

title: User talk:Arunprktm~enwikibooks


text:
User talk:Effort~enwikibooks

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Effort. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Effort~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:07, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 04:55, 19 April 2015 (UTC)

title: User talk:Effort~enwikibooks


text:
User talk:Macy

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

WB:RENAME
Please see your request. — Mike.lifeguard | talk 21:28, 29 July 2008 (UTC)
 * ✅. Macys123 (talk) 21:44, 29 July 2008 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Macys123. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Macys123~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:23, 17 March 2015 (UTC)

title: User talk:Macy


text:
User talk:Blancandrin~enwikibooks

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Blancandrin. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Blancandrin~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:03, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 04:39, 19 April 2015 (UTC)

title: User talk:Blancandrin~enwikibooks


text:
User talk:Mikeraz

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

title: User talk:Mikeraz


text:
User talk:Macintyred

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

title: User talk:Macintyred


text:
User talk:Kayvan.walker

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

title: User talk:Kayvan.walker


text:
User talk:JBogdanGlobal

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:18, 7 August 2007 (UTC)

title: User talk:JBogdanGlobal


text:
Talk:Haskell/Understanding monads/Nuclear waste

(Prior to the metaphor version)
We have permission to import "All about monads" into this Wikibook. See the discussion associated with the Front Page.

(Prior to the metaphor version, bis)
Feel free to mutilate this page as you see fit, as if you had written it yourself. I don't imagine it's very good :-P --Ihope127 02:04, 23 January 2006 (UTC)

The nuclear waste metaphor
I'm currently in the process of converting my "Of monads and space suits" tutorial to a new, less far fetched metaphor suggested by Paul. I'm a bit ambivalent about the new metaphor. On the one hand, it does seem to simplify explanation somewhat, somehow lends it self to less verbiage. But on the other hand, with nuclear waste, you somehow communicate the idea that the "need" for a container comes from the stuff within, whereas with the space station metaphor, you communicate more the idea that this need comes from something exterior (space)... which seems a bit closer to the truth. I suggest we keep running with this, though and seeing where it can go -- Kowey 00:43, 3 February 2006 (UTC)

The way I see it, the need for the containers is to stop the waste contaminating our pure functional world with its horrible side effects. By the way, sorry I haven't been contributing much recently. Occasionaly my life needs a bit of maintenance. -- Paul Johnson 23:06 6 Feb 2006 (UTC).

I made a very minor change around where the original article had "running around with nuclear waste wouldn't be very healthy... indeed, would cause workers to die." I thought the tone of the original version was slightly flippant, and on the off chance that the reader has someone he loves who got radiation poisoning, strikes the wrong note. Other than that, I like the article a lot: very helpful in learning haskell.

 * Well, maybe you shouldn't mention nuclear waste at all, some activist might get a fit ... And the space example is far from perfect too, you didn't think of people with agoraphobia or claustrophobia at all. I, for example, have political-correctness-phobia and am presently pretty disgusted ;-). Pople are just like that, they like to take offense, so don't get your knickers in twist sidestepping everybody, sooner or later they'll push you into a corner ...

 * Ouch. I hadn't thought of that.  I guess in the old space suit metaphor, the same flippant tone was more acceptable since... well... how many astronauts do you know? Or maybe that's just not very nice of me in general :-( Thanks for the edit.  -- Kowey 15:58, 18 December 2006 (UTC)

Thank-you anonymous contributer!
Why thank you! You give me faith in wikis. -- Kowey 10:07, 15 February 2006 (UTC)

Import of Monads and Space Suits complete
Whew! Now, time for us to remix this with Jeff Newbern's stuff. -- Kowey 11:29, 15 February 2006 (UTC)

A bit of feedback
First off, this is far and away the best monad tutorial I've come across. The metaphor really explains the concepts well. I read it (and then All about Monads to consilodate) through yesterday, and I'm now in a position to say I fully understand monads. Thanks!

My ideas for improvement:

 * Add a sentence at the end of the 'Use a container' section with words to the effect of "the reason for using containers in actual programming will be explained later", and then explain it later on. It fits in quite naturally with the state monad stuff. It is in fact implied there but we might as well make it explicit.
 * The state monad section diagrams: we've lost the processing robot from the diagrams! This is a shame as it helps visualise (especially with the complicated bind diagram) exactly what we're linking together.
 * I think there's scope for a sequel to this chapter: "Advanced Monads" or something. It would explain the monads as computations metaphor, about >> and fail, and explain the MonadPlus class. It might also be nice to talk about lifting, etc.

Thanks once again for the excellent article. DavidHouse 13:26, 17 February 2006 (UTC)

 * Thanks for your comments! I like the metaphor a lot, basically an instantiation of Cale Gibbard's monads as containers notions. Thanks go to Paul, naturally, for suggesting the shift away from space suits and astronauts.
 * I'll think about adding the processing robot into the state diagram: at first, I was a bit afraid to over-complicate things, so I figured I would focus only on the fancy container that the robot returns.
 * And yes, I do agree that somewhere between this chapter and the Programming:Haskell monad transformers chapter could be much more to say! Lifting is discussed in the transformers chapter, by the way.  -- Kowey 23:33, 17 February 2006 (UTC)

Some Feedback
Thanks for this tutorial. Still making my way through it, but what I've gotten through so far has been helpful.

I have a minor comment about one of the earlier bits. I don't particularly find the use of dollar any less hard to read than using parens. When I read the bit about the paren-use being ugly, I became puzzled and attempted to examine the dollar expression in more detail to see if I'd missed anything. If anything I find 'i (h (g (f x)))' to be a lot easier to read compared to 'i $ h $ g $ f x'. Perhaps how readable people find these types of expressions is subjective.

 * I agree that in this particular example, the clarity of both variants is about the same. But there are times that dollar does clearly (in my opinion) help readability out.  Something like

a (b ((c d e) (f g h) i) a $ b $ (c d e) (f g h) i
 * Might be an example. I guess the point isn't that $ lets you replace parens, but that sometimes, mixed paren-dollar use can make your intention more apparant.  -- Kowey 22:39, 30 March 2006 (UTC)

get and put
Dear anonymous contributer,

Thanks for your correction to the wikibook! I agree with you that your implementation of get and put (after checking with the Haskell library) is correct, but this implementation needs to be used with an anonymous bind operator, whereas such an operator does not exist in the tutorial. Please excuse my brutal reverting of your attempt at improving this article. I think ultimately what I have is bad for people because it does not correspond to the real implemenation of get they will see in real life. There are several potential fixes to this: What do you think? I don't really have time to work on the wikibook right now, but I definitely agree with you that what I have is not quite right. -- Kowey 08:08, 9 April 2006 (UTC)
 * Overhaul the State explanation, and work in (1) the type constructor (2) anonymous bind
 * Call our version of State something like State_ and note that the real State is different, likewise for get_ and put_.

Telling them that the do-notation will translate  into   would be fine I think. A much bigger problem here is that  and   has the wrong type, so   and will not compile at all. 128.12.197.163 02:30, 10 April 2006 (UTC)

 * I've got a game plan, but I don't have time to put it into action just yet. Just to reiterate, I completely agree with you that we need to change get/put to the "correct" version ASAP.  The basic idea is that we'll introduce the correct get/put and then point out there is a type mismatch, from there say that you need to use it with   and from there, and maybe introduce the  .  Will look at it when I have time... or maybe somebody could do something like the above? -- Kowey 20:42, 11 April 2006 (UTC)

 * Ok, I've taken a few moments this morning to write it up. Is it to your satisfaction? -- Kowey 05:10, 22 April 2006 (UTC)

modify

 * I am saving this text here for now, due to recent work with the anonymous bind operator

Suppose somewhere along the line you want to modify the current state. That is, you want to  it, change it in some way, then   the new value. So, using do notation you'd have something like this:

do st <- get let st' = f st   put st'

is a nice little function which you can use instead of the above monotony. It takes a function from state to state, i.e. if you're using s as states then the function you pass in has to be of type. Using modify, the above example becomes:

modify f

Nice, no?

 * Kowey's comments: First of all, thank-you! I greatly appreciate your contribution to the wiki!  There's a couple of minor issues I have with this, however, and I'm really sorry to be difficult (just like I was being with anonymous bind).  Namely
 * I do not introduce do-notation until the very end of this module
 * While  is immensely useful, but it isn't strictly neccessary for understanding monads.
 * It breaks the flow from introducing get/put to introducing the anonymous bind operator, to introduce the Haskell State datatype
 * How about we put this into the intermediary chapter on monads that we were planning? Sort of a monads-in-practice chapter that goes right before the monad transformers one?  What do you think?  -- Kowey 05:12, 22 April 2006 (UTC)

Puzzling metaphor for puzzling concept?
As probably many of haskell newbies, I got excited initially, but soon stumbled upon monads. I've read a number of monad tutorials since, and I think that I began to understand them, partially. I have a big trouble though with the metaphor of "processors" and "containers" (or "trays" as they are called in another tutorial): to me, it seems deeply illogical that the "processor" has the "packager" built in, while the "unpackager" needs to be external. In a real world (or "metaphor world") factory, you would rather have either machines that consume containers with input and produce containers with output, or machines that consume raw material and produce raw material, coupled with two robots: an unpackager in front and a packager at the back. Likewise, in programming, it seems illogical to develop functions that accept "raw" data but must return "container with data". A function that would take a "container with raw data" as input and return a "container of the same type with processed data" would look cleaner.

I am sure that there must be some very good and simple explanation for this discrepancy, but as far as I have seen, everyone is just taking it for granted. To me, it's an ugly spot in a beautiful picture.

Am I the only one? If I am not, maybe it would make sense to discuss this issue in the tutorial?

And, oh, this article still is the most comprehensible of what I've read so far... Thanks! --Crosser 19:33, 29 January 2007 (UTC)

 * So the question is why there isn't symmetry in this, if I understand correctly. Well, it's clear that we can't just have raw-raw factories.  Or rather, we can, but then it'd just be regular functions, which we already know how to sequence (think dollar).  Now we want to do fancy things like IO or State passing (it gets much better!), and to do that we can use some kind of container mechanism.  Ok, so that's why we don't have raw-raw factories.

 * The symmetric case would be  which is an arrow, albeight a particular one.
 * Anyway, I think that the explanation of the metaphor slightly misses the point of monads. Maybe this is what has raised the irritation here. The point of monads is that nothing is ever unpacked, i.e. the waste processor goes into the container (going into means lifting  to  ), processes the waste resulting in a new container inside the container. After that, the nested containers get flattened to single one (with  ). This way, the hole processing steps happens inside a container and no radioactive material ever leaks outside. Of course, the metaphorical problem is now "why do I have processors that pack the waste into containers  ? I mean, I can process the waste with   and leave out the extra flattening step ?". Well, the answer in "real world" is that some functions like   do magical things with the  . Perhaps, the solution is to modify the metaphor: we glue container and waste together in the monad   and retain "pure" types   and  . This way,   takes a precious value   and returns a precious value , but unfortunately produces nuclear waste as a side effect so we only get   which is tainted forever. But thanks to  , we can still operate with the stuff inside tightly sealed containers. --  a  p  f  e  l m  u  s  21:51, 22 February 2007 (UTC)

 * Now the next question is why we don't have container-container factories... and for that I have two answers. The first is "well, if we can get by just wrapping the output, why make life any more complicated than that?".  The second answer is that, well there is a different abstraction called arrows, which sort of looks like that; but I still don't understand them well enough to say more.  It just turns out that if we drop down from the metaphor in to the real world of Haskell hacking, monads are pretty darn useful by themselves (consider Maybe and List).

 * Finally, I'd suggest you check out sigfpe's excellent "You Could Have Invented Monads", which presents a very down-to-earth non-metaphorical approach, that works with you to re-invent the monads concept without even noticing it. -- Kowey 20:29, 29 January 2007 (UTC)

 * Yes, Kowey, it's indeed the lack of symmetry in the metaphor/programming concept that haunts me. And the explanation "asymmetric is good enough to do the job" is not satisfying ;-) Maybe I could be happier with another similar metaphor, like "the processor always attaches a pouch with documentation to its output"... I need to mull over it some more.

 * I've read sigfpe's article, and honestly I find the concept of "debuggable functions" of the kind f :: Float -> (Float,String) no less irritating than asymmetric nuclear waste processors. Oh well... --Crosser 13:56, 30 January 2007 (UTC)

 * Crosser, try this one on for size. In fact, we very well could have symmetrical functions (taking containers in and spitting them back out).  Since all the containment business is taken care of, we can then sequence them by using our old friend, the   operator:

cf € cg € ch

 * Great! Ok, so we don't need any complicated robots to control what happens between each function (dollar or euro do the trick just fine).  So what happens within the function?  In most cases, it's not very useful for us to be processing the container; we want to get at the stuff that's inside the container, right?  It turns out that the mechanism we invent for getting the stuff out of the container is going to be a bit of boilerplate code.  Because we're diligent programmers, we're going to "factor out" the boring code, separating each function ,   and   into a boring end and its core business logic.    then becomes something like  ; likewise,   becomes   and so forth.  Oh wait a second, what's this   function we introduce then?  It turns out that this is exactly the   operator from this chapter.  The code from our symmetrical model of computation would then look something like this:

(>>= f) € (>>= g) € (>>= h)

 * And if we wanted to use this, we'd still have to have a function that wraps something into a container:

return x € (>>= f) € (>>= g) € (>>= h)

 * So that's fine, and maybe there is some kind of use for it. But in many cases, this is just a lot of extra cruft, so we can just do away with the 'front' end container and use   directly, thus making the code a lot lighter-weight:

return x >>= f >>= g >>= h

 * Is this any more convincing? -- Kowey 14:36, 30 January 2007 (UTC)

 * Yes, Kowey, I understand the explanation. Still, even more, I am beginning to think that the ugliness (as perceived by myself) of the monad concept is the penalty for the attempt to shove side effects into purely functional paradigm. I found this post rather in line with my subconscious impressions.

 * Thank you for discussion and explanations, anyway, they where very educative. --Crosser 14:17, 2 February 2007 (UTC)

 * Thanks for the link. One thing I can point out is the usefulness of monads goes far beyond IO. While IO may the first place we encounter monads, Haskellers eventually discover (1) the usefulness of Maybe and List monad in real-life code (2) monadic parser combinator libraries [Parsec] (3) combining monads together with  transformers (4) generic functions that work on any monad.  Point being that it would not do to restrict our view of monads on IO or side-effects; there's much more fun to be had than that!  In any case, happy travels.  I hope you find what you're looking for either in Haskell or another language. -- Kowey 07:43, 3 February 2007 (UTC)

This is an excellent tutorial
I was searching for a tutorial on monads and I think the nuclear waste metaphor (however contrived it is!) clearly put things in perspective.

Please *donot* change this metaphor, people new to computer science stumble upon various Monad tutorial sites with no avail! This wikibook is excellent - and thanks to the contributor!

--[User:dormant25]

This is excellent!
God bless you! I've been trying to understand monands for hours! But I couldn't. I knew it was a very simple concept, but the bind operator was killing me Now thanks to this metaphore I finally got it!

Thank you!

Yet Another fan of this tutorial
I've tried to understand what Monads are and are good for for years. This tutorial finally made it all clear to me. Thanks! --Andrew Eisenberg 21:56, 2 January 2007 (UTC)

Kowey responds
Thanks, everyone, for your kind words. I hope you'll have a chance to read the next chapters in this section, and the other articles on the Haskell MetaTutorial (I'm a big fan of Monads as Containers and You Could Have Invented Monads myself). These will give you other ways of understanding monads, which should help to clarify the idea even more. Best, -- Kowey 13:04, 3 January 2007 (UTC)

Macro metaphor
If it's any help, I found the macro metaphor for monads of [http://kawagner.blogspot.com/2007/02/understanding-monads-for-real.html "Understanding Monads. For real."] to be nice. --Gwern (contribs) 01:23, 18 February 2007 (UTC)

What's with that "euro"?
I'm hopelessly missing the point with the "euro". It's being said "use (|>) instead" - when I try it in my GHCI: f x |> g |> h it says "Not in scope: `|>'". Are those symbols "vertical bar" and "greater than" symbols? Is it necessary to turn on some extension module before?

 * You'll have to define it first. In GHCI:

let x |> f = f x "hello world" |> reverse |> dropWhile (/= ' ')
 * Hope that helps -- Kowey 13:07, 17 March 2007 (UTC)

I miss the point with (€) and sequencing
The section introducing (€) ends with 'Nevertheless, this notion of "sequencing" is basically 1/3 of the story behind monads'. I don't get what is ment with 'notion of sequencing'. In a strict language I had no problem identifying nested function application with sequencing. But Haskell expression are evaluated lazily and that confuses me a bit. If you consider the expression 'do_some_logging € print_current_time' then there is no guarantee, that do_some_logging is evaluated before print_current_time. What am I missing here?

 * Hi, the 'sequencing' does not refer to execution order at all. Here it is just a case that the result of one in the pipeline is used in the next, instead of the other way around (in functional languages, we have 'backwards' pipelines).  The point is merely that we write it as   instead of  .  Same execution order in the end (afaik), just defined in a more familiar way.  I wouldn't read too much into it.    just makes things look different wrt ($), but that is all. -- Kowey 13:18, 2 April 2007 (UTC)

 * Thank you very much for your prompt answer! Let me also say, this tutorial is great! It helped me a lot to understand all the type signatures used in monadic frameworks. In the meanwhile I also found the [IO inside] tutorial, in which chapter 3 discusses how the intended execution order emerges in the case of the IO monad, which to understand was my main concern for a long time.

Unhappy customers
For people who want more than a superficial explanation, this tutorial is very very bad:

 * Monads! And Why Monad Tutorials are All Awful
 * see #haskell discussion (with Cale) on badness of wikibook monads tutorial - the nuclear waste metaphor is also bad because the dangerous bit (nuclear waste) is on the inside! (I would say "can we bring space suits back", but I think there is a point somewhere that this use of metaphor might be bad)
 * see Crosser's helpful remarks above (the notion is irritating)
 * people complain that the $/€ thing is confusing...
 * the writing is very clumsy (Kowey); a small part of the problem is that I got into my head that we shouldn't use you/I (and use more we instead), but that was severely misguided because I ended up making things even worse in the process
 * Apfelmus points out that we're missing the point slightly about the  stuff (right?); the two container image

It's important that we get this one right, because this is the Haskell "thing". So feel free to be Really Really Bold. Maybe replace it with the sigfpe tutorial? (note: Crosser cautions that he found the 'debuggable function' idea 'no less irritating'). Maybe wait to see what Cale can cook up? -- Kowey 07:08, 2 August 2007 (UTC)

 * I concur. Here's further analysis
 * Concerning the metaphor, its goal is to enforce the mental picture that there cannot be a function, i.e. removing the container will result in a radioactive disaster, removing the space suit will kill the astronaut. Thus, the metaphor can be very helpful in removing the mental block of "why do I need such strange operations like   and   when I have  ?". The bad thing about the waste metaphor is that the   in   gets the negative connotation "nuclear waste". Why would I want to process that?
 * The bad thing about metaphors in general is that they fail to explain the why/purpose/usefulness of monads. I mean, a metaphor is just a silly mental game you can play.
 * Personally, I learned monads with the "metaphor" . Indeed a very useful monad :-) and the need to hide the   naturally leads to   and  . Only after that, I learned that containers like   and   support the same structure.
 * However, a point that sometimes/often goes unnoticed when having "monads = sequencing actions" or "monads = reprogram the semicolon" in mind is that sequencing actions means to feed the results of one action to the next one. Sequencing alone can be done with any monoid. I once encountered this in Re: Practical Haskell question. Note that imperative programming languages don't feed results of one action to the next ones, a monoid is enough for them! Instead, they use variable assignments like  to memorize "results" of previous actions. In other words, you can't "reprogram the semicolon" from   to say   in C because of this stupid way to "return" results. Put differently,   is very different from.
 * Concerning style, I think that many parts of the wikibooks are affected, the standard textbook tone is we/passive voice. Fortunately, I think that there are two simple principles for writing high quality texts. Unfortunately, the principles are: Invest a lot of time and Know (or learn) much more about the subject than you actually write down.
 * -- apfeλmus 12:21, 2 August 2007 (UTC)

Just dashing off a quick note to say how relieved I am to see your two succinct/accurate notes about the purpose of the metaphor (and its potential inappropriateness). You have hit the nail on the head on the pedagogical dilemma I was facing: how to isolate the 'how' from the 'why'. My problem (premondial eric) was that I would really stumble over the 'how' part, because the 'why' part was never really clear to me. So my hope was the metaphor would let us liberate one from the other. Give the user a convenient substitute for understanding why, so that they can focus on the 'how'. Only when they are comfortable with the sort of basic mechanics do we move it to a deeper level, so goes the thinking. Of course, the problem is that I never really moved on, never gave the 'real why'. Anyway, I'm perfectly happy to get rid of the metaphor, if the person doing it understands the 'mental block' problem as well as you do :-D -- Kowey 13:15, 2 August 2007 (UTC)

 * Oh, I actually like the space-suit metaphor :-) so I wouldn't discard it.
 * But I'm not sure whether it's a good idea to introduce the 'how', i.e. the abstract notions  and , before introducing the 'why', i.e. useful examples. You could have invented Monads does the opposite, it introduces the 'why' before the 'how', apparently with big success. Personally, I too prefer the latter style. And Simon Peyton Jones says on slide 14 of How to give a great research talk: "(When time is short,) omit the general case, not the example" :-)
 * Which example to choose for the 'why' before the 'how'? I'd choose  since this is the one type that requires the programmer to know what a monad is, the other monads are more or less optional. It makes abstract   and   necessary, in the sense that there is no way to implicitely code them by hand and thereby miss the abstraction behind. I mean, there is   and   for lists but who would think that these two innocent functions are part of a greater conspiracy.
 * I'd also explain monadic parser combinators  in detail, they are a must for any solid book about monads :-) But probably in a separate chapter.
 * -- apfeλmus 18:45, 2 August 2007 (UTC)

 * Ok, I'm starting a major rewrite now. Just for reference, here's the version before the rewrite -- apfeλmus 10:31, 3 August 2007 (UTC)

 * I was thinking of something else when I meant 'why', I don't remember people trying to explain the fundamental "point" before I even really knew what they were talking about. 'Why' via concrete examples sounds like a good idea.  I also like Cale's Monads as Computation from two days ago which pointed out all the handy little functions like   (something which I hardly even knew about when I wrote the 1st version of space suits!) Good luck on the rewrite.  I'll be cheering on the sidelines. -- Kowey 13:12, 3 August 2007 (UTC)


text:
User talk:Nattfodd

Welcome!
Hi Nattfodd, welcome to the Haskell wikibook and to the wikibooks community. Just wanted to drop a line and say that I appreciated your watching over the monad tutorial. It's ok, though; Apfelmus has things well under control. Best regards. And here's the standard welcome...

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Kowey 14:13, 3 August 2007 (UTC)

title: User talk:Nattfodd


text: Template:NAIVEBOOKSTEM

title: Template:NAIVEBOOKSTEM


text: Template:CHAPTERNAME

title: Template:CHAPTERNAME


text:
User:Reece/Scripts/Welcome.js

// welcomeNewUsers.js version 1.4 2007-07-19 // // a Wiki script to add "welcome" links after links to blank talk pages // // author: b:User:Webaware var welcomeNewUsers = { win : null, text_summary : "Welcome", text_message : " ", flag_minorEdit : true, flag_watch : true, // open a new window at the user's talk page, and insert a welcome message WelcomeUser : function(talkPageLk) { try { this.win = window.open(talkPageLk, "_blank"); var fn = new Function('{\n'				+ 'var doc = welcomeNewUsers.win.document;\n'				+ 'doc.getElementById("wpSummary").value = "' + this.text_summary.replace(/\"/g, '\\"') + '";\n'				+ 'doc.getElementById("wpTextbox1").value = "' + this.text_message.replace(/\"/g, '\\"') + '";\n'				+ 'doc.getElementById("wpMinoredit").checked = ' + this.flag_minorEdit + ';\n'				+ 'doc.getElementById("wpWatchthis").checked = ' + this.flag_watch + ';\n'				+ 'welcomeNewUsers.win = null;\n'				+ '}'); if (this.win.addEventListener) this.win.addEventListener("load", fn, false); else if (this.win.attachEvent) this.win.attachEvent("onload", fn); }		catch (e) { if (this.win) { this.win.close; this.win = null; }			alert("An error occurred: " + e); }   },    // installation of object instance // add a "welcome!" link wherever there is a talk page link for a named user Install : function { var handler = function { welcomeNewUsers.WelcomeUser(this.href); return false; }; var lks = document.getElementById('bodyContent').getElementsByTagName('a'); for (var i in lks) { var l = lks[i]; // match only new page links to valid user names, not IP (anon) users, and no sub-pages if (l.className == 'new' && l.href.match(/User_talk:((?!(\d{1,3}\.){3}\d{1,3}))[^\/]*action=edit/)) { var newLink = document.createElement("a"); newLink.href = l.href + "&section=new"; newLink.onclick = handler; newLink.style.color = 'crimson'; newLink.style.fontWeight = 'bold'; newLink.appendChild(document.createTextNode('welcome!')); l.parentNode.appendChild(document.createTextNode(' ')); l.parentNode.appendChild(newLink); }       }    } }; // hook it into the onload event $(welcomeNewUsers.Install);

title: User:Reece/Scripts/Welcome.js


text:
Talk:Contemporary Educational Psychology/Chapter 1: The Changing Teaching Profession and You/Teaching Is Different From in the Past/Diversity in Students

Mechanics of Adding References
I'm still learning the mechanics of adding references, so there are minor formatting problems with some of them. IN addition, it is taking a long time to add references because I am doing them one at a time. To save time after this first chapter, I am thinking about constructing a single list of references which I could paste into a Wiki page as a group. Since I already have the master list of references, it would be easy to transfer them to a special Wiki page called something like "References".

References from a a subsection could then cross-reference to this "master" list of references. I'm assuming that this will be possible since cross-referencing among pages within a book is possible (and supposed to be easy), but I haven't tried it yet. Klseifert 14:15, 7 August 2007 (UTC)

Including students with disabilities as a source of diversity
I'm not sure why these paragraphs were deleted from this section (there is no discussion and it seems to have been done anonymously. So I'm reverting the change. If the relevant editor happens to read this discussion, I'd be interested in the rationale for deletion. KelvinLeeSeifert (talk) 23:06, 20 September 2008 (UTC)


text:
Contemporary Educational Psychology/Chapter 2: The Learning Process

 * When my son Michael was old enough to talk, and being an eager but naïve dad, I decided to bring Michael to my educational psychology class to demonstrate to my students “how children learn.” In one task I poured water from a tall drinking glass to a wide glass pie plate, which according to Michael changed the “amount” of water—there was less now that it was in the pie plate. I told that him that, on the contrary, the amount of water had stayed the same whether it was in the glass or the pie plate. He looked at me a bit strangely, but complied with my point of view—agreeing at first that, yes, the amount had stayed the same. But by the end of the class session he had reverted to his original position: there was less water, he said, when it was poured into the pie plate compared to being poured into the drinking glass. So much for demonstrating “learning”

 * Each year after that first visit to my students, while Michael was still a preschooler, I returned with him each year to my ed psych class to do the same “learning demonstrations.” And each year Michael came along happily, but would again fail the task about the drinking glass and the pie plate. He would comply briefly if I “suggested” that the amount of water stayed the same no matter which way it was poured, but in the end he would still assert that the amount had changed. He was not learning this bit of conventional knowledge, in spite of my repeated efforts.

 * But the year he turned six, things changed. When I told him it was time to visit my ed psych class again, he readily agreed and asked, “Are you going to ask me about the water in the drinking glass and pie plate again?” I said yes, I was indeed planning to do that task again. “That’s good,” he responded, “because I know that the amount stays the same even after you pour it. But do you want me to fake it this time? For your students’ sake?”

In some ways what Michael did demonstrated learning, but not in other ways. He did not learn that the amount of water stayed constant just because I told him to, but he did learn to comply with my requests to display a particular belief about the water. The key feature identifying true learning—both for Michael and the rest of us—is its permanence: the change in behavior, skill, or knowledge had to last. You do not “learn” a phone number if you forget it the minute after you dial the number; you do not “learn” to eat vegetables if you only do it when forced. The change has to persist. Notice, though, that learning can be physical, social, or emotional as well as cognitive. You do not “learn” to sneeze simply by catching cold, but you do learn many skills and behaviors that are physically based, such as riding a bicycle or throwing a ball. You can also learn to like (or dislike) a person, even though this change may not happen deliberately.

Teachers’ Perspectives on Learning
For teachers, learning usually refers to things that happen in schools or classrooms, even though every teacher can of course describe examples of learning that happen outside of these places. Even Michael, at age six, had begun realizing that what counted as “learning” in his dad’s educator-type mind was something that happened in a classroom, under the supervision of a teacher (me). For me, as for many educators, the term has a more specific meaning than for many people less involved in schools. In particular, teachers’ perspectives on learning often emphasize three ideas, and sometimes even take them for granted: 1) curriculum content and academic achievement, 2) sequencing and readiness, and 3) the importance of transferring learning to new or future situations.

Dependence of Learning on Curriculum
When teachers speak of learning, they tend to emphasize whatever is taught in schools deliberately, including both the official curriculum and the various behaviors and routines that make classrooms run smoothly. In practice, defining learning in this way often means that teachers equate learning with the major forms of academic achievement—especially language and mathematics—and to a lesser extent musical skill, physical coordination, or social sensitivity (Gardner, 1999, 2006). The imbalance occurs not because the goals of public education make teachers responsible for certain content and activities (like books and reading) and the skills which these activities require (like answering teachers’ questions and writing essays). It does happen not (thankfully!) because teachers are biased, insensitive, or unaware that students often learn a lot outside of school.

A side effect of focusing learning on curriculum and academics is that classroom social interactions and behaviors become issues for teachers—become something that they need to manage. In particular, having dozens of students in one room makes it more likely that I, as a teacher, think of “learning” as something that either takes concentration (to avoid being distracted by others) or that benefits from collaboration (to take advantage of their presence). In the small space of a classroom, no other viewpoint about social interaction makes sense. Yet in the wider world outside of school, learning often does happen incidentally, “accidentally” and without conscious interference or input from others: I “learn” what a friend’s personality is like, for example, without either of us deliberately trying to make this happen. As teachers, we sometimes see incidental learning in classrooms as well, and often welcome it; but our responsibility for curriculum goals more often focuses our efforts on what students can learn through conscious, deliberate effort. In a classroom, unlike in many other human settings, it is always necessary to ask whether classmates are helping or hindering individual students’ learning.

Dependence of Learning on Teaching
Focusing learning on changes in classrooms has several other effects. One, for example, is that it can tempt teachers to think that what is taught is equivalent to what is learned—even though most teachers know that doing so is a mistake, and that teaching and learning can be quite different. If I assign a reading to my students about the Russian Revolution, it would be nice to assume not only that they have read the same words, but also learned the same content. But that assumption is not usually the reality. Some students may have read and learned all of what I assigned; others may have read everything but misunderstood the material or remembered only some of it; and still others, unfortunately, may have neither read nor learned much of anything. Chances are that my students would confirm this picture, if asked confidentially. There are ways, of course, to deal helpfully with such diversity of outcomes; for suggestions, see Part 2 (“Instruction and Assessment”) and especially Chapter 9 (“Planning Instruction”) and Chapter 10 (“Teacher-Made Assessment Strategies”). But whatever instructional strategies I adopt, they cannot include assuming that what I teach is the same as what students understand or retain of what I teach.

Sequencing and Readiness
The distinction between teaching and learning creates a secondary issue for teachers, that of educational readiness. Traditionally the concept referred to students’ preparedness to cope with or profit from the activities and expectations of school. A kindergarten child was “ready” to start school, for example, if he or she was in good health, showed moderately good social skills, could take care of personal physical needs (like eating lunch or going to the bathroom unsupervised), could use a pencil to make simple drawings, and so on. ../Table 1/ shows a similar set of criteria for determining whether a child is “ready” to learn to read (Copple & Bredekamp, 2006). At older ages (such as in high school or university), the term readiness is often replaced by a more specific term, prerequisites. To take a course in physics, for example, a student must first have certain prerequisite experiences, such as studying advanced algebra or calculus. To begin work as a public school teacher, a person must first engage in practice teaching for a period of time (not to mention study educational psychology!).

Note that this traditional meaning, of readiness as preparedness, focuses attention on students’ adjustment to school and away from the reverse: the possibility that schools and teachers also have responsibility for adjusting to students. But the latter idea is in fact a legitimate, second meaning for readiness: If five-year-old children normally need to play a lot and keep active, then it is fair to say that their kindergarten teacher needs to be “ready” for this behavior by planning a program that allows a lot of play and physical activity. If she cannot do so (whatever the reason may be), then in a very real sense this failure is not the children’s responsibility. Among older students, the second, teacher-oriented meaning of readiness makes sense as well. If a teacher has a student with a disability (for example, the student is visually impaired), then the teacher has to adjust her approach in appropriate ways—not simply expect a visually impaired child to “sink or swim.” As you might expect, this sense of readiness is very important for special education, so I discuss it further in Chapter 5 (“Students with Special Educational Needs”). But the issue of readiness also figures importantly whenever students are diverse (which is most of the time), so it also comes up in Chapter 4 (“Student Diversity”).

Transfer as a Crucial Part of Learning
Still another result of focusing the concept of learning on classrooms is that it raises issues of usefulness or transfer, which is the ability to use knowledge or skill in situations beyond the ones in which they are acquired. Learning to read and learning to solve arithmetic problems, for example, are major goals of the elementary-school curriculum because those skills are meant to be used not only inside the classroom, but outside as well. We teachers intend, that is, for reading and arithmetic skills to “transfer”—even though we also do our best to make the skills enjoyable while they are still being learned. In the world inhabited by teachers, even more than in other worlds, making learning fun is certainly a good thing to do, but making learning useful as well as fun is even better. Combining enjoyment and usefulness, in fact, is a “gold standard” of teaching: we generally seek it for students, and even though we may not succeed at providing it all of the time.

Major Theories and Models of Learning
Several ideas and priorities, then, affect how we teachers think about learning, including the curriculum, the difference between teaching and learning, sequencing, readiness, and transfer. The ideas form a “screen” through which to understand and evaluate whatever psychology has to offer education. As it turns out, many theories, concepts, and ideas from educational psychology do make it through the “screen” of education, meaning that they are consistent with the professional priorities of teachers and helpful in solving important problems of classroom teaching. In the case of issues about classroom learning, for example, educational psychologists have developed a number of theories and concepts that are relevant to classrooms, in that they describe at least some of what usually happens there and offer guidance for assisting learning. It is helpful to group the theories according to whether they focus on changes in behavior or in thinking. The distinction is rough and inexact, but a good place to begin. For starters, therefore, consider two perspectives about learning, called behaviorism (learning as changes in overt behavior) and constructivism, (learning as changes in thinking). The second category can be further divided into psychological constructivism (changes in thinking resulting from individual experiences), and social constructivism, (changes in thinking due to assistance from others). The rest of this chapter describes key ideas from each of these viewpoints. As I hope you will see, each describes some aspects of learning not just in general, but as it happens in classrooms in particular. So each perspective suggests things that you might do in your classroom to make students’ learning more productive. A third learning theory is connectivism.

Behaviorism: Changes in What Students Do
Behaviorism is a perspective on learning that focuses on changes in individuals' observable behaviors—changes in what people say or do.... (read more...)
 * Respondent Conditioning: Learning New Associations with Prior Behaviors
 * Operant Conditioning: New Behaviors Because of New Consequences

Constructivism: Changes in How Students Think
Behaviorist models of learning may be helpful in understanding and influencing what students do, but teachers usually also want to know what students are thinking, and want to enrich what they are thinking. For this aspect of teaching, some of the best help comes from constructivism, which is a perspective on learning focused on how students actively create (or “construct”) knowledge out of experiences. (read more...)

Chapter Summary
Although the term learning has many possible meanings, the term as used by teachers emphasizes its relationship to curriculum, to teaching, and to the issues of sequencing, readiness, and transfer. Viewed in this light, the two major psychological perspectives of learning—behaviorist and constructivist—have important ideas to offer educators. Within the behaviorist perspective are two major theories or models of learning, called respondent conditioning and operant conditioning. Respondent conditioning describes how previously neutral associations can acquire the power to elicit significant responses in students. Operant conditioning describes how the consequences and cues for a behavior can cause the behavior to become more frequent. In either case, from a teacher’s point of view, the learned behaviors or responses can be either desirable or unwanted.

The other major psychological perspective—constructivism—describes how individuals build or “construct” knowledge by engaging actively with their experiences. The psychological version of constructivism emphasizes the learners’ individual responses to experience—their tendency both to assimilate it and to accommodate to it. The social version of constructivism emphasizes how other, more expert individuals can create opportunities for the learner to construct new knowledge. Social constructivism suggests that a teacher’s role must include deliberate instructional planning, such as facilitated by Bloom’s taxonomy of learning objectives, but also that teachers need to encourage metacognition, which is students’ ability to monitor their own learning.

Key Terms
Appropriate (as a verb)

Behaviorism

Bloom’s taxonomy

Classical conditioning

Constructivism
 * Psychological constructivism
 * John Dewey
 * Jean Piaget
 * Assimilation
 * Accommodation
 * Equilibrium
 * Schema
 * Social constructivism
 * Jerome Bruner
 * Instructional scaffolding
 * Lev Vygotsky
 * Zone of proximal development

Discrimination

Extinction

Extrinsic motivation

Generalization

Learning

Intrinsic motivation

Metacognition

Operant conditioning
 * Cue
 * Operant
 * Reinforcement
 * Schedule of reinforcement

Ivan Pavlov

Readiness

Respondent conditioning
 * Conditioned response
 * Conditioned stimulus
 * Unconditioned response
 * Unconditioned stimulus

B. F. Skinner

Transfer

External Resources
Journal of Applied Behavior Analysis This journal is an excellent source of examples of how behaviorist learning principles can be applied to a wide variety of behavior-related difficulties. Any article older than one year is available in full-text, free of charge from the website. (If it is from the most recent three issues, however, you have to subscribe to the journal.)

Jean Piaget Society In spite of its name, this organization is not just about Piaget, but about all forms of constructivist research about learning and development, including social constructivist versions. They have excellent brief publications about this perspective, available free of charge at the website, as well as information about how to find additional information