# A Programmers Riddle

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.

• What's the point of the loop if it terminates on the first iteration either way? :) – Riley Aug 31 '18 at 20:24
• @Riley it definitely doesn't. – IT Alex Aug 31 '18 at 20:26
• @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. – PerpetualJ Aug 31 '18 at 20:27
• I suppose we can't really say what will happen because the code won't even compile. – Riley Aug 31 '18 at 20:28
• @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. – Riley Aug 31 '18 at 20:32

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

• 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 ******. – hvd Sep 1 '18 at 10:55
• Many l*******s have ****** *****s maybe the riddle just needs to have "type of" inserted at the appropriate place. (If I understood you correctly.) – Jonathan Allan Sep 1 '18 at 11:02
• You understood correctly and I think I agree that that would work. – hvd Sep 1 '18 at 11:10

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.

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

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