Archive for July, 2008

Reading Code

The two best ways of learning how to program are writing code and reading (good) code. I read a lot of code in my younger days, and I think it helped me. Programming courses give students plenty of practice in writing code. I wonder how many give students an opportunity to read good code. There should be a course in which all the students read and discuss a large program, like a literature class.

One problem with that idea is a lack of good code to read. Knuth’s TeX and Metafont books are good reading. But to really understand them you have to first wrap your head around TeX itself, which is a rather complicated macro processor. In some ways the code for TeX is easier to understand than TeX itself. Also, the code is in the Web version of Pascal, not a popular language today. The Lions book and TCP/IP Illustrated, Volume 2, show good coding, and are at least written in C, though again the code is rather old by today’s standards.

Are there any modern code bases that are helpful to read? It would be best if there were some commentary, or at least really excellent comments.

Comments (8)

Telecom Immunity

The telecom companies helped the Bush administration in wiretapping people without a warrant. The wiretapping was illegal by any reasonable reading of the law (the law was written after the last burst of questionable government wiretapping during the 60s). There has been a strong push by some people to sue the telecom companies for their role in the wiretapping. It seems that the push is now over, in that both houses of Congress have voted to grant the companies retroactive legal immunity for their participation.

I’ve never completely understood the argument that it should be possible to sue the telecom companies. They didn’t undertake the wiretapping on their own. They did it on the request of the administration. On the one hand, they should have said “no, this request is wrong.” On the other hand, when the administration asks you to do something, you normally do it. We have checks and balances in the government itself. It’s a good idea for all citizens to seriously question government requests. But it should not be legally mandatory for them to do so.

If we are able to sue the telecom companies for their participation in this, what we are saying in effect is that they are responsible for judging the legality of a request from the administration. It seems to me that it is reasonable for the companies to say “the administration told us it was OK, and who are we to argue?” It does not seem right to hold them to a higher standard than that.

The real reason that people want to sue the telecom companies is because they can’t sue the people who really started the policy. The hope is that by putting pressure on the telecom companies now, we can avoid having this happen again in the future. That may be good strategy, but it doesn’t make it right. (As a practical matter the level of discussion on this issue is likely to deter the companies from similar actions for many years.)

I hope that the next administration will launch criminal prosecutions of the people who violated the wiretapping laws. Alternatively, Congress could start a real investigation. Those are the right ways to tackle the problem of illegal action by the government. Unfortunately these are not likely to happen. One need only look at the number of people involved in the illegal Iran/Contra arm sales who are currently back in government to see that there is only very weak punishment for illegal actions in Washington, D.C.

Comments (5)


Wanted was a fun if brutal comic book written by Mark Millar and illustrated by J.G. Jones. It came out at a time when Millar was finding his own voice after doing a lot of work with Grant Morrison. It tells the story of a general loser, Wesley Gibson, who discovers that he is the son of a supervillain and that he has inherited his father’s power to, more or less, kill anybody with a gun. The story is set in a world which used to be like a comic book world, but the supervillains used some sort of magic spell to eliminate all the superheroes and produce the world in which we all live today. The supervillains are still in charge behind the scenes. The storyline follows Gibson’s initiation into the society of supervillains, a battle between rival groups of supervillains, and Gibson’s brief reunion with his father who is not dead after all.

This was turned into a movie which recently came out, which I just saw. The movie drops all the supervillain stuff, judging, probably correctly, that it was too comic-booky. In the movie Gibson’s father works for a society of assassins who have special powers, mainly the ability to make bullets curve rather than go straight. The movie doesn’t make any more sense than the comic book, and, being quite a bit tamer, is rather less interesting. It’s not terrible, but it’s not worth going out of your way to see it. The special effects are admittedly pretty good.

The only thing which the movie shares with the comic book is some character names, the beginning, and, oddly, the very end. It was interesting–in fact, probably the most interesting thing about the movie–to see that the ending was the same, but inverted. In the comic book Gibson starts out as a schmuck and becomes a vicious thug. At the end of the story he addresses the reader directly, essentially saying that you, the reader, are the schmuck that he used to be, and that he now runs the world. In the movie Gibson starts out as a schmuck and becomes somebody who kills people for good reasons. At the end of the movie he addresses the viewer directly, mentioning the things he has done and scoffing at the people who used to put him down, and saying “what have you done lately?”

So in both stories Gibson turns into a killer. In the comic book he is clearly a bad guy. He is taking his revenge on the world. In the movie he is presented as a good guy. But in fact we don’t actually see him doing anything good. We see him killing people and seeking vengeance for his father’s death. When he talks to the reader of the comic book, the message is that you may be a schmuck, and people like Gibson may be controlling your world, but at least you’re not evil. When he talks to the viewer of the movie, the message is that you should stop being a schmuck and start killing people. Frankly, I prefer a dystopian vision than one which glorifies assassination as an escape from the humdrum daily life.


Reducing Oil Consumption

The New York Time had a big article on Sunday on missed opportunities to cut oil consumption. The article covers various ideas, but it focuses on automobile fuel standards. I think that is a mistake.

I do think that the automobile fuel standards should be higher. Historically the American car companies have argued against this, but that was very short-sighted of them. It was always clear that eventually they would be caught short as gas prices went up. They should have been planning for higher gas prices all along, and they should have gone along with higher fuel standards. The arguments against it seem foolish to me. Japan has much higher fuel standards than the U.S., yet Japanese car companies are doing just fine–in general quite a bit better than U.S. car companies, though of course the Japanese companies also benefit from better government health policies.

However, although automobiles are the main users of oil (70% in the U.S., I think), simply focusing on getting them to use less oil is too narrow. It would have been much better for the U.S. government to strongly encourage the development of non-oil energy sources. This could have been done through direct R&D investment and by creating markets via tax incentives and direct purchase. The discretionary part of the U.S. budget is heavily weighted toward the military, and indeed this is a national security issue. The military could and should have been asking for equipment which was low energy and did not require oil. The technologies developed that way would have spilled into the civilian sector as so many others have.

There is still time for this sort of thing, but we should have started it 30 years ago after the first oil crisis. It’s hard for me to understand why we didn’t. I know that it is possible for the U.S. government to make sensible choices when there is no crisis, but in this case it failed.

Comments (6)

Two Problems

We are most likely facing two significant problems in this century. The first is climate change due to increased greenhouse gases. The second is the loss of our major energy source due to oil depletion. I think it’s interesting that solving one problem is likely to solve the other one at the same time.

The only way to address the potential of climate change is to develop new energy sources and/or to develop new ways to doing what we do today while using significantly less energy. In principle, we could address climate change by reducing our energy use by doing less. In practice, that will not happen. No government is both strong enough and tough enough to enforce that. The sacrifice is too great for people to do it willingly. If we can’t find new energy sources or large energy savings, we will wind up spending our time figuring out how to deal with the consequences of climate change.

The only way to address oil depletion is to develop new energy sources. If we can’t do that, we will have to struggle through sweeping changes to our society, which is based on cheap and portable energy.

Theoretically we could postpone the oil depletion issue by moving to something like liquified coal. That would not help with climate change, and would only help us for a couple of hundred years at most. A proper fix for oil depletion will be to find a renewable energy source. Finding such a source will address the climate change problem at the same time.

We’ve seen these problems coming for a long time, more than thirty years. Unfortunately there have been few organized efforts to address them. We can only hope that that will start to change in the near future.

Comments (4)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »