Letters

Readers sound off.

Letters

Calculator

Thanks for Dave Taylor's Work the Shell column in the December 2007 issue of LJ. I learned some new things from it. Truth be told, most of the articles in LJ are irrelevant to me, but I slow down and pay attention when I come to Dave's column.

Dave didn't mention it, but surely he knows about calc (isthe.com/chongo/tech/comp/calc)? This is a very powerful command-line calculator that I use often.

In the interest of full disclosure, Landon Curt Noll happens to be a personal friend who wrote calc long before I became acquainted with him. Keep doing what you're doing in LJ.


Bob

Dell Linux Systems

I'm part of the reason Dell is showing weak sales on Linux systems. I just purchased a slightly upgraded Dell Inspiron 530 for $579.75 with Windows XP, and I'm reformatting and putting Linux on it the day it arrives.

I considered getting the identical FreeDOS or Ubuntu version, but they were several hundred dollars more expensive, because they offer only a $150 rebate instead of the $360 rebate that you get with Windows!

Something stinks at Dell when a Linux or FreeDOS box costs $210 more than an XP box.


Stanley Miller

Thanks for the Games

Thank you for three game articles in the December 2007 issue of Linux Journal. I am glad to see progress in Linux gaming. Games are the only reason I still have a Windows partition on my computer. The best first-person games are still only on Windows (BioShock, Oblivion and so on). Fortunately, my favored strategy game does have a Linux version: Dominions 3 (www.shrapnelgames.com/Illwinter/Dom3/1.htm).


Richard

More Business Content, Please

I was recently browsing through the archived articles of Linux Journal on www.linuxjournal.com, and I noticed that the past year or two has marked a decline in the number of articles targeted at business Linux users. Recent articles have focused more on home and educational users and developers than on the business administrator.

I understand that it's a struggle to find a balance between which audiences you target, but as the manager of an Information Technology department for a medium-size business, I would appreciate more focus on the business administration side of things. I'm looking for articles that give me good, detailed suggestions on how and where Linux can be useful to my organization. It's great to read an article about thin clients, LTSP and how the two can be used together in a lab environment for students in a school, but I don't have large lab environments with various people coming and going all day using the same machines. I have cubicles where the same people sit down at the same desks every day and use business applications, like Microsoft Office and Visual Studio. How about some articles that tell me how I can implement OpenOffice.org without making my users angry and without making it impossible to interact with all of our customers and suppliers who use Microsoft Office? How about articles that present methods to migrate Microsoft Access Databases (I use the term “database” coupled with “Microsoft Access” very loosely) to open-source RDBMS systems with Web interfaces? Articles focusing on ERP systems for businesses? Of course, I'm not suggesting that you turn your attention entirely or even primarily toward business users (unless, of course, you'd like to fork another edition of LJ), just that you bring some of the focus back to that area. Also, I realize that Doc Searls has his Linux for Suits column, but the times I've read that, it seems to read more like the editorial page of a newspaper and less like a practical guide for implementing Linux in a business environment.

Finally, because of some of the editorial comments I've read in LJ about the Novell/Microsoft agreement, I have to put in my two bits about the deal. I understand the strong anti-Microsoft reaction of Linux purists everywhere, I realize that it certainly isn't an ideal situation, and I understand the wary attitudes with which people approach the deal and say, “What kind of stunt is Microsoft going to pull this time?” That's all completely understandable. However, as I said before, I manage an IT department, and Novell is helping me save loads of money on Microsoft licensing and is providing some very promising prospects for alternatives to Microsoft software in the very near future, along with some prospects for more interoperable systems between Microsoft's software and non-Microsoft software. Of course, I, too, am a bit cautious about what Microsoft sees in the deal, but I'm also a very satisfied Novell customer and see a lot of potential for their products to, at the very least, become a gateway out of the Microsoft world and into open source.


Nick Couchman

We appreciate your comments Nick, and we'll try to include more business-oriented articles soon.

Determinism

I enjoyed Roman Shaposhnik's article “Roman's Law and Fast Processing with Multiple CPU Cores” in the November 2007 issue of LJ, but he too briefly touched on an issue with large future implications. The problem isn't finding ways to make threads more deterministic; the problem is in our assumption that computers should be deterministic. A reliance on determinism works for processing on 8, or 16, or even 256 cores, but what about 256,000 cores? Or 256 million cores? As elements flicker in and out due to errors and faults, these creations will be better imagined as statistical ensembles than simple machines, no matter how many OSI-like layers are created. As a developer, you can become comfortable with ways to flesh out the gotchas that occur in parallel environments, but there is only so far that tools and insights can go if they are based on the wrong foundation. At some point in the future, we'll need to trade our Boolean yes or no for a Bayesian degree of belief. The software community has started to get a taste of this in loosely coupled aggregates like grids, but there is much, much more to come.


Jon Dunfee

Baffled

I have been a reader of Linux Journal for many years and find something to enjoy in every issue. I was, however, somewhat baffled by your inclusion of Sandeep Sahore's Tech Tip on his program showdate in the November 2007 issue.

Although it is indeed very useful to determine dates in the past and future, showdate is entirely unnecessary, and by the author's own admission, broken and quirky.

May I present GNU date, included with every distribution of Linux I have ever used (source available for your favorite UNIX, naturally). For the benefit of your readers, I have duplicated the examples from the showdate Tech Tip and added a few more.

The date ten years ago:

$ date --date="10 years ago"

Same as above in epoch seconds:

$ date --date="10 years ago" +%s

Five years, two months and 23 days from now in the format YY-MM-DD:

$ date --date="+5 years +2 months +23 days" +%y-%m-%d

With date, when you combine + and - in one command, it does the right thing (unlike showdate):

$ date +%y-%m-%d
07-12-05 (now)
$ date --date="-5 years +2 months +23 days" +%y-%m-%d
03-02-28 (2 months and 23 days after 5 years ago)

Schedule an at job 12 minutes and 35 seconds from now:

$ at -t $(date --date="+12 minutes +35 seconds" +%Y%m%d%H%M.%S)

Date isn't broken by large numbers:

$ date --date="+1000 years"
Sat Dec  5 16:41:40 EST 3007
$ date --date="+10000 years"
Wed Dec  5 17:01:17 EST 12007

Date understands weeks too:

$ date --date="+3 weeks"

Date is even more flexible, for example, all of the following are valid:

$ date --date="yesterday"
$ date --date="tomorrow"
$ date --date="last thursday"
$ date --date="+2 weeks yesterday" (two weeks from yesterday)

In fairness, like many GNU programs, a lot of the above is documented only on the info page (not the man page).


Joshua

Another Tip on a Tip

This is in response to the Tech Tip on page 92 of the January 2008 issue, “Removing Duplicate Lines in Unsorted Text without Losing Input Order”. If you have Perl installed (most distros do), you could do it like this:

$ perl -ne'$x{$_}++||print' /tmp/numbers



John W. Krahn

Bash Can Do It

I was surprised and dismayed to see Dave Taylor resort to Perl to map letters to numeric values, in his January 2008 Work the Shell column. He states that the shell can't do this easily: “There's nothing I can imagine without extraordinary levels of effort.”

Perl is not needed; bash can do the same thing easily:

ordvalue=$((`printf "%d\n" "'$letter"`-96))



Russ Turner

Dave Taylor replies: Cool. I didn't know you could do that!

Get a Clue

Mick Bauer's column “Getting a Clue with WebGoat”, in the January 2008 issue of LJ, was missing a few clues. After some trial and error using Ubuntu 7.10, I found all the “Gutsy” clues. Mr Bauer left me clueless on setting the JAVA_HOME variable. The QRG is:

$ sudo apt-get install sun-java5-jdk
$ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
$ wget http://webgoat.googlecode.com/files/
↪Unix_WebGoat-5.0_Release.zip
$ unzip Unix_WebGoat*.zip
$ wget
http://downloads.sourceforge.net/owasp/
↪webscarab-installer-20070504-1631.jar?modtime=1178324741
$ java -jar webscarab-installer-20070504-1631.jar
$ java -jar "/home/username/WebScarab/webscarab.jar"
$ sudo sh ./webgoat.sh start80

What doesn't kill me makes me better.

PS. I like (intentionally, I hope) that the use of Tomcat was installed with WebGoat and that in the same issue Alan Berg had an article on efficiency tricks with Apache and Tomcat titled “Separate the Static from the Dynamic with Tomcat and Apache”. As my first use of Tomcat was with WebGoat, touching on Tomcat later in the issue gave me a chance to further explore Tomcat. Bravo.


sbaker813

Iceweasel Clarification

In the January 2008 issue of Linux Journal, Kyle Rankin wrote an article concerning anonymous Web browsing. Although the bulk of his content appears accurate, I noticed a fairly big mistake in one reference regarding the Knoppix LiveCD. He refers to Iceweasel as “Firefox's name on Knoppix”. This is inaccurate. Iceweasel is the forked browser based on Firefox, built initially by the Debian distribution. Iceweasel relieves the non-free issues that are part of the Firefox browser, as the Firefox browser cannot be redistributed using the Mozilla Firefox name or logo if any changes are made by a distribution.


Christer Edwards

GRUB Security

I enjoyed the “The Tao of Linux Security” article by Jeramiah Bowling in the January 2008 issue of Linux Journal. I do have one small tip for the author, however. He suggests setting a password to the GRUB bootloader by adding password yourpasswordhere below the timeout line in the GRUB config file. Although this is technically accurate, if we're shooting for security, let's try not to leave passwords lying around in plain text.

Most major distributions should ship with the grub-md5-crypt command that allows you to generate md5-hashed passphrases for the GRUB bootloader. I suggest that anyone applying a GRUB security model would use this tool to generate an md5-hashed password and use that via the syntax password --md5 pasteyourmd5hashhere.


Christer Edwards

More Work the Shell Tips

In the January 2008 issue of Linux Journal, Dave Taylor is musing over “how do you step through a word, letter by letter, in a shell script”, and later, “how do you convert characters into corresponding numerical codes”. Here is how (bash):

in=linux
while [ -n "$in" ]; do
   val=$(($(printf %d '"'${in:0:1}) - 96))
   echo "... letter ${in:0:1} has value $val"
   in=${in:1}
done

As for the Perl code used later in the same article, the simplest way to get from a string a list of corresponding byte codes is to use unpack with a C* or c* pattern. So the following Perl gives the result he is after:

@values = map {$_ - 96} unpack "C*", "linux";

A corresponding list of “letter keys” will be produced by split //, "linux";. Of course, variables could be used in place of literal strings.


Michal Jaegermann

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState