Go to Post The dog-gear! Do u even shift bro? - WileyB-J [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-11-2010, 11:07
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 333
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Java vs C++

The JVM tends to be rather memory hungry. The reason there's no JRE for the Arduino is that Java simply takes too much RAM to run on the memory footprint of an ATMega part.

There are some Java implementations that are lean. The Dalvik VM found on Android platforms is one example. However, that VM uses a just-in-time (JIT) compiler (Android 2.2+) and a register-based VM rather than Oracle's stack-based VM. The register-based VM is more efficient and better suited to JIT compilation. However, these are the very reasons that Oracle is suing Google. Also, Oracle seems to be backing out on their support for open source Java solutions (just ask the Apache folks). So, the future of Java as anything other than a proprietary platform is in question at the moment.

On the other hand, C/C++ has been a standard for embedded development for almost 30 years and doesn't seem to be going away any time soon. In fact, most of the JVMs are written in C/C++. If limited memory footprints are in your future, then Java is not the solution.

All that being said, Java tends to work just fine for FRC robots. You're typically not running long enough for the garbage collection cycle to become an issue, and 64MBs of RAM is really quite a lot for many applications. The other advantage of Java is that it's the language used on the AP exams. So, many of your team may already have some Java experience.

I think it was summed up earlier in this thread, you go with what your team may already have experience with. C/C++ execution is arguably faster than Java, but FRC competitions are typically not won or lost on a microsecond scale. The additional complexity of C/C++, while it may make them arguably more employable in the embedded marketplace, can be daunting for first-time developers.

HTH,

Mike
  #2   Spotlight this post!  
Unread 27-11-2010, 11:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Java vs C++

Quote:
Originally Posted by taichichuan View Post
The JVM tends to be rather memory hungry. The reason there's no JRE for the Arduino is that Java simply takes too much RAM to run on the memory footprint of an ATMega part.
Yeah, I know. I was talking about a cross-compiler (with a smart linker), not a VM.

Probably not a big enough market to justify the development expense. Maybe there are some legal issues as well.



  #3   Spotlight this post!  
Unread 27-11-2010, 12:54
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,363
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Java vs C++

This isn't for FIRST but, Microsoft has the .NET Micro Frame work. I've been playing with these products.
http://www.tinyclr.com/
C# is similar to java and It's nice to plug a joy stick into a controller and have a device class at your disposal. On the other hand things that require interrupts and timing like quadrature encoders are more of a problem. Playing with a 70 mhz arm 7 with out absorbing over 1000 pages of chip manual is nice. Visual studio express C# is free and not to bad a environment. This also allows people who have no micro controller experience but .net talent to dive into micro's with some familiarity.
  #4   Spotlight this post!  
Unread 27-11-2010, 16:04
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,392
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Java vs C++

There have been lots and lots of posts about the C/C++ vs Java, the search bar is your friend. I've been in the software business for a long time, so in the last decade I've probably read 1.2 million articles and posts on the same subject.

Given a choice of all the software out there at this point I'd do either the Lua or Python implementation, most likely the Lua one since I have experience with Lua in other applications.

Reasons: the long download and build times for Labview, the concept of doing a FTP download and having code ready to run is good.

Being able to write short modular code helps. I've never been happy with the way Labview code is intertwined.

All I can say for sure is "Know the Language You are Writing In Before Build Season Starts". January is not the time to learn a new language, new environment, new way of doing things.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #5   Spotlight this post!  
Unread 27-11-2010, 16:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Java vs C++

Quote:
Originally Posted by Foster View Post
in the last decade I've probably read 1.2 million articles and posts on the same subject.
329 articles per day, 7 days a week, 52 weeks a year, for 10 years



  #6   Spotlight this post!  
Unread 27-11-2010, 16:21
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,392
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Java vs C++

Quote:
Originally Posted by Ether View Post
329 articles per day, 7 days a week, 52 weeks a year, for 10 years
So I'm a busy guy that reads pretty fast and have had high speed internet connections for a long time.

Quick Google of Java vs C++ gets "About 39,500,000 results" so I've clearly only read the tip of the iceburg.

__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #7   Spotlight this post!  
Unread 27-11-2010, 16:35
pacoliketaco's Avatar
pacoliketaco pacoliketaco is offline
Alumni
FRC #1807 (Redbird Robotics)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2005
Location: Pittsburgh, PA
Posts: 119
pacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to beholdpacoliketaco is a splendid one to behold
Send a message via AIM to pacoliketaco Send a message via Yahoo to pacoliketaco
Re: Java vs C++

As a current meche student, id say go with java. im taking a class in c right now, and its not all that bad, but learning pointers took me and most of my class quite awhile, and to be honest they still confuse me sometimes. i took java last semester, and had no difficulty with anything we did in that course. now this is just my viewpoint from an outside-frc stance, but i still like java more. but as has been said before, go with what you are more comfortable with, thats going to make the biggest difference. dont waste time to learn something you dont have to.
__________________
Pace Nalbone
Carnegie Mellon University
Mechanical Engineering Class of 2013

2009 NYC Winner - 56 and 1796
(2009 Regional Record: 18-0-7 wins/ties/losses)
  #8   Spotlight this post!  
Unread 27-11-2010, 22:19
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Java vs C++

You had me until ...
Quote:
Originally Posted by pacoliketaco View Post
dont waste time to learn something you dont have to.
Not sure what you intended to say, but in my mind, it is far better to learn about several approaches and make an informed decision, than to assume what you already understand is best.

Greg McKaskle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallelism in Java Egg 3141592654 Java 4 01-04-2010 17:21
Android Java Team 1708 Dave Java 2 18-01-2010 22:35
Java team1512 Java 2 21-10-2009 06:36
Java vs. C++ nickmagus Programming 3 05-09-2009 19:23
**FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** Pjohn1959 Programming 37 31-08-2009 15:55


All times are GMT -5. The time now is 03:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi