Ubuntu Aero Snap
One of my favorite features of Windows 7 is Aero Snap. It allows users to resize and organize windows by dragging them to different edges of the screen. Fortunately, the same feature exists in Ubuntu as a customizable keyboard shortcut.
The first step is to install the CompizConfig Settings Manager. To do this, enter the following command in the terminal:
sudo apt-get install compizconfig-settings-manager
Next, open the application by going to System → Preference → CompizConfig Settings Manager.
Scroll down to Window Management section and click on the Grid icon. On the Bindings tab, choose the keyboard shortcuts for each action. Be sure to check the Enable Grid box!
This feature should make it easier to manage multiple windows, especially when all of the windows need to share screen real estate.
An Introduction to E-Books
(This is the text of my second Toastmasters speech.)
Most people don’t use electronic books on a daily basis. In fact, many people are unfamiliar with the very concept of an electronic book. However, in spite of this, most experts agree that electronic books are the future, and the future is now.
Today, I’d like to introduce you to electronic book, or ‘e-book’, technology. First, I’ll give you some background regarding e-books. Next, I’ll discuss the current state of e-book technology, including products that are available on the consumer market. Finally, I’ll explain some of the remaining challenges that need to be addressed in order for ebooks to reach their full potential.
With the advent of computers, people have begun to wonder if ink and paper might become obsolete. Wouldn’t it be nice to have an entire library in your pocket? Computer technology is really good at storing, accessing, and searching data, so an electronic book format would make sense.
One way to understand how revolutionary the transition from physical books to e-books might be, consider what happened to a similar market: music. Albums used to be produced by major labels, distributed to brick-and-mortar stores on vinyl, cassette, or compact disc. MP3s, which represent an electronic alternative to that physical media, shook the very foundations of that business model. Customers can purchase MP3 files online, from the comfort of their own home, avoiding record stores altogether. An iPod or some other MP3 player can hold thousands of these files, and people can carry them in their pocket wherever they go.
Today, most books are produced by major publishers and sold in brick-and-mortar stores as hardcovers or paperbacks. However, e-books, which represent an electronic alternative to that physical media, are starting to become more available for purchase online. E-book readers, devices that can store and display thousands of e-books on a portable screen, are also beginning to hit the market. The parallels between MP3s and e-books are so strong that it’s easy to see that we have a revolution on our hands.
To explore the current state of e-book technology, let’s consider some of the e-book readers that are out there. At this time, there are four major contenders: the Kindle, the Nook, the E-Reader, and the iPad.
The Kindle is produced by Amazon.com. It is the oldest of the four devices, first released in 2007. The Kindle features storage for up to 1500 books, a built-in physical keyboard, and a battery that lasts 14 days. The Kindle also offers free 3G connectivity for ubiquitous access to the Amazon.com online bookstore, which sells new releases and best sellers for only $9.99. The most attractive feature of the Kindle is its amazing e-ink screen. E-ink is a technology that allows content to be written to the screen in a persistent fashion. An E-ink device doesn’t have to constantly refresh the output; the text and images will remain on the screen without using power from the battery. Think of it as an etch-a-sketch, where the image stays until it is erased. E-ink screens are not backlit, which means they are easy on the eyes and they are legible even in direct sunlight. The Kindle starts at $259.
The Nook is Barnes and Noble’s answer to the Kindle. It was released late in 2009, featuring an e-ink screen, WiFi and 3G connectivity, and a memory card slot for expandable storage. Instead of a physical keyboard, the Nook has a color touchscreen to complement its e-ink display. This allows users to easily navigate through their book collection, but it also reduces the battery life of the device. Perhaps the most exciting feature of the Nook is the ability to “lend” e-books to friends. Even though the Nook has more features than the Kindle, its online bookstore isn’t nearly as robust. The Nook costs $259.
Sony makes a number of e-book readers under the Reader brand. The low-end model doesn’t offer any kind of wireless connectivity, but its e-ink display does double as a touchscreen. The Reader is able to handle more file formats than the Kindle or the Nook, and it starts at $299.
Just last week, Apple jumped into the e-book reader market with the announcement of the iPad. The iPad does not feature an e-ink screen, which means that it has a backlit display that is more difficult to read in direct sunlight. However, the iPad is more than just a single-function device. It offers many features familiar to users of the iPod Touch, plus a suite of iWork productivity tools. The iPad starts at $499.
Now that we know the current state of the e-book market, let’s look at some of the challenges that lie ahead. First of all, at this time there are limitations to the e-ink technology. E-ink displays can be slow to update, meaning a slight delay every time you turn a page. Also, e-ink screens can only display in grayscale, not color. This is why Apple chose a traditional screen technology instead of e-ink: they wanted magazines and other media to display in full color.
The second challenge is the question of the e-book file format. Currently, there are two major options: ePub and mobipocket. Different companies endorse different file formats, similar to past competitions between VHS and Beta or Blu-Ray and HD-DVD. Eventually, the industry will have to settle on a common format to reduce confusion and promote interoperability.
Third, publishers have yet to agree on a pricing scheme for ebooks. Amazon argues that ebooks should be substantially less expensive than physical books, with each title costing about $10. This seems reasonable because there are no printing or transportation costs involved with e-books. Of course, publishers would like to set prices comparable to the cost of a physical copy. As time goes on, economics will dictate an equilibrium price, but consumers will not adopt e-books and e-book readers unless they make financial sense.
In closing, this is an exciting time for reading. E-books have the potential to replace their physical counterparts, and the technology is starting to become available to the average consumer. Someday we’ll tell our grandchildren and great-grandchildren about how books used to be, and they’ll marvel at our old-fashioned stories.
Pragmatic Tips
Earlier I wrote about custom files for the fortune command in Linux. Before that, I gave a glowing review of The Pragmatic Programmer. Today I’m releasing a package that puts pragmatic programming tips in the fortune database.
The pragmatic tips come directly from the book, and were obtained here. They represent the main ideas and principles proposed by the authors.
Download the compressed file here. Then, from the terminal, run the following commands to install:
tar -xvf pragmatic_tips.tar.gz
sudo cp pragmatic_tips* /usr/share/games/fortunes
The command ‘fortune pragmatic_tips_short’ displays the title of a randomly selected pragmatic programmer tip. Calling ‘fortune pragmatic_tips_long’ will print the title of a random tip along with its description.
Add one of these commands to your ~/.bashrc file for a bit of inspiration and wisdom each time you open a new terminal window!
Fortune Files in Linux
Fortune is a small Linux program with a simple purpose: display a random string of text to the user. The fortune utility draws its quotes, pearls of wisdom, jokes, and factoids from a set of standard and custom databases, and these databases are very easy to create and manage. This post will explain how to set up, customize, and use fortune on your machine.
Open a terminal window and enter the following command to install fortune on a Debian/Ubuntu box:
sudo apt-get install fortune
Running Fortune
Once fortune is installed, it can be invoked by running the ‘fortune’ command. This should cause an adage or epigram to be printed to the screen. By default, three fortune databases are installed with the application: “fortunes,” “literature,” and “riddles.” The fortune program accepts database names as optional parameters. For instance, ‘fortune literature’ will return a random literature quotation, while ‘fortune literature riddles’ would produce a quotation or a riddle. If no particular database is specified, fortune draws strings from across all of the available databases.
Custom Fortune Databases
It is extremely easy to create and install custom fortune databases. First, build a file of fortune strings, separated by lines containing only the ‘%’ character. To practice, create a file named ‘test’ and give it the following contents:
test1
%
test2
%
test3
%
Next, use the strfile utility to convert this file into a database. This will produce a new *.dat file in binary format. Using the ‘test’ file, the following would create ‘test.dat’:
strfile test
Finally, move the files to the fortune database directory. On Ubuntu, this is /usr/share/games/fortunes.
sudo cp test* /usr/share/games/fortunes
After following this example, ‘fortune test’ should display one of the three test messages we defined.
Fortunes at Terminal Login
It’s fun to see a fortune displayed whenever you open a new terminal window. To set this up, just add a single line to the end of your ~/.bashrc file:
fortune
Simple, right? Remember, this command could be followed by a list of database names for more fine-grain control.

