Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
United States

Submission + - Navy now mandated to consider FOSS as an option

lisah writes: "In a memorandum handed down from Department of the Navy CIO John Carey this week, the Navy is now mandated to consider open source solutions when making new software acquisitions. According John Weathersby, executive director of the Open Source Software Institute, this is the first in a series of documents that will also address 'development and distribution issues regarding open source within Navy IT environments.'"
The Internet

Submission + - AT&T CEO says to hell with network neutrality

Verteiron writes: The former CEO of AT&T, Ed Whitacre, had some interesting remarks to make about Net Neutrality during his parting speech. Choice quotes include his plans for getting anti-neutrality legislation through: "Will Congress let us do it?" Whitacre asks his colleagues. "You bet they will — cuz we don't call it cashin' in. We call it 'deregulation.' "

More information on AT&T's attitude problem and a video of the speech are available here. There's no sign that his replacement is any better.
Portables

Submission + - The Palm OS ends with a whimper

PetManimal writes: "Computerworld has reviewed the Palm Treo 755p, the last Palm device with the Palm OS, and concludes that the OS is going out with a whimper, rather than a bang. The article says there are some useful improvements (better integration with Exchange and IM, limited speech recognition, etc.) but 'nothing that will make you sit back and say "wow."' Palm already has at least one device with Windows Mobile (the 700w) and soon will make a big push to Linux devices, maybe by the end of the year. But the Palm OS, which was top dog for a while back in the 1990s, and is still used by many people who own Palm Pilots or Treos, is going to quickly fade, it seems"
Programming

Submission + - Practical Ruby Gems, by David Berube

TimHunter writes: "I was skeptical when I first saw the title of David Berube's new book, Practical Ruby Gems, from Apress. Do Ruby programmers really need a book devoted entirely to add-on libraries? Most Ruby programmers already know about the RubyGems package management system, and most already have their set of favorite gems. But, about a third of the way through the book I grudgingly admitted that Rubyists might be able to use this book. After all, even long-time Ruby programmers are unlikely to know about all the gems covered in this book. So then I had a new question. Would I find something in this book that made me say "I didn't know you can do that with Ruby!"

Ruby is an object-oriented programming language in the same family as Perl and Python. The programming language used by Ruby on Rails, Ruby is very popular for writing web applications but also widely used for general-purpose programming tasks. Ruby is open source with a commercially friendly license, and is available for Linux, Mac OS X, and Microsoft Windows. RubyGems is Ruby's system for managing, delivering, and installing third-party libraries and applications. It is similar to Perl's CPAN or the Python Package Manager.

Libraries distributed by RubyGems are called "gems." RubyForge is the central Ruby software repository and the primary distributor of gems. According to sysadmin Tom Copeland, RubyForge currently hosts about 1400 different gems. Of that number, Berube selected 29 useful and interesting libraries for his survey of "practical" gems. All of the gems described in this book work the same on Linux, OS X, and Windows.

Practical Ruby Gems is divided into three parts. Part 1 describes the RubyGems system itself. This part explains how to install the RubyGems software and then use RubyGems to install and manage individual gems. (RubyGems is not part of Ruby's standard distribution, except in the "one-click installer" for Microsoft Windows.) The section entitled "What is require_gem?" in Chapter 3 demonstrates one of the problems with writing technical documentation for a moving target like RubyGems. Practical Ruby Gems describes RubyGems 0.9.0. After the book went to press the RubyGems team released a new version that replaced the require_gem method with a method called simply gem. Currently all uses of require_gem generate a warning message. (The remedy for this mistake is simple: attach a yellow sticky with the words "s/require_gem/gem/g" to page 20.) This is really a nitpick, though. Generally the text and examples in the book work as well for the new release as they did for 0.9.0.

Part 2 is by far the largest and has a chapter devoted to each of the 29 gems. The chapters in this part share a common structure. After a short introduction to the gem, there is a section entitled "How Does It Work?" which explains the purpose of the gem and how it's used. Frequently this section includes a small example. "How Does It Work?" is followed by a complete example script. Then, "Dissecting the Example" steps through each part of the example, explaining how it works and pointing out important classes and methods. The examples frequently combine two or more gems, such as the example for pdf-writer, which also uses the net-sftp gem, and the example for the mongrel web server gem, which also uses the Camping web micro-framework gem.

The examples — always practical, frequently interesting, at least to a geek like me — are the heart of the book. Berube said that "no one wants to pay to read a chapter that regurgitates [the gem's built-in documentation]....I wanted to write a book that you could take the examples and actually be interested in what they accomplished." For instance, Chapter 6 describes the BlueCloth text-to-HTML conversion gem. The example in this chapter is a script that converts lightly marked-up text to PDF by combining BlueCloth with html2ps and ghostscript. Chapter 12 describes the yahoofinance gem, a library for retrieving stock quotes using the Yahoo! Finance API. The example for this library combines yahoofinance with the fxruby GUI library to produce a rudimentary stock ticker in less than 100 lines of code. (The source code for all of the examples in the book can be downloaded from the Apress web site.)

But not every example is perfect. Several of the examples rely on MySQL, which I found a chore to install. I wish Berube had chosen a simpler data base for these examples. I never did get the Camping example to run successfully. I suspect the problem was caused by some change to a gem introduced after the book went to press.

In Chapter 22 I got my "you can do that with Ruby?" moment. This chapter explains runt, a Ruby library for creating "temporal expressions," objects that describe dates that reoccur, such as "every Thursday" or "the last Thursday of every month." The example combines runt with linguistics, a small gem that extends some of the Ruby core classes with methods that support such things as pluralization and conversion from numbers to words. The result is a program that lists a set of dates expressed as "the 3rd Mondays of 2026." I was impressed by both gems, not only for the functionality they provide but by their natural and elegant interfaces as expressed in the example script. I not only learned about two very practical Ruby gems, but something about Ruby programming itself. This particular example may not strike everybody the way it did me, but I believe that most readers will find an equally pleasant surprise.

Part 3 is a tiny, advanced topics section which describes how to create and distribute your own Ruby gems and how to run a private gem server on a local network.

Practical Ruby Gems is not for the novice. Berube assumes that his reader is familiar with programming in general and Ruby specifically, and is also familiar with the operating system in which Ruby is running. This is an appropriate assumption because Practical Ruby Gems will be most useful to readers who are serious about programming Ruby, such as professionals or serious amateurs, or those would like to become professionals or serious amateurs. For that readership, I'm giving the book an 8 out of 10.

Practical Ruby Gems is available in PDF format from the Apress web site at about half the price of the paper book.

I have been programming Ruby as a hobby for over 5 years. I am the maintainer of RMagick, one of the gems reviewed in this book. Apress gave me a review copy of Practical Ruby Gems, but otherwise I have no connection to the author or publisher."
Sci-Fi

Submission + - Using Technology to Enhance Humans

Roland Piquepaille writes: "It's a well-known fact that technology can improve our lives. For example, we can reach anyone and anywhere with our cellphones. And people who can't walk after an accident now can have smart prosthesis to help them. But what about designing our children on a computer or having a chip inside our brain to answer our email messages? Are we ready for such a future? In "Robo-quandary," the Milwaukee Journal Sentinel reports that many researchers are working on the subject. And as a professor of neuroscience said, "We can grow neurons on silicone plates; we can make the blind see; the deaf hear; we can read minds." So will all we become cyborgs one day? Maybe not, but read more for additional details about one researcher's work about transhumanism."
Power

Submission + - SHPEGS: DIY Solar/Geothermal Electricity

rohar writes: "SHPEGS is an open design not-for-profit project to design and prototype a base load renewable electrical generation system suitable for moderate climates and built from common materials. The design centers around creating a local geothermal source with an efficient solar thermal water heater system and can be scaled from the single residence to the mega-project. The project was recently featured in an in-depth The Future of Things article. The heliostat system used in Europe's First Solar Thermal Plant could be used in a scaled down SHPEGS system with Practical Solar's small scale heliostats."
Linuxcare

Submission + - Linux Programmer's Toolbox

Ravi writes: "What does it take to start writing programs for Linux ? Most people will guess a text editor, knowledge of a programming language and the compiler and libraries of that language would suffice. But ask a professional programmer who has been writing code for Linux and he will differ with you and insist that while the three things stated above can very well help kick start ones programs, other things also come into play in writing efficient programs such as a debugger, memory profiler tools and above all a good understanding of the inner working of Linux kernel and its processes.



The book titled "The Linux Programmer's Toolbox" authored by John Fusco is a book which is a store house of knowledge which aims to make the average Linux/Windows programmer aware of the tools at his disposal which can help him write better programs for Linux.

The book is divided into 10 distinct chapters with the first 4 chapters describing various ways of boosting ones productivity while embarking on writing code for Linux as well as getting to know the various tools at ones disposal.

In the very first chapter titled "Downloading and Installing Opensource tools", he talks about the different archive formats commonly used in Linux, various package managers such as Debian's own apt-get, Red Hat's Yum and how to properly authenticate the packages you download to ensure that they are not tampered.

The second chapter deals with building tools from source. Here apart from describing the actual steps involved in compiling the sources, the author also delves into explaining the concept behind the MakeFile, the common variables used in implicit rules and so on. In this chapter one also gets to acquire an understanding of the tools used to create projects as well as examine how these tools work together in the build process.

The book has a chapter exclusively devoted to explaining ways of ambulating through the myriad of documents; tools such as man, info, as well as some of the not so obvious ones. One thing I like about this particular chapter is how the author has provided tables which list a number of recommended manual pages with a short description of each of them.

Linux doesn't have a comprehensive IDE on the lines of Microsoft Visual Studio to develop programs — at least not yet. Most Linux programming gurus are perfectly at home with coding using their favorite text editor. And any book of this stature will be incomplete without a mention of the different editors available for coding in Linux and their pros and cons. The 4th chapter of this book introduces the different editors including Vim and Emacs and discusses their pros and cons. There are numerous tips in this chapter which aims to make writing code much more efficient, productive and a pleasant experience for the average Linux programmer. As a Vi enthusiast, I couldn't help but admire how one can convert Vim editor to work as a code browser with the help of Ctags which is explained in detail.

The fifth chapter titled "What every developer should know about the kernel" is a turning point in the book and gives a comprehensive understanding of the working of the Linux kernel. It is by far the largest chapter — with nearly 100 pages devoted to this topic — in this book. In this chapter the author talks in lucid detail about the different modes in Linux, the process scheduler, device drivers, the I/O scheduler and the memory management in user space, understanding all of which is instrumental in writing better programs for Linux.

The next two chapters deal with Linux processes and the communication between processes. Here one gets to know more about the technical vagaries related to processes such as forking, cloning, process synchronization and the basics of inter process communication. The author has introduced several APIs and basic examples of each.

In the 8th chapter, the author introduces many tools which are installed by default in most Linux distributions which aid in debugging communication between processes. The tools include (but are not limited to) lsof, fuser, stat, hexdump, strace and so on. And each tool is accompanied by its usage and its output with a short discussion of the output.

In the 9th chapter titled "Performance Tuning", one gets to know more about fine tuning ones Linux program. Here the author explains the factors affecting system performance as well as the tools for finding system performance issues.

Finally, the last chapter of this book explores some of the most common debugging tools and techniques for Linux. More specifically, I found the discussion on the use of GNU debugger quite informative.

At the end of each of the 10 chapters in the book, the author has provided a short synopsis of the tools that are used. Also many additional online resources have also been listed where one can acquire more knowledge about the topic being covered. Through out the book, noteworthy sections have been highlighted in dark background which makes it quite eye catching and also easy for quick reference.

The book is written with a slant towards the C language especially when depicting the examples in the latter half of the book. But that is something which can be understood considering that the bulk of the Linux kernel has been written using C language.

Most programmers with Windows background will be forced to make a paradigm shift while embarking to program for Linux. While the Windows programmers are used to taking deceptive comfort within the cozy confines of a Visual IDE, when they make the shift to write Linux programs, they are suddenly faced with the hard facts of programming as it really is. And this book could be an ideal companion for this set of programmers who wish to lessen their learning curve and make programming for Linux a much more pleasurable experience.

Having said that, I found this book to be an excellent resource for any programmer (not necessarily only of Windows background) who wish to develop programs for Linux.

Ravi Kumar is a Linux enthusiast who maintains a blog related to Linux, Open Source and Free Software at linuxhelp.blogspot.com."
Programming

Submission + - Shredded secret police files being reassembled

An anonymous reader writes: German researchers at the Frauenhofer Institute said Wednesday that they were launching an attempt to reassemble millions of shredded East German secret police files using complicated computerized algorithms. The files were shredded as the Berlin Wall fell in 1989 and it became clear that the East German regime was finished. Panicking officials of the Stasi secret police attempted to destroy the vast volumes of material they had kept on everyone from their own citizens to foreign leaders.
Robotics

Submission + - Soliders Bond With Bots, Take Them Fishing

HarryCaul writes: Soldiers are finding themselves becoming more and more attached to their robotic helpers. During one test of a mine clearing robot, "every time it found a mine, blew it up and lost a limb, it picked itself up and readjusted to move forward on its remaining legs, continuing to clear a path through the minefield." The man in charge halted the test, though- "He just could not stand the pathos of watching the burned, scarred and crippled machine drag itself forward on its last leg. This test, he charged, was inhumane." Sometimes the soldiers even take their metallic companions fishing. Is there more sympathy for Robot Rights than previously suspected?
Education

Submission + - Real Open Source Applications for Education?

openeducation writes: I have been researching open source solutions for K-12 education pretty heavily for the past year and have been disappointed to find no real alternatives to the large administrative applications like student information systems, data warehouse, ERP, etc. But recently, I ran across Open Solutions for Education. http://os4ed.com/ This group appears to be making a serious effort at creating a stack of applications that are open source alternatives to the large and costly commercial alternatives. Centre, an open source student information system that has been around for awhile, is part of the solution stack. http://www.miller-group.net/ They have a data warehouse and are proposing an open source SIF alternative and an assessment solution. While the proof is in the pudding, these guys have working demos and they look pretty good for a first run. K-12 education in dire financial straits and solutions like these could help with lower TCO. Plus, education is a collaborative industry already, which makes perfect sense for open source.

Slashdot Top Deals

The most difficult thing in the world is to know how to do a thing and to watch someone else doing it wrong, without commenting. -- T.H. White

Working...