Recent Blog Posts
Blogs ยป Archive for January, 2006
Search Engine Marketing Magazine
How do you know an industry is maturing?
It gets its own trade magazine.
Such is the case with the Search Engine Marketing Industry, which this year is getting its very own “Search Engine Marketing Standard” magazine which will be published on a quarterly basis.
Right now, residents of the USA can get a free 1-year subscription through SearchMarketingStandard.com. International subscriptions are only $20 USD/year.
The first issue is being published in May. I’m looking forward to reading it.
Is this a Safari bug?
On my final editing pass of our upcoming book, The JavaScript Anthology, I’ve spotted what appears to be a previously unrecorded bug in Safari:
function preload(url) {
var img = new Image();
img.onload = function() {
alert(this); // What is this?
};
img.src = url;
}
preload(’chewbacca.jpg’);
In well-behaved browsers like Firefox, Internet Explorer 6 and Opera 8.5, the above script loads the image and then displays some variation of “[object HTMLImageElement]“, which indicates that this refers to the image object for which the load event has just fired.
In Safari 1.3 and 2.0, however, the alert displays “[object window]“, because this refers instead to the window object within which the script is running.
Naughty Safari! Google didn’t seem to know about this bug when I asked it. Anyone seen this behaviour reported before?
Until this bug gets fixed, you should use a closure to refer to an image object from within its onload the event handler. That is, refer to a variable in the handler function’s enclosing scope.
function preload(url) {
var img = new Image();
img.onload = function() {
alert(img);
};
img.src = url;
}
preload(’chewbacca.jpg’);
Why I Love Interstitials
Interstitials are a rich-media form of advertisement, that, in my opinion, is as close to TV commercials as web advertising has gotten.
Interstitials are not banners, they are not popups, they are full page ads that load between page views on your site. Most interstitials display for 10 seconds or so before forwarding the user onto the page they were trying to view, and almost all interstitials include a skip button if the user does not want to wait.
Some people I’m sure find these types of ads annoying, however I find them less annoying than popups, because they are at least contained in my original browser window. Also, I feel that much of the ire about popups came about as a result of multi-popups being used at once, or popups spawning additional popups when you try to close them. None of these things happen with interstitials.
Really though, the reason I love interstitials is that I see them as more or less the only ad format that can easily and reliably foil every ad blocker.
The concept of ad blocking is not without controversy, some people see it as their right, most publishers though see it as …
What’s your talent?
To be successful in anything, it sure helps to have three things:
1. Talent.
2. A demand for your talent by others.
3. Passion for expressing your talent.
I’ve figured out that my talent is in writing, helping people think clearly, starting up publishing ventures, and moving quickly to get results. It is fortunate that there is demand for this talent, and that I love using it to help others.
I keep marvelling at the show American Idol, where people think they have talent and clearly don’t. Sorry to say this, but some web designers are like these strange American Idol contestants. They may love web design, but they don’t have talent. Some can patch up a web site, but it’s nothing that looks particularly good or helps others get business results. They have a hobby, and that is fine. But they aren’t going to create a sustainable living.
But the successful web designers have one of at least three talents:
- Great design sense, such that clients measurably improve the image they convey to others.
- The ability to show clients how to make money (not an empty promise, or a focus on SEO only, but true knowledge of how to convert visitors to dollars).
- The ability …
Abundance from the home office
When I moved from Silicon Valley to Florida, I was concerned about whether there would be any kind of dynamic, technologically-savvy economy in the Sunshine State. For those who don’t know Florida, it is known for tourism (e.g. Disney World and beaches) and agriculture, not for knowledge-based industries.
I have found that if you are creative, everything you need is at your fingertips. There can be even more abundance in small ponds than in the big ones (like Silicon Valley). Here are examples:
1. I am now inaccessible to people. In Silicon Valley, there are tens of thousands of marketing consultants. Here in Florida, I’m quite unique. And now people from all over contact me as an expert, one outside the Silicon Valley “kool-aid drinking” community. They see me as objective, with fresh insights.
2. I’ve found some great assets in my own community and have worked with them to build some great websites on a joint venture basis: a professional boxer, a world champion kick boxer, a nutrition expert, a healthcare marketing expert, an investment banker, and more.
3. With the Internet, if there’s a missing resource in my area, it is easy to find someone who can help.
It doesn’t matter where you …
Blueprint PHP application?
Here’s a question… If someone comes to you and asks “How do I organise myself in PHP?”, what do you say? In particular, if they are an experienced programmer in other languages but still learning their way around PHP.
Forgetting frameworks for just a moment: in fact despite frameworks, PHP apps are still being written. The question I’m really asking is what application(s) would you point people at as an example for how to do PHP.
These days I find myself pointing people at Eventum, MySQL’s bug tracking application. There are things I personally have “issues” with in the way Eventum is written but those are really just my personal taste. What Eventum represents to me is a safe approach to building PHP applications – reasonably well organised and structured but still a working application, addressing real / common / complex use cases and demonstrably scalable. Also the toolset used to built Eventum and it’s corresponding learning curve is acceptable; other than PHP (and built-in APIs) it’s basically just Smarty, which is well documented.
Given that so many applications have been written in PHP, some extremely successful in terms of popularity, are there any applications you’d be happy to …
There’s Gold in Them Thar Forums
User niche just started an interesting thread here about forums, and more specifically why you should want to run a forum.
I happen to agree with just about everything he said. Forums are great to own. They do not bring in, in general, as much revenue as other types of content sites. The reason is that, as outlined in the thread, a forum is not always attractive to advertisers due to their high page views per unique. Advertisers in general will pay more to reach a large number of uniques rather than to reach a smaller number of uniques multiple times. Its just the way things are.
However, that issue aside, forums are the most stable type of content site you can own, with the most potential for longevity. The reason is that your forum is completely unique, no competitor can ever supplant you. Even if someone has a forum on the same topic it does not matter since it is the individual aspects of a community, ie the personalities of your members, that make a forum, and no one is ever going to get the exact same combination as you have. In fact the …
FireBug – The King of Firefox Validators
Being 2006 and all, you would think it should be difficult to get excited about markup validation extensions for Firefox. Nevertheless, I have to say Joe Hewitt’s new offering Firebug has to be the most impressive new developer extension I’ve seen for a while (ok,ok,.. since IETab).
The Auto Validator:

In its inactive mode Firebug’s auto-validator is completely invisible on valid pages, and displays a simple ‘error counter’ in your status bar on pages with errors. Definitely less is more. Clicking the counter folds out a feedback toolbar detailing each error.
Although the error description is certainly handy enough, the killer feature for me is the ability to click on an error location and have it instantly highlighted in the source — especially useful for subtle problems like a missing ‘;’ or an extra ‘,’ in CSS.
The best endorsement I can give for this tool is I’ve actually found myself fixing the little niggling validation problems simply because they’re just so effortless to identify now.
The Element Inspector:
Firebug’s Element Inspector is similar in many ways to Nicolas Moreau’s excellent ‘Inspect Element’ extension but slightly …
PHP Security: Dumb Users or Dumb APIs?
There’s another round of “Is PHP Secure?” debate happening right now. Chris drew attention to it, pointing to a post by Andrew van der Stock (who’s a contributor to OWASP): PHP Insecurity: Failure of Leadership.
So the usual denials have been made (see replies to Chris’s entry) – “Damn newbies”, “Holes in PHP-based app != PHP insecure”, etc., all of which I agree with. But…
Think it is safe to assume that pointy haired bosses are picking up signals containing the words “PHP” and “vulnerability”. At this point, perhaps you don’t care – your stronghold keeps the pointy haired people on the outside. But once you’ve run into this wall once, while bidding with / arguing for PHP (I’ve been in the latter situation), you start to wonder.
So let’s turn things around for a moment and try some fresh discussion.
What if Andrew does have a point? What if we’re living in denial? I think Andrew got “slayed” initially because his argumentation is too cautious not too scandalous. But later on (see his second comment to Chris’s post) think he finally nails it;
Struts and .NET both make the easiest to use output method XSS safe by default.
<bean:write …
J4P5: Javascript For PHP5
Need a distraction? Check out J4P5;
J4P5 is a JavaScript interpreter written in PHP 5, that allows to run untrusted scripts in a sandbox on your server. It aims to implement most of Ecma-262 3d edition.
I kid you not. In fact this looks like a pretty serious attempt. You’ll need to download and run yourself. There’s grammar rules for Javascript in there and a Javascript runtime written in PHP. It passes the “it works” test – the examples run straight out of $ unzip. Looking at what it does and the TODO list, aside from the Unicode issue strikes me J4P5 is already more than 50% of the way there.
Aside from novelty, one real world use might be an extension to SimpleTest’s web testing capabilities. With a little work there’s also potential to create an awesome Javascript source compressor – the lexing patterns are all there.
Need yet more distraction? Try metaphp from which J4P5 got it’s parser generator. Quite what metaphp was (is?) trying to achieve I’m not sure – seems to be attempting to build a higher level language on top of PHP with some ORM and functional programming in there for good measure (the FP …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.