Upgrade to Pro — share decks privately, control downloads, hide ads and more …

La Grande Riscrittura - Better Software 2012

La Grande Riscrittura - Better Software 2012

This is the story of three "big rewrites". What are success factors? What are the risks?

Matteo Vaccari

September 27, 2012
Tweet

More Decks by Matteo Vaccari

Other Decks in Technology

Transcript

  1. The first one happened at this metalworking plant. This is

    one of the largest rolling mills in Europe. The big roller stacks are 4 meters high. Task: port the control software for the cooling part to modern hardware.
  2. • Abbiamo capito tutto quello che fa il sistema? •

    Cosa succede il giorno in cui sostituiamo il sistema vecchio con il nuovo? • Che cosa farà il nuovo sistema meglio di quello vecchio?
  3. This project was a success. We delivered the new system

    within the expected date and it worked flawlessly.
  4. Fattori di successo • Meglio il porting della riscrittura •

    Accesso diretto e costante all’impianto • Collaborazione di esperti interni • Consegna incrementale
  5. This one was much less successful. The deliveries were late,

    there were many problems in production. What’s worse is that later deliveries were increasingly late.
  6. This one was very successful. The customer told us “I

    expected blood and tears in production as it always happens. But this time production was flawless.”
  7. Case study • Gateway di pagamento e-commerce • Rifacimento sistema

    esistente • Stima 1100 gg • Deadline 39 settimane • Team 8 XPeppers + 2 dev cliente + 1 esperto del cliente + 1 tirocinante
  8. Fattori di successo • Consegna incrementale • Accesso diretto e

    costante alla produzione • Collaborazione di esperti interni
  9. Qual è il requisito più importante? We wrote a long

    and detailed list of requirements, but we realized it would have been a very poor way to frame a contract with us, the software house, and the customer, the bank. Much better to go the the main stakeholders and ask what they value. In this particular case, the boss cared about “migrating all existing customers to the new system without causing them any inconvenience”.
  10. Qual è il requisito più importante? Nome: Migrazione-Merchant Descrizione: Il

    Merchant prosegue la sua operatività con il nuovo sistema Scala: % del transato migrato Status: [10/02/2012] ~8% Goal: [31/03/2012] 100% We wrote a long and detailed list of requirements, but we realized it would have been a very poor way to frame a contract with us, the software house, and the customer, the bank. Much better to go the the main stakeholders and ask what they value. In this particular case, the boss cared about “migrating all existing customers to the new system without causing them any inconvenience”.
  11. Censimento Merchant Utenti tipo I - 3 merchant che necessitano

    della feature A Utenti tipo II - 2 merchant che necessitano delle feature A, B Utenti tipo III - 400 merchant che necessitano delle feature A, B, C Utenti tipo IV - 1600 merchant che necessitano delle feature A, B, C, D Step-Feature-A Descrizione: Implementare la feature A Criterio di accettazione: Un merchant tipo I migrato con successo Step-Feature-B Descrizione: Implementare la feature B Criterio di accettazione: Un merchant tipo II migrato con successo Step-Feature-C Descrizione: Implementare le feature C Criterio di accettazione: Un merchant tipo III migrato con successo So we partitioned the customers according to how many functions they required. We tracked the main progress metrics “% of customers migrated to the new system” and “availability of the new system”.
  12. Consegna incrementale Database nuovo App Nuova Database legacy App Legacy

    Batch Sync Utenti Apache Perl filter Utenti migrati Utenti non migrati We migrated the first customer (an important one) at 6 weeks into the project. All other customers kept using the old system. The first migration was frontend-only; the newly migrated customer was still using the legacy backoffice app. This was possible because we kept the legacy DB in sync with the new one.
  13. Consegna incrementale Database nuovo App Nuova Database legacy App Legacy

    Batch Sync Utenti Apache Perl filter Utenti migrati Utenti non migrati • Primo rilascio dopo 6 settimane We migrated the first customer (an important one) at 6 weeks into the project. All other customers kept using the old system. The first migration was frontend-only; the newly migrated customer was still using the legacy backoffice app. This was possible because we kept the legacy DB in sync with the new one.
  14. Delivery senza problemi in PRO Il cliente si fida Delivery

    piccole e frequenti We have a self-reinforcing loop. This cuts both ways: it can be a virtuous circle, or a vicious one. If you mess up in production, the customer will not trust you and will ask you to deliver in larger batches, which will lead to increased likelihood of problems in production.
  15. Delivery senza problemi in PRO Il cliente si fida Delivery

    piccole e frequenti Qualità You can stack chance in your favour by applying a lot of energy to “not messing up in production”. This will set a virtuous circle in motion.
  16. Fanaticamente ossessionati dalla qualità • Automated Acceptance Tests • Test-Driven

    Development • Pair programming • Integrazione continua • Specifiche su wiki • Training del personale • Technical Reviews • Manual test plans • Automazione spinta • NO Frameworks XP tradizionale
  17. Test di accettazione automatici @Test public void authorizeTranpipeRequest() throws Exception

    { String request ="" + "<id>" + TerminalFactory.getTranpipeExplicitCaptureType().getId() + "</id>" + "<password>"+ TerminalFactory.getTranpipeExplicitCaptureType().getPassword() + "</password>" + "<card>" + CCFactory.getVisaOnUsNotEnrolled().getPan() + "</card>" + "<cvv2>" + CCFactory.getVisaOnUsNotEnrolled().getCVV2() + "</cvv2>" + "<expYear>" + CCFactory.getVisaOnUsNotEnrolled().getExpirationYear() + "</expYear>" + "<expMonth>"+ CCFactory.getVisaOnUsNotEnrolled().getExpirationMonth() + "</expMonth>" + "<action>4</action>" + "<type>CC</type>" + "<member>member&member</member>" + "<amt>0.1</amt>" + "<currencycode>978</currencycode>" + "<trackid>2011IVR4189718</trackid>"; String expectedResponse = "" + "<response type=\"valid\">" + "<result>APPROVED</result>" + "<auth>DONTCARE</auth>" + "<ref>DONTCARE</ref>" + "<tranid>DONTCARE</tranid>" + "<trackid>2011IVR4189718</trackid>" + "<udf5>EQUAL2REF</udf5>" + "<responsecode>000</responsecode>" + "</response>"; String actualResponse = sendTranpipeRequest(request); assertXmlResponseEquals(expectedResponse, actualResponse); }
  18. Subversion Sviluppatori Jenkins Server di collaudo 1. Commit 2. Pull

    changes 3. Build 4. Unit test 5. Deploy 6. Acceptance tests 7. Success! or Failure!
  19. 1988 1999 Grazie! Sono freelance. Chiedimi come posso aiutarti! The

    two main sources of inspiration: Evo taught me how to frame the project for success by tracking the metrics that really mattered to the customer. XP taught us how to deliver very high quality software.