11
$\begingroup$

A programmer friend left me a riddle:

Loop

if riddle is answered then exit

else 

All human kind is subject to this negativity

nothing is true in life except these two things

concatenate the synonyms into a string to uncover an error

terminate due to this error and the riddle is answered

end if;

end loop;

This particular riddle doesn't compile can you figure it out?

Edit: The psuedocode is there for a reason. not everyone needs to be a programmer to solve this riddle. Although this forward thinking is a hint.

$\endgroup$
  • 1
    $\begingroup$ What's the point of the loop if it terminates on the first iteration either way? :) $\endgroup$ – Riley Aug 31 '18 at 20:24
  • 2
    $\begingroup$ @Riley it definitely doesn't. $\endgroup$ – IT Alex Aug 31 '18 at 20:26
  • $\begingroup$ @Riley It wouldn't truly end on the first iteration for everyone. It may take someone several tries to answer the riddle, thus the loop starts over. $\endgroup$ – PerpetualJ Aug 31 '18 at 20:27
  • 1
    $\begingroup$ I suppose we can't really say what will happen because the code won't even compile. $\endgroup$ – Riley Aug 31 '18 at 20:28
  • 1
    $\begingroup$ @WeatherVane I didn't say it would go down that branch. But if it did, it would exit the loop. If it didn't, then it would terminate due to the error. I'm not asserting that my interpretation is the only correct one. We don't even know what programming language this is after all. $\endgroup$ – Riley Aug 31 '18 at 20:32
16
$\begingroup$

I'm think the answer is:

Syntax

Since

All human kind is subject to this negativity

Sin

nothing is true in life except these two things

"Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes." — Benjamin Franklin (although not the origin of the idiom)

concatenate the synonyms into a string to uncover an error
(& This particular riddle doesn't compile)

Sin + Tax -> "Syn" + "Tax" -> "Syntax"
A syntax error is when when the code cannot be parsed correctly for compilation/execution

$\endgroup$
  • $\begingroup$ I am pretty sure you are right, so +1, but if you are, the riddle suggests to me a misunderstanding that ****** is inherently a kind of *****, rather than there existing *****s relating to ******. $\endgroup$ – hvd Sep 1 '18 at 10:55
  • $\begingroup$ Many l*******s have ****** *****s maybe the riddle just needs to have "type of" inserted at the appropriate place. (If I understood you correctly.) $\endgroup$ – Jonathan Allan Sep 1 '18 at 11:02
  • $\begingroup$ You understood correctly and I think I agree that that would work. $\endgroup$ – hvd Sep 1 '18 at 11:10
3
$\begingroup$

I think the answer is:

begin and end - Only two things are true in life, birth and death.

Your code is missing (based on syntax):

The keyword begin which denotes your loop should begin, the end keyword requires a matching begin.

For example:

Begin Loop .... End Loop - also - Else Begin
In C#: while (notSolved) { /* Riddle */ }

Also:

You need to put the riddle in as comments. The riddle in itself is a syntactical error that will not compile until commented out.

$\endgroup$
  • $\begingroup$ Nice attempt. I would revisit line 5 $\endgroup$ – IT Alex Aug 31 '18 at 20:28
  • $\begingroup$ Line 5 states to use the synonyms for the only two things that are true in life. What did I miss there? $\endgroup$ – PerpetualJ Aug 31 '18 at 20:30
  • $\begingroup$ your original idea is only half correct. $\endgroup$ – IT Alex Aug 31 '18 at 20:32
  • $\begingroup$ Updated my answer. $\endgroup$ – PerpetualJ Aug 31 '18 at 20:34
1
$\begingroup$

Maybe

bell

All human kind is subject to this negativity

this applies to the next sentence

nothing is true in life except these two things

death and taxes

concatenate the synonyms into a string to uncover an error

death knell or death toll (toll ~ tax). As some tolling (or knelling) seems to be also involved, it's an error that only death and taxes are true in life -- a bell (of some sort) is implicated. So we

terminate due to this error

of forgetting the bell

and the riddle is answered

As an aside, ASCII character 7 is BEL (bell). And there are 7 lines inside the loop (just overthinking)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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