05 Test-driven+Development Pair Programming
05 Test-driven+Development Pair Programming
Lesson Transcript 03
Transcript + Translation 09
Vocabulary 22
Grammar 25
Mistakes 29
Today I’m gonna tell you about TDD, that means Test-Driven Development. Test-
Driven Development is my favorite development practice. The first time I read about
it, it was about 2003, in the book “Extreme Programming” from Kent Beck.
But actually, when I think about it, Test-Driven Development is, yeah, the way
you natively go on software development, because when I was starting writing
programs as a child, I was just... thought about a little thing to change, and then, yeah,
changed the code and tested if it’s actually running.
At Test-Driven Development, you write executable tests. You really write the tests
first, before you write any code. Once, I was holding a talk at a conference, and it was
a workshop, and one of the guys gave me feedback and said: “This guy is crazy. He
really writes his tests first.” But that’s what TDD is about.
The first phase of TDD is writing a test which is failing. The next phase of TDD
is writing the code to make the test pass, so, making the test run through. And after
that, comes the third phase, and you don’t... should never forget this one, it’s
refactor. Because at TDD, you refactor your code frequently, so it never gets messed
up completely. There’s no refactoring at the end of the month, end of the year or
whatever. You do it directly in the TDD cycles every few minutes.
Yeah, there are three phases of TDD. It’s first: write a test which is failing; we call it
also “red”, so ‘make it red’. The next one is ‘make it green’: write the code which makes
the test pass; it means only the code making the test pass, nothing more, just enough
to make the test pass.
3
Lesson Transcript Test-Driven Development & Pair Programming
And then, refactor. That are the three phases of TDD, and there are many
advantages, yeah, if you go through.
If you create code this way, you will never write code which is not tested. You even
never have the problem you miss to write the test at the end of coding phase
or before release, when you say, “There is no time for tests. I’m gonna make them later”.
If you learn the TDD practices, you will be very good in your hand skills. Some people
call it “software craftsmanship”. You’ll be able to write tests really fast, so you don’t
lose time writing tests. There are many things how you can practice it, and you will
only create testable code.
There are a lot of ways to practice TDD. One of the best things is pair programming.
It’s even a good method… yeah, if you want to introduce TDD to your company, or it’s a
good method for real work. Pair programming, you need a partner. For me, it’s a... for
example, it’s a PHP elephant.
But in real life or real projects, it will take a real partner, in most cases, my
coworker. If I’m at the same location, we both sit on the same mouse and same keyboard.
They’re shared. One guy becomes the driver – he has mouse and keyboard – and
the other one becomes the navigator. Actually, the driver is not thinking, he just does
what the navigator says, and the navigator is… yeah, telling him what to do.
4
Lesson Transcript Test-Driven Development & Pair Programming
You change positions frequently. For example, you can change them by a certain
time. I used to have a timer within my lessons, so you can have a 10-minutes timer.
Or you can switch it with any phase. So, one is writing the test, the next one
is writing the code, and the next one is doing the refactoring. So you have to
switch between them.
If you are not in the same place, many of the… yeah, actual development environments,
like Visual Studio Code, or IntelliJ, or PhpStorm, they have included live collaboration
tools, which make it possible to work with your coworker over the internet
from somewhere over the world – for example, from Brazil and Germany, or
Singapore and Spain.
You can work together by collaboration, and it feels like if you’re on the same
machine. Of course, you need also audio communication, but it makes it really
feel as if you sit on the same PC.
One famous coding kata is the Roman numbers kata, where you write a translator for
your Roman number. There are several other katas on the internet. Just go to GitHub
and search for coding katas. They’re available for any language.
5
Lesson Transcript Test-Driven Development & Pair Programming
TDD is possible with any programming language today. For JavaScript, there are
several ones, like Jest. There’s PHPUnit for PHP, there’s JUnit for Java, there is...
I think it’s called NUnit for .NET, and for the most other ones, there’s also… yeah, a
unit testing framework to practice TDD.
A little problem is if you want to introduce TDD to existing projects. As I told you, if you
write your code with TDD, your design emerges from the test and from the code and
from the phases, and you will write perfectly testable code.
But if you already created code which was not created the TDD way, it might highly
be that your code is not as testable as real TDD code. So, you have to make
workarounds and you have to make it testable. That does not occur if you start with
a new project and begin with TDD from the first day. So, using TDD makes your code
better testable by automizable test.
Another thing you can use with TDD... is not even using your tests while development,
but have a system executing your tests frequently, and this system is called
a “continuous integration system”. There are many different “continuous integration
systems” on the market.
My favorite one is GitLab CI, but there is also Jenkins. You can execute it in Bitbucket.
You can use GitHub Actions. You can use TeamCity and I think Bamboo. We will find
some more… GoCD, for example. This system executes a test automatically
when you check the code into the version control system, to Git, and yeah, it
will give you a feedback if the test is not run.
6
Lesson Transcript Test-Driven Development & Pair Programming
So, with continuous integration, you can make sure your tests are automatically executed
any time you submit code to the version control system – and not only you, but also
your coworkers, which is sometimes really… yeah, really useful.
If somebody breaks a test you wrote – that means, yeah, put something in the code and
your test is not running anymore – you will get a notification and you will see it directly
and can correct it directly.
Yeah, that’s the TDD. The most important are the three phases, and it’s really important
that you practice TDD. As more you practice, as faster you get, and easier it gets
to use it. And to be honest, sometimes it’s a lot of fun practicing TDD. I was going to a
lot of “software craftsmanship” meetings where people, actually, they are testing TDD,
practicing TDD, and I worked together with a lot of different people.
I also use TDD to learn new programming languages. For example, Python was
something I never did before, but yeah, with a pair-programming partner
who was into Python, it was easy. Then, I teach him PHP, which is my favorite
programming language. So, both could learn from each other.
That’s another advantage of pair programming: that you learn from each other
when you work together, and both have the same knowledge. Sometimes you learn,
really… yeah, high level things, like architecture, and sometimes you learn really
easy things, just getting a new useful shortcut from your colleague you didn’t
know before.
7
Lesson Transcript Test-Driven Development & Pair Programming
And there’s another higher level of TDD, which is called “Acceptance Test-Driven
Development”. That means you start with writing down your requirements as
test. Not only when you are programming. Start to write tests already when you do the
requirement engineering.
For example, if you do it yourself or have a business engineer, you write it down in
a specific language, and it’s a more natural language, not really a programming
language. It’s called Gherkin, it’s a “Given-When-Then” language. And yeah, you
already write your acceptance criteria down and make it testable later
by so-called “glue code”.
Both are practices to learn. It’s… yeah, not a thing you need to read one time and you
can do it. You need to practice it again and again. But if you practice it, it’s really useful.
You will write better code. You will have less bugs in production, you will have to
fix less bugs later, and you can write your tests easily and fast just inside the code.
So, that’s TDD, my favorite development practice, and I hope you like it. I hope
you will try it out, and thank you for listening.
8
Transcript + Translation Test-Driven Development & Pair Programming
English Português
Today I’m gonna tell you about TDD, Hoje eu vou falar para você sobre TDD,
that means Test-Driven Development. que significa Desenvolvimento Orientado
Test-Driven Development is my favorite a Testes. O Desenvolvimento Orientado
development practice. The first time I a Testes é a minha prática de desenvolvi-
read about it, it was about 2003, in the mento favorita. A primeira vez que eu li
book “Extreme Programming” from Kent sobre isso foi por volta de 2003, no livro
Beck. “Extreme Programming” de Kent Beck.
But actually, when I think about it, Test- Mas, na verdade, quando eu penso nisso,
Driven Development is, yeah, the o Desenvolvimento Orientado a Testes
way you natively go on software é, sim, a maneira que você nativamente
development, because when I was aborda o desenvolvimento de software,
starting writing programs as a child, I porque quando eu estava começando a
was just... thought about a little thing to escrever programas quando criança, eu
change, and then, yeah, changed the code só estava... pensava em uma coisinha
and tested if it’s actually running. para mudar, e aí, sim, mudava o código
e testava se ele está realmente rodando.
9
Transcript + Translation Test-Driven Development & Pair Programming
English Português
Once, I was holding a talk at a conference, Uma vez, eu estava dando uma palestra
and it was a workshop, and one of the em uma conferência, e era um workshop,
guys gave me feedback and said: “This e um dos caras me deu um feedback e
guy is crazy. He really writes his tests first.” disse: “Esse cara é louco. Ele realmente
But that’s what TDD is about. escreve os testes dele primeiro.” Mas é
disso que se trata o TDD.
Yeah, there are three phases of TDD. Sim, existem três fases do TDD.
10
Transcript + Translation Test-Driven Development & Pair Programming
English Português
If you create code this way, you will never Se você criar código dessa maneira, você
write code which is not tested. You even nunca escreverá código que não esteja
never have the problem you miss to testado. Você até mesmo nunca tem o
write the test at the end of coding problema de você esquecer de escrever
phase or before release, when you say, o teste no final da fase de codificação ou
“There is no time for tests. I’m gonna make antes do lançamento, quando você diz:
them later”. “Não há tempo para testes. Eu vou fazê-los
mais tarde ”.
If you learn the TDD practices, you will be Se você aprender as práticas de TDD, você
very good in your hand skills. vai ser muito bom em suas habilidades
manuais.
11
Transcript + Translation Test-Driven Development & Pair Programming
English Português
There are a lot of ways to practice TDD. One Existem muitas maneiras de praticar TDD.
of the best things is pair programming. Uma das melhores coisas é a programação
It’s even a good method… yeah, if you em par. É um bom método até mesmo...
want to introduce TDD to your company, sim, se você quiser apresentar o TDD à
or it’s a good method for real work. Pair sua empresa, ou é um bom método para
programming, you need a partner. For trabalho real. Programação em par, você
me, it’s a... for example, it’s a PHP elephant. precisa de um parceiro. Para mim, é um...
por exemplo, é um elefante PHP.
But in real life or real projects, it will Mas na vida real ou projetos reais, vai ser
take a real partner, in most cases, my necessário um parceiro real, na maioria
coworker. If I’m at the same location, we dos casos, meu colega de trabalho. Se
both sit on the same mouse and same eu estiver no mesmo local, nós dois nos
keyboard. They’re shared. sentamos no mesmo mouse e no mesmo
teclado. Eles são compartilhados.
12
Transcript + Translation Test-Driven Development & Pair Programming
English Português
One guy becomes the driver – he has Um cara se torna o piloto - ele tem mouse
mouse and keyboard – and the other e teclado - e o outro se torna o navegador.
one becomes the navigator. Actually, the Na verdade, o piloto não está pensando,
driver is not thinking, he just does what ele apenas faz o que o navegador diz, e o
the navigator says, and the navigator is… navegador está... sim, dizendo a ele o que
yeah, telling him what to do. fazer.
If you are not in the same place, many Se vocês não estiverem no mesmo
of the… yeah, actual development lugar, muitos dos... sim, ambientes
environments, like Visual Studio Code, or de desenvolvimento reais, como o
IntelliJ, or PhpStorm, Visual Studio Code, ou o IntelliJ, ou
o PhpStorm,
13
Transcript + Translation Test-Driven Development & Pair Programming
English Português
You can work together by collaboration, Vocês podem trabalhar juntos por
and it feels like if you’re on the same colaboração, e dá a sensação de como
machine. Of course, you need also se vocês estivessem na mesma máquina.
audio communication, but it makes it É claro, vocês também precisam de
really feel as if you sit on the same PC. comunicação de áudio, mas isso
realmente dá a sensação de como se
vocês estivessem sentados no mesmo PC.
There are several exercises to learn Existem vários exercícios para aprender
Test-Driven Development, and one of o Desenvolvimento Orientado a Testes, e
my favorite exercises is “coding katas”. um dos meus exercícios favoritos é “katas
de codificação”.
14
Transcript + Translation Test-Driven Development & Pair Programming
English Português
“Coding katas” are little tasks which you “Katas de codificação” são pequenas
can perform to learn the way of Test- tarefas que você pode realizar para
Driven Development, so you can build aprender o caminho do Desenvolvimento
up to your skills and get faster. Orientado a Testes, para que você possa
desenvolver as suas habilidades e ficar
mais rápido.
One famous coding kata is the Roman Um famoso kata de codificação é o kata
numbers kata, where you write a dos números romanos, onde você escreve
translator for your Roman number. There um tradutor para o seu número romano.
are several other katas on the internet. Existem vários outros katas na internet.
Just go to GitHub and search for coding Basta ir ao GitHub e pesquisar katas de
katas. They’re available for any language. codificação. Eles estão disponíveis para
qualquer linguagem.
TDD is possible with any programming O TDD é possível com qualquer linguagem
language today. For JavaScript, there are de programação hoje. Para JavaScript,
several ones, like Jest. There’s PHPUnit existem vários, como o Jest. Existe o
for PHP, there’s JUnit for Java, there is... PHPUnit para PHP, existe o JUnit para Java,
I think it’s called NUnit for .NET, and for existe... eu acho que ele se chama NUnit
the most other ones, there’s also… yeah, para .NET, e para a maioria dos outros,
a unit testing framework to practice existe também... sim, um framework de
TDD. testes unitários para praticar TDD.
15
Transcript + Translation Test-Driven Development & Pair Programming
English Português
But if you already created code which was Mas se você já criou um código que não foi
not created the TDD way, it might highly criado da maneira TDD, é muito provável
be that your code is not as testable que o seu código não seja tão testável
as real TDD code. So, you have to make quanto um código TDD real. Então, você
workarounds and you have to make tem que fazer soluções alternativas e você
it testable. That does not occur if you tem que torná-lo testável. Isso não ocorre
start with a new project and begin with se você começar com um novo projeto e
TDD from the first day. So, using TDD começar com TDD desde o primeiro dia.
makes your code better testable by Então, usar TDD torna o seu código melhor
automizable test. testável por testes automatizáveis.
Another thing you can use with Uma outra coisa que você pode usar com
TDD... is not even using your TDD... é nem mesmo usar os seus testes
tests while development, but durante o desenvolvimento, mas ter
have a system executing your tests um sistema executando os seus testes
16
Transcript + Translation Test-Driven Development & Pair Programming
English Português
My favorite one is GitLab CI, but there is also O meu favorito é o GitLab CI, mas também
Jenkins. You can execute it in Bitbucket. existe o Jenkins. Você pode executá-lo
You can use GitHub Actions. You can use no Bitbucket. Você pode usar o GitHub
TeamCity and I think Bamboo. We will find Actions. Você pode usar o TeamCity
some more… GoCD, for example. This e eu acho que o Bamboo. Nós vamos
system executes a test automatically encontrar mais alguns... o GoCD, por
when you check the code into the exemplo. Esse sistema executa um teste
version control system, to Git, and automaticamente quando você submete
yeah, it will give you a feedback if the o código para o sistema de controle de
test is not run. versão, para o Git, e sim, ele vai te dar um
feedback se o teste não for executado.
So, with continuous integration, you can Portanto, com a integração contínua, você
make sure your tests are automatically pode garantir que os seus testes sejam
executed any time you submit code to executados automaticamente sempre
the version control system – and not only que você submeter código para o sistema
you, but also your coworkers, de controle de versão - e não apenas você,
mas também os seus colegas de trabalho, 17
Transcript + Translation Test-Driven Development & Pair Programming
English Português
which is sometimes really… yeah, really o que às vezes é muito... sim, muito útil.
useful. If somebody breaks a test you Se alguém quebrar um teste que você
wrote – that means, yeah, put something escreveu – ou seja, sim, colocar algo no
in the code and your test is not running código e o seu teste não estiver mais
anymore – you will get a notification and rodando - você vai receber uma notificação
you will see it directly and can correct it e você vai ver diretamente e pode corrigi-
directly. lo diretamente.
Yeah, that’s the TDD. The most important Sim, isso é o TDD. O mais importante são
are the three phases, and it’s really as três fases, e é muito importante que
important that you practice TDD. As more você pratique TDD. Quanto mais você
you practice, as faster you get, and pratica, mais rápido você fica, e mais fácil
easier it gets to use it. And to be honest, fica de usar isso. E para ser honesto, às
sometimes it’s a lot of fun practicing vezes é muito divertido praticar TDD. Eu
TDD. I was going to a lot of “software ia a muitas reuniões de “artesanato de
craftsmanship” meetings where people, software” onde as pessoas, na verdade,
actually, they are testing TDD, practicing elas estão testando TDD, praticando TDD,
TDD, and I worked together with a lot of e eu trabalhava junto com muitas pessoas
different people. diferentes.
I also use TDD to learn new programming Eu também uso TDD para aprender novas
languages. For example, Python was linguagens de programação. Por exemplo,
something I never did before, Python era algo que eu nunca tinha feito
antes, 18
Transcript + Translation Test-Driven Development & Pair Programming
English Português
And there’s another higher level of TDD, E tem um outro nível mais alto de TDD,
which is called “Acceptance Test-Driven que é chamado de “Desenvolvimento
Development”. That means you start Orientado a Testes de Aceitação”. Isso
with writing down your requirements significa que você começa anotando os
as test. seus requisitos como um teste.
19
Transcript + Translation Test-Driven Development & Pair Programming
English Português
Not only when you are programming. Não apenas quando você estiver
Start to write tests already when you do programando. Comece a escrever testes
the requirement engineering. já quando você fizer a engenharia de
requisitos.
For example, if you do it yourself or have a Por exemplo, se você faz isso sozinho
business engineer, you write it down in a ou tem um engenheiro de negócios,
specific language, and it’s a more natural você anota isso em uma linguagem
language, not really a programming específica, e é uma linguagem mais
language. It’s called Gherkin, it’s a “Given- natural, não realmente uma linguagem de
When-Then” language. And yeah, programação. Chama-se Gherkin, é uma
you already write your acceptance linguagem “Given-When-Then”. E sim,
criteria down and make it testable você anota os seus critérios de aceitação
later by so-called “glue code”. antecipadamente e os torna testáveis
mais tarde através do chamado “glue
code”.
Both are practices to learn. It’s… yeah, not Ambos são práticas para se aprender. É...
a thing you need to read one time and you sim, não é uma coisa que você precise
can do it. You need to practice it again ler uma vez e você possa fazê-la. Você
and again. But if you practice it, it’s really precisa praticá-la inúmeras vezes. Mas se
useful. You will write better code. você praticá-la, ela é muito útil. Você vai
escrever um código melhor.
20
Transcript + Translation Test-Driven Development & Pair Programming
English Português
You will have less bugs in production, Você vai ter menos bugs em produção,
you will have to fix less bugs later, você vai ter que consertar menos bugs
and you can write your tests easily and posteriormente, e você poderá escrever
fast just inside the code. os seus testes de maneira fácil e rápida
apenas dentro do código.
So, that’s TDD, my favorite development Então, isso é TDD, a minha prática de
practice, and I hope you like it. I hope desenvolvimento favorita, e eu espero
you will try it out, and thank you for que vocês gostem. Eu espero que você a
listening. experimente, e obrigado por escutar.
21
Vocabulary Test-Driven Development & Pair Programming
22
Vocabulary Test-Driven Development & Pair Programming
refactoring Compartilhado.
23
Vocabulary Test-Driven Development & Pair Programming
to submit so-called
glue code
to be into (something)
Código cola. Expressão que se refere
Interessar-se por (algo). a um código que não contribui para
nenhuma funcionalidade do programa,
shortcut e serve somente para unir (to glue)
Atalho. diferentes partes de um código que de
outra forma não seriam compatíveis.
to try out (something)
again and again
Experimentar (algo), provar (algo), a fim
de testar se essa coisa funciona bem ou Inúmeras vezes, repetidamente, repetidas
como esperado. vezes.
24
Grammar Test-Driven Development & Pair Programming
Veremos na seção Mistakes que a frase correta seria “you can have
a 10-minute timer”.
25
Grammar Test-Driven Development & Pair Programming
one is writing the test, the next one is writing the code, and
the next one is doing the refactoring
26
Grammar Test-Driven Development & Pair Programming
Outros exemplos:
27
Grammar Test-Driven Development & Pair Programming
Phrasal verbs são formados por um verbo e mais uma (ou mais)
palavras, que geralmente é uma preposição ou um advérbio.
Quando usamos em uma frase, geralmente o verbo e a
preposição/advérbio de um phrasal verb ficam juntos. Porém, em
alguns casos, é possível separá-los, jogando a preposição/advérbio
pro final da frase. Por exemplo, podemos dizer tanto “you (...)
write down your acceptance criteria”, quanto “you (...) write your
acceptance criteria down”. Ambas as formas estão corretas!
28
Mistakes Test-Driven Development & Pair Programming
Neste curso, você talvez já tenha notado que nem todos os professores são
falantes nativos de inglês. Isso foi proposital, para te mostrar que é possível ser
extremamente fluente em inglês, a nível de trabalhar e fazer apresentações no
idioma, e mesmo assim cometer pequenos errinhos.
Nesta seção, vamos explicar quais foram esses errinhos cometidos durante a
aula e como corrigi-los.
practice
Explicação: Um pequeno erro de pronúncia. A pronúncia correta é “practice”.
Frase correta: Test-Driven Development is, yeah, the way you natively go about
software development
Explicação: O phrasal verb correto a ser usado aqui é “to go about”, que já vimos na
seção Vocabulary e tem o sentido de “abordar (algo)”, “proceder em (fazer algo)”, ocupar-
se em (fazer algo), dependendo do contexto.
At Test-Driven Development
Frase correta: In Test-Driven Development
Explicação: A preposição correta a ser usada com uma matéria de estudo é “in”, e não
“at”.
29
Mistakes Test-Driven Development & Pair Programming
Explicação: Como ele está falando sobre uma fase, temos que usar um substantivo ou
um verbal noun aqui, dessa forma, o correto é usar “refactoring”.
at TDD
Frase correta: in TDD
Explicação: Novamente, a preposição correta a ser usada com uma matéria de estudo
é “in”, e não “at”.
cycles
Explicação: Um pequeno erro de pronúncia. A pronúncia correta no singular é “cycle”.
30
Mistakes Test-Driven Development & Pair Programming
Explicação: O phrasal verb “to go through” pede um objeto direto como complemento.
Soa estranho e incompleto usá-lo sem algum objeto. Assim, como o instrutor estava
falando sobre as três fases de TDD, podemos usar o object pronoun “them”.
You even never have the problem you miss to write the test at the
end of coding phase
Frase correta: You never (even) have the problem (that) you forget to write the test
at the end of the coding phase
Primeiramente, “even never” soa muito estranho”. Você pode dizer “never even”, ou
então apenas “never”.
O verbo “to miss” não soa bem nesse contexto. O instrutor quis passar a ideia de “não
fazer (algo)”, então podemos trocar por “to forget” (esquecer).
Por fim, como trata-se de uma fase específica, faltou o artigo definido “the”.
31
Mistakes Test-Driven Development & Pair Programming
practices
Explicação: Um pequeno erro de pronúncia. A pronúncia correta é “practices”.
Explicação: A palavra “how” não se encaixa bem nessa frase. Temos que alterá-la para
“There are many things you can do to practice it.” (Existem muitas coisas que você pode
fazer para praticar isso), ou então para “There are many ways (for you) to practice (it).”
(Existem muitas maneiras (para você) de praticar isso).
Explicação: Como vimos na seção Grammar, quando usamos palavras contáveis como
adjetivo ou como parte de uma locução adjetiva (aqui “10-minute”), além de precisarmos
do hífen, essa palavra estará sempre no singular.
32
Mistakes Test-Driven Development & Pair Programming
switch
Explicação: Um pequeno erro de pronúncia. Parece que o instrutor sem querer
pronuncia algo como “search”, mas o verbo correto a ser usado é “switch”. A pronúncia
correta é “switch”.
Explicação: A estrutura correta é “to feel as if…”, e não “like if”. Esse é um erro muito
comum, pois “as” e “like” são sinônimas em alguns casos.
Explicação: O phrasal verb é “to build up (something)”. O “to” não faz sentido aqui.
33
Mistakes Test-Driven Development & Pair Programming
occur
Explicação: Um pequeno erro de pronúncia. A pronúncia correta é “occur”.
Além disso, como se trata de testes em geral, o correto seria usar o plural “tests”.
frequently
Explicação: Um pequeno erro de pronúncia. A pronúncia correta é “frequently”.
requirement
Explicação: Um pequeno erro de pronúncia. A pronúncia correta é “requirement”.
34
Mistakes Test-Driven Development & Pair Programming
Explicação: Temos duas opções para corrigir essa frase. Se quisermos manter o
substantivo “development”, então precisamos da preposição “during”. Já se quisermos
manter a conjunção “while”, então precisamos do verbo “developing”.
This system executes a test automatically when you check the code
into the version control system, to Git
Frases corretas:
• This system executes a test automatically when you submit the code to the version
control system, to Git
• This system executes a test automatically when you check the code in the version
control system, in Git
Explicação: Temos duas possibilidades. A primeira é trocar o verbo “to check” por
“to submit” (submeter), que encaixa melhor nesse contexto de enviar, e aí trocar a
preposição “into” por “to”, que funciona melhor.
Outra opção é manter o verbo “to check” que, nesse contexto de código, pode significar
apenas “verificar”, mas também pode ter o sentido de executá-lo em um ambiente
de testes antes de enviá-lo para produção ou de passar para o próximo estágio de
desenvolvimento. E aí, teríamos que trocar as preposições “into” e “to” por “in”.
Explicação: A palavra “feedback” não é contável, então não faz sentido dizer “to give a
feedback”, basta dizer “to give feedback”.
35
Mistakes Test-Driven Development & Pair Programming
Explicação: A estrutura “quanto mais X, mais Y” em inglês é ser expressada com “the
more X, the more Y”. Uma maneira mais abrangente de expressá-la seria:
Além disso, não soa muito natural usar o verbo “to do” com uma linguagem de
programação ou um idioma (como “English”, “French”). O melhor aqui seria trocá-lo pelo
verbo “to use”.
Finalmente, em frases que temos um verbo auxiliar ao verbo principal (como é o caso no
Present Perfect, Past Perfect e com verbos modais), advérbios como “never” vem sempre
entre o verbo auxiliar (“had”) e o verbo principal (“used”).
36
Mistakes Test-Driven Development & Pair Programming
colleague
Explicação: Um pequeno erro de pronúncia. A palavra “colleague” deve ser
pronunciada como /ˈkɑliɡ/ (pronúncia em I.P.A.), que soa mais ou menos como “kó-lig”
em português, e não como “kó-lij”.
Explicação: O instrutor quis dizer que os critérios devem ser escritos “antes”,
“antecipadamente”, por isso o advérbio “beforehand” funciona melhor aqui do que
“already”.
You will have less bugs in production, you will have to fix less bugs
later
Frase correta: You will have fewer bugs in production, you will have to fix fewer bugs
later
Explicação: Um erro muito comum. Com substantivos contáveis, como “bug”, temos
que usar “fewer” com esse sentido de “menos”. A palavra “less” é usada como adjetivo
apenas com substantivos incontáveis.
37