Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SockRolid

macrumors 68000
Jan 5, 2010
1,560
118
Almost Rock Solid
Android is only a temporary step anyway

Google apparently got their own "Dalvik" JVM variant when they purchased Android Inc. in 2005. And Dalvik is the real problem. Not the use of the Java language itself. Dalvik does not use any licensed Sun / Oracle Java technology, so therefore it is a competitor to Sun's Java Virtual Machine. And thus Google is violating the Java licensing agreement (or so Oracle seems to think).

But whatever. Sergey Brin of Google stated publicly at this year's Google I/O conference that Chrome and web apps are Google's ultimate goal. Android and its native apps are just an interim step.

So all you "normal" Java weenies can sleep soundly. It's only the Fragdroid crowd that needs to worry. (As if they didn't see Chrome and web apps on the horizon anyway.)
 

hwhalers

macrumors regular
Nov 23, 2009
226
0
Sergey Brin of Google stated publicly at this year's Google I/O conference that Chrome and web apps are Google's ultimate goal. Android and its native apps are just an interim step.

If they get smacked down here, the trust level for their future OS products would be microscopic.
 

marksman

macrumors 603
Jun 4, 2007
5,764
5
This sounds like corporate politics - wonder if this is under encouragement from apple - do apple/oracle share board members?

j

I don't know if they do but Ellison seems to at least be a fan of Apple, and I think in this Apple/Google war, he is clearly taking the side of Apple... so this could just be them getting into the fray a bit and trying to help throw Google off their game.
 

Bytor65

macrumors 6502a
Feb 10, 2010
853
228
Canada
I'll admit I sometimes find Java maddening, but it's only because I first learned C++, and by extension, Java (aka: C-plus-plus-minus-minus ;)) sometimes seems needlessly crippled or held back. The languages you master first have a tendency to color your opinion of languages you master later on.

I think that is definitely a factor. A lot of java complainers seem to prefer dynamically typed languages which are what a lot of scripting languages are. Perhaps they started writing scripts.

Personally I don't mind the very small overhead of declaring variables. Most of my career is spent in large code bases and static typing aids readability/maintainability IMO and you get potential performance benefits form doing type checking at compile time.

Whipping of a small script, sure have dynamic typing, but I can't imagine anything worse than trying to maintain large code base in PHP/Javascript which is both dynamic typed and weakly typed. Anything can be used anywhere and assigned to anything (shudder).
 
IANAL, but I can't see how all those bright brains at Google thought they were going to get around this.

Possibly they sweat buckets to re-invent in a non-infringing manner those systems covered by patents. If you don't like the terms of someone's license, you are still free to invent your own solution to get to the same end-point.

Google's lawyers presumably thought they were different enough to be non-infringing, whereas Oracle's lawyers have presumably found a broad enough interpretation of an overlap to think there a chance to bring home some serious cash.
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
I think that is definitely a factor. A lot of java complainers seem to prefer dynamically typed languages which are what a lot of scripting languages are. Perhaps they started writing scripts.

Personally I don't mind the very small overhead of declaring variables. Most of my career is spent in large code bases and static typing aids readability/maintainability IMO and you get potential performance benefits form doing type checking at compile time.

Whipping of a small script, sure have dynamic typing, but I can't imagine anything worse than trying to maintain large code base in PHP/Javascript which is both dynamic typed and weakly typed. Anything can be used anywhere and assigned to anything (shudder).

I like declarations, for code of any size and complexity. I 'use strict' when I use Perl, for example. Here's my essential problem with Java, as an A/B:

A- Its libraries are a mess. Handling dates, for example, is approximately 3 orders of magnitude more effort (read: time and expense) in Java than in any of the languages that you keep trying to ghetto-ize by referring to them as "scripting" languages. If a "scripting" language just won't do (though there are fewer and fewer situations where this is true anymore unless you're talking embedded), then even C has more coherent libraries for it. That's just one example, I could trade "dates" for a dozen other things.

B- Its object model is half-baked. If you really need objects, then you need multiple dispatch. That's an overgeneralization, but the exceptions are few and far between. Virtually every Java application of more than X lines (fill in a number that's "big") makes extensive use of the visitor pattern to overcome this lack. A direct result is increasingly poor readability and maintainability, as well as lower quality based on the truism that the more lines of code you have, the more bugs you're going to introduce. Note that I'm not talking about syntax here, I'm talking about reinventing the wheel.
 

MacFly123

macrumors 68020
Dec 25, 2006
2,340
0
This sounds like corporate politics - wonder if this is under encouragement from apple - do apple/oracle share board members?

j

Larry is a good friend to Steve...

Yes he is good friends with Steve. Here is another possibility:

http://www.engadget.com/2010/08/10/ce-oh-no-he-didnt-larry-ellison-likens-hp-board-to-idiots-a/

HP is about to make an entrance into smart phones with WebOS!

Either way Android is pissing me off. I don't mind the competition at all. I do mind Google's archaic thinking and how they are screwing up the mobile computing revolution!

The longer you wait to get the iPhone on other networks Steve the more ground Google will gain! It has already gained WAY TOO MUCH from what would have been iPhone owners had they had the chance! :mad:

Q: What's the difference between Larry Ellison and God?
.
.
.
.
A: God doesn't think he's Larry Ellison!

Haha nice! :p
 

mdriftmeyer

macrumors 68040
Feb 2, 2004
3,864
2,089
Pacific Northwest
I like declarations, for code of any size and complexity. I 'use strict' when I use Perl, for example. Here's my essential problem with Java, as an A/B:

A- Its libraries are a mess. Handling dates, for example, is approximately 3 orders of magnitude more effort (read: time and expense) in Java than in any of the languages that you keep trying to ghetto-ize by referring to them as "scripting" languages. If a "scripting" language just won't do (though there are fewer and fewer situations where this is true anymore unless you're talking embedded), then even C has more coherent libraries for it. That's just one example, I could trade "dates" for a dozen other things.

B- Its object model is half-baked. If you really need objects, then you need multiple dispatch. That's an overgeneralization, but the exceptions are few and far between. Virtually every Java application of more than X lines (fill in a number that's "big") makes extensive use of the visitor pattern to overcome this lack. A direct result is increasingly poor readability and maintainability, as well as lower quality based on the truism that the more lines of code you have, the more bugs you're going to introduce. Note that I'm not talking about syntax here, I'm talking about reinventing the wheel.

Gossling wasn't permitted to legally rip off Objective-C, after the Openstep initiative broke down with a battle between Sun wanting all hardware sales and asking NeXT to cut the cost of Openstep. I particularly enjoyed that day when a few friends at Sun having lunch with us NeXT folks found the entire peeing contest a big waste.

Gossling had several ex-NeXT engineers put as much Objective-C into Java as he could but kept that fugly C++ syntax and other violations of true MVC Smalltalk OOA/OOD so as to be considered a middle ground.

I've never enjoyed learning Java. Objective-C has always been enjoyable. Hell we even gave everyone modern syntax, but when you get used to selfDocumenting:syntax you eventually skip the modern and mixed with C/C99 it just works.

The single biggest waste, in my mind, was when Sun bought Lighthouse Design, all of it's IP and applications only to leave them languishing in the dust. They easily could have been a big developer for Apple but chose to drive that Java mantra into every thing they could possibly sell.

They drove the company into the ground and Oracle got it for a song.

Solid Hardware, OS and yeah that Java with MySQL.

Oracle can switch tomorrow to Objective-C, C++ or even C# for it's solutions, if it wanted to do so.

However, they have huge contracts with Java in the enterprise and should vehemently defend their IP against anyone bypassing them in the Embedded space.
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
Whipping of a small script, sure have dynamic typing, but I can't imagine anything worse than trying to maintain large code base in PHP/Javascript which is both dynamic typed and weakly typed. Anything can be used anywhere and assigned to anything (shudder).

If you can't responsibly take care of your own variables, you shouldn't be programming. Frankly. Taking typing as an assurance of anything is a terrible, terrible idea. False security.
 

saltyzoo

macrumors 65816
Oct 4, 2007
1,065
0
Just a small vent. I used Oracle everyday, all day for about a year. Times I was ready to walk to and put my foot through the server that was hosting my current login.

Oracle databases are by far the best choice if you are doing serious high TPS volume. I'm guessing that you were either 1) using a space shuttle to drive to the local grocery store (a simpler database solution may have worked better for you) or 2) were running Oracle on a windows server (in which case the problem isn't really Oracle).

That said, every other product Oracle makes is pretty much garbage. I still don't include Java in that statement because Oracle hasn't done anything to screw it up since they bought it.

And, to clarify for some people that seem to be confused, if you write Java code you do not have to pay Oracle to run it. The issue is modifying the java JVM for commercial purposes without permission / licensing.

This will be an interesting one to watch for certain.
 

saltyzoo

macrumors 65816
Oct 4, 2007
1,065
0
If you can't responsibly take care of your own variables, you shouldn't be programming. Frankly. Taking typing as an assurance of anything is a terrible, terrible idea. False security.

ROTFL Thanks for the laugh. Don't ever send me a resume. ;)
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
ROTFL Thanks for the laugh. Don't ever send me a resume. ;)

Feel free to explain why, exactly, you think static typing saves you from needing to keep track of what your variables are actually doing? Or is it easier to just stay ignorant, keep producing unmaintainable code, and laugh anonymously on forums? :)
 

Bytor65

macrumors 6502a
Feb 10, 2010
853
228
Canada
If you can't responsibly take care of your own variables, you shouldn't be programming. Frankly. Taking typing as an assurance of anything is a terrible, terrible idea. False security.

Our code base is > million LOC (multi-country, mult-site development). My small portion of that code I understand very well. But we are always learning/changing code written by someone else.

I would find a massive code base of other peoples weakly typed, dynamically typed code a major headache to sort out. I would prefer variables to be declared and not have them be holding different types from section to section of the code.

It is a question of readability/maintainability for huge unfamiliar code bases.
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
Our code base is > million LOC. My contribution is small. We are always learning/changing code written by someone else.

I would find a massive code base of other peoples weakly typed, dynamically typed code a major headache to sort out. I would prefer variables to be declared and not have them be holding different types from section to section of the code.

It is a question of readability/maintainability for unfamiliar code.

The concern is valid, but static typing doesn't solve your problem. It's part myth, part tradeoff, and part based on what you're used to.

The myth first: In ten years of working on Perl codebases of tens of thousands to over a million LOC, I've seen less than one bug *per year* that arose from a type issue. If the code doesn't suck, miscellaneous variables aren't persisting beyond a very limited scope. In that limited scope, people just don't make "type" errors very often, because you can see at a glance what you're doing. If we're talking about structures and objects that are used throughout the program, then a coder who is so unfamiliar with them that she is going to make type mistakes with them... well, type is the least of your worries.

The tradeoff: Yes, static type checking at compile time can point out problems. If you're doing unit tests, which you of course are, you'd find them just as quickly (probably more so, because you won't be doing a monolithic compile) with a dynamic language. But let's set that aside. Assuming there is some benefit, what's the tradeoff? You sacrifice clarity and readability throughout your code by having to use some mixture of templates and complex patterns to massage your objects and data into the necessary formats. This is a huge, huge productivity and quality hit, again because the less straightforward your code is, the more bugs you're going to have. Weak typing (as distinct from static vs. dynamic) is also a tradeoff, in that implicit casts make code far more readable *if* you enforce good code conventions (see above about scoping concerns, for example).

The "what you're used to" is self-explanatory.
 

milo

macrumors 604
Sep 23, 2003
6,891
523
The only way for Google to settle this that I can see would be to use the standard Java JVM in place of their Dalvik VM, and at that point it wouldn't be Android anymore.

Why can't google just license and use Java? Or make it an optional add on that third parties can license and include?

Certainly, Dalvik is not the only alternative JVM out there, is it?

If there are others, do those others follow the license agreement or violate it?
 

edoates

macrumors 6502
May 22, 2006
299
7
Q: What's the difference between Larry Ellison and God?
.
.
.
.
A: God doesn't think he's Larry Ellison!

Uh, while on the subject of intellectual property, that's the title of a book by Mike Wilson about Larry, and he got it from an early employee of Oracle, and he rightfully attributes the joke to that person.

So, please at least put your ... borrowed humor in quotes.
 

edoates

macrumors 6502
May 22, 2006
299
7
"We have both SQL Server and Oracle. For high volume systems, the read consistency model that Oracle uses is far more scalable than the SQL Server model where read locks block updates which block other readers which block updates, ad nauseam. There is a reason so many high volume SQL Servers are architected with transactional replication to a separate reporting server."

Sounds like MS hasn't changed that part of SQL Server since they bought it from Sybase in the '90's. Oracle implemented distributed update with row level locking back on Oracle 7 in 1997.

MySQL is fine for a smallish project; it is NOT an enterprise solution. For that, Oracle or DB2 is needed.
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
MySQL is fine for a smallish project; it is NOT an enterprise solution. For that, Oracle or DB2 is needed.

I'm always curious what an "enterprise solution" is. As far as I've been able to discern, it means "anything that uses PeopleSoft or Oracle and requires a team of 40 cursing consultants to get the uptime to four eights."
 

edoates

macrumors 6502
May 22, 2006
299
7
I'm always curious what an "enterprise solution" is. As far as I've been able to discern, it means "anything that uses PeopleSoft or Oracle and requires a team of 40 cursing consultants to get the uptime to four eights."

Enterprise is something you bet your business on, and generally refers to databases in the trillions of rows and thousands of transactions per second. Oh, and distributed over many servers.

I us MySQL to keep track of my CDs; Oracle gets used to keep track of social security records.
 

pooryou

macrumors 65816
Sep 28, 2007
1,332
65
NorCal
Feel free to explain why, exactly, you think static typing saves you from needing to keep track of what your variables are actually doing? Or is it easier to just stay ignorant, keep producing unmaintainable code, and laugh anonymously on forums? :)

I thought static typing was mainly for the compiler to make it easier to catch errors and for optimization.
I don't think it has all that much to do with code readability.
 

pooryou

macrumors 65816
Sep 28, 2007
1,332
65
NorCal
Sad reflection to see this article rated (175 Positives; 950 Negatives) on the home page.

I guess people just see 'lawsuit' and think 'bad'.

Google knew what they were getting into and thought they could get away with it because Sun were weak.
Oracle is not weak and now Google will have to reap what they have sown.
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
Enterprise is something you bet your business on, and generally refers to databases in the trillions of rows and thousands of transactions per second. Oh, and distributed over many servers.

I us MySQL to keep track of my CDs; Oracle gets used to keep track of social security records.

That was a joke. I find the name amusing because it implies two things:

1. That smaller businesses aren't "enterprises" and
2. That the software is mostly functional, which is mostly isn't until that team of consultants comes in, and then it sort of is. Enough, anyway, although interestingly most "enterprises" that use "enterprise" software are the ones whose customers have little choice and thus have the luxury of saying "tough titty" about the frequent downtimes and other problems...
 

coleridge78

macrumors 6502a
Jun 27, 2007
634
0
I thought static typing was mainly for the compiler to make it easier to catch errors and for optimization.
I don't think it has all that much to do with code readability.

Everything affects readability.

Static typing started because the toolchain did not exist to efficiently and intelligently handle dynamic typing. It wasn't specifically "chosen", it was just a necessity. You could call it optimization, but that'd be somewhat misleading--there really wasn't much of an alternative. By the time dynamic typing was a going concern, enough people were already invested in static typing that it was the accepted "right" way to do things.

Egregious oversimplification but close enough for this.

Static typing absolutely destroys the readability of OO code of any complexity, because of the finagling needed to fake multimethods and a number of the common design patterns.

If objects aren't a great concern in a given application and you're using plain old C, I find it matters a lot less. Then strong typing often becomes a concern for readability, depending on the class of application, because you can end up with endless morasses of casting.

But static typing in OO code is a fool's errand.

ETA: I'm talking about strictly-enforced static typing. One nice thing about ObjC is that any object can have a static type, or the "magical" dynamic type of "id". So you can have your static typing where it makes you feel better, and use "id" for the other 70% of the time when you really need it and would have to hack up a bunch of godawful template code in C++.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.