Fear, Uncertainty, and Third-Party Libraries

Fear, Uncertainty, and Third-Party Libraries

Sometimes fear or a bad experience can hold us back from embracing third-party dependancies that would let us focus more on our customers' problems than on the technical challenges we need to solve along the way. It can be fun to re-invent the wheel, we are engineers after all, but do we have the time to spare in this market?

I take a very pragmatic look at the affects of embracing community libraries. There are lots of non-obvious tradeoffs we make when we choose to either embrace or re-invent, and I look at those tradeoffs as they relate to common reasons I hear from people about why they are afraid to embrace third-party libraries.

9b54e5324785eb939bcc8f15c724baf9?s=128

Curtis Herbert

May 14, 2015
Tweet

Transcript

  1. Fear, Uncertainty, and Third-Party Libraries Curtis Herbert @parrots

  2. None
  3. None
  4. None
  5. None
  6. I do have what I think is a healthy dose

    of fear of all 3rd party apps. Heck fear of every extra line of code. That does not mean I would never use a 3rd party library. It just means the benefits as I see them would have to outweigh the fear.
  7. I do have what I think is a healthy dose

    of fear of all 3rd party apps. Heck fear of every extra line of code. That does not mean I would never use a 3rd party library. It just means the benefits as I see them would have to outweigh the fear.
  8. Common Fears

  9. Xenophobia

  10. None
  11. Carthage

  12. Necrophobia

  13. Ex: Masonry UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [superview

    addConstraints:@[ [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeTop multiplier:1.0 constant:padding.top], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeLeft multiplier:1.0 constant:padding.left], [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(superview).with.insets(padding); }]; [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-padding.bottom], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeRight multiplier:1 constant:-padding.right], ]];
  14. None
  15. None
  16. Sophophobia

  17. None
  18. None
  19. None
  20. renderRow(rowData, sectionID, rowID) { return ( <TouchableHighlight underlayColor='#dddddd'> <View> <Text>{rowData.title}</Text>

    </View> </TouchableHighlight> ); } render() { return ( <ListView dataSource={this.state.dataSource} renderRow={this.renderRow.bind(this)}/> ); }
  21. None
  22. Code Metathesiophobia

  23. Opt-in

  24. Pin It # Require zipzap from commit pod 'zipzap', :git

    => 'https://github.com/pixelglow/zipzap.git', :commit => '9c0f5fe3a1' # Require zipzap version 7.0.x pod ‘zipzap', ‘~> 7.0'
  25. Fork It and Fix It

  26. Be Lazy

  27. Bayphobia

  28. None
  29. None
  30. Atychiphobia

  31. Can you do do it yourself? “Of course I can!”

  32. image: http://www.doxdesk.com/updates/2009.html#u20091116-zalgo

  33. None
  34. http://arstechnica.com/security/2015/04/critical-https-bug-may-open-25000-ios-apps-to-eavesdropping-attacks/

  35. None
  36. –Sergeant Schultz “I know nothing.”

  37. Hindsight is 20/20

  38. platform :ios, '8.0' target 'App' do link_with 'App', 'Debug Tools',

    'Tests' pod 'PebbleKit' pod 'zipzap' pod 'CHCSVParser' pod 'KissXML' pod 'Google-Maps-iOS-SDK' pod 'KZPropertyMapper' pod 'AWSiOSSDKv2/S3' pod 'GPSKit' pod 'libextobjc' pod 'OGCoreDataStack' pod 'FastImageCache' pod 'Masonry' pod 'MKUnits' pod 'VTAcknowledgementsViewController' pod 'MMWormhole' pod 'MHWDirectoryWatcher' pod 'Facebook-iOS-SDK' pod 'RBStoryboardLink', '0.1.0' pod 'Fabric' pod 'Fabric/Crashlytics' end target 'Widget' do link_with 'Widget', 'WatchKit Extension' pod 'MMWormhole' end
  39. App + Watch App + Today Extension: 26,508 LOC 76%

    24% Pods: 82,878 LOC
  40. Problems I didn’t have to solve • Zip file reading

    / writing • CSV file reading / writing • XML parsing • Image caching • JSON -> NSObject mapping • Mocking objects for unit testing • Using C(FNotificationCenter)
  41. Issues: 1,057 closed (as of 4/28/2015)

  42. Negativity Bias

  43. Getting started

  44. None
  45. https://cocoapods.org Carthage https://github.com/Carthage/Carthage