Where Android Beats the iPhone
snydeq writes "Peter Wayner provides a developer's comparison of Android and the iPhone and finds Android not only competitive but in fact a better choice than the iPhone for many developers, largely due to its Java foundation. 'While iPhone developers have found that one path to success is playing to our baser instincts (until Apple shuts them down), a number of Android applications are offering practical solutions that unlock the power of a phone that's really a Unix machine you can slip into your pocket,' Wayner writes, pointing out GScript and Remote DB as two powerful tools for developers to make rough but workable custom tools for Android. But the real gem is Java: 'The pure Java foundation of Android will be one of the biggest attractions for many businesses with Java programmers on the staff. Any Java developer familiar with Eclipse should be able to use Google's Android documentation to turn out a very basic application in just a few hours. Not only that, but all of the code from other Java programs will run on your Android phone — although it won't look pretty or run as fast as it does on multicore servers.'"
It's not DRM-laden patent trolling Apple.
"The difference between genius and stupidity is that genius has it's limits" - Albert Einstein
To those about to complain that screen resolution differences makes developing for android harder, then try using a UI measurement that does not rely on pixels, like em
Unfortunately right now it appears that for users it's the other way around.
After reading the article, I was able to port my entire Java repository to Android in just a few minutes. Of course, that consists of three versions of "Hello, world!"
Nothing for 6-digit uids?
"although it won't look pretty or run as fast...". That's all, Folks!
Fiat Homos et Pereat Theos
iphone and android aren't really inclusive.
open source is meant to be about choice and freedom.
the nokia n900 + maemo allows multiple languages and frameworks (x11 gtk qt sdl gles and whatever else you can throw at it) to peacefully coexist together :)
don't take my word for it though, i'm biased
liqbase
"Not only that, but all of the code from other Java programs will run on your Android phone — although it won't look pretty or run as fast as it does on multicore servers.'""
No because if it has any type of UI odds are that uses swing or awt. Not only that but I doubt that the Android JVM has all the standard libraries that are available on Sun Java.
Yes they will know the syntax of the language but the libraries will be totally different.
Not to mention that is probably very little code running on servers that you will want to run on a phone.
And yes I write in java and I have an Android phone and I have looked at the Android SDK.
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
Actually as far as I can judge the indian guys, they do whatever rolls in money, using another language is not a barrier...
Wrong conclusion, and I also worked with people from India who really could write code, ok they are the minority but they exist.
But given how many people in the west write shitty code I assume the percentage is pretty equal!
Android not only competitive but in fact a better choice than the iPhone for many developers, largely due to its Java foundation.
Now I don't want an Android phone. I thought it would be good or better for me as a USER, not as a developer. Silly me.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
From TFA
code from other Java programs will run on your Android phone -- although it won't look pretty or run as fast as it does on multicore servers
I'm not a developer but once of the criticisms I see constantly leveled against Java is how slow it is. Are there any mobile devices out there that can really handle even moderately complex / processor intensive Java code?
Then according to his logic, Windows Mobile is better than Android and iPhone combined, because not only can it run Java apps, but you can author software for it in practically any mainstream programming language.
What about Blackberry? It is a pure Java based platform, even more so than Android.
I just think it's silly to say "This device is LISP based, so it is better than device X because some corporation might have LISP developers sitting around that can write apps for it in a language they're used to!"
Better known as 318230.
You can buy and play FIFA10 or even Grand Theft Auto on the iPhone. The games are a pretty good indicator IMHO. When complex and expensive productions from big studios start coming out for a platform, you know that the platform is popular.
And if you think Java makes any kind of difference, think again. The guys that are developing these applications do not seem to care. It's not about happy programmers, it's about happy users. And right now the iPhone still has the edge.
As far as I can tell, 99% of the iphone apps are pure and utter shit.
Another great thing about Android is developers can get a free phone.
I don't like Eclipse, but I don't have to since there is an emacs mode for Android development.
In a band? Use WheresTheGig for free.
FYI Android has fart apps as well.
At least memory management in Java is easier.
Having seen memory leaks in every nontrivial Java program I've used (which, admittedly, is not many), I'm not certain about this. In C, memory management is hard, but that means that people think about it. In Java, memory management is implicit (which is not the same as easy), which means that people don't think about it. They don't think about the correct times to use weak references, and they end up leaking memory.
Java also has the distinction of being the language used for the only program I have ever seen with a CPU leak: Start it and watch the CPU usage slowly climb over the next few hours (while not actually doing anything, or taking any use input), until it's at 100% about 3 hours later.
I am TheRaven on Soylent News
That Java is something that makes Android superior to iPhone is a dubious claim.
Objective-C has advantages, such as that it is compiled. While Android has lots of libraries implemented in C and C++ that speed execution of Android applications, and developers can choose to implement intensive computations in C using the NDK, Objective-C requires no JNIs or other complications of splitting an implementation between Java and C/C++.
X-Code is a purpose-built, clean-sheet IDE that may lack a few power features found in Eclipse, and Eclipse has numerous plug-ins, but Eclipse also has a pretty diabolical UI, especially compared to software from Apple.
Java, Eclipse, and the other Android SDK tools are more than good enough, but they are not a big advantage, or, depending on your tastes, any advantage. There is a rough equivalence here that will probably extend to Android doing for client Java what iPhone did for Objective-C - making it popular. That is, Android apps will probably be the most common form of interactive client Java apps, if they have not already eclipsed AWT, Swing, SWT, and other Java UI libraries. This is going to have a big influence on Java, considering the fact that iPhone programming books crowd the top of the list or programming books at Amazon.
Android's advantage is in openness. Android developers are not just app developers. They can be system customizers and extenders. They can be technology vendors to a large number of OEMs using Android. They can have all kinds of products, customer, and business models, throughout the mobile economy, not just retail customers of the app store.
I wrote parts of this stuff
yeah, but they are free and open fart apps without all the drm. farts should be FREE!
The pure Java foundation of Android
Android is not java. Yes it has java aspects but it is not java! It's bits of java with a customized Android API.It doesn't even run a normal JVM, it runs the Dalvik VM.
Not only that, but all of the code from other Java programs will run on your Android phone
Seriously, no. Just... no. Try compiling a program that uses Swing, AWT or javax stuff.
Don't get me wrong, I really like Android and hate iPhones. I have a G1 (lacking on RAM as much as it is). I've programmed for android although for fun, not the marketplace. I've even made my own ROM, again for fun. But claiming Android is Java and that everything that Java can do Android can also do natively is just naive
Who need's speling and grammar?
Having built some rather processor heavy apps for the iphone the only thing that counts to me is to be able to utilize every single cpu cycle. Writing apps for these devices is easy, writing apps that can perform is another matter entirely.
Got Code?
Java does not just allow bad programmers to write sloppy code, it also allows good programmers to write better code (than in C/C++ and direct derivatives). Shitty programs are available in all languages. I managed to write a shit application in Lua in a minute flat. How difficult is it to grasp this concept? Do you really want a programming language that makes it harder to write manageable code, on purpose?
I'm getting sick of this argument. Most of my esteemed C++ colleagues like Java once they've actually tried it out for real. Unfortunately we don't always get Java libs for the hardware we are using.
Haha. If you know C and have an idea about OO concepts then obj-c is just as easy to learn as anything else. Many (most? all?) C libraries that don't rely on graphics should work just fine on the iPhone. Maybe it's C that's too hard for people to learn?
"...although it won't look pretty or run as fast as it does on multicore servers."
The Nexus One is multicore.
Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
Developing for the iPhone requires OSX. Publishing an app to the market requires a $99 license. App Store rules are quite stringent. Developing for the Android Platform requires Windows, Linux or OSX. Publishing an app costs nothing. Market rules are a lot less stringent than App Store. iPhone OS is closed. Android OS is open source allowing developers to support phones that hardware companies have dropped.
Because of education and (more) free thought I think the current generation of Asian programmers is - on average - not as apt as most western programmers. That has however nothing to do with cleverness, and it will certainly change in the future. It certainly better that they start with Java than with C++, which would certainly make everything a downright mess. The GP is under the illusion that having a harder language makes people stop programming. Instead they'll just make crappier programs.
That'll be the upcoming Android X then...
hard to believe a guy with this elitist attitude uses a mac.
Politics
Religion
Mac Products
Can I bum a sig?
That a phone that caters to developers is NOT a phone that the rest of the world has much interest in using. I love the flexibility promised by Android, but if smartphones are going to take over the world I would not want my grandmother to have to deal with fragmentation and software complexity. Android phones and the iPhone occupy two different market niches. This is a good thing for both developers and consumers.
I don't know enough about Android to really comment on other aspects of usability, but this article mainly compares development between both platforms. To be frank, though, I don't think the Android Alliance had to do a lot to be better than a system that only allows developers to code on OS X with a language that's almost entirely bound to that platform and under the control of an authoritarian and seemingly draconian submission control system.
However, under the Android platform gains critical mass (which the Droid and the Nexus One, to a lesser extent, are trying to do), the best bet to gaining lots of visibility and/or profit is by developing for the iPhone. /. though. :p)
The article is pretty comprehensive; I recommend it. (Probably means nothing here on
No kidding, who cares about syntax? That's maybe 1% of programming, the rest is creativity and knowing the libraries. If the libraries don't transfer, you have kept almost nothing.
How curious. Right here on Slashdot I said this exact thing--months ago--and I got flamed without mercy. My reasons? The unpredictable nature of the iPhone app acceptance and then Java.
Mod parent up. This is not troll material; in fact, it has a really good point.
Java also has the distinction of being the language used for the only program I have ever seen with a CPU leak: Start it and watch the CPU usage slowly climb over the next few hours (while not actually doing anything, or taking any use input), until it's at 100% about 3 hours later.
I call bullshit on that one, I leave Eclipse running for days on end and never see that. I'm not saying it's impossible, I'm saying that this is not a Java issue it must be the application you're using.
XML is a known as a key material required to create SMD: Software of Mass Destruction
And 150% of statistics are made up on the spot.
Pandora for the iPhone is so well-written, it's practically a secondary music application for many folks. Many of the popular games on there work pretty well (and are lots of fun too!) and several of the applications I've downloaded have been pretty high-quality (read: few crashes, all of which are related to Safari hogging up memory and the memory being way too limited in the first place). I would be skeptical of thinking iPhone apps are pretty crappy when many, many people have at least four pages worth of apps on their phones.
As you noted, the foundation libraries are pretty much all there - it would be an adjustment going from other GUI frameworks, although you're going to have to re-think what you do anyway for a mobile device with a mostly touch interface!
"There is more worth loving than we have strength to love." - Brian Jay Stanley
But if I turned it back to portrait, it mysteriously worked because the bounding rectangle for the screen was now taller, not wider. That took more than a few minutes to find.
He's an app developer for mobile, but doesn't have the forethought to code for variable display sizes? rtard.
https://www.accountkiller.com/removal-requested
What the F@#ck I just just quit using Java to use Go. Can't Google make up it's mind. Ok, it is all quite clear now. It isn't the language that makes a product it is what you make with the language that is the product. That explains the popularity of the totally impure ObjectiveC. Infidels! calm restoring. Naval gaze.
Java's generational garbage collector doesn't leak memory unless you trap references like you mention in your first paragraph. Even then, it's not leaking memory in a traditional sense, you've just prevented the GC from being able to access and free the memory without crashing the application.
Mod me down, my New Earth Global Warmingist friends!
> This has thankfully prevented it from becoming the language of choice in major outsourcing and offshoring destinations
> like India, Pakistan and Vietnam
A quick perusal of iPhone-related questions on Apple's discussion boards, or on stackoverflow.com, would quickly cure you of this belief. A lot of people at the "bang the rocks together" level of expertise are trying to develop iPhone apps. People (and companies) go where the opportunity is.
I've been approached by one India-based organization to act as a "Public face" for them here in the states, so I know there are shops full of inexperienced iPhone developers in India who are pitching US companies on developing their "mobile strategy" for them.
This is generally a good point. Many common programming errors aren't handled any better in managed environments than native ones.
Interestingly enough, I've worked on a C++ app with a "CPU leak" bug. Some versions of wxWidgets on Linux (such as 2.8.10, which is the current stable release and packaged by many distros) have a bug where certain apps will eat CPU this way if left open but unfocused and idle. Audacity is one such app -- I'm an Audacity developer and none of us could figure out a way to work around the problem.
All one can really infer from that is Apple is in bed with big game studios.
Right, that's why the Mac is such a hotbed of game development!!!
Does it mean nothing to you that with a VERY cold start in relation to the game industry, that Apple has in fact drawn in many large game companies within just a few years? It's pretty obvious Apple is not in bed with anyone, the game developers were the ones who came to Apple when they saw users actually bought games on the device in droves.
As always the only thing getting game companies excited is money, not time between the sheets with one tech company or the other.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
You must be a terrible programmer (like the parent).
You can't cause a memory leak in Java by not doing something, you have to actively do something stupid to trap memory so it can't be collected.
Serious difference.
Mod me down, my New Earth Global Warmingist friends!
most but not all. Still the very idea that you can just take all your java apps and run it on Android is just wrong
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
In C, memory management is hard, but that means that people think about it.
So then how do you explain the countless C programs that have had and might still have memory leaks? Oh and all the buffer overflow errors. Or null pointer dereferencing. Most people tend to think that anyone writing C is actually thinking hard about these things, but in my professional experience and through the years of using many applications written in C, either open source or proprietary, I'd really beg to differ.
Agreed about the Eclipse UI. If you're going to do Android development, use Intellij IDEA, which has quite good Android support and is a vastly superior IDE.
"I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
Aren't a lot of developers making a lot of money as a direct result of the tight controls apple has placed on iphone apps?
Isn't that a good thing for indy developers and small companies?
Shouldn't devs be applauding apple's approach instead of trashing it at every opportunity?
Seriously, neither Android nor iPhone are all that great for serious development. They're both underwhelming platforms for real mobile development. Android has a leg up in many aspects as it embraces more open methods of development and more open standards, but when the dust clears, both platforms have been pushed to the forefront as a result of marketing hype.
There are better options out there, but most of us mobile developers who know there are better options have been herded along with the flock of sheep simply because we have to develop apps that the biggest flock of sheep will use or end up wasting our time and effort. Compared to more comprehensive and seriously powerful applications we used to write for older mobile OS's, the bulk of them these days are basically crapware.
"... a number of Android applications are offering practical solutions that unlock the power of a phone that's really a Unix machine you can slip into your pocket... Any Java developer familiar with Eclipse should be able to use Google's Android documentation to turn out a very basic application in just a few hours."
It also has wireless, and more space than a Nomad. The iPhone's defeat is imminent!
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
Just because they are free doesn't mean they aren't patent infringing!
That program doesn't seem to make a whole lot of sense to me. According to the article you linked to, you have to have *alread* created an app, put it on the market, gotten a good rating, and a lot of downloads. Stands to reason that if you have already developed a popular android market app, you must already have an android phone to test your app on? Why would you give a free phone to someone who already has one? What business benefit does that provide?
That sounds kind of like offering a free knife or pot to a professional chef, or maybe a free drill or reciprocating saw to a professional carpenter. They would already have their tools.
Giving free phones to developers who are not *yet* developing for the Android platform might make sense - say, giving them to interested iPhone developers to try to get them to port their apps to Android. Or perhaps to college students or other new programmers who code up some sort of app using the SDK emulator, but don't have a phone to test it on yet.
You can convert .class files with a tool called dx and you don't need to do it by hand.
But let me explain what I was thinking when I said "It won't look pretty". That could mean a text line output or some other Android interface. I think I should have been more specific and spelled out just how much work it will be if you're trying to duplicate some of the code that isn't available.
Since I am the only Indian who could really write code, you could be talking about me. But I don't seem to place you. Do you know me?
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
I don't think you understand how modern versions of the JVM or even .Net's CLR work. Most code can run damned near as fast as C/C++ counterparts. The benefits are less complicated memory management (to the developer), and a codebase that's more portable to different systems.
... take a look at some of the IronJS (dynamic language running under a managed engine) vs V8 (dynamic language under a C/C++ engine).
Code get's compiled as needed, then run.. once you've run through a segment of code, it's compiled, and runs as compiled code; said code is now compiled, so repeats run through the same compiled code again; just like code compiled in C/C++... Now, some of the underlying constructs have a slightly higher overhead than with an unmanaged language.. just the same, it's far from an "order of magnitude slower"
"How difficult is it to understand this concept?"
Indeed.
Michael J. Ryan - tracker1.info
Unfortunately, Java is a backwards language with zero interesting features whatsoever. The C++ you seemingly abolish allows degrees of polymorphism and modularity Java will never, ever reach. No, I am not talking about low-level C hacking. Look up generic programming in C++, for starters. Or the functional stuff you can do in C#. Or anything you can do in Haskell, which might be an academic language, but is the ultimate eye opener regarding the essential features Java lacks, such as a proper lambda, closures, first class functions, "real" generics. (Anonymous classes are only a very rough approximation to the first two.)
Yes, I have worked with Java for real. If possible, I use C++ or C# instead. Or Python, Ruby, Lua, ... almost any other language out there is more powerful than Java these days. Note that I am deliberately not including the virtual machine or the standard library in this - I am talking about the language only.
This sig does not contain any SCO code.
What is so difficult about it? Objective-C is very similar to Ruby. Ruby was promoted as the easier alternative to Java in the early Rails days. So how can someone pick of Ruby without much effort, but strugle to learn Objective-C, when they are pretty much identical languages? Even the major frameworks, Cocoa and Rails, share a lot of similar design patterns.
By that hyperbole, the OpenMoko Freerunner was also closed and thus no better than an iPhone.
Extremism will get you nowhere except ignored. You know there's a huge difference between "closed because the vendor wants it closed" and "closed because the vendors hands are legally tied."
I suggest pursuing the option you have, and getting the laws changed.
Eclipse appears to have significant memory leaks. After using it for a while it starts consuming a significant portion of my system memory and slows things down substantially. I need to restart it to get it running at a decent speed again.
If you're a Java developer, of course Android's Java is great for you. But saying that is better than the C on the iPhone is ridiculous. The proof is in the pudding: the iPhone's apps are much deeper and sophisticated because in many cases they are 90% desktop code, dropped in and create an interface.
It is the customers' perspective that matters. Far too often developers think the world revolves around themselves. It doesn't.
Is anyone else worried about viruses on Android? While I'm sure apple doesn't go too far to vet security, Google doesn't really examine Android apps much at all. I wouldn't be surprised if trojans, etc get distributed through the Android marketplace in the near future
PyObjC has a one liner description of how to convert an Objective-C call into a Python call and vice versa. It's not difficult.
The point is to get hobby devs (like me) who are stuck on older hardware up to developing for 2.0 and 2.1.
I do not read or respond to AC's. If you want a discussion, log in. Otherwise, don't waste your time.
I develop a fairly major app for iPhone, BlackBerry and Android.
As a developer that likes to tinker, the lack of root access to the iPhone offends me. It is like selling a fast car with a governor that limits you to 55 mph. The draconian signing certificates and provisioning profiles can be very frustrating. And the simulator SDK (not the simulator itself) is incompatible with iPhone development, which is ridiculous. That is to say, there are headers and libraries supported on the simulator but not the hardware, like someone might choose the simulator as a final release platform.
But that is about it. I have a few significant complaints about developing for the iPhone. None crop up on a daily basis. There are many enjoyable aspects about the iPhone. The hardware is consistent and reliable. The IDE is consistent and reliable. The device is responsive and predictable.
Compare that to Android and Blackberry, where dealing with the IDE, simulator and hardware are a daily ordeal. Java is slow. Eclipse is buggy. In the car metaphor, these things top out at 55 full throttle. And the idea that you have full access to a system from Java is kind of a joke. Android has done away with the application metaphor in favor of the Activity. The openness of Android seems really cool and will probably end up like the security nightmare that is IE6.
And can I just say that the Android naming conventions are painfully stupid. Everything has a catchy thesaurus name that bears little relation to the actual functionality. They may have cured my of my own anal naming conventions. Activity, Intent, Parcel, Arghh. Apple names are wordy, ugly, straight forward and very informative.
The documentation for all 3 is fairly weak. Apple dictates who can say what about everything, but even with that it is often easier to find helpful search results on iPhone related problems. I would say that Android wins for documentation overall.
Overall, developing on the iPhone is nowhere near as painful as Android or BlackBerry. The initial role out is worse on iPhone, but the daily grind is not nearly as bad. I kind of lumped Android and Blackberry together there, but Blackberry is really much worse than Android.
And the article mentions using existing Java code on Android. We ported from BlackBerry to Android and maybe 1% of the actual code made it across untouched. You would think, moving from one Java smartphone to another Java smartphone, that anything at all might share some commonality. But no. Even the core classes for arrays and maps are different. Only the strings survived.
Developing for webOS is perhaps even better for developers. Personally, I hate Java. I think I'd rather go through the pain of learning Objective C. I wasn't a big fan of JavaScript, either, until I started working with it for webOS apps. Now, with the PDK (plugin development kit) coming out, developers can write in C/C++ and access SDL for applications that need that extra oompf. The underlying Linux OS is readily accessible, moreso than it is on Android, I've been given to understand. There's a tremendous homebrew community out there creating patches, themes and more. Check out http://webos-internals.org/ if interested in seeing that side. And, with Palm-blessed sideloading of apps, developers can make their own way.
Author of Enyo: Up and Running from O'Reilly Media
I wish I hadn't commented in this discussion so I could mod you up. Also, I wish I had mod points.
XML causes global warming.
I had the same problem with my iphone pearl and was told it was because of memory shortage. Like when you go on the internet alot or something, Denta Smile Md
Not really. You don't have to actively do something stupid, you just have to not do something smart. Or use a library where someone didn't do something smart.
Anything that has back references can easily become uncollectible, and consequently so can anything that simply refers to other data embedded in a larger structure rather than making a completely independent (and time- and memory-consuming) copy of that data. And a library can have a dozen of those under the hood, where you'd never know about it.
i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
More correctly, it isn't that it becomes uncollectible, it is that you are wasting so much memory keeping so much more that you think you are.
Like, you may think you are only keeping an attribute and its value from an XML node, but what you are actually keeping is the entire node, in fact the entire XML tree, plus the complete text file it came from (buffered), plus a line number map, plus the string forms of each element, plus a cross-reference table just in case, plus a similar amount of information from every XML stylesheet or DTD associated with the document, plus their included DTDs, etc.
i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
and would only be interested in jailbreaking if it was a movie that starred Matt Damon. Developers like the app store, users like the app store, and what you don't like really doesn't matter to either group.
past. The iphone is actually a change from that. It's a platform of millions of people that have no problem tossing a few bucks at a game which shouldn't be a surprise given how much the iphone data plan is. But yea it must be bribes. That's the logical answer.
What is so difficult about it? Objective-C is very similar to Ruby. Ruby was promoted as the easier alternative to Java in the early Rails days. So how can someone pick of Ruby without much effort, but strugle to learn Objective-C, when they are pretty much identical languages? Even the major frameworks, Cocoa and Rails, share a lot of similar design patterns.
Try the other way around. Ruby is very similar to Objective-C.
I think it's not so much that C programmers aren't thinking hard about memory management, array bounds, etc. I think they _do_ think hard about them, but still get them wrong. And that's really the worst possible outcome: you lose productivity because programmers are forced to think about low-level details, and still get insecure and unstable software. C is a fine programming language, but I really don't get why people insist on writing their applications in it.
Please correct me if I got my facts wrong.
While Android is written in Java, the recommended way to program the GUI is using XML. That can be quite the stretch for someone that's never written a layout in XML (read: myself).
What a load of utter crap. Thats the least logical thing I've seen on slashdot in years, and that's saying a lot
I used to program in C/C++. The reason I think Java is a better language is BECAUSE it has less features.
In C, when you show me an excerpt of code, it tells me very little. I donot know the data types involved without finding the appropriate include files (they may have been redefined, typedef'd, etc). Half of the code I see may actually be macros even though they look like function calls, and half of the code you see (especially in include files) is not even relevant at all because it is not even compiled thanks to generous use of #if blocks (and they don't even bother highlighting the blocks with some proper indentation either).
Because C is so flexible, looking at a single source file tells me very little -- I have to make many assumptions. Too much things can be changed or configured, even at a compiler level. In contrast, when you look at a Java source file, you got almost everything you need to understand that piece of code. There's no macro's, redefinitions of common data types or code that is optionally included. An int is a signed 32-bit integer, on any platform. Even that little detail helps to avoid common pitfalls when mixing signed and unsigned arithmetic (everything is signed, deal with it).
Also, each Java file compiles to a single result. It is pretty much standalone useable. Java does not allow you to split things into multiple files willy-nilly, it actually enforces a common structure to all Java projects at a basic level. In C, every project does it in a new way, there's no standard. There's no naming convention. There's basically very little convention at all, at any level.
That is not to say Java is perfect, but less is more does seem to apply here. It gives the programmer less choices, which in turn makes code easier to understand and maintain. It's also strict, which makes later changes and refactorings much more controllable. Unlike a language like Python, where any project that spans more than a few pages can have subtle bugs just because you mispelled a variable.
This is an illusion. The inevitable consequence of a language with very little features is a considerably increase in code complexity, precisely because the language is ill-equipped to express more complex problems.
Case in point: sorting algorithms, containers, callbacks.
Please note that your comparison with C is a bad one. Do not compare Java with C. Compare Java with C++ (proper, modern C++, not "C with classes"), C#, Haskell, Ruby, Python etc.
This sig does not contain any SCO code.
If you make fart noises by hand, you're doing it wrong.
-dZ.
Carol vs. Ghost
And in E-macs you can do it with a single (shifted) key stroke.
-dZ.
Carol vs. Ghost
Of course I didn't read much of TFA. Then again, an article with comments like "While iPhone developers have found that one path to success is playing to our baser instincts (until Apple shuts them down), a number of Android applications are offering practical solutions that unlock the power of a phone that's really a Unix machine you can slip into your pocket" can't be very objective. Yeah, you don't like the iPhone. We get it. Now can we please get a developer who isn't obviously biased to compare the two platforms? Or at least one who can hide his bias for more than three paragraphs?
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
Making it easy for developers is not the key. Attracting the developers on key strategic apps is it. The number of apps in your store does not matter if you don't have the 5-10 apps that the user wants/needs.
I think that both Apple and Android have an app store that covers the needs of most users but the Apple store is still the most attractive right now. I have not browsed both extensively so at this point it's just the word to mouth about what I can or cannot do with the phone that would sell me on the iPhone.
Unfortunately, Java is a backwards language with zero interesting features whatsoever.
Other than the JVM, that is. Java sucks, but the JVM is the coolest thing ever, and it supports Scala, Groovy, JRuby, Jython, etc.
Java was great when all we knew was C++, but nowadays we have much better choices available. And we get to keep the one good thing that Java ever gave us.
an embedded device of different architecture CPU with an app that often interacts with the CPU
You're a little bit exaggerating :
- Up until now (apart for a few oddities like running Android on an OpenMoko thanks to Koolu), there are only 2 major CPUs running Android :
Ti's OMAP3 and Qualcomm's SnapDragon.
It's not that there dozen of radically different platform architecture (Unlike say Debian or Gentoo Linux distributions)
- TFA's point is about how development on Android is easy because enterprises can leverage their Java and Eclipse prior knowledge to target Android's Dalvik virtual machine. To rapidly prototype nice and simple application. In those circumstance yon don't even interact with the CPU directly. You produce byte code which will be then processed by android's bytecode interpreter (1.x) or JIT machine (2.x)
You'll really need to test your application on every Android phone under the sun if, and only if, you want to do complex assembly optimised routine (like a video SIMD&DSP-accelerated CODEC).
And generic App developpers should really consider sourcing some already made and ready solution, like a nice port of an open-source library which has been thoroughly tested.
In embedded programming, "it runs without faults on emulator" is getting about as far as "it passes validator.w3.org" in web programming: the fun with nasty bugs and hidden problems just began.
Yes, and ? In web programming, you can try to keep your design simple enough and generic, have it passes the validator, and you know it'll look more or less the same on lots of standard-compliant browser.
For several small scale project that's a strategy I've followed : make standard compliant, don't rely too much on clever hack, test it on Firefox and some KHTML/Webkit powered browser. It'll be *good enough* for lots of situations. Testing has showed that this strategy covers other standard compliant browsers like Opera - without needing to constantly test on it. And just fuck Internet Explorer. Yes, just fuck it. From the beginning, part of the specifications of the project are that it's not guaranteed to work on IE, specially older ones (well I'm in a field where this is actually possible). Problem solved.
Same goes for Android Apps : test them throughly in an emulator and perhaps 2 or 3 major devices. Chances are high that it will perform well enough on a few other, as long as they have default Androids installations following the official behaviour. For devices known to diverge widely in their behaviour, maybe state outright they are not supported (just publicly announce that OpenMoko are not officially supported)
You know what ? This has pretty much worked well for PalmOS devices. Developers tested them thoroughly on 1-2 devices, maybe fixed their creations based on feedbacks done by users on another 2 devices. And it worked for most people.
And that's although PalmOS PDA came with a crazy range of screen resolutions and colour modes, a large selection of OSes, from lots of different constructors, madr a major platforms change (the whole 4.x + Motoral to 5.x + ARM). Make sure your product doesn't rely on crazy hacks, follows standards and best coding practice as recommended by constructor, test thoroughly in an emulator and a subset of device, and you'll probably be OK for other too.
I personally use a piece of software (ePocrates - a medical database) on a PalmOS PDA which I'm pretty much sure was never tested by the developpers (Zodiac - a rare PalmOS power gaming console / PDA hybrid). But it just works. Because ePocrates doesn't rely on any complex hacks, and was tested against enough common devices.
I don't see why Android should be any different from that, specially as the OS is free (much more easy to setup emulators with every different version of it), uses a nice environment for execution abstracting lots of stuff (you don't need to get bare metal for simple apps, just use Java), and is open-source friendly (lots of ports of useful components and libraries - no need to reimplement complex CPU-sensitive stuff)
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
And Eclipse is pretty bad as Java applications go. It's known to eat tons of memory and CPU for doing very little. But I don't think that's a Java issue. There are some very bad design decisions at the root of Eclipse.
How do you know? Any statistics to back this up? Chances are good that some of the apps on your iPhone *were* developed in one of the countries you mentioned.
True, but the big difference is that in Java, you have wonderful portable tools such as VisualVM, greatly easing to find memory leaks.
Finding a memory leak under a C++ application can take days. In my previous job, we wrote an Java application of 700k+ lines and a C++ realtime portable core of 50k lines. We found memory issues in both, but fixing it in the core took 10 times the time to fix it in the Java one.
Why ? The tools are better and the differences with the OS are hidden by the JVM, so far less work on that side.
What a bunch of dip-shiat posers. First, Android apps are run on a virtual machine (yes, that's right, even on the phone). If you've actually cut code for Android, you would probably be familiar with the build/test cycle which consists of compiling and running on an Android Virual Device (AVD - an emulator that lets you simulate different phone configs) which comes with the SDK. The emulator supports multiple resolutions as well as multiple versions of the Android OS. Screen resolutions are really not that much of a challenge. Funky hardware (say, a totally bizarre, non-standard GPS chip) might be, but I have yet to run into a situation where the Android SDK doesn't provide an abstraction that just takes care of it for app development.
Here's a link to the Android developer documentation on the multiple screen resolutions. It just isn't that tough, and anyone who says multiple screen resolutions are either has never cut code for Android or simply is incapable of reading the manual.
Note to Mr. Buy A Lot of Hardware: Your code does not know the difference between being inside an AVD or running on a real phone. I think someone at your company has a fetish for gadgets and is tickling it at your expense.
Note to /. at large:RTFM before opening mouth, RTFM and you'll be amazed what you learn. For the n00bs: RTFM = Read The Fscking Manual. More for the n00bs: typing $man fsck is not what RTFM wants you to do.
Ironically Android has been designed to provide developers a way to write one application that can be supported by many devices. It's also open source, and the SDK (and built in emulator) is freely available. This means if you want to be an expert on Android, you can download the SDK, and EVEN WITHOUT OWNING AN ANDROID PHONE write your very own applications... or try to or whatever. Just stop acting like you know what you are doing or you are some mobile software development expert when you don't even know what some guy who just installed the SDK knows about 15 minutes into trying out the SDK. Sheesh. // Feel Better Now /. continues to be /.
/
-- $G