Rasmus on templating engines

At PHP Forum, Rasmus said this about the "templating engine question coming back every year":

PHP *is* a templating engine by itself. Adding another templating engine on top of it just doesn't make sense. The only situation where it makes sense, is when you don't trust the template to contain nice behaving code.

I so much agree...

Of course, in b2evo, you can't always trust the template/skin... so we'll need to implement some kind of templating... but we're really gonna make it lightweight!

Caching built into PHP?

The PHP Core Team is meeting this week to decide wether or not there should be some caching built into the next major release of PHP. (I guess that would be PHP 6).

I definitely hope the answer will be YES since this has been available on others platforms for ages (J2EE, ColdFusion, ASP...) and it's really missing when you want your app/site/service to scale to large numbers of users.

Furthermore, once they decide to include caching, they still have to decide which cache technology they'll build in.

There are many add-ons/plugins to PHP which do caching, but it's important to keep in mind that there are actually 3 different kinds of caching involved here:

  • Caching the .php files in memory, so you don't access the disk everytime you include _header.php!
  • Caching the compiled opcode for those files, so you don't have to recompile them all at *each* request!
  • Caching arbitrary data from inside the script, so you can reuse it on subsequent requests without recomputing everything

There is one PECL extension that manages all of these 3 caching forms: APC. (Note: precompiled for Windows here). I'll bet on that one! Not only because I think it's doing the job as it should be done (easy setup, clean function syntax and everything), but also because Rasmus is already involved on that one's development team! ;)

Anyway, I think it's really important for PHP to standardize on some caching mecanism so we can design our applications to take advantage of it, no matter what host you'll be running it on.

The main reason we don't yet use shared memory data caching in b2evolution, is precisely because there is no standard that will be broadly available on hosts. Of course, we could still have included our own PHP class writing cache files, but that's bound to be less efficient than shared memory caching!

Edit: the big 'no' argument to including caching would be that because APC uses shared memory, it kind of breaks PHP's "shared nothing" architecture. With shared memory it is so much more likely that a small error will corrupt something that might eventually cause a larger crash... So, be bottom line is that introducing a shred memory architecture introduces a potential weakness, do we want that?

PHP Forum Paris 2005

PHP Forum Paris 2005 Logo

I've spent the last two days at PHP Forum Paris 2005. Very interesting stuff! I'll try to blog the most important facts (IMHO) over the week-end...

But, now when you think about it, I've been there last year also... Very interesting stuff also... And I still haven't blogged a line about it!

But it doesn't matter, I still have my notes from last year... they happen to be in the same notepad as those from this year! Guess I haven't used much paper for the last year... :P

Wez FURLONG, Andrei ZMIEVSKI, Zeev SURASKI, Rasmus LERDORF
Wez FURLONG, Andrei ZMIEVSKI, Zeev SURASKI, Rasmus LERDORF

24 hours with an iPod video

I just surrendered to my geekyness again. I'm passing my iPod photo over to my girlfriend, so I had to buy a new iPod for me. Or maybe it was actually the other way round? :roll:

Oh well... let's just pretend I got an iPod video for my birthday! :D

iPod photo and iPod video
iPod photo vs. iPod video

First contact at the dealer: I was really surprised by the size of the packaging! It's barely larger than a double CD jewel case! I first found it pretty cool because it optimizes shipping... thus uses less fossile energies... okay I disgress... the point is: later in the evening it dawned on me: Apple just did it again!

Since the 4th generation, Apple has been removing stuff from the package all the time. They took away the remote control. They took away the dock. Then they took away the firewire cable. Now they just took away the power adapter! Hence the slim packaging...

This is how they manage to keep the same price tag when adding core functionnality... and they raise their margins at the same time!! (Those accessories are so insanely overpriced when purchased separately!) Guess, there's yet another Apple marketing lesson to be learned here...

I have to admit that I barely ever used the power adapter on mt iPod photo since I've been charging it via the USB connection all day long. Still it was comforting to know that if I ever took a vacation (yeah like that's gonna happen anytime soon...) I had what is needed to get uninterruped music... (though not uninterrupted podcast streams, but that's another story...)

Also, I'm a little bit worried that with watching videos which keeps the screen backlight on for significantly longer periods of time, it will drain the battery even faster than before. On the other hand, the new battery "might" last longer than before.

And it doesn't stop there: Apple has also removed the user manual from the box and the remote controller port from the iPod itself. And you know what else they removed? Firewire! Yes, that's right, they removed firewire support completely. When you connect your 19 € worth firewire cable, the iPod screen will turn to "You can't use a firewire cable with this iPod!" :(

The sad thing is that my 35 GB of music are stored on my older PC which has large ard drives, but no USB2 port. It had a firewire card though... which made the trick pretty darn well until now!

So I had to sync the iPod via USB1! Oh no... it would normally take about 10 hours to copy the 35 GB down to the pod at USB1 speed... so I've left it transfering overnight...

Then of course Murphy's law kicked in: Windows Update decided it would be a good idea to reboot in the middle of the night. So I had to do it all again and leave the iPod at home today (with Zone Alarm's internet lock ON so ). I wasn't finished when I got back from work... but eventually completed all right. Let's see the bright side: I finally found a use for Zone Alarm's internet lock: preventing Windows Update from attempting any funky update when you don't want it to! :P

Okay, nuff said about what's missing. Here's what's added! :)

First there is a sleeve included so you can protect that scratch-me-baby-I-love-that plastic when the iPod is in your pocket:

iPod video in sleeve
iPod video in sleeve

I'm not sure it's very convenient to adjust the volume with that thing on though... I'd like to rant about how much I'd like a volume control on the headset but I said: enough! :-/

First thing I tried, even before synching my music was to put some video onto the pod. That's a pain in the pass. It didn't accept any of my quicktime MOV files. And although iTunes could play them well it wouldn't even attempt to convert them so the iPod could.

So I subscribed to a video podcast... and... several... dozens... of... minutes... later... I finally had a 5 minute clip to look at on the iPod. Awesome! Really nice screen! Really fluid motion. And easy navigation control. B)

I'm definitely going to enjoy those videos... but again... why isn't there a video cable included so I can connect to my TV? Bleh... I know... marketing...

The coolest stuff anyway is the new form factor: same 60 GB capacity but thinner! Same overall width and height but larger screen! I wonder why they made the click wheel smaller though... is it easier to manipulate? Or does it just make the screen look bigger??

The larger screen is the killer feature for me: easier to locate podcasts (or songs) in long lists, larger pictures/cover art... and... you can finally see the lyrics for the song you're currently playing. Yeah! :D

Conclusion: this upgrade from a 4 months old iPod is totally not worth the price for anyone with reason... but it's just as exciting as my first iPod for the geek inside of me. I fear I'll upgrade again when the next one comes out... (WiFi anyone?)

Happy birthday to me!

Oh boy, last time I remember I was 28... and today I'm turning 33! :/

What has happened to the last 5 years?

Well, thinking back, I can list a lot of places where I've been and a lot of people I've met. Even a lot of people I've talked to online. But on the other hand, it still doesn't feel like 5 years have passed...

I wonder if this is just because I'm getting old(er) or if it's because a lot of my world has virtualized in the meantime...

Hum... gotta roll anyway! ;)