Hacker News new | ask | show | jobs
by hehheh 3360 days ago
Whoa sorry about my super late reply here.

The APIs are not great. Some of it is down to poor naming, for example:

The callback you'd use on a CheckBox is called `OnCheckedChangeListener.onCheckedChanged(view, boolean)` (or something) but it is called whether or not the check state actually changed (e.g. if you call `setChecked(true)` and it's already checked you'll get the callback anyway). This is an issue that plagues the APIs in other places like `OnLayoutChangeListener` and `TextWatcher.OnTextChanged`

The fragment lifecycle is incredibly complex to the point that many people advocate against using it -- I'm one of them. It's like someone decided to try to solve every problem ever without asking the real users (devs) what they thought was wrong.

But the worst thing about it, bar none, is just how long it takes to build and run an app. We're talking 1.5-2 minutes. Everyone has their pet idea for reducing the build/test cycle but they provide marginal benefits at best and don't offer up concrete examples with concrete data (e.g. "I am running this gradle command for this github project on this computer and am measuring it this way, and here are my results"). I've spent weeks of time, scattered over the years, trying to figure out a way to reduce this to something more reasonable like 5 seconds, but to no avail.

My best guess is that other people are working on tiny toy apps or are just building the default project and then proclaiming that I must be mistaken, I must be doing something wrong for my build (of a reasonable sized app) to be as slow as it is.