Slide 1

Slide 1 text

Code Quality Code @kosalanuwan

Slide 2

Slide 2 text

get some paper, put it in a typewriter, type FADE IN ... and keep typing - Peter Falk told to Paul Reiser

Slide 3

Slide 3 text

PRE DEMO: Movie Script

Slide 4

Slide 4 text

A computer program is the most complicated thing on earth, second to a woman's brain - Marvin Silva

Slide 5

Slide 5 text

PRE DEMO: What it looks like

Slide 6

Slide 6 text

Why do you have to care? - Understandability - Readability - Changeability - Extensibility - Maintainability

Slide 7

Slide 7 text

How do you write bad code? - Rigid - Fragile - Immobility - Design debt : Technical debt by taking shortcuts? - Environment debt : Technical debt by not running build, test, and other tasks - Needless complexity - Needless repetition - Opacity

Slide 8

Slide 8 text

The costs: - Respond to change - Cost of change - Technical debt

Slide 9

Slide 9 text

My gut says it’s clean, so I believe it - KP

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Code Quality Code @kosalanuwan less WTFs

Slide 12

Slide 12 text

How to practice? - Code kata - Pair programming - Design/Code reviews - Peer reviews

Slide 13

Slide 13 text

What can you do TODAY? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes

Slide 14

Slide 14 text

DEMOS

Slide 15

Slide 15 text

Other things that go with it? - KISS - Boy scout rule - Root cause analysis - Following standard conventions - Class design principles

Slide 16

Slide 16 text

When you are matured with these principles and patterns it will become difficult for you to think without those - KP

Slide 17

Slide 17 text

Happy Coding J @kosalanuwan http://kosalanuwan.github.io/talks