working compassionately with legacy code, rubyconf 2015

73
Working Compassionately with Legacy Code @amar47shah

Upload: amar-shah

Post on 22-Jan-2018

231 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Working Compassionately with Legacy Code, RubyConf 2015

Working Compassionately with Legacy Code

@amar47shah

Page 2: Working Compassionately with Legacy Code, RubyConf 2015
Page 3: Working Compassionately with Legacy Code, RubyConf 2015

Avalokiteśvara by Wonderlane Flickr CC BY-NC 2.0

Page 4: Working Compassionately with Legacy Code, RubyConf 2015

Meditation Banyan by Christine Boose Flickr CC BY-NC-ND 2.0

Page 5: Working Compassionately with Legacy Code, RubyConf 2015
Page 6: Working Compassionately with Legacy Code, RubyConf 2015

hippie dog by istolethetv Flickr CC BY 2.0

Page 7: Working Compassionately with Legacy Code, RubyConf 2015

hippie dog by istolethetv Flickr CC BY 2.0 / text added

Page 8: Working Compassionately with Legacy Code, RubyConf 2015

LEARNING

Page 9: Working Compassionately with Legacy Code, RubyConf 2015

Brant Bjork by Ben Keeler Young Men’s Nation

Page 10: Working Compassionately with Legacy Code, RubyConf 2015
Page 11: Working Compassionately with Legacy Code, RubyConf 2015
Page 12: Working Compassionately with Legacy Code, RubyConf 2015
Page 13: Working Compassionately with Legacy Code, RubyConf 2015

rail climb Beth Jusino Flickr CC BY-NC 2.0

Page 14: Working Compassionately with Legacy Code, RubyConf 2015

Forgotten by Matthew Hester Flickr CC BY-NC-ND 2.0

Page 15: Working Compassionately with Legacy Code, RubyConf 2015

NASA

Page 16: Working Compassionately with Legacy Code, RubyConf 2015

The whirling disc of NGC 4526 by Stuart Rankin Flickr CC BY 2.0

Page 17: Working Compassionately with Legacy Code, RubyConf 2015

developers as second-class citizens

users as a despised and outcast underclass

Page 18: Working Compassionately with Legacy Code, RubyConf 2015

“Kill it and start over.”

Page 19: Working Compassionately with Legacy Code, RubyConf 2015

Blueprints by Sam Howzit Flickr CC BY 2.0

Page 20: Working Compassionately with Legacy Code, RubyConf 2015
Page 21: Working Compassionately with Legacy Code, RubyConf 2015

Smashville car by WBUR Boston Flickr CC BY-NC-ND 2.0

Page 22: Working Compassionately with Legacy Code, RubyConf 2015

Out Of Order by David Mach by duncan c Flickr CC BY-NC 2.0

Page 23: Working Compassionately with Legacy Code, RubyConf 2015

If you see something, say nothing by pedrik Flickr CC BY 2.0

Page 24: Working Compassionately with Legacy Code, RubyConf 2015

• no automated tests

• end-of-life Rails and Ruby versions

• 1500-line models, 300-line methods

• vulnerable to SQL injection

• authorization loopholes

Page 25: Working Compassionately with Legacy Code, RubyConf 2015

“pretty solid”

Page 26: Working Compassionately with Legacy Code, RubyConf 2015

New Flame sinking off Gibraltar by amateur_photo_bore Flickr CC BY-NC-ND 2.0

Page 27: Working Compassionately with Legacy Code, RubyConf 2015

Self portrait - Flamethrowers, facepaint and fantoms by MattysFlicks Flickr CC BY 2.0

Page 28: Working Compassionately with Legacy Code, RubyConf 2015

Reject. by Lucas Moratelli Flickr CC BY-NC 2.0

Page 29: Working Compassionately with Legacy Code, RubyConf 2015

* d51a256 - asdf * 56b5cfa - asdf * c12135f - adsf * 253e4ee - asdf * af9120b - asdf * 6b4a7b3 - asdf * a0b93d5 - asdf * ecb1fa5 - asdf * 4b19cda - asdf * 58cc3f7 - adsf * 7ffd540 - asdf * 6942f4f - adf * 8823caf - adsf * 9843c03 - adf * 3695f76 - adf * 4cb1131 - adf * 182430f - asdf * f2e9bd4 - adsf * ef5c68d - adsf * d386229 - adsf * 357b445 - adf

git commit -am asdf

Page 30: Working Compassionately with Legacy Code, RubyConf 2015
Page 31: Working Compassionately with Legacy Code, RubyConf 2015
Page 32: Working Compassionately with Legacy Code, RubyConf 2015
Page 33: Working Compassionately with Legacy Code, RubyConf 2015

index show new edit create update destroy

Page 34: Working Compassionately with Legacy Code, RubyConf 2015

$ ls app/services

groan_stifler.rb mirage_spotter.rb sand_from_eyes_wiper.rb

Desert by Moyan Brenn Flickr CC BY 2.0

Page 35: Working Compassionately with Legacy Code, RubyConf 2015
Page 36: Working Compassionately with Legacy Code, RubyConf 2015
Page 37: Working Compassionately with Legacy Code, RubyConf 2015

code is my boyfriend

Coding by the fire by tux0racer Flickr CC BY 2.0

Page 38: Working Compassionately with Legacy Code, RubyConf 2015

IMG_4876 by Aaron Goodman Flickr CC BY-ND 2.0

Page 39: Working Compassionately with Legacy Code, RubyConf 2015

Dark by Transformer18 Flickr CC BY 2.0

Page 40: Working Compassionately with Legacy Code, RubyConf 2015

Control

Page 41: Working Compassionately with Legacy Code, RubyConf 2015

Trust

Page 42: Working Compassionately with Legacy Code, RubyConf 2015

Chemical Tanker, Aug 11 by Louis Vest Flickr CC BY-NC 2.0

Page 43: Working Compassionately with Legacy Code, RubyConf 2015

Have You Ever Seen A Sadder Looking Dog? by Stewart Black Flickr CC BY 2.0

Page 44: Working Compassionately with Legacy Code, RubyConf 2015

Albert Einstein - Caricature by DonkeyHotey Flickr CC BY 2.0

Page 45: Working Compassionately with Legacy Code, RubyConf 2015

mural of the man inside Fatlace - japantown, san francisco by eric molina CC BY 2.0

Page 46: Working Compassionately with Legacy Code, RubyConf 2015

Pomodoro Kitchen Timer for Action Logging by Andy Roberts Flickr CC BY 2.0

TDD Hat by George Dinwiddie blog.gdinwiddie.com CC BY-SA 3.0Productivity: Getting Personal Kanban to Done by Dennis Hamilton Flickr CC BY 2.0

Page 47: Working Compassionately with Legacy Code, RubyConf 2015

Cognitive Restructuring

1. Identify automatic thoughts

2. Isolate cognitive distortions

3. Apply reason

4. Develop rebuttal

Page 48: Working Compassionately with Legacy Code, RubyConf 2015

rm -rf / by Zakwitnij!pl Ejdzej & Iric Flickr CC BY-SA 2.0Self portrait - Flamethrowers, facepaint and fantoms by MattysFlicks Flickr CC BY 2.0

Page 49: Working Compassionately with Legacy Code, RubyConf 2015

Darlin Do You Gamble by Thomas Hawk Flickr CC BY-NC 2.0Reject. by Lucas Moratelli Flickr CC BY-NC 2.0

Page 50: Working Compassionately with Legacy Code, RubyConf 2015
Page 51: Working Compassionately with Legacy Code, RubyConf 2015

–Jan Dudulskihttp://codetunes.com/2014/fixing-legacy-code/

“code is person-agnostic”

Page 52: Working Compassionately with Legacy Code, RubyConf 2015

Healthy homemade school lunches by Jennifer Chait Flickr CC BY-SA 2.0

Page 53: Working Compassionately with Legacy Code, RubyConf 2015

Boring by Cheryl Colan Flickr CC BY-NC 2.0

Page 54: Working Compassionately with Legacy Code, RubyConf 2015

Boring by Strevo Flickr CC BY-SA 2.0

Page 55: Working Compassionately with Legacy Code, RubyConf 2015

Onaturligt by Marcus Linder Flickr CC BY-NC 2.0

Page 56: Working Compassionately with Legacy Code, RubyConf 2015

Planking Arnhem by Marco Derksen Flickr CC BY-NC 2.0

Page 57: Working Compassionately with Legacy Code, RubyConf 2015

You need to know all of this —>

(sorry you can’t read it)

Rails Competencies Poster by Code Fellows, LLC CC BY-NC-SA 3.0

Page 58: Working Compassionately with Legacy Code, RubyConf 2015

120621-O-ZZ999-005 by U.S. Pacific Fleet Flickr CC BY-NC 2.0

Page 59: Working Compassionately with Legacy Code, RubyConf 2015

Stopwatch by William Warby Flickr CC BY 2.0

Page 60: Working Compassionately with Legacy Code, RubyConf 2015

Wet Pipin by Mattieu Guionnet Flickr CC BY-NC-ND 2.0

Page 61: Working Compassionately with Legacy Code, RubyConf 2015

Onaturligt by Marcus Linder Flickr CC BY-NC 2.0

Page 62: Working Compassionately with Legacy Code, RubyConf 2015

Potter in Bangalore, India by Muhammad Mahdi Karim Wikimedia Commons Free Art License

Page 63: Working Compassionately with Legacy Code, RubyConf 2015

mandala - making & destroying Vernon Hyde Flickr CC BY-NC-ND 2.0

Page 64: Working Compassionately with Legacy Code, RubyConf 2015

Chevron's Toxic Legacy in Ecuador's Amazon by Rainforest Action Network Flickr CC BY-NC 2.0

Page 65: Working Compassionately with Legacy Code, RubyConf 2015

Larry Powers (Ugly Americans) by Jim H. Flickr CC BY-SA 2.0

Page 66: Working Compassionately with Legacy Code, RubyConf 2015

what can i change?

Page 67: Working Compassionately with Legacy Code, RubyConf 2015

how much will i tolerate?

Page 68: Working Compassionately with Legacy Code, RubyConf 2015

Zhuzha - Spy Cat by Mark Vegas Flickr CC BY-SA 2.0

Page 69: Working Compassionately with Legacy Code, RubyConf 2015

Meditation Banyan by Christine Boose Flickr CC BY-NC-ND 2.0

Page 70: Working Compassionately with Legacy Code, RubyConf 2015

MINSWAN

Page 71: Working Compassionately with Legacy Code, RubyConf 2015

MINSWAN

Page 72: Working Compassionately with Legacy Code, RubyConf 2015

letters by Beth Cortez-Neavel Flickr CC BY 2.0

Page 73: Working Compassionately with Legacy Code, RubyConf 2015