Learning to Love the Command Line

Having been living in Linux for a while (and to a lesser extent, Mac OS X), I’ve had to learn a bit about the ways of the command line. As someone who’s only other experience with a command line interface was with DOS (with which I was about as adept as one could be), I was skeptical of the value of the command line interface, and reluctant to learn.

That said, I have come to learn that while a command line interface makes it difficult to discover what options are available to you, it does come with some inherent advantages. While I’m certainly not willing to give up my graphical user interface for a text-based console any time soon, I have learned to keep a terminal window handy while using both Gnome/Linux and Mac OS X for a few particularly handy tools.

While these tips are probably absurdly obvious to many people, I suspect there are also plenty of people like myself, web developers in particular, that were raised in Window 3.1-through-95 or Mac OS Classic that never ventured near a command line (except maybe to play Commander Keen now and then).

WGET
Usage: wget [-options] [location]
Example: wget http://domain.com/filename.ext

Occasionally I’ll come across a page with an embedded media file, like a QuickTime movie, that I would like to download. QuickTime doesn’t let me save things locally, so I view the HTML source of the page and sniff out the URL of the movie. However, with some file types, depending on how you have your browser and media applications setup, if you paste the direct URL of a media file into the browser, it will load the file in the media player — again, sometimes without any “Save” functionality. If I’m not too annoyed and frustrated to give up trying to download that butt-finger-sniffing-monkey video by now, I would actually have to open a text editor, create a quick HTML file that included a text link with the URL of the item I want to download. Then, I would save the HTML file, open it in a browser, right-click on the link, and choose “Save As…”. Good lord!

With WGET, as long as you have the URL of an item, you can download it. Just type wget followed by the URL.

For bonus points, WGET can resume downloads and supports any kind of downloading option you might need: gzip encoding, SSL, http-authentification.

WHOIS
Usage: whois [domain]
Example: whois www.actsofvolition.com

Who is indeed. When you’re trying to figure out a human name or address behind some evil scheming website (or just checking DNS info for a domain), the WHOIS domain database has your info. I used to use, and suspect many people rely on, sites that offer a web-based interface to the WHOIS database (Register.com, Userland, etc.). It usually faster to to open up a terminal and type whois domain.com. No anoying banner ads, and the results are in a simple text format — which you can even save into a file using…

Piping | Rules

The real power of the command line starts to become apparent when you realize the power of piping. Piping is a simple means of passing output from one program as input into another. For example, to list the contents of a directory, I would type ls. I can search the results of that directory by passing the list of contents into a search tool, grep. ls | grep spaceman will return any files in the directory containing “spaceman” in their name. Similarly, I can pass the results of a WHOIS query into my text editor (GEdit) by typeing whois actsofvolition.com | gedit, or save the results directly into a file using the redirection feature “>” (whois actsofvolition.com > aovinfo.txt).

This saved me a load of time last week when I wanted to create a chart displaying the sizes of the various components and packages included in the Fedora Linux distribution. First, I needed a list of the file sizes of packages, so I ran ls *.rpm -l > filesizes.txt on the install CDs. This created a text file with the packages names and their file size which I could then open in a spreadsheet application, sort by size, and graph to my heart’s content.

All of this said, I still love a good icon.

 

Acts of Volition Radio F.A.Q.

I’ve been getting quite a few emails asking about various aspects of Acts of Volition Radio. Also, I’ve been glad to see that a few other sites seems to have taken to the voice-annotated downloadable compilation format (LugRadio and Mathcaddy Radio). Whether or not it was inspired by this humble site, I’m glad to see it.

Here, then, is my attempt to answer some of the more common questions about producing a downloadable radio show.

What hardware do you use to record Acts of Volition Radio?

I have a Shure SM57 microphone that I bought in the hope of doing some home recording. It’s a relatively cheap microphone that works well for voice or instruments (particularly guitar amps). It costs about $150. I plug the mic straight into the soundcard on my IBM ThinkPad T30. However, I think I could get better quality with a pre-amp of some kind — instead, I just jack up the signal in the recording software (probably to the detriment of audio quality). A good mic-stand helps too.

What software do you use to record Acts of Volition Radio?

I use a windows shareware multi-track recording package called N-Track Studio. It’s not very polished, but it was really cheap ($45) and does what I need. I think N-Track Studio is to ProTools (or other pro audio software) what Paint Shop Pro (or maybe more like LView) is to PhotoShop — the much cheaper, much less polished little brother that does 90% of what the pro software does.

Why don’t you use GarageBand?

I probably would if I used a Mac. It looks like a good piece of software that would do everything I need (multi-tracking, volume envelopes, etc.).

Why release the show as one MP3, rather than individual MP3 files?

I release the show as one mixed-down MP3 because that seems to me to be the easiest way to release a collection of songs with voice annotation at a reasonable quality. There doesn’t seem to be a decent way to release a collection of tracks together (another argument for an album file format). I could release a zip file with a collection of MP3s and an M3U playlist — but this would limit where it could be easily played, add extra complication, and limit control over the flow of the show. I do occasionally talk of the fading in/out beginning or end of some of the tracks.

I also see the show I’m putting together as a peice of work in of itself. I’m adding value by collecting tracks and adding my thoughts and impressions. The result is one unit of work. Yes, it’s a pain that you can’t skip ahead a track (of course, you can always manually jog through the track), but I think this is a reasonable trade-off.

While I suspect that keeping the show as one file does make what I’m doing a bit more palatable to the music industry, as it is a bit more difficult for what I release to end up as individual tracks on file-sharing networks, this isn’t why I do it in this format. I’ve never thought crippling features or tying the hands of the user (listener) was a good means of protecting work — but rather it is usually a symptom of broken law and regulation.

Is Acts of Volition Radio Legal?

Kinda, sorta, not really… When I first started, I emailed SOCAN (Society of Composers, Authors & Music Publishers of Canada). SOCAN is kind of like ASCAP here in Canada — they handle the licensing of music for radio and the compensation of artists. I got an informative and timely reply that explained, that:

“SOCAN is not yet issuing licenses for the communication of musical works in Canada over the Internet. As such, there are no rate cards nor is there a set form that you are required to fill out. However, when the Copyright Board approves a tariff applicable to your business (tariff 22), SOCAN will require that you pay all applicable fees and taxes retroactive to the commencement date of your business.”

To avoid any copyright infringement legal issues, I was advised to send a letter to SOCAN stating that “my company” (I guess that means me) agrees to pay any taxes and fees retroactively once the rates and laws are sorted out. Apparently a typical fee for this type of licensing in other medium runs around $0.25 “per subscriber” — but I’m not sure the “subscriber” model really holds up in a downloadable format.

I do get the impression that the downloadable nature of Acts of Volition Radio is particularly beyond the understanding the legal system to address so far.

Basically, they haven’t quite figured it out yet. I decided not to sit on my hands and wait for policy to catch up with culture and technology. I’ll do my best to follow the laws and pay any appropriate fees when they are finally sorted out.

How much bandwidth does it take? How do you pay for it?

Not a whole lot. The show isn’t so popular that it runs up too much bandwidth usage. For example, Session Six was downloaded about 400 times in February. Also, I’m a partner in a web development firm and I’m able to piggy-back on some of the hosting/bandwidth resources available to me there. After taking a quick scan of some web-hosting sites, I see that you can get 45GB of traffic for under $15/month — not bad.

 

Outline of a trip to Silicon Valley

Still recovering from the red-eye flight back home, here is the PowerPoint summary of my trip to San Francisco. Beware of blatant and shameless namedropping.

Though my itinerary varied somewhat from his, one of my travelling companions, Stephen DesRoches, posted a great overview of the trip. My complete photo collection from the trip is in my gallery.

  • Drove Ben Goodger’s car (not the Infinity, but still cool). It has a XUL license plate.
  • Hung out at the Mozilla Foundation — met all the great people there. It felt a bit like stepping into a dot-com company in 1999 — they were really working the stereotypes. The crowning peice was a soda-can suspension bridge.
  • Went to Mozilla Developer Day — stole all the credit for the work of the talented Mozilla Visual Identity Team, got a round of applause for the Firefox icon.
  • Had dinner with Andy Ruff who works on Entourage for Microsoft.
  • Saw Pedro the Lion (fuzzy photo) play at the Great American Music Hall. The venue was beautiful, the band was great. The opening act, The Advantage (fuzzy photo), played instrumental versions of the soundtracks from Nintendo games (MegaMan2 and Contra — props to my friend Nick to identifying Contra before they announced the name).
  • Drove to Monterey to meet up with a friend at the TED conference. Missed Mitch Kapor and Matt Groening by five minutes (name dropping of people I almost met — totally lame, I know).
  • Met (very briefly), Mark Hurst from Creative Good.
  • Visited the Monterey Bay Aquarium (with free passes from the TED conference — yo!). I took a comprimising photo of a starfish.
  • Rode a cable car — it seems absurdly dangerous, but was fun.
  • Walked through the Muir Woods, across the Golden Gate Bridge. The enormous sequioas provided the transformative spiritual experience I had hoped for — a 300 foot, 800 year old tree is great at putting your tiny little life in perspective.
  • Met up with Doug Bowman from Stopdesign — we had a great chat — he was very gracious.
  • Met up with a really cool web developer from Yahoo, got a great tour of the Yahoo campus (which is eerily close to Lockheed Martin). I got the impression that Yahoo does whatever it can to keep the yahooligans from leaving the campus — you can get dental work done, get your hair cut, work out, eat, play any number of sports, all on campus). We played Bocce Ball on the campus — it was surreal.
  • Ate at the Betelnut restaurant on the (good) recommendation of Ian Williams.
  • Checked out (the drive-by-stalker style), Google, Sun, Apple, AOL, and a bunch of other tech campuses.
    I hate flying — the red-eye back from San Francisco was brutal — I whine a lot (as my travelling companions can attest). The movie selection wasn’t bad though, School of Rock on the way out and Something’s Gotta Give on the way back. Sure beats the Thomas Crown Affair I saw on my last long-haul flight.
  • The Postal Service is good music to listen to on a plane. Particularly, the track Recycled Air (“I watch, the patchwork farms / slow fade, into the ocean’s arm / and from here they can’t see me stare / the stale taste of recycled air”).
  • Airplane food deserves it’s reputation.
  • It was a great trip, but I’m glad to be home. Feeling good about being home again seems to be a nice affirmation of a good life in a good place.
 

Acts of Volition Radio: Session Seven

Acts of Volition Radio: Session SevenI was waiting for some CDs to arrive for my next planned Acts of Volition Radio playlist, but great songs just kept coming to mind. So, instead of waiting, I’ve put together another session in the interim. This session was recorded while hunkered down in my little house surround by a lot of snow.

Songs from a snow storm. Recorded Sunday, February 22, 2004 by Steven Garrity. Run time: 36min.

Session Seven Playlist:

  1. Denison Witmer – 24 turn 25
  2. The Be Good Tanyas – The Littlest Birds
  3. The New Pornographers – The Slow Descent into Alcoholism
  4. Matt Mays – City of Lakes
  5. Hank Dogs – Way of the Soul
  6. Jeff Buckley – Hallelujah
  7. Sixpence None the Richer – Angeltread

If this is your first time hearing Acts of Volition Radio, you may enjoy previous Acts of Volition Radio sessions as well.

Acts of Volition Radio
Acts of Volition Radio
Acts of Volition Radio: Session Seven
Loading
/
 

Ralph Nader: Running for/from President

As you have probably already seen, Ralph Nader has announced that he will run for president in 2004. Lot’s of people seem to be saying that he shouldn’t run because he it will take votes from Democrats and in doing so, help the Replublicans (or the press talks about people you say that a lot, at least). Suggesting Nader shouldn’t run is counter to all things free and democratic.

Dave Winer, who I don’t always agree with, states the case well:

Imho, Nader’s run separates the people who “get” American democracy, and those who don’t. If Nader is going to win the election for Dubya, then now’s the time to fix the bug in the process.

By trying to hold back Nader (good luck) maybe you’re preventing exactly the kind of transformation we need. I think Nader is a patriot. Give him a medal. And think instead of being part of the herd.

I tried to donate to his campaign, but I can’t, because I’m a Canadian citizen (I’m not complaining – that’s fair enough).

 

Talkin’ ’bout the weather – February Snow Storm

We had a hell of a snow storm this week here on Prince Edward Island (and in Nova Scotia). Lots of webloggers have been posting some great photos. Here’s my best shot at assembling links to the various photo collections. Please add any other pertinent photos that come online or that I’ve missed in the reader replies section.

My poor little hatchback

Photos of the February 2004 winter storm: