Inspections and Reviews 2014 version Tero Ahtee, TUT / Department of Pervasive Computing, tensu@cs.tut.fi Important matters on course inspections, 1: everybody should read the whole material (document/code) carefully before the inspection meeting everybody marks suspected errors (findings) on his/her own material (paper copy or electronic version) everybody has the commented material (paper copy or electronic version) with him/her in the inspection meeting the inspection meeting goes fluently if everybody has done the reading and error-marking beforehand. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 1 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 2 Important matters on course inspections, 2: inspection forms are: summary and findings list electronic version of inspection forms (xlsspreadsheet) is available at course www site inspection times are at IDLE system reserve such a time-slot (2 h) when the whole group can attend (start is at xy:00 hours) material to be inspected can be updated, delivery to course staff should be during the weekend before inspection meeting. Important matters on course inspections, 3: Timer clock can be started, when secretary/recorder starts filling the inspection forms at first secretary fills "header information" (group, date, inspection target, ) to both sheets everybody's name and personal preparation time for this inspection meeting (rounded to closest 15 minutes) number of everybody's personal findings (such ones that would be said aloud, no obvious typos) number of pages / LOC. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 3 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 4
Important matters on course inspections, 4: Before start moderator checks that everybody is present, and all have 2 hours time everybody has the same material (modification date, version number, number of pages) Everybody says one positive comment about the material (some detail), e.g. section x.y Then material is scanned through, led by the moderator. The first pages (cover page, version history, TOC) can be handled one by one, after that starting from chapter 1, section (x.y) by section. Important matters on course inspections, 5: On document inspections, the findings list should be visible to attendees all the time. All inspectors can see easily if secretary did understand the comment right, and if (s)he keeps on with the pace. On code inspections, the code listing may be visible on most of the time (reading), and the findings list when secretary fills it, and when asked. So secretary would swap the view on screen between code and findings list. On code inspection, the reader/presenter (another coder, not the author) explains the code and others follow. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 5 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 6 Tarkastus-luento Tarkastus (inspection) = muodollinen, koko materiaali käydään läpi, etsitään epäkohtia, pidetään pöytäkirjaa. Katselmointi, katselmus (review) = epämuodollinen, materiaali ehkä selataan läpi, ehkä vain tietyt osat, ei välttämättä pidetä pöytäkirjaa, muistio voidaan kirjoittaa. Tarkastus onnistuu, kun materiaali on luettu ja kommentoitu etukäteen tarkastustilaisuus (max. 2 h) on jämäkkä. TIE-PROJ tärkeitä asioita 1 Lukekaa tarkastettava materiaali huolellisesti kokonaan läpi etukäteen (HUOM! Erilaiset lukutekniikat, ei välttämättä yhdellä istumalla kansilehdestä viimeisen liitteen viimeiselle sivulle.). Merkitkää materiaaliin (paperimuotoiseen tai sähköiseen) omat löydöksenne ja kysymyksenne. Ottakaa se kommentoitu materiaali mukaan tarkastukseen. Koko materiaali. Näin tarkastustilaisuus sujuu juoheasti, kun materiaalin läpikäynnissä pysähdytään vain löydösten (virhe tai kysymys) kohdilla. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 7 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 8
TIE-PROJ tärkeitä asioita 2 Tutustukaa myös kurssin www-materiaalisivulla olevaan tekstimuotoiseen tarkastustilaisuuksien ohjeeseen (mm. kännysakko). Tarkastuslomakkeet ovat tietokoneella täytettäviä taulukkolaskentaohjelman lomakkeita. Tarkastuslomakkeita on kaksi sivua; yhteenveto ja virheluettelo (löydösluettelo). Kurssin www-materiaalisivulta löytyvät molemmat tarkastuslomakemuodot (xls, suomi ja englanti). Tarkastuksen jälkeen kurssihenkilökunnalle palautetaan kopiot tarkastuslomakkeista tilastointia varten (tarkastustilaisuuden lopun tilanne, korjauksia ei tarvitse vielä olla merkittynä). TIE-PROJ tärkeitä asioita 3 Tarkastuksen aluksi sihteeri kirjaa perustiedot (pvm, projekti, tarkastuksen kohde, ) kummallekin lomakkeelle. "Pelikellon" voi käynnistää nyt. yhteenveto-lomakkeelle kirjataan läsnäolijoiden nimet (ja roolit: pj, siht) kullekin valmistautumisaika tähän tilaisuuteen, varttitunnin tarkkuudella jokaisen oma löydöslukumäärä, sellaiset löydökset jotka toisi julki tarkastuksessa (selviä "pilkkuvirheitä" ei lasketa) sivumäärä tai koodirivien määrä. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 9 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 10 TIE-PROJ tärkeitä asioita 4 Tarkastuksen aluksi pj/moderaattori toteaa; ovatko kaikki paikalla, onko kaikilla aikaa 2 tuntia onko kaikilla sama materiaali (versionumero, muokkauspäivämäärä, sivumäärä). Sitten jokainen sanoo yhden positiivisen kommentin tarkastuksen kohteesta (esim. jokin dokumentin kohta x.y). Sitten pj:n johdolla aletaan käymään dokumenttia läpi, aluksi (kansi, versiohistoria, sisällysluettelo) sivu kerrallaan, ja sitten sisältö 1. luvusta lähtien kohta (x.y) kerrallaan. Virheluettelossa kohtanumero on yksiselitteinen sijaintipaikka, sivunumero voi vaihdella. TIE-PROJ tärkeitä asioita 5 Kooditarkastus eroaa dokumenttien tarkastuksista vain siinä, että käytetään esilukijaa (reader/presenter). Esilukija on joku muu toteuttaja kuin tarkastettavan koodinpätkän kirjoittaja. Kooditarkastuksessa koodilistaus näkyy seinällä, ja tarkastuspöytäkirjat vain silloin kun niitä täytetään (jos käytettävissä on vain yksi dataprojektori). Esilukija selostaa ääneen koodin kulkua, tässä havaitaan myös onko tarkastettava koodi selkeälukuista (ja hyvin kommentoitua). Mahdolliset projektin tyyliohjeet kannattaa pitää käsillä kooditarkastuksessa. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 11 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 12
Terminology, ANSI/IEEE IEEE 610.12-1990: inspection = a static analysis technique that relies on visual examination of development products to detect errors, violations of development standards, and other problems. Types include code inspection; design inspection. review = a process or meeting during which a work product, or set of work products, is presented to project personnel, managers, users, customers, or other interested parties for comment or approval. Types include code review, design review, formal qualification review, requirements review, test readiness review. walk-through = a static analysis technique in which a designer or programmer leads members of the development team and other interested parties through a segment of documentation or code, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems. IEEE Std 1012-2012 Inspections (requirements). Validate that the requirements meet customer needs and can be implemented. Verify that they are complete, traceable, testable, and consistent so that omissions, defects, and ambiguities in the requirements are detected. Inspection (source code). Verify that the source code implementation is traceable to the design. Verify that all interfaces and procedural logic are complete and correct, and omissions, defects, and ambiguities in the source code are detected. TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 19 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 21 The role of inspections in SW process The inspection process To find defects as early as possible To make documents as stable (and as early) as possible with the help of technical colleagues input and experience. Prepare work product First planning should take place in project planning phase! 5% to 15% of project cost (working time) Finds up to 80% of the defects in product (normally less, never 100 %) Planning Overview Preparation Meeting Rework Follow-up Cost effective in improving quality Testing is too late; all faults in specs, design documents etc. are already implemented. That is why inspections are needed and are cost effective - especially in Telecommunications. Meeting notice Defect list Defect summary Management report Inspected work product TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 27 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 30
Rules for the meeting Max duration 2 hours (quiet place, no interruptions) Use breaks when/if needed (1 hour interval) Comment the material - not the author Discuss problems, not the solutions No spelling errors should be discussed (deliver notes instead). (a timer clock may be used by the moderator) (a suitable "penalty" for loud phone calls) (a suitable "penalty" for being late from start) Problems in Inspections unprepared attendees ("I'm in a hurry" is no excuse!!!) Oh boy!! unstable (draft) specs, interfaces in code inspection changes into a design meeting unrelevant comments too much material follow-up not performed "crying" author or moderator document prepared in isolation, hopeless quality, somebody should precheck process differences fin / other cultures political decisions (e.g. QA vs. delivery deadlines) inspections simply not performed disturbances (phones, people coming late or leaving early,...). Planning Overview Preparation Meeting Rework Follow-up TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 41 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 54 2013 mod sec TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 66 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 68
Document inspections at TUT findings / page (average) (5/11) 1,6 1,4 1,2 1 0,8 0,6 SRS DD TP 0,4 0,2 0 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 70 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 76 Code inspections at TUT findings (average) (7/11) Case 3 - Document inspections at TUT, % of project time spent to inspections (11/11) 30 25 20 15 avg stddev 10 5 0 2000-01 2001-02 2002-03 2003-04 2004-05 2005-06 2006-07 2007-08 2008-09 2009-10 2010-11 2011-12 2012-13 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 78 TUT / PERV COMP / TA-insp-2014.pptx / 06.10.2014 / tensu (ijh, jsm) page: 83