Working Compassionately with Legacy Code, RubyConf 2015

Post on 22-Jan-2018

231 views 2 download

Transcript of Working Compassionately with Legacy Code, RubyConf 2015

Working Compassionately with Legacy Code

@amar47shah

Avalokiteśvara by Wonderlane Flickr CC BY-NC 2.0

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

hippie dog by istolethetv Flickr CC BY 2.0

hippie dog by istolethetv Flickr CC BY 2.0 / text added

LEARNING

Brant Bjork by Ben Keeler Young Men’s Nation

rail climb Beth Jusino Flickr CC BY-NC 2.0

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

NASA

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

developers as second-class citizens

users as a despised and outcast underclass

“Kill it and start over.”

Blueprints by Sam Howzit Flickr CC BY 2.0

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

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

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

• no automated tests

• end-of-life Rails and Ruby versions

• 1500-line models, 300-line methods

• vulnerable to SQL injection

• authorization loopholes

“pretty solid”

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

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

Reject. by Lucas Moratelli Flickr CC BY-NC 2.0

* 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

index show new edit create update destroy

$ ls app/services

groan_stifler.rb mirage_spotter.rb sand_from_eyes_wiper.rb

Desert by Moyan Brenn Flickr CC BY 2.0

code is my boyfriend

Coding by the fire by tux0racer Flickr CC BY 2.0

IMG_4876 by Aaron Goodman Flickr CC BY-ND 2.0

Dark by Transformer18 Flickr CC BY 2.0

Control

Trust

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

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

Albert Einstein - Caricature by DonkeyHotey Flickr CC BY 2.0

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

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

Cognitive Restructuring

1. Identify automatic thoughts

2. Isolate cognitive distortions

3. Apply reason

4. Develop rebuttal

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

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

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

“code is person-agnostic”

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

Boring by Cheryl Colan Flickr CC BY-NC 2.0

Boring by Strevo Flickr CC BY-SA 2.0

Onaturligt by Marcus Linder Flickr CC BY-NC 2.0

Planking Arnhem by Marco Derksen Flickr CC BY-NC 2.0

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

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

Stopwatch by William Warby Flickr CC BY 2.0

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

Onaturligt by Marcus Linder Flickr CC BY-NC 2.0

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

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

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

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

what can i change?

how much will i tolerate?

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

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

MINSWAN

MINSWAN

letters by Beth Cortez-Neavel Flickr CC BY 2.0