JAVA: What's the big deal?
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
JAVA: What's the big deal?
Why does it seem like everyone here is so against Java? I've played with it a bit, and it's not that hard . What's the big deal?
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
Re: JAVA: What's the big deal?
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.
Once you master java you will appreciate the richness of Lejos.
My blog: nxttime.wordpress.com
-
- Posts: 358
- Joined: 01 Oct 2010, 06:37
- Location: Denmark
- Contact:
Re: JAVA: What's the big deal?
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.
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/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
Re: JAVA: What's the big deal?
Yeah, that's true. I was just wondering because it seems as if whenever it's mentioned here, they go like ".....JAVA ", 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.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.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
-
- Posts: 27
- Joined: 29 Sep 2010, 19:34
- Location: Denmark
- Contact:
Re: JAVA: What's the big deal?
Everyone? I thought it was only doc-helmut who hated Java.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 . What's the big deal?
Anyway, for the record, I like LeJOS.
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
Re: JAVA: What's the big deal?
That's why I said "seems". I know that Doc doesn't like it, but it seemed to me that everyone got all when it was mentioned.bullestock wrote:Everyone? I thought it was only doc-helmut who hated Java.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 . What's the big deal?
Anyway, for the record, I like LeJOS.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: JAVA: What's the big deal?
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
http://studl.es Mindstorms Building Instructions
Re: JAVA: What's the big deal?
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: JAVA: What's the big deal?
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.....)
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.....)
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: JAVA: What's the big deal?
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.
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
http://studl.es Mindstorms Building Instructions
Who is online
Users browsing this forum: No registered users and 1 guest