2016-03-10

orleanz: (main)
2016-03-10 12:21 pm

А как вам такой юнит тест

Есть значит фукнкция func1(arg) которая состоит из одной строчки, а именно, вызов функции func2(arg, true), то есть, просто обертка добавляющая еще один аргумент

И вот, для такой функции в нашем проекте ОБЯЗАТЕЛЬНО должен быть юнит тест, который заключается в том, что ставится джасмин спай на func2, потом вызывается func1(42), и потом критерий успешности юнит теста в том, что спай репортует, что func2 была вызвана с аргументами [42, true]

Считается, что такие юнит тесты очень помогают нашему проекту сохранять качество кода. Cчитается, что сценарий "помощи" такого юнит теста такой: Некий картонный дурилка, значит, решит порефакторить код func1. Дурилка скажет себе - Ха, а давайте вызывать func2 не с аргументами [arg, true], а лучше вызывать с аргументами [arg, false]

Только дурилка такой чейндж закоммитил, а ему билд сервер по рукам - херакс! суко, ты сломал юнит тест!

Дурилка сразу такой - ой, точно! И сразу все откатит назад, и все будут довольны

ВАЖНОЕ ДОПОЛЕНИЕ - речь не идет про иллюстрации идеи юнит-тестирвования. Речь про абсолютно реальный пример без преувеличения. Вот именно такой уан-лайнер и такой тест, только имена другие. При этом, конечно, кладется с прибором на тот факт, что дурилка, обычно, если такое делает, то еще меняет и юнит тест, и в результате ошибка совершенно не видна. Но это уже всем пофигу. Главное, что у нас 5000 юнит тестов которые бегут 10 минут, если всех их запустить, и мы офигительно удолетворяем современным способам контроля качества.
orleanz: (main)
2016-03-10 06:25 pm

Наслаждаюсь своим новым скриптом сортировки коллекции

http://orleanz.livejournal.com/2077525.html

Вот например копи-пейст из консоли прямо сейчас

dmitri$ node classifier.js

*** Audio Collection Classifier ***

[Usage]

Press one of the following keys to manage selection process:

A to accept (move to 'good' directory),
D to dump (move to 'bad' directory),
S to skip to next file (no file move),
F to accept when finished (play until the end, then move to 'good' directory),

Control+C to exit.

[playing]: Aural Float - Be As You Are.mp3
[dumped]: Aural Float - Be As You Are.mp3
[playing]: Softwaver - Fuehler.mp3
[playing]: Cutler - P-A-Y-R.mp3
[dumped]: Cutler - P-A-Y-R.mp3
[playing]: Gaszia - Lost.mp3
[dumped]: Gaszia - Lost.mp3
[playing]: Chill Carrier - Peaceful Deep.mp3
[playing]: Gabor Deutsch - Forgotten Toys.mp3
[playing]: Afterlife - How Does It Feel.mp3
[playing]: Tetris - I've Said.mp3
[playing]: Boot Cut Rockers - Dream Your Dream.mp3
[playing]: Fila Brazillia - Do The Hale-bop.mp3
[playing]: Underworld - River Of Bass.mp3
[dumped]: Underworld - River Of Bass.mp3
[playing]: Ingo Pickhan - Mark & Harp (Chillwalker Instr.mp3
[dumped]: Ingo Pickhan - Mark & Harp (Chillwalker Instr.mp3
[playing]: Bluetech - Thunder Song.mp3
[dumped]: Bluetech - Thunder Song.mp3
[playing]: Nun's Chaostry - Io.mp3
[dumped]: Nun's Chaostry - Io.mp3
[playing]: Blackfish - Victoria.mp3
[accepted]: Blackfish - Victoria.mp3
[playing]: Modaji - Starbursts Over Orion.mp3
[dumped]: Modaji - Starbursts Over Orion.mp3
[playing]: Zoomin' Feat. Fay Sephirah - Purify Myself (Instrumental).mp3
[will be accepted after playback is finished]: Zoomin' Feat. Fay Sephirah - Purify Myself (Instrumental).mp3
[accepted]: Zoomin' Feat. Fay Sephirah - Purify Myself (Instrumental).mp3
[playing]: M-Seven - World In A Raindrop.mp3
[playing]: Sandoz - Beam.mp3
orleanz: (main)
2016-03-10 06:34 pm

Френды, вы согласны с таким описанием Водопада?

Agile is often sold in comparison to “Waterfall”. What is Waterfall?

Waterfall is legitimately terrible. It’s a “work rolls downhill” model in which each tier of the organizational hierarchy picks off what it consider to be “the fun stuff”, and passes the rest down the line. Projects are defined by executives, design is done by architects, personal deadlines are set by middle managers, implementation is performed by the top-tier grunts (programmers) and then operations and testing are handed off to the lower tiers of grunts. It’s extremely dysfunctional. When people have a sense that all of the important decisions have been made, they’re not motivated to do their best work.

Waterfall replicates the social model of a dysfunctional organization with a defined hierarchy. Agile, quite often, replicates the social model of a dysfunctional organization without a well-defined hierarchy.