Top Banner
Code Cleanliness and Business Impact (30mins)
59

Clean Code - Business Impact

Jul 06, 2015

Download

Software

Cathal King

A high level discussion of the potential costs of failing to write Clean Code.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Clean Code - Business Impact

Code Cleanliness

and

Business Impact

(30mins)

Page 2: Clean Code - Business Impact

There really is a problem

and

here's how bad it is

Page 3: Clean Code - Business Impact

We all agree that this stuff is important

But how important?

Page 4: Clean Code - Business Impact

Sorry for the interruption

Page 5: Clean Code - Business Impact
Page 6: Clean Code - Business Impact
Page 7: Clean Code - Business Impact
Page 8: Clean Code - Business Impact
Page 9: Clean Code - Business Impact
Page 10: Clean Code - Business Impact
Page 11: Clean Code - Business Impact
Page 12: Clean Code - Business Impact
Page 13: Clean Code - Business Impact

Code that Interrupts

Page 14: Clean Code - Business Impact
Page 15: Clean Code - Business Impact
Page 16: Clean Code - Business Impact
Page 17: Clean Code - Business Impact

When you hit Careless Code

you hit a Diversion

Page 18: Clean Code - Business Impact
Page 19: Clean Code - Business Impact

BUT the meter is running

CME Group pays while we follow that diversion

Page 20: Clean Code - Business Impact
Page 21: Clean Code - Business Impact

What’s the return on investment?

New knowledge?

Sort of...

Page 22: Clean Code - Business Impact

“They're not code, they're not features, they are

puzzles”

a Tim Cooke rant

Page 23: Clean Code - Business Impact

Puzzles Are Cheap + Easy to create

Cheap code up-front ==

Expensive maintenance + enhancement

Page 24: Clean Code - Business Impact
Page 25: Clean Code - Business Impact

So what?

Isn’t that what programming is?

Page 26: Clean Code - Business Impact
Page 27: Clean Code - Business Impact
Page 28: Clean Code - Business Impact

Cumulative complexity

Production incident

Page 29: Clean Code - Business Impact
Page 30: Clean Code - Business Impact

So Why Do We Do It?

Page 31: Clean Code - Business Impact

Functionally it works!

Page 32: Clean Code - Business Impact

Coding at School

Reckless acts of heroics

Page 33: Clean Code - Business Impact

Coding at School

vs

Coding at Work

Page 34: Clean Code - Business Impact

Enterprise apps

have

non-functional

requirements

Page 35: Clean Code - Business Impact
Page 36: Clean Code - Business Impact
Page 37: Clean Code - Business Impact

When non-functionals

go wrong

Page 38: Clean Code - Business Impact

Seems Forgivable

Page 39: Clean Code - Business Impact
Page 40: Clean Code - Business Impact
Page 41: Clean Code - Business Impact

Usually

Later == Never

Page 42: Clean Code - Business Impact
Page 43: Clean Code - Business Impact

One more Broken Window

Page 44: Clean Code - Business Impact

Feeling the pressure?

Page 45: Clean Code - Business Impact
Page 46: Clean Code - Business Impact
Page 47: Clean Code - Business Impact

We Can Do Better

Page 48: Clean Code - Business Impact

Are you making things better?

or

Are you making things worse?

Page 49: Clean Code - Business Impact

Boy Scout Rule

"Check it in better than you found it"

Page 50: Clean Code - Business Impact

What should Sideshow Bob do?

Put the rakes

away?Leave them?

Page 51: Clean Code - Business Impact

Invest in the future?

or

Borrow from the future?

Page 52: Clean Code - Business Impact

PMP Goal

"Learn all the quirks and nuances of

application codebase."

Winner: Most Unlikely PMP Goal Ever award

Page 53: Clean Code - Business Impact

Build teams of

Software Engineers

not

Application Developers

Page 54: Clean Code - Business Impact

Most important way to achieve

this is to Try

Don't be afraid of your code

Page 55: Clean Code - Business Impact

Recognise that certain non-

functionals need investment

Integrate that investment into

normal day-to-day work

Page 56: Clean Code - Business Impact

Clean Coding Practices

Future technical sessions planned

December training - "Clean Code" by Instil

Page 57: Clean Code - Business Impact

Clean Code: Functions/Methods

Small

Do one thing, Do it well, Do it only

One level of abstraction per function

Don't Repeat Yourself / Remove Duplication

Page 58: Clean Code - Business Impact

Clean Code: Comments

Explain yourself in code

Good/Bad/Redundant comments

"Don't comment bad code, rewrite it" - Brian Kernighan

Comments don't make up for bad code

Page 59: Clean Code - Business Impact

Clean Code: Meaningful Names

Avoid disinformation

Make meaningful distinctions

Avoid mental mappings

Use intention revealing names