• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
525
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Código ! legado http://xkcd.com/844/
  • 2. Projetos! Fast-Food
  • 3. • Inconsistência de código • Arquitetura fraca • Onde no mundo está a documentação (e a Carmem Sandiego) • Sem testes • Tartaruga na árvore Sintomas de código legado
  • 4. Inconsistência ;
  • 5. Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. http://c2.com/cgi/wiki?CodeForTheMaintainer
  • 6. there are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. http://martinfowler.com/bliki/TwoHardThings.html
  • 7. https://github.com/rwaldron/idiomatic.js http://contribute.jquery.org/style-guide/js/
  • 8. Arquitetura Fraca
  • 9. https://github.com/miketaylr/Snort/blob/master/snort.yml Snort https://gist.github.com/leobalter/9771910
  • 10. Revealing Module Pattern http://christianheilmann.com/2007/08/22/again-with-the-module-pattern-reveal-something-to-the-world/ var myFoo = function(){ var foo = ''; function bar(){ /* … */ } function setFoo(newFoo) { /* … */ } function getFoo() { /* … */ } return { set: setFoo, get: getFoo } }();
  • 11. Documente seu código https://github.com/millermedeiros/mdoc
  • 12. Testes
  • 13. " L E G A C Y C O D E I S C O D E W I T H O U T T E S T S " M I C H A E L F E AT H E R S - W O R K I N G E F F E C T I V E LY W I T H L E G A C Y C O D E
  • 14. M U LT I P L E E N V I R O N M E N T S H E L L
  • 15. T O D O S O S B R O W S E R S N O D E , D I S P. M Ó V E I S , E T C …
  • 16. V E R S Õ E S D E B R O W S E R S Firefox Chrome Opera Safari IE 8 IE 9 IE 10 IE 11 Firefox Mobile Chrome p/ Android iOS Sarari Opera Mini Windows Mobile
  • 17. Funcionais Integração A/B Unitários …
  • 18. Onde dói mais se o seu sistema falhar?
  • 19. C R Í T I C O C O M P L E X O
  • 20. https://github.com/rmurphey/js-assessment
  • 21. Além dos testes…
  • 22. O que está testado? • quantas funções? • quantos blocos? • quantas linhas? • quantos statements?
  • 23. Cobertura
  • 24. WTF é integração contínua?
  • 25. Tartaruga na árvore
  • 26. // What is this I don't even if (obj.message === '[object Object], undefined:undefined') { return; }
  • 27. https://github.com/gruntjs/grunt-contrib-qunit/issues/58