software quality
play

Software Quality you know it when you see it Erik Doernenburg - PowerPoint PPT Presentation

Software Quality you know it when you see it Erik Doernenburg ThoughtWorks Software Quality External perspective Is the software of value to its users? Internal perspective How appropriate is the design? How easy is it to


  1. Software Quality – you know it when you see it Erik Doernenburg ThoughtWorks

  2. Software Quality External perspective • Is the software of value to its users? Internal perspective • How appropriate is the design? • How easy is it to understand and extend? • How maintainable is the software?

  3. 30.000ft and ground level http://opensimulator.org/wiki/Grid_Architecture_Diagram .org/wiki/Image:Grids_Architecture_Diagram.jpg

  4. The 1000ft view, literally CodeCity by Richard Wettel

  5. The 1000ft view Provides information at the right level Aggregates lots of data and multiple metrics Uses visualisation tools and techniques Depends on the question you need answered

  6. Metrics Some established metrics: • Lines of Code • Method length ckjm • Class size • Boolean expression complexity • Cyclomatic Complexity checkstyle ...

  7. Metrics Some newer metrics: • Duplication simian • Coverage cobertura • Testability Composed metrics • coverage against test/code ratio ...

  8. Size & complexity pyramid 5.75 NOP 224 6.13 NOC 1289 5.69 NOM 7905 7905 NOM 2.79 0.26 LOC 44988 22039 CALLS 0.40 CYCLO 11602 8798 FANOUT Developed at Universities of Berne and Lugano Shows key metrics and their relationships Allows comparison to “industry standards” Created by iPlasma tool from source code

  9. Created with checkstyle & Excel from source Provides easy to compare overview of quality Developed by ThoughtWorks 10.0 15.0 20.0 25.0 30.0 35.0 40.0 0.0 5.0 SessionFactory Utils.java AbstractBeanFactory .java BooleanExpressionComplexity BeanWrapperImpl.jav a DispatcherServ let.java SchedulerFactory Bean.java Toxicity chart AntPathMatcher.jav a SQLErrorCodeSQLExceptionTranslator.jav a HibernateTemplate.jav a ReloadableResourceBundleMessageSource.jav a PropertiesBeanDef initionReader.jav a StatementCreatorUtils.java Lazy ConnectionDataSourceProxy .java Def aultMessageListenerContainer.java ClassDataAbstractionCoupling JdoTransactionManager.jav a TopLinkTransactionManager.jav a ScriptFactory PostProcessor.java TransactionAwareConnectionFactory Proxy.java NumberUtils.jav a HibernateAccessor.jav a SpringSessionSy nchronization.jav a BeanDef initionValueResolv er.java ExtendedEntity ManagerCreator.jav a ParameterMethodNameResolv er.java CallableStatementCreatorFactory.java ClassFanOutComplexity BeanFactory AspectJAdvisorsBuilder.java CustomizableTraceInterceptor.jav a AbstractXsltView.jav a GenericCollectionTy peResolv er.java ArgumentConv ertingMethodInv oker.java SharedEntity ManagerCreator.jav a FreeMarkerConf igurationFactory.java SelectedValueComparator.jav a MockHttpServ letRequest.java CyclomaticComplexity FrameworkPortlet.jav a ResourceArray Property Editor.java AspectJWeav erMessageHandler.java MethodMapTransactionAttributeSource.jav a SingleConnectionFactory .java MessageListenerAdapter.jav a JdoTemplate.jav a DataSourceUtils.java FileLength Velocity View.jav a AbstractMessageListenerContainer.java SqlLobValue.jav a PortletRequestHandledEv ent.java MethodLength JdbcOperations.jav a TxAdv iceBeanDef initionParser.java ArgTy pePreparedStatementSetter.jav a Ref reshablePagedListHolder.java AbstractJasperReportsSingleFormatView.java ClassUtils.java NestedIfDepth SimpleMailMessage.jav a JmsTransactionManager.jav a TransactionAttributeEditor.jav a Def aultBeanDef initionDocumentReader.java AbstractInterceptorDrivenBeanDefinitionDecorator.java ResultSetWrappingSqlRowSet.jav a AnonInnerLength HsqlMaxValueIncrementer.jav a CodebaseAwareObjectInputStream.jav a AbstractSingletonProxy FactoryBean.java LocalSlsbInv okerInterceptor.java BeansDtdResolv er.java AbstractMessageSource.jav a ParameterNumber AbstractDependency InjectionSpringContextTests.java TomcatInstrumentableClassLoader.java LocalContainerEntity ManagerFactoryBean.java ResourceEntity Resolver.java RedirectView.jav a HtmlCharacterEntityReferences.java AbstractPathMapHandlerMapping.jav a MissingSwitchDefault AspectJPrecedenceComparator.java ResourceServ let.java Adv isedSupport.jav a EhCacheFactory Bean.java CustomCollectionEditor.java CommonsMultipartFile.jav a OpenEntity ManagerInViewFilter.jav a TopLinkInterceptor.jav a TreeWalker MethodInv okingJobDetailFactoryBean.java Def aultNamespaceHandlerResolver.java XmlValidationModeDetector.jav a GenericFilterBean.jav a HessianServ iceExporter.java Property AccessorUtils.java InstantiationModelAwarePointcutAdv isorImpl.java

  10. Codecrawler Part of a larger academic initiative Allows exploration of quality metrics Reads XMI data

  11. Class metrics chart Takes class as the basic entity and explore highly dimensional properties/metrics Uses Google Docs and Motion Chart gadget

  12. Created with Unix tools & Excel Shows the test to code ratio over time 0.80 1.00 1.20 1.40 1.60 1/4/06 15/4/06 Test to code ratio 29/4/06 1 13/5/06 27/5/06 10/6/06 2 24/6/06 8/7/06 22/7/06 Lines of unit test code per line of production code 5/8/06 19/8/06 2/9/06 3 16/9/06 30/9/06 14/10/06 Releases 3.05 28/10/06 3.1 11/11/06 25/11/06 9/12/06 Unit test LOC/LOC 23/12/06 6/1/07 4 5 20/1/07 3/2/07 6 17/2/07 3/3/07 7 17/3/07 31/3/07 8 14/4/07 9 10 28/4/07 11 12/5/07 12 13 26/5/07 9/6/07 14 23/6/07 15 7/7/07 16 21/7/07 17 4/8/07 18/8/07

  13. DIY 1. Choose tools that calculates the metrics • Source code analysis easier than bytecode 2. Aggregate data • Ruby scripts, unix tools, etc • VBA and pivot tables are an option, too 3. Choose tool to render graphics from data • Excel is a powerful graphing tool • Gnuplot and InfoViz are also useful

  14. How do you see quality? Quality can be subjective and relative Comparisons • industry standards • different revisions of same software (trends) • different parts of same system (outliers) Aesthetics • Symmetry • Balance/harmony

  15. And then what? Measure tech debt Measure effectiveness of training / coaching Guide refactoring / cleanup Direct effort Celebrate success

  16. Thank you erik.doernenburg.com www.thoughtworks.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend