17
Clean Code in Practice - Getting your R&D on Board Ruth Sperer Tech Lead @ AT&T Israel

Clean code - Getting your R&D on board

Embed Size (px)

Citation preview

Page 1: Clean code - Getting your R&D on board

Clean Code in Practice -Getting your R&D on Board

Ruth Sperer

Tech Lead @ AT&T Israel

Page 2: Clean code - Getting your R&D on board

20 years experience in Software Industry

BA in Computer Science - Tel-Aviv University

M.Sc. In Computer Science – UMD

Algorithms in

search engines

speech recognition

image processing

Page 3: Clean code - Getting your R&D on board
Page 4: Clean code - Getting your R&D on board

Why Clean Code?

Page 5: Clean code - Getting your R&D on board

AT&T Israel Center of Excellence

R&D Center

500 Employees

Page 6: Clean code - Getting your R&D on board

AT&T – a learning organization

2012/3 – Agile

2013/4 – Engineering Practices

Focus Areas

Design

Coding

Unit Testing

and... Continuous Integration

Page 7: Clean code - Getting your R&D on board

AT&T – Implementing Engineering Practices

• Introductory lecture

• Hands-on workshop

• Team coaching (10 days per scrum)

• Champions naming and training

• “Show and Tell” sessions

Page 8: Clean code - Getting your R&D on board

The process of restructuring existing computer code without changing its external behavior.

Just like house cleaning..Do it on a regular basisHandle one room at a timeIf it smells, it’s definitely time to

clean..

Code Refactoring - Definition

Page 9: Clean code - Getting your R&D on board

Code Refactoring – Baby Steps

“Didn’t change a thing” (© Eran Peer)

• Rename

• Extract variable

• Extract method

• Extract interface

• Move

• Introduce parameter

Page 10: Clean code - Getting your R&D on board

Code Refactoring….. And what if you don’t…

Page 11: Clean code - Getting your R&D on board

Code Review - Motivation

Definition: The analysis of source code in order to find defects

• Early bug detection

• Knowledge sharing

• Code improvements

• Social communication

• Understanding

Page 12: Clean code - Getting your R&D on board

Code Review – Practical guide

• Let the tools work for you:• Formatter

• Lint

• Find problems, not solutions

• As a reviewer – be kind

• As a reviewed – leave your ego in the drawer

• Don’t skip it (no valid excuses)

Page 13: Clean code - Getting your R&D on board

The commitment double edged sword

Real Life Implementation – Process Conflicts

Page 14: Clean code - Getting your R&D on board

Real Life Implementation – The People

• Keeping the momentum• The champion dilemma

• The various stakeholders• Team

• Tech lead\R&D leader

• Product owner

• Projects manager

• Marketing

Page 15: Clean code - Getting your R&D on board

• Engage all stake holders

• Include it in your estimations

• Refactoring backlog

• Refactoring in each sprint

• Show it in your demo

• New project – do it right from the start

• It’s a journey..

Real Life Implementation – Solutions

Page 16: Clean code - Getting your R&D on board

Clean Code MattersTake a Stand