Doctrine 1.x log all queries

To log all queries we need to use Event Listeners

class QueryDebuggerListener extends Doctrine_EventListener
{
    public function preStmtExecute(Doctrine_Event $event)
    {
        $q = $event->getQuery();
        $params = $event->getParams();

        while (sizeof($params) > 0) {
            $param = array_shift($params); 

            if (!is_numeric($param)) {
                $param = sprintf("'%s'", $param);
            }   

            $q = substr_replace($q, $param, strpos($q, '?'), 1); 
        }   
        error_log($q);
    }
}
$queryDbg = new QueryDebuggerListener();
$dbh = new PDO($dsn, $user, $password);
$conn = Doctrine_Manager::connection($dbh);
$conn->addListener($queryDbg);

#Apache: avoid using .htaccess files completely

.htaccess files are read on every request.

You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance.

http://httpd.apache.org/docs/2.4/howto/htaccess.html

What to read when started with AngularJS

Just note for myself.

ng-boilerplate
AngularJS Best Practices: I’ve Been Doing It Wrong!
AngularJS CRUD application demo

Authentication in Single Page Applications With Angular.js – Looks good. But not sure if it is the best way to deal with the authentication task. Going to read Mastering Web Application Development with AngularJS (Chapter 7: Securing Your Application)

AngularUI
http://egghead.io/
http://tv.jetbrains.net/tags/angularjs

Cloud adds new statement to Manifesto for Agile Software Development

The cloud is not only a new way to more easily and cheaply get the computing power needed to do what companies and individuals are doing today…
This may be the most important benefit of the cloud—it enables companies of all sizes and in all sectors, as well as governments, non-profits, and individuals, to more quickly build new applications and services – http://goo.gl/uxQcT

Cloud is agility and efficiency of computing. Agile team should be in the cloud.

It means that you should do your job completely in the cloud whenever possible. Developing, Testing, Presenting, e.t.c.

BTW: Manifesto for Agile Software Development