SlideShare a Scribd company logo
CODE CRIME SCENEVERSION 1.2
Paweł Klimczyk
Gemotial 2017
About me
■ Software engineer
■ Running Gemotial Software Studio
■ Co-organizer of WrocNET
■ Blog: http://blog.klimczyk.pl
■ Contact:
– Twitter: @pwlklm
– Mail: pawel@klimczyk.pl
What is a crime scene? (1)
■ Duplicate Code
■ Long Method
■ Comments
■ Long Parameter List
■ Large Class
■ Switch Statements
■ Parallel Inheritance Hierarchies
■ Conditional Complexity
■ Combinitorial Explosion
■ Uncommunicative Name
■ Dead Code
■ Inconsistent Names
■ Temporary Field
What is a crime scene? (2)
■ AlternativeClasses with
Different Interfaces
■ Primitive ObsessionData
Class
■ Data Clumps
■ Refused Bequest
■ Inappropriate Intimacy
■ Indecent Exposure
■ Feature Envy
■ Lazy Class
■ Message Chains
■ Middle Man
■ DivergentChange
■ Shotgun Surgery
■ Parallel Inheritance
Hierarchies
■ Incomplete Library Class
■ Solution Sprawl
Crime scene samples – code level
Crime scene samples – class level
Crime scene samples – SOLID violation
Crime scene samples – multiple test
assertions
SmartStore.NET introduction
https://github.com/smartstoreag/SmartStoreNET
SmartStore.NET is a free, open source, full-featured e-commerce solution for
companies of any size. It is web standards compliant and incorporates the
newest Microsoft web technology stack.
SmartStore.NET includes all essential features to create multilingual and multi-
currency stores targeting desktop or mobile devices and enabling SEO
optimized rich product catalogs with support for an unlimited number of
products and categories, variants, bundles, datasheets, ESD, discounts, coupons
and many more.
The state-of-the-art architecture of SmartStore.NET - with ASP.NET 4.5 + MVC
5, Entity Framework 6 and Domain Driven Design approach - makes it easy to
extend, extremely flexible and essentially fun to work with ;-)
SmartStore.NET production deployments
■ http://2stonedshop.de/
■ http://indo-divers.de/
■ http://www.adr-shop.com/
■ http://www.mobilesat.co.uk/
trendspro.builtwith.com
+500 online stores
SmartStore.NET Screen (1)
SmartStore.NET Screen (2)
SmartStore.NET Screen (3)
CodeBase Stats (June 2016)
Finding the crime
How to find
code crime in
project ?
Code crime scene (Ndepend)
•Dependency graph
•Dependency matrix
•LINQ queries
•Code quality metrics (+custom)
•More…
NDepend – Project overview
NDepend – Dependency diagram
NDepend – Dependency matrix
NDepend – Metricts
NDepend – Cyclomatic complexity
NDepend – SOLID violation (S)
NDepend – SOLID violation (I)
NDepend – Code coverage
NDepend – Coupling
NDepend – GC.Collect
June – October 2016 compare
Source control systems – measure behavior
* 1a660f0 | (HEAD -> master, origin/master, origin/HEAD) dd (Fri May 13 17:03:40 2016) [User1]
* dfcd431 | screenshots attepmt 2 (Fri May 13 16:59:35 2016) [User1]
* f29f63e | Apropriate screenshotting added (Fri May 13 16:54:46 2016) [User1]
* 9203bdb | disabled native events for IE (Fri May 13 16:38:44 2016) [User1]
* 45a6f12 | More setting for screenshots (Fri May 13 15:13:36 2016) [User1]
* 690180c | IE only (Fri May 13 15:01:22 2016) [User1]
* b687d21 | ScreenShots added (Fri May 13 15:00:51 2016) [User1]
* f98748f | Added waiting for page fully loaded (Fri May 13 14:44:48 2016) [User1]
* 2f15015 | Wait till page fully loaded for IE (Fri May 13 11:46:25 2016) [User1]
* 46dafc1 | Enabled IE and Chrome (Fri May 13 11:23:21 2016) [User1]
* 4faa96c | eliminated reposting form twice (Fri May 13 11:13:15 2016) [User1]
* ea6e879 | Improved user profile edit tests (Fri May 13 10:53:38 2016) [User1]
* 83f2f28 | removed retry forTestLauncher (Fri May 13 10:32:31 2016) [User1]
* ff0e1ff | Changed retry count and added message text for asserts (Fri May 13 10:25:13 2016) [User1]
* 2f27e2a |Temporary disabled most of the tests to (Fri May 13 10:08:46 2016) [User1]
* b6dcb02 | FireFox enabled for tests (Thu May 12 14:02:29 2016) [User1]
Code maat - introduction
Features:
■ Analize GIT/SVN history
■ Command line tool
■ Various analizers
■ CSV output
■ Open source
Work flow:
Git log….
Parse log with code maat
Generate graph from csv
Code maat – sample
entity,n-authors,n-revs
src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs,4,14
src/Plugins/SmartStore.PayPal/Providers/PayPalExpressProvider.cs,4,6
src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs,3,48
src/Presentation/SmartStore.Web/Administration/Controllers/ImportController.cs,3,38
src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs,3,35
src/Presentation/SmartStore.Web/Administration/Controllers/ExportController.cs,3,31
src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs,3,30
src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs,3,29
java -jar code-maat-0.8.5-standalone.jar -l log_file.log -c git -a authors
Code maat – hot files
entity n.authors n.revs
src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs 3 48
src/Presentation/SmartStore.Web/Administration/Controllers/ImportController.cs 3 38
src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs 3 35
src/Presentation/SmartStore.Web/Administration/Controllers/ExportController.cs 3 31
src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs 3 30
src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs 3 29
src/Libraries/SmartStore.Data/Migrations/201512151526290_ImportFramework.cs 2 28
src/Libraries/SmartStore.Data/Migrations/201603121451066_ThirdPartyEmailHandOver.cs 2 21
src/Plugins/SmartStore.PayPal/Localization/resources.en-us.xml 3 20
src/Plugins/SmartStore.PayPal/Localization/resources.de-de.xml 3 20
src/Plugins/SmartStore.PayPal/Services/PayPalService.cs 1 20
src/Libraries/SmartStore.Services/DataExchange/Export/DataExporter.cs 3 19
src/Libraries/SmartStore.Services/DataExchange/Import/DataImporter.cs 3 19
src/Libraries/SmartStore.Services/DataExchange/Import/ImportRow.cs 3 18
src/Presentation/SmartStore.Web/Administration/Views/Import/_ColumnMappings.cshtml 3 18
src/Presentation/SmartStore.Web/Administration/Views/Import/_CreateOrUpdate.cshtml 1 18
src/Presentation/SmartStore.Web/Administration/Controllers/ProductController.cs 2 16
src/Presentation/SmartStore.Web/Administration/Models/DataExchange/ImportProfileModel.cs 2 16
src/Presentation/SmartStore.Web/Controllers/CommonController.cs 2 15
src/Presentation/SmartStore.Web/Scripts/smartstore.entityPicker.js 2 15
Code maat – Author importance
0
20000
40000
60000
80000
100000
120000
Christian Oliff James Bright Marcus Gesing Michael Herzog Murat Cakir
Authors importance 2016
added deleted diff
Code maat – module ownership
5956 2449
226
6
10053
3747
32
7040
1604
0
90351
3662
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Marcus Gesing
Murat Cakir
Michael Herzog
src/Plugins/SmartStore.AmazonPay src/Plugins/SmartStore.Clickatell src/Plugins/SmartStore.DevTools
src/Plugins/SmartStore.DiscountRules src/Plugins/SmartStore.FacebookAuth src/Plugins/SmartStore.GoogleAnalytics
src/Plugins/SmartStore.GoogleMerchantCenter src/Plugins/SmartStore.OfflinePayment src/Plugins/SmartStore.Shipping
src/Plugins/SmartStore.ShippingByWeight src/Plugins/SmartStore.Tax src/Plugins/SmartStore.WebApi
src/Libraries/SmartStore.Core src/Libraries/SmartStore.Data src/Libraries/SmartStore.Services
src/Libraries/SmartStore.Services/Catalog src/Libraries/SmartStore.Services/Common src/Libraries/SmartStore.Services/DataExchange
src/Libraries/SmartStore.Services/Localization src/Libraries/SmartStore.Services/Messages src/Libraries/SmartStore.Services/Orders
src/Libraries/SmartStore.Services/Payments src/Libraries/SmartStore.Services/Shipping src/Libraries/SmartStore.Services/Tasks
src/Libraries/SmartStore.Services/Customers src/Libraries/SmartStore.Services/Configuration src/Libraries/SmartStore.Core/Utilities
src/Libraries/SmartStore.Core/Logging src/Libraries/SmartStore.Core/Extensions src/Libraries/SmartStore.Core/Domain
src/Tests/SmartStore.Services.Tests src/Tests/SmartStore.Web.MVC.Tests src/Presentation/SmartStore.Web
src/Presentation/SmartStore.Web.Framework
Code maat – module ownership core
14266
10053
7040
1097
234
535
699
2449
23
5956
90351
3747
1604
1138
723
472
396
226
200
1443662 32 0 0
44
0 6 6 0 22
Marcus Gesing Murat Cakir Michael Herzog
Code maat – code relations
A B C
Functional code Tests code
Other tools
■FxCop
■StyleCop
■R#
■SonarQube
■CodeCity
Arguments for boss
Hard data
provided by
engineering
tools speaks for
itself
Key outcome
■Everything can be measured
■Use suitable tools
■Provide hard data
■Programming triangle: correctness,
readability, performance
References
■ NDepend http://www.ndepend.com/
■ Code Maat https://github.com/adamtornhill/code-maat
■ Book https://pragprog.com/book/atcrime/your-code-as-a-
crime-scene
■ FxCop https://msdn.microsoft.com/en-
us/library/bb429476(v=vs.80).aspx
■ R# https://www.jetbrains.com/resharper/ (and other
similarVS plugins)
Thank you!
Blog: http://blog.klimczyk.pl
Contact:
Twitter: @pwlklm
Mail: pawel@klimczyk.pl

More Related Content

Viewers also liked

Product Roadmap vs Development
Product Roadmap vs DevelopmentProduct Roadmap vs Development
Product Roadmap vs Development
Pawel Klimczyk
 
ADJECTIVES ENDING IN ED & ING 1
ADJECTIVES ENDING IN ED & ING 1ADJECTIVES ENDING IN ED & ING 1
ADJECTIVES ENDING IN ED & ING 1
Vanesa
 
Time expressions
Time expressionsTime expressions
Time expressions
XxAxelGamerxX
 
Inspiring films
Inspiring filmsInspiring films
Inspiring films
guest95344f
 
Adjectives ending in ed and ing
Adjectives ending in ed and ingAdjectives ending in ed and ing
Adjectives ending in ed and ing
dhiano
 
Crime vocabulary
Crime vocabularyCrime vocabulary
Crime vocabulary
Elaboración Materiales
 
Vocabulary crime
Vocabulary crimeVocabulary crime
Vocabulary crime
sandritabonita
 
Beyond the walled garden - the story of how one learner used social media for...
Beyond the walled garden - the story of how one learner used social media for...Beyond the walled garden - the story of how one learner used social media for...
Beyond the walled garden - the story of how one learner used social media for...
Helen Crump
 
Crime Story - Narrative Task
Crime Story - Narrative TaskCrime Story - Narrative Task
Crime Story - Narrative Task
Hayley_Wilson
 
Adverbs
AdverbsAdverbs
DESCRIBING PEOPLE 1
DESCRIBING PEOPLE 1DESCRIBING PEOPLE 1
DESCRIBING PEOPLE 1
Vanesa
 
Vocabulary crime
Vocabulary crimeVocabulary crime
Vocabulary crime
sandritabonita
 
Headline Writing
Headline WritingHeadline Writing
Headline Writing
mrarmknecht
 
Adjectives ending in ed or -ing
Adjectives ending in  ed or -ingAdjectives ending in  ed or -ing
Adjectives ending in ed or -ing
Rachel Cheneaux Valz
 
Expressions of Time (Part 1)
Expressions of Time (Part 1) Expressions of Time (Part 1)
Expressions of Time (Part 1)
KatieEnglishTutoring
 
Ed and ing adjectives
Ed and ing adjectivesEd and ing adjectives
Ed and ing adjectives
lovinglondon
 
THE USE OF PRESENT PERFECT
THE USE OF PRESENT PERFECTTHE USE OF PRESENT PERFECT
THE USE OF PRESENT PERFECT
TEDDYBEAR2621
 
Adverbs
AdverbsAdverbs
Picture description
Picture descriptionPicture description
Picture description
Monica Reig
 
Adjectives on -ed or -ing (excited/exciting)
Adjectives on -ed or -ing (excited/exciting)Adjectives on -ed or -ing (excited/exciting)
Adjectives on -ed or -ing (excited/exciting)
Caroline Declerck
 

Viewers also liked (20)

Product Roadmap vs Development
Product Roadmap vs DevelopmentProduct Roadmap vs Development
Product Roadmap vs Development
 
ADJECTIVES ENDING IN ED & ING 1
ADJECTIVES ENDING IN ED & ING 1ADJECTIVES ENDING IN ED & ING 1
ADJECTIVES ENDING IN ED & ING 1
 
Time expressions
Time expressionsTime expressions
Time expressions
 
Inspiring films
Inspiring filmsInspiring films
Inspiring films
 
Adjectives ending in ed and ing
Adjectives ending in ed and ingAdjectives ending in ed and ing
Adjectives ending in ed and ing
 
Crime vocabulary
Crime vocabularyCrime vocabulary
Crime vocabulary
 
Vocabulary crime
Vocabulary crimeVocabulary crime
Vocabulary crime
 
Beyond the walled garden - the story of how one learner used social media for...
Beyond the walled garden - the story of how one learner used social media for...Beyond the walled garden - the story of how one learner used social media for...
Beyond the walled garden - the story of how one learner used social media for...
 
Crime Story - Narrative Task
Crime Story - Narrative TaskCrime Story - Narrative Task
Crime Story - Narrative Task
 
Adverbs
AdverbsAdverbs
Adverbs
 
DESCRIBING PEOPLE 1
DESCRIBING PEOPLE 1DESCRIBING PEOPLE 1
DESCRIBING PEOPLE 1
 
Vocabulary crime
Vocabulary crimeVocabulary crime
Vocabulary crime
 
Headline Writing
Headline WritingHeadline Writing
Headline Writing
 
Adjectives ending in ed or -ing
Adjectives ending in  ed or -ingAdjectives ending in  ed or -ing
Adjectives ending in ed or -ing
 
Expressions of Time (Part 1)
Expressions of Time (Part 1) Expressions of Time (Part 1)
Expressions of Time (Part 1)
 
Ed and ing adjectives
Ed and ing adjectivesEd and ing adjectives
Ed and ing adjectives
 
THE USE OF PRESENT PERFECT
THE USE OF PRESENT PERFECTTHE USE OF PRESENT PERFECT
THE USE OF PRESENT PERFECT
 
Adverbs
AdverbsAdverbs
Adverbs
 
Picture description
Picture descriptionPicture description
Picture description
 
Adjectives on -ed or -ing (excited/exciting)
Adjectives on -ed or -ing (excited/exciting)Adjectives on -ed or -ing (excited/exciting)
Adjectives on -ed or -ing (excited/exciting)
 

Similar to Code Crime Scene

Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source
B.A.
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
Maciej Lasyk
 
Next Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and SnykNext Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and Snyk
DevOps.com
 
Automated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security IntelligenceAutomated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security Intelligence
Jason Choi
 
Sandbox kiev
Sandbox kievSandbox kiev
Sandbox kiev
uisgslide
 
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
EC-Council
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii Shapoval
GlobalLogic Ukraine
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
Roberto Suggi Liverani
 
Application Server-less Web Applications - Serverless Toronto Meetup Intro
Application Server-less Web Applications - Serverless Toronto Meetup IntroApplication Server-less Web Applications - Serverless Toronto Meetup Intro
Application Server-less Web Applications - Serverless Toronto Meetup Intro
Daniel Zivkovic
 
Container con toronto
Container con torontoContainer con toronto
Container con toronto
Dan Lambright
 
YOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixYOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at Netflix
Brendan Gregg
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Amazon Web Services
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Guglielmo Iozzia
 
Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022
QAware GmbH
 
Monitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp DockerMonitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp Docker
The Incredible Automation Day
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZedits
Rod Soto
 
HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
 HTTP(S)-Based Clustering for Assisted Cybercrime Investigations HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
Marco Balduzzi
 
Building next gen malware behavioural analysis environment
Building next gen malware behavioural analysis environment Building next gen malware behavioural analysis environment
Building next gen malware behavioural analysis environment
isc2-hellenic
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
James Sirota
 
Timing attacks against web applications: Are they still practical?
Timing attacks against web applications: Are they still practical?Timing attacks against web applications: Are they still practical?
Timing attacks against web applications: Are they still practical?
DefCamp
 

Similar to Code Crime Scene (20)

Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
Next Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and SnykNext Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and Snyk
 
Automated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security IntelligenceAutomated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security Intelligence
 
Sandbox kiev
Sandbox kievSandbox kiev
Sandbox kiev
 
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii Shapoval
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 
Application Server-less Web Applications - Serverless Toronto Meetup Intro
Application Server-less Web Applications - Serverless Toronto Meetup IntroApplication Server-less Web Applications - Serverless Toronto Meetup Intro
Application Server-less Web Applications - Serverless Toronto Meetup Intro
 
Container con toronto
Container con torontoContainer con toronto
Container con toronto
 
YOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixYOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at Netflix
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
 
Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022
 
Monitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp DockerMonitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp Docker
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZedits
 
HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
 HTTP(S)-Based Clustering for Assisted Cybercrime Investigations HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
HTTP(S)-Based Clustering for Assisted Cybercrime Investigations
 
Building next gen malware behavioural analysis environment
Building next gen malware behavioural analysis environment Building next gen malware behavioural analysis environment
Building next gen malware behavioural analysis environment
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
 
Timing attacks against web applications: Are they still practical?
Timing attacks against web applications: Are they still practical?Timing attacks against web applications: Are they still practical?
Timing attacks against web applications: Are they still practical?
 

More from Pawel Klimczyk

Wrocnet.meeting.info.20180515.109
Wrocnet.meeting.info.20180515.109Wrocnet.meeting.info.20180515.109
Wrocnet.meeting.info.20180515.109
Pawel Klimczyk
 
Wrocnet.meeting.info.20180320.107
Wrocnet.meeting.info.20180320.107Wrocnet.meeting.info.20180320.107
Wrocnet.meeting.info.20180320.107
Pawel Klimczyk
 
Software Quality for Programmers
Software Quality for ProgrammersSoftware Quality for Programmers
Software Quality for Programmers
Pawel Klimczyk
 
Solid as OOP abstraction
Solid as OOP abstractionSolid as OOP abstraction
Solid as OOP abstraction
Pawel Klimczyk
 
SOLID for Adults
SOLID for AdultsSOLID for Adults
SOLID for Adults
Pawel Klimczyk
 
Wrocnet #88
Wrocnet #88Wrocnet #88
Wrocnet #88
Pawel Klimczyk
 
GeekWeekWro TechSaturdays
GeekWeekWro TechSaturdaysGeekWeekWro TechSaturdays
GeekWeekWro TechSaturdays
Pawel Klimczyk
 
GeekWeekWro hack4culture
GeekWeekWro hack4cultureGeekWeekWro hack4culture
GeekWeekWro hack4culture
Pawel Klimczyk
 
Wrocnet #87
Wrocnet #87Wrocnet #87
Wrocnet #87
Pawel Klimczyk
 
Wrocnet 86
Wrocnet 86Wrocnet 86
Wrocnet 86
Pawel Klimczyk
 
Wrocnet spotkanie 85
Wrocnet spotkanie 85Wrocnet spotkanie 85
Wrocnet spotkanie 85
Pawel Klimczyk
 

More from Pawel Klimczyk (11)

Wrocnet.meeting.info.20180515.109
Wrocnet.meeting.info.20180515.109Wrocnet.meeting.info.20180515.109
Wrocnet.meeting.info.20180515.109
 
Wrocnet.meeting.info.20180320.107
Wrocnet.meeting.info.20180320.107Wrocnet.meeting.info.20180320.107
Wrocnet.meeting.info.20180320.107
 
Software Quality for Programmers
Software Quality for ProgrammersSoftware Quality for Programmers
Software Quality for Programmers
 
Solid as OOP abstraction
Solid as OOP abstractionSolid as OOP abstraction
Solid as OOP abstraction
 
SOLID for Adults
SOLID for AdultsSOLID for Adults
SOLID for Adults
 
Wrocnet #88
Wrocnet #88Wrocnet #88
Wrocnet #88
 
GeekWeekWro TechSaturdays
GeekWeekWro TechSaturdaysGeekWeekWro TechSaturdays
GeekWeekWro TechSaturdays
 
GeekWeekWro hack4culture
GeekWeekWro hack4cultureGeekWeekWro hack4culture
GeekWeekWro hack4culture
 
Wrocnet #87
Wrocnet #87Wrocnet #87
Wrocnet #87
 
Wrocnet 86
Wrocnet 86Wrocnet 86
Wrocnet 86
 
Wrocnet spotkanie 85
Wrocnet spotkanie 85Wrocnet spotkanie 85
Wrocnet spotkanie 85
 

Recently uploaded

Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
Priyanka Aash
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
Priyanka Aash
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and CitiesThe Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
Arpan Buwa
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 

Recently uploaded (20)

Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and CitiesThe Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 

Code Crime Scene

  • 1. CODE CRIME SCENEVERSION 1.2 Paweł Klimczyk Gemotial 2017
  • 2. About me ■ Software engineer ■ Running Gemotial Software Studio ■ Co-organizer of WrocNET ■ Blog: http://blog.klimczyk.pl ■ Contact: – Twitter: @pwlklm – Mail: pawel@klimczyk.pl
  • 3. What is a crime scene? (1) ■ Duplicate Code ■ Long Method ■ Comments ■ Long Parameter List ■ Large Class ■ Switch Statements ■ Parallel Inheritance Hierarchies ■ Conditional Complexity ■ Combinitorial Explosion ■ Uncommunicative Name ■ Dead Code ■ Inconsistent Names ■ Temporary Field
  • 4. What is a crime scene? (2) ■ AlternativeClasses with Different Interfaces ■ Primitive ObsessionData Class ■ Data Clumps ■ Refused Bequest ■ Inappropriate Intimacy ■ Indecent Exposure ■ Feature Envy ■ Lazy Class ■ Message Chains ■ Middle Man ■ DivergentChange ■ Shotgun Surgery ■ Parallel Inheritance Hierarchies ■ Incomplete Library Class ■ Solution Sprawl
  • 5. Crime scene samples – code level
  • 6. Crime scene samples – class level
  • 7. Crime scene samples – SOLID violation
  • 8. Crime scene samples – multiple test assertions
  • 9. SmartStore.NET introduction https://github.com/smartstoreag/SmartStoreNET SmartStore.NET is a free, open source, full-featured e-commerce solution for companies of any size. It is web standards compliant and incorporates the newest Microsoft web technology stack. SmartStore.NET includes all essential features to create multilingual and multi- currency stores targeting desktop or mobile devices and enabling SEO optimized rich product catalogs with support for an unlimited number of products and categories, variants, bundles, datasheets, ESD, discounts, coupons and many more. The state-of-the-art architecture of SmartStore.NET - with ASP.NET 4.5 + MVC 5, Entity Framework 6 and Domain Driven Design approach - makes it easy to extend, extremely flexible and essentially fun to work with ;-)
  • 10. SmartStore.NET production deployments ■ http://2stonedshop.de/ ■ http://indo-divers.de/ ■ http://www.adr-shop.com/ ■ http://www.mobilesat.co.uk/ trendspro.builtwith.com +500 online stores
  • 15. Finding the crime How to find code crime in project ?
  • 16. Code crime scene (Ndepend) •Dependency graph •Dependency matrix •LINQ queries •Code quality metrics (+custom) •More…
  • 22. NDepend – SOLID violation (S)
  • 23. NDepend – SOLID violation (I)
  • 24. NDepend – Code coverage
  • 27. June – October 2016 compare
  • 28. Source control systems – measure behavior * 1a660f0 | (HEAD -> master, origin/master, origin/HEAD) dd (Fri May 13 17:03:40 2016) [User1] * dfcd431 | screenshots attepmt 2 (Fri May 13 16:59:35 2016) [User1] * f29f63e | Apropriate screenshotting added (Fri May 13 16:54:46 2016) [User1] * 9203bdb | disabled native events for IE (Fri May 13 16:38:44 2016) [User1] * 45a6f12 | More setting for screenshots (Fri May 13 15:13:36 2016) [User1] * 690180c | IE only (Fri May 13 15:01:22 2016) [User1] * b687d21 | ScreenShots added (Fri May 13 15:00:51 2016) [User1] * f98748f | Added waiting for page fully loaded (Fri May 13 14:44:48 2016) [User1] * 2f15015 | Wait till page fully loaded for IE (Fri May 13 11:46:25 2016) [User1] * 46dafc1 | Enabled IE and Chrome (Fri May 13 11:23:21 2016) [User1] * 4faa96c | eliminated reposting form twice (Fri May 13 11:13:15 2016) [User1] * ea6e879 | Improved user profile edit tests (Fri May 13 10:53:38 2016) [User1] * 83f2f28 | removed retry forTestLauncher (Fri May 13 10:32:31 2016) [User1] * ff0e1ff | Changed retry count and added message text for asserts (Fri May 13 10:25:13 2016) [User1] * 2f27e2a |Temporary disabled most of the tests to (Fri May 13 10:08:46 2016) [User1] * b6dcb02 | FireFox enabled for tests (Thu May 12 14:02:29 2016) [User1]
  • 29. Code maat - introduction Features: ■ Analize GIT/SVN history ■ Command line tool ■ Various analizers ■ CSV output ■ Open source Work flow: Git log…. Parse log with code maat Generate graph from csv
  • 30. Code maat – sample entity,n-authors,n-revs src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs,4,14 src/Plugins/SmartStore.PayPal/Providers/PayPalExpressProvider.cs,4,6 src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs,3,48 src/Presentation/SmartStore.Web/Administration/Controllers/ImportController.cs,3,38 src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs,3,35 src/Presentation/SmartStore.Web/Administration/Controllers/ExportController.cs,3,31 src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs,3,30 src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs,3,29 java -jar code-maat-0.8.5-standalone.jar -l log_file.log -c git -a authors
  • 31. Code maat – hot files entity n.authors n.revs src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs 3 48 src/Presentation/SmartStore.Web/Administration/Controllers/ImportController.cs 3 38 src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs 3 35 src/Presentation/SmartStore.Web/Administration/Controllers/ExportController.cs 3 31 src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs 3 30 src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs 3 29 src/Libraries/SmartStore.Data/Migrations/201512151526290_ImportFramework.cs 2 28 src/Libraries/SmartStore.Data/Migrations/201603121451066_ThirdPartyEmailHandOver.cs 2 21 src/Plugins/SmartStore.PayPal/Localization/resources.en-us.xml 3 20 src/Plugins/SmartStore.PayPal/Localization/resources.de-de.xml 3 20 src/Plugins/SmartStore.PayPal/Services/PayPalService.cs 1 20 src/Libraries/SmartStore.Services/DataExchange/Export/DataExporter.cs 3 19 src/Libraries/SmartStore.Services/DataExchange/Import/DataImporter.cs 3 19 src/Libraries/SmartStore.Services/DataExchange/Import/ImportRow.cs 3 18 src/Presentation/SmartStore.Web/Administration/Views/Import/_ColumnMappings.cshtml 3 18 src/Presentation/SmartStore.Web/Administration/Views/Import/_CreateOrUpdate.cshtml 1 18 src/Presentation/SmartStore.Web/Administration/Controllers/ProductController.cs 2 16 src/Presentation/SmartStore.Web/Administration/Models/DataExchange/ImportProfileModel.cs 2 16 src/Presentation/SmartStore.Web/Controllers/CommonController.cs 2 15 src/Presentation/SmartStore.Web/Scripts/smartstore.entityPicker.js 2 15
  • 32. Code maat – Author importance 0 20000 40000 60000 80000 100000 120000 Christian Oliff James Bright Marcus Gesing Michael Herzog Murat Cakir Authors importance 2016 added deleted diff
  • 33. Code maat – module ownership 5956 2449 226 6 10053 3747 32 7040 1604 0 90351 3662 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Marcus Gesing Murat Cakir Michael Herzog src/Plugins/SmartStore.AmazonPay src/Plugins/SmartStore.Clickatell src/Plugins/SmartStore.DevTools src/Plugins/SmartStore.DiscountRules src/Plugins/SmartStore.FacebookAuth src/Plugins/SmartStore.GoogleAnalytics src/Plugins/SmartStore.GoogleMerchantCenter src/Plugins/SmartStore.OfflinePayment src/Plugins/SmartStore.Shipping src/Plugins/SmartStore.ShippingByWeight src/Plugins/SmartStore.Tax src/Plugins/SmartStore.WebApi src/Libraries/SmartStore.Core src/Libraries/SmartStore.Data src/Libraries/SmartStore.Services src/Libraries/SmartStore.Services/Catalog src/Libraries/SmartStore.Services/Common src/Libraries/SmartStore.Services/DataExchange src/Libraries/SmartStore.Services/Localization src/Libraries/SmartStore.Services/Messages src/Libraries/SmartStore.Services/Orders src/Libraries/SmartStore.Services/Payments src/Libraries/SmartStore.Services/Shipping src/Libraries/SmartStore.Services/Tasks src/Libraries/SmartStore.Services/Customers src/Libraries/SmartStore.Services/Configuration src/Libraries/SmartStore.Core/Utilities src/Libraries/SmartStore.Core/Logging src/Libraries/SmartStore.Core/Extensions src/Libraries/SmartStore.Core/Domain src/Tests/SmartStore.Services.Tests src/Tests/SmartStore.Web.MVC.Tests src/Presentation/SmartStore.Web src/Presentation/SmartStore.Web.Framework
  • 34. Code maat – module ownership core 14266 10053 7040 1097 234 535 699 2449 23 5956 90351 3747 1604 1138 723 472 396 226 200 1443662 32 0 0 44 0 6 6 0 22 Marcus Gesing Murat Cakir Michael Herzog
  • 35. Code maat – code relations A B C Functional code Tests code
  • 37. Arguments for boss Hard data provided by engineering tools speaks for itself
  • 38. Key outcome ■Everything can be measured ■Use suitable tools ■Provide hard data ■Programming triangle: correctness, readability, performance
  • 39. References ■ NDepend http://www.ndepend.com/ ■ Code Maat https://github.com/adamtornhill/code-maat ■ Book https://pragprog.com/book/atcrime/your-code-as-a- crime-scene ■ FxCop https://msdn.microsoft.com/en- us/library/bb429476(v=vs.80).aspx ■ R# https://www.jetbrains.com/resharper/ (and other similarVS plugins)