News for hackers. Stuff that matters.
Re:Go support for Android by zak_mc_kracken on Saturday June 21, 2014 @12:00AM (#7924134)
If you're writing C#, it's hard to believe you'd find Java challenging.
Re:Go support for Android by skrebbel on Saturday June 21, 2014 @02:29AM (#7924352)
My guess is that that's his point. Java is easy to pick up, but the Android API is such a hurriedly-hacked-together piece of nonsense that it hurts.

Case in point: To make a list on Android, you need to jump through hoops, assign stuff to a "Tag" property (a field intended for hacks and workarounds), typecast your ass of, or if you don't do all that your list will perform absolutely shitty. So, the easy flow is a crappy, slow, buggy list. The "best practice" (which is not the easy flow, because hey, why would we make good stuff easy) is a "View Holder Pattern" [0] that involves using intended-for-hacks framework features.

On top of that, to my feeling there's also a big difference in quality between the enterprisey Java ecosystem and the Android ecosystem. Android-o-world is full of not-entirely-good advice and bad examples. Jumping into Android reminded me of past PHP experience: lots of well-meaning, but ultimately not-very-experienced people set the tone. Enterprisey Java might have AbstractFactoryFactoryProviders, but at least they have no buggy/wrong/hacky/insane code with 300 stackoverflow upvotes.

[0] https://developer.android.com/training/improving-layouts/smo...

Re:Go support for Android by ZoFreX on Saturday June 21, 2014 @09:02AM (#7924866)
> Case in point: To make a list on Android, you need to jump through hoops, assign stuff to a "Tag" property (a field intended for hacks and workarounds), typecast your ass of, or if you don't do all that your list will perform absolutely shitty. So, the easy flow is a crappy, slow, buggy list. The "best practice" (which is not the easy flow, because hey, why would we make good stuff easy) is a "View Holder Pattern" [0] that involves using intended-for-hacks framework features.

You don't have to do that. For a list with homogenous items you can use a regular ol' ListAdapter, implement getView sensibly (i.e. re-use views, which is very little work) and it will perform just fine. We tried this with a list of 2,000 items (each item had two TextViews and an ImageView) and it was completely fluid on a Samsung Galaxy Ace.

> Android-o-world is full of not-entirely-good advice and bad examples. Jumping into Android reminded me of past PHP experience

I could not agree with this more. I'd say somewhere around 2/3 of StackOverflow Android answers are downright wrong.

Re:Go support for Android by alayne on Saturday June 21, 2014 @02:48AM (#7924378)
I dislike Android as much as the next guy, but you have to do some extra work to make UITableViews perform well in iOS as well.
Re:Go support for Android by kllrnohj on Saturday June 21, 2014 @05:06PM (#7926067)
You very, very rarely have to use the Tag property to make a list. You either use Tag as a View-cache system (the View Holder Pattern, which is total overkill these days), or because your data object model is broke as hell (aka, you suck at object design).

Everyone else just uses CursorAdapter which is easy to use and ties in nicely with things like Loaders and ContentProviders.

Re:Go support for Android by libria on Saturday June 21, 2014 @12:47AM (#7924225)
I'm reading into his comment that he dislikes the tedium of Java's verbosity e.g., getters, no var/auto, no LINQ, no delegates, etc.
Re:Go support for Android by Pxtl on Saturday June 21, 2014 @03:01PM (#7925775)
That stuff plus the terrible state of datetimess and the lack of obvious operator overrides like being able to test string equality with ==.
Re:Go support for Android by V-2 on Saturday June 21, 2014 @07:14AM (#7924716)
Java's datetime API and (to some extent) collections were a cultural shock to me (coming from a .NET background) :)

That's why there are all these crutches like Joda, Guava etc.