The Gentle News

Would you mind not farting while I'm saving the world?

The Gentle News header image 2

Continuing Education For Script-Kiddies

August 5th, 2009 · 5 Comments · code, Tech

Do people still use the term “Script-Kiddie?” Or do real programmers these days just consider everyone in the Web 2.05092009r27 universe to have a dangerous amount of knowledge about programming and steer clear of calling attention to it, in hopes of avoiding blame for ahr-em-minus-ahr-eff catastrophes and whatnot?

Regardless, I’ve been programming, badly, since slightly before I knew how to make the VCR stop blinking 12:00. For what it’s worth, our first VCR had a “remote control” that was tethered via a two-conductor cable. It usually stayed balled up in a dusty mess behind the television. There’s some possible insight into why I’m so terrible at cable management.

But I’m getting better. At cable management, that is. I’m still too near-sighted to consider myself a real programmer, but as I tackle more and more independent projects I’m picking up some things that I can be internally proud of. Some of you will find this quaint and want to pet my hair. Feel free.

Yesterday I came across a neat little method of quickly querying Wikipedia via command line. I chucked a one-liner sh script in my ~/bin folder, then realized that ever since I’ve switched to Mac, I haven’t USED any custom scripts for anything. After pulling myself out of the rabbit hole I dug trying to find the clean, Apple-Software-Update-safe way to add a directory to your BSD path (there isn’t one, I just created a .profile), I mixed the Dropbox-and-symlink-JB-Weld to make sure any command line habits I formed would be supported and enabled no matter which machine I’m using. Here’s the script:

#!/bin/sh
dig +short txt ${1}.wp.dg.cx

Sure enough, 24 hours later, I’m hooked and find myself unconsciously learning useless (and questionably accurate) trivia even while I’m buried in the terminal doing my usual organizing and system manipulation. But now I’m noticing that the tiny summaries offered by those DNS txt records are perfect for firehose learning/soaking.

While modifying my script to let me query several topics at once, it occurs to me that I should do a little bit of programming/scripting every day. Help me out by sharing your own little snippets, or giving me ideas for other useful little things that could be done programmatically. If we do enough of this, together, we can finally get off our asses and write all those awesome apps we talk about just in time for the platforms for which we write them to become obsolete!

Here’s my firehoseable wiki script in its current form:

#!/bin/bash
echo -e "$# queries: $@ \n"

for i in "echo $@"
do
dig +short txt ${i}.wp.dg.cx
echo
done

Here it is in action:

no custom terminal fonts or colors for me

no custom terminal fonts or colors for me

pixelstats trackingpixel

Tags: ···········

5 Comments so far ↓

Leave a Comment