Archive for June, 2009

The Iran problem and theocracies

June 28, 2009

One of the larger pieces of news over the last few weeks was the Iranian election. Or what passes for an election anyway. As I’m sure everybody has heard by now, Mahmoud Ahmadinejad, was allegedly re-elected and Mir Hossein Mousavi, was apparently not. As Mousavi seemed to have a lot of popular support this shocked many Iranians who took to the streets to voice their disapproval. The regime, led by Supreme Leader issued stern warnings and eventually cracked down on dissent with violence. This was accompanied by an attempt to control information. Not allowing journalists to properly cover events, and attempting to control and censor the internet connections to and out of Iran. Typical of a theocratic mindset. We see the same thing on a very small scale on some religious blogs. Post a sound rebuttal to some argument and it is deleted, at least at some sites. Can’t let people see that. Fortunately, the educated populace of Iran managed to skirt around some of these issues and get videos posted to youtube and so forth.

But what about the internet censorship? Apparently two companies are involved in developing the technology to help the religious leaders of Iran monitor and possibly block internet access, Nokia, and Siemens. From the article:

in confronting the political turmoil that has consumed the country this past week, the Iranian government appears to be engaging in a practice often called deep packet inspection, which enables authorities to not only block communication but to monitor it to gather information about individuals, as well as alter it for disinformation purposes, according to these experts.

The monitoring capability was provided, at least in part, by a joint venture of Siemens AG, the German conglomerate, and Nokia Corp., the Finnish cellphone company, in the second half of 2008, Ben Roome, a spokesman for the joint venture, confirmed.

How does it work?

Deep packet inspection involves inserting equipment into a flow of online data, from emails and Internet phone calls to images and messages on social-networking sites such as Facebook and Twitter. Every digitized packet of online data is deconstructed, examined for keywords and reconstructed within milliseconds. In Iran’s case, this is done for the entire country at a single choke point, according to networking engineers familiar with the country’s system. It couldn’t be determined whether the equipment from Nokia Siemens Networks is used specifically for deep packet inspection.

.

Big Brother is alive and well in Iran. From a technology standpoint, it is kind of cool how it works, but ultimately is fundamentally at odds to a healthy democracy. Interestingly, the President of Iran has little real power. The ultimate power rests with the undemocratically selected Supreme Leader. From the Wiki:

However, certain executive powers, such as command of the armed forces and declaration of war and peace, remain in the hands of the Supreme Leader.[5] Furthermore the Supreme Leader may even dismiss the president and prevent the legitimation of any law (appointed by assembly) by the institutions under his control, the Guardian Council and the Expediency Council.

So, that’s the real problem. A shining example of how religion mixed with politics leads to a mindset critical of openness, and insidiously controlling of all. Iran needs a velvet revolution. I doubt that will happen though as this is not a threat to national identity and does not interfere with local religious practices. But it should inspire all of us to vigorously support the American United for Separation of Church and State organization.

Advertisements

Science, religion, and accomodations

June 27, 2009

Right. Let’s see if I can get back on track blogging instead of letting those pesky little details like work and life get in the way. One needs a sense of priority after all.

So, lately, the buzz around the blogosphere has been about whether or not science and religion are compatible. The spark was apparently a new blog from Jerry Coyne. In one posting, referenced is Lawrence Krauss, who quoted Sam Harris arguing that reconciling modern science with Iron age convictions was “ridiculous”. Of course, PZ Myers had several observations on this discussion, the latest of which can be found here. Another salvo was fired from Sean Carroll at Cosmic Variance. Since this is a topic close to my interests, I would be remiss if I were not to throw in my 2 cents.

Are science and religion compatible? Well, if you want to define your religion as a belief in a supernatural being transcendent to the universe and who is undetectable and never interacts with anything in the universe, then sure, why not? I’m in a generous mood, and such a god and science really have nothing to say about each other. Completely useless as a religion, and in reality, this is not the type of entity most religions posit anyway. The big 3 Abrahamic faiths declare a supernatural entity who has (and in many cases continues to) interacted with the universe and humanity in particular. This means we can bring scientific methodology and logical reasoning to bear. In particular, the scriptural texts that are supposedly the best evidence for this god are full of scientific errors, misunderstandings, and contradictions. Metaphorizing stories away aside, we know there the world was not created in 6 days 6000 years ago. We were not made separate from the animals from dust. The evidence is clear that there was no global flood. The world is not supported on pillars. Historical and literary analysis shows it highly likely that Jesus never existed..

The claims about the state of the world reached via religious means have almost always been contradicted when careful scientific scrutiny has been applied. Indeed, claims about human nature reached via religious means stand in contrast to what we have learned through the painstaking rigor of science. Think about how the linkage between the physical construct of the brain and our personality stands in stark contrast to the idea of an invisible and immortal soul, for example. Each time, those who wish to hold on to religious faith must dance around the problems, squeeze their god into tinier gaps, and/or build elaborate baroque smoke, mirror metaphors to make it look like the religious stories don’t really conflict with reality, or try to dismantle science education by trying to get mythology taught as science. Now one of the ways these religions claim that a god interacts with the universe is via miracles. Making the sun stand still for a day. Resurrecting a corpse. Helping people getting better from various ailments by proper usage of various drugs under the care of a doctor. Oh wait, that latter was actually science and the hard work of doctors.

I have seen one argument made by a few of my fellow atheists (and I’m not sure where I read this) on the compatibility issue that I don’t think is quite correct. The argument is that the miracles did not happen, because they are incompatible with reality. Well, yes. That’s pretty much the point. A god above the laws of physics can do whatever he or she wants. That would count as pretty good evidence that such a being exists (assuming appropriate verification can be made, of course). The correct question is whether or not such events took place. It seems all the major miracles occurred long ago. The further back, the more miraculous. The scriptural stories including miracles have been handed down over the centuries copied down from sources which were second hand at best. We know how easily fooled our brains are, even first hand. Given the major problems inherent in the Bible, we simply have no reason to think that these stories are in any way reliable. We have no reliable evidence these events took place.

Now some do argue that science and religion are compatible in the sense that some scientists do hold religious beliefs. This does not mean that the religious beliefs they hold are compatible with scientific knowledge. As Sam Harris points in The End of Faith, our imperfect finite brains are perfectly capable of holding a contradictory set of beliefs. The scientific work is approached via honest and rigorous inquiry without mixing religion. Religious beliefs are dealt with by varying combinations of subjective feelings and authoritative dogma. As long as they are kept out of direct internal conflict, the cognitive dissonance is not recognized as such. Or the cognitive dissonance is skirted around by unjustifiable rationalizations for the religious views. Perhaps in some sense, the religious belief system is seen as a beautiful and fragile crystal. Too delicate for the full brunt of critical scientific and logical inquiry. However, long ago I and many others have seen that this beautiful crystal is nothing but cheap glass. It’s not doing anything useful and gets in the way of our understanding of how things work. Its beauty is simply an illusion that disappears on closer and honest scrutiny.

Run, maybe?

June 13, 2009
Cougar maybe from Chino Hills State Park

Cougar maybe from Chino Hills State Park

A new study of 185 cougar attacks suggests that in some circumstances it may, in some circumstances, be better to run when encountering a mountain lion out on the trails, provided of course you don’t go stumbling around on uneven terrain or rocks looking like a wounded animal. You might as well ring a dinner bell for the big cat. So what do the numbers say? From the article:

half of the 18 people who ran when they were attacked escaped injury. The study also found, however, that those who ran had a slightly higher chance of being killed in an attack—28 percent (five) of those who fled died as a result of injuries, compared with 23 percent (eight) of those who remained motionless during big cat attacks. About 39 percent, or 28 people, who moved away slowly when approached by a mountain lion escaped without injury.

On the other hand, people who froze were the least likely to escape injury when a mountain lion attacked. Only 26 percent of them escaped. They also had the greatest frequency of severe injuries: 43 percent of those who stood still in the face of a lion were badly injured compared with 17 percent of those who fled, according to the study.

So there’s some pretty complex risk analysis to undertake when encountering a cougar. Well, let’s see, if I run there’s a slightly less risk of serious injury, but a slightly higher risk of death if things go awry. Thirty nine percent chance of getting away by moving away slowly. What to do? “Wait a minute guy, I’m figuring out my options here.” One thing of course, is that we don’t know all the specifics of all these cases, but I suspect that letting the cougar know you are aware of its presence and walking away slowly, especially if the terrain is uneven, might be the best bet. It certainly looks like just remaining motionless is not the best option.

A detailed listing of cougar attacks in California can be found here. The 2004 attacks (or attack, it looks as though one of the deaths may have been a heart attack) occurred behind the backyard of a friend who used to live there, and where we had previously hiked. My friend had probably seen one of the mountain lions on a previous hike where he was alone. My friend saw the cat on a hill, watching him. He slowly backed up and got out.

I have not had any encounters myself. The closest encounter I’ve had in California was staring down a coyote in Chino Hills State Park where I occasionally do some trail running. The above picture is from the Chino Hills State park web site, so there are also mountain lions there as well. Other mammals in the park are here.

Of course, we are visiting and encroaching on their home. This was their home before humans even got here. Statistically, it is still very rare to be attacked by a cougar, but one does need to be aware of their presence when in their home and be smart.

Python fun

June 8, 2009

Earlier I had mentioned how much fun coding in python is. So I recently needed to do a few standard deviation calculations by inputting numbers the first time, and reading other numbers, one line at a time from a file. I could do this by plugging in numbers in some calculating device, use excel, or … But instead I figured I’d write a few lines of code and have an excuse to try out Eric, a Python IDE. It seems to support ruby as well, and the save as option suggests support for editing Java, javascript, tex, sql, etc. etc. Overall, I found using Eric to be a pleasure. It’s got all the usual stuff, setting breakpoints, stepping through code, project management, and even built-in support for source control (Subversion and cvs). Of course, the very name Eric, is in keeping with the Python theme, being named after Eric Idle of Monty Python fame. Further keeping with the fame, there exists a code refactoring menu item labeled Bicycle Repairman.

So, here’s a little taste of some code I scribbled out in about 5-10 minutes in Python.


def standardDeviation(mean, numberArray):
""" Calculate the standard deviation
Expects the mean to have already been calculated
"""
sumOfSquares = 0.0
for num in numberArray:
sumOfSquares = sumOfSquares + num *num

rootMeanSquare = sumOfSquares/len(numberArray)
return math.sqrt(rootMeanSquare – mean*mean )

def readInput():
print “Enter a white space seperated series of numbers”
numbers = raw_input(“==>”)
return [int(n) for n in numbers.split()]

def readData(theFile):
try:
myfile = open(theFile, ‘r’)
except:
print “Could not open file”
numlist = []
for line in myfile:
try:
numlist.append(int(line))
except:
print “Invalid input in file”

myfile.close()
return numlist

(Having just done the preview, I’ve noticed that the WordPress formatters did not keep my indentations. Those of you who already know Python know what I’m talking about. For the rest, just keep in mind that every block of code, for example, everything after a def and contained within in it, should be indented with respect to the def label. Simply trying to tab or add spaces doesn’t seem to work right on this editor. I’ve got about 2 seconds before needing to drive to work so later on, if I get time, I’ll see if I can make it look right.)

The def label indicates the start of a function. The readData function opens up a file and we’re prepared to print a warning if the file doesn’t exist. We append each number to an array called numlist. Reading the file was trivial. The line “for line in file” does the trick. Each line is stored in the variable line each step through the loop. Not shown here is the fact that later on I use this numbers to calculate a mean and pass the results to the standardDeviation function.

Later on, if I get time and am motivated, I can prettify this up quite a bit. I could encapsulate a lot of this in a full blown python class and provide more statistical calculation functionality, throw in TK to get some graphics and charting capability, and generally create a nice little statistics package. Of course, a lot of that functionality already exists elsewhere, but its always fun to roll your own to see if you can find a different take on things.

Dancing with the broom

June 6, 2009

Over at Evidence for God, one of those religious sites I check out once in a while, there is an intriguing article on human worth and what the Bible has to say about it. The sermonesque story begins on a cleaning person sweeping the floors of a laboratory and apologizing for getting in the way of “important” scientists, saying in effect that she was “dancing with the broom”. The author correctly points out as a society, we seem to place the lion’s share of importance on movie stars, athletes, politicians (and scientists too we hope!), and so on. The point is then made that in God’s eyes we are all equal and Jesus said that he himself came to serve. That the greatest is the least and least is the greatest and so on. That we should try to see our fellow humans in this light. This is similar to other interpretations about parables where Jesus tells his disciples that when they do things to others they do so to him. The relevant interpretation that I am thinking about is that we all have a Christ-like nature.

There is a tremendous amount wrong and even atrocious with most religions and Christianity specifically. However, there are a few gems that can be picked out of any religion, and with a little polishing, the idea of equality of human nature and helping others is one of them. It is a good moral instruction with which I believe most of us can agree. But here is a major difference. The writer of the afore-mentioned article writes:

The reason why we are to act without partiality is because God Himself does not show partiality towards individuals. So, the Christian is to serve others on the basis of the strength God supplies, so that all glory goes to Him. God values all human beings equally, since we are all created in His image. Even though we are created in the image of God, we have all strayed from His morally-perfect image, and so need a Savior to be declared Holy and acceptable to God by faith in Jesus Christ, in order to gain entrance into heaven. However, once we enter that state, our station in heaven will be based upon our record of service to others in this life. So, it seems likely that the famous people on earth might be the broom pushers in heaven, while the lowly are given the highest honors.

No, we do not need a God to justify acting towards others with impartiality. Why is it not enough to recognize each others basic humanity? To recognize our common shared heritage of several billion years of evolution and the shared progress of civilization. Why is it not sufficient to be self-aware enough to recognize our own imperfections and inabilities but to know our strengths and how they can be used to help others in this fantastic journey of humanity. To know that others too will also not be perfect but will have abilities that perhaps we lack? That each of us contributes to the human experience. Grow when we can, self correct, learn, move forward, ever onward. In the indifferent eyes of the cosmos, we are all the same and insignificant. We all stand humbled by the amazing (yet ever more comprehensible) complexity of life, power of shifting continents, power of the sun, and a cosmos stretching out billions of light years and containing billions of galaxies. In the face of all this and all there is yet to learn, what we have is each other. Each of us an amazing complex arrangement of star dust.

Waving at Google, etc.

June 4, 2009

After yet another unplanned hiatus from blogging (too crazed of a schedule), let’s see if I can get back on track. A few items going on in the news these days. Sadly, of course, the California Supreme Court decided to keep California backwards by denying marriage equality to a subset of people.

On a more positive note, Newsweek recently acknowledged that Oprah has been supporting charlatans, frauds, and, at best, highly questionable and possibly dangerous techniques. I’m sure if she thinks positively about it, the criticism will just go away, as that is her secret after all.

But in the best news (well, putting on my developer’s hat anyway), Google was just talking about the
Google Wave, an instant messaging, emailing, photo album building, document creating, bug tracking (one of the gadget extensions anyway), ad infinitum, shiny new tool with an API for developers to write applications for. The only thing it doesn’t seem to do is brew beer yet, but I’m sure somebody will be working on that. The actual launch date is still a bit out, and perhaps they did this to steal a little wind from Microsoft, which certainly isn’t a bad thing. A very cool tool tool; check it out.