28 July 2011

Quote of the day: "Happiness is your own responsibility"

Jennifer Garner, who played Sydney Bristow on the TV show Alias, is an amazing actress and (from what I've read) sounds like an equally amazing person -- classy, professional, wise, and grounded. She has been quoted in many places on the internet (I couldn't find a reputable source, but I assume she really said it), saying that her mom always told her:
Happiness is your own responsibility.
A good thing to remember.

27 July 2011

Link of the day: Schedule time to worry

Exactly what the title says. An interesting idea is to schedule time to worry (originally mentioned on MSNBC). Scheduling a specific time to worry may actually reduce stress and anxiety. I've personally postponed strong feelings, but I know that only comes back to haunt me because I'll just experience it later at some inconvenient time. I should try scheduling worry time.

26 July 2011

A River Runs Through It

I recently read Norman Maclean's novella A River Runs Through It. The story is famous for its detailed and beautiful descriptions of fly fishing. Yet, the fly fishing in itself is not the main message. I think the story is about how difficult it is to understand and help people, even your own family. The fly fishing is a metaphor for this theme.

Norman is the narrator. His brother Paul gambles and gets into fights, but happens to be an outstanding fisherman -- way better than Norman. The two brothers were taught fishing by their minister father. Paul is not the only young man in constant trouble. Norman's brother-in-law Neal drinks and whores. Norman and his father don't know how to help Paul. Norman's wife's family don't know how to help Neal.

Norman and his father worry about Paul's troubled nature.

"You are too young to help anybody and I am too old," he said. "By help I don't mean a courtesy like serving chokecherry jelly or giving money.

"Help," he said, "is giving part of yourself to somebody who comes to accept it willingly and needs it badly.

"So it is," he said, using an old homiletic transition, "that we can seldom help anybody. Either we don't know what part to give or maybe we don't like to give any part of ourselves. Then, more often than not, the part that is needed is not wanted. And even more often, we do not have the part that is needed. It is like the auto-supply shop over town where they always say, ' Sorry, we are just out of that part' "

I told him, "You make it too tough. Help doesn't have to be anything that big."

He asked me, "Do you think your mother helps him by buttering his rolls?"

"She might," I told him. "In fact, yes, I think she does."

"Do you think you help him?" he asked me.

"I try to, " I said. "My trouble is I don't know him. In fact, one of my troubles is that I don't even know whether he needs help. I don't know, that's my trouble."

"That should have been my text," my father said. "We are willing to help, Lord, but what if anything is needed?"

"I still know how to fish," he concluded. "Tomorrow we will go fishing with him."

Part of the problem, Norman says, is that he doesn't understand his brother. His father agrees, but points out that they have fishing as a common bond. They have some level of understanding when they all fish together.

It turns out that is the last time they go fishing with their brother. Shortly thereafter, Paul gets into a fight and is killed. The father is heartbroken and struggles to find meaning in Paul's death.

For some time, though, he struggled for more to hold on to. "Are you sure you have told me everything you know about his death?" he asked. I said, "Everything." "It's not much, is it?" "No, I replied, "but you can love completely without complete understanding." "That I have known and preached," my father said.

Sometimes, it's just not possible to understand someone, to reach them. Norman explains that his brother was a great fisherman because he partly understood where the fish would go and how the fish would behave. After landing a fine catch, Paul says, "I'm pretty good with a rod, but I need three more years before I can think like a fish." Paul has a talent for fishing that neither his brother or father can match [1].

For a person to truly understand another -- that feat is as difficult as a fisherman trying to think like a fish.

[1] It's ironic that Norman and his father feel unable to connect with Paul, and yet Paul is an amazing fly fisherman who can "connect" with fish.

20 July 2011

Song of the day: "Since I Fell For You" by Buddy Johnson

I learned of this song from the episode "Rendezvous" in the TV show Alias. A beautiful, slow jazzy tune.

When you just give love
And never get love
You'd better let love depart
I know it's so, and yet I know
I can't get you out of my heart

You made me leave my happy home
You took my love and now you're gone
Since I fell for you

Love brings such misery and pain
I guess I'll never be the same
Since I fell for you

Well, it's too bad
And it's too sad
But I'm in love with you
You love me, then you snub me
But what can I do?
I'm so in love with you

I guess I'll never see the light
I get the blues most every night
Since I fell for you
Since I fell for you...

12 July 2011

Link of the day: Rainbow Mansion

I've often thought that it would be a neat idea to live in large house with other people. You would give up a little privacy for the benefit of living in a community. One well-known group living situation is the "Rainbow Mansion." The Rainbow is located in Silicon Valley and its residents are ambitious (mostly technology) people who "want to change the world." This might be a bit extreme for me, but it's an interesting idea. I enjoyed living in a co-op in college and I like the idea of group living.

05 July 2011

Code complexity

An oft-uttered mantra in programming is to write "good" code that is well-organized and understandable. One obvious question is how do you know if you have "bad" code that is too complicated and unintelligible?

People have researched this question and have come up with "complexity metrics" to quantify how complicated a piece of code is. A well-known metric is the McCabe complexity metric or "cyclomatic complexity." It roughly counts how many different paths you can take to get from the beginning to the end of the code. The more branching statements and loops in the code, the more complicated it is. A rule of thumb is that a module should have a cyclomatic complexity of no more than ten (CC < 10). If the cyclomatic complexity is larger, you should refactor the code. This is really cool. It's great to have a non-human, automated method to test the complexity of code. I'll have to try running some complexity metric tools on the next programs I write. For further reading, check out Reg. Charney's article on code complexity metrics in Linux Journal or this IBM development article on cyclomatic complexity.

04 July 2011

Stack Overflow and question-and-answer websites

I found that I learn a lot by reading forums. I learned about hockey equipment at ModSquadHockey and about musical theater at Musicals dot Net. This is a great way to learn about relatively obscure topics. Unfortunately, this method is also very time consuming because forums are almost completely unorganized. Even if you search for keywords, you have to filter through a lot of noise.

Wikis are much more structured and easier to read. Unfortunately, they require a lot of work because the contributors need to write decent articles and there are the issues of who can edit the wiki and multiple authors of the same article. These difficulties are the reasons you see a lot of incomplete wikis on the web.

A nice compromise between forums and wikis are question-and-answer websites like Quora and Stack Exchange. Instead of having threads like on forums, question-and-answer websites organize by question. For each question, other users post answers. This seems pretty much the same as forums so far. The key difference between forums and question-and-answer sites is that the users can dynamically tag questions and vote on how much they like a particular question or answer. The users do the filtering and that makes the website so much easier and enjoyable to read.

Quora is a very general Q&A site, with the philosophy that you have to stand by your answers. You're supposed to use your real name when you answer and you are asked to give qualifications as to why you are an "expert" in the topic. The site is closed to the public. You have to register and login. I think the reason is it is semi-private is to prevent Quora from becoming like Yahoo Answers which attracts a lot of random, "bad" answers. Stack Exchange is a group of Q&A websites on mostly technical topics. You don't have to login to see the answers, which is why I think Stack Exchange is more popular. I see Stack Exchange websites show up in Google searches whereas I never see anything from Quora. The most famous Stack Exchange site is Stack Overflow, which is focused on non-expert programming (though "expert" is subjective). I have fun reading through the top voted Stack Overflow questions for particular topics like Python and Mathematica. So far I like Stack Overflow better than Quora. Jon Evans wrote a comparison of the two sites in TechCrunch.

10 June 2011

Song of the day: "Stars and the moon" by Jason Robert Brown

This is a charming song, though a bit sentimental. I really enjoyed Audra McDonald's performance of it.

The song was composed by Jason Robert Brown, who is among the generation of young composer-lyricists, leading the avant-garde musical theater scene after Sondheim.

From the musical Songs For A New World
I met a man without a dollar to his name
Who had no traits of any value but his smile
I met a man who had no yearn or claim to fame
Who was content to let life pass him for a while
And I was sure that all I ever wanted
Was a life like the movie stars led
And he kissed me right here
And said:

"I'll give you stars and the moon and a soul to guide you
And a promise I'll never go
I'll give you hope to bring out all the life inside you
And the strength that will help you grow.
I'll give you truth and a future that's twenty times better
Than any Hollywood plot."
And I thought, "You know,
I'd rather have a yacht."

I met a man who lived his life out on the road
Who left a wife and kids in Portland on a whim
I met a man whose fire and passion always showed
Who asked if I could spare a week to ride with him
But I was sure that all I ever wanted
Was a life that was scripted and planned
And he said,
"But you don't understand -

"I'll give you stars and the moon and the open highway
And a river beneath your feet
I'll give you days full of dreams if you travel my way
And a summer you can't repeat.
I'll give you nights full of passion and days of adventure,
No strings, just warm summer rain."
And I thought, "You know,
I'd rather have champagne."

I met a man who had a fortune in the bank
Who had retired at age thirty, set for life.
I met a man and didn't know which stars to thank,
And then he asked one day if I would be his wife.
And I looked up, and all that I could think of
Was the life I had dreamt I would live
And I said to him:
"What will you give?"

"I'll give you cars and a townhouse in Turtle Bay
And a fur and a diamond ring
And we'll get married in Spain on my yacht today
And we'll honeymoon in Beijing.
And you'll meet stars at the parties I throw at my villas
In Nice and Paris in June."

And I thought, "Okay."
And I took a breath
And I got my yacht
And the years went by
And it never changed
And it never grew
And I never dreamed
And I woke one day
And I looked around
And I thought, "My God...
I'll never have the moon."

03 June 2011

Song of the day: "Too Many Mornings" by Stephen Sondheim

This is a bittersweet duet between a couple. The man realizes that he's been fantasizing about a girl that's a figment of his imagination instead of living life with the girl that's right in front of him.

A beautiful duet that is well-suited for operatic singing.

From the musical Follies

BEN:
Too many mornings
Waking and pretending I reach for you,
Thousands of mornings
Dreaming of my girl.
All that time wasted,
Merely passing through,
Time I could have spent
So content
Wasting time with you.

Too many mornings
Wishing that the room might be filled with you.
Morning to morning,
Turning into days.

All the days that I thought would never end,
All the nights with another day to spend.
All those times I'd look up to see
Sally standing at the door
Sally moving to the bed,
Sally resting in my arms
With her head against my head.

SALLY:
[spoken] If you don't kiss me, Ben, I think I'm going to die.

How I planned:
What I'd wear tonight and
When should I get here,
How should I find you,
Where I'd stand,
What I'd say in case you didn't remember.
How I'd remind you--
You remembered.
And my fears were wrong!
Was it ever real?
Did I ever love you this much?
Did we ever feel
So happy then?

OVERLAPPING:

BEN:
It was always real...
SALLY:
I should have worn green...
BEN:
And I've always loved you this much...
SALLY:
I wore green the last time...
BEN:
We can always feel this happy...
SALLY:
The time I was happy...

BOTH:
Too many mornings
Wasted in pretending I reach for you.
How many mornings
Are there still to come?

How much time can we hope that there will be?
Not much time, but it's time enough for me.
If there's time to look up and see
Sally standing at the door,
Sally moving to the bed,
Sally resting in my (your) arms,
With your (my) head against my (your) head.

02 June 2011

Song of the day: "Losing my mind" by Stephen Sondheim

This has to be the best written songs of all-time (in my humble opinion). Dark, personal, and deeply cutting which is what Sondheim does best. What a strange juxtaposition: the tedium of external, daily life contrasted with obsessive, self-absorbed madness.

I'll have to study this song in more detail at some point. The short, repetitive nature of the lyrics conveys both the monotony of daily life and the cycling of obsessive thoughts. I was really surprised in the line "the thought of you stays bright", the lyric "bright" is actually sung on a very low note, that is a huge drop in pitch from the rest of the phrase. Singing "bright" on a note that is anything but bright conveys the conflict in the singer's mind.

From the musical Follies
The sun comes up,
I think about you.
The coffee cup,
I think about you.
I want you so,
It's like I'm losing my mind.
The morning ends,
I think about you.
I talk to friends,
I think about you.
And do they know?
It's like I'm losing my mind.
All afternoon,
Doing every little chore,
The thought of you stays bright.
Sometimes I stand
In the middle of the floor,
Not going left,
Not going right.
I dim the lights
And think about you,
Spend sleepless nights
To think about you.
You said you loved me,
Or were you just being kind?
Or am I losing my mind?

I want you so,
It's like I'm losing my mind.

Does no one know?
It's like I'm losing my mind.
All afternoon,
Doing every little chore,
The thought of you stays bright.
Sometimes I stand
In the middle of the floor,
Not going left,
Not going right.
I dim the lights
And think about you,
Spend sleepless nights
To think about you.
You said you loved me,
Or were you just being kind!
Or am I losing my mind?