Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Jesse Wilson

April 11, 2015
Tweet

More Decks by Jesse Wilson

Other Decks in Programming

Transcript

  1. • 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
  2. • 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. {
 "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
 }
  4. 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
  5. 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. /**
 * 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();
 }
  7. 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
  8. 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'
  9. 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
  10. • Be responsive. • Engage with people. • Say no

    (nicely). • Cut releases. Responsibilities
  11. • Guide the ship. • Programming is fun. • Make

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