Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

TDD a piccoli passi

998 views

Published on

Le slide della sessione che ho tenuto agli Italian Agile Days del 2016, Pavia, 18-19 Novembre

Published in: Software
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download Full EPUB Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download Full doc Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download PDF EBOOK here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download EPUB Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download doc Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Qui i link a video e materiale vario :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

TDD a piccoli passi

  1. 1. Ferdinando Santacroce @JesusWasRasta TDD a piccoli passi
  2. 2. All’inizio le mie applicazioni le testavo così...
  3. 3. Vediamo un po’ come funziona...
  4. 4. mmm, pensavo fosse meno complicato...
  5. 5. Ho capito, devo usare i mock!
  6. 6. Sì, ma che fatica!
  7. 7. Driven!!
  8. 8. Cos’è TDD? Scrivi dei test Scrivi codice fino a farli passare tutti Fai un po’ di pulizia
  9. 9. The Three Laws of TDD 1. “You aren’t allowed to write any production code until you have written a failing unit test”. 2. “You aren’t allowed to write more of a unit test than is sufficient to fail. And not compiling is failing.” 3. “You aren’t allowed to write more production code than is sufficient to pass the currently failing unit test.”
  10. 10. Ecco cos’è TDD! Write a single test that fails Write code to make the test pass Improve the code base
  11. 11. The Three Laws of TDD 1. “You aren’t allowed to write any production code until you have written a failing unit test”. 2.“You aren’t allowed to write more of a unit test than is sufficient to fail. And not compiling is failing.” 3. “You aren’t allowed to write more production code than is sufficient to pass the currently failing unit test.”
  12. 12. Proviamoci! See the code on Github: https://github.com/jesuswasrasta/SmallStepsTDD.git
  13. 13. • Nell’algoritmo non v’è espresso il concetto di numero primo • Brainlessness (2 -> n) • I cicli sono una generalizzazione delle if • Passo dei test nuovi senza modificare codice • Se immaginiamo i test come feature, che bello sarebbe aggiungere funzionalità al nostro software con questa facilità?! • Refactoring: rimuovere duplicazione, rimuovere codice Cosa si nota?
  14. 14. ({}–>nil) no code at all->code that employs nil (nil->constant) (constant->constant+) a simple constant to a more complex constant (constant->scalar) replacing a constant with a variable or an argument (statement->statements) adding more unconditional statements. (unconditional->if) splitting the execution path (scalar->array) (array->container) (statement->recursion) (if->while) (expression->function) replacing an expression with a function or algorithm (variable->assignment) replacing the value of a variable. Transformations
  15. 15. https://8thlight.com/blog/uncle- bob/2013/05/27/TheTransformationPriorityPremise.html https://en.wikipedia.org/wiki/Transformation_Priority_Premise https://www.youtube.com/watch?v=B93QezwTQpI https://vimeo.com/97516288 https://vimeo.com/60561303 Transformations Priority Premise Robert C. Martin (Uncle Bob)
  16. 16. @JesusWasRasta DOmande? @JesusWasRasta

×