Letters

Temper Temper

Great journal—I always find many articles very interesting. Regarding Kyle Rankin's article in the August 2010 issue, as a cheaper alternative to a $15 USB stick, I suggest the DS18S20 –55°C to +125°C one-wire chip. These $2 T092 devices interface to a comm line using one resistor, two diodes and two zener diodes. Multiple devices (and other one-wire devices) can run in parallel providing a sensor at multiple spots. Each chip can be uniquely addressed, which then returns the temperature as a string with 0.5°C accuracy.

Naturally, there are LX drivers, and a search for DigiTemp will provide code plus diagrams. With regard to Kyle's mention of “$15 and spare parts to control a fridge”, I use a $200 X10 controller (Ocelot) connected to my SUSE mail server to control several floodlights. These are triggered by X10 transmitters, cron jobs and by e-mail messages stating, for example, “x10 patio on”. A serial interface to the Ocelot and just two X10 modules (DIN AD10s) cost around 100 GBP—hardly what I would call “spare parts”.


Chris Seager

Kyle Rankin replies: Thanks for the reply Chris. When I'm ready to break out my soldering skills, I'll have to give your solution a try. Unfortunately, I'm less advanced on the electrical engineering side, so the USB thermometer made things simpler for me. You wouldn't believe how many spare X10 outlets I have lying around, but back when I bought them, each outlet module was around $5–$10, so it sounds like they are way more expensive now.

Shockwave Flash Videos

Some of us who use Linux have a terrible time getting Shockwave Flash videos to play. How about making all your videos available for download in another format, like OGV or MP4? For the record, I am one of your subscribers. Here is the video that I could not watch: “Shawn Powers shows us a very quick way to take screenshots using Compiz under Linux. Yes, there are plenty of screenshot tools available for Linux, but Compiz allows for a literal one-click method.”


Volker

We always provided a link to OGV files, but apparently something went wrong with the Web site change-over. We'll have to fix that! Thank you for the note; it was just an oversight.—Ed.

OSWALD Article and FOSS in Education

I enjoyed Victor Kuechler and Carlos Jensen's “The OSWALD Project” in the August 2010 issue, and I look forward to more similar articles and projects. Computer Science education certainly faces challenges, including periods of boom and bust enrollments. It's also difficult for students and teachers to keep up with the rapid pace of change.

However, team-based integrative projects have been used for many years. FOSS expands the opportunities for such projects, and there is a growing community of educators who use FOSS. For example, Seneca College has hosted a Free Software and Open Source Symposium annually since 2002 (fsoss.senecac.on.ca). The Humanitarian FOSS Project (hfoss.org) is a collaborative project with NSF support to engage students to build free software systems that benefit communities. Some FOSS projects have student mentoring programs and flag tasks that are most suitable for student projects. For more information, see the Teaching Open Source Wiki (teachingopensource.org).

I use FOSS in my teaching, and I have been very happy with the outcomes, although different types of FOSS offer different benefits and risks for students. Some projects, such as OSWALD, have close ties to academic institutions, which can provide guidance and continuity, although it can be difficult for students or other developers outside the institution to get involved. Other projects, such as Drupal and Moodle, are much larger and more decentralized, so that students learn to interact with a wider variety of people. There are also countless small FOSS projects with opportunities for students.

To encourage and support FOSS in education, LJ readers could: 1) encourage prospective students and parents to seek out academic programs that actively use FOSS; 2) welcome students and teachers into FOSS projects and help them find suitable tasks within the project; and 3) contact local institutions and offer to talk about FOSS projects and mentor student teams.


Clif Kussmaul

I completely agree! Pushing FOSS into schools is one of my passions, and seeing colleges accept such practices is very encouraging. Thank you for fighting the good fight!—Ed.

Better Beer

Regarding Kyle Rankin's “Temper Temper” article in the August 2010 issue, I also built a temperature-controlled beer fermentation chamber but used an Arduino as the data-gathering computer. The Arduino measures the temperature using a simple thermistor and uses the Ethernet Shield to allow other computers to get the current state. My desktop Linux computer runs a cron script to get the current temperature and then (like Kyle's project) turns on/off the fridge using X10 modules. I also added another input to allow the current on/off state of the power to the fridge to be determined. This uses a simple nightlight in the same circuit as the fridge (the light is on when the fridge is on) and a photo resistor to measure the light state. My control will turn on/off the fridge when the temperature reaches the appropriate value but will send the on/off command only one time if the temperature is still at the appropriate limit.

Since I have SSH access to my desktop Linux computer from the Internet, I am able to get the current temperature and power state from anywhere, including from my Android phone. This has been very helpful, as one time I checked the temperature remotely and found that the Arduino was not responding. A call to my wife indicated that we'd had a power outage and the Arduino needed to be reset, which my wife was able to do. My next step is to incorporate the real-time data plotting using kst as discussed in Rob Reilly's article “Real-Time Plots with kst and a Microcontroller” [also in the August 2010 issue]. Better Beer through the use of open-source hardware and software!


Ralph Noack

Hard Drive Costs?

In the August 2010 issue, the LJ Index lists item #11 as “hard drive cost per gigabyte in 1990: $53,000”, but this is wildly high, even when considering the source listed.

$53k/gigabyte is $53/mbyte, and prices far less than that were listed prior to 1990 (as far back as October 1987). In addition, that's Canadian money, which in 1990 was about 85 cents to the US dollar.

The reason I remember this is that in 1989, I purchased a Control Data 383MB drive—one of the best you could get at the time—for $1,800, which (rounding up) is around $5,000/gigabyte.

But, it's certainly true that the drop in cost for both hard drives and RAM has been breathtaking. It's a great time to be a consumer.


Steve

Mitch Frazier replies: Well shoot, just when we thought we'd cleaned up the last of the bad and misleading information on the Internet.

Tripping Over Traps

I'm writing in response to E. Thiel's Letter to the Editor in the May 2010 issue, regarding Dave Taylor's use of trap 0. Although 0 is not a signal, it is trappable; it traps the exit of the shell and is sometimes used for cleanup code. Here's an example of its use:

#!/bin/sh
trap 'rc=$?; echo goodbye; exit $rc' 0
echo hello world

Particularly notice the way I saved the return code during execution of the trap and restored it for the final exit.


David Newall

Commons Interests

I should first say that I'm not a lawyer; I'm just some yahoo that took a few minutes to read and enjoy Doc Searls' excellent EOF column in the June 2010 issue and then read the text of the six basic Creative Commons licensing agreements on-line.

It seems that the Creative Commons licensing agreements don't appear to be exclusive agreements. Each of the six basic CC licensing options say, “Any of the above conditions can be waived if you get permission from the copyright holder.” I couldn't find a clause that would restrict the author to the same “copyleft” restrictions. If that is the case, it would seem that the copyright holder has typically broad use rights so long as (s)he takes care not to invalidate the CC license. That seems to suggest that others can make derivative use of the IP published under the CC license but, for example, could not freely use NBC's works just because they included material that has been released under a CC license elsewhere.

I would simply echo the comment of your one commenter. Yes, it really is very nice of you to freely share your work, with or without encumbrances, and we are all the better for it.


Hal Lasell

That's Now How rsync Works

Your example [August 2010 issue Letters] does not describe how rsync works correctly:

cd /tmp/
mkdir a b
echo a/c >a/c
echo b/c >b/c
touch -r a/c b/c
cp -u a/* b/
cat b/c
rsync -a a/ b/
cat b/c

rsync doesn't update b/c, either! rsync compares metadata (size and timestamp) first; if they're the same, then it will not update the data (unless -I is specified). In this case, they're the same due to the similar contents and the touch -r.


John Wiersba

Thanks for pointing that out. I mistakenly thought that rsync did a more complex analysis when deciding what needed to be copied and what didn't.—Ed.

Libmobiledevice

Dirk Elmendorf commented in his August 2010 article that he had issues with the iPhone under Linux. Libmobiledevice (www.libimobiledevice.org) now has delivered near complete support for current-generation iPhones and iPods. Not only is this fantastic, as it liberates many of us Linux users from the last vestige of a dependence on another OS, it also merits an in-depth look from Linux Journal.


James Ervin

Don't Leak!

In his August 2010 article on CouchDB, Reuven M. Lerner appears to have committed a basic security error. He published the names and plausible birth dates of real people (his own children).

Admittedly, the details of some toddlers are unlikely to be useful to scammers for some time, but they are exposed to other dangers.

When creating test data, especially if they are to be published in an article, real names and personal details should never be used. Make up random names, dates, addresses and other personal attributes. If imagination fails you, use fictional characters (from out-of-copyright materials, unless you enjoy talking to lawyers).

Every test case should have some particular purpose. It's actually much better to use string fields to document the purpose of the particular record in the set than to fill it with fictional noise. (You may have to make an exception to this if you are demonstrating to a particularly stupid or literal-minded audience who cannot cope with anything but realistic-looking examples.)

Even if you never expect test or sample data to be revealed outside your office, department or closed group, keep it bogus. Recording the address and phone number of attractive colleagues might expose them to unwelcome attentions.

Phishers go to a lot of trouble to collect personal details. Don't make their lives easy.


Alan Rocker

Reuven M. Lerner replies: I appreciate Alan's point about leaking personal information. I would use only information about people whom I know and from whom I've received permission. Fortunately, my children are ecstatic every time their names appear in Linux Journal, and they are quite happy to provide me with sample data. Maybe I'm naive, but I'm simply not worried about their names and birth dates being available on the Internet. That said, we do take precautions with my children's access to the Internet, in order to protect them from potential harm. I just don't think that hiding their names or birth dates needs to be part of those precautions.

Photo of the Month

Have a photo you'd like to share with LJ readers? Send your submission to info@linuxjournal.com. If we run yours in the magazine, we'll send you a free T-shirt.

Here is a picture of the entertainment system booting Linux in an Airbus A320. Submitted by Ariel Martinez.