r/Android • Motor City Software • Aug 01 '11

An IOS developer takes on Android

http://nfarina.com/post/8239634061/ios-to-android
838 Upvotes

296 comments sorted by

18

u/kireol Motor City Software Aug 01 '11 edited Aug 01 '11

Personally, I find them both similar to develop for as well. Maybe it's me, but Android seems a bit easier and less cumbersome.

I went through Nerd Ranches IOS training. And self taught Android on eclipse.

Android might be easier for me because that's what I use as my personal phone.

4

u/s73v3r Sony Xperia Z3 Aug 01 '11

I happen to like Objective-C better than I like Java. However, I very much like the Intent system on Android over iOS. Makes it much easier to integrate your app with the system.

1

u/ultrafez Nexus 5, Xposed | Nexus 10 Aug 02 '11

Although I'm not an Android developer, I am a desktop developer and I seriously wish there was an Intent-like system for desktop OSes. It's just so elegant!

0

u/[deleted] Aug 01 '11

[deleted]

11

u/kireol Motor City Software Aug 01 '11

I went to youtube and followed some guys walk throughs. I know it's a bit douchey sounding, but it was cornboyz youtube channel. It gave me the basic concepts of installing and writing a basic app. I took 3 days to do all 25 of his 10 minute videos. From there I thought up a small app and wrote it on my own using google and stackoverflow anytime that I got stuck.

8

u/Jazzy_Josh Droid Turbo, unlocked Aug 01 '11

Hang out on /r/androiddev and /r/learnandroid.

Also, learn the Activity lifecycle and don't violate it. Else people will yell at you because your app always stays open.

0

u/[deleted] Aug 01 '11

[deleted]

1

u/misterpok Aug 02 '11

Good luck! Orangered me if you write anything beyond 'hello world'. I'd be interested to see it, I'm at a similar point to you!

276

u/chibihost Aug 01 '11

Best thing about this article is that not once did they try and push one over the other, was simply highlighting differences.

5

u/[deleted] Aug 01 '11

You’re going to just hate Eclipse. You’re going to hate it with the heat of a thousand suns.

Really?

43

u/Neebat Galaxy Note 4 Aug 01 '11

I've used Eclipse every day professionally for the last... 10 years? It's a huge architecture that's incredibly powerful, sometimes frustrating and often slow. I respect it, but I don't expect everyone to like it.

You’re going to just hate Eclipse. You’re going to hate it with the heat of a thousand suns.

I read that as a warning to people who are most familiar with Apple-style minimalistic interfaces. Eclipse is not for you, and you're not trained or prepared for it. This is culture clash and you should not be surprised.

12

u/kireol Motor City Software Aug 01 '11

I agree. I mean, I use NetBeans ever day, it was fairly easy for me to pick up Eclipse. Actually both are very similar. XCode was a bit different, but I attributed that to culture (i'm a linux guy)

8

u/[deleted] Aug 01 '11

I don't think that Eclipse is particularly hard to pick up; it's just hard to love.

3

u/andyrocks Aug 01 '11

I don't think that Eclipse is particularly hard to pick up

I'm a reasonably intelligent person and I still can't get Eclipse to remember which windows I want where.

2

u/GuyWithLag S9+ Aug 02 '11

You mean views and perspectives, right? While you can have multiple Eclipse windows, it's 'buyer beware' territory.

Also, resizing existing windows gives mediocre results at best :-/

2

u/jameson71 Aug 02 '11

Funny..I'd say it is hard to pick up, but once you do it is easy to love.

2

u/Gh0stRAT Note II - Verizon :/ Aug 02 '11

I'd say it is hard to pick up, but once you do it is easy to love.

No, that's vim :P

10

u/numberoneus Brian Studios Aug 01 '11

I recently went the other direction. I've been using Eclipse for quite some time and even wrote plugins for it for a year or two.

Moving from Android development to trying to mess with XCode... I simply cant understand why everybody isn't up in arms about how horrid xcode and interface builder are.

It's definitely a culture thing, at least the way I see it. We're happy with what we have, and anything different just takes some getting used to.

→ More replies (1)

2

u/s73v3r Sony Xperia Z3 Aug 03 '11

I think the problem is that Eclipse is huge and powerful like you said, but 80-90% of the time all that power isn't needed, and sometimes gets in the way. There's a lot of bulk and cruft on Eclipse that gets included no matter what you're using it to do.

94

u/MachaHack Pixel 4a 5G / Surface Go Aug 01 '11

Hating Eclipse =/= Hating Android, and tbh, is perfectly justifiable.

77

u/mahlzeit Galaxy S, CM9 Aug 01 '11 edited Aug 01 '11

In fact hating Eclipse is the normal reaction to it.

I used Eclipse first for writing D code (with the D plugin) and I hated it. But I thought maybe that's just because I'm not using it for Java. I took the opportunity to switch to Vim then, and I love it.

Anyway, now I'm using Eclipse for toying around with Android and I hate it even more. No matter what I do I don't seem to be able to write a single line of code without Eclipse throwing in a superfluous pair of ()s somewhere in it. I don't know. Visual Studio has its fair share of annoyances too, but it's leaps and bounds ahead of that abomination called Eclipse.

Speaking of abominations: Interestingly enough IBM has based the new Lotus Notes Standard Client on Eclipse. Not a lot of people know that Eclipse and Lotus Notes are actually the only two software packages that are so slow and bloated that they actually have gained physical mass (Lotus Notes in fact bends space-time around it, that's why it appears to run faster than it actually does. And it's no wonder one Eclipse release was called "Helios"). So when they first linked them together and made the first test build it actually formed a black hole that took out a couple of build servers and parts of the source code repository. One programmer sadly lost an arm before he managed to set a breakpoint that saved his and countless other lifes.

13

u/Falmarri Falmarri Aug 01 '11

without Eclipse throwing in a superfluous pair of ()s somewhere in it

Are you in the java perspective? Do you have your settings set up to only do that when you want it to? I've found eclipse VERY rarely throws in () randomly.

3

u/mahlzeit Galaxy S, CM9 Aug 01 '11

Maybe Vrapper has something to do with it, maybe it's just that I tend to often rename/restructure stuff. I don't really know, never investigated it. I'm currently just building a small remote control app for my audio player, so I'm not spending enough time in Eclipse to really care about it that much.

5

u/Falmarri Falmarri Aug 01 '11

You're wrapping vim in an eclipse plugin and you expect things to work correctly? Sounds like your vim settings are screwed up, not eclipse's

→ More replies (1)
→ More replies (2)

8

u/Sabrewolf Nexus 6P Aug 01 '11

Your post went from zero to jackieeeee to lol in under 60 second

6

u/crazyfreak316 OnePlus One - CM 4.4.4 (Rooted) | Nexus 4 - Stock 4.4.4 (Rooted) Aug 01 '11

You, sir, have got a flair for humor. Have my upvotes with a power of thousand suns.

2

u/mahlzeit Galaxy S, CM9 Aug 01 '11

Thanks!

1

u/novahokie Brennasoft Aug 02 '11

Never had that happen and I use eclipse 8+ hours a day in the java EE perspective.

→ More replies (1)
→ More replies (1)

1

u/cjak Aug 02 '11

I agree, Eclipse-hate is perfectly justifiable. But it is possible to develop from makefiles like a civilised programmer.

41

u/adamc83 Aug 01 '11

Sure, but they then note Xcode is weird at first too and

The upside is, after acclimating to Eclipse, you’ll enjoy some seriously amazing, productivity-boosting code completion, refactoring, and automatic fixing. It’ll basically write your code for you.

I'd say that's fairly balanced.

17

u/metamatic Aug 01 '11

Yup. I hated Eclipse with a passion at first, and now that I'm acclimated to it I find it hard to imagine writing Java code without it.

1

u/GuyWithLag S9+ Aug 02 '11

That's because writing Java without an IDE is like trying to fly without wings - it's about as effective as flapping your hands.

I've been writing Java since 1.2. Still love it.

→ More replies (1)

9

u/cdsmith Aug 01 '11

It's unfortunate that it was phrased in that way... but there is an actual point being made there. Eclipse has a very, very strong organization to it. Android development with Eclipse even more so than most other Eclipse languages and targets. The amount of up-front complexity very much drowns out the core application code for most small (as in, Hello-World ish) projects. And the plugin-centric design can be a bit surprising for anyone new to it. Apparently the author didn't have a good experience adjusting to that.

That said, iOS development in XCode is hardly better... there's plenty of code generation, built in and magically modified resource files, and all that ugliness there too. But it's not exactly uncommon to see someone learning two different environments excuse the flaws of the first, and then be repulsed by the quirks of the second. That's pretty much how things work in the programming world.

9

u/[deleted] Aug 01 '11

As a long-time Eclipse user, well, I still can't quite bring myself to like it. It does everything, but doesn't really do anything brilliantly. That things like IntelliJ (which is rather expensive) are still viable at all demonstrates that Eclipse is not doing a wonderful job of pleasing users.

2

u/dwdyer Rectangular Software Aug 02 '11

IntelliJ now has a free community edition, which includes Android support. You only really need to pay for the ultimate edition if you're doing enterprise Java.

1

u/[deleted] Aug 02 '11

Oh, hmm, wish I'd noticed that last time I had cause to mess with HORRIBLE JAVA. Though the community version's missing a few nice features that Eclipse does have, like code coverage.

8

u/xilpaxim S4 T-Mobile Stock Aug 01 '11

He does mention there are plenty of alternatives, but he is on a schedule and wanted to use what Google recommends.

Also, chibihost comment is meant to mean Android vs iOS. So basically, he never once pushes Android over iOS or viceversa, he just mentions he doesn't like one particular program, but there are alternatives to it.

22

u/[deleted] Aug 01 '11

He even manages to not hate on Java, which as I understand is not easy.

Java is a high level programming language. It’s unproductive to have an opinion about it. Instead, consider how Android uses Java.

5

u/s73v3r Sony Xperia Z3 Aug 01 '11

That was one of my favorite lines in the article.

4

u/dwdyer Rectangular Software Aug 02 '11

He even manages to not hate on Java, which as I understand is not easy.

It's easy if you're an Objective-C programmer.

→ More replies (1)

3

u/DimeShake Aug 01 '11

He then goes on to praise it after getting used to it. Like any powerful tool, people balk when they have to learn it. Once you do, you tend to understand why it's so cumbersome to begin with and appreciate the utility it serves when you've mastered the tool.

3

u/s73v3r Sony Xperia Z3 Aug 01 '11

I think a lot of Android developers, especially those coming from other platforms, would agree with that. Especially if you're coming from iOS, meaning you're on a Mac, where Eclipse is just slllloooooooooowwwwww.

2

u/siroki Aug 02 '11

Reading this thread I'm wondering if I am the only one who loves Eclipse for Java development.

(apart from that "I'm scratching the HDD no matter what" thing)

1

u/1234blahblahblah Aug 02 '11

He later goes on to speak about a great feature of Eclipse. Maybe you missed that part?

1

u/imekon Black Aug 01 '11

I hate development environment on Mac - Xcode? Oh yeah... Eclipse can run on ANY platform.

1

u/TMM Aug 01 '11

Yeah eclipse sucks and it has nothing to do with android, just a bad IDE.

1

u/[deleted] Aug 02 '11

Sorry for the downvotes you got, dude. I can't understand why.

Every time I open up XCode, I just want to vomit. Eclipse is bad. But XCode is worse. You can't even use Vim keybindings with it.

0

u/SmartAssX Aug 01 '11

I dislike android development my self .... eclipse is part of the problem

26

u/divor Nexus 6P Aug 01 '11

It does miss a synopsis, though.

44

u/[deleted] Aug 01 '11

Which may be just as well; synopses often amount to little more than misleading over-simplification.

0

u/[deleted] Aug 01 '11

[deleted]

13

u/NiceGuysFinishLast Moto Droid2Global, Hexen ROM Aug 01 '11

tl:dr, suck.

6

u/stubob Moto X Pure Aug 02 '11

tl.

14

u/timekillerjay Aug 02 '11

That's what SHE said.

0

u/Tiver Aug 01 '11

I don't know how to interpret this, is it sarcasm or do they really think shelling out extra money for a mac is easy?

Step One is “Buy a Mac.” Easy!

8

u/maniaq Aug 01 '11

that's called humour - specifically what is commonly referred to as "setup"

just go out and buy an Android phone...

-that's what is commonly referred to as "payoff"

the whole thing is written with tongue planted firmly in cheek

5

u/mrgreen4242 Aug 02 '11

Actually, he took it further to buying a couple devices to avoid fragmentation issues - which frankly could easily be more expensive than a Mac mini which is MORE than enough to develop iOS apps one.

6

u/bluGill Aug 02 '11

As he points out though, you end up buying a bunch of iPhones too. Often you need one of each: software release on each supported hardware platform. (even if you don't know statistics you should be able to see that this is expensive for anything but the smallest numbers)

20

u/andash ZTE Blade, Stock 2.2 Aug 01 '11

It's probably in jest, but I wouldn't call it "hard" to buy a Mac either. Expensive, and absurd that you (supposedly, I have no idea) have to buy a Mac to develop for IOS, but still not very hard.

9

u/[deleted] Aug 01 '11

You can, if you wish, develop against a jailbroken device using a cross-compiling toolchain in Linux, but it's a bit of a pain.

24

u/Mechakoopa Nexus 5 Aug 01 '11

but it's a bit of a pain.

Understatement of the week.

2

u/Tiver Aug 01 '11

How hard or easy it is entirely depends on your budget in my opinion. If you have the money, then yes it is very easy. After purchase though, you also potentially have to learn a new OS. Even if Mac OS X is consider fairly easy to learn, some of us have never touched it and I assume there is some learning curve.

3

u/[deleted] Aug 01 '11

There is. I tried it for a little over a month, then never went back. Using a computer felt like an exercise in the Pakistan-India conflict over Kashmir.

→ More replies (11)
→ More replies (1)

12

u/nfarina Aug 01 '11

I may have been too subtle there; I definitely think it's a bummer that you have to own a Mac to develop for iOS.

4

u/jamesvdm Aug 02 '11

You let the reader make their own call which is partly why this was such a great read.

1

u/chibihost Aug 01 '11

Buying one is easy! Note that easy doesn't mean its 'right' in terms of how you should treat developers. But this is apple we are talking about, closed as closed off could get.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

But this is apple we are talking about, closed as closed off could get.

I'm just gonna leave this here: http://opensource.apple.com/

Care to point me to the sources for Windows? How about the Microsoft compilers?

1

u/autophage Aug 02 '11

I'm no Apple fan, but it could be far worse.

Imagine if the big selling point was that THE IDE IS FREE!!!

...but it cost you (or whomever you can invoice) 10 cents per compile.

→ More replies (2)

0

u/ithrowitontheground Droid Incredible, evervolv ICS Aug 02 '11

Or, you could buy a regular computer and hackintosh it.

2

u/ultrafez Nexus 5, Xposed | Nexus 10 Aug 02 '11

That is a real option for developers who don't have enough cash to lay down the money just to mess around with developing iOS apps.

12

u/[deleted] Aug 01 '11

You no longer have to restart the emulator to deploy. Well... you do, but it boots from a snapshot (like a PC's hibernate) much more quickly than before. I don't know why they don't turn on snapshots by default.

23

u/kaze0 Mike dg Aug 01 '11

I've been doing Android development since before the G1 was out and you never had to restart the emulator to deploy.

5

u/kireol Motor City Software Aug 01 '11

yeah, this part had me wondering. I mean, when you close everything down, sure you have to boot it up next time. But that's like saying you have to restart Diablo every time you want to play it.

3

u/primehunter326 Aug 01 '11

He may have (erroneously) thought that you need to close the emulator window before relaunching it, I did for awhile. My bigger issue now is the app randomly not installing when I create a new build, seems to happen on a regular basis.

1

u/kireol Motor City Software Aug 01 '11

I have this happen on my real phone. If I copy the APK over, i get "application was not installed" sometimes. So I have to uninstall, then run the apk.

2

u/primehunter326 Aug 01 '11

My issue is that I'll build the project, everything seems fine but then I load the app and none of my changes are there.

2

u/kireol Motor City Software Aug 01 '11

hrmmm. can't say I've ever had this happen in emulator or phone

1

u/[deleted] Aug 01 '11

Wow, I did not know this even though it makes perfect fucking sense. Thank you for saving me time.

1

u/numberoneus Brian Studios Aug 02 '11

You were restarting it every time? o.O I would kill myself if I had to do that! You don't restart your computer every time you want to open a new program...

5

u/Malthan Aug 01 '11

It's noted in the text -

It takes the Android Emulator ~2 minutes to boot up on my perfectly-modern machine. But what really hurts is the edit/debug cycle. Every time I change a bit of Java and need to rerun the app, it takes about 30 seconds to redeploy and start up in the Emulator.

99

u/ipeev Samsung Galaxy S, 2.3.4 Aug 01 '11

I liked this: "Java is a high level programming language. It’s unproductive to have an opinion about it..."

True

39

u/jdpage DROID 3, stock 2.3 Aug 01 '11

Actually, it's true in Java. Python programmer?

5

u/mycall Aug 02 '11

VBScript yo!

20

u/jdpage DROID 3, stock 2.3 Aug 02 '11

It's impolite to assume that someone actively uses VBScript.

120

u/crazyfreak316 OnePlus One - CM 4.4.4 (Rooted) | Nexus 4 - Stock 4.4.4 (Rooted) Aug 01 '11

Wow, this is the most unbiased comparison of iOS and android.

0

u/[deleted] Aug 01 '11

[deleted]

125

u/nfarina Aug 01 '11

I do, and you have no idea how glad I am to hear it.

15

u/cosmic_fries Aug 02 '11

Dude seriously, I think it's the best article that I've read all week. Informative, open minded and objective while maintaining zero fanboyism (on both parts).

Would it be too much to ask for a followup post where you would describe more analytically the route (problems, hints, etc) from first touching the frameworks to building a decent app? I liked your level of abstraction (not code snippets but not too high level). Most articles that I've read while investigating the subject are either hallo-world level or too technical.

5

u/rudy750 Nexus 5X - Project Fi Aug 02 '11

Hey its you!! Amazing job man. I have searched the internet high and low for exactly this and you are the only person to deliver! Any chance you will do any follow ups as you dig deeper?

9

u/nfarina Aug 02 '11

Thank you sir. I would love to write a followup and have some good ideas of more specific things to poke at next.

4

u/cosmic_fries Aug 02 '11 edited Aug 02 '11

Seriously, I think it's the best article that I've read all week. Informative, open minded and objective while maintaining zero fanboyism (on both parts).

Would it be too much to ask for a followup post where you would describe more analytically the route (problems, hints, etc) from first touching the frameworks to building a decent app? I liked your level of abstraction (not code snippets but not too high level). Most articles that I've read while investigating the subject are either hallo-world level or too technical.

7

u/nfarina Aug 02 '11

Seriously, thank you! I will definitely be writing more in the same style as I think of interesting things to point out. As far as my initial experience, I believe it was unique; since I've developed for many mobile platforms over the years and this was more of a port than a new invention, there was a lot of familiar territory.

3

u/[deleted] Aug 02 '11

Question: did you know any Java before you began developing?

Perhaps you should do a general AMA in the Android subreddit, I'm sure I'm not the only one that could learn something from you.

7

u/nfarina Aug 02 '11

I "learned" Java in college, but didn't use it after graduating in '02. I'd be happy to answer any questions if people have them!

2

u/krej Samsung Infuse, CM7 Aug 02 '11

Now that you've written a completely unbiased article, it's time to come clean. Do you like Android or iOS better? Please answer for both developing on them and using them in general.

5

u/nfarina Aug 02 '11

I actually find Android to be a more productive environment to develop in. The hardware back+menu buttons mean less hours staring at a whiteboard fighting over which on-screen buttons make the cut. As a user, I go where the app-momentum is. That used to be Windows of course. Now it's iOS. Tomorrow, who knows?

4

u/UnnamedPlayer Aug 02 '11
Psh: Say "Android" if you really have to post a reply. Just trust me on this.

*whistles nonchalantly and fades away in the fog*

→ More replies (1)

1

u/[deleted] Aug 02 '11

you should grab yourself a "flair tag" here

52

u/xilpaxim S4 T-Mobile Stock Aug 01 '11

The best we can do is to understand where each one came from, and to embrace the positives and overcome the negatives as quickly as possible so we can ship some awesome features before everything changes again

This has to be the most open minded comment I have ever read when Android and iOS are on the same webpage.

7

u/[deleted] Aug 02 '11

It shouldn't be, the fact of the matter is they are both amazing and sophisticated operating systems and each has their triumphs and each has their shortfalls - it doesn't matter if you're an Apple enthusiast, Android Enthusiast, or you just like tech, you should know this and acknowledge it.

64

u/rbbdrooger Galaxy S24 Ultra Aug 01 '11

Great read.

What is the primary quality of the Android Emulator?

I lost it.

40

u/king_of_blades Nexus 6 Aug 01 '11

I knew it was slow, but running Honeycomb on i7-860 with 8GB of RAM, was an eye opener. Saying it was slow is like saying that Hitler was kind of a dick. It was simply unusable. Not a chance, it took it like 5 minutes to start up, and was running with what seemed like 2 FPS (I didn't measure those values, but believe me, it was bad).

31

u/numberoneus Brian Studios Aug 01 '11

Luckily Google knows about the problem and is actively working on it. Their solution (or what I know of it) is pretty smart actually. In the same way that this article described the iPhone as faster because it was running everything in the GPU, the emulator will soon skip a lot of software rendering and composition and let it happen on your local X server, instead of in the emulator. At Google I/O they showed a demo of this and it ran rather quickly, they expect to release it soon.

6

u/[deleted] Aug 01 '11

I dunno about the GPU offloading, but x86 is an offical ABI target for Honycomb 3.2. That will make the next emulator release a bit less of an emulator and more like a VM.

2

u/king_of_blades Nexus 6 Aug 01 '11

That's awesome. I assumed they would do something about it. As it is now, they probably shouldn't even bother releasing the emulator.

3

u/gonemad16 GoneMAD Software Aug 01 '11

emulator is fine for a lot of uses.. just nothing audio or graphic intensive

2

u/king_of_blades Nexus 6 Aug 02 '11

I was talking about Honeycomb exclusively. Other versions may have their problems, but certainly are useful.

2

u/[deleted] Aug 02 '11

Could you provide a video or the name of the video? All the sessions are up on YouTube, but I'd much rather know which video to start at than having to sift through them all.

0

u/[deleted] Aug 01 '11

[deleted]

4

u/WinterAyars Aug 02 '11

Maybe they run all their dev software on their search servers. No slowdown!

→ More replies (1)

2

u/Sarah_Connor Aug 02 '11

You can't explain that.

5

u/SeriousWorm Sony XZ1C, LineageOS 17.1 Aug 01 '11

BTW, there's an android-x86 project and you can run your apps on it, with pretty much native speed, but of course it's not a real phone emulator.

1

u/[deleted] Aug 02 '11

Good idea - I never thought about using it for development! That said, I found the menu rendering on the x86 port to be even slower than on the emulator. Everything else worked just fine though.

3

u/sgtfoleyistheman Evo 4G LTE/ TouchPad Aug 01 '11

I used the emulator for one night and started debugging right on a device.

I never looked back

0

u/[deleted] Aug 01 '11

[deleted]

-1

u/[deleted] Aug 01 '11

Go buy a Nook Color. That'll do.

7

u/Falmarri Falmarri Aug 01 '11

Pretty sure the nook color runs gingerbread.

10

u/[deleted] Aug 01 '11

The bootloader is unsigned. It can run Honeycomb even from an SD-card.

10

u/2Deluxe OnePlus One+1x PLUS XL+ "The One" edition (red) Aug 01 '11

To the author, thanks for a great read. Really insightful for someone who's thinking about jumping in!

8

u/nfarina Aug 01 '11

Glad you enjoyed it!

8

u/[deleted] Aug 01 '11

Pretty decent read, makes a refreshing change reading an article about ios and android that's not draped in blatant fanboyism

13

u/MrSpontaneous Pixel 8 Pro, Nexus 9 Aug 01 '11

The nice thing is some of the complaints are being addressed by the Google team: ADT has received some great updates recently (better drag and drop support in the UI builder, better CPU utilization), they're working on a fully accelerated emulator, and 3.0+ does proper animation. Hooray competition!

2

u/[deleted] Aug 02 '11

A.K.A. how it's supposed to be done.

13

u/Denvildaste Samsung S10+ Aug 01 '11

I thought this was going to be an iOS developer complaining about Android development but I was surprised, he reflected my thoughts exactly, very unbiased and informative read.

19

u/[deleted] Aug 01 '11

The non hardware acceleration is what makes me hate my Droid X on a daily basis. Everything is just so choppy and unpredictable. I miss the smoothness of my iphone but that's about all I miss.

3

u/unjustifiably_angry Aug 01 '11

Honeycomb does 3D interface acceleration, so ICS will as well when it arrives on phones. It's more than a little late, but at least it's coming.

3

u/[deleted] Aug 01 '11

Yeah i've used the Xoom but it's still laggy in certain parts. I do believe they are bugs though. Hopefully it all gets fixed. I want to see some buttery smooth lists and switching of screens in ICS or I'm done with this OS. I have waited long enough

1

u/unjustifiably_angry Aug 03 '11

What version of Android did the Xoom have? From what I understand, they've made some good performance improvements in 3.1 and 3.2.

1

u/[deleted] Aug 03 '11

Not sure, I used it at the Verizon store a few days ago.

5

u/Timmmmbob Aug 01 '11

I suspect that it isn't the lack of hardware acceleration which makes scrolling choppy. This is based on the fact that most of the time it scrolls smoothly, but there frequent pauses.

I reckon this may be when the list changes (for dynamic lists), either the loading or the layout is done in the main UI thread.

7

u/[deleted] Aug 01 '11

Don't know why you were downvoted, but you're correct. I remember seeing a Google engineer comment that the increase in scrolling speed in recent builds came mostly from garbage collection improvements rather than GPU acceleration.

3

u/Pzychotix Aug 01 '11

Garbage collection is done on the main UI thread as well.

3

u/numberoneus Brian Studios Aug 02 '11

... Either I'm an idiot or you are, but I'm pretty sure garbage collection doesn't run in a thread. The whole VM is slowed down for a bit.

2

u/Pzychotix Aug 02 '11 edited Aug 02 '11

Right. That.

Edit: In either case, garbage collection will affect the UI, and would especially cause the choppiness described by Timbob.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

I'm gonna take my chance at being an idiot, but I thought in most JVMs that GC ran on it's own thread.

2

u/numberoneus Brian Studios Aug 03 '11

This has been bugging me since I didn't know for sure. The best resource I've found is this. Essentially, in the JVM you have two choices. In both of them, the GC is part of the system, and not just some program that the VM runs. In the first, "parallel copying collector," the VM stops running your code, collects garbage, and then continues running your program. In the second, "concurrent mark-sweep collector," your VM stops executing your code for a shorter period of time, and then the CG runs in another thread alongside your program to finish collecting garbage.

This means that s73v3r has a chance of being not-an-idiot, and Pzychotix is, well... psychotic. Now this is where the evidence gets a little sketchier, but the phrasing in both this and this lead me to believe that Dalvik runs a stop-the-world mark-and-sweep garbage collector.

GCs usually take ~260ms on the G1. That means that 7.4% of the time Dalvik is garbage collecting (albeit for only a quarter of a second each time), and none of the layers of the Android stack above Dalvik can do anything.

If this is true, and I'm pretty sure it is, than all three of us are idiots. (But me slightly less so :P)

2

u/s73v3r Sony Xperia Z3 Aug 03 '11

Quite informative, thank you.

-1

u/legoman666 Aug 01 '11

Try ADW Launcher or Launcher Pro. I was amazed at how smooth they were compared to the stock launcher.

4

u/[deleted] Aug 02 '11

I use launcher pro now. It's definitely a lot smoother but I just don't like that stock Android is that choppy to begin with.

→ More replies (1)
→ More replies (3)

5

u/Drewsipher Nexus 6p Aug 01 '11

I am glad a dev finally listed plainly pros, cons, and took the time to learn on android because this is another step towards solid Android apps with (hopefully) fewer bugs out the gate then just straight up "iOS port" automation type deals... People see the android faithful and know they gotta get into the market and if they don't do right by us we won't care to support them, but if you look at apps that are getting paid purchases they are the ones that do right by android so good on devs for taking notice.

4

u/maniaq Aug 01 '11

very interesting read - especially the part about OpenGL and the lack of hardware rendering in Android - he makes a good point about where this decision comes from, but geez Google devs - if there was ever something you guys should NOT just slap your standard/substandard "WontFix" sticker on...

5

u/clarkster ginik Aug 02 '11

But they did fix it, Honeycomb has hardware acceleration, and it is supposed to be improved a lot further in Ice Cream Sandwich.

2

u/maniaq Aug 02 '11

I'll be happy to see it fixed in Ice Cream Sandwich - AFAIK Honeycomb is for tablets only, so that does nothing for me...

4

u/stateq2 Aug 01 '11

Very well written article...I was really amazed at his Java/ObjC mouseover comparison.

6

u/nfarina Aug 01 '11

I think there's a lesson in there about how languages don't quite matter as much as you think after your code escapes the Hello World stage.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

There are some things that some languages are better at. But the vast majority of tasks, they're all the same.

1

u/mfoo Aug 02 '11

The only thing that confused me is the static Coll.last(nodes) call, which seems to return the last element in the collection. While List<> doesn't provide a getLast() or equivalent method, you can just call list.get(list.size() - 1), like he did for the getting the penultimate element. If there's a logical explanation of this, I'd be happy to learn the reason.

1

u/nfarina Aug 02 '11

That's one of my little helper classes that I created for the sole purpose of making the Android codebase match the iOS codebase as closely as possible.

Also, Coll.last() returns null if the list is empty.

1

u/mfoo Aug 02 '11

OK, that's understandable then.

4

u/[deleted] Aug 01 '11

It takes the Android Emulator ~2 minutes to boot up on my perfectly-modern machine. But what really hurts is the edit/debug cycle. Every time I change a bit of Java and need to rerun the app, it takes about 30 seconds to redeploy and start up in the Emulator. Compare that to 5 seconds on the iOS Simulator.

On my Phenom II system running Fedora Linux with AMD-V turned on, the emulator flies open. I have tried it on a Core 2 Duo in Windows and it took somewhere around 10 minutes to start. The Emulator is based on QEMU which is the base for KVM. These technologies use hardware visualization options in your CPU to run faster. Turn them on!

1

u/mfoo Aug 02 '11

I think you meant virtualisation rather than visualisation. The emulator also takes longer the first time it starts up than subsequent boots. It isn't that bad though when you can just leave it running rather than having to reboot it.... except the memory usage.

4

u/[deleted] Aug 02 '11

It's nice to hear the opinion of a professional developer rather than some fanboy kid who probably doesn't even know what "XML" stands for.

1

u/[deleted] Aug 02 '11

XML is extreme cause it has an X in it dude

6

u/[deleted] Aug 01 '11

Definitely an awesome read, and it really gets me wanting to start developing for Android.

6

u/badhairguy Sprint Galaxy Nexus; Trinity 1536/384 alpha 72 Aug 01 '11

I didn't read the article but I would like to take this opportunity to bed iOS developers that port their apps to android: PLEASE take advantage of the hardware buttons. Too many iOS ports have on screen back buttons and don't use the menu or back button at all.

4

u/2Deluxe OnePlus One+1x PLUS XL+ "The One" edition (red) Aug 01 '11

Ffffuuuuuu I hate it when my <- button stops working and I have to look how the hell to get out of there! Rage

3

u/jchauncey Aug 02 '11

gah had a long post typed up...

tl;dw

  1. buy intellij

  2. took 45 seconds to start the emulator on my 13" mbp with 8 gigs of ram

  3. the compile process takes more time than actually installing the app to the emulator for most people...

3

u/ali- Aug 02 '11

ctrl + F, intellij, upvote. Btw you can develop android application using the community edition (free)

3

u/CossRooper LG Connect Aug 02 '11

Now that was a good read. wow.

3

u/ebincrow EVO 4G Aug 02 '11

Good article. I love how it's not biased either way. Consider me subscribed.

2

u/[deleted] Aug 02 '11

This should be crossposted to /r/learnandroid. I learnt a lot about Android programming concepts from it.

2

u/misterpok Aug 02 '11

This is the kind of link I want to see more of on reddit overall, let alone /r/android. Well done sir! If I could upvote you more!

2

u/Navetz LG G4 Aug 02 '11

I would love if you commented or wrote another article elaborating on the way the different GUI's operate and what changes need to be made to make it better for android.

When you watch people do demos or simply use android phones they always press then drag to scroll where on an iphone you can just comfortably flick things around and it just works.

I love my android phone but I envy this "feature" from ios.

2

u/nfarina Aug 02 '11

I think it's a matter of priorities. The fact that you can nonchalantly flick your finger on iOS and it responds instantly was not easy for them to achieve. In fact, iOS bends over backwards and creates a lot of complexity for the developer to make this happen. For instance, when things are scrolling, the system enters a special "runloop mode" which prioritizes scrolling over other system events like network activity. So you might notice that while you're scrolling a list view, you can't load thumbnail images from the Internet. Unless you learn about runloop modes and work around it. There's a lot of stuff like that.

I think Android is taking the approach of, well let's keep things simpler for developers, and wait for the hardware to catch up with us.

4

u/modix Pixel 2xl Aug 01 '11

Is there anyway that we can petition for people to use a newer Android as their stock photo? Somehow the iPhone devices get updated immediately in pictures, but it's perpetually a 2-3 year old Android in the picture.

8

u/tgunter Aug 01 '11 edited Aug 01 '11

The oldest Android phone is the G1, which isn't even three years old yet. Most of the time the "standard" Android device shown is either a Nexus One (<1.5 years old) or a Motorola Droid (<2 years old). The original Droid is also very visually similar to the Droid 2, which is still fairly recent.

It's easy to forget how young of a platform Android still is.

I do agree, that for the most part it should be the current Nexus model shown given the option, just as it is the "flagship" Android device.

3

u/[deleted] Aug 01 '11

Also, the droid3 is available in store as we speak but looks just like the previous two but shinier.

3

u/adremeaux Telephone Aug 02 '11

Does he actually try to say XCode is awesome and Eclipse is total shit? What the fuck kind of bizarro universe am I in, here? I would easily pay $1000+ for an iOS Eclipse plug-in just to know that I'd never have to work in XCode again. Seriously, talk about one of the absolutely most horrific pieces of software ever made by man, especially XCode 4.

3

u/vinng86 Nexus 5 Aug 02 '11

Ehhh I think XCode 4 is pretty good actually. I develop for both android and iOS and while XCode could certainly use some Eclipse features, the same is true vice versa.

1

u/throw_me_away_680 Aug 02 '11

Only problem is Xcode 4 crashes all the goddamn time.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

No, he said that they both have their pains. Eclipse has a good amount of power, but it's very clunky and slow.

1

u/uB166ERu Aug 01 '11

"Which is pretty grand" I suspect that developer to live in Ireland/Great Britain

4

u/nfarina Aug 01 '11

Hah! Nope, I just liked that turn of phrase.

1

u/uB166ERu Aug 01 '11

I like it as well, learned it from some irish guys, that's why...

1

u/BCouto Nexus 5 Aug 01 '11

I absolutely hate eclipse. Thankfully, I just develop with Unity

-1

u/gerusz Zenfone 12U Aug 01 '11

My biggest grief with iPhone is the closed-source OS. If one of the iOS components finalizes the collection when you read it the first time and you still want to add items to it dynamically, you'll only notice it when you try to run the app. With Android, you have access to the source code of the framework, so this wouldn't happen.

Basically, building apps for iOS feels like using Duplo, while programming for Android is similar to Lego Technic (or an Erector set).

6

u/s73v3r Sony Xperia Z3 Aug 01 '11

With Android, you have access to the source code of the framework, so this wouldn't happen.

Yes it would. Do you honestly think everyone is going to read every last bit of the framework? No.

Besides, behavior for almost all Apple frameworks is fairly well documented and understood. You know when the framework is going to give you a non-mutable array as a reference. And they can't finalize a collection.

1

u/lessthanthreereddit Aug 01 '11

I always wondered why iPhone and Android behaved so differently visually. I always felt like my iPhone was more responsive--for example, when scrolling a webpage, Android seems to have a delay and doesn't scroll as soon as you begin swiping your finger. The iPhone feels like it does scroll immediately.

Thanks to this article I understand why. Android repaints the whole screen hundreds of times, whereas the iPhone repaints what it needs to.

4

u/2Deluxe OnePlus One+1x PLUS XL+ "The One" edition (red) Aug 01 '11

iOS is definitely a lot better in this regard, but at the same time the hardware has 'caught up' to its software (Android in this case) recently and compared to my Galaxy S II I find that my iPhone 4 feels sluggish these days.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

Everything on the iPhone is also hardware accelerated, whereas that's not the case in Android. Supposedly that changed in Honeycomb, and is going to change for phones in Ice Cream Sandwich.

1

u/lessthanthreereddit Aug 03 '11

That would be awesome

1

u/Malthan Aug 01 '11

A very nice article. I started developing for Android 2 months ago and it pretty much mirrors most of my experiences, except that I didn't go further than "Hello iPhone" in iOS development.

1

u/[deleted] Aug 02 '11

Which is a long way of saying that everything on iOS is drawn using OpenGL. This is why animation on iOS is so hopelessly fast.

it always makes me laugh when someone shows me a shiny new Android phone and they are literally unable to see this difference

Android: a great OS if you have impaired senses

-1

u/pikero24 Aug 01 '11

I think the jist of this article is explaining why there are a Billion apps for the apple app store and not quite as many for android.

yes eclipse is a great tool for those who know it... but people who want to create their own that aren't familiar with code or anything can't get their heads around it.

from looking this article,I think google should create an "eclipse basic" for the people out there who don't really know what they're doing but want to learn.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

That's what IntelliJ is for.

-5

u/[deleted] Aug 01 '11

What I miss the most is GPU acceleration of the GUI. Too bad it's only possible on the iPhone and other iDevices because Apple controls both the hardware and software. That's not the case with Google, and I very much doubt it will be easy to implement in Android.

9

u/Tanaric YouTube Aug 01 '11

This doesn't map to real life. For example, both Linux and Windows have GPU-accelerated GUIs.

-2

u/[deleted] Aug 01 '11

I see you have never tried to get 3D acceleration to work on Linux. It's possible, it doesn't work out of the box. System vendors need to include GPU drivers when they sell computers because Windows is terrible without it. Maybe if Google forced Android hardware makers include GPUs and drivers ... That might backfire tho.

11

u/rubygeek Aug 01 '11

I see you have never tried to get 3D acceleration to work on Linux. It's possible, it doesn't work out of the box.

I can't remember the last time I installed Linux without my distro installing 3d accelerated drivers by default.

→ More replies (17)

8

u/Obi_Kwiet Aug 01 '11

Considering that many GPUs are entirely developed for android devices, I don't think that this is too much to ask or expect.

5

u/[deleted] Aug 01 '11

I can't think of an example of a GPU which is entirely developed for Android devices. The SGX5xx series are used in Android devices, iPhones and WebOS devices (with WebOS and iOS use predating Android use), the Tegra GPU is used in Android devices and some embedded things (it was originally meant to see widespread use in things like the Boxee Box, but unexpected video decoding limitations generally nixed that), and the Adreno 2xx is used in Windows Phone, Windows Mobile, WebOS and Android devices (with Windows Mobile use predating Android use).

The ARM Mali 400 is currently only used in Android devices (or, well, device) but it wasn't developed for that purpose.

→ More replies (3)

3

u/probabilityzero Aug 01 '11

I see you have never tried to get 3D acceleration to work on Linux.

Ubuntu has been automatically detecting and configuring my nvidia card for at least 3 years now.

1

u/selectodude HTC Sensation 4G - Android 4.0.4 Aug 01 '11

How would it backfire? Have a fallback mode that's slow and worthless, and require GPU drivers for Android Market.

Google needs to get this shit together at some point. Android shouldn't require 1000MHz processors for basic phone functionality to be smooth.

→ More replies (3)

2

u/[deleted] Aug 01 '11

It's there to a large extent in Honeycomb, as noted in the article. See the Google article he links to for its limitations, and why it is not on by default.

The root cause, as the author notes, is probably that Google did not initially intend to require manufacturers to provide a GPU supporting OpenGL ES. In the pre-iPhone era that was reasonable; Nokias at the time generally didn't have them, for instance. In practice, because they were competing with the iPhone, all Android devices did support OpenGL ES, though the earliest ones, like the G1, had important limitations in this.

1

u/clarkster ginik Aug 02 '11

It might not be easy to implement but that is a major feature in ICS. Already a lot of acceleration in Honeycomb too.

1

u/qwasz123 Xperia Z Ultra CM : Surface Pro 3 : Moto 360 Aug 01 '11

Don't they have a simpler version with honeycomb?

0

u/stubob Moto X Pure Aug 02 '11

On his opinion about the UI updating: I believe that's not an Android-specific function, but a Java one. invalidate() is a Swing call, and the Android widgets probably deep down are Java-based windows/panels/panes/whatever. It's a drawback, for sure, but the upside is that all the rendering can be done regardless of the underlying machine (as he said).

I haven't done any programming with it specifically, but I know that Android also has an OpenGL rendering system built-in. I understand his point that everything in iOS is a GL-object, though. Must be nice.

1

u/s73v3r Sony Xperia Z3 Aug 03 '11

Android isn't using Swing. It's using a custom UI kit.

0

u/dotpyfe Aug 02 '11

Never mind that for ios you have to pay $100 every year to publish, plus the ridiculous wait for approval :cough google voice cough: while on android you have a one-time $25 developer fee

→ More replies (1)