Interviews: Ask James Gosling About Java and Ocean Exploring Robots 87
James Gosling is probably best known for creating the Java programming language while working at Sun Microsystems. Currently, he is the chief software architect at Liquid Robotics. Among other projects, Liquid Robotics makes the Wave Glider, an autonomous, environmentally powered marine robot. James has agreed to take a little time from the oceangoing robots and answer any questions you have. As usual, ask as many as you'd like, but please, one question per post.
robots (Score:4, Interesting)
Do you plan on releasing any/all of the Wave Glider code under any sort of open source or not-for-profit license?
Re: (Score:2)
What would be the point? It isn't a word processor or some other standalone PC application. It's a tightly bound hardware controller - half of the "code" isn't in bits and bytes, it's out in the actuators and sensors. (Not that a tenth of the OSS community would even understand the problem domain.)
What JVM languages do you like other than Java? (Score:5, Interesting)
http://en.wikipedia.org/wiki/List_of_JVM_languages [wikipedia.org]
Checked vs. Unchecked Exceptions (Score:5, Interesting)
I'm a huge fan of checked exceptions (that is, exceptions that must be caught, or the method must specify that they can be thrown). My anecdotal experience is that checked exceptions have made my code more robust by helping me avoid mistakes, they are partially self documenting, and even save me time because I don't have to constantly check the documentation to see which exceptions are thrown.
However, I see a lot of hate for checked exceptions in the programming community. With the benefit of hindsight, what's your opinion on checked vs. unchecked exceptions? If you could do it all again, would you still put checked exceptions in Java?
Also, thank you for inventing the programming language I use all day every day. It's not perfect, of course, but I still consider it one of the best balanced programming languages out there.
Re: (Score:1)
Re: (Score:1, Insightful)
Aaand you *completely* (and deliberately) miss the point.
Yes, a Michael Schumacher can get fast to point B even in a Trabant. That doesn't mean that a better car is not a good idea!
In fact, your logic is stupid, because why deliberately give yourself a idiotic handicap? If you are good without checked exceptions, you are BETTER with them.
I bet you also prefer to write shell scripts in C... no wait, Assember... no wait, a set of morse switches hot-wired to the bus. BECAUSE HAXORZ.
It's not boolean. It's a flo
Re: (Score:1)
Actually in java you don't know if the code can throw an exception.
At least not in practice.
So I would rather have declaring throwing as optional and catching as optional... since in reality they are.
Re: (Score:1)
There's non-trivial overhead in exception handling. Even leaving aside the waste of developer time, it's more efficient to just test whether a given condition is going to occur than to have to wrap everything (often several layers deep, especially if you don't like automatic bubbling) in try blocks. It's one (of several) reasons that even JIT-compiled Java still performs notably worse than C++.
Re: (Score:1)
Oh dear, did I speak less than praisefully of somebody's favorite language? Haha, wow, so *sensitive*. I stated facts. Argue them if you want, but disagreeing with modpoints is just pure cowardice of somebody who can't back up their position.
For what it's worth, I code in both Java and C++ (and also C# and Python, plus Javascript and occasional other languages as the job requires). I'm not claiming that checked exceptions are either the Achilles' heel of Java performance, or that Java's performance is inade
Re: (Score:2)
However, I am claiming that checked exceptions are unneccessary, a waste of both developer and CPU time.
In my experience, checked exceptions save me development time. I don't have to obsessively check the documentation to see what exceptions might be thrown: the compiler (even better, the code editor in the IDE) tells me.
In addition, you haven't shown that checked exceptions waste CPU time. When it comes to modern JVMs, I suspect you're wrong.
When you have excessive numbers of checked exceptions that a function might throw...
Why would you have methods that throw an excessive number of exceptions? Wrap them with a common exception type and re-throw them. You don't lose the original exception
Re: (Score:1)
Notoriety: a boon or a burden? (Score:2, Interesting)
As you're known as the father of Java, has that been problematic when trying to figure out your career path? Did you feel as if you have to always use Java or be the main proponent behind its architecture? Or simply having that on your resume, restricted you to a certain level of project either within Sun or when exploring new opportunities such as your current job with Liquid Robotics?
Re: (Score:2)
It is fairly dated with last news back in 2009. If some effort is taken to update it, wouldn't it be better to have your invention used in a greater variety of platforms to solve the two forth-mentioned problems?
I C what you did there...
Innovation and Java Libraries (Score:1)
The official platform libraries provided by Oracle seem to be much more comprehensive in scope than, let's say, the C++ standard library. Is control by one company of such a vast swatch of library development a hindrance to innovation in Java?
The question on everyone's mind (Score:1, Troll)
Death Match (Score:5, Funny)
You're thrown into a gladiatorial ring. An audience of thousands watches your every move, eager for blood. Across the ring, Richard Stallman advances toward you, katana poised to attack. To your left you see a rack full of medieval weapons.
What weapon do you choose? Whose blood will be spilled upon the sand?
Foul! (Score:5, Funny)
Your post was highly insightful and on-topic, until you got to the part where you asked more than one question in a single post.
As usual, ask as many as you'd like, but please, one question per post.
Re: (Score:2, Insightful)
Thats not a katana in Stallmans hand dummy, its his dick.
Re: (Score:2)
How big is this ring? Is there a loaded crossbow on that rack? Or even a normal bow, already strung? A chu ko nu, if loaded, would be ideal. Never bring a sword to an archery duel.
Re: (Score:2)
Come on man, get off it now. I don' t understand this attitude that makes developers responsible for the fact that malicious or evil people spread vriuses, deface web sites, hack servers etc. What the fuck? By accruing pressure on developers for more secure software, we are completey ignoring the root problem. Worse, we actually encourage it, give it a certain validity.
It's not the developers that are bad,there's a bunch of people out there making the internet look like it's constantly under siege - which
Language(s) of Choice (Score:4, Interesting)
Life span of JAVA? (Score:5, Interesting)
In terms of code development, it is a long way to look back to the days of Pascal and VAX. Someday we likely will look back at JAVA in the same way. Have the limits of JAVA been reached and do you see that day of obsolescence as being sooner than later?
Re: (Score:2)
Language feature redesign (Score:5, Interesting)
Re: (Score:2)
Why stop at one? James, it's been nearly 20 years since Java was publicly released (I first heard about it at a conference in Dec 94). Can you tell us the top 5 to 10 things that you think could have been better done and wish future programming language designers will get right?
If he has any smarts, he'll rattle a long list: heck no language is perfect, and over the years one learns many things. If he doesn't he'll circle the wagons and answer "nothing".
Is there anything you would change? (Score:1)
Standard question, I know, but is there anything you would change about Java in hindsight? For example, don't you think that there would be no harm in having both a garbage collector and a free() function?
Re: (Score:2)
myFriends say I tooMuchJava() (Score:5, Funny)
public void dearMrGoslingHello() // seriously, I've done a lot of fun projects with it over the years!
{
justWantedtoTakeTheTime toSayhiAnd letYouKnow iUseYourLanguageLikeEveryDay. iReallyLike theCrossPlatformDevelopmentParadigmOfWriteOnceRunAnywhere(seriouslyItsTheBestAndThanks);
}
If you could change 1 thing about Java? (Score:1)
Autonomous Vehicles (Score:1)
It occurs to me that a small autonomous vessel would make a great "drug submarine". I'm not hanging that possibility on you. Someone will/has surely thought of it already. Do you see use of similar tech for "evil" being a problem in the near future?
JavaFX2 (Score:4, Interesting)
What are you thoughts on JavaFX2, especially towards its competition with HTML5?
And then... the future. (Score:3)
Autonomous Robot Liabilty (Score:2)
These free roaming autonmous world exploring robots are out in the wild and not confined to protected lab space.
The potential for crashing into sensitive reefs, fouling nets, bumping ships or people, all across national and international ocean space, seems to carry a liability issue that is hightened by the uncontrolled nature of the robot.
What liability issues are considered when releasing a robot and are there any control systems in place to avoid accidents that might lead to liability issues.
Re: (Score:2)
An easy way to get a factory builder facade factory is with a factory builder facade factory factory.
----
A problem I had to unfurl
My stomach it started to curl
A bad memory leak
Made me freak out and shriek
I’m just glad it’s not written in C++
Re: (Score:2)
You missed the point. He asked explicitly for abstractfactory builder facades.This the wayto get one:
1) ask the AbstractFactoryBuilderFacadeManager to return you an instance of himself, by calling AbstractFactoryBuilderFacadeManager.get()
2) ask the AFBFManager to point you towards an AbstractFactoryBuilderFacadeFactory
3) by reflection, investigate if that AFBFF proposes a method getFactoryBuilderFacade( boolean _abstract )
3a) if yes, call that method, you're done !
3b) if not, go back to your AFBFMan
Implementation language of Java platform (Score:1)
Do you ever regret the choice to implement the java runtime in C++ given the many security problems this has caused for Java ?
Re: (Score:1)
What alternative to C++ would you have suggested?
Oracle (Score:5, Interesting)
What do you think of Oracle's stewardship of Java so far?
Epic Win (Score:2)
Your thoughts on the Java Language Environment (Score:5, Insightful)
Under Sea Data Comms (Score:1)
I speak for all dolphins (Score:1)
when I say "Click click whistle click whistle whistle. Hail King Gosling!" Translated to Human "I for one welcome our new oceanic robot overlords. Hail King Gosling!"
use of Java (Score:2)
Google (Score:2)
Oracle as Java steward (Score:1)
Java Coding Style (Score:2)
Having had to read through some of your older code recently, StreamTokenizer.java [kickjava.com], it smacks of a terse 'C' style of coding. I love the way it uses byte arrays and bit masks to do it's tokenizing very efficiently. It's wonderfully subtle, but a PITA the read compared to more recent Java coding styles, that use longer more readable variable names etc. At times I wondered if it was the result of an all nighter/quick hack. I'm curious if you like/influenced the way Java's coding style has developed over the y
Java Closures (Score:1)
I know you've gone on record supporting closures in Java and have apparently supported them for a very long time.
I apologize then for being unfamiliar with the history behind Java closures, as it is badly documented on the internet (or my Google-Fu is weak, I don't know which).
So why do you think Java didn't originally have closures, why weren't they added instead of anonymous inner classes in Java 1.1, and what were the other roadblocks to Sun adding closures in the past.
Your thoughts on Android now (Score:2)
How (if at all) have your opinions or views of Android changed at all in the last 4 years?
Open Source Java (Score:2)
Back around the year 2000 people repeatedly asked you to make Java open source. Given what has happened since the Oracle acquisition do you regret not doing so back then?
Java Community (Score:2)
Google Stint (Score:2)
Kim Polese... (Score:1)