Looking for a job? Read this first

Written on 12 December 2012, 01:01am

Tagged with: , , ,

John Sonmez: The 4 Most Important Skills for a Software Developer
You must be good in:

  1. Solving Problems
  2. Teaching Yourself
  3. Naming
  4. Dealing with People

Daniel Blumenthal: Why won’t anyone talk to me? What recruiters look for in a resume

  1. School matters (if it’s good)
  2. Prior jobs matter (if they are at Google or Facebook)
  3. Domain Knowledge and Cultural Fit are important
  4. Start-up Experience – starting a company is hard
  5. Side Projects show if you’re really passionate about what you’re doing
  6. Don’t switch jobs frequently, don’t send 10-page resumes

Getting started with node.js

Written on 4 December 2012, 09:35pm

Tagged with: , ,

Update: Only today, 11 December you can get the Jump Start Node.js eBook for $11 instead of $19: http://xmas.sitepoint.com/#day/13
Or you can get the Node.js + Coffee script bundle for $19.
The guys on SitePoint have a good starting point if you wish to start learning node.js: the Jump Start to Node.js.
In no more than 30 minutes you can create your first node.js application that connects to MongoDB to insert data.
Step 1: Watch the video below (6 minutes)

Step 2: Download the first chapter of the book for free (2 minutes)
Step 3: follow the example explained in this chapter (22 minutes 🙂 ).
You will need to create a free MongoLab account to have your database in the cloud.
You will have to add/edit the following pages:

  • app.js
  • form.html
  • package.json
  • lib/db.js
  • models/User.js

In the end, the app tree should look like:

    The digital edition of the book costs $19.

Node.js is different. It lets you write front-end AND back-end code in a unified language, leading to staggeringly fast and scalable projects!

Cronjobs in CakePHP 2.*.* in 5 steps

Written on 30 August 2012, 07:34pm

Tagged with: , ,

Just adapting a solution from 2006 to the 2012 version of CakePHP 🙂
Calling controller actions from cron and the command line

Step 1: copy app/webroot/index.php to app/cron.php

Step 2: edit app/cron.php
Change the last 3 lines of code as follows:

//---------THESE LINES:
	App::uses('Dispatcher', 'Routing');

	$Dispatcher = new Dispatcher();
	$Dispatcher->dispatch(new CakeRequest(), 
		new CakeResponse(array('charset' => Configure::read('App.encoding'))));

//-----------CHANGE TO:
	App::uses('Dispatcher', 'Routing');


	if($argc == 2) { 
		$Dispatcher = new Dispatcher();
		$Dispatcher->dispatch(new CakeRequest($argv[1]), 
			new CakeResponse(array('charset' => Configure::read('App.encoding'))));

Step 3: create Controller/CronController.php

 class CronController extends AppController {

	public function beforeFilter() {

	public function test() {
		// Check the action is being invoked by the cron dispatcher 
		if (!defined('CRON_DISPATCHER')) { $this->redirect('/'); exit(); } 

		//no view
		$this->autoRender = false;

		//do stuff...


Step 4: Run your cron using the command line:

# php ./app/cron.php /cron/test

Step 5: Test that loading the same script in browser is not allowed (for security reasons):
http://yourdomain/cron/test redirects to http://yourdomain/