Wednesday, February 08, 2006

Midterms...still in progress..ughh!!

Yes, midterms are still in progress. I have already taken exams for computer science and for discrete mathematics. Friday is my differential equation exam, and next Tuesday will be the one for engineering. The messed up thing is that my differential equation class is by far the hardest I have, not because DE's are inherently difficult, but because our brilliant professor has no idea how to teach. We get more out of our 1 hour recitation each week than we get from our 3 hours of class. Anyway, the class is hard, the exam is Friday, and today was the last class before the exam...a review day. Well, It was supposed to be. My roommate and I dragged ourselves out of bed this morning, preparing from some review for the exam. Instead, we were greeted by a note on the door, "MTH 256 Cancelled Today". Son-of-a-sasquatch! The most important class yet, and it is cancelled. Needless to say, no one was very thrilled.

I finished my computer project, which isn't due until Friday. It feels great to have that out of the way. Basically, the program we wrote had to roll a die 500,000 times, count how many times each number was rolled, as well as print the numbers that were rolled most and least frequently. The program consisted of 2 files. I will include it in case you want to see just how much work is involved in such a "simple" task. If you couldn't care less, skip over the yellow text below.

Proj3.java:

/*
* Travis Arnzen
* CS 161
* 12:30 Recitation
* Hoveland
*/

public class Proj3 {
/**
* Execution starts here
* @param args optional parameters used when invoking this program from the command line
*/
public static void main(String[] args) {
MyDie aDie = new MyDie();
aDie.testRandomness(500000);
}

}

myDie.java:

import java.util.Random;

public class MyDie {
private int howManySides = 6; //sets number of die sides
public int howManyRolls = 0; //sets roll count to zero
Random rand = new Random(); //initializes a random object

public MyDie() {
}

public int roll() {

// Put your code inside this method.
// Don't put your code in any other place in this class
// Use the rand variable. Don't instantiate another Random object.

int randInt = rand.nextInt(howManySides); //stores into value of random object
randInt++; //increments randInt

howManyRolls++; //increments howManyRolls

return randInt; //returns int value of random object
}

public void testRandomness (int noOfRolls){

int rolledOne = 0; //These ints will store the roll counts for each number
int rolledTwo = 0;
int rolledThree = 0;
int rolledFour = 0;
int rolledFive = 0;
int rolledSix = 0;

for(int i=0; i

int aRoll = roll(); //will store the value of the roll in an int

if (aRoll == 1) //these if-statements increment
rolledOne++; //the counts for the corresponding rolls

if (aRoll == 2)
rolledTwo++;

if (aRoll == 3)
rolledThree++;

if (aRoll == 4)
rolledFour++;

if (aRoll == 5)
rolledFive++;

if (aRoll == 6)
rolledSix++;
}

System.out.println("1's " + rolledOne); //these print-statements print out
System.out.println("2's " + rolledTwo); //number of times each number was rolled
System.out.println("3's " + rolledThree);
System.out.println("4's " + rolledFour);
System.out.println("5's " + rolledFive);
System.out.println("6's " + rolledSix);

int sumOfRolls = rolledOne + rolledTwo + rolledThree + rolledFour + rolledFive + rolledSix;
//stores sum of all rolls

System.out.println("Total of " + sumOfRolls + " rolls."); //prints number of times die is rolled

int minRoll = rolledOne; //sets minRoll to value of 1's. It is compared to the
//other rolls, and the one with fewest occurrences is
//stored to minRoll
if(minRoll > rolledTwo)
minRoll = rolledTwo;

if(minRoll > rolledThree)
minRoll = rolledThree;

if(minRoll > rolledFour)
minRoll = rolledFour;

if(minRoll > rolledFive)
minRoll = rolledFive;

if(minRoll > rolledSix)
minRoll = rolledSix;



if (minRoll == rolledOne) //these statements will print the number rolled the
//fewest times with the number of times it was rolled

System.out.println("One had " + rolledOne + " occurrences.");

if (minRoll == rolledTwo)
System.out.println("Two had " + rolledTwo + " occurrences.");

if (minRoll == rolledThree)
System.out.println("Three had " + rolledThree + " occurrences.");

if (minRoll == rolledFour)
System.out.println("Four had " + rolledFour + " occurrences.");

if (minRoll == rolledFive)
System.out.println("Five had " + rolledFive + " occurrences.");

if (minRoll == rolledSix)
System.out.println("Six had " + rolledSix + " occurrences.");

int maxRoll = rolledOne; //sets maxRoll to value of 1's. It is compared to the
//other rolls, and the one with most occurrences is
//stored to maxRoll

if(maxRoll <>
maxRoll = rolledTwo;

if(maxRoll <>
maxRoll = rolledThree;

if(maxRoll <>
maxRoll = rolledFour;

if(maxRoll <>
maxRoll = rolledFive;

if(maxRoll <>
maxRoll = rolledSix;

if (maxRoll == rolledOne) //these statements will print the number rolled the
//most times with the number of times it was rolled

System.out.println("One had " + rolledOne + " occurrences.");

if (maxRoll == rolledTwo)
System.out.println("Two had " + rolledTwo + " occurrences.");

if (maxRoll == rolledThree)
System.out.println("Three had " + rolledThree + " occurrences.");

if (maxRoll == rolledFour)
System.out.println("Four had " + rolledFour + " occurrences.");

if (maxRoll == rolledFive)
System.out.println("Five had " + rolledFive + " occurrences.");

if (maxRoll == rolledSix)
System.out.println("Six had " + rolledSix + " occurrences.");
}
}

Have you guys been paying attention to all the uproar in the Muslim world over the cartoons that have been published? If you don't know what I am talking about, look at any news source because it is all over the world news. The stir has been caused by some printed cartoons that were tasteless and blasphemous. Everyone is entitled to their opinion, but this is my blog, so I will humbly include mine. Freedom of speech is a right (in many countries), and a very good one. However, just because something can be done, doesn't imply that it should be done. In our high school yearbook, we (seniors) were able to include a quote. Mine always made sense to me, but I find it most fitting in this situation. It is a quote from Charles Kingsley, "
There are two freedoms; The false, where man is free to do what he likes; The true, where man is free to do what he ought." Now ask yourself which freedom the media has been exercising. If you don't understand the steps we have taken backwards since 9/11 in our attitudes and treatment of Muslims and Islam, take a look at this "informative" article which appeared today in our school newspaper:

The Islamic double-standard

by Nathanael Blake

“There is certainly freedom in America to deride Christ. This is done every day on Broadway, and every other day in Hollywood. Americans do not take up arms in protest.”

— William F. Buckley Jr.

With his usual insight, Buckley has located the dog that not only isn’t barking, but has apparently taken an eternal vow of silence. As Muslim mobs torch embassies and Muslim governments begin boycotts in response to European newspapers’ publication of cartoons mocking Mohammad, there has been little surprise at such savagery.

There have been plenty of platitudes about respect and dialogue, many mealy-mouthed statements about the value of a free press, and bountiful bromides about tolerance. What there hasn’t been is any serious inquiry into the special status Islam enjoys.

Let Christians so much as stage a peaceful protest against the latest “art” to blaspheme Christianity, and the liberal media chorus will issue a cacophony of condemnation. Not at the offending art, of course, or the tasteless artist, but at those bourgeoisie boobs who had the audacity to display disgust at the demeaning of their religion. Art, we are told, exists to break taboos and transgress standards.

And Christianity is considered ripe for ridicule, as it is thought Puritanical and hierarchical, repressive and patriarchal. Islam, of course, possesses such attributes in spades (Sura 4:38: but chide [women] for whose refractoriness ye have cause to fear … and scourge them), but it’s awfully gauche to say so. Also, doing so isn’t nearly so safe as Christian-baiting; there’s no Moral Majority equivalent of Mohammad Bouyeri, the chap who butchered Dutch filmmaker Theo van Gogh for making a film critical of Islam.

When Muslims worldwide go on violent rampages over a few caricatures published in a newspaper they would never have heard of otherwise, no one is surprised, and the storm of disapprobation that would arise if anyone else did such a thing is forestalled. Bluntly put, we expect Muslims to behave barbarously: Muslims die in protests over supposed insults to Islam, ho-hum.

Saudi Arabia has recalled its envoy to Denmark in response to the cartoon kerfuffle, blathering about how showing such disrespect for Islam is unacceptable. I would suggest to the Saudi government that if they want me to show their pedophile prophet (yes, Mohammad first had sex with his favorite wife when she was nine and he was in his fifties) any respect, they ought to make it legal to publicly practice my religion in their kingdom. Not executing Muslims who convert to other religions would also be good.

Notes Victor Davis Hanson, “Ever since that seminal death sentence handed down to Salman Rushdie by the Iranian theocracy, the Western world has incrementally and insidiously accepted these laws of asymmetry … the Muslim Middle East can insist on one standard of behavior for itself and quite another for others.” We are not, he acridly points out, “to remember that Hamas terrorists occupied and desecrated the Church of the Nativity in Bethlehem in a globally televised charade.” In that case, the Vatican declined to call another Crusade in response.

When I read passages in the Koran like Sura 8:40: “fight then against [the infidels] till strife be at an end, and the religion be all of it God’s,” I started doubting the “religion of peace” cant. Perhaps this “peace” is the peace of the grave.

Christianity grew on the blood of its martyrs; Islam grew on the blood of its enemies. The only combatant a modern Muslim martyr is sure of killing is himself; he prefers that the others be women and children.

Oh, I’m sorry; I forgot that those extremists don’t represent the majority of Muslims, who are kind and peaceable. I suppose that I’ll have to suppress the knowledge that the Palestinian majority just elected a terrorist group to govern them.

There are, to be sure, individual Muslims who are quite nice, and even a few Muslim countries that aren’t run by tyrannical kleptocrats or theocrats. But on average, Islamic nations are oppressive and poor.

The problem with Islam is that it is an immanentist religion. While Christianity teaches that the kingdom of God is not of this world, Islam holds that it is the duty of Muslims to bring the kingdom of God to this world. Islam allows no distinction between religious and governmental authority, and proclaims that good Muslims will always triumph over their infidel enemies. That’s hardly a metaphysical view that inclines toward tolerance and religious freedom.

If Muslims are incapable of separating the political from the spiritual, then both the right and the left are going to have to examine some of their favorite views. Conservatives need to take a hard look at whether the Muslim Middle East really can be remade in a free, democratic image. I used to think so, but now I’m skeptical.

Liberals, meanwhile, need to consider if their vision of multiculturalism is really possible, or whether it will succumb to what Leszek Kolakowski called “The self-poisoning of the open society.”

Finally, the “moderate” Muslims that are constantly touted need to demonstrate that they have the will and ability to lead their religion out of barbarism.


Nathanael Blake is a senior in microbiology. The opinions expressed in his columns, which appear every Wednesday, do not necessarily represent those of The Daily Barometer staff. Blake can be reached at forum@dailybarometer.com.

Anyway, this blog entry is quite long, rather dull, and should probably come to an end for the night. I hope I have been at least informative if nothing else. Have a great day.

0 Comments:

Post a Comment

<< Home