It’s been a while since I’ve posted on this blog. Mostly because I’ve been busy on zillion projects. I’ll soon write an update to my cascades queuing post. For a recent project of mine,, I’ve been researching an efficient way to get rid of Amazon’s Simple Queue Service (SQS) service for one main reason, I needed simultaneous queueing capabilities. One message being in multiple queues at once, that is. My experiments with file system and MySQL queues, even when cascaded with memcached wheren’t performant enough. I found my answer in NoSQL. But now, enough for the intro, now the rant ;-)

I’m writing this while watching Stephen Graham making a statement as Al Capone in Boardwalk Empire. So I shall make one too. Now about that fellah’, the INFAMOUS Internet Explorer 6. A friend of mine recently showed me a site of his making where he directs the IE6 users to a deadend page where he encourages them to upgrade. Sweet. I totally agree. Then he tells me that IE6 is a plague. It sure is, still agreeing. Then that it’s been alive that long because of all the conciliatory developers like him and me that worked, harder an harder as new standards like transparent PNGs came along, to ensure IE6 compatibility. And that’s where I disagree.

More …

category HTML, Usability, Web development Wednesday 16 February 2011 Comment (0)

I would guess every programmer knows what queueing is. For those who don’t, well, it’s some sort of waiting line for messages: they get in, they wait, and they get dispatched for processing.

I used queues many times in the past. First in first out (FIFO) queues for for mass email programs, last in first out (LIFO) queues for MicroBlogBuzz, and prioritized queues for a video compression platform, among other things.

After a lot of trial and error, storage engine changes, code optimization, benchmarking and swearing, I came up with this idea of cascaded queueing. In a nutshell, cascaded queueing is putting two queues back to back: a master queue that will act as a warehouse, and one or many slave queues that will act as distributors or brokers.

More …

category Uncategorized Tuesday 8 December 2009 Comment (0)

F4V File Format
You might have read my post about my FLV meta data and cue point reader/writer. You might also know that the F4V format (which really is simple MP4+H264+AAC) succeeded to the FLV format, and is supported by Flash 9.0.115 and up.

The MP4Info class is a simple extensible PHP class reading the MP4 container’s frames (called boxes) to get various information, namely the video duration, the video/audio codecs, the width and the height, as well as the embedded XMP meta data.

The F4V format is better than the FLV format in many aspects:

  • Better compression ratio
  • Better quality at similar bit rates
  • Open source compressors available, through ffmpeg and libh264 (Flash 8 On2 VP6 codec is proprietary)
  • Decoding H.264 is a lot less CPU intensive on the host computer than decoding On2 VP6
With Flash 9 being at a rate of penetration of 98.9% in mature markets1 and will all the advantages, MP4 Flash video is becoming more and more common.
More …
category Flash, PHP Thursday 11 June 2009 Comments (8)

Having worked with many fastidious web designers in the past requesting that every single integrated page looks precisely to the pixel like the PSD file — you know who you are — I developped this little JavaScript technique that allows the integrator to enable/disable a 80% alpha JPEG image overlay, in order to visually find the discrepancies. The code is very ugly but cross-browser compatible, and I never felt compelled to make it better as it does perfectly what it has to do.

It’s quite easy to use: simply load the JavaScript file at the end of your HTML file, and have it point on your JPEG image to an default X/Y position.

<script language="javascript" type="text/javascript" src="watermarker.js"></script>
<script language="javascript" type="text/javascript">

And voila, you can toggle your JPEG overlay, move it around, change it’s alpha transparency and reset it to its default position.

A small demo is available here.

PHP Source watermarker.js (7.8k)

category CSS, HTML Tuesday 13 January 2009 Comment (0)

At the beginning of the week, I officially launched a little project named MicroBlogBuzz. The concept is simple: find URLs on micro-blogging platforms, and present the top blogged ones.

For those not familiar with micro-blogging, it’s pretty much like blogging, but smaller — hence the micro prefix. Micro-blogging posts are very short, 140-160 characters that is. The most popular platform is Twitter, but new platforms are appearing, such as Pownce, Jaiku and Identica. Also, this year’s TechCrunch50 winner is the project oriented micro-blogging platform Yammer (which I didn’t get to try yet).

Back to MicroBlogBuzz, I started this little project part time while testing various APIs, and when stumbled on TwitterBuzz, which presents the most popular links on Twitter. However, TwitterBuzz only present the domain name, which isn’t really meaningful since most micro-bloggers use TinyURL or similar services to shorten their URL. TinyURL was presented as the Top Twitter link. And I thought it was kind of stupid. So I decided to do the same thing, but to follow the HTTP redirections to get to the final URL.

More …

category Personal, Social networks, Web development Friday 19 September 2008 Comment (1)

Tree, in computingCategories and sub categories. Directories and sub directories. Building a tree of nodes that have parents is a common problem these days.

There are two solutions to this problem, but unfortunately, the inefficient one is often used by programmers, due to the lack of time, or to inexperience.

More …

category PHP, Programming Wednesday 10 September 2008 Comments (8)

The HTTP protocol is quite simple. But many of us under-use it, programmatically speaking. There are many very simple performance mechanisms that are often forgotten. Many developers go for disabling HTTP caching completely, as they often don’t understand how to use it, and because it can cause weird bugs when used incorrectly.

But so much things are cacheable: pages, images, CSS, JavaScript, even many REST web services! Yes, even in this social web era where content changes faster than you can write, there’s still plenty of slow changing information, such as home pages, or lists of countries, regions and cities.

Efficiently using caching translates into:

  • Better response and loading time
  • Decreased load on the server
  • Better user experience

This article aims to present a simple explanation of the HTTP protocol and proper use of HTTP caching.

More …

category PHP, Usability Thursday 17 July 2008 Comment (0)

If you played with the pretty cool Amazon Web Services, you probably started off fetching a sample off the Developer’s Connection pages. At least, I did.

One cool sample for Simple Queue Service is the one by Justin@AWS. But (you saw it coming, I suppose), being anti-PEAR (for many reason, such as dependencies, weight, version conflicts, non-catchiness of the name, fructose intolerance, etc.), I just couldn’t leave the sample like that. Yes, this is me again reinventing the wheel.

The original library depended on two PEAR components:

More …

category PHP Friday 11 July 2008 Comment (0)

Update (Dec 20, 2008): The AMF0Parser library has been updated to better handle broken AMF0 packets. The FLVInfo2 library PHPDoc has been updated.

Update (Aug 15, 2008): The AMF0Parser library has been updated to support the Date type in the metas, added among others by the “inlet media FLVTool2″ tool.

Update (Jun 11, 2009): The project has been moved to Google Code. MP4Info, an F4V file (or more genericaly MP4 file) class is also available: check out blog post and project at Google Code.

If you’ve done Flash banners or micro-sites that embed video with cue points for synchronization before, you know that it’s a pain in the arse. There doesn’t seem to be any tool around to modify the damn points once the file is encoded, so you’ve got to re-encode the file over and over to have your things synced correctly.

If you’ve tried to reverse engineer the FLV format before, you know that it’s a pain in the arse as well. The AMF0 format is anything but intuitive, and the documentation has been lacking for a long long time — although there’s apparently an SDK now. Luckily, there was OSFlash, and SabreAMF and AMFPHP that could be used as a documentation source.

If you recognize yourself, this might be your lucky day. After many hours of trial and error, I’ve finally been able to reverse engineer it, and to build a library that extract essential FLV information, reads the Meta, and allows you to write them back — including the cue points.

More …

category Flash, PHP Friday 4 July 2008 Comments (11)

I got no IPod. I got no IPhone. But I’ve got an OpenID. I’m like a low class geek. But whatever. I’ve read a bit lately about OpenID and wanted to give it a try on one of my personal projects (CodeIgniter based, you bet).

I’ve stumbled upon Rémi Prévost — who’s blog a follow more or less consistently due to the lack of time — CIOpenID module. It’s basically a CI embed of Janrain’s PHP_OpenID.

His code is great and works well. But one thing I don’t like about it is that it requires a different bootstrap file (a modified version of index.php) and a somewhat hacked version of your typical .htaccess file. The reason is, CodeIgniter annihilates the $_GET variable during initialization, because GET queries aren’t secure (ok, this is overly simplified, but you get the idea).

Being who I am, and somewhat liking to reinvent the wheel during my free time, I used a different approach. Rather than using a different bootstrap file, I rather chose to use the pre_system hook.

More …

category PHP, Social networks Wednesday 25 June 2008 Comments (5)