When to use what language and why

Pages: 1234
Rapidcoder: I agree with you when using Java in Linux. Initialization can be used by the compiler to optimize certain operations. In fortran (IFORT) if you initialize the array the code will run in a fraction of a second since the compiler knows the values and it knows that no value from the result is subsequently used (with the -fast flag). Therefore, it just ignores the whole operation!

Java is certainly worth a serious look for numerical applications.

Thanks
BTW: Fortran can optimize the code better than both C++ and Java, because, regarding the numerical stuff, it is a higher-level language. The compiler understands concepts such as "complex numbers", "matrices", it knows the laws and it can make stronger assumptions, thus applying optimisations that are out of the reach of standard C/C++/Java/C# compilers, which work mostly on the scalar level.

This is similar to SQL. Write a complex SQL statement, then create its equivalent in any language as C or C++, and except the one particular case your C++ code is probably tuned to, the SQL will perform probably much better.
Last edited on
Arguing this kind of thing is worthless. You have to look at where languages are actually used mainly for, and what it implies that it is good for:
Fortran: Supercomputing, NSA, NASA, IBM labs. => super fast math, large amounts of numerical data.
C and true descendants: High-performance video games, all major operating systems, device drivers, graphics libraries. => talking to hardware, low level blitting and polygon pushing.
Perl/Ruby/Python/PHP: Server-side Web software, quick hacks, somewhat hacky desktop software. => extendability, easy to make and modify, talking to other programs, dealing with strings.
Flash: Making cool games and animations. => multimedia, doing video and audio portably.
Java: Teaching in not so good schools, stupid applets on educational web sites, bad video games, and some desktop software. => What?
@rocketboy9000, I mostly agree, except that:

Flash: not only games and animations, Flash is very popular for video streaming.

Java: everything you mentioned for Fortran and additionally: processing large amounts of data from LHC at CERN, critical real-time on-board control systems at Boeing (surprised?) and probably all domains previously targeted by Ada, embedded software (BlueRay, TVs, Smart Cards, xero machines), corporate database applications, mobile phone applications, big web apps, real time trading systems, and many many more.
Last edited on

Java: everything you mentioned for Fortran and additionally: processing large amounts of data from LHC at CERN, critical real-time on-board control systems at Boeing (surprised?) and probably all domains previously targeted by Ada, embedded software (BlueRay, TVs, Smart Cards, xero machines), corporate database applications, mobile phone applications, big web apps, real time trading systems, and many many more.


Do you have reference confirmation that Java is used even on real-time on-board control systems at Boeing ? From what I know airborne IT systems are pretty much dominated by Ada. Any flaw in the software can bring down an aircraft (of cuz manual over-ride is built in) !!!

Until the day I can see software built with Java deployed on rockets, airplanes, ships, missiles, radar, signal sets, GPS, compass, weather control, earthquake monitoring, volcano monitoring, tsunamis,tyhpoons monitoring etc etc etc critical systems, I have my doubts.
http://www.defenseindustrydaily.com/boeing-selects-software-for-jucas-x45c-01413/


X-45C UCAS

COTS Journal reports that Boeing has selected the Aonix PERC Java J2SE-based, real-time embedded Virtual Machine (VM) for the Joint Unmanned Combat Air Systems’ (J-UCAS) X-45C program.

The multi-billion dollar J-UCAS program is a joint Defense Advanced Research Projects Agency (DARPA), U.S. Air Force and Navy effort to create UAVs deployable from land bases or aircraft carriers, with stealth characteristics and a range and weapons load that approaches current manned fighters. Both Boeing (X-45C) and Northrop-Grumman (X-47B Pegasus) are submitting and testing designs, but all J-UCAS platforms will employ a Common Operating System (COS) integrating the system components.




http://cdsweb.cern.ch/record/768584/files/WEPLT037.pdf

The Technical Infrastructure Monitoring (TIM) system
has been designed and is being implemented as the new
control system for CERN's technical services. This
control system is being built on industry standard
components, industrial PLCs and enterprise server
hardware, using the Java 2 Enterprise Edition (J2EE). The
TIM project will use J2EE technology, notably Enterprise
Java Beans and the Java Message Service
, to develop a
highly available, reliable, scalable and flexible state-ofthe-
art control system.
Last edited on
Thanks for the link rapidcoder. However what the information say is about the selection but what I want and I guess the world public want to see is the actual implementation performing without flaw in real action in the real world.

How often we hear news of good new technologies or new solutions adopted by well-known organizations only to fizzle out in the end ?

I am the person who prefer to see the actual implementation rather than hear or read the good news of what is going to be implemented but not yet implemented. For all we know, the intention was good but as the project progresses, date-lines start to shift due to difficulties encountered during the undertaking.

I believe US certain military projects date-lines for delivery keep slipping up and budget over-run during the implementation phase.

Conclusion: Until I see Java deployed and used successfully without *major* flaw in real action in real world, I believe I have the rights to remain skeptical on it's capability :P
closed account (S6k9GNh0)
Boeing obviously believed that the networking capability, security and portability of the Java language made it a good fit for large-scale networked applications such as J-UCAS.


This seems to be a pretty biased article... Java isn't anymore secure or networking capable than the underlying hardware and use of code itself, no? In other words, neither has to do with Java itself. And I can't help but wonder how "proven" it is. Not sure how many times I've heard that there was "proven" medice or "proven" products that were considered dangerous and/or recalled. I kinda agree, they don't give us any hard evidence, I don't see why we should trust that crap. Also, please note that its an embedded hardware. Isn't the debate about the PC version of the JVM?

Did you notice the mention of C++ in the second article?
Also, please see: http://www.javaworld.com/javaworld/jw-07-2001/jw-0727-enterprisejava.html

Java can be useful in complicated situations. But in the end, its not much more than that what is already provided except for given portability that relates to its reliability and simplifies things. Please note though that it doesn't perform the hardly impossible and its not a miracle cure.
Last edited on
Java can be useful in complicated situations. But in the end, its not much more than that what is already provided except for given portability that relates to its reliability and simplifies things. Please note though that it doesn't perform the hardly impossible and its not a miracle cure.


I think there exist a group of developers who believe a SINGLE programming language is able to do ALL software systems across industries/domains etc etc. I think that is an ideal but hard to achieve in reality. It is like searching for the holy grail :) (I know Indiana Jones found it but that is fiction and not reality isn't it? )

Time has proven again and again that there is no single programming language that can do all. Even if it can, is it the best fit for that task ? E.g global search and replace using regular expression I believe scripting languages still is a better fit than C++ or Java. Web-pages fancy and interactive effects still belong to CSS, Javascript domain rather than C++ or Java.
@sohguanh: I agree. There is no SINGLE programming language for all the purposes. That is why they use Java and C and probably some other languages like Ada.

@computerquip:
Java isn't anymore secure or networking capable than the underlying hardware and use of code itself, no?


It is more secure than unmanaged languages because of automated memory management, strong type system, well specified threading model and no undefined behaviour. Several bug classes are not possible. There were cases in history where buffer overrun errors brought down the whole spaceship or spaceprobe. The underlying hardware and OS is usually a smaller and simpler thing than the application software, so the "risky" area where critical bugs may occur is narrowed. Of course, Java doesn't guarantee there are no severe bugs - because bugs can happen in any language.

On the other side, the garbage collector may be some problem for the "real-time" part, but they don't use customer-level VMs, but commercial RTJS JVMs, so they have probably solved it. Also, raw performance in these systems is not critical. Safety and reliability is.

As of working example: the CERN's LHC monitoring system is up and running. In Java. I know some of the students that worked there on summer projects, and they confirmed using JEE there.

So, Java is probably not a miracle cure, but it is also not a language for "stupid applets and bad video games" only.
Last edited on
As of working example: the CERN's LHC monitoring system is up and running. In Java. I know some of the students that worked there on summer projects, and they confirmed using JEE there.


First, sometimes the whole system comprises of many sub-systems. It could be one of the sub-systems is using JEE but the rest is not. So we need to find out the intimate details of the system. Unless the whole system (sub-systems and all) are running JEE ?

Second, CERN LHC (I assume is Large Hadron Collider) is more of a nuclear research project correct? The serious-ness of the system failure cannot be compared to say a system on-board an aircraft cuz if system fail, the aircraft crashes and take down many lives.

So I would much prefer other real life examples especially when human lives loss is a possibility due to software system failure.
Oh em gee, what have I started?

The serious-ness of the system failure cannot be compared to say a system on-board an aircraft cuz if system fail, the aircraft crashes and take down many lives.


Actually, malfunctioning of some critical software in such a serious thing like LHC may cause an accident that cost someone's life or health. High energy particles are not what you want to get through you. So the seriousness of such systems is similar to that of nuclear plants.


Rapidcoder, noone is in the actual tunnel when it is operative and the only particle that makes it through the tunnel and even through the ground is also the one that is harmless since it is weakly interacting; the neutrino (and variants).

Technically speaking, though, a design flaw is always a disaster. Seriousness of failures is a psychological factor I don't bother discussing about; every failure is a failure. I do however, agree, that there are a few levels of failure, varying from: A "I'll fix that later"-mistake/failure to a "I let a plane crash"-mistake/failure.

+1 Rocketboy9000. :P (Only your last post :P)
Last edited on
Well, Sun has it in their licence agreements that you're not supposed to use it specifically for nuclear stuff:
http://everything2.com/title/Java+is+no+good+for+nuclear+power+plants
So does GCC, VisualStudio, etc. You don't use a tourist-grade Garmin GPS to land a plane, but this doesn't mean GPS is not viable for flight navigation. You need a special commercial edition of JVM for critical, real time stuff.
Last edited on
Topic archived. No new replies allowed.
Pages: 1234