Posts

Let's Make Up History to Suit Our Prejudices!

In a review book for AP European History, I find: "Supernatural and miraculous forces played no role in Newton's universe." Um, say what ?! This guy saw no role for what today would be called the supernatural and miraculous? (Newton himself would not have recognized a distinction between the natural and the supernatural as meaningful, I suspect.) Even in his "pure" physics, Newton believed that God constantly intervened to keep the planets in their orbit. It is amusing that the newspaper stories about the online publication of the Newton archives claim that they "reveal" that Newton was a mystic. Of course, people who had studied him seriously, such as Keynes and Westfall, knew this decades ago. And here is the killer: since the is a review for a standard AP history test, I assume that if you actually know anything about Newton, you will be marked wrong on the test!

Just another ape

Everywhere I gape People know the part I'm playing It is curious that someone who keeps telling us that humans are "just another ape" seems to be very concerned that human males and females don't behave in exactly the same way , and tells us that "things are getting better" whenever they come closer to behaving in the same way. Let's get "naturalistic" and look at sex roles among our close animal relatives. Here are some recent findings on primates... and these are by researchers seeking to "assail stereotypes" about sexual roles: "Males compete to gain access to ovulating females; females compete to gain access to food resources they need to bear and rear their young. And female competition tends to be expressed in more subtle, less violent ways." "The stereotype has been that pubescent males wander off, permanently leaving their relatives or the community into which they were born, in search of potential ma...

You code a line at a time

One thing I see my students doing all the time is trying to write an 80-line program in one shot. Then, when it blows up, they are overwhelmed and have no idea where to find the bugs. After many, many years of programming, I find myself sometimes testing every line of code I write. Other times, there may be four or five lines that make no sense unless they are all written at once, so that they must be tested as a group. If I have to write ten lines without a test, I am extremely uncomfortable!

Whatever it is you want to become...

Taking my son on a college tour, I got to listen to a talk from the dean of the college's music program. He seemed a very nice, sincere man. But he is trapped in the modern cult which sees "self-fulfillment" as the highest aim in life. He told we parents, "We are here to help your child become whatever it is he wants to become." Hmm, and what if what he wants is to become a genocidal dictator? Well, maybe the college can offer an elective for that!

Rationalism in temperature measurement

Here is a nice post on why Fahrenheit is superior to Celsius for every day use. The triumph of Celsius is another example of rationalism: because it worked well for scientists, it was "rational," and had to be forced on a reluctant populace. (In the UK, a grocer was actually arrested for selling bananas by the pound.) At least the U.S. has held out!

Thanks for all the fish!

Thanks everyone for your great suggestions on my algorithm bleg. Here is what I wound up doing (self.empties is set up in the classes __init__()):     def position_agent(self, agent, x=RANDOM, y=RANDOM):         """         Position an agent on the grid.         If x or y are positive, they are used, but if RANDOM,         we get a random position.         Ensure this random position is not occupied (in Grid).         """         if x == RANDOM or y == RANDOM:             if self.exists_empty_cells():                 coords = random.choice(self.empties)        ...

Algorithm Bleg

I want to position agents on a grid consisting of X*Y cells. I want to plop them around randomly. But I don't want to put them in a cell containing another agent. Right now, I have the following function:     def position_agent(self, agent, x=RANDOM, y=RANDOM):         """         Position an agent on the grid.         If x or y are positive, they are used, but if negative,         we get a random position.         Ensure this random position is not occupied (in Grid).         """         if x == RANDOM or y == RANDOM:             got_cell = False             while not got_cell and self.exists_empty_cells():   ...