5 personality traits of programmers


5 personality traits of programmers: patience, courage, passion, creativity and logic.

Patience: Programmers must learn to accept frustration as a means to an end.
Courage: fear stems from a lack of understanding.
Passion is what will keep you up all night until you solve a problem.
Keep feeding your mind and you will surprise yourself with what you are capable of creating.
You just have to use logic to figure it out.


Android – Galgo library for logging

There is nice library for logging what is happening in application. The main advantage of this library, it shows log on screen.


How to use?

First of all, add this library to your app:

repositories {
    maven {
        url "https://jitpack.io"

dependencies {
    // ...
    compile 'com.github.inaka:galgo:v1.0.2'
    // ...

Then you should initiate Galgo in your activity or application class


That’s it now you can use Galgo to show logs.

Galgo.log("Hello World!");

Android – ViewPager empty problem inside nested fragments

When you use ViewPager in Fragment of Navigation Drawer, ViewPager is empty on restarting. How to solve it?

You may have something like this:

FragmentViewPagerAdapter adapter = new FragmentViewPagerAdapter(getActivity().getSupportFragmentManager());

Change that to this:

FragmentViewPagerAdapter adapter = new FragmentViewPagerAdapter(getChildFragmentManager());

That’s it. Now ViewPager is not empty.

Android – UX tips

I am reading this post on User Experience. And I decided to make some notes.

MVP is good for testing.
Retrofit is good for RxJava.
Google: Focus on the user and all else will follow.

Android – Runtime permissions and how Dexter library makes life easy

Yes, Marshmallow is becoming popular. Recently, I have started using Android Studio 2.1 with Android Marshmallow API emulator. As you know in Marshmallow, there is new feature which is called Runtime Permissions. The idea is asking permissions at runtime. User can deny permission so some functionality of your project may have some issues. This is good for user, big problem and a lot of lines of checks. I have read about this hassle for several times at Android Weekly, blogs and other sources. Today I also faced this problem when I tried to open Camera using ACTION_IMAGE_CAPTURE intent. I had error. I started to think about solutions for this problem and by googling I found awesome library called – Dexter. This library can help you avoid nightmare of Instant Permissions.

Here is the simple example:
Continue reading Android – Runtime permissions and how Dexter library makes life easy