Computers are Useless

“Computers are useless. They can only give answers.”
Pablo Picasso

Well, here’s an opportunity for the computer to respond by… asking questions:

The above is running a bit of Javascript (the plain vanilla variety; because that’s a thing) which string together words from a list to produce questions. An English sentence consists of a subject, verb and an object. (Also called a SVO order.) By stringing together words in that order, it is possible to make sentences. It is intended to be an entertaining program to bring out a few laughs by generating sentences that, most of the time, make no sense.

Note it isn’t truly random, since the code uses a shortcut to round numbers that come out of a random number generator. (OK, OK, it’s not honest-to-goodness random either because they generate pseudorandom numbers.)

I used to have a Java applet which did the same thing, they’ve been discontinued in most browsers, so Javascript it is. 😉

This program is distributed under the MIT license. The text of the license is included in the source code.