php
Compiling php thrift protocol module on Ubuntu
Thrift, the protocol put out by Facebook actually has a module for PHP. While working on code for Social OS which uses Thrift extensively, I ran into a little problem because the extension seems to compile but it fails to load. The problem may be specific to Ubuntu 7.10 or 8.04, or other Linux distros. The reason for this is the configure script somehow ends up using gcc to compile something that should be compiled with g++. To fix this in a hackish way I changed the references to gcc to g++ in Makefile.More ... >>
Knowing syntax and semantics versus knowing standard functions
Recently someone was making a claim that semantics and syntax are by far the most important parts of knowing a language, I have to say I disagree almost completely. Knowing syntax and semantics of a language is almost useless — for instance I can write you some python (I am familiar with the syntax, definitions, indentation, etc.), but I could hardly implement a common search algorithm that I could implement in C, or heck even assembly. When you start learning a language the semantics and syntax are important.More ... >>
Function caching in PHP using APC
Introduction
Everyone who knows anything about PHP performance knows about APC. APC is both an opcode cache and a memory cache. Sometimes you have a really slow function that needs to be cached. There are two ways to go about doing this. One way is simply to dig into the function logic an add the cache in that function. What if you don't want to do that? What if you don't have the time to deal with all the intricacies of the function's logic. Is there an easier and quicker way to go about it. I think so. I call it magic functioning caching.More ... >>