Slide 1

Slide 1 text

an open source advantage @jakewharton @jessewilson

Slide 2

Slide 2 text

Marketing

Slide 3

Slide 3 text

Reputation

Slide 4

Slide 4 text

Documentation

Slide 5

Slide 5 text

Share Code

Slide 6

Slide 6 text

Who do you work with?

Slide 7

Slide 7 text

SOFTWARE DEVELOPER

Slide 8

Slide 8 text

CUSTOMER PRODUCT EDITOR DESIGNER SOFTWARE DEVELOPER

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

So you’re making a blue ribbon Android application Best PROGRAMMER’S RELEASE

Slide 11

Slide 11 text

You’re going to need many libraries.

Slide 12

Slide 12 text

• 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

Slide 13

Slide 13 text

• 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

Slide 14

Slide 14 text

{
 "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
 }

Slide 15

Slide 15 text

Each library has many features.

Slide 16

Slide 16 text

JSON library

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

Each feature requires many lines of code.

Slide 20

Slide 20 text

/**
 * Returns a JsonPath 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();
 }

Slide 21

Slide 21 text

Can’t build it all yourself! * Unless you’re in no hurry to ship.

Slide 22

Slide 22 text

Open source offers many options!

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Simple

Slide 25

Slide 25 text

Right features

Slide 26

Slide 26 text

Correct

Slide 27

Slide 27 text

Engaged

Slide 28

Slide 28 text

read the code

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

} dependencies {

Slide 32

Slide 32 text

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'

Slide 33

Slide 33 text

Put it to work.

Slide 34

Slide 34 text

This is the best time to contribute documentation.

Slide 35

Slide 35 text

Found a bug? Isolate it.

Slide 36

Slide 36 text

Happy? Spread the love.

Slide 37

Slide 37 text

You aren’t paying with money.

Slide 38

Slide 38 text

You aren’t paying with money. Pay with your time.

Slide 39

Slide 39 text

Let’s talk about contributing code…

Slide 40

Slide 40 text

SMALL LIBRARY

Slide 41

Slide 41 text

YOUR NEEDS SMALL LIBRARY

Slide 42

Slide 42 text

JEN’S NEEDS YOUR NEEDS SMALL LIBRARY

Slide 43

Slide 43 text

MARCOS’ NEEDS JEN’S NEEDS YOUR NEEDS SMALL LIBRARY

Slide 44

Slide 44 text

MARCOS’ NEEDS MATT’S NEEDS JEN’S NEEDS YOUR NEEDS SMALL LIBRARY

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

FEATURES YOU DON’T NEED FEATURES YOU NEED

Slide 47

Slide 47 text

INCLUDE Code we all need.

Slide 48

Slide 48 text

INCLUDE Code we all need. EXCLUDE Everything else!

Slide 49

Slide 49 text

I wrote some new features for you!

Slide 50

Slide 50 text

No thanks! I wrote some new features for you!

Slide 51

Slide 51 text

No thanks! BUT THE CODE IS ALREADY WRITTEN!

Slide 52

Slide 52 text

BUT THE CODE IS ALREADY WRITTEN! Ummm…

Slide 53

Slide 53 text

EXTENSIBLE! Good APIs are EXTENSIBLE!

Slide 54

Slide 54 text

OUR API MAKES YOUR CODE SIMPLE!

Slide 55

Slide 55 text

OUR API MAKES YOUR CODE SIMPLE! AMAZE.

Slide 56

Slide 56 text

AMAZE. PLUS WE’LL ADD IT AS A SAMPLE!

Slide 57

Slide 57 text

(Designing extensible APIs is hard.)

Slide 58

Slide 58 text

What to open source?

Slide 59

Slide 59 text

Not another JSON library

Slide 60

Slide 60 text

Not another JSON library * Unless you’re doing something new.

Slide 61

Slide 61 text

Not another JSON library * Unless you’re doing something new.

Slide 62

Slide 62 text

Often it’s code you inherited!

Slide 63

Slide 63 text

Managing a Codebase

Slide 64

Slide 64 text

Managing a Community

Slide 65

Slide 65 text

Be inclusive.

Slide 66

Slide 66 text

Prefer face to face.

Slide 67

Slide 67 text

flic.kr/jeremylevinedesign flic.kr/koreanet

Slide 68

Slide 68 text

• Be responsive. • Engage with people. • Say no (nicely). • Cut releases. Responsibilities

Slide 69

Slide 69 text

• Guide the ship. • Programming is fun. • Make friends! • Reputation.
 (which you can exchange for speaking opportunities at Droidcons) Perks

Slide 70

Slide 70 text

Enjoy Droidcon Montréal @jakewharton @jessewilson