PODER EXECUTIVO demonstrando dedicação e profissionalismo ...
Desafios do Profissionalismo Ágil
-
Upload
victor-hugo-germano -
Category
Technology
-
view
1.924 -
download
0
description
Transcript of Desafios do Profissionalismo Ágil
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
http://flickr.com/photos/fairytalecinema/1813597118/
Ciclo Vicioso do Desenvolvimento de
Software
http://www.flickr.com/photos/orangeacid/272510395/
http://www.flickr.com/photos/fulbert05/2403344636/
http://www.flickr.com/photos/danielankers/2639889958/
?
http://www.flickr.com/photos/mfakheri/2978493478/
http://www.flickr.com/photos/orangeacid/272510395/
http://www.flickr.com/photos/fulbert05/2403344636/
http://www.flickr.com/photos/danielankers/2639889958/
?
http://www.flickr.com/photos/jurvetson/3097134746/
Desenvolvimento Ágil
AgileTDD
Integração Contínua
BDD
Reunião Diária
Escopo Negociável
Cliente PresenteRetrospectiva
Agile Modeling
SimplicidadePair Programming
Agile BUT
http://www.flickr.com/photos/orangeacid/272510395/
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( “[email protected]”);email.setTo (“[email protected]”);email.setSubject (“Teste email”);email.setMessage (“Mensagem”);email.send();
http://guilherme.pro/2009/04/05/why-i-dont-write-code-comments/
new EmailMessage( ) .from("[email protected]") .to("[email protected]") .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("[email protected]") .to("[email protected]") .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
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!