How to be productive?

... or how to be lazy?

www.flickr.com
Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.
Robert A. Heinlein

Tip #1 - Write Less Code

But how?

Libraries

How many are available?

More than 75 000 results

40 000 of them in Java

iOS - 27 000 repositories

35 repositories

UI and custom views

Networking

ORM

Testing

Utilites

Dependency Injection

Some code

Reduce amount of code with AndroidAnnotations

View Initialization Without @AA

ListView bookmarkList;
EditText search;
...
bookmarkList = (ListView) findViewById(R.id.bookmarkList);
search = (EditText) findViewById(R.id.search);
Using @AA
@ViewById ListView bookmarkList;
@ViewById EditText search;                        

Some code

Reduce amount of code with AndroidAnnotations

Click Handlers Without @AA

View updateBookmarksButton1 = findViewById(R.id.updateBookmarksButton1);
updateBookmarksButton1.setOnClickListener(new OnClickListener() {
 
      @Override
      public void onClick(View v) {
        updateBookmarksClicked();
      }
});
Using @AA
@Click({R.id.updateBookmarksButton1, R.id.updateBookmarksButton2})
void updateBookmarksClicked() {
    // Do something
} 

Some code

Reduce amount of code with AndroidAnnotations

REST Client Without @AA

// Code is hidden in order not to get scared someone
                        
Using @AA
@Rest("http://www.bookmarks.com")
public interface BookmarkClient {
  
  @Get("/bookmarks/{userId}?search={search}")
  Bookmarks getBookmarks(String search, String userId);
 
} 

Library Agregators

Tip #2 - Look for 3d party tools

You're not alone!

Lucidchart

Quick UI Prototyping

Different Types of Icons

Device Frames

9-Patched Images

Themes / Styles

e.g. app size 2.4Mb => 1.3Mb (45% less)

Next level ACRA

Great integration with IDEs

Supports stacktrace de-obfuscation

Working with color

Tip #3 - Bootstrap your project!

Did you heared about Twitter Bootstrap?

Android Bootstrap

Pross&Cons

Pross

  • Already configured project with a lot of libraries included
  • Integration with Parse.com
  • Generates app with defined package

Cons

  • Not flexible, at all

How many time will it take for you to configurate project with Maven, ActionBarSherlock, AndroidAnnotations, etc?

5 mins !

AndroidKickstartR

Pross&Cons

Pross

  • Very flexible
  • Can generate Maven projects as well as Eclipse
  • A lot of libraries to choose
  • Direct GitHub integration

Cons

  • Gradle is not yet supported
  • Some libraries are outdated

Tip #4 - Automate your builds!

Look for my presentation on Sunday:)

There are several options to choose

But idea is the same

  • Easy controll over project dependencies
  • Easy to work with library projects
  • Flexible build process configuration
  • ... and a lot of other cool featues

Why Gradle is cool?

           
buildscript {
    repositories { mavenCentral() }
    dependencies { classpath 'com.android.tools.build:gradle:0.5.+' }
}

apply plugin: 'android'

android {
    compileSdkVersion 17
    buildToolsVersion: '17.0.0'
}
        

Tip #5 - Use other goodies!

Android Resource Navigator

Chrome Extension

It's better to show, than talk about it...

Open Source Projects

The Most Important Tip

KEEP CALM

AND

HAVE FUN