Out, Damn’d Quote!

The Shakespearean Flaw in PHP Prompts
WordPress’ White Screen of Death

Thus conscience does make cowards of us all,
And thus the native hue of resolution
Is sicklied o’er with the pale cast of thought,
And enterprises of great pitch and moment
With this regard their currents turn awry,
And lose the name of action

— William Shakespeare, Hamlet, Act III Sc.1

Alas poor Yorick! He couldn't code worth a fiddler's damn, Horatio.Okay, maybe the potential fragility of computer language code, specifically PHP as utilized by WordPress, doesn’t quite compare with Hamlet’s dawdling and proto-angst or Macbeth’s murderous ambition – their fatal, tragic flaws, if you are a Shakespeare buff, or at least were paying attention in high school English. Indeed, exaggeration of Swiftian proportions, this. But this fragility can bring on the dreaded WordPress White Screen of Death quite easily when one begins modifying code (code that works just fine as it is) to customize it to one’s own wants and needs.

In fact, one misplaced apostrophe – or, rather, one misinterpreted single quote — can break an entire installation of WordPress, prompting the aforementioned White Screen of Death. Think of the thousands of lines of code involved in a Website, WordPress or otherwise, and then think about that. Here is this magnificent digital tower: a fortress of light standing staunchly at the crossroads of Gibson’s cyberspace, destroyed (albeit temporarily) by one tiny, misplaced, digital brick.

It’s not just tragic – okay, not really – but also ironic in that one of the great things about WordPress is that it’s open source, has lots of really knowledgeable coders working on it, and as such is really stable. Someone who doesn’t know jack squat about computers and the series of interconnected tubes can get WordPress up and running with relative ease and speed, joining their voice to the cacophony of the blogosphere. It’s actually quite hard to break WordPress, in point of fact. It’s like my old Subaru: until you go tinkering under the hood fixing stuff that isn’t broken, it works flawlessly.

Case in point: I was recently working on a site that will use WordPress and the Thirty Ten theme, which is a three-column version of WordPress’ own Twenty Ten theme, the default theme that comes with WordPress. I wanted something as simple and clean as Twenty Ten for this particular site, but, I wanted three columns. Rather than reinvent the three-columned wheel, I looked to Aaron Jorbin’s Thirty Ten theme.

This is exactly what I wanted: a child theme of Twenty Ten that adds a third column. Yay for Aaron Jorbin! I only needed to change the link colors and add custom text to the footer.

I wasn’t quite thinking when I attended to the latter; after all, what could go wrong, just replacing text? You can see the tragic Shakespearian downfall coming, yeah? PHP uses single quotes around text that will appear in your browser. For example, if we look at the footer.php file in Twenty Ten, there is this line:

<?php printf( __( ‘Proudly powered by %s.’, ‘twentyten’ ), ‘WordPress’ ); ?>

Lady Macbeth looks for the problem in her PHP code. That line produces the “Proudly powered by WordPress.” line at the bottom of every page in the default Twenty Ten theme. Thirty Ten modifies this, along with some of the other default text that appears elsewhere in the Twenty Ten theme, with a file called text-wrangler.php – the beauty of a child theme is that it doesn’t modify the underlying parent theme files. Among my customized footer text were the word’s “Gecko’s Bark” – no, really. Now, an experienced Web coder would know that single quote, doubling as a possessive apostrophe in this instance, would have to represented by the proper code for its symbol, lest a browser interpret it as part of the actual PHP code. Specifically, I needed Gecko&#39;s Bark.

But I’m still a n00b, really – well not really a n00b, after all, I realized where my problem lay within minutes. But I obviously lack the expertise and instincts that someone that has coded all his her life, for a living. Ironically, if I hadn’t been a journalist all my life, being grammatically correct wouldn’t be instinctive and I probably wouldn’t have sweated the possessive. So there you go; my own tragically Shakespearean flaw in miniature.

Anyway, that little coding boo-boo was enough to completely break WordPress. I went to look at how the footer appeared with the changes, and … nothing. Zilch. Nada. It was a sea of white space in the browser. I tried to go to the WordPress admin page, but saw only more white space.

Yep. One little single quote caused a cascade effect that broke WordPress completely. Usually something like this will only cause certain pages not to load, or the site and/or the admin pages to look wonky. Or you get some sort of PHP-related error. But not this time; I tried different browsers and there was nothing but white space or the “can’t get there from here” error that Internet Explorer throws up. That little misplaced single quote caused my browser to subsequently misinterpret all of the rest of the underlying code that otherwise works fine.

Fortunately this wasn’t a live site (the beauty of having a local WordPress installation). I looked at the MySQL database and restarted Apache – typically the rare WordPress White Screen of Death involves issues with one these things – but neither one of these were the problem. I would have been surprised if either had; the site was working moments before I went to tinker with the footer text, now it was busted – doesn’t take Sherlock Holmes to logically deduce that I must have broke things messing around with that footer text. Sure enough, a perusal of text-wrangler.php revealed the problem.

The damn'd spot, er, apostrophe cum single quote in question. D’oh! Out, damn’ed quote!

This is where it’s nice to have a text editor that can represent different parts of code with different colors; in this case the telltale devil was in the pink text, or lack thereof. When looking at PHP code in Gedit, the text editor in versions of Linux that use the Gnome GUI, such as Ubuntu, it portrays text in between quotes — the text that will appear in your browser — in bright-pink-not-quite-fuchsia. A quick glance revealed my errant apostrophe and the subsequent line of text that should have been pink, but wasn’t.

No, not the stuff of Shakespearean tragedy. Not even comedy. But hopefully this will server as a warning and lesson to others who set out to customize WordPress. Be careful tinkering under the hood, lest your hubris cause your tragic downfall – or that of your Website.

To-morrow, and to-morrow, and to-morrow,
Creeps in this petty code from screen to screen
To the last syllable of re-coded line;
And all our yesterdays have lighted fools
The way to white screen death. Out, out, brief mon’tor!
Website’s but a walking shadow

– Jeff Chappell (with apologies to the Bard. To see the inspiration/original, consult Macbeth, Act V, Sc. V).

If you’d like more Shakespearean parody, please go here.

Alas! Poor Margin! I Knew Him, Horatio

Inventory correction or cyclical downturn? That is indeed, the question.

Alas, it's not "I knew him well," you morons! It's "I knew him, Horatio."Those of you who familiar with me know I have a some-time affinity for borrowing from the Bard — that’s William Shakespeare, for all you techie left-brained types — for this editorial space. So I can’t help but suggest that the chip industry is headed for the winter of its discontent.

Of course, it really depends on whom you ask. Wall Street seems to be divided on the issue as to whether current market conditions are a correction or a downturn, even as many companies and executives swear to the former. And regardless of which it turns out to be, it appears as if the equipment and materials suppliers are once again going to prove fortune’s fools.

Of course as an observer of the chip industry, it’s easy to point out that this is hardly a new situation or business climate. It engenders all of a writer’s favorite cliché’s: the more things change, yada yada yada; those who don’t learn from history, blab blah blah, etc., etc. So I’ll skip the pontificating rhetoric and do my humble best to cut to the chase.

I think it’s too early to call it for sure, but before you accuse of me wimping out, there is evidence that this is indeed an inventory correction. But it may prove to be a painful one for some.

Aside from all the wishful thinking and public statements meant to appease investors and boards of directors, there is some heartening evidence. Graphics chipmaker ATI Technologies, for one, surprised Wall Street, and probably just about everyone else, with its strong quarter, in the midst of what has become a daily stream of downward guidance and preannouncements for calendar Q3, and, shall we say, reluctant, guidance for Q4.

Part of ATI’s good fortunes could be attributable to market share gains, but certainly not all it. So all those graphics chips must be going somewhere. The same could be said of Advanced Micro Devices. It managed to put in a solid quarter as well despite a drop in its flash business; the jump came from growth in processor sales across all of its markets.

Alas, Electronic News, we hardly knew ye: RIP.Now one could argue that market conditions just haven’t caught up with the likes of ATI and AMD. That might be true. Or maybe its just companies that begin with the letter A.

In any event, regardless of whether this is a downturn or a correction, you know there are a lot of chips floating in the channel when your flash business goes down.

But beyond the chip industry, the electronics industry doesn’t seem to be taking the hit that the chip industry has this past quarter. Orders and shipments of printed circuit boards remained in a healthy state as we headed into the final month of calendar Q3. The numbers for North American suppliers would seem to reflect a normal seasonal slowdown, but nothing like what seems to be happening farther up the food chain in the semiconductor biosphere.

This would indeed suggest that what’s happening now is an inventory correction, and the view that the upturn still has legs may indeed be right. A dash of market milk of magnesia and the order digestion will be over.

How Poor Are They That Have Not Patience!

But even if this inventory correction scenario is true, it would seem that Banquo’s ghost will still haunt the equipment and materials suppliers’ party for some quarters to come. As market researchers VLSI Research and Gartner Inc. have been pointing out for sometime now, the industry has once again ramped up a lot of capacity over the past 18 months. A LOT. So much so that VLSI warned months ago that the industry may be overheating.

In fact, Gartner just updated its forecast for equipment spending, noting that 2004 is one of the best years on record, even slightly surpassing the high end of its guidance back in July at Semicon West. But what goes up must come down; while capital equipment spending is on pace to grow 66 percent this year, the market researcher expects equipment spending to decline by 0.6 percent next year, followed by a 16.1 percent decline in 2006.

As Gartner semi equipment analyst Dean Freeman suggested to me, there seem to be two possible scenarios. On one hand, we will have zero growth through 2005 as the industry ramped capacity quickly and now can add it only as needed to meet demand. But the industry will likely move into overcapacity by the end of 2005, simply because it is just plain difficult to manage demand cycles, Freeman observed. History certainly bears that out.

It is also possible that some chipmakers booked early in order to insure order slots and now are pushing them out until they need them, Freeman added. Golly gee whiz, imagine that. That surely has never happened before, huh?

On the other hand, growth could be slowing as a result of slackening demand in the wake of macroeconomic forces, Freeman said. The market has been able to respond quickly and therefore, equipment order push outs. Demand will return as consumer confidence improves after the election and oil prices drop from $50 a barrel to a more reasonable $40 to $45 per barrel, thus freeing up discretionary income. 2005 and 2006 are then slow, with stronger growth rebounding in 2007, he theorized.

Of course, if you’re as cynical as I am, you suspect oil prices will drop before the election, but that’s another topic altogether.

In any event, be it downturn, correction, whatever label you want to ascribe to it, equipment and materials suppliers are likely to have a tough time of it, at least for the next several quarters or so.

Chasseriau's interpretation of Shakespeare's witches in Macbeth.So if you make process or test equipment, or supply materials, I would suggest trying the following process recipe to conjure up the ghost of early 2000:

“Eye of newt, and toe of frog,
Wool of bat, and tongue of dog,
Adder’s fork, and blind-worm’s sting,
Lizard’s leg, and howlet’s wing,–
For a charm of powerful trouble,
Like a hell-broth boil and bubble.”

But I should warn you that this might prove a yield bomber; I don’t know how well a plasma-induced cleaning process removes newt eyes and such from the inside of a process chamber.

Editor’s Note: As explained at length elsewhere on this site, this is a news story written by me that originally appeared on the now-defunct Electronic News’ website, which is long gone. It’s former sister pub Electronic Design News (EDN) currently holds the copyright to all Electronic News copy (to the best of my knowledge). You can still see a copy of this story at EDN.

But Soft! What Nasdaq Through Yonder Chasm Drops?

William Shakespeare had a thing about the fickle nature of things. Everything was fickle: women, pride, time, love — even whole countries. But nothing was as fickle as fortune in Elizabethan times. In King Henry V, Shakespeare tells us all about “Fortune’s furious fickle wheel.” In Romeo and Juliet, the Bard’s young heroine reminds us that “O fortune, fortune! All men call thee fickle.”

Alas, Electronic News (the print edition): we hardly knew ye!One wonders what the Bard would think about the modern-day stock exchange. Here, even good news can spawn a Nasdaq nosedive. I refer of course to Semiconductor Equipment and Materials International and the trade group’s release of equipment book-to-bill figures for April. It was another record month, but the ratio of bookings to orders wasn’t quite as high as last month’s ratio, which paved the way for the Nasdaq to plummet to a record low. Fickle fortune(s), indeed.

What would Shakespeare make of the rise and fall of Silicon Valley’s sometimes nebulous empires, and the ebb and flow of more wealth in a day’s time than one could accrue in an entire lifetime in the 16th and 17th centuries?

Would he be perhaps inspired by the fickle nature of the stock market?

I like to think so.

Thus, without further ado, The Royal Shakespeare Electronic News Company gives you:

Much Ado About Money

This is not an original Shakespeare play. Dramatis Personae: CEOnicus, King of Siliconia; Adminio, assistant to the King; Shareholdio; Day Traydbalt; Analysto

ACT I. Scene 1. The King’s corner office.

CEOnicus: Adminio! Take thee note of my words.

Adminio: Yes, m’lord?

CEOnicus: To my citizens tell: Trade reporters, investors, employees, lend me your ears. Orders are up! Throughout all there is a most glorious backlog! Three shifts slave through night and day, sun and moon to ship our fair products! Now do not tarry, Adminio: To the Web you must post! Let the e-mail go forth!

Adminio: Yes, m’lord.

CEOnicus: Oh, brave new world that has such circuits in it!

ACT II. Prologue.

Analysto: Ah, orders are up, and backlog there is still in the Valley of Siliconia.

The Land of the Dragon beyond the rising Sun makes overtures, The East seeks more chips from the West!

`Tis true, said orders are not up as much as last month, But beware the ides of fiscal year! It is foretold, and we are prepared.The second-quarter doldrums we must not rue, for Siliconia is in the midst of an upswing!

Scene 1. Day Traydbalt’s cubicle

Traydbalt: Mon dieu! Margin, margin, wherefore art thou, oh margin! I am ruined! I spy thine shrinking book-to-bill! Curse fortune’s fickle fate, that I did not sell yesterday! Sell, Sell! Oh fie on you, little mouse! Thou canst not click fast enough!

Scene II. The King’s corner office. He is studying his PC.

CEOnicus: Oh a pox on this fickle market! Our stock plummets! O God! God! How weary, stale, flat, and unprofitable seem to me all the uses of this world!

Shareholdio: CEOnicus! A pox on thee, thou fobbing folly fallen eggshell! Why dost our stock droppeth?

CEOnicus: Alas, it is that vile Day Traydbalt! He shall taste the bite of my sword! Had all his hairs been lives, my revenge had stomach for them all!

ACT III. Scene 1. A corner Starbucks in Siliconia

CEOnicus: Aha! Thou ruttish fly-bitten puttock! Traydbalt, you shalt taste my steel wrath!

Traydbalt: Nay, CEOnicus, I beg you for my life! I am poor and near penniless now! For my gambles have paid me dearly! Woe is my fickle fate!

CEOnicus: Alas, I have not the strength to slay thee! Pity hath seized my heart. Men at some time are masters of their fates: The fault, dear Traydbalt, is not in our margins, but in ourselves, that we are underlings.

Analysto: To this screed must all subscribe: All’s well that ends well.

Editor’s Note: As explained at length elsewhere on this site, this is a news story written by me that originally appeared on the now-defunct Electronic News’ website, which is long gone. It’s former sister pub Electronic Design News (EDN) currently holds the copyright to all Electronic News copy (to the best of my knowledge). You can still see a copy of this story at EDN.