Some of you may know that I write this software primarily for Firefox (on Linux!). Only once in a great while do I pull up Internet Explorer and see just how badly it mangles my pages. Yesterday was one of those days.
Ohmigosh! What happened? The pages all looked like caca. Parsing errors, style errors, framing errors. I know it's been at least a few weeks since I last checked and made everything work, but I couldn't imagine things breaking that badly.
First thing was page parsing errors. This site natively generates valid XHTML. But now I've got content being imported from all over the place. If you import content, you can forget about your pages ever validating again. I'm even re-writing the foreign content to make it compliant. But there's a lot of screwy software out there generating a whole lot of weird stuff and unfortunately there are more ways to write bad XHTML than one can imagine. If you haven't yet imagined it, you aren't going to have the code to fix it.
Next on the list was the cascading style sheets. They are called cascading because you have the ability to override and provide layers of style information. That's how I do themes here. You don't rewrite the entire style sheet, you just write down the things you want to change.
As it turns out, Microsoft claims to support cascading styles, but they are only supported as long as the style information comes from different source types, such as files, inline, or block declarations. They don't support cascading from multiple files. Well, OK they sortof do if you use an @import statement, or fully declare every single block. That doesn't work for me, because I'm figuring out what styles sheets to use on the fly. But if you set an element size in one file and set its color in a second file, it forgets that you already set the size.
I wouldn't have brought it up if I hadn't already fixed it. The solution of course is that if they won't accept multiple files, I'll just have to take all the various CSS files, arrange them, merge them (in real time), and send them out as a single file. Problem solved. As with all things Microsoft, it's a real ugly hack; but at least I turned it into an elegant ugly hack.
Then it turns out that chat was hopelessly broken. I'm not surprised. You may recall that I whipped it up in an afternoon. But I recently started converting it to XML rather than hacked text streams. This requires the Javascript XML parser. If you are using Javascript you already know that there is nothing about it which will work cross platform (though one could argue this point for CSS as well). You've got code x for Microsoft browsers and code y for everything else. So now I had to munge around the DOM and figure out what they call the text content blob that's associated with an XML element and then insert the most widely used block of code ever - "if (ie/microsoft/windows/msdos/whatever) {do this}, else {do it the right way}". In this case I'll actually give Microsoft credit for naming it 'text', whereas the other folks call it 'textContent'.
The box model also bit me again. Sigh. This time it's the W3C that screwed up, but Microsoft happily went along. I need a box, 100 units by 100 units to display on the screen. So let's do it. In firefox you get a box 100 units by 100 units. In IE your box is 140 or so by 140 or so. Because they don't count the scrollbars, and margins and padding and stuff. So you have to fudge. Shrink the box until the outside comes out to 100 and hope nobody uses fat scrollbars. But then on firefox you'll get a box that's 87 by 87. You just can't win - although there are some hacks to at least make firefox honor the same box model. What there isn't is a way to specify a box that's exactly 100 X 100.
I'll probably find a few more IE bugs and then --- I'll turn the infernal thing off for another month or two.
From slashdot:
---
Roland Piquepaille writes "Researchers have discovered that ordinary cellulose is a piezoelectric and smart material that can flap when exposed to an electric field. ScienceNOW reports that electricity can give life to cellophane. When you put a very thin layer of gold on each side of cellophane, and that you apply electric current to the gold layers, one positive, one negative, the cellophane curved toward the positive side. If you switch the voltage fast enough, the cellophane starts to act as a wing. So it should be possible to use it to build lightweight flying robots carrying cameras, microphones or sensors for surveillance missions. Read more for additional references and pictures about this electroactive paper (EAPap)."
---
What's interesting about this article is that I worked on a project trying to find an application for electro-deforming cellulose back in 1978. Eventually management decided that it was really interesting, but we couldn't come up with anything practical to do with it. The project was shelved. I guess we were short-sighted. Hey, let's make this stuff fly! Right. My guess is that these researchers are in the same boat we were in. They're gonna' flap a piece of cellophane like a butterfly wing and carry little robot TV cameras. Right. It's desperation time. No commercial uses. Project is about to be shelved. Let's go after some of that DARPA money...
C|net reports:
[As you read this, be reminded that this website is a social networking site]
The concept of forcing companies to record information about their users' Internet activities to aid in future criminal prosecutions took another twist this week.
Rep. Diana DeGette, a Colorado Democrat, originally proposed legislation (click here for PDF) in April that would require Internet service providers to retain activity logs to aid in criminal investigations, including ones involving child abuse.
Now DeGette and some of her colleagues in the House of Representatives are suggesting that social-networking sites should be required to do the same thing.
"How much would it cost your company to preserve those IP addresses?" DeGette asked at a hearing on Wednesday that included representatives from Facebook, Xanga and Fox Interactive Media, the parent company of MySpace. "You're going to store the data indefinitely?"
An IP address is a unique four-byte address used to communicate with a device on a computer network that relies on the Internet Protocol. An IP address associated with CNET.com, for instance, is 216.239.113.101.
Michael Angus, executive vice president of Fox Interactive Media, said he agrees with the idea of data retention for MySpace. "As a media company, Fox is very committed to data retention," Angus said. "It helps us police piracy."
Rep. John Dingell, a Michigan Democrat, added: "Why can't data that links IP addresses to physical addresses be stored longer?"
The concept of mandatory data retention was pioneered by the European Union, which approved such a requirement for Internet, telephone and voice over Internet Protocol (VoIP) providers last December. A few months later, the Bush administration endorsed the idea, with Attorney General Alberto Gonzales calling it "an issue that must be addressed" and--as first reported by CNET News.com--following up in private meetings with Internet providers.
In those meetings, Justice Department representatives went beyond the argument that data retention was necessary to protect children--and claimed it would aid in terrorism investigations as well.
During Wednesday's hearing, politicians also claimed that social-networking sites were not doing enough to verify that their users who claimed to be a certain age were telling the truth. (Recent news reports have said that sex predators are using MySpace and similar sites to meet up with teens.)
"There is more you can do," DeGette said. "You can do algorithms that will go beyond just the date of birth that they register, to start to weed out some of the underage users." She also called for the companies to participate in a "national public service program" to distribute an educational video.
Two paths for data retention
Data retention legislation could follow one of two approaches, and it's not entirely clear which one U.S. politicians will choose.
One form could require Internet providers and social-networking sites to record for a fixed time, perhaps one or two years, which IP address is assigned to which user. The other would be far broader, requiring companies to record data such as the identities of e-mail correspondents, logs of who sent and received instant messages (but not the content of those communications), and the addresses of Web pages visited.
Earlier in the week, Internet companies tried to forestall potentially intrusive new federal laws by launching a campaign against child pornography designed to tip off police to illegal images. Participants include AOL, EarthLink, Microsoft, United Online and Yahoo.
In addition, Comcast announced that it will begin to retain logs that map IP addresses to user identities for 180 days, up from its current policy of 31 days. (The company stressed that it does not record information such as "Internet use or Web surfing habits.")
But Rep. Joe Barton, the Texas Republican who heads the Energy and Commerce Committee, said even after hearing the news, that he still wanted to enact "a comprehensive anti-child-pornography" law. "I think the Congress is tired of talking about it," Barton said, adding that it was time to "protect our children against these despicable child predators that are on the loose right now in our land."
Barton has not released details about his legislation.
This isn't the first time that MySpace and social-networking sites have faced criticism from politicians--and the threat of new federal laws.
A bill introduced last month by Rep. Michael Fitzpatrick, a Pennsylvania Republican, would cordon off access to commercial Web sites that let users create public "Web pages or profiles" and also offer a discussion board, chat room or e-mail service. It would affect most schools and libraries, which would be required to render those Web sites inaccessible to minors, an age group that includes some of the category's most ardent users.
In addition, politicians proposed a slew of related measures this week, including blocking access to off-color Web sites for all Americans, dispatching "search and destroy" bots that would seek out illegal content, regulating search engines and targeting peer-to-peer networks.
of being a Christian, known all over the nation, dressed in skin-tight
leather pants, shaking and wiggling her hips to the beat and rythm of the
music as the strobe lights beat their patterns across the stage and the
band plays the contemporary rock sound which cannot be differentiated from
songs by the Grateful Dead, the Beatles, or anyone else. And you may try
to tell me this is of God and that it is leading people to Christ, but I
know better.
-- Jimmy Swaggart, hypocritical sexual pervert and TV preacher, self-described
pornography addict, "Two points of view: 'Christian' rock and roll.",
The Evangelist, 17(8): 49-50.

Digg
Delicious
Netscape
Technorati