SlideShare a Scribd company logo
1 of 110
Download to read offline
7 to 9 years
@brwngrldev
What’s Involved:
• Major in Math/Science
• Take the MCAT
• Go to Medical School
• Take the USMLE Step 1
• Do Rotations
• Take the USMLE Step 2
@brwngrldev
What’s Involved:
• Major in Math/Science
• Take the MCAT
• Go to Medical School
• Take the USMLE Step 1
• Do Rotations
• Take the USMLE Step 2
• Complete Internship
• Do Residency
• Take the USMLE Step 3
• Take the Board Exams
• Do a Fellowship
@brwngrldev
How can I become
an Android
Developer?
@brwngrldev
How can I become a
great Android
Developer?
@brwngrldev
Newsletters
Podcasts
Online Courses
• At your own pace
• All aspects of development
• Different perspectives
Online Courses - Udacity
Online Courses - Caster.IO
“If you associate
with eagles, you will
learn how to soar…”
- Ojo Michael E.
Conferences
• Hear from the Experts
• Grow your Network
• Learn new Techniques
Conferences
Open Source
• Countless Examples
• Learn by Doing
• Design Patterns in Action
Open Source
@brwngrldev
Open Source
@brwngrldev
Open Source
Study
• Newsletters
• Podcasts
• Online Courses
• Conferences
• Open Source
@brwngrldev
Prevention
• Static Code Analysis
• Code Reviews
• Leak Canary
• Automated Testing
• API Testing
@brwngrldev
Static Code Analysis
Lint
Checkstyle
FindBugs
PMD
@brwngrldev
Static Code Analysis
0
40
80
120
160
Checkstyle FindBugs PMD Error Prone Lint
@brwngrldev
Static Code Analysis - FindBugs
Static Code Analysis - FindBugs
Code Reviews
Code Reviews
Code Reviews
Code Reviews
• Catch Issues
• Gain Exposure to New Ideas
• Promotes Consistent Design
• Ensures Maintainability
Code Reviews
Leak Canary
debugCompile “…:leakcanary-android:$leak”

releaseCompile “…:leakcanary-android-no-op:$leak”

testCompile “…:leakcanary-android-no-op:$leak”
@brwngrldev
Leak Canary
private BooksAdapter booksAdapter;



@Bind(R.id.recyclerView)

RecyclerView recyclerView;



private static Toolbar toolbar;



private BooksPresenter booksPresenter;
@brwngrldev
Leak Canary
@brwngrldev
Architecture
Architecture
Foo Foo Bar
Baz
MVP + Dagger
@brwngrldev
Clean Architecture
@brwngrldev
Automated Testing
https://martinfowler.com/bliki/TestPyramid.html
@brwngrldev
Continuous Integration
@brwngrldev
API Testing
API Testing - Postman
API Testing - Postman
1.Send Requests
2.Receive Response
3.Run Test Scripts
Sending Requests
API Response
[

{

"userId": 1,

"id": 1,

"title": "sunt aut facere repellat",

"body": "quia et suscipitnsuscipit recusandae"

},

{

"userId": 1,

"id": 2,

"title": "qui est esse",

"body": "est rerum tempore vitaensequi sint"

}

] https://jsonplaceholder.typicode.com
Test - Status Code
tests["Status code is 200"] =
responseCode.code === 200;
@brwngrldev
Test - Schema
var schema = {

"type": [“array”, “null”]

};
var jsonData = JSON.parse(responseBody);
tests["Valid Schema"] =
tv4.validate(jsonData, schema);
@brwngrldev
IT GETS
BETTER
@brwngrldev
Test - Schema
@brwngrldev


{

"userId": 1,

"id": 1,

"title": "sunt aut facere repellat provident",

"body": "quia et suscipitnsuscipit recusandae"

}
Test - Schema
var postSchema = {

"type" : "object",

"properties" : {

"userId": { "type" : "integer" },

"id": { "type" : "integer" },

"title": { "type" : "string" },

"body" : { "type" : "string" }

}

};
@brwngrldev
API Testing
Set Up Monitors
Prevention
• Static Code Analysis
• Code Reviews
• Leak Canary
• Automated Testing
• API Testing
@brwngrldev
74 year old
stomach pain
34 year old
stomach pain
@brwngrldev
@brwngrldev
LET’S
SHARE
@brwngrldev
Code Outside
InsideEmulator
CODE
@brwngrldev
@Override
public void onFailure(Call<Book> call, Throwable t)
{
bus.post(new BookLoadingErrorEvent(id));
Timber.e(t, "Unable to load the book data from API.");
}
Write Logs
Logcat/Pidcat
Log Events
public void trackEvent(String event)
{
analytics.track(event);
if (Fabric.isInitialized())
{
Crashlytics.log(event);
}
}
Crashlytics
OUTSIDE
@brwngrldev
Crashlytics
Crashlytics
Classy Shark
Classy Shark
Battery Historian
Battery Historian
Battery Historian
…Battery Citizen
mitmproxy
https://mitmproxy.org/doc/howmitmproxy.html
mitmproxy
https://mitmproxy.org/doc/howmitmproxy.html
mitmproxy


brew install python3
pip3 install mitmproxy
mitmproxy --host
@brwngrldev
mitmproxy
mitmproxy
Systrace
Systrace
Alerts Pane
Systrace
Alert Detail
INSIDE
@brwngrldev
Apk Analyzer
Android Profiler
Android Profiler
Android Profiler
Android Profiler
http://tools.android.com/tech-docs/android-profiler
EMULATOR
@brwngrldev
Android Options:
GPU Overdraw
blue -> green -> light red -> dark red
(1x) (4x or more)
Android Options:
GPU Overdraw
@brwngrldev
Android Options:
Profile GPU Rendering
16 milliseconds
@brwngrldev
Android Options:
Profile GPU Rendering
https://developer.android.com/studio/profile/dev-options-rendering.html
Diagnosis
Resources
• http://www.kotlinweekly.net - Kotlin Weekly
• http://androidweekly.net - Android Weekly
• https://www.androiddevdigest.com - Android Dev Digest
• http://www.adavis.info/2015/07/android-devs-listen-up.html - Podcasts
• https://www.udacity.com - Udacity
• https://caster.io - Caster.IO
• http://androidstudygroup.github.io/conferences - Android Conferences
Resources
• http://findbugs.sourceforge.net - FindBugs
• https://github.com/square/leakcanary - Leak Canary
• https://www.getpostman.com - Postman
• https://github.com/JakeWharton/timber - Timber
• https://github.com/JakeWharton/pidcat - Pidcat
• https://fabric.io/kits/android/crashlytics - Crashlytics
• https://www.lynda.com/trial/AnnyceDavis - Lynda.com
Resources
• https://github.com/google/android-classyshark - ClassyShark
• https://github.com/google/battery-historian - Battery Historian
• http://docs.mitmproxy.org/en/latest/mitmproxy.html -mitmproxy
• https://developer.android.com/studio/profile/systrace.html - Systrace
• https://developer.android.com/studio/build/apk-analyzer.html - APK Analyzer
• http://www.adavis.info/2015/03/android-overdraw-what-is-it-and-why.html - Overdraw
• https://developer.android.com/studio/profile/dev-options-rendering.html - GPU Rendering

More Related Content

Similar to First Do No Harm - Droidcon Boston

Building Single-Page Web Appplications in dart - Devoxx France 2013
Building Single-Page Web Appplications in dart - Devoxx France 2013Building Single-Page Web Appplications in dart - Devoxx France 2013
Building Single-Page Web Appplications in dart - Devoxx France 2013
yohanbeschi
 
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
Christopher Adams
 
SOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principlesSOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principles
Sergey Karpushin
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQuery
Jamshid Hashimi
 

Similar to First Do No Harm - Droidcon Boston (20)

TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)
 
Building Single-Page Web Appplications in dart - Devoxx France 2013
Building Single-Page Web Appplications in dart - Devoxx France 2013Building Single-Page Web Appplications in dart - Devoxx France 2013
Building Single-Page Web Appplications in dart - Devoxx France 2013
 
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
A Related Matter: Optimizing your webapp by using django-debug-toolbar, selec...
 
How to not blow up spaceships
How to not blow up spaceshipsHow to not blow up spaceships
How to not blow up spaceships
 
Dov'è il tasto ok?
Dov'è il tasto ok?Dov'è il tasto ok?
Dov'è il tasto ok?
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealed
 
JSLT: JSON querying and transformation
JSLT: JSON querying and transformationJSLT: JSON querying and transformation
JSLT: JSON querying and transformation
 
Lecture-1.pdf
Lecture-1.pdfLecture-1.pdf
Lecture-1.pdf
 
Java script
Java scriptJava script
Java script
 
SOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principlesSOLID, DRY, SLAP design principles
SOLID, DRY, SLAP design principles
 
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your ...
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your ...How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your ...
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your ...
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQuery
 
Supporting Ontology-Based Standardization of Biomedical Metadata in the CEDAR...
Supporting Ontology-Based Standardization of Biomedical Metadata in the CEDAR...Supporting Ontology-Based Standardization of Biomedical Metadata in the CEDAR...
Supporting Ontology-Based Standardization of Biomedical Metadata in the CEDAR...
 
ICBO2017 - Supporting Ontology-Based Standardization of Biomedical Metadata i...
ICBO2017 - Supporting Ontology-Based Standardization of Biomedical Metadata i...ICBO2017 - Supporting Ontology-Based Standardization of Biomedical Metadata i...
ICBO2017 - Supporting Ontology-Based Standardization of Biomedical Metadata i...
 
Developer Tests - Things to Know
Developer Tests - Things to KnowDeveloper Tests - Things to Know
Developer Tests - Things to Know
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
 
A SOLID Design in InterSystems ObjectScript
A SOLID Design in InterSystems ObjectScriptA SOLID Design in InterSystems ObjectScript
A SOLID Design in InterSystems ObjectScript
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5u
 
LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON Schema
 
Why Our Code Smells
Why Our Code SmellsWhy Our Code Smells
Why Our Code Smells
 

More from Annyce Davis

More from Annyce Davis (15)

Getting a Grip on GraphQL
Getting a Grip on GraphQLGetting a Grip on GraphQL
Getting a Grip on GraphQL
 
No internet? No Problem!
No internet? No Problem!No internet? No Problem!
No internet? No Problem!
 
Creating Gradle Plugins - Oredev
Creating Gradle Plugins - OredevCreating Gradle Plugins - Oredev
Creating Gradle Plugins - Oredev
 
Develop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConfDevelop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConf
 
Creating Gradle Plugins - GR8Conf US
Creating Gradle Plugins - GR8Conf USCreating Gradle Plugins - GR8Conf US
Creating Gradle Plugins - GR8Conf US
 
From Grails to Android: A Simple Journey
From Grails to Android: A Simple JourneyFrom Grails to Android: A Simple Journey
From Grails to Android: A Simple Journey
 
Google I/O 2016 Recap
Google I/O 2016 RecapGoogle I/O 2016 Recap
Google I/O 2016 Recap
 
Say It With Video
Say It With VideoSay It With Video
Say It With Video
 
Screen Robots: UI Tests in Espresso
Screen Robots: UI Tests in EspressoScreen Robots: UI Tests in Espresso
Screen Robots: UI Tests in Espresso
 
Creating Gradle Plugins
Creating Gradle PluginsCreating Gradle Plugins
Creating Gradle Plugins
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
 
Develop Maintainable Apps
Develop Maintainable AppsDevelop Maintainable Apps
Develop Maintainable Apps
 
Android Testing, Why So Hard?!
Android Testing, Why So Hard?!Android Testing, Why So Hard?!
Android Testing, Why So Hard?!
 
Measuring Audience Engagement through Analytics
Measuring Audience Engagement through AnalyticsMeasuring Audience Engagement through Analytics
Measuring Audience Engagement through Analytics
 
DC Media Innovations Kick-Off Meetup
DC Media Innovations Kick-Off MeetupDC Media Innovations Kick-Off Meetup
DC Media Innovations Kick-Off Meetup
 

Recently uploaded

Recently uploaded (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

First Do No Harm - Droidcon Boston