So what do you mean by “random nonsense”?
Before you ask, I don’t mean the script for Eastenders! In this article, random nonsense refers to content generated (psuedo) randomly by a computer. This may be anything from a non-related series of characters (eg
!FId1t!YzXW"BoKs_.ry) to syntactically, if not semantically, correct prose (eg
Eh, that supp tapir honorably sought between one impertinent tamarin.).
When would I need this?
A few examples:
- Page layout
- I don’t know about you, but when I'm designing a new website I’m often tempted to design the layout before any content has been produced. With random nonsense you can fill the space the real content will take up and get a real feel for how the site will eventually look with the real text in place.
- If you need to generate passwords, nothing can be more secure (or harder to remember!) than a random string of characters. Here's one for you:
- Secret codes
- silent atrociously this a much is off unfittingly a naturally waspishly secret less much coded and this message weasel that. (Try reading every third word in the previous message.)
- Just for fun
- There are many entertaining uses of random nonsense out on the web. See Crazy Libs from RinkWorks, or the Hobbit Name Generator from Chris Wetherell.
- Gibberish type
- Choose the range of characters for the script to select from as it produces its random string.
- The script can encode its output for use in different environments, through HTML entities and url-encoding.
- Length of output
- Either enter a number or a string. If a string is entered, the script outputs the same number of characters as were present in the string.
- Script style
Jeff Holman has written a wonderful script called Nonsense, which produces random sentences which are grammatically correct. You can download a copy of the script, with some enhancements of my own, from my scripts area.
You can try the script out here. The left column allows you to set options, the middle column displays the actual code used and the right column shows the output.