SlideShare una empresa de Scribd logo
1 de 66
Y U NO CRAFTSMAN
Xavi Rigau & Paul Blundell
Who?
@blundell_apps @xrigau
Competition
Tweet something about the talk with the
hashtags
#droidconAE
#YUNOCRAFTSMAN
What is craftsmanship?
craftsmanship
ˈkrɑːf(t)smənʃɪp/
the quality of design and work shown in something
Coder vs Craftsman
“Make a chair”
We’re gonna talk about...
- Improving day to day craftsmanship
- Creating a positive working environment
- The final few steps to awesomeness
- Opinionated bonus material
Improving day to day
craftsmanship
Whiteboard ideation
Brainstorming session
Help non dev team members
Pair programming
Pairing tennis
Driver & Navigator pairing
Mistakes
Driver
Would make
Mistakes
Navigator
Would make
Actual
Mistakes
Best coding practices
Code reviews
Selfies & Gifs
https://github.com/thieman/github-selfies
Caring about the CI
Static analysis reports
CI Game
#rekt
Pull Request Builder
Be “agile”
build features the way that makes sense
YAGNI
Overengineering
You Ain’t Gonna Need It
GSD
Pragmatism
Creating a positive
working environment
Continuous communication
Morning standups
Daily news
Hack & Tells
Dojos
Zero walls office
2 keyboards 2 mice per desk
Standing desks
Remote working
Remote working
CI Alarm
Xbox downtime
Social / Pub!
Hire the best (for you)
The final steps to
awesomeness
That extra 5%
Optimise & leave the main thread alone
Strict Mode
private void initializeStrictMode() {
if (BuildConfig.DEBUG) {
ThreadPolicy threadPolicy = new ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build();
StrictMode.setThreadPolicy(threadPolicy);
VmPolicy vmPolicy = new VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build();
StrictMode.setVmPolicy(vmPolicy);
}
}
GPU Profiling
Show Overdraw
Polish the app
Animate all the things
User features
- Second screen / Chromecast / TV
- Widget
- Wear
- Daydream
- LiveWallpaper
Behind the scenes
- Content provider
- Sync Adapter
- Deep linking / Web search deep linking
- Voice commands
Listen for feedback
Measure the data
Follow the guidelines
What happens
when you don’t follow the guidelines
Opinionated
Bonus
The dark side of AOSP
try {
mWallpaper = getCurrentWallpaperLocked(context);
} catch (OutOfMemoryError e) {
Log.w(TAG, "No memory load current wallpaper", e);
}
try {
BitmapFactory.Options options =new BitmapFactory.Options();
return BitmapFactory.decodeStream(is, null, options);
} catch (OutOfMemoryError e) {
Log.w(TAG, "Can't decode stream", e);
}
https://android.googlesource.com in WallpaperManager.java - line 263
Follow the examples - but not too closely
minSdkVersion 16
For more info:
https://developer.android.com/about/dashboards/index.html
Activity lifecycle callbacks
public interface ActivityLifecycleCallbacks {
void onActivityCreated(Activity activity, Bundle savedInstanceState);
void onActivityStarted(Activity activity);
void onActivityResumed(Activity activity);
void onActivityPaused(Activity activity);
void onActivityStopped(Activity activity);
void onActivityDestroyed(Activity activity);
void onActivitySaveInstanceState(Activity activity, Bundle outState);
}
public class MyActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks { … }
public class MyApplication extends Application {
@Override public void onCreate() {
super.onCreate();
registerActivityLifecycleCallbacks(new MyActivityLifecycleCallbacks());
}
}
Fail Gracefully! Do not crash out there
public class ReportingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
// Do necessary crash handling
crashlytics.reportCrash("user crash captured", ex);
}
}
private void swallowExceptionsInRelease() {
if (!BuildConfig.DEBUG) {
Thread.UncaughtExceptionHandler handler = new ReportingUncaughtExceptionHandler();
Thread.currentThread().setUncaughtExceptionHandler(handler);
}
}
Not recommended to use on your main thread
newInstance all the things!
public class WidgetImageLoader {
private final Retriever memoryRetriever;
private final Retriever fileRetriever;
public static WidgetImageLoader newInstance(Context context) {
Retriever memoryRetriever = MemoryRetriever.getInstance();
Retriever fileRetriever = FileRetriever.newInstance(context);
return new WidgetImageLoader(memoryRetriever, fileRetriever);
}
WidgetImageLoader(Retriever memoryRetriever, Retriever fileRetriever) {
this.memoryRetriever = memoryRetriever;
this.fileRetriever = fileRetriever;
}
}
Robolectric is dead Long live the
JVM
In summary
Questions?
‫األسئلة‬‫؟‬
#droidconAE
#YUNOCRAFTSMAN
@blundell_apps
Competition Winner
We are hiring
Liverpool, London, Barcelona, Berlin & New York
info@novoda.com
References & Attributions
novoda.com
karenknowsbest.com
experttek.co.uk
memegenerator
giphy.com
cloudfront.net
wandisco.com
electronicproducts.com
alistair.cockburn.us
deadzebra.com
dribble.com Jovie Brett
smosh.com
Dilbert
developer.android.com
gradle.org
failauthority.com
hilariousgifs.com
spin.atomicobject.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (10)

Need For Speed
Need For SpeedNeed For Speed
Need For Speed
 
Need for Speed - Comparison of Current Web Technologies
Need for Speed - Comparison of Current Web TechnologiesNeed for Speed - Comparison of Current Web Technologies
Need for Speed - Comparison of Current Web Technologies
 
Need for speed
Need for speedNeed for speed
Need for speed
 
[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGL[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGL
 
Building and Scaling a Test Driven Culture
Building and Scaling a Test Driven CultureBuilding and Scaling a Test Driven Culture
Building and Scaling a Test Driven Culture
 
Designing Interactive Web Based AR Experiences
Designing Interactive Web Based AR ExperiencesDesigning Interactive Web Based AR Experiences
Designing Interactive Web Based AR Experiences
 
Machine Learning Bookcamp
Machine Learning BookcampMachine Learning Bookcamp
Machine Learning Bookcamp
 
DESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohDESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio Andoh
 
Desktop, Web e Mobile
Desktop, Web e MobileDesktop, Web e Mobile
Desktop, Web e Mobile
 
Track layout designer on an html5 canvas
Track layout designer on an html5 canvasTrack layout designer on an html5 canvas
Track layout designer on an html5 canvas
 

Destacado

Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
widhiyani
 
Panduan microsoft word_20071
Panduan microsoft word_20071Panduan microsoft word_20071
Panduan microsoft word_20071
Amri Abdillah
 
Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
widhiyani
 
Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
widhiyani
 
Roditelskoe sobranie 11klassy
Roditelskoe sobranie 11klassyRoditelskoe sobranie 11klassy
Roditelskoe sobranie 11klassy
lili4ka54
 
школа – дом, в котором наше детство
школа – дом, в котором наше детствошкола – дом, в котором наше детство
школа – дом, в котором наше детство
lili4ka54
 
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
Divya Kansha
 

Destacado (20)

Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
 
Panduan microsoft word_20071
Panduan microsoft word_20071Panduan microsoft word_20071
Panduan microsoft word_20071
 
Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
 
Kesetimbangan kimia
Kesetimbangan kimiaKesetimbangan kimia
Kesetimbangan kimia
 
Judge my gym - GymBabes Walkthrough
Judge my gym - GymBabes WalkthroughJudge my gym - GymBabes Walkthrough
Judge my gym - GymBabes Walkthrough
 
Rumus kima & persamaan kimia
Rumus kima & persamaan kimiaRumus kima & persamaan kimia
Rumus kima & persamaan kimia
 
Entrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspectiveEntrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspective
 
Phoenix presentation
Phoenix presentationPhoenix presentation
Phoenix presentation
 
Open house2
Open house2Open house2
Open house2
 
Justice ,justice shall you pursue
Justice ,justice shall you pursueJustice ,justice shall you pursue
Justice ,justice shall you pursue
 
Roditelskoe sobranie 11klassy
Roditelskoe sobranie 11klassyRoditelskoe sobranie 11klassy
Roditelskoe sobranie 11klassy
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
 
школа – дом, в котором наше детство
школа – дом, в котором наше детствошкола – дом, в котором наше детство
школа – дом, в котором наше детство
 
สอบปฏิบัติ
สอบปฏิบัติสอบปฏิบัติ
สอบปฏิบัติ
 
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
Fundamentals of relationship marketing a relationship-perspective_chapter1 se...
 
A paixão de nosso senhor jesus cristo v. ii
A paixão de nosso senhor jesus cristo v. ii   A paixão de nosso senhor jesus cristo v. ii
A paixão de nosso senhor jesus cristo v. ii
 
Oh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to MutationOh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to Mutation
 
Open Closed Principle kata
Open Closed Principle kataOpen Closed Principle kata
Open Closed Principle kata
 
An easy way to automate complex UI
An easy way to automate complex UIAn easy way to automate complex UI
An easy way to automate complex UI
 
Frases de são Pio de Pietrelcina
Frases de são Pio de PietrelcinaFrases de são Pio de Pietrelcina
Frases de são Pio de Pietrelcina
 

Similar a Y U NO CRAFTSMAN

Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2
gueste8cc560
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
Simon Willison
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
arunvr
 
Progressive web and the problem of JavaScript
Progressive web and the problem of JavaScriptProgressive web and the problem of JavaScript
Progressive web and the problem of JavaScript
Christian Heilmann
 

Similar a Y U NO CRAFTSMAN (20)

Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017
 
Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatterns
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack Encore
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with Sonarqube
 
Progressive web and the problem of JavaScript
Progressive web and the problem of JavaScriptProgressive web and the problem of JavaScript
Progressive web and the problem of JavaScript
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
GWT Extreme!
GWT Extreme!GWT Extreme!
GWT Extreme!
 
Back To The Future
Back To The FutureBack To The Future
Back To The Future
 
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
 
Art & music vs Google App Engine
Art & music vs Google App EngineArt & music vs Google App Engine
Art & music vs Google App Engine
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter Hilton
 
JavaScript isn't evil.
JavaScript isn't evil.JavaScript isn't evil.
JavaScript isn't evil.
 

Más de Paul Blundell

Más de Paul Blundell (12)

In 10 mins a software crafting journey
In 10 mins a software crafting journeyIn 10 mins a software crafting journey
In 10 mins a software crafting journey
 
The Novoda Craft University
The Novoda Craft UniversityThe Novoda Craft University
The Novoda Craft University
 
Android Things - Solid Foundations
Android Things - Solid FoundationsAndroid Things - Solid Foundations
Android Things - Solid Foundations
 
Http Caching for the Android Aficionado
Http Caching for the Android AficionadoHttp Caching for the Android Aficionado
Http Caching for the Android Aficionado
 
My perspective on MVP and architecture discussions
My perspective on MVP and architecture discussionsMy perspective on MVP and architecture discussions
My perspective on MVP and architecture discussions
 
Java Patterns - Strategy
Java Patterns - StrategyJava Patterns - Strategy
Java Patterns - Strategy
 
Google I/O 2015 Android & Tech Announcements
Google I/O 2015 Android & Tech AnnouncementsGoogle I/O 2015 Android & Tech Announcements
Google I/O 2015 Android & Tech Announcements
 
Android Jam - Services & Notifications - Udacity Lesson 6
Android Jam - Services & Notifications - Udacity Lesson 6 Android Jam - Services & Notifications - Udacity Lesson 6
Android Jam - Services & Notifications - Udacity Lesson 6
 
Android Jam - Loaders - Udacity Lesson 4c
Android Jam - Loaders - Udacity Lesson 4cAndroid Jam - Loaders - Udacity Lesson 4c
Android Jam - Loaders - Udacity Lesson 4c
 
Android Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4bAndroid Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4b
 
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4aAndroid Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
 
Jenkins project based authorization
Jenkins   project based authorizationJenkins   project based authorization
Jenkins project based authorization
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Y U NO CRAFTSMAN

Notas del editor

  1. Releasing a great app is more than having a unique idea. It takes teamwork, collaboration and the will to be the best. At Novoda we make awesomeness happen. This talk is about our process from coding dojos to group design and iterative sprint planning with our customers. We'll describe some of our best practices as well as some of the components that can make a good app great. This includes: - Day-to-day processes: pairing tennis, gif code reviews and toggling hidden features. - Work Environment: hack & tells, continuous communication & kicking ass at Tekken. - Releasing the app: polishing & quantifying can get you top of the class and not listening to Google can get you expelled. Finishing with some bonus Android coding tips and tricks and crazy AOSP anti-patterns.
  2. hi we are we work for recently did we are here to talk about craftsmanship so serious we put it on our business cards
  3. craftsmanship is about taking pride in your work proud of the quality of what you do individual quality & as a company
  4. requirement to make a chair coder, makes chair and it works! but it’s wobbly and unstable craftsman, designs the chair, takes time and pride in his creation
  5. craftmanship benefits our customers because... Give you a taster of a lot of things, then go google
  6. problem: unknowns around creating a new application nobody knows what to do, do you just jump in and start coding? Where does this lead when you start writing code, learn something new from the boss and you have to start again you have written the same feature as someone else / duplication
  7. - Great for explaining complicated concepts - Somewhere to focus a discussion - Good to refer back to at a later date (take pics)
  8. - Getting everyone into a room to discuss & understand the big picture - sparking inspiration - solving problems when they arise, discussing architectural issues
  9. - Your team is everyone in the company not just other developers - Great insight into design from the other side - Help them help you, resources naming, explaining DPI
  10. - Two heads are always better than one - Another pair of eyes gives you another perspective - Catch bugs earlier
  11. - Tennis can be a TDD style pairing, one person writes a test the other resolves the test - Document and confirm the code as you work
  12. - Catch mistakes earlier - Communication can also spark solutions from elsewhere in the office
  13. - Have coding practices in your company - Respect and look after the code you write - helps people feel a part of something - avoid spaghetti with meatballs
  14. CODE REVIEWS should be an essential thing in your day to day craftsmanship - Give more visibility to all team members of what’s being made in the project - Another barrier to bugs appearing in your code - Once merged, it becomes everyone’s code GITHUB - GitHub GUI for reviews - Whole team visibility - Lack of formal process
  15. - Code reviews can get repetitive! - Creates engagement and conversation
  16. - Whole office visibility - Gives everyone a sense of responsibility - stops "well it works on my machine" [Assume people know what a CI is]
  17. - Another way to engage with the code AFTER writing it - Automatic code review - Hardening of the code against potential bugs - Sonar gives you more detailed info & history of the results - You’ll have to spend some time in the beginning to set it up & get the right ruleset
  18. Other ways of improving craftsmanship includes things like CIgame - Encourages ppl adding tests + fixing issues from static analysis - Promotes discussion - Fun! ( Newsletter )
  19. Work in a structured agile way or otherwise you’ll end up making this MONSTER - If you don’t have stories / aims your app will look like this and you’ll never ship it - Using a story tracking system - Implement and iterate - The master branch must always be stable
  20. to help improve our day 2 day craftsmanship we .. we believe in the YAGNI acronym - You ain't gonna need it! Talk about pictures on the slide (thing around her face - so complicated / napkin/tissue GSD and it woks) - Gold plating - Seriously you ain't gonna need it!
  21. - Pragmatism is a form of YAGNI - Its about ignoring hypothetical situations - Do whatever fixes your problem, don’t think of building libraries too early! - This is what I have - this is my answer (broken cable + cellotape = fixed cable) - can talk about why microsoft didn’t call it windows 9 (pragmatic solution to avoid the if(version.startsWith(“windows 9”)) ) Image: http://drwsxce6xtjnu.cloudfront.net/photos/image1s/4157/large/HRDCdBjgQficgd24ID4q
  22. State problem: Ever been working somewhere and you feel like you can’t speak because of the eery silence or the walls are grey, the floor is grey, it feels dull & uninspiring you do the same thing everyday clock in clock out management come in, things seem to happen and you are the last to know
  23. - Everything we do at Novoda promotes transparency - Gives a sense of involvement and really empowers people - Follows on from standups, news, pairing, reviews
  24. - Talking is great - Everyone feels involved and contributing - Standup! 10-15 minutes max
  25. - Company involvement - Industry learning
  26. - Creates a great environment for learning - Pushes people to learn outside of their normal subjects
  27. - Same as H&T's but hands on - Promotes micro skills - Can alleviate office discussions (example how often to commit)
  28. - Allowing communication - Allows cross skill learning - Fast feedback
  29. - Big desks allow people to move easier with their laptop - Encourages pairing, Never have a reason not to pair - Always approachable
  30. - Because you can - Promotes mobility - Closer to the xbox lol - Healthy! - Ikea furniture hacking
  31. - We encourage remote working - I work in Liverpool, Xavi in Barcelona, we have London, Berlin, NY - Sometimes communication is hard http://www.wandisco.com/images/blog/hermit.gif
  32. - WE found the internet - Instant chat, webcams, calendar events, synchronised workspaces - Screenhero is like you’re next to each other
  33. FLASHES - Having responsibility of the CI means you need feedback - Remote workers can ping it for webcam chat
  34. - Sometimes Step away from the code! - the best inspiration for a problem is not thinking about the problem
  35. You spend 8h/day with workmates - have fun! - Organising post release/postwork events - Talking to colleagues informally about a problem outside of the work environment - Having a close nit workspace makes work so much more fun - Inspirational ideas
  36. one of the best ways to Improve your working environment is hiring best ppl for YOU - Take your time hiring, don't base it on skill set alone, - if you wouldn’t pair & have a beer with the candidate, don’t hire! - Trust your current employees to be involved
  37. You’ve got your app DONE you’ve implemented all your features Ship it right? Not quite You need to solidify and harden what you have You need to enchant, wow and amaze your users
  38. - The final 5% that takes 95% of the time - You DO want to be featured - You DO NOT want your app to crash or be laggy on a random device - It DOES make all the difference
  39. The first rule To achieve awesomeness is Don’t do anything in the main thread - Developer guidelines - Get off the main thread! - Developer options
  40. Strict mode is a tool to help you GTFO the main thread - Great for spotting long running operations on main thread - potential memory leaks - mention NoTils strict mode helper
  41. - Sometimes you might be doing everything on background threads but the app still feels laggy - Developer options → Onscreen GPU profiling - amount of time it takes to draw each frame of the UI - the green bar 16ms threshold = janky - Tip: Use Hardware layers when a view’s contents don’t get modified often - Avoid invalidating if unnecessary
  42. Laggy can also come because your app has overdraw - Developer options → Show Overdraw areas - performance optimisations that will make the app buttery smooth - Some quick wins by removing duplicated View backgrounds - windowBackground ftw! First thing the user sees, can use xml drawables
  43. - Make sure there is time to polish - Set aside a week or two with no new features - Android docs help you a lot
  44. - Enchant your users - Especially now we are moving to material design
  45. Widget - Entry point for your app right on the homescreen / lockscreen - Increase engagement Wear - Think what your app can 'notify' users about - Want to be featured? Daydream - Another engagement point for your app - Quick win after using content providers Live wallpaper - Promotes discussion of your app with other potential users Second screen / chromecast - Want to be featured? - Libraries for quick win
  46. Content Provider - Empower you to easily use other Android features - Abstract away the database - Link SQLiteProvider Sync Adapter - Increase your apps perceived freshness - Keep your app out of the high power consumption list Deep linking - deeplinking / deepsearch for google search Image: http://cdn1.smosh.com/sites/default/files/legacy.images/smosh-pit/072011/working_out_like_a_boss.gif
  47. - Make those changes & ship it often - Play store ratings / reply to comments - beta communities
  48. - Analytics are your friend - A Bn testing is so powerful
  49. - Guidelines of design - Guidelines of app listing - Guidelines of user experience
  50. - Design - you won't get featured - App listing - your app will be disabled / removed - UX - your app will suck
  51. In a company of multiple developers, there needs to be some common code and some common knowledge to stop the wheel being invented over an over Here are some of the things we think (the more opinionated side)
  52. - Even though Google advocates the best, AOSP is not - Crazy try catches, random thread spawning, flags and 1000 line methods
  53. - Android examples are great for understanding the API useage - Android examples are shocking for architecting an app - Ever tried to use two examples together?
  54. - Common sense now, stop dragging those dead bodies along with you MinSdk 16 means you’re targetting about 87% of the Android ecosystem
  55. - Now you have mid sdk 16 forget the Activity lifecycle! - Great for releasing resources and public facing libraries
  56. Another pro tip is try to fail gracefully is use Uncaught Exception Handler (java API) - Did you know you can stop your app crashing - Fail gracefully Use it in the threads spawned for extra work
  57. - Dependency injection is great - Dependency injection frameworks are overkill - If you do want to use them, understand what they are doing first by doing it avoid object creation chaining all over your code (it’s in one place instead) + testability
  58. We hope thats given you some insight into craftsmanship Maybe these chairs make a bit more sense to you now We covered a lot of topics, so catch us afterwards if you want to discuss anything in more depth
  59. Thanks for listening
  60. al-as-ila
  61. http://goo.gl/UWaWso