Thursday, 17 November 2011 10 10 20 20 30 30 40 40 50 50 60 60 0 0 SessionFactoryUtils SessionFactoryUtils AbstractBeanFactory AbstractBeanFactory BeanWrapperImpl BeanWrapperImpl BooleanExpressionComplexity BooleanExpressionComplexity DispatcherServlet DispatcherServlet SchedulerFactoryBean SchedulerFactoryBean AntPathMatcher AntPathMatcher SQLErrorCodeSQLExceptionTranslator SQLErrorCodeSQLExceptionTranslator HibernateTemplate HibernateTemplate ReloadableResourceBundleMessageSource ReloadableResourceBundleMessageSource PropertiesBeanDefinitionReader PropertiesBeanDefinitionReader StatementCreatorUtils StatementCreatorUtils LazyConnectionDataSourceProxy LazyConnectionDataSourceProxy DefaultMessageListenerContainer DefaultMessageListenerContainer JdoTransactionManager JdoTransactionManager ClassDataAbstractionCoupling ClassDataAbstractionCoupling TopLinkTransactionManager TopLinkTransactionManager ScriptFactoryPostProcessor ScriptFactoryPostProcessor TransactionAwareConnectionFactoryProxy TransactionAwareConnectionFactoryProxy NumberUtils NumberUtils HibernateAccessor HibernateAccessor SpringSessionSynchronization SpringSessionSynchronization BeanDefinitionValueResolver BeanDefinitionValueResolver ExtendedEntityManagerCreator ExtendedEntityManagerCreator ParameterMethodNameResolver ParameterMethodNameResolver MBeanClientInterceptor MBeanClientInterceptor BeanFactoryAspectJAdvisorsBuilder BeanFactoryAspectJAdvisorsBuilder ClassFanOutComplexity ClassFanOutComplexity CustomizableTraceInterceptor CustomizableTraceInterceptor AbstractXsltView AbstractXsltView GenericCollectionTypeResolver GenericCollectionTypeResolver ArgumentConvertingMethodInvoker ArgumentConvertingMethodInvoker SharedEntityManagerCreator SharedEntityManagerCreator FreeMarkerConfigurationFactory FreeMarkerConfigurationFactory OC4JJtaTransactionManager OC4JJtaTransactionManager MockHttpServletRequest MockHttpServletRequest CyclomaticComplexity CyclomaticComplexity FrameworkPortlet FrameworkPortlet ResourceArrayPropertyEditor ResourceArrayPropertyEditor AspectJWeaverMessageHandler AspectJWeaverMessageHandler MethodMapTransactionAttributeSource MethodMapTransactionAttributeSource SingleConnectionFactory SingleConnectionFactory MessageListenerAdapter MessageListenerAdapter JdoTemplate JdoTemplate FieldRetrievingFactoryBean FieldRetrievingFactoryBean VelocityView VelocityView FileLength FileLength AbstractMessageListenerContainer AbstractMessageListenerContainer SqlLobValue SqlLobValue PortletRequestHandledEvent PortletRequestHandledEvent JdbcOperations JdbcOperations MethodLength MethodLength TxAdviceBeanDefinitionParser TxAdviceBeanDefinitionParser ConnectorServerFactoryBean ConnectorServerFactoryBean RefreshablePagedListHolder RefreshablePagedListHolder SqlMapClientTemplate SqlMapClientTemplate ClassUtils ClassUtils NestedIfDepth NestedIfDepth SystemPropertyUtils SystemPropertyUtils JmsTransactionManager JmsTransactionManager DefaultBeanDefinitionDocumentReader DefaultBeanDefinitionDocumentReader TransactionAttributeEditor TransactionAttributeEditor AbstractInterceptorDrivenBeanDefinitionDecorator AbstractInterceptorDrivenBeanDefinitionDecorator ResultSetWrappingSqlRowSet ResultSetWrappingSqlRowSet AnonInnerLength AnonInnerLength HsqlMaxValueIncrementer HsqlMaxValueIncrementer AbstractSessionFactory AbstractSessionFactory AbstractPropertyAccessor AbstractPropertyAccessor LocalSlsbInvokerInterceptor LocalSlsbInvokerInterceptor BeansDtdResolver BeansDtdResolver TransactionAwareDataSourceProxy TransactionAwareDataSourceProxy PersistenceManagerFactoryUtils PersistenceManagerFactoryUtils ParameterNumber ParameterNumber TomcatInstrumentableClassLoader TomcatInstrumentableClassLoader LocalContainerEntityManagerFactoryBean LocalContainerEntityManagerFactoryBean AopNamespaceUtils AopNamespaceUtils JpaInterceptor JpaInterceptor HtmlCharacterEntityReferences HtmlCharacterEntityReferences JdoInterceptor JdoInterceptor CciTemplate CciTemplate MissingSwitchDefault MissingSwitchDefault AspectJPrecedenceComparator AspectJPrecedenceComparator AdvisedSupport AdvisedSupport OpenEntityManagerInViewFilter OpenEntityManagerInViewFilter ScopedProxyBeanDefinitionDecorator ScopedProxyBeanDefinitionDecorator ServletRequestAttributes ServletRequestAttributes ReflectiveVisitorHelper ReflectiveVisitorHelper BeanDefinitionReaderUtils BeanDefinitionReaderUtils CustomEditorConfigurer CustomEditorConfigurer TreeWalker TreeWalker AbstractBeanDefinitionReader AbstractBeanDefinitionReader ScopedProxyFactoryBean ScopedProxyFactoryBean AbstractModelAndViewTests AbstractModelAndViewTests HessianServiceExporter HessianServiceExporter MockPageContext MockPageContext CommonsLoggingLogSystem CommonsLoggingLogSystem 0.80 1.00 1.20 1.40 1.60 1/4/06 15/4/06 29/4/06 13/5/06 1 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 1
We’re hiring... Software Quality – you know it when you see it Erik Doernenburg ThoughtWorks @erikdoe // erik.doernenburg.com Thursday, 17 November 2011 2
Thursday, 17 November 2011 3
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? Thursday, 17 November 2011 4
30.000ft and ground level http://opensimulator.org/wiki/Grid_Architecture_Diagram m.jpg Thursday, 17 November 2011 5
The 1000ft view • Is at the “right” level • Aggregates data and metrics • Utilises visualisation techniques • Makes every pixel count Thursday, 17 November 2011 6 http://97things.oreilly.com/wiki/index.php/Get_the_1000ft_view
Metrics • lines of code • method length • class size • cyclomatic complexity • weighted methods per class • coupling between (object) classes ckjm Thursday, 17 November 2011 7 http://www.campwoodsw.com/sourcemonitor.html
Thursday, 17 November 2011 http://erik.doernenburg.com/2008/11/how-toxic-is-your-code/ Developed by ThoughtWorks using Excel Provides easy to compare overview of quality Toxicity chart 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 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 JdbcOperations.jav a MethodLength 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 8
Recommend
More recommend