Cooking with Linux - A Gem of an Idea
What you have come up with, François? Yes, I am excited too, and I am very happy to hear that you found it so easy to come up with today's menu. I must confess, mon ami, I did have some concerns when you told me you wanted to put together the menu for the Ruby issue. You never told me that you were so interested in object-oriented programming. I'm rather curious as to what made you choose Ruby.
François? Why do you look so confused? What do you mean, I'm the one who is confused? Let me have a look at this menu of yours. Oh, I see. No, François, I am not laughing at you. Well, maybe a little. None of these programs have anything to do with Ruby. Yes, I can see that every one of them features rubies, but Ruby doesn't have anything to do with rubies. At least not directly, and as near as I can tell, none of these programs are written in Ruby. No matter, François. Our guests will be here any moment and we must be ready for their arrival. Don't worry about the menu. Everything will be fine.
Welcome, everyone, to Chez Marcel, the home of fine wine and exquisite Linux fare. Please, sit and make yourselves comfortable. François, please head down to the cellar and bring back the case of 2000 Castell de Falset Tinto from Penedes, Spain. It is located midway on the right side of aisle four in the south wing. Vite, mon ami! Our guests are no doubt parched.
While my faithful waiter is in the cellar, I should tell you that the items on today's menu were all his choices. When I mentioned a Ruby special issue, he jumped at the chance and, through a thoroughly understandable misunderstanding, wound up putting together a collection of games with rubies in them. On that note, I'd like to introduce the first item on tonight's menu. Those of you who are running the KDE desktop will probably find you already have a copy of KSokoban, written by Anders Widell. The word sokoban is a Japanese word meaning “warehouse keeper”. KSokoban can be seriously challenging, but the premise of the game is simple. Your warehouse keeper needs to push these large, red, ruby-like gems into proper storage locations in the warehouse. The storage locations are indicated by glassy, green circles. Every gem must be moved into storage (Figure 1).

Figure 1. KSokoban is a challenging and fascinating puzzle. Look for it as part of your KDE collection of games.
Sounds easy—and it is. At first. With each successive level, KSokoban becomes increasingly difficult. The catch is that you can push only one gem at a time. Okay, there's more than just one catch. You also can't pull the gems, and you can't step over them. Push them up against a wall with no way to get behind them and you are stuck.
Ah, wonderful, François! You have returned with the wine. Please, pour for our guests. Enjoy the wine, mes amis. This red is actually a blend of several varietals—rich and complex.
Complexity in KSokoban comes with successive levels. There also are collections of levels, and even those collections vary in terms of complexity. If you find yourself overwhelmed, or if you would like a kinder, gentler version of KSokoban that your younger kids can enjoy, click Game on the menu bar and select Microban (easy) from the level collection. It's a great way to build up your confidence before submitting yourself to the Sasquatch levels.
Sebastien Delestaing's Gweled is a Linux port/remake of a game called Diamond Mine, also known as Bejeweled. This gem of a game features an array of precious stones from diamonds to emeralds to rubies and more (Figure 2). The idea is to line three identical stones in a row (diagonally does not work). Your only method for accomplishing this feat is to click on a stone and then another adjacent stone. This causes the stones to flip their position. This works only if the flip generates a three-in-a-row combination. Once three stones line up, those above fall and the grid is replenished. The object is to play until there are no further moves and, of course, to generate the highest possible score in that time frame.
Under the Preferences menu, you can select the size of the game grid. Mind you, this is a physical size. The number of jewels on the grid remains the same. You also can select a somewhat more difficult—and just a tad more nerve-wracking—timed version of the game where you race against the clock for points. Gweled is easy, fun to play and makes for a highly successful time waster.
As you all enjoy the wine François is busy refilling, I note a happy and appreciative look on your faces, even from those of you who are on to your second or third glass. This makes the following item on tonight's menu somewhat ironic, a great arcade game called Angry, Drunken, Dwarves.
Why these dwarves are drunk and angry evades even the developer of the game. All Joe Wreschnig, the author of Angry, Drunken, Dwarves, can tell us is that they have decided to take this alcohol-fueled aggression out on their fellow dwarves by dropping gems on their heads. Rubies, emeralds, diamonds—they are all fair game in this arcade diversion (Figure 3).
During the course of the game, colored gems drop slowly from above (gravity must not be as strong deep underground). As they drop, you use the cursor keys—or the keyboard in a multiplayer game—to rotate and position the gems. This is more than just a Tetris clone. Angry, Drunken, Dwarves is also a strategy game. Assemble the falling gems in a rectangular combination, and the gems will fuse into larger gems, or crystals. Circular, star-like gems are called break gems when they hit a gem (or crystal) of the same color. Crystals, as you might expect, are worth more than gems when smashed by a break gem.
Now, I did say that this was a multiplayer game, which means playing against another flesh-and-blood opponent or a computer-generated one. At the beginning of the game, each player chooses a dwarf. To help you choose a player, Angry, Drunken, Dwarves presents you with pictures, names and bios of the dwarf contestants (Figure 4). Each dwarf also has an attack pattern, which you can use to your advantage if you are smart. During game play, your opponent's rules are the same, but whenever you break gems, your opponent drops counter gems on you, which means you have to work twice as hard and twice as fast in order to clear them. As turnabout is indeed fair play, your opponents get the same treatment when they break gems.
There's quite a bit more to the game, but I'm going to let you discover that on your own. Before we move on, however, I want to point out a not-so-apparent aspect to the game that starts to show itself after you have played a few times. On the game selection screen, you will see a menu option labeled View Unlocks, which opens up some otherwise unseen features of the game.
Ah, mes amis, it is getting late, the stars are out and shining like jewels—sorry, I couldn't resist—and puns are a diamond a dozen. Sadly, we must start thinking about closing up...soon. François will happily refill your crystal glasses with the ruby-red Castell de Falset as you try your hands at some of tonight's sparkling games. On that note, please raise your glasses, mes amis, and let us all drink to one another's health. A votre santé Bon appéit!
Resources for this article: /article/9014.
Marcel Gagné is an award-winning writer living in Mississauga, Ontario. He is the author of the all new Moving to Ubuntu Linux, his fifth book from Addison-Wesley. He also makes regular television appearances as Call for Help's Linux guy. Marcel is also a pilot, a past Top-40 disc jockey, writes science fiction and fantasy, and folds a mean Origami T-Rex. He can be reached via e-mail at mggagne@salmar.com. You can discover lots of other things (including great Wine links) from his Web site at www.marcelgagne.com.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Dynamic DNS—an Object Lesson in Problem Solving
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Web & UI Developer (JavaScript & j Query)
- Senior Perl Developer
- Technical Support Rep
- Symbolic Math with Python
- UX Designer
- Network Monitoring with Ethereal
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?







9 min 51 sec ago
27 min 14 sec ago
2 hours 20 min ago
4 hours 13 min ago
11 hours 7 min ago
11 hours 23 min ago
13 hours 15 min ago
19 hours 7 min ago
23 hours 38 min ago
23 hours 39 min ago