[markobr] Off with his head?

An archive of solved lateral thinking puzzles.

Moderators: peter365, Balin, kalira, JenBurdoo, Tiger

[markobr] Off with his head?

Postby markobr » Mon Jun 22, 2020 5:15 pm

Alice often uses death threats to make sure her orders are executed the way she wants. Nobody takes offence at that, people even tend to be mildly amused when she tells them about it.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Mon Jun 22, 2020 7:00 pm

Alice: HAF? Death: of a human? The human executing the order? Death of a processing thread in software? Are yhe threats spoken? Written? Gestured/mimed? Meant?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby Zanreo » Mon Jun 22, 2020 7:37 pm

Are the threats obviously jokes? Ridiculously exaggerated?
User avatar
Zanreo
 
Posts: 1131
Joined: Mon Apr 20, 2015 10:34 pm
Location: Norway

Re: [markobr] Off with his head?

Postby gregoryuconn » Mon Jun 22, 2020 11:12 pm

“Orders are executed”.... Hmmmm..... is a pun involved? Is she ordering the execution of a person? An animal (such as a vet putting sick animals down, though it could be more sinister)? And she threatens to do it herself if they don’t?
gregoryuconn
 
Posts: 514
Joined: Thu Jun 26, 2014 11:25 am
Location: Northern Virginia, USA

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 23, 2020 4:40 pm

Alice: HAF? Death: of a human? No. The human executing the order? So, no. Death of a processing thread in software? YES! Are yhe threats spoken? Written? This. Gestured/mimed? Meant?

Are the threats obviously jokes? No. Ridiculously exaggerated? No.

“Orders are executed”.... Hmmmm..... is a pun involved? Yesish, but not about "executed") Is she ordering the execution of a person? No. An animal (such as a vet putting sick animals down, though it could be more sinister)? No. And she threatens to do it herself if they don’t? No.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 23, 2020 5:00 pm

Does she write software? Threaten programs with Task Manager or similar? Are the threats written as comments? Part of executable code? Does her software launch lots of threads, and kill those that don't do what she wants? Genetic algorithms relevant? Quantum computing?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 23, 2020 5:08 pm

Does she write software? Yes. Threaten programs with Task Manager or similar? Not that much similar. Are the threats written as comments? No. Part of executable code? Yes. Does her software launch lots of threads, and kill those that don't do what she wants? Genetic algorithms relevant? Quantum computing? No to rest.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby JenBurdoo » Tue Jun 23, 2020 6:59 pm

Is the "threat" an actual instruction within the code? Is it actually a threat (given that it cannot be understood in a sentient sense by the computer)? Is there humor in it? Is a specific type of program involved, such as a game?
JenBurdoo
 
Posts: 2049
Joined: Fri May 23, 2014 11:12 pm
Location: Florida, USA

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 23, 2020 7:14 pm

Try...catch relevant? Relevant what programming language she uses? What platform(s) she writes for? What type of software she makes? Is the threat ever carried out? If so, routinely? When errors occur? Rarely?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 23, 2020 9:08 pm

Is the "threat" an actual instruction within the code? Yes. Is it actually a threat (given that it cannot be understood in a sentient sense by the computer)? Well, so it isn't. It just looks like one. Is there humor in it? Well, it's somewhat funny, but it's the usual way to do what she wants to do. Is a specific type of program involved, such as a game? No.

Try...catch relevant? Only in a quite lateral sense. Relevant what programming language she uses? Yes. Try...catch doesn't exist in this language. What platform(s) she writes for? No. What type of software she makes? No. Is the threat ever carried out? Well, it's not really a threat, but yes, the instruction may be carried out from time to time. If so, routinely? No. When errors occur? Yes. Rarely? Depends on the circumstances.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Wed Jun 24, 2020 1:08 pm

Is it a low level language? High level? Is she writing an error handler? When carried out, does the program quit entirely? Stop what it's doing?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Wed Jun 24, 2020 3:23 pm

Is it a low level language? High level? This. Is she writing an error handler? She writes code that determines how to handle (certain) errors. When carried out, does the program quit entirely? Usually yes, but you can change this behaviour. Stop what it's doing? And by consequence usually this, too.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Wed Jun 24, 2020 4:43 pm

Relevant which errors? Relevant who's going to use the program? Relevant which instructions(s) she's using? File I/O relevant? Networking? Graphics?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Fri Jun 26, 2020 6:31 pm

Relevant which errors? Yesish. Relevant who's going to use the program? No. Relevant which instructions(s) she's using? Yes. File I/O relevant? A good example where you might want to use the death threats. Networking? Might be another example. Graphics? Not as far as I know, but I don't know much about graphics programming.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Fri Jun 26, 2020 7:54 pm

Does the death occur if an operation is not finished within a certain timeframe? With a certain result? Does she employ a timer? Counter? If...then? Or...else? (I wish there was such an instruction. Do [this], or else [consequence]!
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Fri Jun 26, 2020 9:15 pm

Does the death occur if an operation is not finished within a certain timeframe?Not usually, but this could be a reason. With a certain result? Yes. Does she employ a timer? Counter? If...then? For all: possibly, but this can happen in lots of situations. Or...else? (I wish there was such an instruction. Do [this], or else [consequence]! But there is one in this language (well, it looks like that), and indeed, "or" is part of it.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Sat Jun 27, 2020 7:05 am

Relevant which language she's using? Comments relevant? Is an error message relevant? Relevant what company (if any) she works for? Relevant what devices the code runs on? Such as phones? Appliances? Cars? Medical devices? Is killing the process important for safety? Usability? Reliability?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Sun Jun 28, 2020 7:13 pm

Relevant which language she's using? Yes. Comments relevant? No. Is an error message relevant? Yope. Relevant what company (if any) she works for? No. Relevant what devices the code runs on? No. Such as phones? Appliances? Cars? Medical devices? Maybe for all, irrelevant. Is killing the process important for safety? Maybe. Usability? Maybe. Reliability? Yes.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Mon Jun 29, 2020 4:19 am

Is it a scripting language? Compiled language? Popular language? Do users need to restart the process when it quits? Is not showing an error message relevant? Product support relevant? Does the killing trigger a relevant automatic response? Such as an error report? Or prevent one? Is she writing beneficial software? Malware? Virus? Worm? Spyware? Shovelware?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Mon Jun 29, 2020 7:58 am

Is it a scripting language? Yes. Compiled language? So, no. Popular language? Quite so, but it was more popular in the past. Do users need to restart the process when it quits? Depends on the circumstances. Is not showing an error message relevant? Yes. Product support relevant? Not particularily. Does the killing trigger a relevant automatic response? Usually yes. To avoid a misunderstanding: The "killing" involved is just the script itself terminating. Such as an error report? An error message. Or prevent one? No. Is she writing beneficial software? Assume this. Malware? Virus? Worm? Spyware? Shovelware?
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Mon Jun 29, 2020 8:31 am

JavaScript? VBScript? PHP? Perl? Python? Ruby? ASP? Tcl? Is the script run in a browser? On a server? If the script is killed, is it relaunched? Relevant?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Mon Jun 29, 2020 4:13 pm

JavaScript? VBScript? PHP? Perl? This. Python? Ruby? ASP? Tcl? Is the script run in a browser? On a server? If the script is killed, is it relaunched? Relevant? Irrelevant to the rest, this is not about a particular script.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 30, 2020 10:20 am

Is this about all Perl scripts? A certain type? A certain group? The ones she write? Does Perl have a "kill" command? Or similar?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 30, 2020 1:47 pm

Is this about all Perl scripts? Almost all. A certain type? A certain group? The ones she write? So no, not especially. Does Perl have a "kill" command? It has, but this one is not relevant Or similar? [b]Yope. Quite the contrary, one could say.[b]
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 30, 2020 1:52 pm

Unkill? Zombie? Try-this-but-don't-die-if-it-fails? Sandboxing relevant?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 30, 2020 3:50 pm

Unkill? Zombie? Try-this-but-don't-die-if-it-fails? Sandboxing relevant? No to all. Opposite to "kill" in another way.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 30, 2020 4:18 pm

Pause? Suspend? Put to sleep? Clone? Multiply? Start? Run? Execute? Retry? Try-again-but-differently?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Tue Jun 30, 2020 4:40 pm

Pause? Suspend? Put to sleep? Clone? Multiply? Start? Run? Execute? Retry? Try-again-but-differently? Again in a different way opposite to "kill". Change the perspective...
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Tue Jun 30, 2020 9:24 pm

Perspective: user? Programmer? The script itself? The interpreter? The OS/platform? CPU?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Wed Jul 01, 2020 3:49 pm

I begin to be puzzled by the fact how many misunderstandings this can create...

Perspective: user? Programmer? The script itself? This is closest. The interpreter? The OS/platform? CPU?
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby GalFisk » Thu Jul 02, 2020 7:09 am

Does the script do any killing? Any opposite? Is the script subjected to killing? To the opposite?
GalFisk
 
Posts: 9989
Joined: Tue May 27, 2014 8:03 pm
Location: Sweden

Re: [markobr] Off with his head?

Postby markobr » Thu Jul 02, 2020 7:30 pm

Does the script do any killing? Any opposite? Is the script subjected to killing? To the opposite? It "kills" itself.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany

Re: [markobr] Off with his head?

Postby Acridian9 » Tue Jul 21, 2020 7:27 pm

Is the command "die"? Something like "[do something] or die"?
Or is it "exit"?
Acridian9
 
Posts: 1515
Joined: Wed May 06, 2015 7:43 pm
Location: Pisa, Italy

Re: [markobr] Off with his head?

Postby JenBurdoo » Wed Jul 22, 2020 11:26 pm

"Delete yourself?"
JenBurdoo
 
Posts: 2049
Joined: Fri May 23, 2014 11:12 pm
Location: Florida, USA

Re: [markobr] Off with his head?

Postby markobr » Sun Sep 27, 2020 9:40 pm

Does the script do any killing? It just "killls" itself. Any opposite? So, no. Is the script subjected to killing? Yes, insofar as it kills itself. To the opposite? No.

Is the command "die"? Yes. Something like "[do something] or die"? And, yes, exactly this. You solved it.
Or is it "exit"? So, no.

"Delete yourself?" No.

***** SPOILER ALERT *****

This is the story of Alice, a Perl programmer, or it could be the story of many more Perl programmers (Including me). Perl is a computer language which is quite lenient when it's about runtime errors. You try to open a file for reading, but the file doesn't exist? In most languages the standard would be that the program exits with an error message. Not so in Perl - there, the reasoning is - well, if there is no file at all, there's nothing to read, as it would be with en existing, but empty file. So no exit, but the program just continues with the input from said file being empty. There are many more cases where Perl would continue and just assume there's nothing to do here, but this should be fine. But the non-existent file sure is the most common case. Perl will, however, return a false value in such a situation.

While Perl's behaviour often is quite practical (you don't have to care about minor problems), it can often enough be quite a problem. If you expect a file to exist (even if it may be empty), you may want to know that before you proceed with processing the missing data. So you want to tell the program to exit with an error message instead of just continuing. Now, the command for just doing that in Perl is "die". So, if you want your program tos stop because of an error, you tell it to "die".

Now Perl (and many other programming languages) have the logical "or" working in this way: When the first part of the "or" statement evaluates to "true", the second part won't be evaluated at all, but will simply be ignored. So, if your statement" A or B" is executed, and A returns a true value, B won't be processed at all.

Now, if you want to make sure as a Perl programmer that your program stops with an error (or invokes special error handling code) in case of a missing file (or quite a lot of other problems), you will write "or die" after the statement in question. If the statement returns a true value (and supposedly succeded), the statement after the "or" will be ignored. If it returns false, it will e executed causing the program to stop with an error message (or invoke specific error handling code). So it can be quite common for a Perl programmer to write lines like

open <FILEHANDLE>, "file.txt" or die;

to ensure the program breaks in case "file.txt" doesn't exist at all. But this surely looks like you want to threaten the computer with death in case it is unable or unwilling to do what you want.
markobr
 
Posts: 198
Joined: Wed Jul 16, 2014 10:15 pm
Location: Tübingen, Germany


Return to Solved Lateral Thinking Puzzles

Who is online

Users browsing this forum: No registered users and 5 guests