PHP Generators: the power of yielding
Sep04

PHP Generators: the power of yielding

  PHP generators are awesome I’m not sure if you heard but PHP 5.5 is going to support generators. This is fantastic news if you ask me. Here is some of the syntax you will be seeing in future releases, taken from the link the above: Yield syntax The newly introduced yield keyword (T_YIELD) is used both for sending and receiving values inside the generator. There are three basic forms of the yield expression: yield...

Read More

Update your Magento SQLite3 database with Vala

  Let’s update our magento SQLite3 database Remember when we were trying to help Magento’s autoload with a SQLite3 database? I mentioned that I was going to show you how to use Vala to help read and write to that database and offload the operation to the system instead of PHP. Make sure that you have the dependencies to compile the code, in Ubuntu: sudo apt-get install libsqlite Here is the code: using GLib; using...

Read More
Use SQLite3 with Magento
Sep02

Use SQLite3 with Magento

  Why would you want to use SQLite3 with Magento? Just for fun… well actually there is a good reason. The reason is that Magento spends a lot of time in the autoload finding files. Do this in your terminal: strace -c php index.php That should have given you a lot of information, here is an excerpt of mine: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ----------------...

Read More

Install Apache Thrift and Cassandra in Ubuntu

How to install apache thrift and cassandra in ubuntu What is thrift? The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages. To install Thrift in Ubuntu...

Read More
Caching is not performance optimization
Aug27

Caching is not performance optimization

Caching is not a performance optimization… and it never will In a perfect world, caching would be the four letter word defined as a way to masquerade poor and inefficient code around a system. Using it would be the greatest sin that could be ever committed. But this isn’t a perfect world, and caching? Well, it’s a requirement. I remember the old days when I was coding in assembly and C. Back then, I had to do my own memory...

Read More