Daniel Gafitescu Here was supposed to be a famous quote…not available at the moment!


The Martian by Andy Weir

A month ago I went with a friend of mine an saw at the cinema "The Martian" and I loved it.

Then I look over Youtube and are a bunch of interview with Andy Weir about the book.

After I seeing those videos I decided to read the book as well. In just a week, for a couple of hour a day, I manage to finish it. I kindly recommend it.

Here a few quotes from the book I love:

Me: “This is obviously a clog. How about I take the it apart and check the internal tubing?” NASA: (After 5 hours of deliberation) “No. You’l fuck it up and die.” So I took it apart.

NASA, however, is absolutely shitting itself. They see the Water Reclaimer as a critical survival element. There’s no backup, and they think I’l die instantly without it. To them, equipment failure is terrifying. To me, it’s “Tuesday.”

Most of the book NASA is "shitting bricks" ... fun read for sure.


CSS3 In-Depth from pluralsight.com

Watched CSS3 In-Depth just to see what's new in CSS3. Turns out there a lot of stuff but still some of them are not available in all browsers.

It's definitely a good watch if you are a front end developer.


Change field using migration on Laravel 4.2

If you have to change the type or in my case to add more options to the a ENUM field you need first to drop it and then to create it again (this will destroy the information in those field)

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UpdateTableNameStatus extends Migration {

* Run the migrations.
* @return void
public function up()
Schema::table('table_name',function(Blueprint $table)

Schema::table('table_name',function(Blueprint $table)
$table->enum('status', array('PENDING','IN PROGRESS','COMPLETE'));



* Reverse the migrations.
* @return void
public function down()
Schema::table('table_name',function(Blueprint $table)


Schema::table('table_name',function(Blueprint $table)
$table->enum('status', array('PENDING'));



Became a Zend Certified Php Engineer


At the begging of 2013 I have read the article Become a ZCE in 2013 so I have set myself the goal that by the end of the year I should do be a Zend Certified Engineer. For the next 11 month I have totally forgot about it and in December I saw a tweet that said that Zend has upgraded the certification from Php 5.3 to Php 5.5 & rebranded from Zend Certified Engineer to Zend Certified Php Enginner so I bought a voucher.

The voucher is available for a year long so it gives you plenty of time to prepare for it, but I chosen the second to last day of the year to take it which was in fact the last day that I could schedule that exam. Ever since I have finished the university in 2008 I haven't taken an exam and I missed the thrill of going to one and even if I wasn't 100% sure I'll pass I went anyway. After the first 15-20 questions I was pretty confident that I was going to take it and in the end I wasn't sure on 4 questions , 2 of them were theory questions and the other 2 were code samples.

Advantages of being ZCE

  1. Proof that you are senior developer
  2. your future employ will be easier pursued into hiring you, and you can demand a raise on the current one
  3. looks good on your resume
  4. You will get to put a nice icon on your website ZCE logo to prove that you are certified and link it to Zend Yellow Pages.
  5. fill in the gaps in your Php knowledge and learn new stuff so you can use later

Testing system

I quite liked the testing system which was quite simple and intuitive. You have to answer 70 questions in 90 minutes , so you have around a minute and 30 seconds per question which is quite enought. Most of the time the question that are theoretic can be answer just in few second and you should take the time left to focus on the code sample ones.

If you are not sure of an answer you have the option to mark it for review and go back to it whenever you like, and even if you forget about it when you finish the exam you are asked to check again the marked for review questions. I was given 2 sheets of plastic paper that can be easily erased and 2 markers if you need to write something down other than that you can have anything with you.

As far as I recall around 15-20 question are from the new material starting with Php 5.4. Even if there are 70 questions in one question you are required to know the theory from several topics so they will cover the whole spectrum.

If you fail the exam they give you a report on specific topics that you lack knowledge so that you can improve on them next time but they don't give you the specific questions that you failed.

In order to find a test center you can access Zend Technologies Certification Testing from Pearson Vue but most likely you'll find one if you live in a big city.

Type of questions

There are 3 types of questions:

  1. Single answer. You are given 4 options in which just one is correct. Most of the question are like this type
  2. Multiple answers. You are given at least 4 options in which at least 2 of them are correct.This type of question are marked as multiple and you can easily figure it out because you get checkboxes instead of radio buttons.
  3. Fill in the blanks. You are given a sentence that you have to word or a phrase. In one of the questions I was given it was require to give the name of a function (func_num_args). There are only 2 or 3 questions like this one.

Where to study from ?

  1. The main source is obviously is the official website: php.net
  2. Video training
  1. Books
  1. Blogs that you can find by googling ZCE


  1. Don't pay the full price for a voucher

There is always a coupon code that you can use and get at least 10% of the Zend PHP Certification Voucher and you can get it just by doing a simple search on google. I have used the coupon code CJ4ZEND which is around $15 off the total of 195 and the coupon still work today. Also if you fail the exam for the first time, the second time you want to buy the voucher you will have a discount.

  1. Zend Certification Study Guide

You get a pdf file to down in email once you buy the voucher but seems like the file is not there any more http://static.zend.com/topics/PHP-5-3-Study-Guide-v1.pdf . In this draft pdf file you got sample questions devided per chapter but from my point of view they were easier than the one from the actual exam

  1. Read the php docs on the ebook reader/table device

In my case I have download the the php documentation fromhttp://doc.php.net/downloads/epub/php_manual_en.epub as epub format and read it on my kindle where I can make notes with ease.

  1. Test Prep: Zend PHP Certification online course

There is a very expensive test preparation from Zend which cost $1000 including the examn voucher which from my point of view is quite expensive.

  1. Upgrade from PHP 5.3 Certified

In October 2013 at a Zend Conference in Paris the new certification has been announce and it included PHP 5.4 and 5.5 and keeping a lot of the question from the previous exam but you can easily apply for an upgrade if you are allready PHP 5.4 Certified. In my case I have waiting for the new Php 5.5 certification for quite a while and everytime I email Zend they replied that it was a working in progress and they didn't have a release date. The chapters has been upgraded as well and you can found them in Exam information section.


They way I prepared was quite simple: I allocated 4 hours per each chapter and I have started with the part that was most familiar with and increase the time on the chapters that wasn't that good at like regular expressions, SPL and Traits in my case. In order to pass the exam you should be flawless on the Php Basics and you must treat all the question here as a trap. Don't always go for the obvious answer especially that you have code that you need to check. In my mind come the example with the strpos function.

if (strpos('abcdefg','abc')){
    echo "found it!";
    echo "didn't find it..";

At first glance you would say that it will echo "found it" but if you pay closer attension the strpos will return 0 which will be cased to a false boolean so in fact it will show "didn't find it..".

For the SPL which I never used before I study from the php|architect's Mastering the SPL Library and was just frustrated that I didn't used this before but after looking and studying it now everything that I can do with SPL I am using it. Regular expressions were another chapter that I wasn't that familiar with and I payed more attention to it and to the php functions.

All the function regarding strings, array & file management you need to lean by heart if you don't know them by now and also the operator priority list is another part that you need to be familiar with.

For the XML chapter you got to deal with SimpleXml , DOM and for this the best aproach was to get a xml file and play with all the function and methods so you can get more familiar with it. I have got 5 question involving XML so practicing was very importing on this matter.

Where to go next

Working in our field where thing change with such a pace and new technologies and framework emerge so often it's hard to settle for a certain version or framework. You always have to learn & research so you be up to date, and this sort of certification prove that you do that and you are always trying to improve and move forward.

There are a lot of other test/certification that you can take. The most appealing for me right now it's the Sensio Labs's Symfony certification specially if you are working with Symfony 2. There is also the Zend Framework 2 certification that you can take also from Zend. There is also ThePHP Curriculum which look really promising and the fact that Sebastian Bergmann ( the PhpUnit creator) is behind the project.

Anyway if you are looking forward to take the exam good luck with it and if you allready have passed it please share your experience in the comments below.


The Healthy Programmer: Get Fit, Feel Better, and Keep Coding – book review

healthyFor the past few month I've been having back problems and I saw someone mention on tweeter about a book dedicated for programmers on health & well being. It's The Healthy Programmer: Get Fit, Feel Better, and Keep Coding written by Joe Kutner .

Even if I was reluctant at first once I have start reading it and I have finish it within a week.

On my case to prevent back problems it offered exercises that were even recommended to JFK which couldn't  keep his child in his arm because of it.

Here is a list of quick things that I pick up from it:

- we need to do at least 10 000 steps per day ...and they are gadgets to help you keep track of that NIKE+ SPORTBAND

- staying indoor every day can weaken your immune system so is better to stay out in the sun for 10 minutes ...hunt for D vitamin.

- weight is a factor that you need to watch on a daily basis, heart pressure once a month.

- a day a week don't each meat ...it will try to do that twice a week starting next year.


These are just a few tip that I pick up from the book and there are plenty there backed up by a lot of research links.

I recommend the book to all people who  work every day at a desk and with a computer.



PHP 5.5 First Look

A short title from Lynda.com about the new features of the Php 5.5 done by Jon Peck

The title will cover :

- installing the Php 5.5 on a VirtualBox machine

- generators using the yield operator

- dereferencing
echo "abcd"[2] ==> b

- finally keyword on the try/catch statement for cleanup operations

- password hashing using the functions  password_hash , password_verify & password_get_info

- Opcache  included by default, previously knows as commercial Zend Optimizer +

- usage of list in foreach statement

- check if a function return empty result using empty function and not throw an error

- normalizing a bunch of different functions like boolval , pack & unpack

- what has been removed/deprecated on the latest Php version

Filed under: Programming No Comments


I short visit to Cassis, France.

Filed under: Travel No Comments


Yesterday I went to Avignon.
The city it's known for being the "City of Popes" and in 2000 was European City of Culture.

Here is a playlist of short videos I took with my camera "on the run" mainly from The Popes's Palace & Avignon Bridge which are part of Unesco World Heritage

Tagged as: No Comments

Laravel: Code Bright

Just finish reading Laravel: Code Bright , or better say what has been written so far since it's on going process and I had found it as an excellent start if you want to learn Laravel4.
Dayle Rees has written before "Code Happy" which was an online book that you can order the print from https://leanpub.com but this one it's on Leanpub exclusive.
So if you are on the working with Laravel4 in my opinion it's a must read.

Filed under: Books No Comments

Laravel4 snippets

1. Web server configuration

For Apache , Nginx & lighttpd



2. Optional route parameter


 return "Returning info from  {$country_name} ."; 

So when the url will be

 /country - I will display

Returning info from Romania

 /country/USA - I will display

Returning info from USA

3. Multiple filters

You can call multiple filter using the | pile line.

	'before' => 'auth|is_allowed', function()
  	 return View::make('gold'); }