Ask HN: How do you keep sane while developing for Android?

11 points by hn_throwaway321 ↗ HN
There's something wrong with the ecosystem..

1). Android Studio is one of the worst pieces of software I've ever had to code with. The cursor randomly disappears while editing files. When a physical device is connected to the machine, it will sometimes screw up the sound and start playing out of the speakers even though your headphones are connected.

2). Every time you post a question in-regards to the IDE, there's usually a flurry of down-votes. But sometimes there'll be a person who says it's a known bug. Contrast that to questions critiquing xCode on SO, people will be generally happier to help out..

3). You can't organize your XML files in folders. Again, when I asked this on SO, people were arguing that what's the point of having subfolders.. Seriously?

4). It's fragmented as fuck. I feel like each question I ask, I have to always contain 2+ additional files to give context to a very simple problem.

5). It's tough discovering useful 3rd party libraries.. There's no gradle equivalent of cocoadocs.

I actually enjoyed programming with the Spring Framework, but this has just been disappointing all-around..

18 comments

[ 0.27 ms ] story [ 51.3 ms ] thread
I develop for Android using Xamarin/C# with Visual Studio. I don't have any of the IDE related issues you have, but there are a whole host of problems with Xamarin too, so the grass isn't necessarily greener on this side. Plus, Xamarin/C# are fairly pricey, even with the student discount I get.

I will say that the IDE/Environment are first class, however.

> Android Studio is one of the worst pieces of software I've ever had to code with.

Compared to Eclipse?

I am not comparing it to Eclipse.. because when I did Spring development I used vim + sublime.
I sometimes just use subl or emacs as my editor and then use gradle and adb right from the command line.

If you wanted to get fancy, you could even write a little script that lets you rebuild on change.

How's your experience coding in Java on emacs?
Why do people immediately ask this kind of question when one mentions using vim or emacs for Java? I haven't found it to be any different than python or JS.
Because java codebases tend to be larger and programmers relie more on IDE features.
Just use a fuzzy finder a lot and it's pretty easy.
With Emacs and JDE it is nice.

Although Android Studio has been decent enough so I use Emacs less for Android development at the moment.

I developed for mobile platforms for a very short time. WindowsPhone has probably the best, most consistent tools.

Android tools, paradigms and platform-imposed choices are just ridiculous. People who have done this for a long time will be defensive because they got used to that mess.

Tl;Dr : It is 2015 and the only decent mobile platform to code on has basically no users.

Just out of curiosity, can anyone speak to what're the main complaints about developing for iOs, other than the well known byzantine labyrinth of actual app approval for the apple walled garden.
We need a Mac to do it , make it cross platform and we'll have a deal here.
That's a shit deal. It's built on *nix? It's got the guts to share, but not the spirit. So selfish. Bad ecology.
Requires a Mac (not a problem for me, but for some), the UI builder for XCode can be very annoying for non-cookie cutter UIs, and you're on you're own if you don't use that. Also, the app store itself can make it difficult to find your app and your ratings are reset after every update.

The update cycle for iOS can create a kind of hamster wheel of constant "upgrades" that break even year old apps but mainly introduce features that have been as much about Apple's business needs or supporting their aesthetic as making the platform better for devs or (often) users.

The contrast for Android is the tech is often less mature, support is scattered across many different handsets, you can never be sure users have upgraded to a recent version of the OS, and the percentage of users paying for apps is lower.

1). Never experienced anything like this, and I've been on Canary version for the longest time. Also never experienced anything like this from any of my current of former colleagues. Which OS are you using? We're all on OS X.

2). IDE Questions are 99% of the time IntelliJ questions which have been asked a million times. Sometimes, it is a known bug in AS, submit feedback and it gets fixed in the next update usually.

3). Yes you can.

4). That I agree, Android is fragmented, mostly due to OEMs touching the original source in places where it shouldn't be touched. At least since L, the state has been getting better.

5). What? Really? /r/androiddev, AndroidChat.co, Android Arsenal, #android-dev .... there is so many channels to discover news and libraries one easily gets oversaturated.

I actually enjoy AS, probably because I've been using JetBrains IDEs for a while so I'm used to it.

Now, the fragmentation is a real issue. Another thing that gripes me is that if you do this a side-project (as I do) it quickly gets overwhelming due to the amount of changes to the libraries, deprecation, new best-practices, etc., at each new version of the SDK.

You forgot to mention the SDK changing so much with each new API that the published training manual suggests using deprecated or no longer existing classes and methods.

I recently updated some of my old Android code which had been geared toward the early Blackberry-like arrow button navigated Android, not the post-iPhone touchscreen navigated modern Android. That was before even the diverged 2.x phone, 3.x tablet split which was not merged until 4.0.

Yes it can be annoying. I appreciate the improvements they have been making each version though, and kind of expect it to be like this prior to maturity.

1) Never heard of this kind of issue :-/ . Moreover, AS is generally very well received by its user, whatever their previous experience is (Eclipse of course ... but also wp or iOS devs)

2) do you have an example ? Most of the questions I had were easily google-able and the other ones were not down-voted (I guess you are referring to StackOverflow)

3) that would indeed be nice. I work on a very large app (~300k LOC) and have tons of layouts/drawables. Honestly that's not a really big deal since I mostly use search everywhere to go from file to file but I guess it would still be a nice addition. You might want to open a ticket on AS tracker asking for this feature.

4) Meh. Play Services + Support lib. Fragmentation is mostly FUD unless in some specific areas (for exemple camera).

5) hmm. Fair point. I have been working as an Android engineer for some time so I have been following the evolution of the open source community. I don't know how a newbie is supposed to get up to speed in that area. Maybe something like AndroidArsenal ? The quality of the libs on this kind of site is very variable though.