July 2009 Archives

Learning the Unix Shell (bash)

|

Last month I mentioned a quest to learn the Unix shell .. specifically » bash (the Bourne Again SHell). Almost done. Currently ~80% complete .. enough to feel reasonably confident at a terminal.

Linux shell terminalThe 'shell' is simply a program that lets you interact with the operating system (actually the kernel, to be more precise) ..

.. by taking your (text-based) commands and passing them on to the kernel. In my case, this kernel happens to be » Linux (which is but one variant of Unix).

The term 'shell' comes from the notion that this software acts like a 'layer' that sits between you and the operating system .. similar to the way an egg-shell sits between you and your hard-boiled breakfast.

The shell can be intimidating, cuz it uses a (text-based) command-line interface (CLI). No intuitive GUI to help you along. You either know the commands or you don't.

Didn't take me long to realize the CLI was where Linux's true power resides. When we upgraded the site, for example, to a Virtual Private Server, the support-techs who helped me with the move all used the command-line to work their mojo.

Most Linux distros do indeed come with an excellent GUI (usually either KDE or Gnome). But (but!) the Rad VPS does not. Which is why it became necessary to learn the Unix shell. (Something I tried to avoid.)

The Rad VPS is based on CentOS (Community ENTerprise Operating System), an off-shoot of Red Hat, which is probably the most popular of all enterprise Linux distros (.. and now a new member of the S&P 500, a development you may find telling).

GUIs (such as KDE or Gnome) require lots of memory/RAM. My laptop, for example, has 2-gigs, but the Rad VPS comes with an allotment of only 512-MB (.. upgraded from 384 just today).

With that limited amount, I need to run not only all the standard web applications .. such as Apache (web server), MySQL (database), Perl (scripting language), etc. but also cPanel/WHM.

So there's not much RAM left to run a GUI. [ Don't think I didn't inquire about installing a GUI. =) ]

Bottom line » if you wanna administer your own VPS, you need to learn the Shell. So that's what I'm doing. (Of course, there have been distractions, making progress uneven.)

Strange coincidences. Ever had 'em? Things that seem highly improbable. Jung termed these attention-getting coincidences » "synchronicity," which he defined as » "two or more events which are causally unrelated, tho occurring together in a meaningful manner".

Waikiki HonoluluThe easiest one to describe came when I was living in Hawaii (Honolulu, downtown Waikiki, on Ala Wai Blvd). It was a Saturday afternoon when the phone rang .. someone calling for the Dog.

(.. who was out looking for his car. It's easier to lose your car in Waikiki than you might think, cuz you can walk everywhere. I had a black Sportster there.)

The caller was hosting a card game that night and asked me to give the Dog his number. I found a pen and tore off a piece of grocery bag. I forget the number, but recall the last four digits were '0507'.

The radio was on. (We had a nice stereo system, with Bose speakers. Actually, that's pretty-much ALL we had in the place. You know how it is when you're 20 years old.) A commercial was playing as I took down the guy's number. It was playing loud, cuz I had turned up the previous song.

At the exact time I wrote the number, the radio announcer gave the address of the place he was pimping » 507 (Something street) .. for some tire store (in Honolulu).

'Interesting timing,' I thought. But then, I glanced over at the clock to note the time the guy called, and it was » 5:07. That *really* got my attention. My eyebrows popped up as I looked around to see if anybody was watching.

I told the Dog about the weird coincidence when he got home (after finding his car). He was the one who noted today was May 7th (»5:07). He held out his arm and said, "Look. Chills."

Rad Intro to Calculus

| | TrackBacks (0)

Today is the 40th anniversary of the first manned lunar landing (1969) .. a historic event for techies .. cuz it was techies who put us there. And techies used » calculus to put a man on the moon (some 240,000 miles away).

MoonAt the heart of calculus lies the notion of » limits (a concept I'm quite familiar with, unfortunately).

Calculus was invented to solve (among other things) the problem associated with finding the instantaneous rate-of-change .. as visualized by the slope of a line tangential to any given point on a curve (of a graph).

To calculate a slope, you might recall (dust off them algebraic brain cells) we pick two representative points, find their difference and divide the » "rise by the run" .. the change-in-Y / change-in-X (.. commonly referred to as "delta-Y over delta-X").

As the change in the X coordinates (recall from basic Algebra) gets smaller and smaller, we get closer and closer to determining the slope (rate-of-change) at a particular point.

The problem however .. is that a point has no size, so the "change" or 'difference' (in the X coordinates) becomes zero. And dividing anything by zero is a major mathematical no-no. (Defined as "undefined" .. a mathematical black hole that will crash your computer.)

See t=13:00 here, and especiaaly t=13:30.

Limits

The concept of » limits was introduced to address this problem. Imagine standing in your living room, and walking half the distance to the furthest wall. Then walk half the distance again. And again & again.

Each time, you keep getting closer & closer. But .. you'll never actually reach the wall (cuz you keep going only half the distance). A hundred years from now, you'll be very, very close (to the wall), but still not quite there.

Getting closer & closer to the wall is analogous to decreasing the size of the difference between the two X coordinates along a curve plotted on a standard graph (which contains an X & Y axis). But the limit (drum-roll, please .. here it comes) is » the wall! .. even tho, in reality, you never actually get there.

That's why the notion of a limit represents a mathemetical "concept" (not reality). If you think about it, you can't really have an instantaneous rate-of-change (.. cuz nothing can change in an instant, cuz an instant contains no time). And the word 'rate' implies "per-unit-something." That 'something can be (and often is) » time.

That's also why the result is called/termed a 'derivative' .. cuz you can't get there with conventional mathematical manipulations. It's kinda like what that old farmer told me down South when I asked for directions » "Son, you can't get there from here." =)

I know a guy who used to make serious bank. He always seemed to have a wad of broccoli handy. So it surprised me to learn he's now living in a ditch.

Homeless man"Where ya been?" I asked, running into him recently. (Hadn't heard from him in months.)

"I moved," he said. "Where to?" I inquired.

"I'm living in one of the most exclusive neighborhoods in San Clemente," he boasted. "Presidential Heights. Not far from where Nixon used to live."

[ I used to live in San Clemente myself, just off Buena Vista, a stone's throw from the beach there, and walking distance to the pier. So I'm familiar with the area. ]

After sharing how his global Internet-based business has been taking a beating, and how he began having trouble making rent, he described how he threw everything into storage (for $55/month) and moved to a "secluded ravine" he'd discovered while surfing nearby.

"I arrive shortly after sunset," he explained regarding his new routine, "and park about a hundred yards away. To discourage hikers, I've moved some brush across the path. I have a sweet little spot, complete with Thermarest pad & sleeping bag. I fall asleep to the sound of the ocean every night."

While showing me a video of his "new home" (recorded on his cell phone), he continued, "A blue jay wakes me every morning. I feed him peanuts."

After an early morning aerobics class (where he showers afterward), he heads off to the library where he begins his work. But while he was in the restroom last week, some kids stole the memory from his laptop.

Guess Who's Back

| | TrackBacks (0)

Two county sheriffs (1 male & 1 female) escorted me out after court this week. That's never happened before. I think they were just ensuring nothing happened en route. Keeping the peace. You know how ugly things can get during a custody battle.

Pooh & Piglet catching butterfliesI actually liked being escorted. Felt safe, protected. One walked on each side. They were very nice, professional. So I appreciate whoever it was that set it up. Tho I got some strange looks from passersby.

The sheriffs walked me to the edge of the property, where they watched me cross the street, then waved goodbye. =)

Kinda surreal, I thought, while waiting there at the bus stop (.. like this whole ordeal has been).

This time in court was very different. I hardly said anything. Experts testified.

First, the courtroom was cleared of all unessential people (not uncommon, due to the nature of the accusations). If you were there, and listening carefully, you might've heard the judge say the word I've been waiting to hear for years » enough.

About this Archive

This page is an archive of entries from July 2009 listed from newest to oldest.

June 2009 is the previous archive.

August 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.