SlideShare a Scribd company logo
1 of 21
Download to read offline
@Mostgood
Inheriting code
Sally Shepard
Who am I? @mostgood
✤ Started writing iPhone apps in 2008 !
✤ Head of App Development at Dennis Publishing (we’re hiring!)!
✤ Best of 2013 - Newsstand
Inheriting code
✤ Code that was written by someone else that you have to maintain!
✤ How many of us have inherited code?!
✤ Try it if you haven’t - it’s amazingly fun and educational, and only
occasionally painful
Why inheriting code?
✤ Had a new iOS developer join last week!
✤ There has been a lot of !
“Why was this done?” !
“How does this actually work?”!
and general anger at the people who wrote it...
“Why do I need to open Xcode?”
✤ Some rampant bugs need squashing!
✤ The app looks dated!
✤ Add new features!
✤ Legal issues!
✤ API deprecation
I’ve opened Xcode...
wow
such error
much warnings
so deprecated
Stalk your prey
✤ Go through documentation!
✤ Look through commit history!
✤ Issue tracking!
✤ Crash reports!
✤ Become obsessive
As you go
✤ add comments!
✤ add pragmas!
✤ document how it works!
✤ keep track of known issues!
✤ add tests
Quick fixes
✤ Update 3rd party libraries/frameworks!
✤ Basic refactoring!
✤ Drop support for older OS versions if possible!
✤ Run ‘Convert to Modern Objective-C Syntax’, etc
Not so quick fixes
✤ Standardise: Replacing XYMagicGridView with UICollectionView!
✤ Modernise: NSURLConnection -> NSURLSession!
✤ Updating persistent storage type: Plist -> CoreData!
✤ Complicated refactoring
It’s too broken: rewrite all the
things
✤ Declare bankruptcy on technical debt!
✤ Shoehorning!
✤ Latest and greatest
This isn’t working: rewrite all the
things
✤ booBoo.surfaceArea > plaster.surfaceArea!
✤ Making it worse!
✤ Ghosts in the code
“Why is it like this?”
✤ Did people really not care about quality and maintainability?!
✤ Possibly!
✤ But there is usually a reason why
Culprits...
✤ On the cheap!
✤ Newly native!
✤ Inexperienced team
...Culprits
✤ Cray cray deadlines!
✤ Too many cooks!
✤ Bad clients
Don’t point fingers
✤ We all do stupid things!
✤ There are always circumstances!
✤ If you haven’t already, you’ll create something that will torture
another developer someday
Open a dialogue
✤ If possible, get in touch with who worked on it before!
✤ Talk to people who are maintaining your code!
✤ Find people at conferences, meet-ups, twitter, etc...
“It’s good to talk”
✤ It shows you how far you’ve come!
✤ Grounds you!
✤ Learn something new!
✤ Teach someone something new!
✤ Shows respect!
✤ Strengthens community
What’s your legacy?
✤ When you write code, think of the next developer!
✤ Document and comment!
✤ Write meaningful commit messages!
✤ Coding standard!
✤ Readability!
✤ Write tests (if you’re into that sort of thing)
Insurance Premiums
mild WTF Good Better
Ultra-über-
awesome
Comments x x x x
Documentation x x x
Issue tracking x x
Refactor x x
Coding standard x x
Readability x
Tests x
Price: < hour few hours a day few days
Thanks!
@mostgood

More Related Content

What's hot

What's hot (7)

Javascript isn't hard
Javascript isn't hardJavascript isn't hard
Javascript isn't hard
 
Deserialization with the JavaScript for the lulz
Deserialization with the JavaScript for the lulzDeserialization with the JavaScript for the lulz
Deserialization with the JavaScript for the lulz
 
Rails Development That Doesn't Hurt
Rails Development That Doesn't HurtRails Development That Doesn't Hurt
Rails Development That Doesn't Hurt
 
Avoiding common Accessibility mistakes
Avoiding common Accessibility mistakesAvoiding common Accessibility mistakes
Avoiding common Accessibility mistakes
 
Ei ux through usability testing
Ei ux through usability testingEi ux through usability testing
Ei ux through usability testing
 
JavaScript isn't evil.
JavaScript isn't evil.JavaScript isn't evil.
JavaScript isn't evil.
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 

Viewers also liked

Viewers also liked (6)

Developing for Apple TV
Developing for Apple TVDeveloping for Apple TV
Developing for Apple TV
 
Making an app like 'Clear' Accessible
Making an app like 'Clear' AccessibleMaking an app like 'Clear' Accessible
Making an app like 'Clear' Accessible
 
Crafting Great Accessible Experiences
Crafting Great Accessible ExperiencesCrafting Great Accessible Experiences
Crafting Great Accessible Experiences
 
Extracurricular Swift
Extracurricular SwiftExtracurricular Swift
Extracurricular Swift
 
Implementing inclusive interfaces in iOS
Implementing inclusive interfaces in iOSImplementing inclusive interfaces in iOS
Implementing inclusive interfaces in iOS
 
Building habits: keeping users engaged
Building habits: keeping users engagedBuilding habits: keeping users engaged
Building habits: keeping users engaged
 

Similar to Inheriting iOS code

Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
michaelag1971
 
How to create/improve OSS product and its community (revised)
How to create/improve OSS product and its community (revised)How to create/improve OSS product and its community (revised)
How to create/improve OSS product and its community (revised)
SATOSHI TAGOMORI
 

Similar to Inheriting iOS code (20)

Django girls ahmedabad First Things First!
Django girls ahmedabad First Things First!Django girls ahmedabad First Things First!
Django girls ahmedabad First Things First!
 
Reinvent yourself - How to become a native iOS developer in nine steps
Reinvent yourself - How to become a native iOS developer in nine stepsReinvent yourself - How to become a native iOS developer in nine steps
Reinvent yourself - How to become a native iOS developer in nine steps
 
Mobile Devices in the Classroom
Mobile Devices in the ClassroomMobile Devices in the Classroom
Mobile Devices in the Classroom
 
Making Effective Prototypes
Making Effective PrototypesMaking Effective Prototypes
Making Effective Prototypes
 
Feedback loops between tooling and culture
Feedback loops between tooling and cultureFeedback loops between tooling and culture
Feedback loops between tooling and culture
 
Code Of Our Own
Code Of Our OwnCode Of Our Own
Code Of Our Own
 
Reasons to be cheerful - Fronteers 2010
Reasons to be cheerful - Fronteers 2010Reasons to be cheerful - Fronteers 2010
Reasons to be cheerful - Fronteers 2010
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
 
HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)
 
Real world software launch
Real world software launchReal world software launch
Real world software launch
 
Is Writing More Important Than Programming
Is Writing More Important Than ProgrammingIs Writing More Important Than Programming
Is Writing More Important Than Programming
 
Websummit
WebsummitWebsummit
Websummit
 
MongoDB, Development and You
MongoDB, Development and YouMongoDB, Development and You
MongoDB, Development and You
 
How to create/improve OSS product and its community (revised)
How to create/improve OSS product and its community (revised)How to create/improve OSS product and its community (revised)
How to create/improve OSS product and its community (revised)
 
Code reviews
Code reviewsCode reviews
Code reviews
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Community and Github: 7/27/2011
Community and Github: 7/27/2011Community and Github: 7/27/2011
Community and Github: 7/27/2011
 
Chasing elephants
Chasing elephantsChasing elephants
Chasing elephants
 
Chasing Elephants - Alberto Brandolini - Codemotion Rome 2017
Chasing Elephants - Alberto Brandolini - Codemotion Rome 2017Chasing Elephants - Alberto Brandolini - Codemotion Rome 2017
Chasing Elephants - Alberto Brandolini - Codemotion Rome 2017
 
Seven ways to be a happier JavaScript developer - NDC Oslo
Seven ways to be a happier JavaScript developer - NDC OsloSeven ways to be a happier JavaScript developer - NDC Oslo
Seven ways to be a happier JavaScript developer - NDC Oslo
 

More from Sally Shepard

More from Sally Shepard (13)

Swift on Raspberry Pi
Swift on Raspberry PiSwift on Raspberry Pi
Swift on Raspberry Pi
 
Swift hardware hacking @ try! Swift
Swift hardware hacking @ try! SwiftSwift hardware hacking @ try! Swift
Swift hardware hacking @ try! Swift
 
Porting iOS apps to tvOS
Porting iOS apps to tvOSPorting iOS apps to tvOS
Porting iOS apps to tvOS
 
Porting iOS apps to tvOS
Porting iOS apps to tvOSPorting iOS apps to tvOS
Porting iOS apps to tvOS
 
Helping Users Create Good Habits @ AltConf 2017
Helping Users Create Good Habits @ AltConf 2017Helping Users Create Good Habits @ AltConf 2017
Helping Users Create Good Habits @ AltConf 2017
 
iOS Accessibility Testing Workshop
iOS Accessibility Testing WorkshopiOS Accessibility Testing Workshop
iOS Accessibility Testing Workshop
 
Helping Users Create Good Habits @ MCE 2017
Helping Users Create Good Habits @ MCE 2017Helping Users Create Good Habits @ MCE 2017
Helping Users Create Good Habits @ MCE 2017
 
Debugging Accessibility @ Craft Conf
Debugging Accessibility @ Craft ConfDebugging Accessibility @ Craft Conf
Debugging Accessibility @ Craft Conf
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Debugging Accessibility
Debugging AccessibilityDebugging Accessibility
Debugging Accessibility
 
Implementing Inclusive Interfaces
Implementing Inclusive InterfacesImplementing Inclusive Interfaces
Implementing Inclusive Interfaces
 
Making apps for the Apple TV
Making apps for the Apple TVMaking apps for the Apple TV
Making apps for the Apple TV
 
Beyond VoiceOver: making iOS apps accessible
Beyond VoiceOver: making iOS apps accessibleBeyond VoiceOver: making iOS apps accessible
Beyond VoiceOver: making iOS apps accessible
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Inheriting iOS code

  • 2. Who am I? @mostgood ✤ Started writing iPhone apps in 2008 ! ✤ Head of App Development at Dennis Publishing (we’re hiring!)! ✤ Best of 2013 - Newsstand
  • 3. Inheriting code ✤ Code that was written by someone else that you have to maintain! ✤ How many of us have inherited code?! ✤ Try it if you haven’t - it’s amazingly fun and educational, and only occasionally painful
  • 4. Why inheriting code? ✤ Had a new iOS developer join last week! ✤ There has been a lot of ! “Why was this done?” ! “How does this actually work?”! and general anger at the people who wrote it...
  • 5. “Why do I need to open Xcode?” ✤ Some rampant bugs need squashing! ✤ The app looks dated! ✤ Add new features! ✤ Legal issues! ✤ API deprecation
  • 6. I’ve opened Xcode... wow such error much warnings so deprecated
  • 7. Stalk your prey ✤ Go through documentation! ✤ Look through commit history! ✤ Issue tracking! ✤ Crash reports! ✤ Become obsessive
  • 8. As you go ✤ add comments! ✤ add pragmas! ✤ document how it works! ✤ keep track of known issues! ✤ add tests
  • 9. Quick fixes ✤ Update 3rd party libraries/frameworks! ✤ Basic refactoring! ✤ Drop support for older OS versions if possible! ✤ Run ‘Convert to Modern Objective-C Syntax’, etc
  • 10. Not so quick fixes ✤ Standardise: Replacing XYMagicGridView with UICollectionView! ✤ Modernise: NSURLConnection -> NSURLSession! ✤ Updating persistent storage type: Plist -> CoreData! ✤ Complicated refactoring
  • 11. It’s too broken: rewrite all the things ✤ Declare bankruptcy on technical debt! ✤ Shoehorning! ✤ Latest and greatest
  • 12. This isn’t working: rewrite all the things ✤ booBoo.surfaceArea > plaster.surfaceArea! ✤ Making it worse! ✤ Ghosts in the code
  • 13. “Why is it like this?” ✤ Did people really not care about quality and maintainability?! ✤ Possibly! ✤ But there is usually a reason why
  • 14. Culprits... ✤ On the cheap! ✤ Newly native! ✤ Inexperienced team
  • 15. ...Culprits ✤ Cray cray deadlines! ✤ Too many cooks! ✤ Bad clients
  • 16. Don’t point fingers ✤ We all do stupid things! ✤ There are always circumstances! ✤ If you haven’t already, you’ll create something that will torture another developer someday
  • 17. Open a dialogue ✤ If possible, get in touch with who worked on it before! ✤ Talk to people who are maintaining your code! ✤ Find people at conferences, meet-ups, twitter, etc...
  • 18. “It’s good to talk” ✤ It shows you how far you’ve come! ✤ Grounds you! ✤ Learn something new! ✤ Teach someone something new! ✤ Shows respect! ✤ Strengthens community
  • 19. What’s your legacy? ✤ When you write code, think of the next developer! ✤ Document and comment! ✤ Write meaningful commit messages! ✤ Coding standard! ✤ Readability! ✤ Write tests (if you’re into that sort of thing)
  • 20. Insurance Premiums mild WTF Good Better Ultra-über- awesome Comments x x x x Documentation x x x Issue tracking x x Refactor x x Coding standard x x Readability x Tests x Price: < hour few hours a day few days