Ed Felten's predictions for 2005

Ed Felten has some predictions for 2005 in the DRM and personal computing space.

January 5, 2005

Watch what you download

Ed Felten reports that record companies may be seeding P2P networks with trojan horse audio files that infect your computer with spyware. The trojan horses definitely exist, whether they’re being spread by the record companies has not been confirmed.

January 4, 2005

Coming in 2005: the end of life as we know it

You can always count on Jim Kunstler for some rosy predictions that will have you sleeping well at night.

January 4, 2005

The trouble with occupation

James Wolcott weighs in on why military occupation just doesn’t work (with supporting evidence from the Economist). The fact is, the idea that American troops would end up seeing all Iraqis as enemies was completely foreseeable.

January 3, 2005

Bad MySQL day

I like MySQL as well as the next person, but I’ve recently run into a problem with it that I think is going to lead to a divorce. What blows my mind though is that I can’t find anyone else on the Web who’s having the same problem with it that I am, and it makes me think that I’m doing something horribly wrong. I mean, I don’t see how people use MySQL for anything but storing Weblog content if MySQL has the bug that I think it has. My problem started when I wanted to create a field that contains a currency value. In other words, a fixed point decimal number that is precise (normal floating point numbers are approximations, very close approximations, but approximations nonetheless). In the Java world, you have to use a class like BigDecimal for currency, because float is not precise. Same thing with MySQL, where you need to use the decimal field type rather than the floating point type. (See the documentation.) I create my tables using Hibernate and XDoclet, so when it sees a BigDecimal in my code, it defines the column as decimal (31, 30), which means that the column can hold 31 digits, and 30 of them can be to the right of the decimal. You’d think, then, that a number like 1000 would be stored as 1000, or 1000.25 would be stored as 1000.25. Unfortunately, that’s not how things work. Let’s say I create a table like this: create table example (example_num decimal(31, 30)) Then I run an insert statement like this: insert into example values (1000) The value stored in the database is 99.999999999999999999999999999999. This leads me to believe that there’s no way to store a fixed point number in MySQL. You can hack around it by defining the column as decimal(31,2), limiting the number of digits after the decimal. That’s still broken, though, because there’s rounding going on. Is it really true that there’s no way to store a fixed point number in MySQL unless you use a varchar field instead of a numeric field? Could things really be this broken? I’ve started a QuickTopic for this. Maybe there’s something I’m missing. Update: Looks like there are two problems here, involving bad documentation and a bad developer. The first problem is that if you define a column as decimal(31,30) in MySQL, it’s going to put 30 digits behind the decimal no matter what. I didn’t get that from the documentation. So if you put in any number larger than 99, it’s going to overflow. (That’s the 99.99999 thing.) The second thing is that if you insert a value into a decimal field, you have to put it in single quotes or MySQL will convert it to a floating point number first and you’ll lose precision (and sleep). I also figured out what I was doing wrong with XDoclet and Hibernate so now I can set up my decimal columns properly. Some days I hate software engineering. ...

January 3, 2005

Iranian bloggers being tortured

A former Iranian Vice President reports that Iranian bloggers imprisoned in Iran are being tortured.

December 31, 2004

A penny saved is a penny earned

Rather than giving boatloads of money to poor countries to alleviate their poverty (or in cases like the recent tsunami, to help with disaster recovery), rich countries could just as easily forgive their debt.

December 31, 2004

Results

Weblogs get results. I already knew that, though. In my years of running this weblog, I don’t think I’ve ever posted a direct question that didn’t get multiple good answers from readers. For that I am very grateful.

December 31, 2004

Stingy Americans

As of today, people have donated $5 million to the tsunami disaster relief effort via the American Red Cross Amazon.com tip jar alone.

December 30, 2004

Disaster relief

If you want to help out the victims of the earthquake in south Asia, there are many options.

December 29, 2004