Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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
• T...
What’s Involved:
• Major in Math/Science
• Take the MCAT
• Go to Medical School
• Take the USMLE Step 1
• Do Rotations
• T...
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 “…:l...
Leak Canary
private BooksAdapter booksAdapter;



@Bind(R.id.recyclerView)

RecyclerView recyclerView;



private static T...
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 recusa...
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"]...
IT GETS
BETTER
@brwngrldev
Test - Schema
@brwngrldev


{

"userId": 1,

"id": 1,

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

"body": "quia et su...
Test - Schema
var postSchema = {

"type" : "object",

"properties" : {

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

"id": { "type" ...
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, "Unab...
Logcat/Pidcat
Log Events
public void trackEvent(String event)
{
analytics.track(event);
if (Fabric.isInitialized())
{
Crashlytics.log(ev...
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.androidd...
Resources
• http://findbugs.sourceforge.net - FindBugs
• https://github.com/square/leakcanary - Leak Canary
• https://www.g...
Resources
• https://github.com/google/android-classyshark - ClassyShark
• https://github.com/google/battery-historian - Ba...
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
First Do No Harm - Droidcon Boston
Upcoming SlideShare
Loading in …5
×

First Do No Harm - Droidcon Boston

4,093 views

Published on

Developing Android applications is a powerful way to connect people with the information they need the most. Apps are for living your life: daily commutes, traveling abroad, handling your money, communicating with family, and much more! This places the responsibility of engineering top-notch software squarely in the laps of us developers. Unlike doctors, we were not required to take an oath or pledge when becoming Android Developers. However, we can still learn much from the principles behind the phrase, “First, do no harm.” In this talk, we will discuss over a dozen tools that are at your disposal as a developer which can enable you to provide high quality applications to your users. Thus allowing you to first, do no harm!

Published in: Technology
  • Be the first to comment

First Do No Harm - Droidcon Boston

  1. 1. 7 to 9 years @brwngrldev
  2. 2. 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
  3. 3. 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
  4. 4. How can I become an Android Developer? @brwngrldev
  5. 5. How can I become a great Android Developer? @brwngrldev
  6. 6. Newsletters
  7. 7. Podcasts
  8. 8. Online Courses • At your own pace • All aspects of development • Different perspectives
  9. 9. Online Courses - Udacity
  10. 10. Online Courses - Caster.IO
  11. 11. “If you associate with eagles, you will learn how to soar…” - Ojo Michael E.
  12. 12. Conferences • Hear from the Experts • Grow your Network • Learn new Techniques
  13. 13. Conferences
  14. 14. Open Source • Countless Examples • Learn by Doing • Design Patterns in Action
  15. 15. Open Source @brwngrldev
  16. 16. Open Source @brwngrldev
  17. 17. Open Source
  18. 18. Study • Newsletters • Podcasts • Online Courses • Conferences • Open Source @brwngrldev
  19. 19. Prevention • Static Code Analysis • Code Reviews • Leak Canary • Automated Testing • API Testing @brwngrldev
  20. 20. Static Code Analysis Lint Checkstyle FindBugs PMD @brwngrldev
  21. 21. Static Code Analysis 0 40 80 120 160 Checkstyle FindBugs PMD Error Prone Lint @brwngrldev
  22. 22. Static Code Analysis - FindBugs
  23. 23. Static Code Analysis - FindBugs
  24. 24. Code Reviews
  25. 25. Code Reviews
  26. 26. Code Reviews
  27. 27. Code Reviews • Catch Issues • Gain Exposure to New Ideas • Promotes Consistent Design • Ensures Maintainability
  28. 28. Code Reviews
  29. 29. Leak Canary debugCompile “…:leakcanary-android:$leak”
 releaseCompile “…:leakcanary-android-no-op:$leak”
 testCompile “…:leakcanary-android-no-op:$leak” @brwngrldev
  30. 30. Leak Canary private BooksAdapter booksAdapter;
 
 @Bind(R.id.recyclerView)
 RecyclerView recyclerView;
 
 private static Toolbar toolbar;
 
 private BooksPresenter booksPresenter; @brwngrldev
  31. 31. Leak Canary @brwngrldev
  32. 32. Architecture
  33. 33. Architecture Foo Foo Bar Baz
  34. 34. MVP + Dagger @brwngrldev
  35. 35. Clean Architecture @brwngrldev
  36. 36. Automated Testing https://martinfowler.com/bliki/TestPyramid.html
  37. 37. @brwngrldev
  38. 38. Continuous Integration @brwngrldev
  39. 39. API Testing
  40. 40. API Testing - Postman
  41. 41. API Testing - Postman 1.Send Requests 2.Receive Response 3.Run Test Scripts
  42. 42. Sending Requests
  43. 43. 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
  44. 44. Test - Status Code tests["Status code is 200"] = responseCode.code === 200; @brwngrldev
  45. 45. Test - Schema var schema = {
 "type": [“array”, “null”]
 }; var jsonData = JSON.parse(responseBody); tests["Valid Schema"] = tv4.validate(jsonData, schema); @brwngrldev
  46. 46. IT GETS BETTER @brwngrldev
  47. 47. Test - Schema @brwngrldev 
 {
 "userId": 1,
 "id": 1,
 "title": "sunt aut facere repellat provident",
 "body": "quia et suscipitnsuscipit recusandae"
 }
  48. 48. Test - Schema var postSchema = {
 "type" : "object",
 "properties" : {
 "userId": { "type" : "integer" },
 "id": { "type" : "integer" },
 "title": { "type" : "string" },
 "body" : { "type" : "string" }
 }
 }; @brwngrldev
  49. 49. API Testing
  50. 50. Set Up Monitors
  51. 51. Prevention • Static Code Analysis • Code Reviews • Leak Canary • Automated Testing • API Testing @brwngrldev
  52. 52. 74 year old stomach pain 34 year old stomach pain @brwngrldev
  53. 53. @brwngrldev
  54. 54. LET’S SHARE @brwngrldev
  55. 55. Code Outside InsideEmulator
  56. 56. CODE @brwngrldev
  57. 57. @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
  58. 58. Logcat/Pidcat
  59. 59. Log Events public void trackEvent(String event) { analytics.track(event); if (Fabric.isInitialized()) { Crashlytics.log(event); } }
  60. 60. Crashlytics
  61. 61. OUTSIDE @brwngrldev
  62. 62. Crashlytics
  63. 63. Crashlytics
  64. 64. Classy Shark
  65. 65. Classy Shark
  66. 66. Battery Historian
  67. 67. Battery Historian
  68. 68. Battery Historian
  69. 69. …Battery Citizen
  70. 70. mitmproxy https://mitmproxy.org/doc/howmitmproxy.html
  71. 71. mitmproxy https://mitmproxy.org/doc/howmitmproxy.html
  72. 72. mitmproxy 
 brew install python3 pip3 install mitmproxy mitmproxy --host @brwngrldev
  73. 73. mitmproxy
  74. 74. mitmproxy
  75. 75. Systrace
  76. 76. Systrace Alerts Pane
  77. 77. Systrace Alert Detail
  78. 78. INSIDE @brwngrldev
  79. 79. Apk Analyzer
  80. 80. Android Profiler
  81. 81. Android Profiler
  82. 82. Android Profiler
  83. 83. Android Profiler http://tools.android.com/tech-docs/android-profiler
  84. 84. EMULATOR @brwngrldev
  85. 85. Android Options: GPU Overdraw blue -> green -> light red -> dark red (1x) (4x or more)
  86. 86. Android Options: GPU Overdraw @brwngrldev
  87. 87. Android Options: Profile GPU Rendering 16 milliseconds @brwngrldev
  88. 88. Android Options: Profile GPU Rendering https://developer.android.com/studio/profile/dev-options-rendering.html
  89. 89. Diagnosis
  90. 90. 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
  91. 91. 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
  92. 92. 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

×