Голландия, Голландия…

March 12th, 2008

Раз, два, три.

Игорь Манн, Гэрри Линн, Ричард Рейли

December 19th, 2007
Давайте посмотрим на «пять золотых правил создания новых продуктов, определяющих результат». Вот они.

1. Полная поддержка руководства, но не прямое его участие в разработке.
2. Ясное и четкое видение цели.
3. Импровизация.
4. Свободный обмен информации.
5. Сотрудничество по необходимости.

Авторы с цифрами в руках доказывают, что успех светит тем, кто использует каждое правило, а уж если все пять «тузов» у вас на руках, то вероятность создания блокбастера подскакивает до 96% (попробуйте-ка, однако, их собрать! Одна «полная поддержка руководства» чего стоит…)

Еще интересный факт – цитата Энди Герцфельда, работавшего над Apple II: «Нельзя разработать революционно новый продукт, спрашивая клиентов, что им нужно. Клиенты всегда хотят на десять процентов больше того, что имеют. Они не знают возможностей и не представляют революционный продукт». О да.

Почерпано из ЖЖ Игоря Манна

Тест Джоеля. Место действия: Украина, веб. (Russian, for webdev.org.ua)

November 16th, 2007

Все, вероятно, слышали про легендарный Joel Test, который упрощенно показывает степень зрелости процессов разработки IT-проектов. Тем, кто про него не слышал - рекомендую обратиться к первоисточнику на Сайте Джоеля.

Ок, это замечательный тест, мне лично он очень нравится.
Но некоторые пункты в нем не совсем понятны, или же допускают двоякое толкование.
Хочу предложить вам свою вольную интерпретацию теста Джоеля, адаптированную для разработки веб-проектов в украинских реалиях (основываясь на личном опыте, разумеется). Я также попытался сделать предположения о том, к чему приводит низкая оценка по каждому из пунктов.
Все нижесказанное имеет субъективный характер, и не претендует на истинность.
Read the rest of this entry »

AJAX ready solutions: do not invite new bicycles

August 22nd, 2007

http://nildesign.ru/2007/08/12/80-ajax-reshenij

Video is good for you: learning JS

July 17th, 2007

http://freescienceonline.blogspot.com/2007/05/programming-video-education-lectures.html?search=programming

Стоимость CAPTCHA-защиты. (Russian)

July 10th, 2007

CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart), один из вариантов обратного теста Тьюринга, все чаще и чаще появляется на сайтах, страдающих под натиском ботов, то есть автоматических программ — имитаторов деятельности пользователей. Это происходит в случае столкновения интересов нескольких сторон: администрации сайта, программистов, «хакеров», пользователей сайта и, возможно, некоего заказчика атаки. Впрочем, слово «хакер» здесь вполне можно употреблять без кавычек: для успешной сложной атаки необходимо действительно хорошо разбираться в веб-технологиях и противодействовать специально защищенным системам.

Рассмотрим интересы и мотивации каждой из сторон. Администрация сайта занимается своим проектом: зарабатывает на нем деньги (или получает моральное удовольствие), управляет своим персоналом (программистами, администраторами, редакторами) и радуется высокой популярности ресурса. Популярность, как правило, измеряется количеством людей, посещающих сайт и пользующихся его сервисами: читающих статьи, переписывающихся в почте, оставляющих и читающих комментарии и так далее.
Read the rest of this entry »

Something to read, something to use.

July 10th, 2007

http://www.smashingmagazine.com/2007/07/09/best-of-mayjune-2007/

New York Times

June 11th, 2007

My project ocr-research.org.ua becomes popular :)

NYT found me as an interesting guy to speak about the CAPTCHAs.
Read here.

How can I comment this?
I dislike this separation to spammers and good guys. Breaking CAPCTHA, if you want to know, does not really help spammers - email systems doesn’t use CAPCTHAs for sending mails (only for registration, but again - it’s not the spammers targets). Computer vision is a great data domain, it’s an excellent field to apply IT knowledge, and CAPTCHAs are the perfect tasks. It’s like a challenge: “look what I’ve done, try to beat me”. They are just created for this purpose. Such challenges are very useful for any automated system - it makes it better. Are hackers good? Yes on No - but anyhow thanks to them! Current versions of *NIXes are stable and invulnerable because of their permanent attention to this.
Every lock and limit firstly causes an attempt to overcome it. This is just natural.

Reсognizing CAPTCHAs is fun. Very fun.

+ for PHP arrays

May 28th, 2007

$a + $b is the same as $b + $a?
No, if $a and $b are arrays.

what does '+' for array arguments? Let's ask man:

The + operator appends the right handed array to the left handed, whereas duplicated keys are NOT overwritten.

Must be understood. If you know how array keys are set by default:
when you are writing something like

$a[]=1;

If you do not specify a key for a given value, then the maximum of the integer indices is taken, and the new key will be that maximum value + 1. If you specify a key that already has a value assigned to it, that value will be overwritten.

If no integer values are in keys - it sets zero.

This means that you must be very sure about your keys when you use '+' for arrays. Because '+' works basing on keys, not the values.

And how it works with '-'?
Nohow. Sorry, guys. '-' is not defined for PHP arrays.

A little bonus:
Comparison is defined for PHP arrays. Here is how it works:

array vs. array
Array with fewer members is smaller, if key from operand 1 is not found in operand 2 then arrays are uncomparable, otherwise - compare value by value

array vs. anything
array is always greater

A little note:
'==' and '===' works differently.
yes, both or then checks if arrays have same amount of elements, same keys, and values must be ==/=== (correspondingly) for sure. But '===' also checks the sequence of elements. So

$a = array(1=>1,2=>2,3=>'3');
$b = array(1=>1,2=>2,3=>3);
$c = $a==$b; //true
$c = $a===$b; //false
//
$a = array(1=>1,3=>3,2=>2);
$b = array(1=>1,2=>2,3=>3);
$c = $a==$b; //true
$c = $a===$b; //false
//
$a = array(1=>1,2=>2,3=>3);
$b = array(1=>1,2=>2,3=>3);
$c = $a==$b; //true
$c = $a===$b; //true

Magic list()

May 22nd, 2007

list() - is a very interesting PHP construct.
Let's read the man:

list — Assign variables as if they were an array
Description
void list ( mixed $varname, mixed $... )

Like array(), this is not really a function, but a language construct. list() is used to assign a list of variables in one operation.

So, the usage may be as following:

$a = array(1,2,3,4,5,);//yes, yes, last comma is completely correct for php array
list($b, $c, $d) = $a;

echo $b.'-'.$c.'-'.$d;

Outputs:
1-2-3

sure.

And now a little trick. Look:

$a = array(1,2,3,4,5,);//yes, yes, last comma is completely correct for php array
list(, $b, $c, $d) = $a;

echo $b.'-'.$c.'-'.$d;

Outputs:
2-3-4

OK, where should I use it?
First idea - ugly functions like imagettfbbox()
Take a look:

Return Values

imagettfbbox() returns an array with 8 elements representing four points making the bounding box of the text:
0 lower left corner, X position
1 lower left corner, Y position
2 lower right corner, X position
3 lower right corner, Y position
4 upper right corner, X position
5 upper right corner, Y position
6 upper left corner, X position
7 upper left corner, Y position

So, you can make code better using list here. For example:

list($left_x,$bottom_y,$right_x, , ,$top_y) = imagettfbbox($some, $params, $here, $as, $usual);

Generally, it allows to extract and rename few needed variables from an array you don't need.

Here is something to think about:

$a = array(1,2,3,4,5,);
list($b[], $b[], $c, $d) = $a;

print_r($b);
echo $b.'-'.$c.'-'.$d;

This outputs:
Array ( [0] => 2 [1] => 1 ) Array-3-4

Take a look at the array $b elements: they are ordered vice versa

and if we will write

list($b[0], $b[1], $c, $d) = $a;

instead of corresponding line, we will get
Array ( [1] => 2 [0] => 1 ) Array-3-4

Seems like arguments are stored in opposite order somewhere...