Код, который легко перевести на псевдокод, лучше. Об этом свидетельствуют приведенные выше примеры. Что сказать дольше?
"Start php, do this 30 times:, then stop php. Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php..."
"Start php, do this 30 times: print this, then add this to that, then add this to that, then add this to that, then add this to that, then add this to that, then add this to that..."
"Start php, do this 30 times: print this, print this, print this, print this, print this, print this, print this..."
Лично я бы сделал:
"Start php, define this, do this 30 times: add this to that. Print."
Техническое объяснение о том, как работает переводчик и почему один путь быстрее другого, не имеет значения для новичка. Лучше всего просто знать правила большого пальца:
- Чем проще, тем лучше.
- Если он не помещается на одной странице, значит, он делает слишком много (сломайте его).
- Если вы не можете вручную написать псевдокод на карточке, это слишком сложно.
Используйте больше тегов, если общий результат проще. Период.