Letters

Nitrous.IO

Thanks for a letter by jschiavon in the September 2013 issue that mentions his use of Nitrous.IO. It's absolutely brilliant. Thanks jschiavon!


Amit Saha

Article on the Command Line

Regarding Janos Gyerik's article “Time-Saving Command-Line Tricks” in the September 2013 issue: what a let down—simple, not especially useful tips that largely missed the point. For instance, the author assumes vim as the editor of default. A good choice, but if you know vi, then set -o vi in bash is far superior than using the default. Then editing a config file: set aw in vim, then from within vi run :!command to start the service. It's much better than starting a new window. Did I write the file in the other window? Who cares? set aw does it for you.

I'm afraid the rest of the article was just not especially useful either. How about the whole writing a script with vi and set aw? No need for the save, exit, run, fail, re-open editor cycle. Pah! UNIX is God's gift, and the command line is fantastic, but this was no exposition of that.


Graham Nicholls

Janos Gyerik replies: I'm glad that you already master this stuff. I wrote the article because too often I see folks not using half of these moves. It's not fun to watch them crawl when they could fly. As for vim, I didn't assume anything. If you look closely, the focus there is on the screen utility and how it lets you juggle multiple different activities.

Graham Nicholls replies again:

You've entirely missed my point. These tips are okay, but nothing special, and in some cases, they are just plain wrong. In fact, having assumed the use of vi(m), which you have (your mention that less works like vi, for instance), set -o vi at the bash prompt is infinitely more powerful than using the default Ctrl-r and so on. You make the point that less is somewhat vim-like, but you miss that the shell can be also. I think you're selling people short by offering something that is less than optimal. I'm sure screen is very useful, but having a decent tabbed terminal emulator (konsole, for example in X; mremote or poderosa in the Windows environment) renders it somewhat irrelevant to me.

As a UNIX user of >25 years, yes, I have mastered this stuff, but I also teach for a large international training organisation (in addition to my day job). In that role, I urge my students that if they expect to use UNIX (read Linux) every day, learning vi is a good idea. Then I show them the power of set -o vi (at the bash prompt), which leverages the power of vi in command-line editing. Finally, I show them how using vi with autowrite switched on makes writing (for instance) scripts or config files very easy.

Suggesting that people have multiple screens open and write the file in vim on one and then restart the dæmon in another is just plain bad. Rather, show them how in vi they can run a shell escape, which with autowrite switched on, will write the file first, then call the shell-escaped command. No more “did I save the file in the other session?” nonsense. No more “how do I get back to the session where I was editing the file” either. In my experience, and opinion, your method will lead to errors and misunderstandings. Restart the dæmon without saving the file = confusion.

Another advantage that vim has in this instance is that you get a history of shell escapes that you can edit, using vi, from within the file—now that's how to write a config file. Using screen by comparison is like using a slide rule for computing advanced calculus. It's perfectly possible, but why would you?

Janos Gyerik replies again: To you, maybe, the tips are nothing special. Believe it or not, I see many seasoned Linux users not using these moves. Using Ctrl-r is a great improvement over pushing the up arrow 20 times. Using Ctrl-a is a great improvement over using the left arrow to get the cursor all the way to the start. And using screen on a remote server is a great improvement over opening two terminal tabs to the same remote server. You gotta give me that.

I did not assume that readers use vim. The text talks about editing a configuration file, and then in the example command, I used vim. Replace it with your favorite editor, and the text still makes sense. I mention vim a second time later to highlight the similarities with the shortcuts in the less command. That's just a small remark—not knowing vim is no disadvantage for the reader. Vim was not the message of the article. Replace it with pico, nano or emacs, and the message still will be the same.

You say that set -o vi is “infinitely more powerful” than the tricks I highlight. Sure, and C is infinitely more powerful than bash, isn't it? But sometimes a bigger gun is neither the most practical nor the most ergonomic. Vim is my favorite editor, and I love to be efficient on the command line, but set -o vi is not practical for me. I think set -o vi is too advanced for the vast majority of Linux users of all levels.

Regarding screen, note that I emphasized using it specifically when working on remote servers. Search for the term “remote” through the article, and you will see. If you take a look at the last paragraph about screen, I explicitly discouraged using it locally, and recommended tabbed terminal emulators instead.

You talk a lot about editing config files and restarting dæmons, but that's missing the point. Those were example activities you might do on a remote server. The point is doing many things at the same time. Read a man page in one window. Tail a log file in another. Compile source code in a third. Run a debugger in a fourth, and so on. You could replace the editing config and restarting dæmon examples with these or other activities, and the article still makes sense. What you do in the examples was not the point. The point was that you can do many things.

DDOS—Sendmail in Script

To Dave Taylor, regarding his article “Web Administration Scripts—Redux” in the September 2013 issue: just wondering, you say that -s for subjects is not supported by the sendmail client, but you can, of course, create a text-template-email where you can support all the (data-part smtp) headers you want, including a subject. When your instance of the template is ready, just feed it through a pipe to sendmail, and you've got everything you want, right?

Or, it is always possible I'm not understanding what you're doing, of course, in which case I'd ask you to discard this.

I appreciate your monthly article, Dave. Keep it up.


Lieven

Dave Taylor replies: You're absolutely correct! Indeed, it'd be easy to have something like “sendmails” that simply accepted two arguments, $1 as the recipient and $2 as the subject:

( 
echo "To: $1"
echo "Subject: $2"
echo ""
cat - ) | sendmail 

Then, you'd invoke it as:

sendmails lievendp@gmail.com "this is a sample sendmail wrapper"

Is it elegant? Nah. But it'd work.

Thanks for your e-mail and for reading my column!

Oculus Rift First Impressions and Official Linux Support

You should check out this editorial and video: www.gamingonlinux.com/articles/oculus-rift-first-impressions-and-official-linux-support.2133.


Liam Dawe

Dangit, Liam. I've never wanted to try a piece of hardware so bad!—Shawn Powers

Reading Suggestions for Jeff Regan

In the September 2013 issue's Letters, reader Jeff Regan laments reading LJ on a tablet. He is right; tablets are terrible for reading. I highly recommend the B&N Nook Simpletouch or other E Ink device for reading. I have rooted mine (Android 2.1, which is enough to use Anki, read PDFs and do light Web browsing), and it has redefined the way I read. I cannot recommend it highly enough.


Dotan Cohen

My last magazine-worthy tablet was an original Kindle DX, and although it made large format files readable, its speed (or lack thereof) made it frustrating. I'm guessing newer devices have better refresh rates and cleaner displays. I'd still miss the color though. Color E Ink, please come quickly!—Shawn Powers

Coarse Language

The language in the title of Doc Searls' article summary on Linux is entirely inappropriate [see Doc's “Linux vs. Bullshit” in the September 2013 issue]. Each of our acts moves standards and behaviour up or down. This moves things down.

Not good.


Bryan Batten

Doc Searls replies: My main source for the column was On Bullshit, an academic work by Harry Frankfurt, a professor emeritus of philosophy at Princeton. It is, as far as I know, the only deep investigation of a vernacular English word that carries a high degree of meaning and for which there is no synonym. That it's also vulgar does not give us cause to avoid it. Could be that understanding it better might help us create a true synonym that isn't vulgar.

I believe Linux is also vernacular (though hardly vulgar) and visited this possibility in a column titled “The New Vernacular” in 2001 (www.linuxjournal.com/article/4553).

Renewed Subscription

After many years of reading the paper version of LJ, I sadly had to let my subscription lapse when you went all electronic. It simply didn't fit with where the magazine went—for example, in the car, by the pool, cricket pitch and various others places whilst waiting for numerous kids to finish whatever they were doing. Although I had access to computers, none were portable enough for this use, and I couldn't justify the cost of another one. Yesterday, my new Nook arrived for £79 delivered—bargain.

But you never forgot me, sending me regular e-mail messages and inviting me back, so last night, I downloaded the free version and found all my favourite authors still there to entertain and inform us. I renewed immediately, of course. Thank you, and all the best for the future.


Roger Greenwood

Roger, welcome back! Our original switch to digital was at a rough time in technology's evolution. There were tablets, but they weren't mainstream enough (or affordable enough). I'm glad to hear the Nook is working well for you.—Shawn Powers

September Letter “Electronic vs. Paper”

First, I am glad I renewed my subscription to LJ. I was a longish-time paper magazine subscriber. I do have some sympathy with those who would prefer a paper copy, but the copies on my hard drive do take up less room.

Anyway on to business—I am a member of the Radio Society of Great Britain (RSGB), which runs an excellent Web site full of useful news and radio-amateur-centric information, which practice, I believe, Linux Journal has copied successfully. However, the RSGB also brings out in the autumn (for Christmas) a “Year Book” that repeats much of the technical specifications found on the Web site plus relevant articles on things radio, such as the advantages of building receiver type X over receiver type Y and so on.

I just wanted to add this to any thoughts LJ may have in this direction. I certainly look at my copy a number of times in the year, as it is just so much more convenient and quicker than using the desktop. I know you do an archive CD, but a book makes a better present.


Roy Read

Gift giving—that's an interesting notion. I agree it's difficult to wrap 1s and 0s. Although I can't promise anything, thank you for the idea. It's worth considering for sure.—Shawn Powers

How Would the World Be According to Free Software?

I'm Rafael Cervera, Communication Manager of www.portalprogramas.com. We have just published “A world inspired by the philosophy of free software”, an infographics article about Software Freedom Day, with thoughts about what would happen in a world ruled by the free software philosophy, such as:

  • Affordable health care for all due to no patents for medicines.

  • Real open government, so Wikileaks wouldn't be needed.

Also, you'll be able to find some fun facts and advantages of free software that will amuse your readers for sure, such as Coca Cola's secret recipe would be public.

You can see it and get more information at www.en.portalprogramas.com.

You are free to share this work as you wish; it is under a Creative Common license.

I remain open to any feedback. Thank you very much for your attention.


Rafael Cervera

Thank you for the link and for the information. The geek in me instantly thought of the Star Trek world, where monetary gain is no longer the driving force of humanity. Is it possible outside fiction? I don't know, but again, I appreciate the link. Very cool.—Shawn Powers

Reuven M. Lerner's Column on the Historical Web

To Reuven M. Lerner: I really enjoy reading your column in Linux Journal. It is one of the columns that I can say, “he knows what he is talking about.”

However, in the September 2013 issue, when you look back over Web development history, you didn't mention any Microsoft technologies. I am not affiliated with the company, and I know it's not the magazine's main target, but for a historical column, I think Microsoft deserves to be mentioned. With its Web-develop NET frameworks, it evolved and diverged from the company's vision and become more and more open source. It's still investing on the cloud with Azure, and I think it actually moved the bar up for every technology provider.

Regardless, I enjoy your column. I think it would have been a lot nicer if you were more objective like a historian.


Can

Reuven M. Lerner replies: Thanks for your message. I often tell people that there are open-source people who hate Microsoft, and then I explain that I'm not one of them. Rather, I say I'm an open-source person who more or less ignores Microsoft—that I know it's a major (indeed, dominant) force in the computer industry, but that it doesn't directly affect my day-to-day life, and that I'm rather ignorant about its technologies.

There are oodles of smart people working at Microsoft, and they have clearly done a lot to advance Web technologies. But I must admit that I know nothing, or almost nothing, about those technologies.

So for me to have written about Microsoft technologies would have undoubtedly demonstrated my ignorance, and/or required research that I don't have time to do. That said, I completely accept what you're saying, and I probably should have noted that the column was based on my personal experience, and the technologies I personally used—meaning that I undoubtedly left out a lot of influential and important ones.

It's always great to hear from people who read my columns, even when you're being critical. Thanks again for writing, and always feel free to let me know what you think, or if you have any suggestions for future topics.

Dave Taylor's DDOS

I'm wondering if Dave Taylor has tried ModSecurity to fight his DDOS [see Dave's column in the August and September 2013 issues]. I'm evaluating it for my own use, and it seems like it could help. If the attacker is placing something unusual in the HTTP headers, like a special user-agent string, ModSecurity can be used to drop the connection before the request is processed.

There is a reasonably good e-book about it at www.packtpub.com.


Paul Gassoway

Dave Taylor replies: Thanks for your suggestion, Paul. As it happens, I ended up just moving to a new hosting company that has a team focused on helping out with these sort of problems after all!

Work the Shell Idea

As a blogger who deals with climate and weather, sometimes I like to know right away if a major sudden event is happening, such as a tsunami. The National Weather Service has a tsunami alert system (@NWS_WCATWC) on Twitter. Whenever there is an earthquake, and there is no tsunami expected, they tweet something that includes “Tsunami NOT expected”, but when there is a tsunami expected, they tweet a different string (along with info on the event).

I would like to see a script that regularly checks Twitter (as a chron job) for reliable sources (such as the NWS specialized feeds and so on) for certain key phrases, and if there is an event indicated, then to search Twitter for an appropriate hashtag (such as #tsunami and #[place it is happening]). The script then should send me an alert of some kind, so I can look at the list of tweets to figure out what is going on.

This is a little like the DDOS script, because if you just search for #tsunami on Twitter, there would be mostly junk most of the time, but when there is an official alert, the #tsunami hash tag would include a lot of actually useful information.

A new script by Dave that uses the current Twitter API would be useful, as that changes now and then, and a script that includes parsing a select Twitter feed, responding to that feed by then parsing other feeds, would be intelligent(ish) and a great demonstration of how to use a remarkable 20th-century technology (bash, Linux) to solve a problem in a very 21st-century way.


Greg Laden

Thanks for the Unicode Article

To Reuven M. Lerner: I am a systems administrator, and to be honest, I normally skip over your articles in Linux Journal. However, I've got to give you some credit. The article on Unicode in the June 2013 issue was spectacular.

You clearly and concisely explained Unicode, and for the first time, I understand how UTF-8 works and why it has become so popular.

Thanks for the great article!


Carl

Reuven M. Lerner replies: Thanks for the warm feedback; I'm delighted to know that you enjoyed the article!

Photo of the Month

Enjoy.


Can Erten