SlideShare a Scribd company logo
1
Code Review CODEsign
Hard coding (also, hard-coding or
hardcoding) refers to the software
development practice of embedding what
may, perhaps only in retrospect, be
regarded as input or configuration data
directly into the source code of a program
or other executable object.
http://en.wikipedia.org/wiki/Anti-pattern
max@kleiner.com
2
Design &
Runtime
Technische
Anforderungen
Fachliche
Anforderungen
Q-Anforderungen
Fachmodell Architekturkonzept
Funktionsmuster
reference,
links
Packages, IAD
configuration
Process, Rules, GUI Settings,
Objects, Options, Profiles
Use Case, Activity
Code Review Topics
Analyse
data/function/object
layer
source code
DB, XML,
properties
literals, res, values
Developer,
Admin,
User
3
Code Layers
Model
4
Report Result
Content
Inhaltsverzeichnis
1 Zweck des Dokuments 4
2 Management-Übersicht 4
3 Ausgangslage 4
4 Befunde 5
4.1 Erläuterung Klassifikationsschema 5
4.2 Clean Code 7
4.3 Code Conventions 10
4.3.1 Übergreifend 10
4.3.2 Delphi 11
4.3.3 C# /Java 12
4.3.4 PL/SQL 16
4.4 Programmierstil 19
4.5 Einsatz von 3rd Party Libraries 21
4.6 Verwendung einer Standard Library 23
4.7 Exception Handling 25
4.8 Rechtschreibung 26
4.9 Dokumentation im Source Code 27
4.10 Testabdeckung 28
4.11 OOP-Prinzipien 29
4.12 Verwendung Frameworks 31
4.13 Verwendung Components 32
4.14 Dokumentation ausserhalb Source Code 34
5 Empfohlene Massnahmen 37
5.1 Etablieren von Continuous Inspection 37
5.2 Bearbeitung von Befunden 38
6 Anhang 39
6.1 Systemtopologie 39
6.2 Pattern und Metrics of Methods 39
6.3 VCL or Composite Application Library (CAL) 40
5
Rules
• CA1303: Do not pass literals as localized
parameters
• public void TimeMethod(int hour, int minute)
{ if (hour < 0 || hour > 23) { MessageBox.Show( "The valid range is 0 -
23."); //CA1303 fires because the parameter for method Show is Text }
• CA1302: Do not hardcode locale specific
strings
• static void Main()
{ string string0 = "C:";
• PMD: Avoid duplicate literals (string or numeric)
6
Found
• new Regex(@"(COM,s*IMAX)s*:s*((?<pub>[ws-/]
+|?),s*(?<istar>[ws-/]+|?))");
• command.CommandText = "select [Name], [EntityNote],
[Package], [Stereotype] from [Tabelle1$]";
• var colmXIstar = dataTable.Columns.Add("IMAXSTAR");
• [DataContract(Namespace="http://CH.MX.maXbox.Demo")]
• public class ServiceFault }
• throws-Declaration: 'DataAccessException‘, catch
(Exception e) {
• 1214: LOGGER.error("Setup Fehler", e);
7
Checks
QS Review Checklist
**********************************************************
1. Standards - are name conventions being followed?
2. Bugs Reports- Are the changes generally correct?
3. Are the Requirements Well Understood (Multilang)?
4. Are all program headers completed?
5. Are code changes commented appropriately?
6. Does documentation use Correct Diagrams or Grammar?
7. Are release notes Clear? Complete?
8. Installation Issues, Licenses, Certs. Are there any?
9. Version and Build Control, Are output products clear?
10.Test Coverage Instructions - Are they any? Complete?
http://www.softwareschule.ch/download/codesign_2015.pdf
8
Metrics
QS Metric Checklist
**********************************************************
Metrics Code Reviews deal with Bad Structure
• General Code Size (in module)
• Cohesion (in classes and inheritance)
• Complexity
• Coupling (between classes or units)
• Cyclic Dependency, Declare+Definition, ACD-Metric
• Interfaces or Packages (design & runtime)
• Static, Public, Private (inheritance or delegate)
• Quantify your code
• Highlight Redesign Needs
• Change Impact Analysis
9
Solution
• Continuous Inspection We had a dream :
mvn sonar:sonar & together

More Related Content

PDF
C++ Advanced Features
PPTX
Typed? Dynamic? Both! Cross-platform DSLs in C#
PDF
Introduction to Active Record at MySQL Conference 2007
PDF
maXbox Arduino Tutorial
PDF
GEO mapbox geo_api_develop2 Intro
PPTX
Mecanismos de participacion ciudadana
PDF
maXbox Starter 40 REST API Coding
PDF
maXbox Starter 45 Robotics
C++ Advanced Features
Typed? Dynamic? Both! Cross-platform DSLs in C#
Introduction to Active Record at MySQL Conference 2007
maXbox Arduino Tutorial
GEO mapbox geo_api_develop2 Intro
Mecanismos de participacion ciudadana
maXbox Starter 40 REST API Coding
maXbox Starter 45 Robotics

Viewers also liked (12)

PDF
Algunos trabajos de sala de 5 A y B realizados en Inglés
PDF
A new Codemodel for Codemetrics
PDF
maXbox Regular Expression in PI
PDF
Tutorial 38 3D Print Coding
PDF
maXbox_Arduino_Pascal_Magazine
PDF
maXbox Starter 36 Software Testing
PDF
Basta mastering regex power
PDF
Windows 10 Hybrid Development
PPT
Aca advocacy
PPTX
PPTX
PDF
maXbox starter46 work with Wine
Algunos trabajos de sala de 5 A y B realizados en Inglés
A new Codemodel for Codemetrics
maXbox Regular Expression in PI
Tutorial 38 3D Print Coding
maXbox_Arduino_Pascal_Magazine
maXbox Starter 36 Software Testing
Basta mastering regex power
Windows 10 Hybrid Development
Aca advocacy
maXbox starter46 work with Wine
Ad

Similar to Codereview Topics (20)

PPTX
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
PDF
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
PDF
New Features of JSR 317 (JPA 2.0)
PDF
Kief Morris - Infrastructure is terrible
PPT
DotNet Introduction
PDF
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
PPTX
Orms vs Micro-ORMs
PPT
SQL Server 2005 CLR Integration
PDF
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
PDF
Apache Spark, the Next Generation Cluster Computing
PPTX
Using Spark to Load Oracle Data into Cassandra
PPTX
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
PDF
0100_Embeded_C_CompilationProcess.pdf
PPTX
Dublin Ireland Spark Meetup October 15, 2015
PDF
Kerberizing spark. Spark Summit east
PPT
Smoothing Your Java with DSLs
PDF
GraphQL - when REST API is not enough - lessons learned
PPTX
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
PDF
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
PPTX
Silicon Valley JUG - How to generate customized java 8 code from your database
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
New Features of JSR 317 (JPA 2.0)
Kief Morris - Infrastructure is terrible
DotNet Introduction
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Orms vs Micro-ORMs
SQL Server 2005 CLR Integration
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Apache Spark, the Next Generation Cluster Computing
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
0100_Embeded_C_CompilationProcess.pdf
Dublin Ireland Spark Meetup October 15, 2015
Kerberizing spark. Spark Summit east
Smoothing Your Java with DSLs
GraphQL - when REST API is not enough - lessons learned
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
Silicon Valley JUG - How to generate customized java 8 code from your database
Ad

More from Max Kleiner (20)

PDF
EKON28_ModernRegex_12_Regular_Expressions.pdf
PDF
EKON28_Maps_API_12_google_openstreetmaps.pdf
PDF
EKON26_VCL4Python.pdf
PDF
EKON26_Open_API_Develop2Cloud.pdf
PDF
maXbox_Starter91_SyntheticData_Implement
PDF
Ekon 25 Python4Delphi_MX475
PDF
EKON 25 Python4Delphi_mX4
PDF
maXbox Starter87
PDF
maXbox Starter78 PortablePixmap
PDF
maXbox starter75 object detection
PDF
BASTA 2020 VS Code Data Visualisation
PDF
EKON 24 ML_community_edition
PDF
maxbox starter72 multilanguage coding
PDF
EKON 23 Code_review_checklist
PDF
EKON 12 Running OpenLDAP
PDF
EKON 12 Closures Coding
PDF
NoGUI maXbox Starter70
PDF
maXbox starter69 Machine Learning VII
PDF
maXbox starter68 machine learning VI
PDF
maXbox starter67 machine learning V
EKON28_ModernRegex_12_Regular_Expressions.pdf
EKON28_Maps_API_12_google_openstreetmaps.pdf
EKON26_VCL4Python.pdf
EKON26_Open_API_Develop2Cloud.pdf
maXbox_Starter91_SyntheticData_Implement
Ekon 25 Python4Delphi_MX475
EKON 25 Python4Delphi_mX4
maXbox Starter87
maXbox Starter78 PortablePixmap
maXbox starter75 object detection
BASTA 2020 VS Code Data Visualisation
EKON 24 ML_community_edition
maxbox starter72 multilanguage coding
EKON 23 Code_review_checklist
EKON 12 Running OpenLDAP
EKON 12 Closures Coding
NoGUI maXbox Starter70
maXbox starter69 Machine Learning VII
maXbox starter68 machine learning VI
maXbox starter67 machine learning V

Recently uploaded (20)

PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Well-logging-methods_new................
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
DOCX
573137875-Attendance-Management-System-original
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
web development for engineering and engineering
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Well-logging-methods_new................
CYBER-CRIMES AND SECURITY A guide to understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
R24 SURVEYING LAB MANUAL for civil enggi
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
573137875-Attendance-Management-System-original
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Operating System & Kernel Study Guide-1 - converted.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Foundation to blockchain - A guide to Blockchain Tech
web development for engineering and engineering
OOP with Java - Java Introduction (Basics)
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Geodesy 1.pptx...............................................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...

Codereview Topics

  • 1. 1 Code Review CODEsign Hard coding (also, hard-coding or hardcoding) refers to the software development practice of embedding what may, perhaps only in retrospect, be regarded as input or configuration data directly into the source code of a program or other executable object. http://en.wikipedia.org/wiki/Anti-pattern max@kleiner.com
  • 2. 2 Design & Runtime Technische Anforderungen Fachliche Anforderungen Q-Anforderungen Fachmodell Architekturkonzept Funktionsmuster reference, links Packages, IAD configuration Process, Rules, GUI Settings, Objects, Options, Profiles Use Case, Activity Code Review Topics Analyse data/function/object layer source code DB, XML, properties literals, res, values Developer, Admin, User
  • 4. 4 Report Result Content Inhaltsverzeichnis 1 Zweck des Dokuments 4 2 Management-Übersicht 4 3 Ausgangslage 4 4 Befunde 5 4.1 Erläuterung Klassifikationsschema 5 4.2 Clean Code 7 4.3 Code Conventions 10 4.3.1 Übergreifend 10 4.3.2 Delphi 11 4.3.3 C# /Java 12 4.3.4 PL/SQL 16 4.4 Programmierstil 19 4.5 Einsatz von 3rd Party Libraries 21 4.6 Verwendung einer Standard Library 23 4.7 Exception Handling 25 4.8 Rechtschreibung 26 4.9 Dokumentation im Source Code 27 4.10 Testabdeckung 28 4.11 OOP-Prinzipien 29 4.12 Verwendung Frameworks 31 4.13 Verwendung Components 32 4.14 Dokumentation ausserhalb Source Code 34 5 Empfohlene Massnahmen 37 5.1 Etablieren von Continuous Inspection 37 5.2 Bearbeitung von Befunden 38 6 Anhang 39 6.1 Systemtopologie 39 6.2 Pattern und Metrics of Methods 39 6.3 VCL or Composite Application Library (CAL) 40
  • 5. 5 Rules • CA1303: Do not pass literals as localized parameters • public void TimeMethod(int hour, int minute) { if (hour < 0 || hour > 23) { MessageBox.Show( "The valid range is 0 - 23."); //CA1303 fires because the parameter for method Show is Text } • CA1302: Do not hardcode locale specific strings • static void Main() { string string0 = "C:"; • PMD: Avoid duplicate literals (string or numeric)
  • 6. 6 Found • new Regex(@"(COM,s*IMAX)s*:s*((?<pub>[ws-/] +|?),s*(?<istar>[ws-/]+|?))"); • command.CommandText = "select [Name], [EntityNote], [Package], [Stereotype] from [Tabelle1$]"; • var colmXIstar = dataTable.Columns.Add("IMAXSTAR"); • [DataContract(Namespace="http://CH.MX.maXbox.Demo")] • public class ServiceFault } • throws-Declaration: 'DataAccessException‘, catch (Exception e) { • 1214: LOGGER.error("Setup Fehler", e);
  • 7. 7 Checks QS Review Checklist ********************************************************** 1. Standards - are name conventions being followed? 2. Bugs Reports- Are the changes generally correct? 3. Are the Requirements Well Understood (Multilang)? 4. Are all program headers completed? 5. Are code changes commented appropriately? 6. Does documentation use Correct Diagrams or Grammar? 7. Are release notes Clear? Complete? 8. Installation Issues, Licenses, Certs. Are there any? 9. Version and Build Control, Are output products clear? 10.Test Coverage Instructions - Are they any? Complete? http://www.softwareschule.ch/download/codesign_2015.pdf
  • 8. 8 Metrics QS Metric Checklist ********************************************************** Metrics Code Reviews deal with Bad Structure • General Code Size (in module) • Cohesion (in classes and inheritance) • Complexity • Coupling (between classes or units) • Cyclic Dependency, Declare+Definition, ACD-Metric • Interfaces or Packages (design & runtime) • Static, Public, Private (inheritance or delegate) • Quantify your code • Highlight Redesign Needs • Change Impact Analysis
  • 9. 9 Solution • Continuous Inspection We had a dream : mvn sonar:sonar & together