100 likes | 237 Views
Pete Houston (aka. ‘xjaphx’) http://xjaphx.wordpress.com/. Android Common Mistakes. Meaningless Coding!. Maintenance, Improvement, Patch, Optimization, Errors, Bugs , …. oh I’m totally FUCKED UP!. Coders tend to make many meaningless stuffs in programming nowadays
E N D
Pete Houston (aka. ‘xjaphx’) http://xjaphx.wordpress.com/ Android Common Mistakes
Meaningless Coding! Maintenance, Improvement, Patch, Optimization, Errors, Bugs, …. oh I’m totally FUCKED UP! • Coders tend to make many meaningless stuffs in programming nowadays • Name for variables, methods, classes…. doesn’t give any idea to others. • Trash line of codes, like drafting/prototyping some lines but forget to remove and still use them for production. • A awesome “Copy-Cat”, just look around Google, pick up some implementable source, and use it for production. • No comments.
No Error-Handling Policy • It’s very common. • So what if something goes wrong in your application? • What will you do to find the root cause? • What can they usually be? • No “try-catch-finally” to catch Exception. • Never check for “NULL” objects. • No operational / functional logging.
“Android API Hell” Frankly, less programmers think about “Version Compatibility”. Android API Level X is NOT THE SAME as Android API Level Y • What are they usually be? • Packages / Classes / Methods / Fields / Contants REMOVED. • Packages / Classes / Methods / Fields / Contants CHANGED. • Framework resources REMOVED / CHANGED. • Deprecation, still being able to use but not suggested due to some reasons, like: unstable, security, unexpected error-traps,…
One Device? Boss: You need to write an application for me, and here you are, test it on this device. Programmer: Alright, sir! And he just writes application for the given device only!!! If you want to survive in Mobile Application Market, make your app’s customization (UI, screen size, fonts, functionality…) to be able to distributed in many devices as possible. “More devices running your App – More $ you get”
Lack User-Experience Programmers are likely to make application hard to use for users. They are not users, and they can’t identify what is wrong with final production. They think it’s better to use this way, while commerce says NOT. > Always to have a user-experience analysis to conduct the best UI for user interactions.
Battery Sucking Have you ever thought of your application likely killing device battery? Think of it, battery is one of the most important thing that makes mobile device useful. And if your application consumes battery like damned free, you’re done; nobody will ever use your application, you’d likely to achieve very nice reputation.
Bad Memory Management In mobile device, memory is limited to each and every application. Most Android coders think: “Java Garbage Collector will handle it!”. That’s so wrong!!! Ever heard of OOM (abbr. of “Out-Of-Memory”)? If not, Google it to learn about Android memory management before your application goes wrong.
Final Words Learn from Experiences, Learn to Improve, Learn for Successes! Hope you make successful Android applications! Thank you and cheers, Pete Houston