The other night, while writing this Java class that could be serialized into a socket, I fell asleep and had a weird dream.

In my dream, when I ran the program, the socket and the class object suddenly came alive. I tried to walk away from them but they followed behind.

As I desperately tried to change the program, I found the following strange piece of code in it, having no apparent rhyme or reason:

queue(factorial((26 * 275903).toAscii()));

h = m_socket[0].object;
assert( h.locale == "en_GB" );

if (true)
    b = h.extractInternalStructure();
    g = hash(b);
    r = b.read(g);
    // m_socket[1].send(r);

Which story had I been dreaming?

  • $\begingroup$ Nice - I like that it's a story, this time, instead of a song. Will be interested to see the answer. $\endgroup$ Commented Mar 31, 2016 at 20:38
  • $\begingroup$ Haha, like your questions :-) $\endgroup$
    – ABcDexter
    Commented Mar 31, 2016 at 20:39
  • $\begingroup$ I am guessing the story is in UK english? $\endgroup$
    – Arcane
    Commented Apr 1, 2016 at 4:52
  • $\begingroup$ As a programmer, I have no idea where to begin, but the product of the two numbers converted to hex, and then split up in three seperate hex values and converted to ascii, translates to "muf". But getting the factorial from that doesn't make any sense $\endgroup$
    – nine9
    Commented Apr 1, 2016 at 8:10
  • $\begingroup$ @nine9 Maybe the factorial is intended to indicate an explanation point? Not sure what "muf!" would mean, though. $\endgroup$
    – DylanSp
    Commented Apr 1, 2016 at 13:49

3 Answers 3


I don't have time to flesh out every detail right now, but the story is clearly

Jack and the Beanstalk.

Some of the clues that give it away:

A charge is a fee, queue is FIFO, and the ascii gives fum!, i.e. "Fee fi fo fum!".
The variable h represents Jack, an Englishman (locale = en_GB).
Be he alive or be he dead (always true), I'll grind his bones (extract internal structure and hash it) to make my bread (b.read(g)).

Some more:

"m_" is a coding convention to denote a "member". m_socket[0] denotes the nose and the "h" is the "object" of its sense. m_socket[1] denotes the mouth, and the comment line implies that the result would be eaten.

In the back-story:

A "jack" is a type of socket and a Java "bean" is a special type of Java class/object that can be serialized (among other properties). In the story, the two follow behind, i.e. "stalk" the author. Thus: Jack and the bean stalk!

  • $\begingroup$ oh my god, this is wonderful $\endgroup$ Commented Apr 1, 2016 at 16:28
  • $\begingroup$ Another detail: you seem to be "sniffing" the "heritage" of the object in the assert. $\endgroup$
    – charfellow
    Commented Apr 1, 2016 at 20:17
  • $\begingroup$ @Scott M: That's correct! I'll wait to see if you can add more details, and also find something more in the back-story preceding the code. $\endgroup$ Commented Apr 2, 2016 at 8:36
  • $\begingroup$ Thanks for the extra details, @KeyboardWielder. Nice job, Scott. $\endgroup$ Commented Apr 6, 2016 at 18:25

Only a partial answer, but I think this is a play on the meaning of the word



UK mains sockets have blue (neutral), green (earth) and red (live) wiring (b, g and r being the variables in the if block). In computer programs a socket is an endpoint for a network connection but I think that's misdirection here.

Other notes:

The if block

would always be executed because the condition is true.


probably indicates an exclamation mark


might mean to reverse the order of the characters since a queue is a FIFO (first in first out) so "!fum" rather than "muf!" ?

  • $\begingroup$ 275903 is the HEX code for dark green(colorhexa.com/275903), which could tie into your 2nd spoiler $\endgroup$
    – SlashmanX
    Commented Apr 1, 2016 at 14:56
  • $\begingroup$ The r, g and b could fit with any computer-related concept, not necessarily with your interpretation of 'socket'. $\endgroup$
    – fffred
    Commented Apr 1, 2016 at 15:05


it is your day at work!



this can be your breakfast / cup of coffee at home, to charge you for the day or the fee you pay to enter the highway

queue(factorial((26 * 275903).toAscii()));

26 * 275903 translates to "uf" in Ascii, its factorial is "uf!" and this is what you say while you're in queue to get to the office by car (you must be driving on a busy route)

While these 2 points make perfectly sense to me, the next ones are a bit stretched....

h = m_socket[0].object;
assert( h.locale == "en_GB" );

You're a programmer and you pull the project? ... and it's written in English

if (true)

Every day

b = h.extractInternalStructure();  
g = hash(b);  
r = b.read(g);  
// m_socket[1].send(r);  

You take the source code, you review and muddle it, update it and you (don't) push it

  • $\begingroup$ Nice, and partially true (e.g. I am a programmer who has to commute to work everyday); but not related to this puzzle. :) $\endgroup$ Commented Apr 2, 2016 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.