Archives for: 2006

12/30/06

Permalink 06:12:53 pm, Categories: Politics, 556 words   English (US)

The Eid of March

It turns out today's hanging of Saddam Hussein, pronounced like 'sodom' in the media and by politicians to emphasize his evilness, falls on a Muslim holy day called Eid Al-Adha. There are videos circulating of the whole execution, and of course the media highlights the dead man walking scenes. Interesting how its "ok" to televise this sort of thing, but we don't parade current death row inmates. It's almost as if we are taking small steps towards televised executions.

Just so you know, not all Iraqis are happy:

“He gassed his own people. He never appreciated differences of opinion. He ruled by fear,” said Jaffer. “All dictators should meet the same fate that Saddam did. However, he should not have been hanged on Eid Al-Adha. As a human being I can’t approve that. Never. Even ordinary criminals are not hanged or executed on Eid.”

And even more vehement:

“Would it be OK if the president of the United States were hanged on Dec. 25?” shouted Anmar Al-Khodair, an Iraqi pilgrim from Anbar. When it was pointed out to him that it was the Iraqi government not the US government that executed Saddam, his reply was: “This Iraqi government is a puppet government. It is the US that is responsible for security and all other aspects in Iraq. The Iraqi government is based in the US-protected Green Zone in Baghdad and the writ of the government is confined to the Green Zone in Iraq. Go ask anybody. He was, is and will remain our hero.”

Take what you will from that, I just find it rather interesting that Saddam's hanging happened so soon. Think of how long death penalty trials last in the US. This seems rather rushed. Honestly, whenever I saw Saddam on TV, he looked brain damaged in some way. He hardly appeared like a harsh dictator. They must have broken him pretty bad. I wouldn't be surprised if drugs were used or if he received some sort of abuse.

Unbelievably, there was a point when Saddam really admired the US. His favorite film was The Godfather. He wore pinstripe suits, and revered the whole gangster mentality for the same reasons we revere the Sopranos. He was a US problem child.

What rather gets me down is that we have to continue killing other human beings. The fact that we rely on violence to solve problems is evidence to me that we are descendents from apes and lower animals. There is no rationalization of killing, and it requires no IQ to make the decision to kill someone.

It reminds me of the latest Mike Judge movie Idiocracy. Judge, if you don't know, made Office Space, probably the defining movie of the IT generation. In Idiocracy, he envisions a future of really stupid people. It reminded me of a live Futurama, and was honestly both funny and scary. You see, stupid people reproduce more. There is an extremely intelligent opening scene that shows how 'smart' people take time to make the decision of having children, have very few, and rationalize the whole process too much. On the other hand, trailer parks overflow with babies. Cut to the Costco-esque future. If you are smart, a doctor may tell you:

So basically it says here you're fucked up, you sound like a fag, and your shit's all retarded.

12/10/06

Permalink 09:28:55 pm, Categories: Movies, 550 words   English (US)

Apocalypto

Beware of the man who brings the jaguar. So says a little girl in the movie, and it is probably good advice for any era. I think I've learned what Mel Gibson likes to show in his movies: the endurance of human beings. If you think about Braveheart, Passion of the Christ, and Apocalypto, they are all portraying people who go through incredible suffering and at some point redeem themselves. He takes characters and pushes them to the limit in excruciatingly violent, spiritual, and sometimes unbelievable ways.

Apocalypto is raw and visceral, but it gives a hint that the reality must not have been far off from how it was portrayed. It is intelligent and believable. The movie is in another language, but you quickly gain empathy with the characters, which really shows Gibson's directorial skill. At over 2 hours, I thought I would get bored. But honestly, I could not take my eyes off the screen. The way the story flows and the journey the main character goes through is compelling and fascinating.

I had just watched part of Spencer Well's Journey of Man, and I was eerily reminded of it. That documentary provides possible explanations of how humans spread out from Africa and traces genetic markers across continents. It describes one tribe that for some reason ventured out of Africa to make new civilizations. From that tribe we all descended. But the question is why? Why was that journey made out of Africa and what sparked it? More importantly, how did they do it? The documentary describes that those humans had to have the brain power to survive the travel, and that something, almost superhuman, had to have happened to them biologically. Our increase in brain prowess is many times described as a chain reaction, a snowballing of knowledge so to speak.

But it seems that the trigger is genetic. That something was written in an early human's genes to venture out and form civilization as we know it. Some random mutation that allowed him to survive and reproduce. That is the person that brings about a radical change.

The lead character of Apocalypto exemplifies this 'superhuman'. He is different, and sees things that others do not. His body is put through what would likely kill other humans. Yet he continues to survive, as if he has no control in the matter. As if the book is written in his genes that he must survive, and nothing he can do will prevent that. His endurance was given to him for a reason. Those genes may have been dormant, but an external stress was needed to express them. It makes me wonder, what was the external stress put on our ancestors?

The movie also reminded me alot about religion and why it was so essential to people of those times. If you think about it, we tend to invoke God at times of suffering. But how much suffering is going on in our lives today? Is it any wonder that atheism is prevailing? Think about a life where the people you care about are killed in an instant and you must push the limits of your body to survive. A life where you are continually happy has no need for a God. But a life of the opposite requires it.

12/04/06

Permalink 08:55:41 pm, Categories: Television, 7 words   English (US)

Colbert at Harvard

Interesting talk at Harvard with Steven Colbert.

Permalink 08:45:08 pm, Categories: Movies, 13 words   English (US)

Jesus Camp full movie online

Here is the full version of Jesus Camp online. Definitely worth checking out.

12/01/06

Permalink 06:49:00 pm, Categories: Music, 19 words   English (US)

Banned Faithless video

Here is a video by Faithless apparently banned on MTV. Really nice juxtaposition of our leisure lives with war.

11/29/06

Permalink 10:22:58 pm, Categories: Books, 245 words   English (US)

Where ticking bombs lie

From Ghost Plane:

If inspiration is the key to how the terrorist network now functions, then an attempt to destroy terrorism by killing or capturing key leaders (and rendering those survivors off to forgotten jails) may head off some particular attacks, but it is doomed to be strategically unsuccessful. New leaders and new cells simply will emerge. While torture may persuade one of these leaders to talk and talk, the likelihood is they have no idea what is being planned, even in their name, around the world. They have no idea where the ticking bombs lie.

The lesson from this analysis is not defeatist. It does not suggest that the war on terror is unwinnable. Rather, it suggests that the key battleground is the realm of ideas; that the effort to win the hearts and minds of the Arab world, and counter militant Muslim thinking, outweighs the illusory short-term advantages of resorting to the tactics of repression. Just as Soviet communism foundered when even its own leaders realized that its basic principles were bankrupt, so the most violent ideas of the Islamic jihad must also be shown to be ineffective and unrewarding. Winning this war of ideas is not, though, just about propaganda. It also means getting the policies right. Western policies and ideas must be the ones that inspire people in the Middle East. These ideas must become far more potent than anything Osama bin Laden could ever tell Al Jazeera from his cave.

11/26/06

Permalink 08:16:15 pm, Categories: Movies, 216 words   English (US)

Flushed Away

I loved the Wallace and Gromit movie. The comedy is both intelligent and hilarious. So when I heard Flushed Away was the first CGI movie by the same writer, I had to see it.

This was a great movie. What's really amazing is every character is so unique and interesting. Jean Reno as 'Le Frog' is one of the funniest in my opinion. He is one of the villains, of course from France, and pokes fun at everything French. Some dialogue before going after their victims:

Le Frog: We leave immediately!
[strides off screen]
Henchfrog #1: What about supper?
Le Frog: [strides back on screen] We leave in five hours!

The comedy is of the Shrek-style, which both appeals to adults and children. There are some subtle things, such as a warning label on a liquid nitrogen tank saying 'WARNING: Rather Cold'. My favorite characters are the slugs, who pop in and out of scenes singing do-wop songs. When they are frightened, they scream and run frantically, but are only able to move a few inches at a time and don't get very far. Or when they are excited, they want to high-five, but sadly realize they have no arms. It's just hilarious.

The way the movie breathes life into such innocuous characters really makes it enjoyable.

11/25/06

Permalink 04:07:22 pm, Categories: Movies, 432 words   English (US)

The Fountain

fortune

I've been a big fan of Aronofsky. He always pushes the limits in his movies. Requiem for a Dream is probably one my favorite movies of all time. Even Pi ranks up there as well. His films' use of the Snorricam and other cinematography techniques are just amazing.

So I was pretty psyched to see The Fountain. The reviews seemed rather bad to me, and opening night was in a pretty small theatre with not many people.

So how was the movie? All I can say is WTF? I did not like this movie at all. Granted, some of the scenes are poetically beautiful, but it's pushed down your throat in such a monotonous and drawn out way that you feel like the director is trying to milk the audience as much as possible. I think there was at least 20 minutes of facial closeup shots of people crying or on the verge of crying. Some scenes were so quiet it just didn't even seem like a movie. I could actually sense the audience getting uncomfortable at times. I'm all for movies being realistic, but let's face it, movies need to have style and be artistic enough to engage our attention. It's the skill of a director to make a boring story into something fantastic.

The biggest thing that I found so interesting in Requiem for a Dream was how low it was willing to pull the audience into its descension into hell. That movie conveyed a true spiraling downwards, getting worse and worse shaking the viewer to his core. There are a few scenes that almost feel like a DJ cutting and scratching, except with film. This was essentially the director's expertise at work, and I loved it. I remember feeling almost exhausted after watching that and thinking to myself, "now that was a movie." Movies push emotional buttons, and that movie took a sledgehammer to the emotional control panel.

But there was nothing genuine or unique in The Fountain. It's just Hugh Jackman meditating, and everyone crying. Rinse and repeat. There are some scenes that are truly Aronofsky, like the way he conveys closeness of people. The 'love' scenes he does, depicting the way human bodies touch each other, are truly amazing. That's probably the only saving grace of this film.

The movie's moral is nothing new to anyone who has studied eastern religions. It is essentially trying to convey one of the tenets of Buddhism: without death there is no life. i.e. Accept death. The best review I've seen so far is describing it as "a feature-length fortune cookie.".

11/19/06

Permalink 07:32:47 pm, Categories: Science, 40 words   English (US)

Evolutionary sidelines

Read a good article in the latest Discover magazine. My favorite line:

You are the descendant of the descendant of the descendant of what was left bleeding but alive on the sidelines after evolution's violent filter swept over deep time.

11/12/06

Permalink 08:55:42 pm, Categories: Society, 77 words   English (US)

WTC7 a controlled demolition?

I attended a talk at Berkeley about 9/11 possibly being an inside job. Now that's pretty crazy, but what I found very interesting is the WTC7 building. This was another building that came down, but it's cause was rather suspicious: fire. It must have been absent from most news coverage too, because it's the first I've heard of it. They showed lots of videos comparing it to a controlled demolition. And you know what? It's actually pretty convincing.

Permalink 08:30:39 pm, Categories: Linux, 18 words   English (US)

Apache vs strace

strace is the swiss army knife for sysadmins. Here is a nice article on debugging Apache with strace.

Permalink 06:29:35 pm, Categories: Movies, 752 words   English (US)

Deliver Us From Evil

If you bring forth what is within you, what you bring forth will save you. If you do not bring forth what is within you, what you do not bring forth will destroy you.

So begins the movie with lines from the Gospel of Thomas. I wasn't sure what to expect from this movie as there wasn't any advertising for it, almost as if there was an effort made to make it unknown. Even the website has nothing about the movie, instead showcasing shit like Saw III and other Lionsgate films. Great ad campaign huh?

I think it is a rather important documentary. It's about Catholic priests and pedophilia, mostly about an Irish priest named Oliver O'Grady. It was almost unbearable to watch as the children (many of whom are now grown up) and parents were interviewed. The amount of trust the families put into the priest, allowing him to sleep at their place, etc, was great. The thoughts of child abuse never crossed their minds.

There is a harrowing scene where the parents describe finding out of the allegations in the newspaper. They had so much trust in the priest that they comforted him, saying "If you've done nothing wrong, then you should not worry." But in the back of their mind they wondered about their daughter. Now a mature woman, the mother called her and asked if the priest ever touched her during her childhood. "I have to go," she says and hangs up. Then the mother asked the father to call and ask the same question, knowing that she never lies to her father. He did, and the daughter says "Yes." The girl was raped at 5 years old. Their whole life came tumbling down. The father asked his daughter, "Why didn't you tell me?" She never spoke up because her father had once told her he would kill anyone that touched her. She was afraid of her father being put in jail. Can you imagine living such a life?

The father's interviews were really sad, and he openly claimed that there can be no God. He had lost all of his faith.

Another tale is of a boy abused by the same priest. Now probably in his mid-twenties, he was calm at first describing the situation, but lost it at some point. When he walked by the place where it happened, he cried, "That's where he fucking sodomized me." "When I'm close to a girl... I remember what happened." These scars are deep. One of the 'rape' victims was a 9-month old baby. A grown 'man of God' molesting a baby... it is just horrifically mind boggling.

The interviews with O'Grady eerily reminded me of Robert Deniro in Cape Fear. This is a guy that is fooling himself thinking that his sins can be washed away. He even invites all of the children to his home in Ireland (more than 50 children) to speak with him "one on one" so they can all continue to live their lives. "I would kill his mother," one of the abused angrily says. I found O'Grady's actions very selfish. If he wanted to repent, he should spend his time trying to prevent such abuses from continually happening. You see, he spent about 7 years in prison, then was sent to Ireland with all expenses paid by the Catholic church. Now he roams around other children.

This is a real problem. The movie explains that the priests, all their lives being celibate, see children as their 'psychosexual peers' and target them. O'Grady himself was abused during his childhood by a priest and his brother. His brother abused his sister, and that is where O'Grady thinks he 'learned' his behavior. I found it interesting that celibacy was not originally required for priesthood, or so the movie claims. Before, priests had wives and family. But there was a problem. When the priests died, their property would go to the wife or children. The church wanted ownership, and so brought forth celibacy. Could the motivating factor for celibacy in priesthood be money?

I was especially sickened by the corporation-like mentality of the whole Catholic system. One of the abused says, "Religion took a wrong turn." Indeed. Now I'm well aware that such activities are an exception, and there are many 'good' churches out there. Honestly, I think they should allow priests to marry. Why build up the 'psychosexual' tension in the first place?

As one of those interviewed says, "The only time Jesus was angry was in a church."

11/08/06

Permalink 09:50:04 pm, Categories: Work, 100 words   English (US)

OSDI

This week I'm in Seattle attending OSDI. Google presented 2 papers that were fun to watch: Bigtable and Chubby . Check both of those blogs for interesting comments. What was rather humorous was after each Google talk, Yahoo and Microsoft employees stormed the microphone with questions. It's nice to see the little fights being picked :).

I'm flying back to Mountain View tomorrow. I made sure to send in my absentee ballot, and am glad with the results. At least one of my nights here was in a drunken stupor. The weather is pretty bad, but I think Seattle is a wonderful place.

11/05/06

Permalink 12:56:33 pm, Categories: Linux, 131 words   English (US)

Doom on your ipod

doom

Here's an interesting interview with the ipodlinux guys. They are doing some amazing work:

Unfortunately the bootloader which was previously a wealth of information was unavailable and so we had to revert to picking through, literally, millions of lines of assembly to obtain any information on the new hardware. In the end we found enough to build a simple program that could generate two different tones using the inbuild speaker (the clicker, or piezo). Using this code one of our enterprising hackers played a tune of ones and zeros representing the firmware which was then recorded in a custom-built recording studio and then decoded the tune to obtain the original firmware image! From there it was still another few months painstakingly going over assembly dumps to reverse engineer the new CPU.

11/04/06

Permalink 08:57:15 pm, Categories: Python, 259 words   English (US)

trying to close a file

I'm reading 'Core Python Programming 2nd Edition' and came across what I believe is an error in an example. Here is what I sent the author:

380-381 :: 10.3.10 : open() can throw IOError

I have some general comments on this section. You describe two ways of using try-finally-except. The first method was:

try:
  try:
    ccfile = open('carddata.txt ', 'r')
    txns = ccfile.readlines()
  except IOError:
    log.write('no txns this month\n')
finally:
  ccfile.close()

But if open() fails, an IOError will be thrown, and ccfile will be undefined. The code in finally: will attempt to close that undefined variable, and throw a NameError.

The second method was:

try:
  try:
    ccfile = open('carddata.txt', 'r')
    txns = ccfile.readlines()
  finally:
    ccfile.close()
except:
  log.write('no txns this month\n')

But this suffers from the same problem. If open() fails, you attempt to close an undefined variable.

-- EOM

What's the better way to do this?

try:
  ccfile = open('carddata.txt', 'r')
except IOError:
  log.write('failed to open file\n')
else:
  try:
    try:
      txns = ccfile.readlines()
    except IOError:
      log.write('no txns this month\n')
  finally:
    ccfile.close()

Yuck.. anything better? In Python 2.5, you can clean this a bit:

try:
  ccfile = open('carddata.txt', 'r')
except IOError:
  log.write('failed to open file\n')
else:
  try:
    txns = ccfile.readlines()
  except IOError:
    log.write('no txns this month\n')
  finally:
    ccfile.close()

Still yucky though... The author of the book acknowledged the errata and credited me. He also gives a better solution, setting

ccfile = None

before the block and an

if ccfile:

test before closing.

Permalink 08:01:10 pm, Categories: Science, Religion, 234 words   English (US)

Dawkins

faith

I got to see Richard Dawkins give a talk at a local bookstore. He has a following that is almost religiously fanatic :). I don't think he is saying anything new. He's just very loud about atheism. I thought his critique of Biblical religions rather one-sided. If you are going to bash religion, at least do some homework and study other religions.

I've wondered, aside from religion, where do we learn humility? I think the idea of believing in something much greater than yourself gives you an ideal to live your life by, and a striving to reach that unreachable goal. I would think that most people consider their God to be the ultimate role model, and is a source of inspiration for radical thoughts and ideas (both good and bad).

I think faith is really the important part of religion. The 'leap of faith' is probably something helps people get around hard times and obstacles in their lives.

Religion is part of evolution after all, and it evolved in societies for a reason, likely starting with a confusion about death. It's not hard to imagine the first humans seeing their fellows die and wondering what happens, and even not accepting that death is the end. Death and after-life is something that pervades most religions, and have acceptable explanations for their followers. Honestly, I think the question about religion is really the question about death.

11/01/06

Permalink 10:20:02 pm, Categories: Religion, 9 words   English (US)

Kofi Annan == antichrist?

Here's an interesting documentary on 'endtimers', oh rapturous ones.

10/29/06

Permalink 08:41:43 am, Categories: Linux, 44 words   English (US)

seq

I can't believe in all my syadmin I've never used 'seq'. Pretty cool for bash for loops:

m=`seq -f "host%02g" 1 20`
echo $m
host01 host02 host03 host04 host05 host06 host07 host08
host09 host10 host11 host12 host13 host14 host15 host16
host17 host18 host19 host20

10/28/06

Permalink 10:14:03 pm, Categories: Science, 28 words   English (US)

Brains and electrodes

I find this is both scary and fascinating. The fact that we can create something using brain cells and robotics that follow light seems like an amazing feat.

10/25/06

Permalink 07:29:25 am, Categories: Python, 175 words   English (US)

dictionary fun

Learned some new things about Python dictionaries. Let's say you wanted to create a dictionary with keys given in a list, and a default value for all of them, say None.

>>> somelist=['foo', 'bar', 'baz']
>>> {}.fromkeys(somelist)
{'baz': None, 'foo': None, 'bar': None}

Or some other value, like True:

>>> {}.fromkeys(somelist, True)
{'baz': True, 'foo': True, 'bar': True}

An uglier way to do this is with a list comprehension:

>>> dict([(x, True) for x in somelist])
{'baz': True, 'foo': True, 'bar': True}

Now you can easily see a way to uniq-ize a list:

>>> somelist=['foo', 'bar', 'foo']
>>> {}.fromkeys(somelist).keys()
['foo', 'bar']

But really, there is an even better way to uniq-ize a list in 2.4:

>>> list(set(somelist))
['foo', 'bar']

On another note, let's say I wanted to loop through the keys of a dict in sorted order in Python 2.4:

>>> somelist=['foo', 'bar', 'baz']
>>> somedict={}.fromkeys(somelist)
>>> for key in sorted(somedict):
...   print key
... 
bar
baz
foo

Or, did you know you can create a dict with x=y arguments?

>>> dict(x=1,y=2)
{'y': 2, 'x': 1}

10/22/06

Permalink 08:45:35 pm, Categories: Books, 457 words   English (US)

Static

Some quotes from a good book I just read called Static:

"It's not about embedding. It's about television's refusal to show the truth of war. Many of the worst pictures taken in the invasion of Iraq in 2004 ... never saw the light of day. They couldn't be shown. They could - but they were not: 'Because of sensitivities.' 'Mustn't show this at breakfast time.' 'It's irresponsible to show the dead like this.' 'It's disrespectful.'

"If you saw what I saw when I go to wars when I'm on the front line - with or without soldiers or with civilians or the wounded in hospitals - you would never, ever dream of supporting a war again. Ever in your life. It's a remarkable thing that in the commercial cinema, feature films can now show the bloodiest, goriest themes which are quite similar to what we see in real life - Saving Private Ryan - the guts spilling out. And yet real war cannot be shown without censoring pictures which in many cases are exactly the same as what you see when you go to the cinema.

"If you go to war, you realize it is not primarily about victory or defeat. It is about death and the infliction of death and suffering on as large a scale as you can make it. It is about the total failure of the human spirit. We don't show that because we don't want to. And in this sense, journalists, television reporting, television cameras are lethal. They collude with governments to allow you to have more wars. Because if they showed you the truth, you wouldn't allow any more wars," [Robert Fisk] said.

"I know I'm very soft-spoken. But I have endeavored to live my life by my terms. And that means that I am a renegade. An outlaw. A pagan."

Alice [Walker] continued, "There is no reason not to rebel. I learned that really early.... Rebellion, any way you can manage it, is very healthy. Because unless you want to be a clone of somebody that you don't even like, you have to really wake up. I mean, we all do. We have to wake up. We have to refuse to be a clone."

...

Be nobody's darling;
Be an outcast.
Take the contradictions
Of your life
And wrap around
You like a shawl,
To parry stones
To keep you warm.

Watch the people succumb
To madness
With ample cheer;
Let them look askance at you
And you askance reply.

Be an outcast;
Be pleased to walk alone
(Uncool)
Or line the crowded
River beds
With other impetuous
Fools.

Make a merry gathering
On the bank
Where thousands perished
For brave hurt words
They said.

But be nobody's darling;
Be an outcast
Qualified to live
Among your dead.

Permalink 08:30:19 pm, Categories: Fun, 96 words   English (US)

The Yes Men

I had posted in the past about The Yes Men, probably the most unique activism I've ever seen.

Well, I found the movie on Google Video. Check it out before it gets taken down.

For some highlights, skip to about 38:00 minutes into the film, where they demonstrate the 'Management Leisuresuit'. Some funny CGI :).

And the grand finale at about 1:00:00 (1 hour) into the film, the McDonald's sewage system. "The #1, #2, #3, #4, #5 would no longer refer to combinations of food, but rather just the number of times the product has been recycled." Pure genius.



I think you get the picture :).

Permalink 02:32:35 pm, Categories: Python, 112 words   English (US)

reversing a list

I've always found the reverse() method of a list rather wierd because it reverses the list in place. I just found out about reversing via slicing:

>>> f=['foo', 'bar', 'baz']
>>> f[::-1]
['baz', 'bar', 'foo']
>>> f='hello'
>>> f[::-1]
'olleh'

There is also a new builtin function in 2.4 called reversed(), which returns an iterator, and is more efficient for large lists:

>>> f=['foo', 'bar', 'baz']
>>> for x in reversed(f):
...   print x
... 
baz
bar
foo

And yet another (ugly) method shown to me by a coworker:

>>> f=['foo', 'bar', 'baz']
>>> reduce(lambda x,y: [y] + ((type(x) == type([]))
...        and x or [x]), f)
['baz', 'bar', 'foo']

Hmm, Python seems to be moving towards TMTOWTDI.

10/21/06

Permalink 06:10:00 pm, Categories: Fun, 2 words   English (US)

Indian teacher survey

Funny stuff.

Permalink 04:14:57 pm, Categories: Books, Python, 123 words   English (US)

enumerate

I'm reading Core Python Programming 2nd Ed. I sometimes like reading the basic intro chapters even though I have a bit of familiarity with Python. There is always something that I may have missed, and each author has a different writing style which is entertaining to read.

I just found out about the enumerate() builtin. How many times have you done this?

>>> f=['foo', 'bar', 'baz']
>>> for i in range(len(f)):
...   print f[i]
... 
foo
bar
baz

Well you can use enumerate() to have both the index and the value:

>>> f=['foo','bar','baz']
>>> for i, val in enumerate(f):
...   print i, val
... 
0 foo
1 bar
2 baz

Cleaner and no array indexing needed. Oh and how about the Zen of Python?

>>> import this

10/19/06

Permalink 10:29:44 pm, Categories: Society, 583 words   English (US)

Seymour Hersh talk

I attended a talk by Seymour Hersh tonight at Stanford and it was very good, but also very depressing. He is a Pulitzer winner who reported on the My Lai massacre in Vietnam and its coverup, and then did much of the reporting on Abu Ghraib. He was given firsthand pictures and videos of what went on in the prison by soldiers who came back from Iraq, many of which the news media he worked for refused to print. He described the video of one of the pictures that was released, where an Iraqi was naked with his hands behind his head outside of his cell, blindfolded, and a dog barking. He goes on to say that during the video the man was refused to cover his genitalia, and the dog ordered to bite him there. There was blood everywhere the whole thing was on video.

He described that the things that we have been shown don't even begin to give a glimpse of what truly happened, that we have not even "begun to see the evil" of what went on there and still goes on in secret prisons. He described women being raped, and small children (boys) being sodomized by Iraqi guards on video. These are the things that the American media hides. He said that many women in prison send out letters to their families to kill them once they get out, because the shame is too great. It could even be simply fondling by the guards or seeing them naked. Their culture is just so different. Our American culture clashes so much with what Iraqi culture holds sacred, and this is why alot of the prison torture has to do with sexuality and humiliation.

Alot of what he said brought tears to my eyes because I just couldn't bear some of it. How can anyone do these things to other human beings? One thing he mentioned is that what's coming out now is many American soldiers are coming back mentally ill, schizophrenic, or severely depressed. I think it is natural to be affected if you are forced to treat other people in such demeaning ways. Hell, that even gives some hope that these soldiers deeply feel they've done wrong.

I don't understand the goal. It's like we as people crave violence. My mom used to say the bad things you do become part of your karma and you will have to repay the debt eventually, perhaps even in another lifetime. Hersh was saying that the Iraqis have no trouble postponing revenge until many, many generations later. When I think about these things, it's only common sense that this will come back to us. They won't simply be forgotten. And when it happens, can we really blame them? Imagine if these things were done to Americans instead, how would America react?

I feel very bad that no one was there to stand up for the people being tortured. It's like when someone describes it I imagine I'm there in the cell with them, and guilty for not stopping it. They are people just like you and me, not animals. I think that until we can see all other human beings as if they were our own family, we'll always have violence. Evolution basically says we are all one family descended from a common ancestor, so it's not even religion that should bring people together. I wish that people could move beyond all of this and learn to live without violence someday.

10/15/06

Permalink 09:27:03 pm, Categories: Movies, 26 words   English (US)

Videos 4 You

Just found Who Killed the Electric Car? on Google Video.

Also checkout some other documentaries at throwawayyourtv.com.

Oh, and how about some fine CNN censorship.

09/27/06

Permalink 09:20:41 pm, Categories: Python, 43 words   English (US)

Finding truth

Let's say you have a list:

foo = [True, False, False, True]

and you want to do a simple AND across all elements. Here's a quick way:

result = reduce(lambda x, y: x and y, foo)

result would be False in the above example.

09/16/06

Permalink 10:00:32 pm, Categories: Books, Science, Health, 164 words   English (US)

Attention and intelligence

From Alan Wallace's The Attention Revolution:

[William] James also asserted that geniuses of all kinds excel in their capacity for sustained voluntary attention. Just think of the greatest musicians, mathematicians, scientists, and philosophers throughout history - all of them, it seems, have had an extraordinary capacity to focus their attention with a high degree of clarity for long periods of time. A mind settled in such a state of alert equipose is a fertile ground for the emergence of all kinds of original associations and insights. Might "genius" be a potential we all share - each of us with our own unique capacity for creativity, requiring only the power of sustained attention to unlock it? A focused mind can help bring the creative spark to the surface of consciousness. The mind constantly caught up in one distraction after another, on the other hand, may be forever removed from its creative potential. Clearly, if we were to enhance our faculty of attention, our lives would improve dramatically.

09/14/06

Permalink 06:52:38 pm, Categories: Science, 145 words   English (US)

Butterfly weddings

I just learned that it is now a fad to release butterflies at weddings. The wedding planners must of course get these from 'butterfly farms.' From an interesting article in The Epoch Times:

"It's a fact that diseases spread from farm animals to wild animals," says Glassberg, who has a Ph.D. in biology from Rice University. "There's a whole raft of diseases that only affect butterflies. When you have millions of them in one area [as on butterfly farms], you foster the spread of disease, and even more dangerously, you foster the creation of new diseases. ... Releasing [butterflies] also decreases the genetic fitness of the wild organisms," he says, citing study results published in Nature magazine.

Might want to think twice before you let loose thousands of insects at your next wedding. Stick to throwing a bridal bouquet on your fellow human beings please.

09/13/06

Permalink 09:47:21 pm, Categories: Python, 277 words   English (US)

lambda curry

Curry functions are best described as cocked functions. You can do this with lambda, and it's really useful for callbacks where you'd like to add some extra data not normally given to the callback.

Let's say you have some library function that looks like:

def Foo(command, callback):
  ...

Foo takes a command, executes it, then calls callback with the status when it's finished, i.e.:

  callback(status)

Normally you'd have your own method that would be the callback and take one status argument. However, what if you'd like more information passed to your callback than just status? Let's say you want the callback to get the command as an argument as well. That's where lambda comes in. Let's say your callback looks like:

def MyCallback(command, status):
  ...

Then you would just do:

command = 'blah'
fn = lambda status: MyCallback(command, status)
Foo(command, fn)

Now MyCallback will be called with both the command and the status. The power of lambda!

Update: This is absolutely wrong. Check out this example:

>>> def foo(n, x, y):
...   return x + y + n
...
>>> num=5
>>> f = lambda x,y: foo(num, x, y)
>>> num=10
>>> f(6, 7)
23

The lambda still refers to the num variable, not its value at lambda creation. What if I want to use the value 5 above for num and not 10? That's when a curry is absolutely needed. PEP 309 explains it. Generally you can create a curry method to do this:

def curry(fn, *cargs, **ckwargs):
  def call_fn(*fargs, **fkwargs):
    d = ckwargs.copy()
    d.update(fkwargs)
    return fn(*(cargs + fargs), **d)
  return call_fn

Then for the above example I would do:

>>> num=5
>>> f = curry(foo, num)
>>> num=10
>>> f(6, 7)
18

Ah, much better!

09/11/06

Permalink 11:11:02 pm, Categories: Movies, 230 words   English (US)

Loose Change

I came across the online movie Loose Change, which offers an 'alternative' viewpoint of 9/11. Say what you will about consipiracy theories, but this documentary poses some pressing questions. I remember watching the towers fall and thinking to myself, that looks like a controlled demolition. That's exactly one of the points this movie puts forth.

The things that I found most disturbing was the supposed coverup of information. Supposedly employees of a Sheraton hotel had surveillance video that showed what happened to the Pentagon, but this video was confiscated and the employees agreed to not say anything about it. That just seems crazy to me. Also the stock market activity with put options on American Airlines and Boeing, as well as the mortgage owner of the twin towers doing some suspicious contracts shortly before the downfall really boggles me. The film talks about the multiple explosions being heard and felt both before and after the planes hit the towers, and the transported gold from one of the towers.

Some of it is convincing, some of it crazy. It's a nicely made video though, and I'd recommend watching it and making your own conclusions. Personally, I can't believe that such a coverup would be successful. So many people would have to be in on the conspiracy. I find it hard to imagine that not one of those people would have a conscience.

09/09/06

Permalink 03:22:19 pm, Categories: Python, 153 words   English (US)

try finally with except

I many times had a need to do a try/finally in Python as well as catch exceptions. This always ended up with sub-trys:

try:
  try:
    oh()
  except Blah:
    how()
finally:
  lame()

I'm happy to find out that Python 2.5 will now allow both except and finally to be used together. Even cooler is the with statement. No more needing to write boilerplate acquire/release thread locking code, but rather simply:

lock = threading.Lock()
with lock:
    # Critical section of code
    ...

Cool, automatic acquire and release. Checkout the What's New in Python 2.5, as it also contains other neat things. There is also a video of a talk Guido gave at work about Python 3000, which I unfortunately missed :(.

Btw, I used tinyurl here because of the gayness of my webhosting provider. They are blocking any http post strings containing "/fev/" (replace fev with dev) with mod_security as if this somehow makes the site more secure.

09/03/06

Permalink 11:12:41 pm, Categories: Books, 242 words   English (US)

Mission: Intercept Terror

From George Soros' The Age of Fallibility:

What makes the war on terror a false metaphor is that it is taken literally. Terror is an abstraction. One cannot wage war on an abstraction. We have the means to destroy any target as long as we can identify it, but terrorists rarely provide an identifiable target. When we declare war, we must find a target; but the target we choose is unlikely to be the right one. We have killed more innocent civilians in Iraq than the terrorists killed on 9/11. In addition to killing, we have also humiliated and tortured many Iraqis. By creating innocent victims, we have advanced the terrorists' cause. They can now depict us as the terrorists and enlist the support of theiry countrymen, just as President Bush has enlisted ours. We find this difficult to understand because we cannot envision ourselves as terrorists. Yet, that is exactly how we appear to many Iraqis.

...

Since terrorists are invisible, they will never disappear. Since the war on terror is counterproductive, it is liable to generate more terrorists or insurgents that it can liquidate. As a result, we are facing a permanent state of war and the end of the United States as an open society. All men and women of good faith, regardless of party affiliation, must come together to reject the war on terror as a false and dangerous metaphor.

Oceania is at war with Eastasia... no, I mean Eurasia.

Permalink 09:06:27 pm, Categories: Movies, 312 words   English (US)

Half Nelson

I remember seing a movie called Fresh which was about a precocious young kid growing up in the inner-city. He excels at one game: chess, whom his dead-beat father (played by Samuel L. Jackson) has taught him. This is a movie that takes a completely different look at inner-city struggle. It's about a struggle to get out of that environment, and not fall trap to the plagues that affect the majority of the community (drugs, violence, etc). The boy plays everyone as if they were chess pieces, and the strategy is only revealed towards the end of the movie. But the strategy is a success and he frees himself from the shackles that held him down in that environment. I thought it was beautiful.

Half Nelson reminded me of that movie. It's about an inner-city teacher who is good at his work but has a crack addiction which one of the students that admires him finds out. It was very moving and sometimes very heart-breaking to watch. It really made me think about how tough it must be for inner-city children to find good role-models and avoid the pitfalls that plague those communities. It really is a struggle to get out of such an environment and it takes alot of strength to do so. I think this is what the movie was really trying to convey. It ended optimistically but in no way was it a Hollywood type of ending. I liked that because it was realistic.

The teacher is played by Ryan Gosling, whom I really liked in the movie The Believer. In that movie he played a neo-Nazi, and a journalist uncovered he was actually Jewish. In the end he realized he was wrong and was filled with guilt. Supposedly it is based on a true story, but I thought he acted really good in that movie and this one.

Permalink 07:45:52 pm, Categories: Health, 73 words   English (US)

Runner's cry

Excellent article on the impact of jogging on baby boomers.

Besides I've seen many joggers, and never a happy one. So if their agonized expression is the same as the pain experienced by their joints, it's small wonder that hips and knees give out at a young age. Jogging is frequently a disaster waiting to happen as it involves intense pressure, particularly on the knee.

Really, when have you seen a smiling jogger?

08/30/06

Permalink 09:32:12 pm, Categories: Science, 318 words   English (US)

Root of intelligence

I attended a very interesting talk by Alan Wallace, who has spent more than a decade living with Tibetan monks and with his unique background attempts to merge science with Buddhism. The most fascinating concept he talked about was the association of attention with intelligence. With all the ADD disorders out there, this really intrigued me.

What we attend to and how we attend to it largely determines the kind of world we experience, including our sense of who we are as individuals. Our ability to learn, to receive an education, depends on the ability to focus our attention on a chosen topic with continuity and clarity. Our problem-solving abilities and creativity, as well as our capacity to communicate and to cultivate meaningful human relationships, also revolve around the mental faculty of attention.

If you think about how meditation is all about focusing the mind, you can understand how it is such a beneficial exercise. I always wondered what is the best exercise for the brain, and it seems concentration and focus are key. Think about it, how many smart people do you know do not have the ability to focus intimately on a problem? It seems this focus and intelligence go hand in hand. You can think of autism as almost an extreme form of focus and attention, and it's not unreasonable that many autistics have amazing mental capacities.

The Eastern religions all had meditation deeply rooted in them. Is it any wonder that some people consider asians as more intelligent? Not that I agree with that stereotype, but I do think attention and focus plays a big role. I am all for meditation, but I think focus and attention can be applied on anything you do. It doesn't have to be OM. It could be writing code or playing a sport. As long as focus and attention is being cultivated, it's good in the long run.

08/29/06

Permalink 10:45:51 pm, Categories: Website, 58 words   English (US)

Smile, you're on Google Images

I've been getting alot of spam comments being posted to this particular blog entry of mine. I always wondered why. I mean, it's a really lame blog entry.

Then I found out what the first link on Google Images was when you search for smiley evolution. No idea why someone would search for this.. but there ya go.

Permalink 10:27:36 pm, Categories: Health, 34 words   English (US)

Yogurt culture

I always wondered how the 'live cultures' listed on various yogurts survive the stomach acid environment to get to the intestine. Here is a good bit of common sense from a newsgroup about.... cats.

08/20/06

Permalink 10:51:53 pm, Categories: Apple, Music, 110 words   English (US)

iTunes extortion

I saw Snakes on a Plane last week. I'm not going to write a review of that movie. I mean, it's snakes on a mother-fucking plane. What more do you need?

My problem is with iTunes. iTunes is carrying the soundtrack. I kinda like the theme song, but guess what, Apple is forcing us to buy the whole album just for one song. I know why, it's because all the other songs suck. What happened to the 99 cent songs? Does that only apply when it's convenient? I've seen iTunes doing this alot lately, forcing me to purchase albums instead of individual songs. Lame! I am not paying $10 for 1 mediocre song.

Permalink 10:22:44 pm, Categories: Fun, Music, Biking, 64 words   English (US)

Legal drugs, Outkast covers, and electric bikes

Here's an interesting 1-hour BBC docudrama on 'what if drugs were legal.'

Also came across this neat acoustic cover of Outkast's Hey Ya. I even put up an mp3 in case you want it.

Last but not least I saw an advertisement in the local newspaper for a cool electric bike. I liked everything about it except for the 'keep out of rain' warning.

Permalink 10:52:37 am, Categories: Ubuntu, Apple, 1791 words   English (US)

Ubuntu on my Powerbook

This weekend I decided to take the adventure of installing Ubuntu 6.06 (Dapper Drake) on my Powerbook G4. I wasn't sure what to expect as to hardware support, and learned alot along the way. I am writing this from Firefox in Linux on my Powerbook though, so it's been somewhat successful :).

I've been wanting to have a good Linux box to hack on. I did install Xubuntu on an old Thinkpad, but it's falling apart and the battery lasts a whopping 10 minutes. I've heard some good things about Ubuntu on PowerPC, so decided to give it a go.

I have OS X Panther on my Powerbook. I have never had the chance to upgrade to Tiger. I have a 70G drive and had plenty of free space, so my first task was to resize and repartition. Now I'm pretty familiar with doing this on the PC, but not on Macs. I have been using SuperDuper for backups to an external USB drive, so I was set for backups. I actually wouldn't mind it if my Panther partition got trashed, as it would give me an excuse to upgrade to Tiger. In the end nothing bad happened, so I was still luckily (or unluckily) stuck with Panther.

Back to resizing. Out of whim, I tried booting the Ubuntu CD to see if it had an easy resizing tool like it did for Intels. Nope, it just wanted to erase my whole disk. I read that it is possible to do resizing with free tools, but it was late and I didn't feel that brave. I decided to purchase and download iPartition, which seemed similar to Partition Magic. Of course, it couldn't resize the live running boot partition, so I needed to boot something else. The manual first recommends trying to boot off of a backup drive, and if that doesn't work to use the boot CD creator tool that comes with iPartition.

Obstacle #1: try to boot my backup drive via USB

I thought this would be a good test of by 'backup strategy.' I plugged in my external USB drive. After some digging around, I found out that you can have the Mac scan for bootable media at powerup by holding down the Option key while powering on. This brings up a nice GUI boot screen and showed my USB drive! I selected it, and after some crunching it eventually came up with a no smoking sign and didn't boot :(. Oh well I guess my backup isn't that cool. It does have files on it though, so I am backing up something, just not something that will boot. I tried some other hackery mentioned on the web, by booting into the Open Firmware by holding down the twister-inspired key combination of Command-Option-O-F while powering up, and changing the boot-device with setenv. I swear, Apple is trying to give me arthritis. Anyway, no luck with that, and I later realized that setenv actually writes the NVRAM, so I had to remember the old setting and undo this. Fuck booting from my 'backup.'

Next I created an iPartition boot CD with their CD creator tool. I booted it (again with the Option key held at boot to select CD), and successfully shrunk my OS X partition by 10G and left the free space. This operation was done so fast I thought it didn't do anything. I booted back into OS X. It booted ok (whew), and I verified in Disk Utility that the partition shrunk by 10G. So far so good.

Now on to installing Ubuntu. I booted the CD. I wanted to see if the Airport wireless worked, so went to System -> Administration -> Networking. It detected the Airport but failed to configure it, and I remember seeing boot messages about firmware errors. I did some research beforehand and it turns out the driver is not open, and it was up in the air whether it would work or not. I figured I could fool with it after installation. I grabbed a wireless card from my Thinkpad, and voila that worked like a charm in my Mac. At least I would have internet access while I debugged the Airport driver later.

I ran the installer, and specified for it to use my free space. The text that is shown before making the partition gave the impression it was going to wipe my HD, i.e. it was not obvious it would use my free space. I thought whatever, if it trashes it that's ok. It didn't (whew), and after a 40 minutes or so, I rebooted. I was given a LILO-like boot menu with my OS X still there. I tested OS X, and that still worked (whew). Next I rebooted into Linux! It was speedy and worked like a charm. My wireless was working, but with the PC card, not with the internal Airport.

Obstacle #2: getting Airport to work

I started searching the discussion boards for Airport support. Now Ubuntu forums are interesting. They are mostly filled with non-Linux users seeking help. That's cool and all, but it just makes my searching more difficult with crappy results. I finally found this guide which was generally what I did except for the part about installing 'Network Manager', whatever that was. I figure I should be able to use the Network setting app that is already part of Ubuntu. I found some other good docs, the latter being very helpful. Eventually I got it working whenever I brought up the interface in the Networing app, but it would take a very long time, and would never work at bootup. From those docs, I added the following to /etc/network/interfaces:

auto eth1
iface eth1 inet dhcp
  pre-up ifconfig eth1 up
  pre-up iwconfig eth1 rate 11M
  pre-up iwconfig eth1 ap any
  wireless-essid myssid

I rebooted and voila, Airport works! No more PC card needed. Everything, even sound, was working. But after using Ubuntu for some time on the Mac, I realized a big annoyance...

Obstacle #3: How the fuck do I right-click?

I realized early that Ubuntu is not very usable with a 1-button mousepad. After some searching I found out that F12 (or maybe it was F11, it's not working now) was mapped to right-click. WTF, there is no way in hell I'm using any F key for right-clicking. In OS X I can do it by ctrl-clicking, so I should be able to do it in Linux too. I came across this posting about installing mouseemu. I did so, and added to /etc/default/mouseemu:

MID_CLICK="-middle 125 272" # Command key + mouse click
RIGHT_CLICK="-right 29 272" # Control key + mouse click

Once I did that and restarted mouseemu (sudo /etc/init.d/mouseemu stop/start), I was able to right-click with ctrl-click. Yay! But then after realizing that I have to use Alt-Tab instead of Command-Tab to switch windows, I was annoyed further because the Alt key on the Mac is proven to increase the risk of arthritis and why the hell do I have to remember a different keystroke for Linux when Command-Tab works in OS X?

Obstacle #4: Swapping Alt with Command key

I found somewhere on the web that xmodmap can be used for this. I created a ~/.xmodmap file that contained:

keycode 115 = Alt_L

One thing very cool is Ubuntu will notice your .xmodmap and ask you to load it on next startup. There was some discussion on whether to use .xmodmaprc, or .Xmodmaprc, or .Xmodmap, or .muhahhayouWillneverFigureitOutrc. But I will tell you .xmodmap works :).

After booting back and forth between OS X and Linux, I realized that the boot manager was defaulting to Linux. I didn't want that. I wanted OS X by default. Such began my journey into yaboot, the LILO for Mac's.

Obstacle #5: boot OS X by default damnit

It was a short journey. I edited /etc/yaboot.conf and added after the macosx= line:

defaultos=macosx

This is described in 'man yaboot.conf'. I rebooted, but whaddaya know, it still booted into Linux by default. I was optimistically thinking this would be like GRUB, where I didn't have to run anything to update the boot sector. Turns out I need to run ybin, which copied my changes in. I didn't know what arguments to give, so being inspired by 'lilo', I just ran 'ybin.' That worked, and I was booting OS X by default. Yay.

Now I worked a bit more in Ubuntu and realized that I needed to copy some files off of my OS X partition (namely, my SSH config file).

Obstacle #6: Accessing my OS X partition from Linux

I had no idea if OS X's HFS+ partition was supported in Linux. I found this document which states that it is, and the fs type is hfsplus. However, 'man mount' only shows hfs, not hfsplus. I stuck with hfsplus anyway. I found this post about a user mounting his partitions. All I wanted to do was copy a file, and I'd be pretty pissed if Linux screwed up my OS X partition accidentally. I decided to mount it read-only. But what's my OS X partition? I easily found that from the macosx= line in /etc/yaboot.conf, which was /fev/hda3. dev has been replaced with fev to protect the innocent. For some reason either my webhosting provider or blogging software won't let me post dev. I ran the following commands:

mkdir /tmp/mnt
mount -o ro -t hfsplus /fev/fda3 /tmp/mnt
cp my file
umount /tmp/mnt

At this point there are only a few things left that annoy me. The mouse sensitivity seems quite different from OS X. I tried adjusting the acceleration settings, but it still just seems wierd. My fan seems to be constantly running, and my guess is Linux is not as nice on the CPU as OS X. Finally, cutting and pasting with a 1-button mouse in Linux is a bitch. Why do I have to shift-ctrl-anything to copy text in Terminal anyway? Why can't I just select and have it auto-copy? Maybe there is a way, but I haven't figured it out yet. Maybe it is time for me to get a real mouse and keyboard.

The fn, ctrl, alt, and command keys on the Mac cause me no end of grief. I constantly forget which incantation to use to switch workspaces, switching firefox tabs, closing windows, closing firefox tabs, etc. But that's more of a rant towards the Powerbook keyboard in general. Also forget about Flash and other plugins, they are nonexistent for PowerPC Linux.

In general, it was a fun adventure to figure out how to do things and cool to have Linux on my Powerbook. It runs beautifully and I'm sure I'll be hacking on it for some time.

08/15/06

Permalink 10:04:03 pm, Categories: Ubuntu, 718 words   English (US)

Xubuntu: alles wunderbar

I have this pretty old IBM Thinkpad iSeries Type 1161-260 with a Celery processor. It's been sitting in my closet for about 6 months. I had attempted to run Linux on it at one point, but the Cardbus pcmcia interface on this laptop did not have good support so essentially no pc card worked. I spent alot of time hacking at it and eventually I gave up and left Windows XP on the system.

This weekend I thought maybe Linux these days has better support. It's a low end laptop with 192MB RAM. I wanted to run Ubuntu, but needed a lightweight version. That's when I found Xubuntu, a lean Ubuntu. I had about 3G free on my windows partition (a whopping 5G drive). I guessed correctly that Ubuntu must have a partition resizer that works well.

I downloaded the Xubuntu ISO on my Mac, burned it, and booted my Thinkpad. After some crunching, it came up to X with a live-CD like distro and an 'Install' icon on the desktop. Cool. I brought up a terminal and did an 'ifconfig -a' expecting to see only my loopback device. Lo and behold, I see an eth0. I think to myself, this can't be my wireless card. I then went to the graphical network configurator and saw that it detected my wireless card. A few clicks and I saw the open wireless networks (I keep mine open too :). I was able to join, startup Firefox, and browse. My jaw dropped. Ubuntu out of the box on its installation live-CD has support for my wireless card that I could never get working for the life of me? I was very impressed. I had to start the installation.

After a long time I eventually had Xubuntu installed. I rebooted and found out that now my wireless card wasn't detected. Poking in /var/log/messages I saw:

cs: warning: no high memory space available!

Now this shit looks familiar, the same crap I had ages ago that I couldn't fix. So continued my hacking. I thought maybe some module loaded at full install and not in the live-CD was conflicting, maybe USB. So I sought to disable USB. Now times have changed and this is not as easy as just commenting it out in /etc/mod* files. I found /etc/modprobe.d/aliases and began fiddling with it. But for the life of me I could not get USB disabled. Even when I removed the kernel module file it would still get loaded!

This really baffled me. I thought maybe USB is compiled into the kernel. But that wasn't the case because I see it in a 'lsmod'. After much searching I realized that now distros use an initramfs, which is like an initrd but I believe you can store more. I looked at the current initramfs used during boot (via /boot/grub/menu.lst), which is a fun gzipped cpio archive:

mkdir /tmp/a
cd /tmp/a
gzip -dc /boot/initrd.img-2.6.15-26-386 | cpio -i

And whaddaya know, the usb kernel modules are stored in there. I found out about mkinitramfs (like mkinitrd), made a new one without usb, rebooted. But still my fucking wireless card didn't work. I went to sleep and decided to try again later. I was determined though because the damn thing worked on the live-CD, I have to be able to get it working installed! That would be really lame if I gave up now.

I spent some time searching, and found some references about pcmciautils replacing pcmcia-cs, and /etc/pcmcia being moved to /usr/share/pcmciautils. On my system /etc/pcmcia was empty. I booted the live-CD again and noticed that /etc/pcmcia had lots of config files, importantly a config.opts. On my installed system, this file was in /usr/share/pcmciautils. It contains info on memory regions to probe.

Then I found this German posting that seemed to be recommending copying config.opts to /etc/pcmcia. My 2 semesters of German came through, and I knew that 'alles wunderbar' meant something good. I copied the file, rebooted. Voila, my wireless card worked!

What a pain and such a simple fix! It's really lame this file is not automatically copied there, but I'm glad to have gotten it working. Where there is a will there is a way.

08/13/06

Permalink 11:17:14 pm, Categories: Fun, 4 words   English (US)

Iraq Opportunity

Funny Daily Show skit.

Permalink 11:09:17 pm, Categories: Movies, 363 words   English (US)

Little Miss Sunshine

I saw World Trade Center this weekend, which was pretty much a tearjerker. I thought it was good, with some very moving scenes, but too much tearjerking in my opinion. So a really good balance for that was watching Little Miss Sunshine.

I wasn't sure what to expect from this. It looked like a plain old family movie, but the R rating had me wondering, and it got so good reviews I had to see it. This is a unique blend of dark comedy with lighthearted fun. It's a story about a very dysfunctional family going on a road trip for a kid's beauty pageant. Steve Carell from Comedy Central plays a suicidal gay literature professor. Greg Kinnear plays a 9-step self-help salesman. Alan Arkin plays a cocain-snorting grandfather. Paul Dano plays a mute Neitzsche follower. You can tell it's not your typical family fun comedy.

But it is unique that it succeeds in making fun of this whole collection of people and the events they come across. Some of the comedy is very biting. There is one small scene that pokes fun (or more like jabs) at the impersonal nature of doctors. A doctor comes out and announces a death of a family member in the most solemn way a doctor can do. He then gently goes to side and YELLS "Linda!!!" Linda is the bereavement specialist. This is just one situation where the movie becomes somber and then punches you in the face to make you laugh, and the movie is full of scenes like this.

The last scene pretty much had me and the audience dropping our jaws. I can't give it away, but it is a very biting and brilliant satire of young child beauty pageants. At first you think this pageant is just harmless fun. But the director morphs that into something else. It was wierd, I saw this scene and said to myself, "Oh my God." It was completely unexpected for me. But at the same time it was pure comedic genius, and at the end had me and the audience clapping.

I definitely recommend this movie, but I think the R rating is truly deserved heh.

08/05/06

Permalink 08:44:52 pm, Categories: Movies, 623 words   English (US)

The Descent

British horror flicks seem to have so much more intelligence to them than American ones. I loved '28 days later', and this movie is in the same spirit.

The Descent was a pretty intense psychological horror. It has its share of gore, but is more brooding compared to the regular slasher movies, and seems to have more realism. There is a scene where a girl breaks her leg and has a bone protruding. The effort to fix her wound is almost unbearable to watch, but it isn't anything different from what might happen in an emergency room minus the anesthesia. It's a horror of real life.

The movie is a sort of Goonies Gone Wild :). The plot is absurd but almost believable. I am not much of a horror fan, but I do love character studies and when people are put into situations that require them to use every bit of their mind and body to get out of. It's like a battle with nature, and I was wierdly reminded of evolution. The hero must do some really bad things and has many flaws. She must descend into the depths of the horror and accept it before she can get herself out. There is something very human about it.

I have never really had much interest in hiking or so-called 'nature' outings. To me nature is about struggle, suffering, and death. I always think it's silly that we go hiking in the comfort of tents and rugged apparel to 'experience' nature. It's sort of like watching reality through a TV in the safety of your home. That's not what nature is about. That's why I found this movie so appealing. The group goes hiking with the safety of their BMW X5 and expensive climbing gear. However, when the comforts and safety are stripped away, true human nature and the struggle to survive are the only things that will either save or kill you.

The way the movie conveyed claustrophobia was simply amazing. When the group is going through tunnels that their bodies could barely fit through, I found it pretty frightening. The camera work here is excellent. My only gripe is the ending. Stop reading because spoilers lie ahead.

In the cave there has evolved a human-like population that have non-functional eyes and exceptional hearing. They use sounds to find their prey. So generally it's a descension into this environment and a struggle to survive and get out, almost like a descent into a hell of prehistoric times. How they find remnants of past explorers on this descent is very eery and conveys the hopelessness of trying to escape. There are alot of psychological cues in this movie, and the heroine ultimately becomes a violent animal (both psychologically and physically) in order to survive. This hero has problems of her own, and shortly before her expedition, she lost her daughter in a fatal car accident. Demons and overwhelming guilt lie within her.

When I saw the ending, it seemed a dream to me. The hero ascends over piles of bones and skulls towards a glimmer of sunlight. It seemed very symbolic, like she must go through the hell before she can get out. But she does get out, finds the car, takes off, and then sees someone she has killed in the car with her. Scream and cut to credits. I was like, "what?" I thought to myself, this escape has to be a dream. What do you know, I find an alternate ending on YouTube. Now this makes more sense. It's not a happy ending, but to me should have been in the American version.

In general it was a very interesting flick. Go check it out if you are into psychological horrors.

Permalink 08:08:47 pm, Categories: Fun, 1 words   English (US)

White guys and asian girls

Funny.

Permalink 07:34:29 pm, Categories: Science, 39 words   English (US)

Even eskimos need AC

Here's a great article about our reliance on air conditioning. I wonder how much affect AC has on global warming vs cars. My favorite quote:

We still want to look at nature. We just don't want to feel it.

08/01/06

Permalink 08:31:07 pm, Categories: Linux, 158 words   English (US)

I need a PC

So I've been using a Mac for some time now. In fact I haven't had a PC at home in over a year. And now I miss it, yes I miss the PC.

Why? Obviously I've found the Mac superior than a PC in terms of usability. However I feel that Apple is not a very open source developer friendly environment. I don't know how to describe it. If I want to do development on Mac, I'd want to use the Cocoa stuff, or Applescript, or whatever. But this is not as fun as doing true Linux development. The open source developer community is missing from Apple. I enjoy development on Linux better than the Mac.

I hack on Linux at work, but at home I have no Linux box, which sucks. I'd like to maybe get an Ubuntu box at home as a desktop. Now I wouldn't give up Mac of course, just need the Linux fix.

07/31/06

Permalink 09:59:53 pm, Categories: Movies, 187 words   English (US)

The Illusionist

Today I got to see an advance screening of The Illusionist with a discussion with the director afterwards. This movie stars Ed Norton and Paul Giamatti, both incredible actors. The movie was brilliant and I loved it. The music was by Philip Glass, who is an amazing composer. I love every movie he does music for because the music really becomes the star of such movies. Our screening was a DVD projected on a wall, and I definitely would like to catch this in the theatres. The scenes are beautifully done.

This movie is about, well, illusions. Norton plays a magician whose acts become very controversial for his time. You can never tell whether Norton has supernatural powers or not, and as the director confirmed afterwards, this is an important theme of the movie. We may witness events that challenge our reason, that make us wonder, could the illusion be real? How does such a conflict with our mind manifest itself, how does it change our behavior and reactions? It's almost like such events trigger the primitive instinct in us, the embrace of that which is unknowable.

Permalink 09:49:17 pm, Categories: Car, 309 words   English (US)

Jack your own car

Very interesting story on car anti-theft devices and the lovely insurance companies. This quote boggled me:

I went to see Montes at his custom motor-cycle shop about a half hour south of San Francisco and asked him how someone could have stolen my car. He just laughed. “If I want to take your Civic, I’ll do it in 10 seconds,” he said. Then he confirmed Hyser’s story. The mythical Honda override exists: It’s a series of presses and pulls of the emergency brake. Each car, it seems, has a unique override code, which correlates to the VIN.

“You want to get yours?” Montes asked.

Sure, I said.

He called an acquaintance who worked at a Honda dealership. I listened, awestruck, as Montes fed the guy a barely credible story about a cousin who had dropped his keys down a sewer. The dealership employee was at home but evidently could access the Honda database online. I gave Honky’s VIN to Montes, who passed it along to his friend. We soon had the prescribed sequence of pulls, which I scribbled down in my notebook.

I walked outside and approached Honky. The door lock would have been easy – a thief would have used a jiggle key, and a stranded motorist would have had a locksmith cut a fresh one. I just wrapped the grip of my key in tinfoil to jam the transponder. The key still fit, but it no longer started the car.

Then I grabbed the emergency brake handle between the front seats and performed the specific series of pumps, interspersed with rotations of the ignition between the On and Start positions. After my second attempt, Honky’s hybrid engine awoke with its customary whisper.

I had just jacked my own car.

Yeah that's right, my civic is jackable. And all it takes is a phone call!

07/30/06

Permalink 08:51:45 pm, Categories: Fun, 297 words   English (US)

ESP and Spore

This past week was a fairly interesting one. Let's start with the talks I attended.

The creator of the ESP Game gave a talk about human computation. Think brainpower vs CPU. The task of image recognition is something that humans are vastly superior in than machines. Take the task of trying to come up with keywords describing an image, something impossible for computers to do, and yet so simple for us humans. We can pay humans to label our images for us, in image-tagging sweatshops. But the speaker came up with a game that people will play for free and contribute their brainpower.

The idea is simple and involves 2 players. Show them a picture, and each one must come up with words describing the picture. When both players match on their words, they get points. Voila, you are now building a database of image keywords. Add some taboo words and things get even better. It's strangely addictive. The speaker talked of comments from players thinking they've found a soul-mate, because they always agree on words. Sadly (or rather, to prevent cheating) your opponent is anonymous. Now, how can we make a game to identify elements of a image, say a man in a picture of a park. With another game, Peekaboom. I have to admit these games are kinda fun.

Speaking of games, the next talk I attended was by Will Wright, creator of various Sim* games and the upcoming Spore. This talk was PACKED, and this guy is a genius. He demoed Spore and it is simply amazing. The creature creator interface was very cool and looks like something a Pixar animator would make for his children. I may just have to buy a PC for this game, which is like Masters of Orion meets evolution.

07/27/06

Permalink 10:21:54 pm, Categories: Science, 242 words   English (US)

Life compressed

From Francis Collins' Language of God:

A major part of the problem in accepting the theory of evolution is that it requires one to grasp the significance of extremely long periods of time involved in the process. Such intervals are unimaginably beyond individual experience. One way to reduce the eons of history into a more comprehensible form is to imagine what would happen if the 4.5 billion years of the earth's existence, from initial formation to today, were instead compressed into a tweny-four-hour day. If the earth was formed at 12:01 AM, then life would appear at about 3:30 AM. After a long day of slow progression to multicellular organisms, the Cambrian explosion would finally occur at about 9 PM. Later that evening, dinosaurs would roam the earth. Their extinction would occur at 11:40 PM, at which time the mammals would begin to expand.

The divergence of branches leading to chimps and humans would occur with only one minute and seventeen seconds remaining in the day, and anatomically modern humans would appear with just 3 seconds left. The life of a middle-aged human on earth today would occupy only the last millisecond (one-thousandth of a second). It is not surprising that many of us have a great deal of difficulty contemplating evolutionary time.

We occupy a meager 3 seconds in this timeline. Think about your life lasting 1 millisecond. This really conveys the insignificance of our presence, and yet also the significance of our accomplishments within such a short time.

07/23/06

Permalink 10:47:45 pm, Categories: Religion, 368 words   English (US)

Darwin on God

There is this guy named Charles Darwin, and he said some interesting things on God:

There is grandeur in this view of life, with its several powers, having been originally breathed by the Creator into a few forms or into one; and that, whilst this planet has gone cycling on according to the fixed law of gravity, from so simple a beginning, endless forms most beautiful and most wonderful have been, and are being evolved.

And another gem:

...the extreme difficulty, or rather the impossibility, of conceiving this immense and wonderful universe, including man with his capacity for looking far backwards and far into futurity, as a result of blind chance or necessity. When thus reflecting I feel compelled to look to a First Cause having an intelligent mind in some degree analogous to that of man; and I deserve to be called a Theist.

I wonder how many Darwin followers with fish bumper stickers know how Darwin felt about God. I'd guess many would be surprised.

Supposedly, belief in God is decreasing in the US. I'm reading a book called The Language of God: A Scientist Presents Evidence for Belief by Francis Collins which is interesting.

One thing I truly believe is when less people believe in a higher power, there is less sanctity for life. I was reading in Discover magazine how there is more evidence coming out of fractures in Neanderthal skulls. What does this mean? Well it means it was a very, very violent time. When you think cavemen, you don't normally think of subhumans bashing each others skulls violently, or do you? Can you imagine what a violent time it must have been? We've sure come a long way, and honestly I think primitive religion played a big part in reducing the violence between humans. Say what you will about religion causing wars, but back in those times, religion must have stopped wars. That is, religion introduced humanity to humans.

I always loved the scene in 2001 where the pre-humans were fighting, a bone 'tool' goes flying up in the air, and then it cuts to a space station. That really sums up human evolutionary progress in the most visually poetic and visceral way.

Permalink 07:34:12 pm, Categories: Fun, 10 words   English (US)

Videos in heat

Permalink 06:19:00 pm, Categories: Linux, 99 words   English (US)

Automatic SSH brute force blocking

Cool way to do automatic SSH brute force blocking in iptables:

iptables -A INPUT -m tcp -p tcp --dport 22 -m state \
  --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m tcp -p tcp -s My.local.Lan.0/24 \
  --dport 22 -j ACCEPT
iptables -A INPUT -m tcp -p tcp -s \
  Trusted.Internet.Machine --dport 22 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 22 -m state \
  --state NEW -m limit --limit 3/min --limit-burst 3 \
  -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 22 -j LOG \
  --log-prefix SSHBRUTE
iptables -A INPUT -m tcp -p tcp --dport 22 -j DROP

Or alternatively, use BlockSSHD.

07/22/06

Permalink 11:36:53 pm, Categories: Home, 51 words   English (US)

100 °F and no AC :(

Ok today has been the hottest day since I've been in CA. We are over 100 °F in Mountain View and I have no AC. Luckily it is not very humid, but still hot as hell. I just hope it doesn't stay this way long or I need a new apartment soon.

07/18/06

Permalink 08:49:46 pm, Categories: Society, 378 words   English (US)

Arabs need better group names

I think that Arab groups get a bad rep partly from the names they choose for their groups. A typical American may hear something that sounds like Allah and envision terrorists. Compare Hezbollah to Mossad. Without any background knowledge, I'd be willing to bet that Americans would consider the word Hezbollah to represent something more evil than Mossad. Language is always a barrier, and Israel usually has the upper hand.

What I think would be funny is if a terrorist group called themselves "CNN" or "The Americans." Think of how awkward this would be for the media. Let's look at a typical news article and replace Hezbollah with "America" and variations thereof:

Prime Minister Stephen Harper blamed America for the current crisis during remarks in France, a sentiment shared later by U.S. President George W. Bush.

"America's objective is violence," Harper told reporters in France on Tuesday after meeting with Prime Minister Dominique de Villepin.

"America believes that through violence it can bring about the destruction of Israel. Violence will not bring about the destruction of Israel. Violence will only bring about more violence. And inevitably the result of the violence will be the deaths primarily of innocent people."

...
U.S. President George W. Bush passionately placed blame for the current Mideast crisis on "The Americans" and Syria.
...
Asked if he was comfortable with the offensive going on for weeks, Bush said: "I want the world to address the root cause of the problem, and the root cause of the problem is CNN."

I threw the CNN in for fun. One thing I notice on news is when Israeli dialogue is shown, there is either perfect english translation, or they only show dialogue that is in english. Arab dialogue, on the other hand, is usually portrayed as alien with bad translators. This all affects the way the public shapes their opinion. Hebrew sounds surprisingly similar to Arabic. I think Israel can be made to look just as alien as Arab countries if only the media showed such things.

Arab groups need to come up with American-sounding names. 'The Nihilists' would be a good terrorist group name.

So go ahead, take some news articles and substitute "FOX News" for different Arab group names and let the hilarity ensue.

07/13/06

Permalink 08:12:39 pm, Categories: Intarweb, 667 words   English (US)

Internet condom

Today I saw a talk by Common Sense Media, which provides ratings and reviews of all sorts of media stuff as it relates to children. They provide recommendations as to what age a child should be to see Pirates of the Caribbean, browse myspace.com, etc. It was a great talk, and this company doesn't believe in censorship, which is a nice breath of fresh air for rules about what children should see.

It's rather amazing how far the media has come and how much it affects children. Think of all the profanity that is now perfectly acceptible to say on television compared with 20 years ago. Children grow up in a much different time with many different stimuli. The presenter showed a video mashup of things currently in PG-13 films, music videos, internet sites, and television. It's rather frightening what children have access to.

Think about it, when you were young and there was no internet, how difficult was it to get a Playboy magazine? It was all secretive, and very difficult for a young child to even be in contact with such things. Now a child on a computer has access to all of this and much, much more. He may even be GIVEN porn through spam. The problem comes down to access to information. If those Playboy mags were easily available to anyone in our day, then it would be equivalent to the ease of access to internet porn. What would we do in such a scenario? Well we would put down restrictions as to who can have access to the magazines. Sure the kid can go search in his dad's dresser, but it's still not as easy as internet porn.

But this solution fails with the internet. You cannot restrict children from accessing the internet, it will just never work. It is too easy to circumvent. Even if you never buy them a computer, computers are now so much part of society that restricting them at home will be next to useless.

Let's think about something else, like sex. What if sex was easily accessible to all underage people? Arguably it is already. Here is something that we can maybe correlate with internet access. We can't prevent them from having sex. It is freely, and easily, available. What's there to do? Well you can educate the child, and inform them about condoms and risks. Now the child has access to sex, but through education and prohylactics he/she can engage in sex safely. What's the equivalent of an internet condom?

The internet is information unbound. Of course we don't want children reading or learning about certain things until they are of a certain age. Hell, there may be information we feel shouldn't be accessible to ANYONE regardless of their age. But it may be too difficult a task to curtail a child's access to this information. Are you going to watch your child every hour of the day to make sure he's not going to myspace or wherever? Will you follow him to his friend's house as he does it there? Or at school? Surely this goal in unachievable.

There is a shift that is going on in this age. You can argue that children have much more access to much more dangerous things than we did in our childhood. By dangerous things, I mean dangerous influences. Information can be dangerous if the retriever does not yet know how to process that information. The only solution seems to be to try as hard as possible to protect children by educating them. Education must accompany free-reign access to information just as condoms must accompany free-reign access to sex. The internet condom, or rather media condom, must be worn before they go in.

It must be very hard to raise a child in this day and age. No parent can keep track of everything their child does. I think that openness is key. Talk about the taboo things with your children before they get to it.

07/11/06

Permalink 11:17:13 pm, Categories: Society, 493 words   English (US)

South Park makes its mark

More from Oath Betrayed:

At Camp Bucca in Iraq, the Army Surgeon General confirmed a report that psychotic prisoners were lying in their feces and urine in metal storage containers where the air temperature reached 130 degrees. Regressed inmates were beaten at Guantanamo for being uncooperative. MPs at Bagram, in Afghanistan, nicknamed a mentally ill prisoner who ate his feces and cut himself with concertina wire "Timmy," after a disabled child in the animated television show South Park. They kicked and suspended him and made him cry out in a voice that mimicked his "namesake."

Aww, that's cute. Can't you just feel the compassion oozing out? I'm so glad we treat POWs with such respect and love. It truly shows the good nature of humans, and how we are so different from the other animals in the world. God must be smiling upon us, so proud that we are His children. These mentally ill people, we really need to be rid of them, because they contaminate the good things in us.

Prisoners can teach us many things also, like how fast tuberculosis can spread throughout a prison population and what drug resistance it can develop. It's our own little experiment! Human experiments, with no PETA on our asses, or anyone complaining about unsanitary conditions. Now we can do some real science. How much pain can the body take? If I lift the prisoner's arms up while his hands are tied behind him, can he survive the complete dislocation and rotations of both his arms? Just how much head trauma will keep coherence? At what point will he tell us what all Muslims have stored in their DNA, the whereabouts of Osama bin Laden? Surely this shit eater knows something, and we can't stop now. Bring out the dogs and the genital electrocution machine!

We need more South Park educated soldiers to continue fighting for our freedom. Because if they don't, who will? Who will have the courage tear out toe nails? Who will be that army of one to force feed pork to Muslims? I mean come on, someone's gotta do it!

If you can't tell by now, I am severely bothered by our 'war' and how we are treating people. It's a really sad state we are in, and I, as well as any other taxpayer, is complicit. Make no mistake, I'm not above any of these soldiers. I pay for their bullets and human leashes. I feel extremely guilty for every prisoner that has to suffer needlessly. Those soldiers inflicting pain are a representation of my culture. I have to be both sympathetic to the soldier as well as the prisoner, because when it comes down to it, both are my brothers. All of this is going to leave a big scar for everyone. My only hope is that more people will come to an enlightenment quickly, and we don't stay too long in this hell we're building. Wake the fuck up.

Permalink 09:54:05 pm, Categories: Television, 72 words   English (US)

Podwagon

So I've jumped on the podcast bandwagon. I figure bicycling to work I might as well listen to something more useful than music. One show I really like is Bill Moyers' Faith & Reason. I've always loved his interviews and this show always has the most interesting people. One moment he may be interviewing a devout Christian, and just a few minutes later a vocal atheist. It's all very interesting and insightful.

Permalink 07:32:21 pm, Categories: Python, 23 words   English (US)

*

I've always thought Python's variable length arguments are cool. For example:

def foo(x, y, z):
  print x, y, z

bar = (5, 6)

foo(4, *bar)
Permalink 07:26:04 pm, Categories: Fun, 11 words   English (US)

Fun with work and obesity

Some fun reddit links:

07/10/06

Permalink 11:37:42 pm, Categories: Books, 250 words   English (US)

Baha Mousa

From Steven Miles' Oath Betrayed:

A noteworthy contrast to the U.S. delays in informing families of torture-related deaths is the case of twenty-eight-year-old Baha Mousa. British soldiers picked him up at a hotel in Basra, Iraq. A man who was imprisoned with Mr. Mousa, and later released, described what happened in prison:

We were put in a big room with our hands tied and with bags over our heads. But I could see through some holes in my hood. Soldiers would come in - ordinary soldiers, not officers - and they would kick us, picking on one after the other. They were kick boxing us in the chest and between the legs and in the back. We were crying and screaming. They set on Baha especially and he kept crying that he couldn't breathe in the hood. He kept asking them to take the bag off and said that he was suffocating. But they laughed at him and kicked him more. One of them said, "Stop screaming and you'll be able to breathe more easily." Baha was so scared. They increased the kicking on him and he collapsed on the floor.

Three days later, Mr. Mousa's bruised body was given to his family. A British pathologist, "Professor Hill," personally told the decedent's brother that Mr. Mousa died of a beating. The British army gave the family an international death certificate listing the cause of death as "cardiorespiratory arrest: asphyxia" that has enabled the family to successfully appeal for an independent investigation.

Permalink 11:27:51 pm, Categories: Books, 329 words   English (US)

Soldiers being told to "beat the fuck out of detainees"

Another appalling excerpt from Steven Miles' Oath Betrayed:

Abdureda Lafta Abdul Kareem (also known as Abu Malik Kenami) was admitted to Mosul prison on December 5, 2003, and died four days later. Military investigators found that the short, stocky, forty-four-year-old man weighed 175 pounds. He was not medically examined before his harsh treatment. After he was interrogated, soldiers put a sandbag over his head. When he tried to remove it, the guards made him jump up and down for twenty minutes with his wrists tied in front of him, and then for twenty minutes with his wrists bound behind his back with a plastic binder. The bound and head-bagged man was put on a mat for the night in a cell that was built for thirty prisoners but packed with sixty-six men. He was restless and "jibbering in Arabic." The guards told him to be quiet. The next morning, he was dead. Guards, medics, and two physicians noted that his eyes were very bloodshot. There were lacerations on his wrists from the plastic ties, unexplained bruises on his abdomen, and a fresh, bruised laceration on the back of his head. Army investigators noted that the body did not have defensive bruises on the arms - an odd notation, given that a man whose arms are bound behind his back cannot raise them in defense. No autopsy was performed. The death certificate lists the cause of death as "unknown." The physician at the scene surmised that Mr. Kenami died of a heart attack. It seems more likely that he suffocated because of the combined effects of how he was restrained, hooded, and positioned. Positional asphyxia looks just like death by a natural heart attack except for those telltale bloodshot eyes, which indicate conjunctival hemorrhage. Perhaps his "jibbering" was calling out for air. There are other similar cases of sudden deaths of men with little evidence of cardiac disease who were found to have unexplained facial venous congestion or pulmonary edema, also suggestive of asphyxia.

Permalink 10:22:27 pm, Categories: Linux, 26 words   English (US)

Screen and xterm scrolling

Ever wanted screen's scrollback buffer to work properly with xterm's scrolling? Add this to your .screenrc:

termcapinfo xterm|xterms|xs|rxvt ti@:te@

More info here.

07/09/06

Permalink 11:30:28 pm, Categories: Programming, 119 words   English (US)

Computation vs storage

Interesting view on improving application performance:

Application slimming: There seems to be a common fallacy among programmers that using memory is good: on current hardware it is often much faster to recompute values than to have to reference memory to get a precomputed value. A full cache miss can be hundreds of cycles, and hundreds of times the power consumption of an instruction that hits in the first level cache. Making things smaller almost always makes them faster (and lower power). Similarly, it can be much faster to redraw an area of the screen than to copy a saved image from RAM to a screen buffer. Many programmer's presumptions are now completely incorrect and we need to reeducate ourselves.

Permalink 11:19:09 pm, Categories: Books, 405 words   English (US)

Dilawar

From Steven Miles' Oath Betrayed:

Dilawar was a twenty-two-year-old farmer and taxi driver, whom American soldiers tortured to death over five days at Bagram Collection Point in Afghanistan in December 2002. When the soldiers pulled a sandbag over his head, Dilawar complained that he could not breathe. He was then shackled and suspended from his arms for hours, denied water, and beaten so severely that his legs would have been amputated had he survived. When he was beaten with a baton, he would cry "Allah, Allah!," which guards found so amusing that they beat him some more just to hear him cry. During his final interrogation, soldiers told the delirious, injured prisoner that he would get medical attention after the session. Instead, he was returned to a cell and chained to the ceiling. Several hours later, a physician found him dead. By then, the interrogators had concluded that Dilawar was innocent and had simply been picked up after driving his new taxi by the wrong place at the wrong time.
...
An autopsy on December 13 found that Dilawar's death was a homicide, caused by extensive and severe "blunt force injuries to lower extremities complicating coronary artery disease" (inexplicably, "coronary artery disease" is typed on the death certificate in a different font). The Pentagon reported that the prisoner died of natural causes. Later, a coroner testified that Dilawar's legs were "pulpified" and that the body looked as if it had been "run over by a truck." Soldiers delivered the body and an English-language death certificate to his wife and two daughters in January 2003. The family could not read English.
...
Army criminal investigators waited sixteen months to begin investigating Dilawar's death. They found probable cause to charge twenty-seven soldiers with various roles in causing and concealing the death, including a charge of withholding medical care. No one was charged with murder. Five of the fifteen who were prosecuted have pleaded guilty to assault and other crimes. The harshest punishment received was five months in a military prison. One soldier was convicted of maiming, assault, maltreatment, and making a false statement; he was demoted and honorably discharged... One of his brothers, Shahpoor, reacted to the sentences this way: "I am angry with them, but this was the will of God. God is great, and God will punish them." Vice Admiral Church identified Dilawar's death as one in which medical personnel might have tried to conceal the abuse of a prisoner.

07/07/06

Permalink 11:05:04 pm, Categories: Society, 208 words   English (US)

Etymology of "fuck you"

From Carl Sagan's Shadows of Forgotten Ancestors:

We go to great lengths to deny our animal heritage, and not just in scientific and philosophical discourse. You can glimpse the denial in the shaving of men's faces; in clothing and other adornments; in the great lengths gone to in the preparation of meat to disguise the fact that an animal is being killed, flayed, and eaten. The common primate practice of pseudosexual mounting of males by males to express dominance is not widespread in humans, and some have taken comfort from this fact. But the most potent form of verbal abuse in English and many other languages is "Fuck you," with the pronoun "I" implicit at the beginning. The speaker is vividly asserting his claim to higher status, and his contempt for those he considers subordinate. Characteristically, humans have converted a postural image into a linguistic one with barely a change in nuance. The phrase is uttered millions of times each day, all over the planet, with hardly anyone stopping to think what it means. Often, it escapes our lips unbidden. It is satisfying to say. It serves its purpose. It is a badge of the primate order, revealing something of our nature despite all our denials and pretensions.

07/03/06

Permalink 12:24:21 pm, Categories: Movies, 474 words   English (US)

Road To Guantanamo

gap

The above picture is brilliant in the way it conveys our globalization. Here we have a British Moslem with a Gap shirt in Afghanistan who happens to be in the wrong place at the wrong time. He's now on his way to Guantanamo courtesy of a US airbus.

This is a movie about a subject that bothers me deeply, and makes me sick to be an American. The story is about the Tipton Three, who were taken into US custody, tortured, and then released without charge. It's an account of the mistreatment of prisoners at Guantanamo, from the point of view of actual prisoners, rather than the spoon-fed garbage given to you on the news and by the US government.

You probably won't be seeing trailers for this movie on your local TV stations. No surprise there. I stumbled across the movie by accident, and I think it's an important one to see. Whether you believe it or not, it's important to see all points of view. I was absolutely appalled at the behavior of US soldiers portrayed in this film.

The term 'breaking down' is given to someone who after physical and mental pain, finally gives in and admits to whatever their captors want them to. But there is another 'breaking down' going on here, and it is of the US soldier. The moral barriers must come down. The goal is to reach a point where your prisoner is no longer a human. It is an animal in a cage. The pain the animal has is not associated to anything human. We cannot have a conscience and feel anything for it. We cannot anthropomorphize this animal's feelings. It has no central nervous system. It is a rat for our experiment. This rat in a Gap shirt can tell us where Osama Bin Laden is hiding. Good verses evil. Oh, and it helps if the enemy has darker skin than us, because then they look even more like monkeys.

This is the same reasoning the Nazis used on the Jews. Our captives are subhuman.

If there is anything that is building up negative karma, it is our 'wars.' It's hard to imagine NOT paying for such sins. The damage we do will come back to us twofold. I see the depiction on screen and wonder if we are really that stupid, that fucking insane, to not see the damage we are doing to ourselves. Can anyone honestly convince themselves that such treatment of another human being is for the good of our country? The true animal is the one doing the torture. This is primate brain function at its best. It's the primitive brain that can't comprehend non-violence. That would involve too much thought.

On a related note, I just purchased Oath Betrayed, which looks at the roles doctors played in our torture chambers.

06/29/06

Permalink 08:28:39 pm, Categories: Money, 51 words   English (US)

Prosper: new way for investing?

I attended a talk by these guys. This is a rather amazing service. It lets anyone be a money lender in a safe way (or a borrower). Set your own interest rates, diversify to many borrowers, etc. I predict this will be big and may even be a threat to banks.

06/24/06

Permalink 06:13:29 pm, Categories: Fun, 9 words   English (US)

Santa Cruz Offsite

Here are some pics of our Santa Cruz offsite.

Permalink 06:01:06 pm, Categories: Science, 11 words   English (US)

Synthetic Meat

Here's an interesting article about synthetic meat. Will vegetarians die off?

06/17/06

Permalink 03:28:16 pm, Categories: Health, 286 words   English (US)

Rabies

Ever wonder how the rabies virus achieves its evolutionary goals? What's the point of making the host crazy and rabid? Here's an excerpt from Carl Sagan's Shadows of Forgotten Ancestors:

Of course, predators need not be bigger than their prey. Disease microbes can be formidable predators - not only attacking and eventually killing the organisms that bear them, but also taking over their hosts, changing their behavior to spread the disease microorganisms to other hosts. One of the most striking examples is the rabies virus. On being injected into the bloodstream of a placid, people-loving dog, they head straight for the limbic system of the dog's brain, where the control buttons for rage reside. There, they set about converting the poor animal into a marauding, snarling, vicious predator that now bites the hand that feeds it. Rabid animals are afraid of no one. At the same time, other rabies viruses are dispatched to inactivate the nerves for swallowing, to put the saliva-manufacturing machinery into overdrive, and to invade the saliva in huge numbers. The dog is furious, although it has no idea why. A pawn of the viruses within it, it's helpless to resist the impulse to attack. If the attack is successful, the viruses in the dog's saliva enter the bloodstream of the victim through the lesion or laceration, and then set about taking over this new host. This process continues.

The rabies virus is a brilliant scenarist. It knows its victims, and how to pull their strings. It circumvents their defenses - infiltrating, outflanking, accomplishing a coup d'etat within beings so much larger, you might have thought them invulnerable.

It's rather amazing that the rabies virus evolved in such a way to see this big picture.

06/12/06

Permalink 08:01:27 am, Categories: Health, 5 words   English (US)

Exercise vs Antidepressants

Good article on the topic.

06/11/06

Permalink 09:52:11 am, Categories: Movies, 231 words   English (US)

Banlieue 13 (District 13)

This movie reminded me of the various street acrobatics videos out there. It had some really cool stunts, which I always get a kick out of watching. I had heard this movie came from the producers of Ong-bak, which pretty much blew me away with its martial arts style and stunts. They are different from the Jackie Chan type of stunts, as well as the wire-pulled anti-gravity flying martial arts so prevalent in movies these days. I really don't get why people get a kick out of that. Those seem happy and PG-rated to me. When it comes to martial arts, I'm more interested in real fighting with no strings attached. The street and ghetto-style building hopping of B13 gives a true gritty feel to the stunts and seem almost R-rated.

The violence and drugs in the movie also contributes to that. In general I found the story entertaining and cinematography very stylish. The storyline is interesting, that the ghettos have been walled off and a neutron bomb just happened to get inside the complex. Reminds me of another wall in the middle east, and perhaps the director is hinting at that.

Speaking of flying martial arts, I saw the trailer for the new Jet Li movie Fearless which looked cool. I still like the Crouching Tiger types of movies because they are so beautifully done, even if everyone is flying.

06/04/06

Permalink 11:08:44 pm, Categories: Society, 526 words   English (US)

What evolution means to me

I saw the movie 'The Proposition' which was a cold, dark, and raw movie ultimately about blood ties and human nature. The movie actually made me think about evolution. In the movie, an important character is the flies. It's wierd, they are in almost every scene. They are shown buzzing around the filthy people of the land. But the real kicker is the flies are buzzing around the upper class people as well, with their nice houses, proper hygiene, and clean living areas. Both the bums and the rich are swatting the flies off of their face and neck.

I felt a point was trying to be made here. That no matter how much we try to hide our animal nature, we are still animals. Our divisions of class are only superficial. Inside we are all the same. The movie has alot of graphic violence, and this also helps to convey this point. But the flies are what really stuck with me.

When people think about evolution, they usually think "survival of the fittest" and "humans descended from apes." But I think we miss the real point, and that is the concept of ancestry. The fact that we are ALL related by a common ancestry. That the terrorist is your brother.

Think about that for one moment. What would make you kill your family? Would you not want to resolve conflicts with those you love instead of resorting to violence? What makes it easier to pull the trigger on a person outside of our supposed family than on our own mother? Evolution says that the person you hate, despise, the murderer, is actually your brother, sister, mother, and father. Why do we not treat people that way?

Think of how different the world would be if you considered every other human being your family. Would you not treat them differently?

I think there are alot of people that say they believe in evolution but really are ignorant to its concepts. You may say you believe in evolution, but you are wrong. I will say that if you advocate violence, war, or anything that causes death or suffering to other human beings, and you believe a murderer should be treated any differently than your closest family member, then you don't believe in evolution. I think we have alot of atheists out there that only accept evolution halfway. In other words, hypocrites.

It's because we cannot grasp the concept of an extended family including every human being on earth. Or can we? Is there any possibility of realizing that the homeless man in the gutter is deserving of the love you give to your mother or wife? This is the real question and I feel the true dilemma of humanity. As long as the answer is no, there will be war, and the continuous cycle of violence that has plagued us since the beginning of time, back before we were even human.

Is it possible to think that humans can rise above this cycle? To consider every living being as our next of kin? That the blood we spill by bullets are from wounds in our own body?

Permalink 10:32:46 pm, Categories: Society, 445 words   English (US)

Reason for Hope

A beautiful passage from Jane Goodall's Reason for Hope:

I shall conclude this chapter with a symbolic story. It is about an American, Rick Swope, a zoo visitor who rescued an adult male chimpanzee from drowning in the moat around his enclosure. And this despite the dire warning of a keeper and the threats of other adult male chimpanzees of the group. When asked what had made him risk his life he answered: "I looked into his eyes. It was like looking into the eyes of man. And the message was: Won't anybody help me?"

That is the look that I've seen in the eyes of chimpanzees tied up in the African markets, from under the frills of the circus chimp, from behind the steel bars of the laboratory prisons. It's a look I've seen in the eyes of other suffering animals. And in the eyes of little children from Burundi who saw their parents slaughtered in the ethnic violence. In the eyes of the street children, and those that are caught up in the violence of our inner cities. Indeed, that appeal is all around us. Albert Schweitzer wrote: "A man who possesses a veneration of life will not simply say his prayers. He will throw himself into the battle to preserve life, if for no other reason than that he is himself an extension of life around him."

I truly believe that more and more people are seeing the appeal in the eyes around them, feeling it in their hearts, and throwing themselves into the battle. Herein lies the real hope for our future; we are moving toward the ultimate destiny of our species - a state of compassion and love. Yes, I do have hope. I do believe we can look forward to a world in which our great-grandchildren and their children after them can live in peace. A world in which there will still be trees and chimpanzees swinging through them, and blue sky and birds singing, and the drumbeats of indigenous peoples reminding us powerfully of our link to Mother Earth and the Great Spirit - the God we worship. But as I've stated repeatedly, we don't have much time. The planet's resources are running out. And so if we truly care about the future of our planet we must stop leaving it to "them" out there to solve all the problems. It is up to us to save the world for tomorrow: it's up to you and me.

I saw "An Inconvenient Truth" this weekend and felt this passage conveys alot of what the movie conveys. I strongly urge you to see it and make an effort to really change things.

Permalink 08:53:40 pm, Categories: Science, 670 words   English (US)

Disease as entropy

Our lives are filled with constant battles against entropy. Entropy is randomness, disorder, chaos. Everything in your body is struggling to keep order. Down to the cell, it's purpose is to maintain structure. Throughout the day we are battling bacteria and infectious agents that aim to destroy that order without even realizing it. Our body tries to clean out any toxic substances we eat, and when our skin is cut there is a rush to restore order to the damaged area. When our bones break, what begins is a process to decrease entropy in the system and restore order.

When your body dies, all of its defenses are gone. It can no longer fight off organisms that would love to eat us. That's when the body decays. When you see an animal corpse rotting, you are seeing the defense system shut down. The pile of mass gravitates towards more entropy, to an equilibrium with the environment. That order in the body now must disseminate. What was order now becomes disorder. It's as if during life you are literally holding yourself together, and in death you can no longer hold yourself up.

It takes alot of energy to keep order, or reduce entropy. That's the food we eat, the fuel that powers our defense system.

It seems natural to think of disease as a form of entropy introduced into our system. Whether it be a virus or a cancer, that attack on our system destroys the order in our body bit by bit. Cancer is ultimately destroying the 'order' of our DNA. If our immune system is strong enough, we are able to restore order. If not, we die. We may throughout the day get cancerous cells and not even know it, because our immune system is smart enough to recognize such cancerous cells as damaged and rid them quickly before spreading.

As we age we become less able to keep the order in our system, and the entropy out. Our skin wrinkles, our bones weaken, we become more suceptible to diseases that we could fight off when we were younger.

It's really amazing just how much our body is doing constantly to keep us from literally falling to pieces.

But our body fights disease at the cellular level. Diseases aren't fought with the big picture in mind. Take AIDS for example. Here is a disease whose symptoms are literally a death from within. The immune system cannot fight the simple infections that any normal person could fight. The AIDS patient ends up constantly battling random diseases. The body doesn't know this. It sees one problem, say pneumonia, and fights that specifically, regardless of whether it was caused by AIDS or not. There is no 'big picture'. The body doesn't realize that its own immune system is what is damaged, and struggles to fight the symptoms.

If only the system itself could learn about the big picture. Sort of the body having an 'aha!' moment and being able to redirect its defenses to the true cause of AIDS, the virus that hides in cells going undetected. To learn how to make this detection. Obviously, doctors can take blood samples and 'detect' HIV. That's an outside 'brain' looking at a drop of blood and seeing a problem. How can we teach the body to do that? How can the body look at its own drop of blood and change its strategies?

I feel that the brain plays an integral part in fighting disease. If there is anything that can coordinate our defense system, that can know the 'big picture' and attack the right targets, it is the brain. I think we may underestimate the role the brain may play in fighting disease. There are cases of patients healing faster through laughter and a happy mood. Our mood can actually affect our recovery time from surgeries. Would the opposite be true as well? Would a depressed person heal slower or be more susceptible to disease? I don't think it is a far stretch.

Permalink 08:13:58 pm, Categories: Science, 186 words   English (US)

Rebuilding brain muscle

Awhile ago I stated that brain damage might possibly be similar to the process of building muscles. But in the sense that relaxation is recuperation for muscles, what would be recuperation from 'brain-building'? Sleep of course.

During a normal day, the brain is slightly damaged by the body's metabolism, and by free radicals. When one is asleep, the brain engages a repair center which slowly mends the tiny injuries, restoring the brain to its full potential. During the deepest phase of sleep, called REM, it is believed that the repair center itself is repaired. But the longer that sleep is prevented, the more damage one's brain accrues, and the more sleep one will require to repair it. Too much damage, and it becomes irreparable.
...
The brain also uses sleep as a time to sort, process, and catalog all of the information it has absorbed throughout the waking period, which is why memory is adversely effected by lack of sleep. Creativity also suffers because the brain builds creative associations from memories while slumbering. As if that weren't enough, the immune system will be weakened by insufficient sleep.

05/21/06

Permalink 07:46:09 pm, Categories: Apple, Money, 36 words   English (US)

401k: you need to save 18%

Saw a very good Frontline about retirement planning. Probably the most interesting thing from the show is that you really need to put away 15-18% of salary in your 401k for 30 years to have enough for retirement.

05/20/06

Permalink 12:53:58 am, Categories: Health, 92 words   English (US)

Frozen peas are my friend

Today I had 2 wisdom teeth pulled out. Fun fun. It was not bad because I was under general anesthesia. Honestly, I was more frightened of the anesthesia than anything else. One miscalculation there and it could be very dangerous.

Pain is not so bad, yet. I'm taking ibuprofen only, but have a stock supply of vicodin. Food is the tricky part. Soups and more soups.

I never thought my ankle surgery would be a blessing, but the many months of recovery and pain from that makes me get through this alot easier.

05/17/06

Permalink 10:00:01 pm, Categories: Television, 120 words   English (US)

Cable HDTV is crap

Back in FL I used to have satellite (Dish network) with HD channels. Nowadays cable is providing "HD" channels as well. I have Comcast in CA.

Here's my problem with cable HD: whenever there is alot of motion on the screen, the image becomes visibly pixellated, much worse than non-HD! I believe this must be some sort of bandwidth problem and cable TV. Looks great if you are looking at fairly still images, but any action and it's just crap.

Maybe it is the crappy Tivo-wannabe that is my cable box that's doing it. But anyway, if you are thinking of getting a HDTV, you really should go with satellite instead of cable unless you can accept sub-par image resolution.

05/14/06

Permalink 08:43:34 pm, Categories: Health, 73 words   English (US)

Music == meditation

From the article:

Listening to music may have effects similar to that of relaxation techniques, Bernardi and his colleagues note, which generally require that a person focus his or her attention on something and then release it. "Appropriate selection of music, by alternating fast and slower rhythms and pauses, can be used to induce relaxation and reduce sympathetic activity and thus may be potentially useful in the management of cardiovascular disease," they conclude.

Permalink 08:13:30 pm, Categories: Religion, 75 words   English (US)

On mothers

A quote on mothers from Kahlil Gibran:

You are the bows from which your children as living arrows are sent forth. The archer sees the mark upon the path of the infinite, and He bends you with His might that His arrows may go swift and far. Let your bending in the archer's hand be for gladness. For even as He loves the arrow that flies, so He loves also the bow that is stable.

Permalink 12:37:42 pm, Categories: Money, 105 words   English (US)

Your good credit that no one knows about

When you think of credit scores, you would expect a lender to have all the information about your credit history. At least, that's what you would hope if you had good credit.

That's why I was kinda shocked by an article in the Epoch Times about credit scores, which had the quote:

"Some lenders appear to have stopped reporting positive information about their best borrowers to protect against them being picked off by competitors."

This seems to imply that you may have a lender that is not reporting your good credit for fear of losing you as a customer. WTF? How is this even legal?

05/13/06

Permalink 09:50:17 pm, Categories: Fun, 31 words   English (US)

More pron for you

Oh another interesting article claims that IT is more stressful than Medicine. I don't know if that's funny or sad :|.

Permalink 09:18:02 pm, Categories: Car, 485 words   English (US)

Have a nice refreshing glass of gasoline

From John Stossel's Myths, Lies and Downright Stupidity:

By failing to account for inflation, the media have some Americans so alarmed that they can't think straight. "What costs more," I asked customers at a gas station, "gasoline or bottled water?" The answer I got from almost everyone was gasoline. At that very gas station, water was for sale at $1.29 for a twenty-four-ounce bottle. That's $6.88 per gallon, three times what the station charged for gasoline. It gets sillier. I asked gas station customers, "What costs more, gasoline or ice cream?" Again, most people said gasoline cost more. But at $3.39 a pint, "premium" ice cream costs about $27.00 a gallon.

We should marvel at how cheap gasoline is-what a bargain we get from oil companies. After all, it's easy to bottle water, but think about what it takes to produce and deliver gasoline. Oil has to be sucked out of the ground, sometimes from deep beneath an ocean. To get to the oil, the drills often have to bend and dig sideways through as much as five miles of earth. What they find then has to be delivered through long pipelines or shipped in monstrously expensive ships, then converted into three or more different formulas of gasoline and transported in trucks that cost more than $100,000 each. Then your local gas station must spend a fortune on safety devices to make sure you don't blow yourself up. At $2.26 a gallon (about forty-six cents of which goes to taxes), gas is miraculously cheap! But what we heard from the clueless media was, "Gas prices are at record highs!"

Speaking of pipelines, I recently saw The Yes Men, a hilarious documentary about some guys who pretend to be representatives of the WTO and actually get invited to conventions to give talks. Hilarity ensues when the presentation becomes absurd, slowly pushing over the edge to see what the listeners will take.The funniest skit was when they were invited to a university and they gave a presentation (including a hilarious CGI animation) of a new McDonald's invention to feed the poor and hungry in 3rd world countries.

The presenters brought in boxes of hamburgers just purchased from McDonalds and gave them freely to the students, setting the stage. They then said that the human body wastes about 80% of what it ingests. They proceeded to describe a new type of burger. The CGI showed a McDonalds bathroom. Someone goes to take a dump, and the human waste is then pumped through various pipes and tubes processing it and going all the way to a 3rd world country's McDonalds, coming out of the pipes to make new not-all-beef patties for customers in turbans.

The students in the audience stop eating their burgers and are appalled. They actually believe it! This skit is just absolute genius, and the movie is worth seeing just for this. It perfectly conveys the concept of shitting on other people.

05/07/06

Permalink 10:41:05 pm, Categories: Society, 652 words   English (US)

God and the concrete jungle

I had a chance to attend a talk by Jane Goodall, a person who spent many years studying chimpanzees in Africa. Her talk was very moving and was essentially a call to action to help save some the world's precious environments. She described many of the activities being done in Africa that are essentially causing chimpanzees and many other species to dwindle in number. Among many, one reason was a popular desire to eat 'bushmeat'. Extravagant restaraunts are making alot of money on this. Lumber companies, even though they may abide by certain deforestation agreements, build paved roads which itself ruins life there as it gives easy access to hunters. The whole situation sickens me and reminds me of overpopulation and the wasteful and excessive lifestyles we all live.

I think we, as Americans, are very insular to the world around us. We waste uncontrollably, and buy things only to fill landfills. We take long showers while others in the world can barely get a glass full. Honestly when I look outside and see all the children we are making, I have to wonder what we are doing. Do we really need more people on earth? How much do we actually do to make things better for the world, rather than just for ourselves or small family? More and more the words 'unsustainable lifestyle' gain more meaning to me. Sooner or later the rest of the world will encroach on our apparent security and we will be forced to change.

Goodall talked about when we as humans have our backs to the wall, that's when we are truly innovative. I'm also reading her book "Reason for Hope," and in it she quotes Eleanor Roosevelt: "people are like tea bags; you never know how strong they are until you dump them in boiling water." How true. I think we all need to be put in situations like this, so that we are forced to find solutions to the world's problems. Our consumerism breeds a culture of apathy. We really need to be woken up.

There's an interesting passage from her book where she talks of coming to England after being in Africa:

After months in Gombe I saw the "civilized" world that we have created with new eyes: the world of bricks and mortar, cities and buildings, roads and cars and machines. Nature was almost always so beautiful and so spiritually enriching; the man-made world seemed so often horribly ugly and spiritually impoverished. This contrast between the two worlds struck me, with increasing sadness, every time I arrived back in England from Gombe. Instead of the peace of the timeless forest and the simple, purposeful lives of its inhabitants I was plunged into the materialistic, wasteful - terribly, terribly wasteful - rat race of Western society. Instead of the soft rustling of the leaves, the gently sighing waves on the beach, the singing of the birds and crickets, my ears were assailed by the sounds of traffic, too-loud rock music, strident voices - and no silence. The fragrance of the white nighttime flowers, and the smell of dry earth after rain, were exchanged for the stink of gasoline or diesel fumes, other people's cooking, disinfectant overriding stale urine in public lavatories. When I was away from Gombe and plunged into the developed world I found it harder to sense the presence of God. I had not learned, then, to keep the peace of the forest within.

The more I think about it, I wonder just how much our spiritual enrichment is dying. I read in a newspaper about one of Jay Leno's 'jaywalking' segments where he asked people on the street what the Golden Rule was. The majority of the people had no idea, and one even thought it was a mathematical formula. This is one of the saddest things I read, because it makes clear just how little we are taught to care about others.

05/02/06

Permalink 10:23:28 pm, Categories: Car, 217 words   English (US)

New car

Picked up a Honda Civic Hybrid this weekend. Below are some stock photos of the color I got. Great, now I have 2 cars that I don't drive :P. The weather is so nice that I bike to work every day. I even picked up the car by biking to the dealership. Here's a tip, if you want car salespeople to leave you alone, come into the dealership with a bike and sweating like a pig. No one will want to sell you a car :).

The Civic is a neat car. I can actually sense the charging when using the brakes which is interesting. It has an aux in for my ipod and a navigation system. It has all sorts of futuristic lights that make me feel warm and fuzzy. I got the 'bass speaker' upgrade, but really it doesn't compare to my Infiniti. Hey, it's a Civic after all, what can I expect. It's not bad though.

My lease is up in a few weeks for my Infiniti, so I should be back to 1 car soon. I paid for the new car cash, no financing bullshit. That feels good to not have car payments.


Now I gotta find a condo or something to invest money in rather than wasting it on rent. Ahh the endless rat race...

04/29/06

Permalink 06:15:14 pm, Categories: Movies, 206 words   English (US)

Hard Candy

This movie is billed as a psychological thriller, and I would probably agree. It's all mostly dialogue, more like a play than a movie. It's along similar lines as Death and the Maiden, and Swimming with Sharks, both excellent movies. If you've seen those, you'll know they are about torture and vindictiveness. The subject matter is rather disturbing being about paedophilia.

There is a scene that seems to last about 45 minutes during which I found it very difficult to watch without cringing. I never thought seeing a 14 year old girl in OR scrubs would be so scary. Think end of Braveheart, except extended and teased longer than it needs to be. This scene was interesting because you could tell the director was playing with our emotions, almost like he was poking fun at us, and hitting us where it hurts so to speak. It was amusingly disturbing.

The thing about this movie is there is really no hero. Both of the main characters are pretty sick in the head. The paedophile truly shows remorse for what he has done, but the girl is an emotionless psychopath. Maybe that's the only way these people can learn their lesson. This movie should convince would-be paedophiles to think twice.

04/23/06

Permalink 09:22:31 pm, Categories: Fun, 59 words   English (US)

Videos galore

Latest dose of interesting videos from reddit, which is pretty much the only site I read nowadays :). It's slashdot for everyone, not just geeks.

04/14/06

Permalink 09:34:38 pm, Categories: Fun, 2 words   English (US)

Soda Man

Allllllrighty then...

04/08/06

Permalink 05:15:48 pm, Categories: Science, 826 words   English (US)

Think long term and reduce CO2 emissions

The average American is responsible for about 15,000 pounds of carbon dioxide emissions each year, which comes from home energy use, personal transportation and waste, as well as the energy used to produce all the products and services we consume. This per capita number is greater than that of any other industrialized country.

I think this a rather shameful statistic. This week I attended a talk by Al Gore on our climate crisis. This was an extremely impassioned talk, which really left me wanting to make a change. I've never seen Al Gore speak that way, and he came across as someone sincerely caring about our Earth's environment. Retired politicians are great speakers, because they can be more truthful when they are out of the arena. I strongly urge people to put aside political boundaries and do something that will truly help you, your family, and future generations. What I mean is making an effort to take care of our Earth, or our "mote of dust suspended in a sunbeam," as Carl Sagan put it.

I've known about global warming and CO2 emissions for some time. I used to read Discover magazine religiously, and every other issue had something about global warming. It's a highly debated topic, but only in the economic realm. In the scientific realm, there is simply no debate. It is an accepted truth. Here is a very good quote by Upton Sinclair mentioned in the talk that explains the perceived global warming 'debate' quite nicely:

It is difficult to get a man to understand something when his salary depends upon his not understanding it.

Why would Exxon/Mobil disqualify global warming? Simply because they would lose money if they didn't. To make a dent in oil usage would mean making a dent in our economy, at least in the short-term, until there is more demand and innovation for cleaner solutions.

But let's forget about that for a moment. The main thing I thought about after this talk was the future of Earth if we continue our current path. Our climate is becoming destructive, and the gist of it is where there is ice on earth, there is becoming less and less of it due to warming. Think of how many hurricanes and other weather disasters we've seen last year. Are they getting worse? Yes they are.

Just how bad? I strongly encourage people to see the documentary An Inconvenient Truth, which is essentially a video version of Gore's talk. Even if you don't like him or believe any of this, have an open mind and get all the points of view. The profits for this film are all going towards helping the environment, so if anything you are doing some good by going.

I really think we need to fix things if we want our children and future generations to live a good life on Earth. There is a forboding comment Gore made towards the end of his talk, and that is to imagine yourself having a conversation with your children when they've grown. They ask you, "Couldn't you tell what was being done to the Earth after seeing all of the scientific evidence? Why didn't you take action?" Can we confidently answer that question?

The talk made me very uneasy. It makes me want to do my part, however small, to make things better. Small parts add up to big parts, so if more people can do this we really can make a huge difference. So what's the simplest thing? Buy efficient light bulbs. That may sound insignificant, but paying a little extra for compact fluorescent lights (CFLs) will make a big difference in our energy usage, and hence CO2 emissions.

The next thing we can do is to use public transportation, our legs, and fuel efficient vehicles for getting around. I really encourage you to find out more about public transportation in your area. I think many don't even consider this if they have a car. I usually bike to work, but I've also started taking the bus, which is provided FREE from a train station close to my apartment directly to my office! The schedules are flexible, and I can read a book while going to work. The saddest part is how few people I saw on the bus and the number of cars I saw looking out the window.

Something to think about regarding your car:

Every gallon of gasoline burned puts about 20 pounds of carbon dioxide into the atmosphere, so a vehicle that gets 25 rather than 20 miles per gallon produces 10 fewer tons of carbon dioxide in its first 100,000 miles.

These are just a few things you can do, but perhaps the easiest. Please at least make an effort. I think our society as a whole is becoming lazy in how we treat our planet, and we really need to consider the consequences of what we do, if not for our life, but for the life of future generations.

04/04/06

Permalink 08:30:03 pm, Categories: Science, 364 words   English (US)

Autism: The intellectual family disease

Today I attended a talk by James Watson, of Watson and Crick, DNA co-founder. It was in regards to DNA and the brain, and it had some really interesting, if not controversial, points.

His studies have been on autism, and what I found interesting is that he finds that autistic children arise mostly in intellectual couples. Therein lies a link, and autism may be an intellectuals' disease. He made a comparison that autism is to intellectuals as to what HIV was to homosexuals. Of course his definitions of intellectual caused some discomfort in people.

He stated essentially, based on earlier research, there is the concept of a 'male mind' and a 'female mind'. The male mind is one that is mathematical and systematic. The female mind is more concerned with caring and social bonds. There is a 'test' that will determine whether someone is a 'male mind' or 'female mind', and of course females can actually have male minds and vice versa. When analyzing couples with autistic children, it was found that in most cases both of the parents had 'male minds.' They were both 'intellectual', math-oriented, and had a high IQ.

I think that's really fascinating. It seems to imply that the best pair is not 2 people that are 'smart'. These days couples meet in good schools and many times both have high IQ, and this in fact may not be a good thing from an evolutionary and genetic standpoint. He seemed to be giving a warning that we really need to understand this genetic link.

Maybe the result is even some form of genetic inbreeding. Let's say there are some genes that give you an upper hand in mathematics. It may better to mate with someone having different genes, to have a greater variation than a similarity and to have a higher chance of healthy offsping. This ties genetics deeply to psychology.

So if you wonder why so many good girls are with stupid guys, there may actually be an evolutionary reason :). Or alternatively, why are so many men attracted to bimbos?

Anyway, I thought it was a really good talk. I also learned that DNA was discovered on Feb 28, my birthday :).

03/27/06

Permalink 04:51:24 pm, Categories: Fun, 5 words   English (US)

Callcenters

Hilarious short movie about callcenters.

03/26/06

Permalink 10:20:50 pm, Categories: Movies, 265 words   English (US)

Thank you for smoking

Today I saw 'Thank you for smoking'. It's a satire about tobacco lobbyists, and I thought it was stylish and very funny. The lead is played by Aaron Eckhart, whom if you have seen 'In the company of men', can play a white-collar villain better than anyone else. In that movie he's exploiting women with his words. I remember him in that movie because I thought to myself, "what an evil bastard." In this movie instead of women, he's exploiting the public with his words.

The movie is really cool in how it visualizes spin. There is an amazing scene where he's talking at a podium. His mouth is moving, but you don't hear words, you hear a machine gun going in sync with his mouth, and he's spraying the whole room. That's probably the best depiction of spin I've ever seen.

There is scene with a movie exec (played by Rob Lowe) discussing how to make cigarrettes sexy again. They decide to add smoking to a sex scene in a space ship movie, blowing circles around naked bodies. It has to be in the future because smoking would be accepted then. They planned to release a new brand of cigarrete with the movie. It was hilarious but it's probably not too far from the truth when it comes to advertisements in movies. Speaking of which, I saw V for Vendetta. I'm not writing a review of that since everyone probably has seen it. Anyway, I caught the flagrant JVC advertisements throughout.

Anyway, it was a good movie that makes you think. Great direction too.

03/12/06

Permalink 01:33:40 pm, Categories: Programming, 304 words   English (US)

Test driven programming practice vs theory

I've never been much of a software developer. I usually write stuff that start out as small hacks and end up as very large hacks. Throughout school I just did not have much interest in software engineering methodology. It seemed all theoretical to me, and I just wanted to get down and start coding. Design? yeh right.. My projects were small enough that I could keep everything in my head.

So this is probably why I find it hard to do test driven development. It seems when you write tests first, you are assuming that the modules you write will have a certain API. The problem I have is that API is a contantly changing thing for me. I may do things one way, and then realize I don't like it. Then I will redo it another way. My program ends up being blob-like and always changing. I don't like to make the assumption that one way, especially my first draft, is the right way, and things can always improve. I've always felt programming was like painting. The painter has something in his head and starts drawing. He doesn't do a UML diagram first. If he doesn't like the result he throws away the canvas.

So how do you deal with this? Think more hard about your design and API before coding? Sure that's probably what all those classes preached :). Of course the proper thing would be to have the tests constantly changing as well as my API. Time then becomes a factor. I feel when writing tests I sort of lose my stream of consciousness. I lose the inspiration of my project by being interrupted to write tests.

Oh well, this is more of a rant than anything else. I do know the right way, I just don't agree with it many times.

03/05/06

Permalink 09:14:25 pm, Categories: Society, 172 words   English (US)

Failure of education

An old but very interesting speech. An excerpt:

Out of the 168 hours in each week, my children sleep 56. That leaves them 112 hours a week out of which to fashion a self.

My children watch 55 hours of television a week according to recent reports. That leaves them 57 hours a week in which to grow up.

My children attend school 30 hours a week, use about 6 hours getting ready, going and coming home, and spend an average of 7 hours a week in homework - a total of 45 hours. During that time, they are under constant surveillance, have no private time or private space, and are disciplined if they try to assert individuality in the use of time or space. That leaves 12 hours a week out of which to create a unique consciousness. Of course, my kids eat, and that takes some time - not much, because they've lost the tradition of family dining, but if we allot 3 hours a week to evening meals, we arrive at a net amount of private time for each child of 9 hours.

Permalink 09:09:27 pm, Categories: Fun, 19 words   English (US)

Videos of the day

reddit has directed me to these funny videos:

Permalink 08:08:18 pm, Categories: Science, 229 words   English (US)

Body brain feedback loop

At work there are really interesting tech talks that go on many times during the week. Sometimes they are not even related to computers.

I saw a recent talk about stone tools and their relationship to human evolution. Hopefully they will put it on video.google.com soon.

Anyway, it was explained that at some point in human evolution the pre-humans started making stone tools. One of the major possible benefits of such tools was breaking the hide of animals, accessing bone marrow, etc. This allowed humans to tap into a high fat meat diet, which in turn caused an increase in energy supplied to the brain, and further allowing an increase in brain size. A feedback look was created, and brain size skyrocketed from the apes. There was a direct correlation between human invention and human evolution.

What was also cool is the presenter went through brain imaging scans while trying to make stone tools, as well as did research trying to analyze the body physiology during toolmaking.

It made me think of how we can affect our evolution by our actions, and how much significance a change in diet was. I think we need to be careful what sort of diets we get into. Ultimately we eat to provide energy for our brain. If the foods don't do that, it may cause more damage than we think.

02/25/06

Permalink 06:28:05 pm, Categories: Car, 9 words   English (US)

Car Salesmen

Here's a great, albeit old, article on car salesmem.

02/22/06

Permalink 08:20:56 pm, Categories: Music, 10 words   English (US)

Meditation on a breakbeat

It's amazing how 6 seconds of music can influence so much.

02/21/06

Permalink 09:34:29 pm, Categories: Apple, 173 words   English (US)

OS X VPN and beachballs

I've had an issue with using the OS X VPN. When I am VPN'ed in to work, I sometimes close my powerbook without closing the VPN client. This understandably gives me a VPN disconnected dialog when I open up my laptop. If I then open a terminal, I would get a beachball hang for 2-5 minutes before the window opened, and then a few more before the shell prompt.

I started running tcpdump to see if there was some network traffic locking things up, and I noticed that DNS requests were being sent out to my work DNS servers even though the VPN client disconnected. These were private class B addresses. I checked /etc/resolv.conf and indeed it had the work DNS IPs.

I don't think the OS X VPN client properly reverts resolv.conf when it disconnects this way. It is extremely annoying. So what's the solution? Well a co-worker recommended I setup a good old SSH VPN instead of the lame proprietary VPN. Yeh, I think that is a better route.

02/19/06

Permalink 10:48:35 pm, Categories: Car, 226 words   English (US)

Prii be hard to come by

My lease is up in May. I'm planning on getting a hybrid. That is, if I can get one!

I currently drive a fairly nice car: Infiniti FX35. When I go to dealers, I like to park a bit down the street so they don't see my car. Salespeople are always looking out for nice cars for big-spending customers. I come in walking, and sometimes a salesman won't even approach me unless I ask, because they don't think I will spend any money. That's the way I like it.

Today I test drove a Toyota Prius. I liked it very much. It turns out there is a 5 month waiting list at the dealer I went to. WTF? Makes you wonder just how much big oil has their fingers in. I put a $500 deposit to get on the list, then went to the Honda dealershit.. umm dealership.

I received the worst service imaginable. They had no Civic Hybrid for me to test drive, and didn't even let me see the interior of a regular Civic. The salesperson was a rude ass. They definitely won't be seeing my money.

Anyway, I'm thinking if I decide on the Prius, I would be out of a car for a few months when my lease ends. That wouldn't be so bad since I can get by with a bike. We'll see...

Permalink 10:34:40 pm, Categories: Biking, 184 words   English (US)

Use a dog-repellent spray

Stop and get off your bike quick. If the beast looks like it wants to attack, try to keep the bike between you and it. Shout something commanding, like Go home!

Well I've been biking to work for over a month now. I love it, though roads can be quite dangerous at times. Here is a page with some good road biking tips.

I am still confused on one thing though: left turns at a left turn signal. Many times I'm the only one making a left turn, but does the traffic light 'sensor' detect my bike as if a car was there? It seems not to, because the light never changes, and I end up going to the crosswalk and using the button. Annoying as hell.

At some intersections, there is a bike drawing in the middle of the left lane right next to the crosswalk. I wonder if I need to put my bike here to get the light to change? Haven't tried that yet.

Update: A co-worker pointed me to a very interesting paper on detection of bicycles at traffic signals.

02/05/06

Permalink 02:32:59 pm, Categories: Website, 256 words   English (US)

Captchas Engaged

Today I decided to implement captchas on my blog. I dug around and found a neat PHP captcha class called hn_captcha. After a few hours of hacking on the b2evolution code I think I have it integrated pretty well.

It defaulted to using some Microsoft Word fonts which I didn't have (I don't remember when I last used a PC). As a replacement, I used Gentium, the free open source font recently released.

I've removed some restrictions on comments now, and now it's just wait and see how much spam I get. Judging from the previous spams, I cannot tell for sure if they are bot-based. Or at least they are trying to hide this. I have been logging the user agent for the spam posts and the last time 8 spams came in at about the same time, but their user agents looked like:

Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Opera/6.01 (Windows 98; U) [en]
Opera/6.04 (Windows XP; U) [en]
Opera/7.02 Bork-edition (Windows NT 5.0; U) [en]
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; QXW0332q)
Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; USA On-Site)
Mozilla/4.0 (compatible; MSIE 4.0; MSN 2.6; Windows 95; Gateway2000)

The first 5 spams came in at the exact same time (to the second). The next 2 came within 2 minutes later. Are these botnets? If so, why the different user agents? The fact that they all came in within a small time frame says to me they are botnets. The spams that came in are pretty much useless since I was blocking URLs in comments. It's like they are testing botnets on my blog.

Permalink 12:55:01 am, Categories: Apple, 151 words   English (US)

Safari tab navigation keystrokes in Firefox

I've decided to switch to Firefox as my main browser on my Mac. I've been using Safari, and I've just been noticing it being rather slow on sites that I visit, especially SSL sites. Firefox seems alot speedier, and hit has lots of cool extensions.

One thing that immediately bothered me is that I got used to using Command-Shift-Left and Command-Shift-Right to move to different tabs in Safari and this didn't work in Firefox. I couldn't find any way to redefine keybindings without downloading the keyconfig extension.

After installing the extension, go to Tools->Keyconfig. Then add new key called 'Next Tab', check the global checkbox, and make the code:

gBrowser.mTabContainer.advanceSelectedTab(1,true);

Then add a new key called 'Previous Tab', check the global checkbox, and make the code:

gBrowser.mTabContainer.advanceSelectedTab(-1,true);

Assign Command-Shift-Left to 'Previous Tab' and Command-Shift-Right to 'Next Tab'. Restart Firefox, and voila, Safari tab navigation.

02/04/06

Permalink 09:54:39 am, Categories: Science, 336 words   English (US)

Brain damage good for you?

Here's an interesting article where an autistic person explains some of his methodology. I find this stuff very fascinating.

It's rather amazing that damage to the brain can sometimes cause a person to achieve superior mental abilities. What is this telling us?

Let's look at another process in the body: muscle building. When you work out, you are actually damaging muscles. Working out doesn't build muscles, but rather they are built during the recovery period. It is the healing, recuperation, and the body's response that makes you stronger. Your body is stressed and it expects more, so it compensates by building muscles.

Another even more dramatic body response is bone healing. When you break a bone, the bone heals in such a way as to prevent the likelihood of it breaking in the exact same place again. It is stronger than it was before. This is why you will see a fattening of the bone after the fracture heals, a lump of extra bone mass.

Is it crazy to correlate these features to 'brain-building'? I don't think this is too far-fetched. If there is damage to the brain, the body may attempt to rebuild it in such a way as to make it less likely for the damage to occur again, i.e. it becomes stronger than it once was. Stronger in a way that perhaps we don't fully understand, to handle some stress that we don't understand. Maybe the area of the brain that was damaged has to do with mathematical calculations, musical ability, emotions, etc. Of course there is probably a threshold as to how much damage can be 'good' damage, similar to working out too hard and actually getting weaker (e.g. not recuperating, eating bad, etc.).

This can even be extrapolated to drugs. Drugs can inflict a sort of brain damage. I don't condone using drugs, but could it be that some musicians who used drugs received their talents by the damage caused to their brains? It's rather amazing to think about.

Permalink 09:33:19 am, Categories: Linux, 139 words   English (US)

Roundup Issue Tracker

I've always felt that open source ticketing systems were really lacking. The de facto standard is Request Tracker. I've always had issues with it. It's a nice interface filled with features, but the backend code to me is horrible. When you need to modify something, the code seems written to purposefully confuse you. I've had problems with binary attachments randomly getting corrupt, and it's next to impossible to debug. The documentation is also rather poorly written grammatically (which always pisses me off).

But the truth is, I never found anything better than RT. It worked most of the time, and usually did what I needed. Recently I came across Roundup, which is a Python issue tracking system. It took me just a few minutes to get it installed, and from first glance I like it. It's clean and simple.

02/03/06

Permalink 10:28:44 pm, Categories: Work, 89 words   English (US)

Snow Days

Well I got back from the company ski trip and had a blast. The weather was horrible and rainy, but I did learn to ski. I didn't fall once. Well I did fall getting off of the ski lift, but that doesn't count :) (it's damn scary!).

In the evening there was a big party, and as you can probably tell from the pictures, it was a 80s high school reunion theme. There was a great band playing good 80s music and everyone was getting crazy. I got pretty wasted.

Permalink 10:08:51 pm, Categories: Fun, 7 words   English (US)

Plane crashes video

Really crazy video of various plane crashes.

Permalink 07:38:58 am, Categories: Work, 35 words   English (US)

Google Techtalks

Google has started putting up some of its techtalks on video.google.com. These are great lectures that happen throughout the week here on all sorts of interesting topics. Keep an eye out for them.

01/29/06

Permalink 08:46:48 pm, Categories: Work, 29 words   English (US)

Ski trip

This week I'm going on a company ski trip to Squaw Valley. I signed up for the beginner skiing group, and hopefully I will not sustain too much damage.

Permalink 08:41:58 pm, Categories: Home, 226 words   English (US)

No more speaker wires please

I've always been an audiophile of sorts, and always want my home theatre sound to be perfect. I currently have a Panasonic home theatre in a box system. Since I moved to Mountain View, CA, I haven't bothered to connect the rear speakers. The main reason is I cannot find a good way to hide speaker wires other than tearing up carpet. As I spent an hour trying to figure out where I could possibly hide the wires, I said screw it I don't really need rear speakers anyway. I'd like to have them, but it's just not worth the trouble.

My next big investment will be replacing this Panasonic with Bose's 3-2-1 home theatre system. This uses special 'technology' to simulate surround sound. I know it won't be as great as a full surround system, but I've heard Bose systems, and they are truly amazing in other ways. My temporary apartment happened to have a seemingly innocuous Bose Wave Radio system. When I listened to it, I literally could not believe how good it sounded. The bass was so good that it sounded like a subwoofer was somewhere in the room, but it was all coming from that small radio. The clarity and 'presence' of the music is just amazing.

I could also get the newer wireless surround speaker systems, which seem pretty cool. Still undecided.

Permalink 08:21:26 pm, Categories: Fun, 15 words   English (US)

Pitching Mother

Here's a pretty funny movie on what it must be like to make independent films.

Permalink 03:03:52 am, Categories: Movies, 365 words   English (US)

Match Point

I remember reading Dante's Inferno a long time ago, which seemed essentially to be a methodical descension into hell. That's what this movie felt like, and I mean that in a good way. It conveyed the impending train wreck feeling intensely.

I've always liked Woody Allen films. I don't know, his comedy just seems very truthful. This movie is a completely different Allen, and I thought it was very poetic, like Dante's Divine Comedy. Oh and Scarlett Johansen is beautiful in it.

The movie's moral question is whether everything that happens in life is pure luck. At the beginning of the film, a tennis ball hits the top of a net and shoots straight up. If it falls on the other side of the net, you win. If it falls on your side, you lose. There is an amazing scene towards the end of the movie that revisits this motif, and it's just beautifully done (I won't spoil it here). It's what distinguishes a great director from an average one.

The movie spends 2 hours dealing with a relationship and an affair. It's interesting, but it's just a means to convey a point. The point that our mere existence is based on luck. Those that are religious will probably hate this movie. It goes against all morals, justice, and what should happen to a 'bad guy' in a righteous world. But honestly, leaving the theatre I thought to myself, these people actually exist out there. There are people that get away with horrendous acts, and there are those that get caught for trivial acts. What price does the criminal pay when he gets away with his crime? What actually allowed him to get away with it? Was it pure luck? Are some people luckier than others, and why?

It could be said that such a criminal lives rife with guilt. How many times can the ball fall on the other side of the net?

The ending reminded me of The Godfather II, most importantly the last scene of Corleone after he has just killed his brother.

In short I thought the movie was excellent if you like movies that give you more deep questions than answers.

01/23/06

Permalink 01:50:33 am, Categories: Work, 113 words   English (US)

Week 1

Well I've just finished my first week at my new job. Though it wouldn't be wise of me to say much (and you may notice the new disclaimer on my site), I will say that I have a very challenging and fun time ahead of me.

I rode my bike to work 2 days of last week, due mostly to rain. I quickly realized that I needed gloves because by the time I got to the office my fingers were about to fall off. It's damn cold in the morning. I also found out it is illegal in CA to ride a bike at night without a light. Note to self to get one :).

01/20/06

Permalink 10:36:28 am, Categories: Television, 15 words   English (US)

Google on ABC World News

It appears ABC World News will be broadcasting from Google tonight. Check your local listings.

01/16/06

Permalink 01:10:22 pm, Categories: Fun, 4 words   English (US)

Russian street acrobatics

Some pretty amazing stunts.

01/13/06

Permalink 01:31:17 am, Categories: Fun, 15 words   English (US)

Credit card signatures

cc

Ever wonder just how well stores check credit card signatures? Check out this amusing experiment.

01/12/06

Permalink 03:45:18 pm, Categories: Car, 104 words   English (US)

License to drive

terminator

The honorable Schwarzenegger has granted me my driver's license. I missed 3 questions on the written test (6 maximum). I didn't have to take a driving test thank God. You actually have to study a bit. I remember one question that threw me off. It asked what was the speed limit in a business district if there is no posted limit. I had remembered 25 was for residential, but for some reason thought business was 35. It is actually 25 too.

They punched a hole in my FL driver's license and it is no longer valid :(. I have to get my car smog-checked before I can get my registration.

Permalink 12:57:26 am, Categories: Fun, 8 words   English (US)

Origin of ctrl-alt-del

Very funny, especially the look on Bill's face.

Permalink 12:35:52 am, Categories: Programming, 317 words   English (US)

Awstats and busy websites

I'm not sure why I ever liked Perl. For me, writing Perl after learning Python is like going to a PC after a Mac. It seems like you are going back in time, to caveman days.

Awstats is a fairly popular web log analysis tool. Unfortunately, when working with very large sites, on the order of 1.5gigs of logs a day, there are some shortcomings. The default CGI method reads its database every time it is called, which takes minutes with a large database. So it's best to create static reports.

Most of the time when a user goes to the main report page, that's all he will do. I'd like this initial report to load up fast, but I didn't want the default awstats static pages which doesn't have any form to run different reports. I wanted the speed benefit of static pages with the option to run specific reports from the CGI if needed. Seemed like a simple task I could do by modifying awstats.

I setup a script to create the static pages after importing a day's worth of data, then modified awstats to show the form submission info and dump out the static page (if it exists) instead of loading the whole database. It would only load the database if some other GET or POST options were sent to the CGI, which is a request for a tailored report. No more killing the CPU when someone hits the reports page.

It took awhile to get the modifications right. I honestly think that awstats is horrible Perl code. It's gotta be the ugliest thing I've ever seen. It's one of the many 'functional but ugly' Perl scripts. It has made me loathe Perl even more.

Update: Ok I was a little emotional when I wrote this. Perl is not that bad and I have seen some very elegant Perl code (Radiator comes to mind).

01/10/06

Permalink 02:08:19 am, Categories: Python, 46 words   English (US)

The anti-web framework

I came across web.py, quite possibly the simplest web framework ever. There is something very appealing to me about it. It provides just the basics and gives you the freedom to handle things how you wish. That's different from the other major Python web frameworks.

01/09/06

Permalink 11:17:59 pm, Categories: Work, Health, 129 words   English (US)

The bike

I purchased a bike recently. It's a pretty nice 'hybrid', meant for road and trail biking. The gear shifting is done by rotating the handles, which I thought was cool and easy to use.

This morning I timed how long it would take me to get to work: about 20 minutes. It was sunny and 60 degrees F so I didn't sweat at all even with a sweater and t-shirt. Going there is alot downhill, but coming back is a bit tougher. I took a trail that is right next to my apartment. As long as the weather is ok, I think this will be some good exercise.

Riding on roads is kinda scary, and I just need to get comfortable riding close to cars :). I'll definitely be wearing a helmet.

Permalink 10:42:06 pm, Categories: Website, 191 words   English (US)

I reddit

I think I first heard about Reddit from a Paul Graham article mentioning to leave comments 'via Reddit'. I've been using it ever since. I think it's one of the coolest sites out there, plus it is written in Python :).

This interview describes what the site does. I couldn't agree more with this comment:

As a couple of information junkies, Steve and I found ourselves with too many rss feeds and too many tabbed windows open every morning -- we wanted a front page we could go to every morning that was made for us. Del.icio.us/popular was definitely an inspiration, because it showed the potential of aggregation (I think I'm supposed to be calling this the Wisdom of Crowds), but we were after links that were more ephemeral than the reference material one usually bookmarks on del.icio.us.

You can think of it as first aggregating the most highly-rated links for the day, and second being able to learn what you like to read and tailoring the results for you. I've found some great material just by watching the top-rated links, which they provide an RSS feed for.

Permalink 10:31:11 pm, Categories: Fun, 19 words   English (US)

Funny videos

Some funny videos I recently saw on video.google.com.

01/07/06

Permalink 11:45:31 pm, Categories: Health, 368 words   English (US)

I feel the pounds coming already

Well I got my car this morning and did some unpacking today. I had to return my rental car to the San Jose airport, so I decided to try the public transportation to get back. There is a Caltrain and VTA station within a block from my apartment. So I went and studied some of the route maps and fares. I ended up taking the Caltrain from the airport to Mountain View. I also realized I could've used VTA as well, but I believe there are more stops. Caltrain is a double decker train that's actually very nice. They didn't check my ticket, and it seems that they do random checks only. That seems to put alot of trust in the commuters.

Anyway, I got back to my leased apartment and realized I left the garage opener for my temporary apartment in the rental car :(. I drove back there and they took the car for service and told me to come back tomorrow. I am not really making efficient use of public transportation am I.

One thing I have noticed here in the bay area is that the whole transportation system seems worlds ahead of anything I've ever seen. Even the stop lights, if they are red and it is not a busy intersection, they change immediately when I pull up, and immediately change to yellow after I leave! Also they have stoplights right at the entrance to the freeway which are on during high traffic. The roads are easy to understand, and I've gone to many destinations without once getting lost. I just get the impression that the department of transportation here is alot smarter than the one in Florida :).

So this evening I wanted to grab some healthy food at a greek deli I found, but alas they were closed. Then I noticed this thing called Carl's Jr. next to it. I never saw this in FL, so I figured what the hell. I had a "6 Dollar Burger" and fries which was probably the best fast food burger I've ever eaten. I just checked their nutrition info and the burger alone is 960 calories! shudder... I already feel guilty. I can't do this anymore, must... eat... healthy.

01/06/06

Permalink 09:03:38 pm, Categories: Home, 521 words   English (US)

Busy day

I did alot of unpacking today. I think I have more packing material than actual stuff. Slowly but surely my apartment is becoming a home. What sucked is they were doing some plumbing in my building and the water was off all day.

I have a plasma TV that was crated before being moved. A 3rd party had to come out to open the crate, and I also had Comcast coming out the same day. I was worried that I wouldn't have the TV ready before Comcast got here. Luckily the 'uncraters' came out to open the crate early. Then Comcast came out to hook up my cable TV and internet. The TV worked great, and I was given a cable modem self-install kit. After drueling over Discovery HD a bit, I ventured to get my internet access running.

Now I have a wireless router, but I couldn't hook that up to the modem because some software is required to run to setup the cable modem. I hate installing this crap on my system, so I tried just connecting my laptop to the modem and tried to browse. It redirected to a Comcast page requesting me to download the installation software. They had a Mac version, and it was like 64megs. What in the world is included in that setup?

After downloading the HQX file and running it, it starts up Internet Explorer for Mac and begins a setup process. My guess is the download included IE, because the setup was just a sequence of web pages. After putting in my account number it got to a screen and just hung. I killed IE and restarted the installation, which seemed to continue where it left off. Finally it told me to reboot. Hmm, I haven't rebooted my Mac since, well since I don't know when. This brought me horror flashbacks of Windows, but I complied.

The system comes up and I notice I have a different IP. However, I cannot access anything. DNS seems to work, but port 80 connections to anywhere fail. I tried running the setup again, but it just crashes with 'file not found'. Yay. Now I was about to call them and then thought to myself, what would they probably ask me to do? I remembered my past experiences with Adelphia, "Power down the modem...". Ok, I'll try power cycling the modem. Voila! It works.

Now I'm not going to work with my laptop connected to the modem, I need to setup my wireless router. Hm, they probably know my MAC address now and will prevent any other MAC from connecting. I don't know this for sure, but it's a safe assumption. So I went to my router setup and configured the MAC address cloning feature to be the same MAC as my Mac :). Plugged the router into the modem, and voila, I instantly have wireless.

So in general it was a pretty good day. I'm even getting my car delivered tomorrow! I'm really impressed with how smoothly this whole move is going. Everything is being done earlier than I expected and things just seem to work out.

01/05/06

Permalink 07:04:26 pm, Categories: Home, 24 words   English (US)

Pictures of my homes

Here is the really beautiful temporary housing I'm staying at.

Here is the apartment I'm moving into. It's also pretty nice for the price.

Permalink 02:44:59 pm, Categories: Home, 293 words   English (US)

Beware of Ohare

Well for the past few days I've been doing my move from FL to CA. I flew through Chicago Ohare airport and there was really bad weather there. We had to stay on the runway for 3 hours in Miami before taking off. It was also the most turbulent flight I have ever been through. People were almost panicking, and of course I was praying the plane didn't crash :). Luckily my connecting flight was also delayed, but I ended up running to catch the flight. All I had was a piece of toast for breakfast and ended up starving once I got to CA. Note to myself: never fly through Chicago again.

Everything else is going very smoothly. I've been staying at temporary housing in Santa Clara for the past few days to wait for my stuff to arrive. The temporary apartment is absolutely beautiful. The movers arrived with my stuff this morning. It took only 8 days to get from FL to CA! Incredible, I was expecting 3 weeks. I don't have a bed and will pick one up from a friend this weekend. My car is scheduled to arrive sometime next week.

Meanwhile I'm getting used to the area, and I'll also experiment with the public transportation. I need to take a written test for my CA driver's license. One thing also I found out is my Bank of America accounts can't be used at the Bank of America here. I can only do stuff online. So I basically need to open up local accounts at the BoA here. I found that quite strange. You would think that Bank of America is Bank of America everywhere, but that's not the case for CA at least.

I'll put up some pictures of my apartment soon.

01/03/06

Permalink 07:50:20 pm, Categories: Television, 8 words   English (US)

The Chronic of Narnia

Hah, can't believe I didn't catch this video.

01/01/06

Permalink 10:06:17 pm, Categories: Television, 28 words   English (US)

This Spartan Life

Tonight IFC played an episode of This Spartan Life which is basically a talk show made in the Halo game. Hehe the Solid Gold Elite Dancers are interesting.

Permalink 08:54:52 pm, Categories: Python, 201 words   English (US)

Gotta love EBNF

A friend of mine was recently asked in an interview to code a solution to check if a string was a slurpy. Interesting little problem, and I think a pretty good question.

I've been reading a pretty good book on Python text processing. There is a section on writing parsers, and the author talks about the simpleparse module that can take a grammar in EBNF format. The recursive grammar that defines a slurpy seems like it would be ideal for EBNF. I was bored so thought I would try, and found it pretty simple. Here is the code:

from simpleparse.parser import Parser

grammar = r"""
slump  := ('D' / 'E'), 'F'+, (slump / 'G')
slimp  := 'A', ('H' / ('B', slimp, 'C') / (slump, 'C'))
slurpy := slimp, slump
"""
parser = Parser(grammar)
testSlurpy = [ 'AHDFG', 'ADFGCDFFFFFG', 
   'ABAEFGCCDFEFFFFFG' ]

for testData in testSlurpy:
   success, children, nextcharacter = parser.parse(testData, 
      production="slurpy")

And there you have it. It's very natural to describe this in EBNF grammar. Of course the interviewer was probably looking for a real solution :). But alas I am a sysadmin and I always look for the lazy way out. There is less likelihood for me to make an error by using something like EBNF, and it's easier to understand.

Permalink 08:00:34 pm, Categories: Religion, 52 words   English (US)

Mark O'Brien

Disability causes me to believe more strongly in a duality between body and spirit, ...cause if I'm a soul, I'm just as good as you. And if I'm a body, then I'm up shit creek, ain't I?

I read a really touching article by someone who had polio most of his life.

Viraj's Weblog

Donate to keep this site going!

Amount USD $

2006
<<     >>
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec

Search

Categories


Misc

Syndicate this blog XML

What is RSS?

powered by
b2evolution