| By Scott Quint | Article Rating: |
|
| February 5, 2010 03:00 PM EST | Reads: |
23,582 |
The question that is often posed in one rhetorical flourish or another is this: Which is better (faster, more efficient, blah blah blah...) Java or C++? The question that is really not being asked is: for what? Selecting a programming language is not like selecting a dinner suit; you are not going to be asking the question that frequently. In fact, this question is more like deciding on a business plan rather than simply selecting a tool from the tool box.
The reality is that the only people that would really ask this question are those that:
- Are just at the beginning of planning a software effort that will become the basis of a business or business group that has yet to be established.
- Have a full grasp of and can support apps made with either language
- Are writers of articles or blogs
- Have a burning desire to vindicate their own personal preference.
If you are a business and you have a software project that is just starting, there are a number of questions that will be asked before deciding on a programming language. In fact, I am about 110% certain that the question of which programming language to use almost never comes up. Why? Because business managers are going to use the language that their staff knows the best and that the company can best maintain. The only time it would even come into question is if there is some deep need that only a particular language can fulfill. For example: if you needed detailed interaction with the native operating system or hardware you would probably want to use C/C++. If, instead, you needed software that managed a lot of user interactive data with a short lifespan and the runtime environment was ambiguous, you may choose Java.
I can tell you from experience that software decisions become business culture in every business that is serious about the use of computers. If the business decided in the past that C/C++ was the way to go I can assure you that they will not ask that question again unless their current staff cannot produce a satisfactory product for the currently proposed project. It really doesn't matter if one is n milliseconds faster during this operation or that. What matters is using the staff on hand to produce, test and maintain the product.
In every comparison I've seen, the question comes down to performance. but we are at the point of comparing milliseconds and thus we are in realm of the silly comparisons for most applications. That level of performance really only matters when there are no other performance bottlenecks and where the difference would actually be perceptible (i.e., a 3d interactive adventure game or crunching huge amounts of scientific data). C/C++ was the first programming language I learned but I have been using Java since it became available. The performance comparisons started almost immediately...and it was ridiculous. Java was not originally meant to take over the computing world. It was meant to provide a more feature-rich internet experience. As a web tool, it was also intended to be easy. "Easy" means squishing all the hard stuff into automatic function or succinct APIs. Clearly, Java has come a long way since then and is used for much more. Its platform agnosticism has enabled rapid development of software for all kinds of hardware, leaving (most of) the low-level headaches for the JVM writers. What has actually happened is that Java was chosen for all kinds of good reasons regardless of performance (which was never comparable) and the JVM writers and hardware technology have made the performance discussion effectively irrelevant in most cases.
One part of the comparison debate that has always troubled me was that C/C++ and Java are not equal. C/C++ is a programming language with a rudimentary API (the C Runtime). The operating systems are not designed to accommodate the language and most of the feature-rich class libraries are third-party offerings. Java is more than just the language. It is the common platform (JVM) and it is the enormous class library that simplifies some rather complex low-level tasks, like socket management or stream IO.
The strength (and arguably a weakness) of C/C++ is that it is so fundamental that it is extremely versatile. C/C++ makes relatively few assumptions about how the software will be ultimately be constructed. Ultimately, C/C++ will be compiled to run as close to te machine as the machine allows. Java has many assumptions about the code construction. In fact, it mandates quite a bit. If you don't understand the Java way you are going to have a hard time. Therefore, Java has less flexibility overall. However, the Java way tends to be a good way and although certain architectural decisions are not negotiable, it usually provides a good way to get just about anything you need done and done in a pretty good way. Between that and the JVM specification, Java provides a consistent and clean way of writing software for multiple platforms and with a rotating pool of developers.
If it sounds like I am not making a clear comparison it is because I am not. I don't think that it is an apples-to-apples comparison. In my personal projects, I carefully consider which language I use, whether it will be C/C++, Java or even PHP for that matter. As with anything, I think about where I want to go and then determine how I want to get there. If you follow the C++ road to where it naturally takes you it is a different place than where Java naturally takes you. Sure they can overlap and sure you ride Java or C++ anywhere, but why? Well, in a business environment the whys are plentiful. As a technical lead or manager I am going to think more about getting it done for the least cost and with the fewest future maintenance problems. I am going to use my existing staff and make the most of their expertise. I am not going to create a new management division of development, design, test, build and support for a few milliseconds unless I absolutely have to. And really, unless I am in the business of writing wholly custom software for many different customers with completely different needs, I am most likely not going to be creating new software that departs all that radically from products I have already produced.
As fun as entertaining comparison discussions between C/C++ and Java are (obviously fun enough to inspire me to write this) they are really not practical except under the most unusual circumstances. That decision is made by the inventor of an idea that was probably already inspired during the use of one of the two in the first place. Businesses may consider the choice at the very beginning but as the business culture grows around its offerings the discussion becomes less and less relevant. You may choose the tools that best suit that initial design or outcome but after that, the tools tend to dictate where you go from there, whether it be who you hire or what new feature you add or even what markets you seek. However, as a musing of fancy for journal readers it is most valuable.
Published February 5, 2010 Reads 23,582
Copyright © 2010 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Scott Quint
Scott Quint has been at IBM since 1996. He's been a developer, Lead Engineer, Chief Engineer, Quality Assurance Lead and Designer, Senior Consultant and Project Manager. Most recently Scott was a Lead Engineer for WebSphere Virtual Enterprise and is now a Cloud Computing Technology Evangelist.
![]() |
kvorak 02/05/10 03:47:00 PM EST | |||
Finally... somebody agrees. The reason people can't answer this question objectively is because it's the WRONG QUESTION, lol. Well said. |
||||
- Cloud People: A Who's Who of Cloud Computing
- How Can Green Web Hosting Benefit Your Business?
- Infinity Augmented Reality and Technical Evangelist Robert Scoble Are Enthusiastic About the Upcoming Release of Google Glass
- Cloud Business Solutions, Social Media, and Platform Systems of Engagement Market Shares, Strategies, and Forecasts, Worldwide, 2013 to 2019
- Which Web Browser Offers Best Malware Protection? NSS Labs Releases New 2013 Web Browser Group Test Results
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- GoBank Announces Timing of General Availability and National Distribution Relationships at FinovateSpring
- SKGOLD Marketing Ltd. Announces Trademark Registration
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Research and Markets: Global Platform-As-A-Service Market Expected To Post Revenue of US$6.45 Billion in 2016 According To Latest Report
- ClickSoftware Announces 2013 Annual General Meeting of Shareholders to be Held on July 8, 2013
- Apple announces new $229 16GB iPod touch: 4-inch Retina display, no rear-facing camera, CyanogenMod may offer a “heavily privacy-focused” version and more
- Cloud People: A Who's Who of Cloud Computing
- Enterasys Spotlights SDN's Impact on Traditional Networking in Upcoming Webinar
- How Can Green Web Hosting Benefit Your Business?
- NASA's Twitter Account Wins Back-To-Back Shorty Awards
- Google Compute enters the IaaS market
- Infinity Augmented Reality and Technical Evangelist Robert Scoble Are Enthusiastic About the Upcoming Release of Google Glass
- Cloud Business Solutions, Social Media, and Platform Systems of Engagement Market Shares, Strategies, and Forecasts, Worldwide, 2013 to 2019
- Which Web Browser Offers Best Malware Protection? NSS Labs Releases New 2013 Web Browser Group Test Results
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- GoBank Announces Timing of General Availability and National Distribution Relationships at FinovateSpring
- SKGOLD Marketing Ltd. Announces Trademark Registration
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Where Are RIA Technologies Headed in 2008?
- Dolphin Announces Open API With Over 50 Add-ons Including Dropbox and Wikipedia
- Cloud People: A Who's Who of Cloud Computing
- ManageWP Powers Over 100,000 WordPress Sites Within Three Months of Launch
- SEO/SEM Tips & Tricks: How and When Should You Submit Your Website to Google?
- Google Version 2.0: Googzilla - The Calculating Predator
- Google's Competitive Advantage: It Leverages "The Power of Free"
- Cloud Expo 2011 East To Attract 10,000 Delegates and 200 Exhibitors
- Google Space Launches at Heathrow Airport
- Ulitzer’s Amazing First 30 Days in Public Beta
- AOL To Enhance Video Search Engine by Adding RSS Feeds
- The World's Youngest "Google Entrepreneur" Is One Month Old























