Mike Macgirvin
Diary and Other Rantings
   
Thursday, Aug 28 2008, 06:42 pm
Nov 25, 2005
XHTML compliance
I've been trying to make this weblog XHTML compliant. For those non-techies out there XHTML is the modern version of the HTML web 'language'. It's a dialect of XML which is .... oh nevermind. I guess this post is for techies.

The multiple articles per day had to be revisited because it seems that '+' is not allowed in a 'name' attribute. I use named anchors on the index page. These also aren't allowed to begin with numbers. Sigh. All my articles start with numbers. Fixed that. Found a table bug thanks to the XHTML validator .

But there are still some sticky wickets and pages of non-compliance data. All of these are in the articles themselves, which were created by the editor (design) mode of the web browser - in this case Firefox. So Firefox edit mode isn't even close to XHTML compliance. It's actually some of the ugliest HTML I've ever seen.  But wait - it gets worse. If you edit a page which is XHTML compliant, Firefox will gratuitously butcher it into non-compliance for you.

Which makes it particularly ironic that I wrote this weblog application primarily so I wouldn't have to type HTML in my diary any more. But if I want it to be standards compliant, I've got to dump the web editor and go back to typing (X)HTML.

For now, I'm only going to make the application itself XHTML compliant. Someday they'll fix the browser. No sense banging my head over and wasting hundreds of hours fixing somebody else's bug. 
Comments:

Keith Devens
November 25, 2005 04:46
Keith Devens
I use my markup library so that I can write my posts in StructuredText and the code generates XHTML out of it. The code's really messy, so you might want to consider something like PHP Markdown instead. Either way, it's better than typing XHTML manually.

mike (Mike Macgirvin)
November 25, 2005 09:33
[*TOP MEMBER*] mike
Thanks - I had already looked at your markup lib. It's more an issue of when the browsers are going to catch up - they're the forces behind XHTML, so when will they actually produce compliant markup on their own? Oh well, I found two problematic contructs. <br> with no closing slash, and the same with <img ...>

The img tag is the glaring example because Firefox will strip the trailing slash off compliant tags and leave them naked. It's one thing to generate an old style BR tag. It's quite another for an XHTML aware browser to rewrite a new IMG tag as an old one.

As it turns out, I managed to whip up a couple of regex's to fix both of these. That will get me by until the next fiasco. I just dislike using regex's to fix browser bugs.


Comments? | More Actions Open/Close menu
Nov 24, 2005
A bartender in Oslo is jailed for serving a customer 19 shots
A bartender in Oslo is jailed for serving a customer 19 shots of tequila in under 90 minutes - a lethal dose of alcohol which killed the customer.

The sentence wasn't for murder or manslaughter however. The crime was serving liquor to an intoxicated person. It's hard to imagine even this being a crime in Oslo. Doing shots isn't a recreational activity here, it's a way of life.

Upon further investigation, it is reported that the bartender probably wouldn't have been charged at all except that he was in a drinking contest with the victim ...and kept filling his own glass with water.

No sympathy here. Throw away the key.

Comments? | More Actions Open/Close menu
Nov 24, 2005
An Israeli  citizen prompted a gun battle when his hang
An Israeli  citizen prompted a gun battle when his hang glider crashed on the wrong side of the Lebanese border. What kind of lunatic would be flying a hang glider within a hundred miles of the Lebanese border during a period of heightened tensions? I have a feeling we haven't been told the entire story.
Comments? | More Actions Open/Close menu
Nov 23, 2005
I've checked out a bunch of the major uber-blogs.
I've checked out a bunch of the major uber-blogs. Sticky apps designed to create social networks. Probably half of all US teenagers are on one of the things. It's mighty lonely being an old geezer in one of these places. You never get invited to anything of significance save perhaps an an occasional FBI sting. Why is an old geezer checking out sites where teens hang out? But I don't really care who's on the things, I'm just checking out the software.

I also figured out what was missing.

These sites appeal to youth because they're all designed around creating lists of 'friends' who all read and comment on their other friends. Us adults don't usually blog to socialize. How to turn a weblog into an indispensable tool? I know. Anybody want to start a software company?

Comments? | More Actions Open/Close menu
Nov 23, 2005
Your position has been eliminated
What do you mean my position has been eliminated to cut costs? I'm the only one working here fercrysakes. I'm the boss. It's the only position there is. I'm paying out of my pocket so I can work here. How are you gonna' cut costs if your only paying employee stops paying to work here? No, really - you can't fire me - because I quit...

And so it goes...   

Comments? | More Actions Open/Close menu
Nov 22, 2005
Ariel Sharon quits Likud, starts a new political party, and
Ariel Sharon quits Likud, starts a new political party, and asks parliament (the Knesset) to dissolve itself. In some countries, this would be considered a coup d'etat. In Israel, it's just another day.   
Comments? | More Actions Open/Close menu
Nov 22, 2005
Cash is still king.
The big Jeep has been sitting in front of the house pretty much un-used for the last year or two. Still I was surprised to see a guy at the door asking if I'd like to sell it. Cash. I mentioned that it has an electrical problem, but it runs. That's OK. As is. That would save me from having to donate it to Svetlana. Hmmm. OK.
Comments? | More Actions Open/Close menu
Nov 19, 2005
THE IAEA (International Atomic Energy Agency) reports that Iran
THE IAEA (International Atomic Energy Agency) reports that Iran just might know how to make an atomic bomb. They apparently learned how to do it from a bomb maker in Pakistan. The only surprise is that they didn't just get it off the web like everybody else. Unfortunately it isn't rocket science. How do they (try to) prevent the spread of nuclear weapons technology? They regulate three things. 1. Uranium and 2. Really fast centrifuges, and 3. Collimators.

centrifuge.jpg

Here's a centrifuge. Here's what you do with it:

gascentrifuge.jpg

Next we look for an ignition source. From the diagram:

nucfission.jpg

It looks like we need neutrons. In fact what we need is a neutron gun. Here's one -

neutrongun.jpg

Attached to the neutron gun is the collimator. Think of it as a focusing lens for neutrons. It looks like this:

collimator.jpg

Your finished bomb:

bomb.jpg

Comments? | More Actions Open/Close menu
Nov 19, 2005
Fidel Castro makes a public appearance and looks surprisingly
Fidel Castro makes a public appearance and looks surprisingly healthy and speaks with surpring lucidity for somebody the CIA claims is in advanced stages of Parkinson's disease. Perhaps it is the CIA which is suffering from a serious degradation of mental faculties.
Comments? | More Actions Open/Close menu
Nov 18, 2005
I'm sure you've heard that the price of gold is very much
I'm sure you've heard that the price of gold is very much related to world stability. When everything looks particularly bleak, paranoid investors buy precious metals. Normally, this is just trivial knowledge of purely academic value. The price of gold hit an 18-year high today. 18 years ago the price of gold skyrocketed because we had a rather significant economic event  now known as 'Black Monday'. 
Comments? | More Actions Open/Close menu
Nov 17, 2005
David Ludwig (the teen arrested for killing his girlfriend's
David Ludwig (the teen arrested for killing his girlfriend's parents) and his girlfriend Kara Borden both have websites, we are told. Of course the news media doesn't say exactly where. Once again I've taken control of the situation and found them for you.

David Ludwig's:
http://www.xanga.com/Haydren
http://www.myspace.com/haydren
http://www.picturetrail.com/haydren

Kara Borden's:
http://www.xanga.com/karebear000
http://www.myspace.com/meantxtoxlive

Looks to me like Kara's have been shut down. Here's the photo that show's up in a web cache for the myspace site from yesterday...

karabeth.jpg

The cache from the xanga site apparently had a bunch of her pictures on it - but you can't see any because her photo space providor has replaced them with a 'Photobucket.com Bandwidth Exceeded' image (due to the recent popularity, no doubt).  I snagged a copy of the text (attached below), but it doesn't really have much context without the photos and also ripped out of the online community to  which it was once attached. Something that showed up in the pages of some of their online friends is the emoticon <3 - which I have never encountered before. Again, I've saved y'all some trouble. After a long and intensive search, I finally found it listed on wikipedia (should've looked there first)... it's a sideways heart. I thought it might have been a different organ, since it only showed up in posts by females. As it turns out, that one is 8==D ...
Comments? | More Actions Open/Close menu
Nov 16, 2005
This day in history...
Intel released the 4004 microprocessor on this date in 1971.
Comments? | More Actions Open/Close menu
Nov 16, 2005
76 Paper Clips
I was just reading the side of the box of paper clips. Multi-Lingual packaging. Spanish name is 'Trombones'. Why yes, I suppose they do look like little trombones.
Comments? | More Actions Open/Close menu
Nov 16, 2005
For my next piece, I'd like to do a little Ted Nugent number
bloomberg.jpg

For my next piece, I'd like to do a little Ted Nugent number called "Wang! Dang! Sweet Poon-TANG!". A one, a two, a three...

Comments? | More Actions Open/Close menu
Nov 15, 2005
Gamma waves
Tropical depression γ  (gamma) is forming in the Carib. First I wondered what happened when they ran out of letters. That's been answered. Now I start to wonder what and if the naming scheme gets to ω (omega) . No, let's not even worry about that. Let's worry about  Hurricane π (pi).
Comments? | More Actions Open/Close menu
Nov 15, 2005
More stupid tricks
One of the benefits of writing your own weblog software is you can do things like this.
Comments? | More Actions Open/Close menu
Nov 13, 2005
Today in history...
35 years ago the Oregon Department of Transportation attempted to dispose of a rotting whale carcass by vaporizing it with a half ton of dynamite. The attempt failed - which left a rather large mess to clean up.

whaleexplodes.jpg
Comments? | More Actions Open/Close menu
Nov 12, 2005
Al-Zarqawi pulled a little boo-boo I think.
Al-Zarqawi pulled a little boo-boo I think. Blowing up people in Amman? You shouldn't mess with the Jordanians. Nope. Also dead were some prominent Palestinians. You really don't want to mess with the Palestinians. And three 'Chinese delegates of the Peoples Liberation Army'. Chinese military. Hope it's merely a cosmic coincidence that they were in the same hotel as the Palestinian 'security personnel'. You really, really don't want to mess with the Chinese...

Believe it was on CNN - an interview with a potential suicide bomber. What I found of interest wasn't that he looked just like any other teenage kid, but that he really, truly believes that his destiny includes the infamous seventy-five virgins. Due to the media that have defined his world, saving oneself for a date with the seventy-five virgins is the crowning achievement of life.

So it seems that the fundamental difference between radical Islam and other religious extremisms is that they are taught to believe in sex after death. Lots of it. Suppose this is to provide a modicum of hope in a culture of arranged weddings with the daughter of the richest person your dad knows personally. What does Christianity say about sex after death? Don't recall that the topic ever came up. Hate to say it, but their heaven looks better than ours...

And this afterlife orgy still takes place if your body is like totally vaporized. In fact, you get more sex if you're vaporized than if you aren't. They've totally got this marketing thing down... Psssstt... kid - yeah you. Feelin' a bit randy? Of course you are... Wife not putting out for you? I see... She's what - 17-18 years old? Wanna' get laid? Tonight? Here, strap on this vest. Don't worry, I'll take care of your widow - I mean wife.

That's the other interesting thing about this social system. You can get killed for casting a wayward glance at another man's wife. But widows (having fulfilled the 'death do us part' clause) are fair game. Having sex with the widow of a martyr is encouraged - as some of her blessed-ness is presumed to rub off. All of this is a very long winded explanation of the dynamics that we are up against fighting these so-called terrorists. We are up against a culture where there are only two sanctioned methods of gratifying wanton lust. 1.) die for Allah, or 2.) recruit people to die for Allah.

Comments? | More Actions Open/Close menu
Nov 12, 2005
"While it's perfectly legitimate to criticize my decision or

"While it's perfectly legitimate to criticize my decision or the conduct of the war, it is deeply irresponsible to rewrite the history of how that war began," the president said.


OK - I'll bite. I'd like to criticize your decision and the conduct of the war, Mr. president. ...We still remember the history of how that war began.

Comments? | More Actions Open/Close menu
Nov 11, 2005
Q: What sells?
Q: What sells?

sexsells.jpg

Comments:

Joe (Derek Joe Tennant)
November 11, 2005 15:30
Joe
Thanks for the birthday card!

mike (Mike Macgirvin)
November 11, 2005 20:29
[*TOP MEMBER*] mike
De nada...

Comments? | More Actions Open/Close menu
Nov 11, 2005
Don't get used to having titles...
Just because the software allows titles doesn't mean I have to use them. Never cared for 'em myself. It's just another piece of data of questionable value that has to be thought up and then stored somewhere.
Comments? | More Actions Open/Close menu
Nov 10, 2005
Multiple Entries
See what I mean? The reason for this is precisely because there are now categories. If one rants about ten different things in the course of a day, it isn't right to put it all into either one category or ten categories. They are ten different things - and each should have the option of being filed separately.
Comments? | More Actions Open/Close menu
Nov 10, 2005
Burning the candle from both ends
Lot of work the last couple of days... Software - the job that's never done. I've been catching up with the competition. Categories for the last few days. Today titles and multiple entries.   
Comments? | More Actions Open/Close menu
Nov 09, 2005
Two women were arrested in Sacramento for participating in a
Two women were arrested in Sacramento for participating in a rally called 'Breasts Not Bombs'. Hint: They weren't making bombs. I haven't heard of any arrests for public toplessness since uhm, what - about 1969?

 

In about 1972 I was sitting in People's Park in Bezerkeley and this flatbed truck rolls in. Jerry Garcia and David Grisman played some country tunes while a group of about 200-300 people showed up and danced to the music. Then they all took off their clothes and followed the truck down the street to City Hall where they demanded the right to public nudity. This was Bezerkeley after all. Nobody got arrested. The police just watched, as did I. Naked college girls after all...

 


Comments? | More Actions Open/Close menu
Nov 08, 2005
So you might notice that there's a 'Categories' heading over on
So you might notice that there's a 'Categories' heading over on the sidebar. I'm still testing but it looks like I've got categories now. I'll file this under 'software'. Note that you won't see much other category contents until I start going through history and assigning message categories on past messages.
Comments? | More Actions Open/Close menu
Nov 07, 2005
Started thinking about this database issue again.
Started thinking about this database issue again. It's all about article categories. Know somethin'? I could have article categories tomorrow if I set my mind to it. And nobody cares how the data is stored (as long as I don't give anybody a reason to care how the data is stored). They only care whether or not the thing works. So I've been working on a prototype - and it doesn't use a database. Don't know if I'll actually have it tomorrow because this isn't the only thing that I have on the agenda for today...
Comments? | More Actions Open/Close menu
Nov 06, 2005
Over in Iraq, they found five hundred and fifty people crazy
Over in Iraq, they found five hundred and fifty people crazy enough to wear a uniform and set them against the insurgent enclave du jour alongside 3000 of our best shooters. 'Dozens of insurgents killed'. It was just a photo op. An entire battalion of Iraqi forces for one Kodak moment - priceless.

Something now common in weblogs is the complete disdain for the personal possessive pronoun. As in the sister came to visit. She arrived last night. Her and the daughter  and the other half are out to visit some horses. Notice I did not say 'the horses' as that would have implied a possessive pronoun. Thankfully the horses belong to somebody else.

Trying to decide whether or not I should finally break down and use a database to store these weblog messages. It's convenient having them in files. Uh oh. Feature creep. I could switch to a database in a couple of days (with a few more to test it all). Once you throw in a DB, it opens up the ability to add even more features. But maybe it's not worth the effort. I did this with an email program many years ago. One person writing a few lines of code every few days can't compete with armies of programmers writing 10-50k lines a day. But maybe that's not the point. I'm not trying to compete. I'm just doing some cool stuff in my spare time. That's why I'll probably migrate to a database sooner or later. I can do more cool stuff...

OK, I cave. It's actually to support one cool thing. Seems like everybody with weblogs likes to have article categories. It's possible to support them without using a database, but the database makes it so much easier. You have two different sources of data (messages and topics) which are both peripherally related to each other and both need to be kept in sync. Performing this operation via the filesystem would be clumsy.

Comments? | More Actions Open/Close menu
Nov 05, 2005
Her royal highness the Duchess of Cornwall was out pitching
Her royal highness the Duchess of Cornwall was out pitching osteoporosis. Her husband the prince was there to accept an award based on his contribution to architectural understanding. It's all so terribly uhm, what's the word.... British - don't you think? 

Oh, about his contribution to architectural understanding? He had the audacity to point out that some of the most expensive modern buildings throughout the world are in fact quite ugly. And he's getting an award for this....
Comments? | More Actions Open/Close menu
Nov 04, 2005
The web is about to explode again.
The web is about to explode again. There is some serious development going on with SOAP and the derivative XML-RPC. Remote web-based algorithms as well as data sources. They've tried this kind of thing before with various distributed computing infrastructures and web objects schemes. These have always been prohibitively difficult to use.  This is only the latest incarnation - but this time it's ridiculously simple, and it's being built into everything. XML is how we get our data fed to us these days - whether you're aware of it or not. It's the language of information feeds of all types between organizations and data centers. It uses the same web servers that show you pages like this, except it is used more for delivering data rather than displaying it. Any kind of data. It's how your local sales droid knows how many items of type 'x' he has in the Virginia warehouse.  The RPC part is 'Remote Procedure Call'. It carries with it the ability to do pretty much anything with a chunk of pretty much any kind of data and give you back some form of result. That's how Yahoo gets stock quotes and news. It allows for remotely accessed intellectual property, and works exactly the same on any computing platform. 

That's the interesting part. It's even more portable than Java. If you can do something cool with a chunk of data, or generate a chunk of data, you can provide access to it (by selling it or giving it away - as the case may be). And you never have to divulge how you did it. The customer's software is always the latest version because the customer doesn't have the software. You do.


Today I was looking at the weblog competition. The number one open source weblog publishing system. I was frankly amazed at how primitive it is. It has a bit more flexibility just because it uses a database for storage, but in terms of features out-of-the-box, it's practically a draw. It has categories and registration. I have HTML editing and uploads. I think my package actually looks better, but that's personal opinion. In any event it doesn't look significantly worse. They've got 40,000 downloads, I've got 30. No, not 30,000. 30. Oh well. See what happens when you're number one?
Comments? | More Actions Open/Close menu
Nov 03, 2005
A group of scientists believes they have discovered light from
A group of scientists believes they have discovered light from the earliest days of the universe. To find it, they measured all the light coming from a region of space and substracted all the light sources that they know about. The remainder must therefore be light sources which once existed, but don't anymore. At least that's their theory. I'm skeptical. At no point does their formula seem to account for light sources which may exist but that they just don't know about - or even more importantly; light sources which may have varied over the course of visible time.

Seems to me a more accurate number could be obtained by subtracting out any light source which propagates through less than thirteen dimensions. The remainder therefore must come from a light source which preceeded the unification of physics into a space/time continuum.

Had you going there for a minute, didn't I? Relax - everybody knows there are only 11 dimensions...



Seems that the US is holding secret prisoners in secret prison facilities around the globe. This is a very poorly kept secret. You can find it posted here in these pages if you want to look for it.

--
Human Rights Watch has published the names of towns in Europe where prisoners have been held and the identification numbers of aircraft used to transport them -- a tactic that angers many intelligence professionals.

"The exposure of such, either firms or aircraft, just undoes years of cover building and makes America weaker," said Michael Scheuer, a former CIA officer who once led the agency's hunt for al Qaeda founder Osama bin Laden.
--

'Scuse me? We're torturing people in detention facilities scattered across the planet. The leaks have been increasing for years now. Perhaps somebody didn't do a very good job of cover building... (?) America is being made weaker by the mere fact that we're doing all this crap, not because somebody is talking about it.

Comments? | More Actions Open/Close menu
Nov 02, 2005
Joe's notes from the hurricane zone - Trash in Biloxi
Joe's notes from the hurricane zone -

Trash in Biloxi

You don't notice until you need one, but all the trash cans are gone. I don't even see them in the debris piles. I suppose they float, and must have ended up further inland than I've gone. I haven't seen regular trash pickups other than dumpster dumping, and it took this long to figure it out....there's no cans left to dump at the homes around here. One more occupation that's left folks unemployed.

Monday is when you see the biggest changes. Over the weekend, hundreds of volunteers come down here to help gut homes, pile yards-worth of debris on the sidewalk and remove the horizontal part of the snapped trees. Without a stump grinder or back hoe, the 6 or 8 foot trunk remains, a testament to what has already gone to the burn site. There's a column of smoke non-stop from a few miles north of town, where the vegetation is being put to fire rather than landfill. The other side of the weekend is the vulture tourist. I have always felt queasy about snapping photos of other folks' misery, and come home with few, if any, pictures. I've already emailed a few back home, but have taken less than two dozen in my two months here. But on Sundays, it's dangerous to drive with all the folks stopped along the road to create that Kodak memory. They jump out of the car without hardly a glance at who might be coming, as if the tableau was going to run off into the distance before their auto-focus can react. Hey, it's been here two months, it's not going to disappear in the next 5 seconds, all right?

It's Halloween, and I wouldn't want my kids wandering these neighborhoods either. But I've been intrigued by the solution, it's called 'Trunk or Treat'. That's right, come to the parking lot and decorate your car trunk or pickup bed. And be sure to bring that bowl of candy for the little ones who will make the parking lot circuit a few times before going back home. And of course, there's a prize for the best decorated trunk. But there's no street lights to speak of, and most of the neighbors arent' here anymore, so this is an idea whose time has come.

Florida is already past 'Response' and into 'Recovery', another word for 'repair'. Wilma was only Cat 3, so they'll clean up, fix a few roofs and carry on. I think in one more week, after the power is all back on, Florida will already be ahead of the Gulf Coast on the road to normal. You here about Florida's recovery efforts, but in Mississippi the proper term is rebuilding. And here's why: You've seen pictures of the aftermath of tornados, I'm sure. Lots of concrete slabs and kindling that used to be homes and barns. Picture a tornado that sets down on the Alameda in San Jose where it turns into the El Camino Real, and then follows ECR all the way to it's end in South San Francisco. Now picture that same tornadic destruction, for 6 blocks on either side of ECR. And for another 12 blocks on each side, destroy one in three buildings. And for another 20 blocks, take the roof off every fifth house. That's the Gulf Coast in Mississippi. That's rebuilding, not recovery. And that doesn't mention Florida, Alabama, Louisiana or Texas, some worse some not.

This morning on the way to work, seven tractor trailer rigs were turning into the military checkpoint where I was trying to leave to go to work. Following the National Guardsman's instructions, I waited for all to pull through. My gaze fell on a man, a thin man, not more than 5' 6" or so. He stood next to the waist-high chain link fence at the only section that still stands straight up. The nature of the yard on the other side is unclear, so much kindling you can't tell if it's grass or driveway or garden. Someone's roof gable caps it all like a crown. The house he's staring at has a roof, a front wall and most of the rear wall. Unbelieveably, the roof is still upright in spite of the fact the front wall is on the sidewalk and there are neither side nor interior walls left. He stares into the home. Just as I get the ok to drive on. he colllapses to his knees and sobs.

Comments? | More Actions Open/Close menu
Nov 01, 2005
Happy Halloween. And Happy Birthday Amanda.
Happy Halloween.

And Happy Birthday Amanda.

Comments? | More Actions Open/Close menu
LBJ, LBJ, how many JOKES did you tell today??!