Social games and their clean code_Clean Code Days_Dresden 2013

129

Click here to load reader

Transcript of Social games and their clean code_Clean Code Days_Dresden 2013

Page 1: Social games and their clean code_Clean Code Days_Dresden 2013

Social Gamesand their Clean Code

Page 2: Social games and their clean code_Clean Code Days_Dresden 2013

http://www.vgchartz.com/gamedb/?name=fifa+soccer+13 || http://cartelthemes.com/fifa-13-193-hd-wallpapers.html

12.79 Mio.

Page 3: Social games and their clean code_Clean Code Days_Dresden 2013

30.11 Mio.

http://www.vgchartz.com/gamedb/?name=Call+of+Duty%3A+Modern+Warfare+3 || http://www.alextv.de/2011/11/10/call-of-duty-modern-warfare-3-review

Page 4: Social games and their clean code_Clean Code Days_Dresden 2013

Video Games = special interests

Page 5: Social games and their clean code_Clean Code Days_Dresden 2013

159.79 Mio.

Page 6: Social games and their clean code_Clean Code Days_Dresden 2013

Social Games = Games for everybody

Page 7: Social games and their clean code_Clean Code Days_Dresden 2013

Berlin

Page 8: Social games and their clean code_Clean Code Days_Dresden 2013

2009 — 20 employees

Page 9: Social games and their clean code_Clean Code Days_Dresden 2013

Today — 250 employees

Page 10: Social games and their clean code_Clean Code Days_Dresden 2013

20 Game-Teams

Page 11: Social games and their clean code_Clean Code Days_Dresden 2013

Independent

development teams

Page 12: Social games and their clean code_Clean Code Days_Dresden 2013

Mutable,

small teams

Page 13: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 14: Social games and their clean code_Clean Code Days_Dresden 2013

Way of working

Page 15: Social games and their clean code_Clean Code Days_Dresden 2013

No fixed roles

Page 16: Social games and their clean code_Clean Code Days_Dresden 2013

High responsibility

Page 17: Social games and their clean code_Clean Code Days_Dresden 2013

Configurability

Page 18: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 19: Social games and their clean code_Clean Code Days_Dresden 2013

Weekly releases

Page 20: Social games and their clean code_Clean Code Days_Dresden 2013

Tracking & Reporting

Page 21: Social games and their clean code_Clean Code Days_Dresden 2013

Agile way of working

Page 22: Social games and their clean code_Clean Code Days_Dresden 2013

Agility

Page 23: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Maintainability

Agility

improves

allows

Page 24: Social games and their clean code_Clean Code Days_Dresden 2013

Bubble Island

Page 25: Social games and their clean code_Clean Code Days_Dresden 2013

2009Start of development

Page 26: Social games and their clean code_Clean Code Days_Dresden 2013

2011Not more maintainable!

http://www.flickr.com/photos/mecklenburg

Page 27: Social games and their clean code_Clean Code Days_Dresden 2013

But stillsuccessful!

Page 28: Social games and their clean code_Clean Code Days_Dresden 2013

Refactoring!

Page 29: Social games and their clean code_Clean Code Days_Dresden 2013

1Consistency

Page 30: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 31: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 32: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 33: Social games and their clean code_Clean Code Days_Dresden 2013

Naming

Consistency

Page 34: Social games and their clean code_Clean Code Days_Dresden 2013

Naming

•Speaking names

Consistency

Page 35: Social games and their clean code_Clean Code Days_Dresden 2013

Naming

•Speaking names

•No Abbreviations

Consistency

Page 36: Social games and their clean code_Clean Code Days_Dresden 2013

Naming

•Speaking names

•No Abbreviations

•1 word per concept

Consistency

Page 37: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 38: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 39: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 40: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 41: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 42: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 43: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 44: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 45: Social games and their clean code_Clean Code Days_Dresden 2013

Formatting

Consistency

Page 46: Social games and their clean code_Clean Code Days_Dresden 2013

Formatting

•Indentation

Consistency

Page 47: Social games and their clean code_Clean Code Days_Dresden 2013

Formatting

•Indentation

•Wrapping braces

Consistency

Page 48: Social games and their clean code_Clean Code Days_Dresden 2013

Formatting

•Indentation

•Wrapping braces

•Variables first

Consistency

Page 49: Social games and their clean code_Clean Code Days_Dresden 2013

Formatting

•Indentation

•Wrapping braces

•Variables first

•Public in front of non-public methods

Consistency

Page 50: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 51: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Page 52: Social games and their clean code_Clean Code Days_Dresden 2013

Comments

Consistency

Page 53: Social games and their clean code_Clean Code Days_Dresden 2013

Comments

•Avoid them if possible

Consistency

Page 54: Social games and their clean code_Clean Code Days_Dresden 2013

Comments

•Avoid them if possible

•Usage scenarios

Consistency

Page 55: Social games and their clean code_Clean Code Days_Dresden 2013

Comments

•Avoid them if possible

•Usage scenarios

‣Warnings

Consistency

Page 56: Social games and their clean code_Clean Code Days_Dresden 2013

Comments

•Avoid them if possible

•Usage scenarios

‣Warnings

‣ Simplified explanations

Consistency

Page 57: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

Consistency

Page 58: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

•Naming

Consistency

Page 59: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

•Naming

•Formatting

Consistency

Page 60: Social games and their clean code_Clean Code Days_Dresden 2013

Consistency

•Naming

•Formatting

•Comments

Consistency

Page 61: Social games and their clean code_Clean Code Days_Dresden 2013

2Maintainability

Page 62: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 63: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 64: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 65: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 66: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 67: Social games and their clean code_Clean Code Days_Dresden 2013

Methods

Maintainability

Page 68: Social games and their clean code_Clean Code Days_Dresden 2013

Methods

•As small as possible

Maintainability

Page 69: Social games and their clean code_Clean Code Days_Dresden 2013

Methods

•As small as possible

•1 level of abstraction

Maintainability

Page 70: Social games and their clean code_Clean Code Days_Dresden 2013

Methods

•As small as possible

•1 level of abstraction

•1 functionality

Maintainability

Page 71: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 72: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 73: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 74: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 75: Social games and their clean code_Clean Code Days_Dresden 2013

Classes

Maintainability

Page 76: Social games and their clean code_Clean Code Days_Dresden 2013

Classes

•1 reason to change (SRP)

Maintainability

Page 77: Social games and their clean code_Clean Code Days_Dresden 2013

Classes

•1 reason to change (SRP)

•Only a few instance variables

Maintainability

Page 78: Social games and their clean code_Clean Code Days_Dresden 2013

Classes

•1 reason to change (SRP)

•Only a few instance variables

•High kohesion

Maintainability

Page 79: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 80: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 81: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 82: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 83: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 84: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Page 85: Social games and their clean code_Clean Code Days_Dresden 2013

Data structures

Maintainability

Page 86: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid train wrecks

Data structures

Maintainability

Page 87: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid train wrecks

•Use data transfer objects

Data structures

Maintainability

Page 88: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid train wrecks

•Use data transfer objects

•Separate production and use of systems

Data structures

Maintainability

Page 89: Social games and their clean code_Clean Code Days_Dresden 2013

Maintainability

Maintainability

Page 90: Social games and their clean code_Clean Code Days_Dresden 2013

•Methods

Maintainability

Maintainability

Page 91: Social games and their clean code_Clean Code Days_Dresden 2013

•Methods

•Classes

Maintainability

Maintainability

Page 92: Social games and their clean code_Clean Code Days_Dresden 2013

•Methods

•Classes

•Data structures

Maintainability

Maintainability

Page 93: Social games and their clean code_Clean Code Days_Dresden 2013

3Agility

Page 94: Social games and their clean code_Clean Code Days_Dresden 2013

Islands of knowledge

Agility

http://flickr.com/photos/92928628@N04

Page 95: Social games and their clean code_Clean Code Days_Dresden 2013

Pair Programming

Agility

Page 96: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid islands of knowledge

Pair Programming

Agility

Page 97: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid islands of knowledge

•Integration of new team members

Pair Programming

Agility

Page 98: Social games and their clean code_Clean Code Days_Dresden 2013

•Avoid islands of knowledge

•Integration of new team members

•Collective responsibility

Pair Programming

Agility

Page 99: Social games and their clean code_Clean Code Days_Dresden 2013

Difficult to read

& unstructured

Agility

Page 100: Social games and their clean code_Clean Code Days_Dresden 2013

Regular refactorings

Agility

Page 101: Social games and their clean code_Clean Code Days_Dresden 2013

•Continuous improvements

Regular refactorings

Agility

Page 102: Social games and their clean code_Clean Code Days_Dresden 2013

•Continuous improvements

•The Boy Scout Rule (Robert C. Martin)

Regular refactorings

Agility

Page 103: Social games and their clean code_Clean Code Days_Dresden 2013

No safeguarding

Agility

http://flickr.com/photos/99995147@N00

Page 104: Social games and their clean code_Clean Code Days_Dresden 2013

Unit tests

Agility

Page 105: Social games and their clean code_Clean Code Days_Dresden 2013

•Safety net

Unit tests

Agility

Page 106: Social games and their clean code_Clean Code Days_Dresden 2013

•Safety net

•Facilitated training

Unit tests

Agility

Page 107: Social games and their clean code_Clean Code Days_Dresden 2013

•Safety net

•Facilitated training

•Playground

Unit tests

Agility

Page 108: Social games and their clean code_Clean Code Days_Dresden 2013

Features late testable

Agility

http://www.flickr.com/photos/adesigna

Page 109: Social games and their clean code_Clean Code Days_Dresden 2013

Continuous integration

Agility

Page 110: Social games and their clean code_Clean Code Days_Dresden 2013

•Early available software artifacts

Continuous integration

Agility

Page 111: Social games and their clean code_Clean Code Days_Dresden 2013

•Early available software artifacts

•Verifiable expectations

Continuous integration

Agility

Page 112: Social games and their clean code_Clean Code Days_Dresden 2013

•Early available software artifacts

•Verifiable expectations

•Foreseeable problems

Continuous integration

Agility

Page 113: Social games and their clean code_Clean Code Days_Dresden 2013

Agility

Agility

Page 114: Social games and their clean code_Clean Code Days_Dresden 2013

•Pair Programming

Agility

Agility

Page 115: Social games and their clean code_Clean Code Days_Dresden 2013

•Pair Programming

•Regular refactorings

Agility

Agility

Page 116: Social games and their clean code_Clean Code Days_Dresden 2013

•Pair Programming

•Regular refactorings

•Unit tests

Agility

Agility

Page 117: Social games and their clean code_Clean Code Days_Dresden 2013

•Pair Programming

•Regular refactorings

•Unit tests

•Continuous integration

Agility

Agility

Page 118: Social games and their clean code_Clean Code Days_Dresden 2013

4Tools

Page 119: Social games and their clean code_Clean Code Days_Dresden 2013

https://www.pivotaltracker.com

Tools

Page 122: Social games and their clean code_Clean Code Days_Dresden 2013

Tools

CPD & PMD

Page 123: Social games and their clean code_Clean Code Days_Dresden 2013

Benefit for Wooga

Page 124: Social games and their clean code_Clean Code Days_Dresden 2013

Flexible team building

http://www.flickr.com/photos/scoobay

Page 125: Social games and their clean code_Clean Code Days_Dresden 2013

High productivityover long period of time

http://www.flickr.com/photos/stephenbegin

Page 126: Social games and their clean code_Clean Code Days_Dresden 2013

changing requirementshttp://www.flickr.com/photos/jimculp

Rapid response to

Page 127: Social games and their clean code_Clean Code Days_Dresden 2013

Clean Code as

a common language

Page 128: Social games and their clean code_Clean Code Days_Dresden 2013

Less wtf/minute

Page 129: Social games and their clean code_Clean Code Days_Dresden 2013

Questions?

jobs.wooga.com

@StephanPartzsch