Building Android Apps — 30 things that experience made me learn the hard way

There are two kinds of people — those who learn the hard way and those who learn by taking someone’s advice. Here are some of the things I’ve learned along the way that I want to share with you:


  1. seriouscommitment;
  2. don’t draw it!;
  3. really need to;
  4. multidexing can save you;
  5. RxJava is the best alternative to AsyncTasks and so much more;
  6. Retrofit is the best networking library there is;
  7. Retrolambda;
  8. RxJava with Retrofit and Retrolambda for maximum awesomeness!;
  9. don’t use it too much because the codebase would get really messy;
  10. Package by Feature, not layers;
  11. everything off the application thread;
  12. lint your views to help you optimize the layouts and layout hierarchies so you can identify redundant views that could perhaps be removed;
  13. can;
  14. profile reports of your builds to see what is taking the build time;
  15. well known architecture;
  16. Testing takes time but it’s faster and more robust than coding without tests once you’ve got the hang of it;
  17. dependency injection to make your app more modular and therefore easier to test;
  18. fragmented podcast will be great for you;
  19. Never use your personal email for your android market publisher account;
  20. appropriate input types;
  21. analytics to find usage patterns and isolate bugs;
  22. dryrun to test them out faster);
  23. die as quickly as possible;
  24. Account Manager to suggest login usernames and email addresses;
  25. CI (Continuous Integration) to build and distribute your beta and production .apk’s;
  26. CI server, maintaining the server is time consuming because of disk space/security issues/updating the server to protect from SSL attacks, etc. Use circleci, travis or shippable, they’re cheap and it’s one less thing to worry about;
  27. Automate your deployments to the playstore;
  28. proguard for instance);
  29. CI builds are a good example), or even to check if the previous individual module build is up-to-date, can be up to almost 4x greater than to simply load that dependency as a binary .jar/.aar.
  30. thinking about ditching PNGs for SVGs;
  31. Timber.d(message) is a better option);
  32. wifi?);
  33.  battery is low?);
  34. A user interface is like a joke. If you have to explain it, it’s not that good;
  35. Tests are great for performance: Write slow (but correct) implementation then verify optimizations don’t break anything with tests.

cesarmcferreira!

 

form:https://medium.com/@cesarmcferreira/building-android-apps-30-things-that-experience-made-me-learn-the-hard-way-313680430bf9#.iz9oy4ekc

相关文章: