desafios do profissionalismo Ágil

Post on 22-Dec-2014

1.925 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Victor Hugo Germano apresenta sua visão sobre profissionalismo e os desafios na adoção de metodologias ágies.Através de uma linguagem lúdica, conceitos relacionados a Qualidade, Teste de Software e comprometimento.

TRANSCRIPT

Desafios do Profissionalismo Ágil

Victor Hugo Germano

Eu ? Quem??

Victor Hugo Germano

http://malditacomedia.blogspot.com

Test all the Fucking time!

Qual o nosso papel?

Tempos realmente modernos?

Nos tempos da Brilhantina

Integração

Ciclo Vicioso do Desenvolvimento de

Software

?

?

Desenvolvimento Ágil

AgileTDD

Integração Contínua

BDD

Reunião Diária

Escopo Negociável

Cliente PresenteRetrospectiva

Agile Modeling

SimplicidadePair Programming

Agile BUT

Test all the fucking time?

QUALIDADE

Test all the Fucking time!

“Nos dias de hoje, entregar um linha de código sem que ela seja testada é

Irresponsabilidade Profissional”Robert Uncle Bob

Uncle Bob

Test all the Fucking time!

Qualidade

TESTTEST

TESTTEST

TEST

TEST

TEST

TESTTEST

TEST

TESTTEST TEST

TEST

O que você faz quando a pressão cresce?

Salvem os bebês foca!

Test all the Fucking time!

Keep it Simple!!

Debugging sucks! Testing Rules!

TDD

Profissionalismo

PREGUIÇA

Por que seria diferente?

Quão Sexy é o seu código?

O código

// create some properties and get the default SessionProperties props = new Properties();props.put("mail.smtp.host", _smtpHost);Session session = Session.getDefaultInstance(props, null); // create a messageAddress replyToList[] = { new InternetAddress(replyTo) };Message newMessage = new MimeMessage(session);if (_fromName != null) newMessage.setFrom(new InternetAddress(from, _fromName + " on behalf of " + replyTo));else newMessage.setFrom(new InternetAddress(from)); newMessage.setReplyTo(replyToList); newMessage.setRecipients(Message.RecipientType.BCC, _toList); newMessage.setSubject(subject); newMessage.setSentDate(sentDate); // send newMessageTransport transport = session.getTransport(SMTP_MAIL);transport.connect(_smtpHost, _user, _password);transport.sendMessage(newMessage, _toList);

Session session = this.loadDefaultConfiguration(); Address replyToList[] =

{ new InternetAddress(replyTo)};

Message email = this.createEmailMessage( fromName, replyToList, subject, message );

 this.sendMessage(session, email);

http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/

A API

class Email { public Email() { ... } public void setFrom(String from) { ... } public void setTo(String to) { ... } public void send() { // YOUR HOT CODE HERE }}

http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/

Email email = new Email ( );email.setFrom( “test@localhost.net”);email.setTo (“destino@localhost.net”);email.setSubject (“Teste email”);email.setMessage (“Mensagem”);email.send();

http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/

new EmailMessage( ) .from("teste@localhost.net") .to("destination@address.com") .withSubject("Fluent Mail Example") .withBody("What a nice code!") .send();

http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/

Quão Sexy é o seu código?

What is a Clean Code?

“Quando você olha para o código, percebe que ele faz exatamente o que você esperava”

Howard Cunningham

http://railsconf.blip.tv/file/2089545/

Como medir?

cleanCode = WTF / sec

// create some properties and get the default SessionProperties props = new Properties();props.put("mail.smtp.host", _smtpHost);Session session = Session.getDefaultInstance(props, null); // create a messageAddress replyToList[] = { new InternetAddress(replyTo) };Message newMessage = new MimeMessage(session);if (_fromName != null) newMessage.setFrom(new InternetAddress(from, _fromName + " on behalf of " + replyTo));else newMessage.setFrom(new InternetAddress(from)); newMessage.setReplyTo(replyToList); newMessage.setRecipients(Message.RecipientType.BCC, _toList); newMessage.setSubject(subject); newMessage.setSentDate(sentDate); // send newMessageTransport transport = session.getTransport(SMTP_MAIL);transport.connect(_smtpHost, _user, _password);transport.sendMessage(newMessage, _toList);

WTF?!

WTF?!

WTF?!

new EmailMessage( ) .from("teste@localhost.net") .to("destination@address.com") .withSubject("Fluent Mail Example") .withBody("What a nice code!") .send();

http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/

boy scout rule

Parece fácil?

Integração Contínua

http://malditacomedia.blogspot.com/search/label/IntegraçãoContínua

Tester

Testes

Unitários

xUnit

JUnit

DBUnitEJB3Unit

JSUnit

http://c2.com/cgi/wiki?TestingFramework

Test all the Fucking time!

Aceitação

Selenium

Fitnesse

AutoIt

Concordion

Cucumber

Selenium

Fitnesse

http://fitnesse.org

Inspeção

Duplicação de Codigo

<target name="cpd"> <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" /> <cpd minimumTokenCount="100"

outputFile="/home/tom/cpd.txt"> <fileset dir="/home/tom/tmp/ant"> <include name="**/*.java"/> </fileset> </cpd></target>

CPD

http://pmd.sourceforge.net/cpd.html

Análise Estática

Complexidade

JDepend

Complexidade

• Complexidade Ciclomática

• Instabilidade e Abstratividade

http://en.wikipedia.org/wiki/Software_metric

Análise

FindBugsPMD

FindbugsDE_MIGHT_IGNORE: Method might ignore exception

MS_SHOULD_BE_FINAL: Field isn't final but should be

SBSC_USE_STRINGBUFFER_CONCATENATION:

Method concatenates strings using + in a loop

NP_NULL_ON_SOME_PATH: Possible null pointer

dereference in method

NM_CLASS_NAMING_CONVENTION: Class names should start with an upper case letter

Feedback

Documentação

Diagramas de Classesdoxygen

Documentação de Códigojavadoc

Doxygen

Collaboration

Call Hierarchy

Dot Representation

Documentation

http://www.stack.nl/~dimitri/doxygen

Servidor de Build

HudsonCruiseControl

LuntbuildAnthill

Só mais um Teste!

Obrigado!victorhg@gmail.com

Qual o nosso papel?

top related