Rule of Three (Programming)

Rule of Three (Programming)

Lambert M. Surhone, Mariam T. Tennoe, Susan F. Henssonow

     

бумажная книга



Издательство: Книга по требованию
Дата выхода: июль 2011
ISBN: 978-6-1313-7360-2
Объём: 92 страниц
Масса: 160 г
Размеры(В x Ш x Т), см: 23 x 16 x 1

High Quality Content by WIKIPEDIA articles! Rule of three is a code refactoring rule of thumb to decide when a replicated piece of code should be replaced by a new procedure. It states that you are allowed to copy and paste the code once, but that when the same code is replicated three times, it should be extracted into a new procedure. The rule was introduced by Martin Fowler in Refactoring and attributed to Don Roberts. Duplication in programming is a bad practice because it makes the code harder to maintain. When the rule encoded in a replicated piece of code changes, whoever maintains the code will have to change it in all places correctly. This process is error-prone and often leads to problems. If the code exists in only one place, then it can be easily changed there.

Данное издание не является оригинальным. Книга печатается по технологии принт-он-деманд после получения заказа.

Каталог