Xander boiling his egg is just another example that belies the "Xander is dumb" mythology. It was a clever way to cheat. However, the darker read is that Xander intuitively believes that child-rearing should be harsh and painful to make a tougher kid- even though I think Xander has too much compassion and too much of a heart to ever do that a child of his own. However, see how he internalizes Tony Harris and basically discusses himself through the egg.FXander cheating on his assignment is so petty, and yet amusing, and sums up High School Xander so well.
Willow: "You boiled your yoke?"
Xander: "Yeah I know its cruel, but sometimes you gotta be cruel to be kind. You can bet that little Xander here is thicked skin now"