Using Your Header in UltraEdit

Since I began using UltraEdit as a programming text editor recently, I lost the ability to call the header() function in PHP. Every time I tried it in a script, the following error happened: "Cannot modify header information - headers already sent."

This error happens whenever a script produces output before header() is called. When obvious causes for this problem have been ruled out, you must look for anything that might output a blank line or other characters.

In my case, UltraEdit put three characters at the beginning of a UTF-8 file without displaying them in the editor, so I didn't spot them until I opened one of the errant scripts in vi.

These characters are a byte-order marker, as described in the UltraEdit support forum, and here's how to turn this feature off:

  1. Choose Advanced, Configuration. The General tab should be in the front.
  2. Scroll down to the Load/Save/Conversions section.
  3. Deselect the two Write UTF-8 checkboxes.

There's a possibility I've incurred the wrath of the Unicode gods by making this change, but at least my PHP scripts work.

Enjoy Some Steamed Rice

Anne Rice recently flipped out on Amazon.Com, writing an egomaniacal rant in response to customer reviews of Blood Canticle:

First off, let me say that this is addressed only to some of you, who have posted outrageously negative comments here, and not to all. You are interrogating this text from the wrong perspective. Indeed, you aren't even reading it. You are projecting your own limitations on it. And you are giving a whole new meaning to the words "wide readership." And you have strained my Dickensean principles to the max. I'm justifiably proud of being read by intellectual giants and waitresses in trailer parks, in fact, I love it, but who in the world are you?

Her personal assessment of the book: Five stars.

Get Your Browser War On

Writing for eWeek, columnist Jim Rapoza believes that Microsoft's XP-only security upgrade to Internet Explorer will send millions of users to other browsers, making the browser market competitive again:

For the first time in years, IE's market share has dropped slightly. But I predict that this trickle will soon become a full-fledged torrent.

In fact, I fully expect that, a year from now, IE's market share will be below 75 percent.

I've been using Firefox for a while, finding it vastly superior to Internet Explorer. The browser opens pages in new tabs rather than new windows, can bookmark all open pages with a single bookmark, and offers keyword shortcuts that can initiate searches on any site from the browser's address bar.

For example, I can type find Microsoft Bob to load a Google search results page for the text Microsoft Bob and info Sinclair Lewis to view pages related to the author on the InfoPlease reference site. A shortcut can be set up for any Web site where search terms appear in a page URL.

Don't Follow the Script

When his weblog moved in March, Michael Fioritto put JavaScript in the first item of his RSS feed to redirect visitors to his new site.

The news aggregator AmphetaDesk read the script tag and executed the redirect, making it impossible for me to use the software until I unsubscribed from his feed, which probably wasn't the effect he was going for.

An aggregator that doesn't strip out script and other dangerous tags is a security exploit waiting to happen.

Java 2 in 24 Hours Panned

Just read an old review by Pan Pantziarka shredding Sams Teach Yourself Java 2 in 24 Hours, my beginner's Java book last revised in 2002.

By the end of the book, assuming you haven't been stunned into a coma by the author's humor (yep, it's a US thang), you'll have a very superficial view of Java programming. What you won't have is the knowledge or the insight to produce anything useful.

Mommy.

This book, which has done well with new-to-Java novices, will occasionally receive a total ass-kicking at the hand of a professional coder like Pantziarka.

Without challenging his conclusion that my work sucks big rocks, I think that some coders misunderstand the target audience for a 24 Hours title.

My goal was to write a Java tutorial that could be tackled successfully by total beginners and people scared off the subject by the complexity of college courses and existing books. My imaginary target reader was a person who needed a moment to get his head around the concept of a multi-dimensional array.

You can't serve that audience without reducing to the language elements you believe are most crucial to understanding.

There are plenty of books that assume some level of comfort with basic programming concepts, but I didn't think that Java had a tutorial that could evoke an aspiring programmer's first "by George, I think I've got it!" experience.

Turning Off the Radio

Because I wrote the book on Radio UserLand, my decision to stop using the software on Workbench has raised a few eyebrows.

By tradition, the first thing a weblogger must do with new software is publish a vicious excoriation of the old software, warning others to keep away, like a courageous relief worker marking a land mine.

Textbook example: When Mark Pilgrim concluded that a Movable Type licensing change would have cost him $535, he declared the software a dead end, switched to WordPress, and donated $535 to its open source developers:

Movable Type 3.0 changes the rules, and prices me right out of the market. I do not have the freedom to run the program for any purpose; I only have the limited set of freedoms that Six Apart chooses to bestow upon me, and every new version seems to bestow fewer and fewer freedoms.

I migrated from Radio for more prosaic reasons. I need software that can handle the Drudge Retort, a server-hammering menace that in seven months has amassed 4,500 weblog entries and 110,000 visitor comments. Though Radio development has been hearteningly brought back to life by Steve Kirks and UserLand, it's a desktop tool that publishes Web content as static files. That's a poor fit for a psychotically active site with constant user contributions (or should that be a constantly active site with psychotic user contributions?).

I could have chosen a server-based program such as Movable Type, the subject of my next book, or Manila, the software I'm using to host 3,000 free weblogs on Buzzword.Com. But I work faster in PHP than I do in either Perl or UserTalk, the scripting languages required to extend those two programs, and I'm skeptical that either program can handle a million-comment-a-year onslaught.

The money I would have paid for Radio, $39.95 a year, will be spent on Guinness and hookers.

My normal loathing of thimble-deep New York Times columnist Maureen Dowd has been temporarily suspended. She agrees with me about how Kerry rattled President Bush in the first debate:

Senator Kerry evoked the voice of Bush 41 to get under 43's thin skin. The more Mr. Kerry played the square, proper, moderate, internationalist war hero, the more the president was reduced to childish scowling and fidgeting, acting like a naughty little boy who refuses to sit in his seat and eat his spinach and do all the hard things a parent wants you to do.