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); 
$queryDbg = new QueryDebuggerListener();
$dbh = new PDO($dsn, $user, $password);
$conn = Doctrine_Manager::connection($dbh);

#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.

What to read when started with AngularJS

Just note for myself.

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)


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 –

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