Archived entries for

Interesting Links

Programmer Competency Matrix

I was surprised to find that I placed in level 3 for most of the “Programming” rows (as I understand my skills anyway :). Art school has definitely made for some strange bedfellows.

It was motivating to see where I placed in all of the topics, as my approach to learning programming has been to aquire as much understanding as possible about the the things I don’t know. Finding that I was at level 2, but knowing the existence of the concepts in level 3 validates that this approach is moving me in the right direction.

I likened this philosophy to Elizabeth the other day as analogous to how one understands their city. We live in LA, a big, sprawling metropolis, and while I’ve never been to Monrovia or Cerritos (far out there), I understand that both are cities in Los Angeles County. Not the best example, sure, but one that illustrates the differences in approach. I actively seek out and retain this type of understanding in the belief that it may be useful at some point. Others my see it as the inevitable result of living in the same place a long time.

A better example would be to relate it to one’s chosen carrer. Using this angle, it becomes quickly evident that the ones who take an active approach are usually more successful (the definition of the success is based on the specific domain, of course). Conversely, those taking a passive approach tend to exert more effort in defending how what they do know is more tried and true, and hence more reliable. More dangerously, as a superior, they tend to actively block their peers and subordinates. Anyone who has worked in a university or college setting will loudly attest.

Deep Linking with Javascript

Open sourced javascript implementation for linking to paragraphs, and even sentences, in webpages. Uses a matching pattern based on the first letters of the first 3 words in the first and last sentence of the paragraph. That was a mouthful. For example, the key for this paragraph would be [OsjFet].

A fun way to practice your Dvorak skills

I still intend to pick up proper typing. And when that time comes, it will definitely be on a Dvorak keyboard.

I started the typing tests last year and unfortunately, lasted only a week. It takes the same discipline as QWERTY (no surprise there), but I find the layout much easier to memorize. Now, if Apple could get on the ball with creating a beautifully designed split keyboard, I could get rid of this clunker. It’s hideous, poorly constructed and loud (key paddings wear out quickly), but it’s still the most comfortable I’ve found.

Language Constructs

I had a very difficult time in my English classes. In fact, there was a period where I simply refused to attempt any writing assignments due to the stress I caused myself. This was the primary reason for many failed classes in high school. Thankfully, I managed to graduate and go on to do much better in college.

It was during 2005 I began programming and a surprising result has been a better appreciation in how the English language is defined and used. Like human languages, programming languages can be broken down into similar constructs of nouns, adjectives, verbs, etc. It’s not something I’ve looked into (someday I will), but I find that common devices in modern programming languages can be compared to simplified examples in human languages.

So yesterday, Elizabeth and I were discussing using the phrase “that that” in a sentence and how awkward it sounds in conversation, even though it’s grammatically valid. When writing, I normally try to substitute “which” for the latter “that” (I’m usually not deft enough to do the same in conversation). The unintended side effect though, is the substitution can end up making the sentence read a little too formal and out of character. Most people I know, including myself, rarely use the phrase “that which” in conversation. Not that I judge a good writer by how well their writing mimics conversation, but formalities can interrupt and/or ruin otherwise good prose.

Interested in how this phase functions in a sentence, I looked up the definition of “that”. I learned the first instance of “that” serves as a pronoun, while the second as a conjunction.

Take for instance this conversation:

Speaker One:

Why are you are always disrespectful towards me?

Speaker Two:

I’m not. You’re just not smart enough to know when I’m right.

Speaker One:

See? It is that, that I’m talking about.

The first that, the noun, is referring to Speaker Two’s answer of I’m not. You’re just not smart enough to know when I’m right..

The second that, the conjunction, acts as the clause connector, connecting It is that with I’m talking about.

To help me remember how these constructs work I like to try and relate them to something in the world of programing. It usually helps regardless of if I can find any similarities.

Here what the conversation would look like as a hypothetical javascript program:

/*
================================
= Define our variables upfront =
================================
*/

var pronoun = null;

var conjunction = "that";

var speak = function( message ) {

	alert( message );

};
	
/* speakers */
var Ryan = {

	role: "Speaker One",

	speak: speak

};

var Chris = {

	role: "Speaker Two",

	speak: speak

};

/*
==========================
= Begin the conversation =
==========================
*/

/* Ryan defines and speaks his question */

Ryan.question = "Why are you are always disrespectful towards me?";

Ryan.speak( Ryan.question );


/* Chris defines and speaks his answer */

Chris.answer = "I'm not. You're just not smart enough to know when I'm right.";

Chris.speak( Chris.answer );


/* Redefine the pronoun to refer to Chris's answer */

pronoun = Chris.answer; 


/* Now Ryan defines and speaks his response */

Ryan.response = "It's" + pronoun + conjunction + "I'm talking about.";

Ryan.speak( Ryan.response );

To take this comparison even farther, you could find parallels for nouns, adjectives and verbs in the above program.

Nouns

Each speaker is “typed” as an Object. Not as in “typed on a keyboard”, but as in the speaker’s value is of the Object type. In English, each speaker would be typed as a noun.

Adjectives

A word that describes or modifies a noun is considered an adjective. Similarly, the properties and methods (referred to as members) of an Object can describe and modify that Object. Our speakers each have a role property to describe the part they play in the conversation.

Verbs

A verb describes an action or occurrence and in the beginning of the above program, the function named speak does just that. Instead of running speak on as a standalone (via speak()), I decided to create a speak member in each speaker and use the standalone speak function as its value. This effectively creates a method (used as Ryan.speak()). Now, each speaker can have its own voice.

The speak function takes one argument, message, which is the value passed into the parenthesis used to execute the function. The function simply calls alert, which creates a little browser notification dialog.

While I didn’t set out to write a introductory to programming, It’s nice to finally write down the way I think about these things. At least I can point to it when my friends want some sort basic understanding of programming, which is never, of course.


Copyright © Ryan Fitzer 2011. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses a modified version of Modern Clix, a theme by Rodrigo Galindez.