MaisonBisson

a bunch of stuff I would have emailed you about

More Web Performance Tips From Steve Souders

Hearing Steve Souders at WordCamp last week got me thinking about website performance, so I went looking for more. The slides from his WordCamp talk are online, but he gave a similar talk at Google I/O which got videotaped and posted richer detail than his slides alone will ever reveal.

Also on his blog: Use the Google AJAX Libraries API when you don’t have a CDN, and a post that asks why make users wait to download all your javascript before they see the page if you’re only going to use 25% of it at first?

Global Voices On WordPress

I hadn’t heard of Global Voices Online, a community generated global group news blog, until Jeremy Clarke spoke of it at WordCamp. And I didn’t think the site, with it’s do-good premise, worked until I actually explored it for a while. But, well, it’s a bit fascinating. Global Voices grew out of a one-day conference […] » about 300 words

Quercus PHP To Java Compiler vs. WordPress

Emil Ong is the Chief Evangelist and a lead developer for Caucho Technology, the developers of the Quercus PHP to Java compiler. The idea, I guess, is to write in PHP, deploy in Java, which some people say is better supported by the “enterprise.”

Ong claims 26% performance improvement over Apache + mod_php + APC. That sounds great, I suppose, but it’s less than what Chris Lea suggests is possible if you simply replace Apache with Nginx.

Chris Lea On Nginx And WordPress

“Apache is like Microsoft Word, it has a million options but you only need six. Nginx does those six things, and it does five of them 50 times faster than Apache.” —Chris Lea.

Why? No forking. No loading of unnecessary components. Fast CGI. And to prove it’s not as complex as you might think, he’s installing it live. The session has eight minutes left, can he do it?

Yes, he did. The big concern is in managing permalinks without .htaccess, and it turns out it’s not so difficult. Does he have a cookbook for this? Darn, no time left for questions, I’ll have to ask later.

Mark Jaquith On WordPress Security For Plugin Developers

I’ve been pretty aware of the risks of SQL injection and am militant about keeping my database interactions clean. Mark Jaquith today reminded me about the need to make sure my browser output is filtered through clean_url(), sanitize_url(), and attribute_escape(). Furthermore, we all need to remember current_user_can(), check_admin_referer(), and nonces. » about 100 words

Steve Souders On Website Performance

Steve Souders: 10% of the problem is server performance, 90% of problem is browser activity after the main html is downloaded. He wrote the book and developed YSlow, so he should know.

JavaScripts are downloaded serially and block other activity. Most JavaScript functions aren’t used at OnLoad. We could split the JS and only load essential functions up front, and load all the rest later. How much might that help? He says 25% to 50%. This quickly gets complex, but he’s got a simple plan that considers three questions:

  • Is the script URL on the same host as the main HTML?
  • Should the browser indicate it’s busy, or not?
  • Does script execution order mater?

And at that point things started to get too interesting to take publishable notes. I clearly need to pay more attention to this guy.

Stats he mentioned without being specific about the source:

  • Google: 200ms longer download time cut revenue by 20%
  • Yahoo: 100ms of latency costs … big.

Will Norris on OAuth and DiSo

Will Norris talking about things OAuth, OpenID, and Diso at WordCamp. Demonstrates/fakes an OAuth authentication and authorization process with WordPress for iPhone app. Does this matter? OAuth support is slated for WP 2.7, and people are finally getting smart about linking all this stuff without throwing passwords around “like confetti.” » about 100 words

Aaron Brazell On Blog Search And Findability

Aaron Brazell at WordCamp is talking about search and finability “not SEO.” Riffing on Ambient Findability, he asks:

  • Can people find your blog?
  • Can people find their way around your blog?
  • Can people find your content and services despite your blog?

Remember:

  • Your blog serves as a nexus for information about you.
  • You serve as the nexus for trust and relevance.

Going Further? Make your social content outside your blog searchable, findable via your blog. Brazell conveniently recommends using Lijit, which does just that.

Copying MySQL Usernames and Database Priveleges

Now that I’m the nominal MySQL DBA for PSU, it became my job to jimmy up the MySQL user privileges so that the new web server could connect. I’m not sure if this is the fastest, most efficient way to do it, but it worked quickly enough:

``` CREATE TABLE mysql.user_copy SELECT * FROM mysql.user; DELETE FROM mysql.user_copy WHERE Host NOT LIKE 'OLD_HOST_NAME'; UPDATE mysql.user_copy SET Host = 'NEW_HOST_NAME'; INSERT INTO mysql.user SELECT * FROM mysql.user_copy; DROP TABLE mysql.user_copy;   CREATE TABLE mysql.db_copy SELECT * FROM mysql.db; DELETE FROM mysql.db_copy WHERE Host NOT LIKE 'OLD_HOST_NAME'; UPDATE mysql.db_copy SET Host = 'NEW_HOST_NAME'; INSERT INTO mysql.db SELECT * FROM mysql.db_copy; DROP TABLE mysql.db_copy;   FLUSH PRIVILEGES; ```

Simply replace the OLD_HOST_NAME and NEW_HOST_NAME with the appropriate values. Most importantly, I didn’t have to know the passwords for each user to do this. This script simply copied the user info and gave them access from the new server.

Lyceum Vs. WordPress MU

The news about BuddyPress has fully shifted my attention from single-blog WordPress installs to multi-user, multi-blog installs.

WordPress mu is my platform of choice, but I was quite fond of Lyceum when I first learned of it a while ago. The big perceived advantage of Lyceum is that it uses a unified table structure for all blogs, rather than creating a new set of tables for each blog as WPmu does. I’m not so sure that’s important now, and WPmu’s scheme now looks a lot easier to partition onto multiple database servers, should traffic ever scale there. Still Lyceum is an interesting project, and their name and logo are great.

OAuth and WordPress

I just realized OAuth support is slated for inclusion in WordPress 2.7. It’s not in trunk yet, but that’s no reason not to get up to speed. Scott Gilbertson says OAuth and OpenID are foundations to the open social web, giving apps like WordPress a “secure, centralized means of identifying yourself and a way to control who knows what about you.”

Chris Messina, who says we currently treat user credentials “like confetti,” is more than a little excited and is building a series of WordPress Plugins to take advantage of these formats. Stephane Daury is excited too.

Is My PHP Script Running Out Of Memory?

I’ve got a PHP script that sometimes just dies with no errors to the browser and no messages in the error log. I’ve seen this in the past with scripts that consumed too much memory (yeah, it should have issued an error, but it didn’t, and increasing the memory limit fixed it), but now the memory limit is set pretty high and I’m not sure I want to increase it further. I certainly don’t want to increase it without seeing where it’s going wrong, anyway.

To do that, IBM developerWorks says the memory_get_usage() and memory_get_peak_usage() functions are for me. And they offer some other interesting tips as well.

Displays: Go Long, Go Wide

If you want more monitors than you’ve got DVI or VGA ports, your options include adding a video card, using a USB-based display, or this Matrox hack: a small box plugs into your computer’s monitor port, and two or three monitors plug into the box, no software drivers or additional hardware required.

If you want to send a video signal further than your monitor’s cable, your options include getting a longer cable (works up to about 50′) or get a different cable. From MAKE and Doug Burbridge: a sending VGA over Cat-5. This device promises to send DGA up to 600 feet. Or, send DVI 160 feet.