# The telltale code

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:

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

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

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


Which story had I been dreaming?

• Nice - I like that it's a story, this time, instead of a song. Will be interested to see the answer. – Khale_Kitha Mar 31 '16 at 20:38
• Haha, like your questions :-) – ABcDexter Mar 31 '16 at 20:39
• I am guessing the story is in UK english? – Arcane Apr 1 '16 at 4:52
• 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 – nine9 Apr 1 '16 at 8:10
• @nine9 Maybe the factorial is intended to indicate an explanation point? Not sure what "muf!" would mean, though. – DylanSp Apr 1 '16 at 13:49

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!

• oh my god, this is wonderful – question_asker Apr 1 '16 at 16:28
• Another detail: you seem to be "sniffing" the "heritage" of the object in the assert. – charfellow Apr 1 '16 at 20:17
• @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. – KeyboardWielder Apr 2 '16 at 8:36
• Thanks for the extra details, @KeyboardWielder. Nice job, Scott. – Khale_Kitha Apr 6 '16 at 18:25

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

socket

because

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.

factorial()

probably indicates an exclamation mark

queue()

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

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

it is your day at work!

Explanation:

charge();

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);