Mike Macgirvin
Diary and Other Rantings
   
Wednesday, Oct 08 2008, 02:52 pm
Jul 30, 2006
Yikes!

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.

Comments? | More Actions Open/Close menu
Jul 05, 2006
Archives

Found this old copy of my Netscape home page in the internet wayback machine archives. This one was from around 2000. There's an older one or two - but the wayback machine seems to start in 1996, and it took a couple of years for weblinks to spread enough that the crawlers could get out to the edges. Also, on the real early pages, the crawlers didn't try to save images, so you can't see much. 

That's OK, I've got some even older home pages on disk that I might dredge up one of these days. I think the oldest HTML page I've got is from around 1994. For your information, before 1994 the 'web' was a buggy program from Switzerland which had three or four worldwide links. 'Home page' had yet to enter the vocabulary. I don't know if resurrecting any of these ancient scrolls would serve any useful purpose.

Comments? | More Actions Open/Close menu
Jul 01, 2006
Congress targets social networking sites

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.

 

Comments? | More Actions Open/Close menu
"BYTE editors are men who seperate the wheat from the chaff, and then
print the chaff."
-- Lionel Hummel (uiucdcs!hummel), derived from a quote by Adlai Stevenson, Sr.