24
WordCamp Lehigh Valley 2018 CODE IS POETRY — WHY CODE QUALITY REALLY MATTERS Slides: https://hsph.me/wclv18

CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

WordCamp Lehigh Valley 2018

CODE IS POETRY — WHY CODE QUALITY REALLY MATTERS

Slides: https://hsph.me/wclv18

Page 2: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

GUILLAUME MOLTER

SENIOR WEB AND APPLICATION DEVELOPER

[email protected]

@GUILLAUMEMOLTER

Page 3: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CONTEXTABOUT QUALITY AND RELIABILITY

Page 4: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence
Page 5: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence
Page 6: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CONTEXTAGILE MANIFESTO - OVERVIEW

Page 7: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

AGILE MANIFESTO

‣ 4 foundational values

‣ 12 supporting principles

http://agilemanifesto.org/

Page 8: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

AGILE MANIFESTO - 4 VALUES

‣ Individuals and interactions over processes and tools

‣ Working software over comprehensive documentation

‣ Customer collaboration over contract negotiation

‣ Responding to change over following a plan

Page 9: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

AGILE MANIFESTO - 12 5 PRINCIPLES

‣ Welcome changing requirements, even late in

development. Agile processes harness change for the

customer's competitive advantage.

‣ Deliver working software frequently, from a couple of

weeks to a couple of months, with a preference to the

shorter timescale.

Page 10: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

AGILE MANIFESTO - 12 5 PRINCIPLES

‣ Working software is the primary measure of progress.

‣ Continuous attention to technical excellence and

good design enhances agility.

‣ Simplicity--the art of maximizing the amount of work not

done--is essential.

Page 11: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CONTEXTOTHER CONSIDERATIONS

Page 12: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

THE COST OF BAD CODE

‣ Software failures cost $1.1 trillion in 2016

‣ IBM: “The costs of discovering defects after release are

significant: up to 30 times more than if you catch them

in the design and architectural phase” **

‣ Karma and Happiness

Page 13: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

WHAT IS GOOD CODE?DEFINING A GOAL

Page 14: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

GOOD CODE REQUIRES:

‣ Communication

‣ Experience

‣ To be reasonable

Page 15: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

Robert C. Martin “Clean Code” > Thom Holwerda

Page 16: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

WHAT IS GOOD CODE? CODE THAT:

‣ Works

‣ Is easy to understand

‣ Is easy to maintain

‣ Ships fast

Page 17: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CODE THAT WORKS

‣ Self testing

‣ Local dev with vvv or Docker

‣ Automated testing

‣ Unit tests (PHPUnit)

‣ Front-end testing (Selenium)

‣ Code reviews

Page 18: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CODE THAT IS EASY TO UNDERSTAND

‣ Coding standards and conventions

‣ WPCS and PHP Code Sniffer

‣ Naming

‣ Readability over “optimization/smart”

Page 19: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CODE THAT IS EASY TO MAINTAIN

‣ Architecture

‣ Build for the present design for the future

‣ Action and filter hooks

Page 20: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

CODE THAT SHIPS FAST

‣ AGILE Project Management

‣ Automation

‣ Be lazy: re-use, fork and extend

‣ Checklists

Page 21: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

README.MDGOING FURTHER

Page 22: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence
Page 23: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence
Page 24: CODE IS POETRY — WHY CODE QUALITY REALLY … › it › wordcamp-lv-18-code...‣ Working software is the primary measure of progress. ‣ Continuous attention to technical excellence

[email protected] - @guillaumemolter

QUESTIONS?

Slides: https://hsph.me/wclv18