Difference between revisions of "Talk:1188: Bonding"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Pun)
Line 21: Line 21:
  
 
Hmmm "Eclipse: The Codex Persona" is also a d20 gaming system which offers enormous customization of characters.  The mention of building character and Eclipse in the same sentence just brought that to the front of my mind.  No idea if that has relation to the comic. --[[Special:Contributions/50.0.36.182|50.0.36.182]] 07:38, 20 March 2013 (UTC)
 
Hmmm "Eclipse: The Codex Persona" is also a d20 gaming system which offers enormous customization of characters.  The mention of building character and Eclipse in the same sentence just brought that to the front of my mind.  No idea if that has relation to the comic. --[[Special:Contributions/50.0.36.182|50.0.36.182]] 07:38, 20 March 2013 (UTC)
 +
 +
Did anyone else have a D'AWWWWWW moment when you realized what was happening? I knew it was a pun on throw and catch, but it took till the end for me to realize it was a parent and a child playing catch.[[Special:Contributions/74.14.31.164|74.14.31.164]] 12:53, 20 March 2013 (UTC)
  
 
== Problem With Code ==
 
== Problem With Code ==

Revision as of 12:53, 20 March 2013

The aim method results in an infinite loop/stack overflow, note that ball is an exception of type Ball. This results in a logical flow of aim, "throw," "catch," repeat, though this is only logical by word choice, and is nonsensical from a programming perspective.

Pretty sure the code is also intentionally hard to follow. -- ‎108.48.215.61 (talk) (please sign your comments with ~~~~)


The try/catch parts are just for show, they cancel each other out. The structure is that you have a parent and a child instance (of class P), each has a 'target' pointed to the other. Then calling aim with a ball will call the others aim with the ball, which will call the firsts aim with the ball. Etc etc.

I guess after about a 1000 aims the jvm will throw you out, stating stack overflow, and the bonding game is over. -- 212.214.117.162 (talk) (please sign your comments with ~~~~)


Nice catch game :) I had to test it:

Exception in thread "main" java.lang.StackOverflowError

in my setup with default VM settings after 6612 iterations (I added a static counter variable). The game could get even more "exciting" by using more than two Ps and adding randomization in who is aimed at. And maybe a miss block ;) (need to hack the compiler and VM for that though...) 134.106.146.36 09:31, 20 March 2013 (UTC)

I don't think any parent will last so long. On the other hand, if you always catch the ball, one iteration doesn't take so long, it's the missing which makes the game long ... -- Hkmaly (talk) 09:56, 20 March 2013 (UTC)

Hmmm "Eclipse: The Codex Persona" is also a d20 gaming system which offers enormous customization of characters. The mention of building character and Eclipse in the same sentence just brought that to the front of my mind. No idea if that has relation to the comic. --50.0.36.182 07:38, 20 March 2013 (UTC)

Did anyone else have a D'AWWWWWW moment when you realized what was happening? I knew it was a pun on throw and catch, but it took till the end for me to realize it was a parent and a child playing catch.74.14.31.164 12:53, 20 March 2013 (UTC)

Problem With Code

The one problem with this is that the way the try/catch is set up, they aren't actually throwing to each other. Parent throws the ball, then catches it themselves, then child does the same thing. It's still clever though. Prometheusmmiv (talk) 11:38, 20 March 2013 (UTC)

Pun

The code is an odd way of making a loop in Java -- creating two objects (of class P, called "parent" and "child") which repeatedly throw and catch another object (of class Ball) between one another. The sole purpose of this is to create the pun referred to in the title: it's a real-life cliché that a parent and child may "bond" by playing catch. 81.31.112.212 07:14, 20 March 2013 (UTC)

Title text talks about "to build character" in the way usually a father tries to help a child to define "attributes or features that make up and distinguish an individual"[1], so I suppose that the "confusing Eclipse" is a pun itself. Perhaps it is a reference to Eclipse novel by Stephenie Meyer (the kind of book that raises a lot of moral dilemma in a young adult). --Andcoz (talk) 12:49, 20 March 2013 (UTC)

Throwable

I think there is another pun in it: The class "Ball" is a child-class of "Throwable" which makes sense because you can throw a ball. But "Throwable" is also the main exception-class from which the real exception classes like "Exception" or "Error" inherit. --DaB. (talk) 12:50, 20 March 2013 (UTC)