Cooking with Linux - Jumbled Words
What on earth are you doing, François? Our guests will be here any moment. What are all these yellow sticky notes doing everywhere? Quoi? You're preparing for the telephony-themed issue? Although I admire your desire to help, I confess that this time, I really have no idea what you are doing. The telephone game? Of course I know what the telephone game is. You tell one person a phrase, he or she whispers it to another, who tells yet another, until you run out of players. The last player repeats what he or she thinks the message is, and it invariably turns out to be something totally different from what was originally selected. I still don't see what all these notes are for.
Ah, I see. They are anagrams, mostly of your first and last name, it would appear. You've got it all mixed up, mon ami. Anagrams, or word scrambles, have nothing to do with the telephone game other than that the message gets scrambled in some way. How many of these notes have you got scattered around the restaurant anyway? Never mind. I don't want to know. Our guests are approaching as we speak. We'll discuss this later.
Welcome, everyone, to Chez Marcel! Please take your seats and make yourselves comfortable. You may want to forgive the yellow notes all over the walls. My faithful waiter has gone anagram-crazy, and what you see is the result. François, if you would be so kind, please head down to the wine cellar. Over in the west wing, there are a few cases of 2002 Bolgheri Rosso Piastraia from Tuscany. Please, fetch some for our guests.
While we await François' return with the wine, let me show you a great little program for generating anagrams. Written by Richard Jones (now maintained by Paul Martin), an is a command-line program designed to generate anagrams. The program is extremely easy to use, but let me offer a quick word of caution. You'll want to use one or more of an's command-line options as it is extremely liberal with the anagrams it returns, and you'll quickly drown in results. My own name, Marcel Gagne, generates 837,989 results if I type an "Marcel Gagne". Notice that when using two words, I put them in quotation marks. If you use the -w option, an generates a list of unique words instead of myriad phrases. Using my name as the example, I get 318 words. Compare that to a return of cam an ger g l e followed by cam an erg g l e and so on.
Increasingly interesting results turn up if you specify words of a particular length. For instance, if you have ten letters to work with, and you'd like to see words of six letters or more, use the -m 6 option, which stands for minimum word length of six. If you know that the word mossy can be generated by the words you are using and you want to see all the combinations of “lost mysteries” that include mossy and contain a minimum of four letters per word, you might try typing the following:
an -m 4 -c mossy "lost mysteries"
A similar program is Evans A Criswell's Wordplay. Wordplay is also a command-line program for generating anagrams. Unlike an, Wordplay generates less words by default, but it also is more likely to generate meaningful results. There are command-line options to limit the number of words or characters each word can have and so on. Simply type wordplay at the command line for a list of options.
You can waste an amazing amount of time using these simple command-line anagram-generators and discover some fascinating things. For instance, did you know that “red pestilence iota nil” is an anagram for “presidential election”? That's just silly, of course. After all, “lulu jar nixon” is an anagram for “Linux Journal”. Then again, so is “lunar join lux”. François! Thank goodness you have returned. Please, pour a rather large glass for each of our guests.
So, what's the point of all this? Well, anagrams can be a great mental exercise, one that is a lot of fun. To that end, there are a number of great games based on anagrams and word scrambles. One of these is Joshua Keel's Kanagram (Figure 1). Kanagram is not only a great game, it's also a great place to start our exploration of word scramble games. You shouldn't have any trouble getting your hands on this one, as it is very likely in your distribution's software repository. Kanagram presents you with a scrambled word and asks you to decipher the word. There's no ticking clock on this one, and you don't get dinged for getting the word wrong. To make the choice of words interesting, the game comes with a number of vocabularies. These are word categories, such as Computers, Inventions, Sports, Professions and so on. There also are generic vocabularies based on whether the words are easy, medium or hard.
On the left-hand side of Kanagram's window, there's a large blackboard with the scrambled letters in the center. On the top right of the blackboard, the category is highlighted. You always can switch to another category with a click of the mouse. If you know the word, type it in the white input box below the blackboard. At any time, you can ask for a little help by clicking the word hint on the bottom left of the blackboard (Figure 2).
That brings us to Kanagram's right-hand side menu, cleverly designed to resemble a filing cabinet. If you do succumb to the pressure and need a hint, it appears in a pop-up near the bottom of the cabinet. Scroll your mouse pointer over the cabinet's drawers, and a tooltip describes what you'll find inside. You can jump to the next anagram, configure some of the program's functions, read the handbook or exit.
As I mentioned in the introduction to the game, Kanagram comes with a handful of vocabularies, but there are more available for download in a number of different languages. Simply click the second file drawer to open Kanagram's configuration dialog. You can look at existing vocabularies and create your own by clicking Vocabularies in the sidebar. To download new vocabularies, click New Stuff instead (Figure 3).
When you click the Download New Vocabularies button, a new window appears showing what's available. You then can select and download vocabularies that appeal to you.
If you could turn anagrams into an arcade game, it might look something like Tom Bradley's Scramble (Figure 4). There's a ticking clock, fun sound effects and multiple levels that can be reached only by making it past a certain percentage of the words successfully. On the surface, it doesn't seem all that complicated. After all, each scramble consists of a measly six letters (“six letters” = “telex stirs”). When the letters appear on the placards at the bottom of the screen, click on the letters to form a word, then click Submit (or if you prefer, type the word and press Enter). If the word exists, it will load up one of the empty word boxes, after which you can move on to the next word.
Strangely enough, getting from one level to the next isn't always as easy as it looks. Sometimes, if you get really stuck, re-scrambling the letters can help—for that reason, you'll find clicking Shuffle every once in a while a handy thing. Did you, in a flash of brilliance, figure out the six-letter word? If you can guess the six-letter word right off the bat, you automatically move to the next level. Eventually, when you have exhausted all possibilities and the timer runs out, Scramble may deliver a classic arcade pat on the back. Yes, Scramble keeps track of high scores, and lets you enter your name in the high-scorers' list.
For the truly anagram-crazy, there's Colm Gallagher's Anagramarama (Figure 5). It doesn't quite maintain the arcade-like feel of Scramble, but it also doesn't limit itself to six letters. In that respect, it can be much more of a challenge, particularly if you live for the thrill of building words from random collections of letters.
When you click a letter from the top list of available letters, it drops into the Guess box below. After you've assembled your word, or something you think might qualify as a word, simply click the green check mark. Keyboard racers may prefer to type the letters, entering an anagrammatic stream of consciousness.
“I'm upset” is an anagram for “Time's up”, and sadly, closing time approaches. Don't be too upset though. I'm sure we can convince François to refill our glasses a final time. And, while we sip our wine (“mute sip” also is an anagram for “time's up”), we may uncover some interesting anagrams by putting in the names of friends, family members and, of course, coworkers.
Raise your glasses, mes amis, and let us all drink to one another's health. A votre santé! Bon appétit!
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide