An Open Source Advantage (Droidcon MTL 2015)

An Open Source Advantage (Droidcon MTL 2015)

Video: https://www.youtube.com/watch?v=PCxz2LEmuL4

A successful app takes a lot of code. The best developers don’t write all of that code themselves; instead they rely on open source to solve all of the common problems. That way they can direct their energy on application-specific tasks.

In this keynote, we’ll show how to use open source effectively. We’ll start with guidance on evaluating a codebase. Then we’ll show you how to grow your relationship with an open source project, from user to contributor to maintainer.

We’ll talk about forking for good and evil, rejected pull requests, and how open source can lead to your code running on one billion Android devices.

69252b3de5cb7f464c09301d9a6b0401?s=128

Jesse Wilson

April 11, 2015
Tweet

Transcript

  1. 9.
  2. 12.

    • views: lists, sticky headers, layout binding • networking: HTTP

    client, image downloaders, REST adapter • data: JSON, protocol buffers, database access, value objects • monitoring: analytics, automatic & manual bug reporting, logging • development: debug utilities, static analysis • testing: UI, unit testing, mock objects, assertions, JVM testing • structure: dependency injection, async events, navigation
  3. 13.

    • views: lists, sticky headers, layout binding • networking: HTTP

    client, image downloaders, REST adapter • data: JSON, protocol buffers, database access, value objects • monitoring: analytics, automatic & manual bug reporting, logging • development: debug utilities, static analysis • testing: UI, unit testing, mock objects, assertions, JVM testing • structure: dependency injection, async events, navigation
  4. 14.

    {
 "baseUrl": "http://localhost:8080/cash/",
 "headerBackgroundUri": "/static/email/images/exampleBackground.png",
 "headerImageUri": "animatedHeader.gif",
 "theme": {
 "backgroundColor":

    "#ce0606",
 "textColor": "#ff6a5f",
 "buttonColor": "#ec2a2a"
 },
 "headerAlt": "$35",
 "title": "I embedded the background image in the HTML.",
 "button": {
 "label": "Thanks",
 "url": "https://cash.me/"
 },
 "showAboutFooter": false,
 "rightToRefundLink": false
 }
  5. 17.

    JSON library JSON writer JSON reader binding annotations m odel

    objects precision policy lenient policy binding system collections binding POJO bindings date bindings hash collision defence constructor caller code generator exception policy pretty printer benchmarks U TF-8 transcoder type registry naming policy string pool error locator type resolver enum bindings cycle defense
  6. 18.

    JSON library JSON writer JSON reader binding annotations m odel

    objects precision policy lenient policy binding system collections binding POJO bindings date bindings hash collision defence constructor caller code generator exception policy pretty printer benchmarks U TF-8 transcoder type registry naming policy string pool error locator type resolver enum bindings cycle defense
  7. 20.

    /**
 * Returns a <a href="http://goessner.net/articles/JsonPath/">JsonPath</a> to
 * the current

    location in the JSON value.
 */
 public String getPath() {
 StringBuilder result = new StringBuilder().append('$');
 for (int i = 0, size = stackSize; i < size; i++) {
 switch (stack[i]) {
 case JsonScope.EMPTY_ARRAY:
 case JsonScope.NONEMPTY_ARRAY:
 result.append('[').append(pathIndices[i]).append(']');
 break;
 
 case JsonScope.EMPTY_OBJECT:
 case JsonScope.DANGLING_NAME:
 case JsonScope.NONEMPTY_OBJECT:
 result.append('.');
 if (pathNames[i] != null) {
 result.append(pathNames[i]);
 }
 break;
 
 case JsonScope.NONEMPTY_DOCUMENT:
 case JsonScope.EMPTY_DOCUMENT:
 case JsonScope.CLOSED:
 break;
 }
 }
 return result.toString();
 }
  8. 23.

    Guide to Jake & Jesse’s Evaluating Open! Source Projects Picasso,

    Volley,! Glide, & Fresco: Which one should! you avoid? Jason Parser With forward by Lynn E. R. Layout
  9. 24.
  10. 26.
  11. 27.
  12. 29.
  13. 30.
  14. 32.

    You just got thousands of lines of code for free.

    } compile 'com.google.code.gson:gson:2.3.1' dependencies { compile 'com.google.code.gson:gson:2.3.1'
  15. 45.

    M ARCO S’ N EED S M ATT’S N EED

    S JEN ’S N EED S YO U R N EED S BIG LIBRARY
  16. 68.

    • Be responsive. • Engage with people. • Say no

    (nicely). • Cut releases. Responsibilities
  17. 69.

    • Guide the ship. • Programming is fun. • Make

    friends! • Reputation.
 (which you can exchange for speaking opportunities at Droidcons) Perks