Best practices when it comes to writing plugins is a frequently asked question on the wp-hackers mailing list. Good news: Mark Jaquith, one of the WordPress core developers, has an ebook planned:

Too many WordPress plugins have security issues. Solution: I'm writing a short e-book on how to write secure WordPress plugins.

I'll buy.

Sumo Paint. Holy beep, it’s almost an online Photoshop clone! (0) «

Coders using WordPress, this post is for you. Here are a few plugins that should make your WordPress hacking life faster, happier, and more productive. What a promise, heh? :)

Plugin: User Switching

John Blackbourn freshly released this handy plugin with which you can instantly swap between user accounts, without having to log out then log back in as another user. This plugin should come really handy when coding something that needs to play nice with user permissions and roles.

user-switching_screenshot-2

Get it: User Switching.

Plugin: No Login

Toot toot! Here is my own No Login plugin. Its purpose is simple: never see the login form again and directly load pages of the admin area as user "admin". Cookie expired, or need to visit the admin area with another browser to check your neat CSS/JS work? No time to waste on the login form! (plus, admit it, you never remember if your test account on your test site has password "123456" or "asdf")

plugin-no-login

Get it: No Login.

Note: as of writing, "No Login" and "User Switching" are mutually exclusive (or to be more accurate, No Login enforces authentification of "admin" and does not allow user switching. But I really like John's plugin concept. I'll update the plugin so they can cohabit peacefully.

Plugin: Theme Tester

WordPress' Automattic's Donncha's contribution to this list is a plugin that gives users with sufficient permissions (“switch_themes” capability) a theme browser that will change the current theme for them only, while regular visitors will see your site as usual. Pretty cool if you want to check how your content suits, or does not, a theme layout before going live.

Get it: Theme Tester

Plugin: Theme Test Drive

Vladimir Prelovac's theme runs a similar concept: test a theme on your live blog without your readers noticing anything funky and unexpected. You can also quickly load a theme by appending ?theme=xxx (?theme=Default for instance) to your blog URL.

theme-test-screenshot-11

Get it: Theme Test Drive

Any other cool stuff?

If you use or know about another cool bit that may make WordPress coders more productive and happier, be sure to leave a comment!

calvin-hobbes-pills

Most probably fake since I own the entire collection of C&H and I've never seen this one. But still. Those damn kids on the intarwebs. They don't respect nothing!

I bet a number of you will recognize the following logo: on the left side of the picture is the cute bird on his branch as used by Twitter (you see it on their home page when you are logged off, or on the Support page). What about the right side?
twitter-birds
Read More

LastFM Love Tweet: tweets every track you “love” on last.fm so you can share it with with your followers. Neat! (0) «
In: , , , On: 2009 / 02 / 22 Short URL: http://ozh.in/k1

Lolcats, All Your Base, Miss Teen South Carolina, Diet Coke + Mentos… If this kind of internet phenomena bores you, don't click the "Read more" link. But of course, if you want to remember them all (and then view some) in a neat timeline, go ahead!
Read More

In: , , , On: 2009 / 02 / 21 Short URL: http://ozh.in/k0

Now that's a fun, yet a bit extreme, use for Twitter. Anti Privacy is a Greasemonkey extension (ie javascript) bit that, simply put, tweets every URL you visit, as seen for instance here. Consider this the absolute opposite of privacy.

First thoughts: LOL, with a snatch of OMG, and obviously a morsel of WTF. Now, I actually like the concept. I like the concept of exhaustive archive: since I'm already keeping track of every song I listen too, every movie I watch, why not store somewhere every page I visit? Maybe it would make something fun to play with: how many pages visited last year? How many different sites? What, only twice on planetozh? This accounts for less than porn!

As fun as it sounds, Twitter is probably not the best storage platform for this: Twitter's search engine is definitely not robust enough, 140 character is not enough to store a title and a URL, and a few other hundred reasons. Yet, I definitely like the idea :)

Most of the time, I quite like coding WordPress plugins. Nonetheless, in the programming flow, there is something that I hate: all the localization process that takes place at the end of a project. That is, making sure I didn't hardcode a string that won't be translated, creating or updating the .pot template files ("OK, for the 1000th time, how the f** does Poedit work, again?").

This L10n process has no added value for me as a user, as I've always used the default (ie English) WordPress version. Yet, I know some value it more than I do (I guess a lot of people don't understand a single word of English after all), and, that's were it gets painful to me, a few people put time of theirs into creating translation files for my plugins, expecting me to provide an up to date and clean translating framework. So basically, every time I botched the adminmenu.pot file in my Admin Drop Down Menu plugin recently (by leaving hard coded hence untranslatable strings in it), I sort of wasted kind translators' work and probably confused end users. Sorry peeps.

This recurring problem has got me thinking a bit. For my next plugin, instead of using the built-in translating API (a .pot template file, localized .po and .mo files, internal translating functions such as __()), maybe I'm going to sort of reinvent the wheel (something I always advocate not to do, obviously) with a new concept I still have to polish: the plugin would fetch (and probably cache) translation files from a location a user would point it to, that is from a translator's web site. This way, the translator would be able to update their translation without having to wait for me to include their work, and I would also give them more exposure. The key point being: I would never have to bother with updating the plugin just because of translation files or problems.

Still something I have to work on, but the idea really nags me during my morning showers these days :)

In: , , On: 2009 / 02 / 12 Short URL: http://ozh.in/jy

Interesting read of the day: How to estimate a programming job, when you have to quote for a client.

I'm freelancing occasionally, depending on spare time and interest I have in the project I'm contacted for, and quoting is definitely the aspect that I dislike the most. I definitely will try to set a "quoting pattern" similar to the one in the article.