August 2009 Archives

Two concepts introduced early-on in the career of any aspiring programmer are » syntax & semantics. Syntax refers to the structure (or form) of code that a programming language specifies. Semantics refer to the meaning .. assigned to symbols, characters & words.

Arabic numeral threeI first became familiar with the notion of syntax while studying Cascading Style Sheets. CSS syntax employs the following form » selector {property:value}. Simple enough, no?

This form/structure allows you to style your web pages with 'rules' such as » p {color:green} .. which will change the color ('property') of text in a paragraph ('p' = selector) to (a 'value' of) » green.

While CSS might not be an official programming language, it does contain aspects that (in some ways) resemble them. And all programming languages employ syntactic rules. BTW - here's a good CSS book.

A professor once told me that the standard form (syntax) of a sentence in the English language is » Noun-Verb-Direct Object. In other words » 'Bill hit the ball.' Or, 'Mary ran up the the hill.' ( "This does that to the other." )

Most English-speaking people would agree that this format tends to work best (to convey ideas). But it is not a hard-n-fast rule. You can easily say » 'Up the hill ran Mary,' or 'Mary up the hill ran.' People might think you weird, but they'll know what you mean.

In English, we say "black beans." But the Spanish-speaking Mexicans here in Southern California put the adjective AFTER the noun » "Frijoles negros." (Can't believe frijoles negros has its own dang Wikipedia entry.) I'm chowing on a bowl of some frijoles negros & rice right now.

Programming languages (on the other hand) have little sense of humor. Break one of their structural rules and they will not only protest, but boycott your program outright. Obviously there are reasons for this strict precision. There can be no misunderstanding.

It's possible to learn to drive a car without ever understanding how one works. (e.g. » what the pistons do, the crankshaft, transmission, differential, etc.) And many drivers do just that. No problem. But I like to know how things work. This includes my study of Programming.

Diamond Head, WaikikiMy degree-path specified one "sciencey" Computer Science class. So naturally, that's all I took.

The first half covered the various components of a computer and their functions (» the processor, memory, hard drive, etc.). The second delved into programming (with Pascal) on a rudimentary level.

Our instructor seemed more interested in the girls in the class than teaching. In fact, the hottie (red-head) who I studied with in the hours immediately prior to the Final exam, told me she'd spent the night at his place. (Her hair was messed & she referred to him by his first name.)

Based on the material she suggested we review, I did not doubt her claim. Because it quickly became clear, soon as the Final was handed out, that her suggestions mirrored the material contained therein. (Much of this material was never covered in class.)

I basically got an 'A' in that course cuz that girl spent the night at the instructor's place .. cuz many of those questions I'd never seen before. But that's ancient history now.

I have however, been delving into HOW programming languages work (crankshaft, pistons). I forget how I stumbled upon it, but there's an online version of this book: Programming Language Pragmatics .. located » HERE (Google books).

Actually, the online version is 2nd edition (2006), while the one for sale at Amazon is the 3rd (2009). But I doubt there's much difference .. that would matter to a rookie like me, anyway.

First Father/Son Bike Ride

| | TrackBacks (0)

Embarked on my first-ever father/son bike ride with the Bug yesterday. We took a leisurely trip around the Back Bay (here in Newport Beach), a popular path where few cars travel. Gorgeous day, too.

Father Son Bike RideHis little bike still has training wheels. A bigger one* sits waiting in the garage, but he refuses to ride anything without training wheels. (* Miss Julie picked it up for him in Laguna last month.)

I'm in decent shape .. seeing I've been biking everywhere .. since my license was suspended in June. So my legs feel strong.

The Back Bay loop is 10 miles. So I expected the Bug to be tired afterwards. Surprised me when he insisted on hitting the trampoline soon as we returned.

Used to be I could tire him with a full day of outdoor activity. That doesn't seem to be working so well anymore. Ever since he turned 4 .. he's become impervious. I'm the one who usually tires first.

Speaking of tiring .. last night I slept better than I have in months. Been dragging all day today .. even after a triple-espresso this morning. I made some puttanesca for lunch today. That usually helps. (Carb-loading.)

The loop is mostly flat but has one big down-hill. Made me smile to hear him yelling, "Woo-hoo!" all the way. "That was cool, dad!"

One of the concepts that keeps popping up in my study of Programming languages is » expressiveness. Loosely defined, expressiveness is » the ability to say a lot with a little (my own definition).

ShakespeareWhere Programming languages are concerned, expressiveness might be the ability to DO a lot with a little.

Related terms » Meaningful. Concise. Simplicity (as it applies to the elimination of unnecessary complexity). Elegance. Efficiency.

No doubt, you know an 'expressive' person or two. But sheer volume of words does not an expressive person make.

Some people can talk for hours without really saying anything (.. at least not anything meaningful). While others can speak volumes with a simple glance.

In programming, the notion of expressiveness is often touted as a plus, associated with "higher level" languages. I could be wrong, but the idea I get is » the more expressive (a language is) the better. Notice the statement that begins the second paragraph here:

"My contention is that expressive power is the absolutely most important property to focus on right now."

This from a developer with an admitted "unhealthy interest in programming languages," who's currently developing his own. Since the learning process often involves relating new information to things we already know, that's what I've been doing.

As chance would have it, I was watching Hamlet last night (the Kenneth Branagh version). Didn't take long to realize much of what was being said wasn't getting thru. ( "Say what?" )

So I enabled English subtitles and started vigorously working the pause button .. in order to read & digest the Elizabethan chatter. Much better.

Saying Much with Little

Note how the phrase » 'To be or not to be' is exceedingly simple. Yet it carries much meaning beneath the surface (.. especially that 'not-to-be' part).

The ability to "say much with few words" is a primary reason cited when discussing Shakespeare's literary prowess. In other words, it's not just what he says, but the way in which he says it .. that makes his writing so .. descriptive, enchanting.

Back-n-Forth on the Trampoline

| | TrackBacks (0)

Bouncing on the trampoline with me yesterday, the Bug asked, "Did you have to go back-n-forth when you were a kid?"

jellyfish"No," I answered, waiting for his mom to come pick him up.

"Did your mom & dad live in the same house?"

"Yeah," I said, almost apologetically. [ Both my parents passed long ago, so he's never met them. ]

There I was, fielding questions I never expected to hear. (He's 4 .. and becoming more aware.) Caught me off-guard. Wasn't sure how to respond.

The Bug has been bouncing on that trampoline (and going back-n-forth) since he first learned to walk .. for most of his young life.

The neighbors, who have 2 boys of their own, generously let us use it "whenever." Consequently, he has become a pretty good bouncer. If I jump just before he does, I've noticed it launches him. ( "I get your energy, dad." )

While bouncing one time he told me, "Your hair looks like a jellyfish."

Later, he started jumping (pretty high) and touching my head, as I tried to avoid him. When he does make contact, I freak out, saying, "Ahhh, the jellyfish stung my face," which makes him laugh .. so hard it makes me start.

Many interesting conversations have occurred on that trampoline. It's one of his favorite things to do (.. up there with catching butterflies). And the neighbors are so nice to him. They say the nicest things .. pay him the sweetest compliments.

The SICP course, hailed by many as the single-best introduction to Computer Science, focuses on » methods to 'control complexity.'

Structure & Interpretation of Computer Programs The MIT professors who designed the course (Abelson & Sussman) both come from a background in Electrical Engineering, which obviously influenced their conceptualization of the course.

In other words, it seems they applied the techniques associated with Computer Science to a conceptual framework designed to teach Electrical Engineering (.. a familiar paradigm).

The course focuses on solving the problems associated with building "very large" (complex) computer programs by expounding on the following 2-step process:

  1. Simple things (such as numbers, symbols, $variables, data, procedures) are combined to build complex things.

  2. These complex things (typically data & procedures) are then wrapped in a "black-box" in order to 'simplify' them .. so they can be used as components in building even-more complex things.

The technique of 'abstracting' complex things so they can be used as components in building something even more-complex is termed » "Black-Box Abstraction."

Consider how a microwave oven (or fridge or stove) is used as a component in building a kitchen (which is part of a house, which is part of a neighborhood, which is part of a city, which is .. part of something ever more-complex).

Notice how the electronics (inside the microwave) are hidden from view. All you know is » cold-food in, hot-food out. (Simple.) That's the principle behind 'abstraction' » hiding complexity.

Spent a good chunk of the day in court. Not a good sign when you feel like a 'regular' at the courthouse .. when faces there become familiar. Wouldn't wish this mess on anybody.


Learning a lot (unfortunately) about how the system works. (Been at this for years.) While waiting for my case to be heard, I sit there and hear lots of other cases. So I glean things.

One thing has become clear » I could never be a lawyer, or a judge .. at least not in Family law, where things are very emotional .. and where there's far more at stake than just money.

Don't know how they do it. I certainly couldn't.

On that note .. it embarrasses me that we need to have somebody in a black robe make rules for us .. and tell us what to do .. someone who has never even met the Bug. Makes me feel like a big, fat failure. (Yet admittedly, the alternative would be worse.)

You might expect, when children are at stake, that the parents, even when they no longer care for each other, would lay aside their differences .. to focus on what's best for their children. And what's best for the children, you could argue, might include the welfare of the parents (who are caring for the children).

So it's difficult for me to understand why I have been repeatedly attacked. I'm not talking just once or twice, or 3 times, or even 4 or 5 times .. or even 6 or 7 .. but many times. (I've since lost count.)

I'm talking police reports & full-on detectives getting involved. Criminal accusations .. which would involve jail time.

Now even when these accusations are deemed 'unfounded' (as they always are), they still take a toll .. an emotional toll.

Microsoft Fears Linux

| | TrackBacks (0)

I'm reluctant to republish the content of others (as so many sites already do), but .. I found it interesting & noteworthy that » Microsoft has acknowledged Linux as a threat .. especially since I spent so many hours in Linux these past few weeks (learning the Unix shell)

Linux PenguinCopy-n-paste snippet (minor Rad-editing for brevity):

"Microsoft acknowledges Linux as the first viable competitor to its Windows client business, due to the use of Linux on netbooks, which are rising in prominence as an alternative to full-sized notebooks.

Microsoft cited Red Hat and Canonical -- the latter of which maintains the Ubuntu Linux distribution -- as competitors to its client business, which includes the desktop version of its Windows OS." </snippet>

Notice how the article said » DESKTOP, and not server. Linux has long been a dominant force in the server market (.. if not the dominant force).

It's difficult to describe why Linux is so cool .. why using it feels so fresh & clean. But I think it has something to do with the good intentions .. that come from thousands of talented programmers donating their time & expertise .. to bring you (for free) an operating system they obviously believe in.

I might be imagining it, but I think you can actually feel these good intentions (while using Linux). Can you feel the difference (in intentions) between someone who genuinely loves you, and someone who is paid to love you?

Moreover, I feel our economy has a lot to do with the Linux threat to the Microsoft desktop. No matter how compelling the product, basic economics suggest it's hard to compete with free. (Which Windows is not.) And in these troubled economic times, free means more than it used to.

I'm learning programming. Not a specific language, such as Javascript or Ruby. Rather, the concepts of programming .. that can be applied to ALL programming languages.

[ By the way, I've completed my study of the Unix shell. You can retrace my CLI steps » here. ]

Structure & Interpretation of Computer ProgramsMy particular style of learning emphasizes nailing down foundational concepts .. those primarily presented at the beginning of a course.

While this approach can be frustrating initially, because it slows progress at the outset, while foundational concepts are digested on an emotional level .. it allows me to crank thru with confidence (at an accelerated pace) once the foundation is set. [ See note #1 for an example. ]

Like any good geek, I've previously sought entrée into the world of Programming, but always settled for a cursory review of specific languages. (Most recently » Javascript.) Never found that global entrée I was seeking .. until recently.

The approach that is working for me .. is a combination of studying the HtDP text and watching the SICP videos (found » here).

  • SICP = Structure & Interpretation of Computer Programs (based on Lisp)
  • HtDP = How to Design Programs (uses Scheme)
  • Both languages are similar. So the two courses complement one another nicely.
  • The SICP videos and the HtDP text are freely available online, along with the SICP text.

The SICP course is legendary in the world of Computer Science. More people refer to it as the single best course on Programming .. than any other.

It was designed and presented by two professors at MIT (.. arguably the world's finest institution of geekdom). Moreover, it was recorded and the videos posted online, where they remain available for download & viewing (free).

I admit, I need to view each video multiple times before feeling comfortable enough to move on to the next lesson. But I *am* getting it .. and enjoying it.

The HtDP course is a simplified version based on the concepts presented in the SICP course.

Neither the SICP videos by themselves, nor the HtDP text alone works for me. But .. combining both courses really makes things click. I get it. I see what's happening .. how things work. It makes sense. And I look forward to learning more.

Possum Gone in the Morning

| | TrackBacks (0)

The possum was GONE in the morning. I had shut the lid and put a heavy box on it .. to ensure it didn't climb out and into bed with me while I slept. So there is no way it coulda got out. (Also shut the bathroom door.)


I almost doubted it was really there .. cuz it seemed so unreal .. but the water was dirty and smelled horrible .. like wet dog .. if you know that smell. Took several hours for the stench to go away.

So the only way it could've escaped was DOWN the pipe. Some say that suggests it came up that way .. which is what I think. (The toilet flushed fine.)

Late at night my brain was turned off and I was totally baffled .. as to how it might've got there and what to do about it.

A block away, yesterday, I saw a dead BIG possum in the road .. maybe its momma or dada.

I never sit down on the throne any more without first turning on the light. Some say it's not so bizarre that an animal would come up thru the sewer like that.

Possum in my Toilet

| | TrackBacks (0)

There's a possum in my toilet. (At this very moment.) A baby possum. It's alive! Too weird. How did it get there? Water tinged red, so maybe it's injured. How to get it out? Will it bite?

possum It's after midnight. So maybe I'm dreaming. Good thing I didn't sit down (in the dark). Might be difficult to explain that at the Emergency room » "Ya see, there was this possum in my toilet..."

I went in and turned on the light to find some Advil .. and heard a noise. Then I saw those eyes looking up at me.

Could it have come up thru the sewer? Looks too small to have climbed up from the outside.

Seen plenty of raccoons around (tho not in my toilet), but never any possums. I simply shut the lid and will call somebody in the morning.

About this Archive

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

July 2009 is the previous archive.

September 2009 is the next archive.

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