Presentation Cocoahead (1)...2019/01/17  · SwiftLint Commit convention Rule 2: “lint has to be =...

Preview:

Citation preview

January ’19Christophe R.

SOFTWARE ENTROPY Good practices & tools

January ’19Christophe R.

January ’19Christophe R.

Software Entropy

The second law of thermodynamics, in principle, states that a closed system's disorder cannot be reduced, it can only remain unchanged or increase. A measure of this disorder is entropy. This law also seems plausible for software systems; as a system is modified, its disorder, or entropy, tends to increase.1

1. Jacobson, Ivar et al (1992), Object-Oriented Software Engineering: A Use Case Driven Approach, ACM Press.

January ’19Christophe R.

Files Blank Comment Code—————————————————————————————————————————————————————————C++ 698 52147 32834 326529 57.2%C/C++ Header 1341 33603 51494 134187 23.5%Swift 1265 13979 11318 53835 9.4%C 14 2984 7752 43496 7.6%Objective C++ 94 3202 1498 12125 2.1%Objective C 12 144 94 495 0.1%—————————————————————————————————————————————————————————Sum 570667

1. Knowledge Is Beautiful, David McCandless 

Average iOS Program ~ 50 000 lines1

January ’19Christophe R.

Can we control Chaos ?

South Park The Fractured But Whole - Professor Chaos’ Army

January ’19Christophe R.

Project with no rules

January ’19Christophe R.

Project with rulesProject with rules… applied?

January ’19Christophe R.

Needs1. Automatic validation2. Rules

Benefits 1. Less bugs2. Cohesion3. Better tracking4. Faster build time5. Obi wan Kenobi

January ’19Christophe R.

Tools used @ Summit

- Time- Gerrit- Jenkins- Fastlane- Swiftlint- Jira- Slack

January ’19Christophe R.

Continuous Integration

Client A

Tool 1

Tool 2

Tool 3

Rule 1: “separate logic in small project for reusability”

Gerrit - Jenkins

Multi jobs

SwiftLint

Commit convention

Rule 2: “lint has to be <= to previous one”

Unit Test Rule 4: “coverage has to be >= to previous one”

Rule 3: “commit with Jira number”

Need a Fix

+1 Rule 5: “review by someone else”

+2

Rebase on master/developGenerate new tag

Build ipa/framework

Update Jira

Inform

Recommended