Knowledge (part 1) – The Map

I am spending a lot of time to realize that it’s not enough to know only php with couple frameworks. And what is the difference between coder and programmer.

As you maybe know I am a php developer(yii framework mostly) for the last 6+ years. Yes, I can solve 90% of problems with this framework and I was a coder. I know how to use the tool without deep background knowledge. I was angry sometimes when my colleagues  had more knowledge than I had. And I understood how it’s called – the competition! And you know that it is a very good tool to work with! At the end of my thinking about it I decided to start from scratch and prepare my learning program to become a programmer.

Probably at the same time I read an article about Debt of knowledge, it was it, exactly my minds in the right reading form. This article explains that when you first time faced with a tool, like php/js framework and started to use it then you didn’t understand how it works. After that you will find the next interesting tool and again you use it, but do not understand the principles of this tool works. This misunderstanding is call Debt of knowledge and someday you will need to pay back. My day of reckoning has arrived :) Continue reading

Examples of validation

In this article I try to combine few examples of validation on yii framework.
1) Check that date in mm/dd/yyyy format will in the future:

1
2
array('startDate, endDate', 'date', 'format' => 'MM/dd/yyyy'),
array('startDate, endDate', 'compare', 'compareValue' => date('m/d/Y'), 'operator' => '>=', 'message'=>'{attribute} must be later or equal than Now.'),

2) Validate time in “g:i a” format:

1
array('startTime, endTime', 'date', 'allowEmpty' => true, 'format' => 'M:m a'),

Continue reading