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.

When QualityAssistant Meets Pharo: Enforced Code Critiques Motivate More Valuable Rules

198 views

Published on

Presentation of IWST16, Prag

Video: https://youtu.be/XheSHWqTjmk

Published in: Software
  • Video: https://youtu.be/XheSHWqTjmk
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

When QualityAssistant Meets Pharo: Enforced Code Critiques Motivate More Valuable Rules

  1. 1. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern
  2. 2. The Concept
  3. 3. The Concept Rule
  4. 4. The Concept Rule
  5. 5. The Concept Rule Critique produces
  6. 6. The Concept Rule Critique produces
  7. 7. The Concept Rule Critique [|] Code produces improves
  8. 8. The Concept Rule Critique [|] Code produces improves (feedback) improves
  9. 9. The Concept Rule Critique [|] Code produces improves (feedback) improves
  10. 10. The Concept Rule Critique [|] Code produces improves
  11. 11. The Concept Rule Critique [|] Code produces improves
  12. 12. The Existing CriticBrowser
  13. 13. Newly Introduced QualityAssistant
  14. 14. SmallLint Issues per Milestone 0 10 20 30 40 50 Pharo 3 Pharo 4 Pharo 5 Pharo 6*
  15. 15. Changes in Rules
  16. 16. Changes in Rules Fixed
  17. 17. Changes in Rules Fixed Removed
  18. 18. Added Changes in Rules Fixed Removed
  19. 19. Fixed
  20. 20. Fixed (Collection>>#add:) protocol #adding
  21. 21. Fixed (Collection>>#add:) protocol (ArrayedCollection>>#add:) protocol #adding #adding
  22. 22. Fixed (Collection>>#add:) protocol (ArrayedCollection>>#add:) protocol #adding #accessing
  23. 23. Fixed (Collection>>#add:) protocol (ArrayedCollection>>#add:) protocol #adding #accessing
  24. 24. Fixed (Collection>>#add:) protocol #'as yet unclassified' (ArrayedCollection>>#add:) protocol #adding
  25. 25. Fixed (Collection>>#add:) protocol #'as yet unclassified' (ArrayedCollection>>#add:) protocol #adding Trivial Bug
  26. 26. Fixed
  27. 27. Fixed RBModi!esCollectionRule
  28. 28. Fixed RBModi!esCollectionRule Horrible Bug
  29. 29. Removed
  30. 30. Removed Probably missing ‘; yourself’ Non-blocks in special messages References an abstract class
  31. 31. Removed Probably missing ‘; yourself’ Non-blocks in special messages References an abstract class size = 1 ifTrue: ’:’ ifFalse: ’s:’
  32. 32. Removed Probably missing ‘; yourself’ Non-blocks in special messages References an abstract class String new size = 1 ifTrue: ’:’ ifFalse: ’s:’
  33. 33. Removed Probably missing ‘; yourself’ Non-blocks in special messages References an abstract class String new size = 1 ifTrue: ’:’ ifFalse: ’s:’ Educational
  34. 34. Added
  35. 35. Added assert: a = b ifNotNilDo: ifNotNil: Smalltalk at: Smalltalk globals at: assert: a equals: b
  36. 36. Added assert: a = b ifNotNilDo: ifNotNil: Smalltalk at: Smalltalk globals at: assert: a equals: b Migration
  37. 37. Added assert: a = b ifNotNilDo: ifNotNil: Smalltalk at: Smalltalk globals at: assert: a equals: b Migration Recipe: use rewrite rules
  38. 38. Added
  39. 39. Added BoxedFloat64reference to
  40. 40. Added BoxedFloat64reference to Private Access
  41. 41. Added BoxedFloat64reference to Recipe: annotate/maintain a collection of system classes/methods Private Access
  42. 42. Added
  43. 43. Added b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses.
  44. 44. Added b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses. b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses.
  45. 45. Added b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses. Invocation order b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses.
  46. 46. Added b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses. Recipe: initialize super initialize. self add: #edges requiresPreSend: #nodes:. Invocation Order b := RTMondrian new. b edges connectFrom: #superclass. b nodes: RTShape withAllSubclasses.
  47. 47. Added
  48. 48. Added ReAbstractRule class >> #checksPackage; >> #checksClass; >> #checksMethod; >> #checksNode
  49. 49. Added ReAbstractRule class >> #checksPackage; >> #checksClass; >> #checksMethod; >> #checksNode true?
  50. 50. Added ReAbstractRule class >> #checksPackage; >> #checksClass; >> #checksMethod; >> #checksNode true? Class Structure
  51. 51. Added ReAbstractRule class >> #checksPackage; >> #checksClass; >> #checksMethod; >> #checksNode true? Recipe: (aClass inheritsFrom: ReAbstractRule) and: [ selectors anySatisfy: [ :s | aClass perform: s ] ] Class Structure
  52. 52. Added
  53. 53. Added gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> | methods | methods := (self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ] composite list title: 'Methods'; display: methods; format: #selector; tags: [ :each | {each methodClass name} ]
  54. 54. Added gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> | methods | methods := (self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ] composite list title: 'Methods'; display: methods; format: #selector; tags: [ :each | {each methodClass name} ]
  55. 55. Added gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> composite list title: 'Methods'; display: ((self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ]); format: #selector; tags: [ :each | {each methodClass name} ]
  56. 56. Added gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> composite list title: 'Methods'; display: [ (self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ] ]; format: #selector; tags: [ :each | {each methodClass name} ]
  57. 57. Added Lazy evaluation gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> composite list title: 'Methods'; display: [ (self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ] ]; format: #selector; tags: [ :each | {each methodClass name} ]
  58. 58. gtInspectorMethodsIn: composite <gtInspectorPresentationOrder: 20> composite list title: 'Methods'; display: [ (self methods collect: #asRingDefinition) sorted: [ :x :y | x selector < y selector ] ]; format: #selector; tags: [ :each | {each methodClass name} ] Added Lazy evaluation Recipe: presentation: aPresentation isTheLeftmostRecepientIn: aStatement ^ (aStatement isMessage or: [ aStatement isCascade ]) and: [ aStatement leftmostChainReceiver = aPresentation ]
  59. 59. Feedback
  60. 60. Feedback http://renraku.inf.usi.ch/rules
  61. 61. Feedback http://renraku.inf.usi.ch/rules
  62. 62. Feedback http://renraku.inf.usi.ch/rules
  63. 63. Feedback http://renraku.inf.usi.ch/rules
  64. 64. Feedback http://renraku.inf.usi.ch/rules
  65. 65. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern
  66. 66. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes
  67. 67. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed
  68. 68. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added
  69. 69. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added Migration
  70. 70. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added Migration Private access
  71. 71. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added Migration Private access Invocation order
  72. 72. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added Migration Private access Invocation order Class structure
  73. 73. @yuriy_tymchuk When QualityAssistant Meets Pharo Enforced Code Critiques Motivate More Valuable Rules , Mohammad Ghafari, Oscar Nierstrasz Software Composition Group @ University of Bern Important Fixes Educational Rules Removed Domain Rules Added Migration Private access Invocation order Class structure Lazy evaluation

×