JAVA: What's the big deal?

Discuss anything and everything. Keep it clean (or else).
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

JAVA: What's the big deal?

Post by inxt-generation »

Why does it seem like everyone here is so against Java? I've played with it a bit, and it's not that hard :twisted: . What's the big deal?
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
aswin0
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: JAVA: What's the big deal?

Post by aswin0 »

I cannot speak for others but to my experience the Java language is just as easy to master as the various C dialects for the NXT. Setting up an environment to develop java programs i found difficult. This is mainly because there are different tools to edit, compile, link, upload, etc. The newest release of Lejos has a Windows installer that configures the environment. So things should be easier now.
Once you master java you will appreciate the richness of Lejos.
My blog: nxttime.wordpress.com
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: JAVA: What's the big deal?

Post by spillerrec »

Whether I like or dislike a language is not based on how easy/difficult it is to use, it is based on minor differences in the languages. I hate JavaScript and PHP, especially the latter, partly because they are too easy to start programming in. I really dislike that in PHP you can just create a new variable by using it, for example.

Anyway, stuff like this is religion and people constantly try to convince each other with no prevail. So don't listen to them and try it out and see for yourself whether you like it or not.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

Re: JAVA: What's the big deal?

Post by inxt-generation »

spillerrec wrote:Whether I like or dislike a language is not based on how easy/difficult it is to use, it is based on minor differences in the languages. I hate JavaScript and PHP, especially the latter, partly because they are too easy to start programming in. I really dislike that in PHP you can just create a new variable by using it, for example.

Anyway, stuff like this is religion and people constantly try to convince each other with no prevail. So don't listen to them and try it out and see for yourself whether you like it or not.
Yeah, that's true. I was just wondering because it seems as if whenever it's mentioned here, they go like ".....JAVA :x :evil: ", or something like that. I may start using Lejos for multiple NXT projects, because it's real easy to use BlueTooth with it. I've tried BlueTooth with RobotC, and I couldn't get it to work very well at all. But, then again, it's not unlikely that I was doing it wrong.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
bullestock
Posts: 27
Joined: 29 Sep 2010, 19:34
Location: Denmark
Contact:

Re: JAVA: What's the big deal?

Post by bullestock »

inxt-generation wrote:Why does it seem like everyone here is so against Java? I've played with it a bit, and it's not that hard :twisted: . What's the big deal?
Everyone? I thought it was only doc-helmut who hated Java.

Anyway, for the record, I like LeJOS.
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

Re: JAVA: What's the big deal?

Post by inxt-generation »

bullestock wrote:
inxt-generation wrote:Why does it seem like everyone here is so against Java? I've played with it a bit, and it's not that hard :twisted: . What's the big deal?
Everyone? I thought it was only doc-helmut who hated Java.

Anyway, for the record, I like LeJOS.
That's why I said "seems". I know that Doc doesn't like it, but it seemed to me that everyone got all :evil: when it was mentioned.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: JAVA: What's the big deal?

Post by pepijndevos »

Image

Nothing against Java though. I'm just not too happy with "everything is an Object", I prefer "everything is data, as code, as data, data as code, code as data, […] code with data, data with code"
-- Pepijn
http://studl.es Mindstorms Building Instructions
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: JAVA: What's the big deal?

Post by muntoo »

(Previous image from http://xkcd.com/801/)

And I am definitely not guilty of Java-bashing.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: JAVA: What's the big deal?

Post by HaWe »

it's a matter of bad experience I had trying to expand classes or objects or instances by different incapsulated methods of other classes or object implementations, e.g. when I once had to extend my rcx navigator robot class by own new additional methods and by the methods incapsulated in the comm class and in the behavior class (and finally by the bash into the garbage can class).

A frustrating never-ending story.

(For the following examples I wrote all out of memory and some things or other may be confused by terminology and I apologize for my googlenglish :)

for me a subject (I or you or a robot for which the program was written) is acting with an item.
I throw the ball into the basket.
I screw the light bulb into the socket.

The subject uses a procedure to achieve something with an item.

I haven't seen any object ball (well, maybe, someday there maybe will be) which has got his own methods
ball.lies
ball.rolls
ball.throw_into_basket
or a light bulb which can shine or srew itself into the socket like
LightBulb.shines
LightBulb.screws_into_socket

or any other item which is able to implement any intention by itself.

Of course I may have an object implementation for an instance myballrobot which has an incapsulated method of the class ballrobot
ballrobot.throw_ball_into_basket
and another object implementation for an instance mynavigatorrobot which has an incapsulated method of the class navigatorrobot
navigatorrobot.get_odometry_position

but e.g., because I've written my program for my single Robot I don't have to have a class of robots grabbing balls, raising arms and opening claws and implementations of robots grabbing balls, raising arms and opening claws and instances of robots grabbing balls, raising arms and opening claws
and other classes of robots avoiding walls, calculating positions, and finding paths and implementations of robots avoiding walls, calculating positions, and finding paths and instances of robots avoiding walls, calculating positions, and finding paths
and other classes of robots sending Bluetooth messages, receiving Bluetooth messages and controlling Bluetooth remote motors and implementations of robots sending Bluetooth messages, receiving Bluetooth messages and controlling Bluetooth remote motors and instances of robots sending Bluetooth messages, receiving Bluetooth messages and controlling Bluetooth remote motors,
and breaking my head how one class of robots or implementation of robots or instance of robots of one kind can achieve to do something of another incapsulated method of a class of robots or implementation of robots or instance of robots, and I have only 1 robot and not 10 of one kind and 20 of the other kind and fourhundredmillions of the third kind....

If I want my robot to be able to do something, I just write a suitable procedure and call it whenever I want or need to do it, or add another one if I want to - that's it.
So I prefer it to do it like:
procedure grabBall(){...}
procedure raiseArm() {...}
procedure openClaw() {...}
procedure OdometryPosition() {...}
procedure sendBTmsg() {...}
procedure moveBTRemoteMotor() {...}

That's the way my programs are: procedural, not objectural, and maybe you once will remember me when you will have to handle classes and object implementations and instances extending them by encapsulated methods of other classes or object implementations or whatever and ever...
(...not to forget about the exception throwing, or setting or changing paths to libs, classes, jar files.....)
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: JAVA: What's the big deal?

Post by pepijndevos »

I just noticed that the Lejos forums has more than twice as many members as this one. Considering that this is a melting pot of languages, and theirs only about Java, I would think some people like it.

Anyway, I just noticed it has classes for several painful things I was trying to do in NCX.
-- Pepijn
http://studl.es Mindstorms Building Instructions
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests