Archive for the ‘Programming’ Category

GTK+ and Qt should copy this urgently!

Wednesday, September 20th, 2006

Task Dialogs. Yes, they’re on Vista. We should have them too, if anything because they seem to be a great idea. Huge action buttons (hard to miss with mouse pointers), clear and easy-to-read text, and an API that encourages sane usage.

Yes, I’m aware that we could do the same with (at least) GTK+ buttons with a few layout containers packed in. Now, where’s the easy-to-use implementation in a vein similar to the Response abstractions in GTK+?

Benchmarking WordPress plugins

Friday, June 9th, 2006
Comparative accumulative plugin performance in KB/s

While doing routine tuning and checking of my weblog, I discovered a rather nasty slowdown with WordPress page generation. Taking the “scientific” route, I deactivated nearly all non-essential plugins in my Supercharged weblog (more than 40) and proceeded to activate them one by one, interspersing activations with ApacheBench tests.

A short plug: This post is brought to you by Supercharged. If you want to get these plugins in one package, consider getting Supercharged for your blog.

Really quick conclusions:

(more…)

Nonces and WordPress

Friday, June 2nd, 2006

What is all this Nonce-sense? - Asymptomatic gives us a quick introduction on nonces.

Nonces alone sound very stupid to me. Instead of having implemented nonces alone, what the WP team should have been doing all along is obvious: every action that is not idempotent should be done through POST. Technically, it’s quite simple. Programmatically, it’s harder to do than GETs. But surely coding GETs + nonces must be much harder than simply coding POSTs.

No one is discussing how useful nonces are. They are useful. But in the context of the greater picture, they’re used to avoid WP admins from being tricked — which is exactly why POSTs should be used as well. Sure, POSTs alone don’t buy us a whole lotta security. But they surely do buy us some.

(Please don’t tell me I haven’t read the whole thread. The fact that nonces were introduced does not contradict one iota the fact that POSTs should be used for destructive operations, and that’s it.)

Update: to visitors from the #wordpress channel: I updated the article, correcting statements of fact. I’m very glad to see that you’re receptive to the POST idea. It’s no surprise that it has been floated before as an issue.

Qué buen tutorial de programación

Wednesday, May 31st, 2006

Alerta: contenido ofensivo a un clic de distancia: OOP Concept explained: Polymorphism (Technology) || kuro5hin.org

Quickie: Cómo entrar en BlogSpy con WordPress

Monday, May 29th, 2006

Si usas WordPress, sabrás que normalmente para entrar en BlogSpy necesitas editar tu plantilla… o no, con este pequeño plugin que desarrollé hace 5 minutos:

(more…)

Belated musings regarding the microkernel vs. monolithic kernel debate

Thursday, May 11th, 2006

What’s the latest discussion topic on the kernel development sphere? It’s a new rehash of a (fairly old) discussion. The famous microkernel vs. monolithic kernel debate.

(more…)

Revisiting multiple inheritance in PHP

Saturday, March 18th, 2006

As it turns out, version 0.7 of the runkit extension for PHP has problems when copying methods from a class into another. Of course, this punts my original multiple inheritance simulation technique. The bug in detail: copying of methods from “parent” classes into the “child” class succeeds, but later on, when attempting to use a method, PHP requests ludicrous amounts of memory to the OS, which causes PHP to fail.

In lieu of that problem, I decided to explore alternatives. The final, usable alternative seems to be:

(more…)

RPM packages of the runkit extension for PHP

Saturday, March 18th, 2006

Yes, sir! Due to my increased involvement in PHP coding, I’ve had to try the runkit extension. Since I absolutely refuse to install any software from source without preparing a package for my system (in this case, RPM-based Fedora Core), I took the time to prepare the RPM packages for runkit.

(more…)

Simulating multiple inheritance in PHP 5 via the runkit extension

Tuesday, March 14th, 2006

Update: there’s a serious bug with this approach and `runkit` 0.7. For an updated approach, try Revisiting multiple inheritance in PHP. Oh, there are RPM packages for runkit here.

Here’s some code that will help you simulate multiple inheritance in PHP 5 with maximum portability. This requires the runkit extension for PHP, regrettably. Hope runkit gets rolled into baseline PHP 5.

This code also emulates the aggregate_methods function from the Object aggregation functions in PHP 4.

(more…)