As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
Like most people, I learnt C++ after C. I learnt C++ because it was one of those languages which fetched jobs. I am still studying (doing masters) though. One of my cousins has been working as a developer for around 12 years.
He advises me to learn Java so that I can land up in a good job. He says only few sectors like tele communications use C++ and almost all the enterprise software is developed in Java. I am working as a student technician in my university. The job involves Windows programming in C++. I learnt core Java. I do not know any of those Struts, Hibernate or whatever is out there.
To be on the safer side, I am planning to master both. But I think Java is an ocean, though it's easier to program in Java than C++ (this is my opinion. C++ lovers don't kill me).
What do you geeks and professionals out there advise me. Do you think I should learn both of them. Which sectors of the software industry use C++?
Best advice I ever got as an undergraduate was from my languages professor, who told me (paraphrasing here): "Don't memorize languages; don't marry yourself to a language. They're just tools. They all do the same basic things. Instead of learning a specific language, learn the foundations of good software development. Then you'll be able to take any language and be successful with it."
I feared learning new languages before he told me that. Afterwords, I took his advice to heart and it's made all the difference. Languages are just tools in your toolbox. If you can program and write good software in one language, you can do it in another.
C++ is still used extensively for performance intensive tasks. For example, I do a lot of work with video compression and decompression - it's all C++. Partly because we need the performance, and partly because all the 3rd party libraries which need to use are C++ so it's easier to integrate with them if we're using the same language.
A brief off-the-top-of-my-head listing of projects that use C++:
Device driver development
Games
Advanced engines (audio, image processing, etc)
Telecom
Embedded software (devices and such)
C++ is not even close to being dead.
My experience:
Bloomberg, Reuters, and all their bank/trading clients who want low latency market data feeds use C++. (Fidelity, JPMorgan, BNP, Citibank, etc.)
The defense industry uses C++. (among other languages - Java is also popular)
These industries also use java and other languages, but C++ is hard to beat. Note also that there is a HUGE existing C++ code base that will take a long time to go away (if ever)
It is not hard to know and use them both. Don't worry too much about a particular language. That is not the real crux of developing software.
Some site calling itself Google reckons it uses C++ extensively. Thank God they don't need performance to index the few websites out there.
If this Interweb thingy takes off, they'll be in real trouble though. (-:
Seriously though, apart from the current change of channel (reversion?) to C and Perl, the previous four projects were all C++.
a large scale departure control system for several of the world's major airlines (30,000 10MB log files per day)
a flight training simulator and ground based software proving platform for a new military aircraft
a large scale framework for an existing air-traffic control simulator that was used to incorporate the new Aeronautical Telecommunications Network (ATN)
an advanced radar processing and display system for an on-route air traffic control centre
All really interesing.
Video games still use C++. One example that comes to mind is the Torque engine which can be used for iphone and xbox game development.
C++ is not anywhere close to being dead, and as suggested by others, don't marry yourself to a language.
If you're learning C++ in terms of job prospects, I'd rather suggest you pick up a representative of a programming paradigm.
C - Imperative programming
C++/Java/Obj-C - OOP
Lisp/Haskell/Scheme - Functional Programming
Getting adjusted to the paradigms is usually harder than picking up the language itself. Hope others would chime in for other suggestions.
Many defense contractors, especially when dealing with hardware, use C++
Many makers of advanced medical equipment (e.g., MRIs) use C++.
I say learn both if you can. It's good to have the C++ foundation even if you end up in a sandboxed language like C++/C#. Too many people don't understand the basics.
Note that different cities have a majority of jobs in a specific language. Go to the craigslist job boards for the city you think you'd end up in and see what they seek. For example, Pittsburgh is a C# town whereas New York is more balanced.
C++ is still used extensively in engineering applications, such as high-end CAD/CAM systems.
I think the death of native code is much exaggerated. Even Microsoft has backed away from making C++ all about .NET in Visual Studio 2008. It seems to be actively improving its native C++ development tools again as well as making interop with the managed world more easy.
My advice, learn C#. These days almost 50% of the job listings were Java and almost the other 50% were C#, there were only a few listing C++.
That said, the people using C++ know why they are using it and probably have good use cases for it... meaning you would really learn how to use the language at the highest levels... meanwhile companies slogging out business logic applications in Java/C# will probably not teach you as much about programming as quickly.
If you do decide to take a C++ job, make sure the shop uses the STL effectively and that they are using Boost. Not looking at using Boost/STL, but actually using it.
Keywords: Banking (financial institutions), games
Oh, and also particle physicists and other scientists using the (in)famous ROOT framework.
And check out this list of C++ based applications.
Bjarne Stroustrup has a list of companies/applications written in C++.
Your university didn't have any Java based courses? That's odd!!
You should learn not just C++ and Java, but should be exposed to several languages and paradigms
I tend to agree with your cousin. Java definitely is used in more enterprise applications (think things that a bank or insurance company would need), while C++ is used in more "niche" markets. I also agree with you that Java is easier to learn and master than C++. No shame or offense in admitting that.
We use both where I work, writing embedded software in C++, but communicating with it from GUI apps written in Java. There's definitely plenty of room in the software industry for both (and many more) languages.
Most packaged software is still written in C++. That means games, office applications, graphics and video editors, and operating systems. In fact, if you think of the software you use every day that isn't online, chances are it is written in C++ (or C or objective-C). It's not written in Java, Python, Ruby, Perl, etc. While packaged software is becoming less prevalent, it's still used a whole lot and isn't going away anytime soon.
Operating systems, whether embedded or for the desktop are almost exclusively written in some C language. Attempts have been made to write them in Java or C#, but none of those have worked out. All of your drivers are written in some C variant as well. I don't see this changing any time soon.
Java is great until you have to start caring about the details it abstracts away. Most people don't need to do that.
My advice is to master whichever language you enjoy more. I know C++ and Java well, and have used both professionally. However, I would never accept another C++ job because I find C++ tedious and mind-numbing. I rather invest my time mastering more interesting languages.
I've been writing in C++ primarily for internal and external desktop applications within manufacturing and telecom companies for a long time, and only worked full time with Java for about 1 year out of 16.
Java never seemed to take over the desktop like they were predicting back in the mid 90s when it first came out, and now C++ seems to have more competition from .net and AJAX/web applications.
I can't really speak for it's use in back end systems, but I have seen more of it there than I've seen C++, so it depends of what kind of programming you are talking about (e.g. user facing vs. internal systems).
Well I suggest learning more than a couple languages. I work in the communications industry and yes we use C++, however a lot of projects we are working on are in Java as well.
I suggest you learn:
1) C++ / C
2) Java
3) Erlang or Haskel
4) Ruby
This will help you understand concepts that exist in one language but not in another. Also helps with marketability.
Take a look at the tiobe programming index and you will get a feel for languages on the rise.
C++ is heavily used in embedded systems.
It is being used in UI development. For eg. famous QT framework is written in C++.
Ultimately it depends on what you want to do. If you want to work in embedded systems, better learn C/C++.
I use C and C++ regularly at my job where I work on embedded devices. We're not talking super low level stuff, here, either. I do mid-level and UI work. Think Qt, Gtk+, Windows Mobile SDK, etc.
C++ is heavily used by ISVs. Think Microsoft, Adobe, Oracle, Sun, Symantec...
Game industry looks like go with C++ forever.
I had to scroll all the way to the bottom to finally see a post mentioning video games. C and C++ are huge in that industry.
As far as the "What should I learn question." That's pretty open ended, you want to learn as much as possible. So yes, you should learn both of them. As a few people have said, C# is a good one too. You should also learn Python, Ruby, or PHP and some web frameworks (Rails, Symfony, Django, ASP.Net). Web apps are pretty big these days.
If your bubble consists of only C++ you aren't going to be very marketable.
EDIT: Oops, I guess games were mentioned a lot more than I initially saw in here. My bad.
In my career I've developed C++ for:
Server applications (Securities industry)
Embedded software (Wireless telecoms)
Desktop application software (Wireless telecoms)
I've also seen a lot of adverts for C++ developers in the defense industry. There is work out there for C++ developers, not as much as there has been in the past, but still plenty of work.
Though I say it wouldn't hurt to learn Java, it is a good skill to have under your belt.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know it's a hot question that need anwsers ^^
From my viewpoint, using Java vs PHP, is nowadays a problem of system resources (Hardware, Software, etc.).
For Java, you have to deploy J2EE Stack (JDK, AppServer, etc.) (~200M) on your server, for PHP you need to deploy a LAMP system (~100M).
Using Java was in my opinion due to object oriented programming in web application, but today we have a lot of Object Oriented Web Language (Ruby, Python, PHP).
So the question when to choose between Java or PHP for new projects ? Maybe the community difference ?
I know that stackoverflow is not made for discussion, but it's a (good?) question that need answers (for me and for others maybe) ^^.
What are you guys talking about....
Okay JAVA has some pros, but it also has some cons. Now with PHP it is exactly the same, it has some pros, but it also has some cons.
People who say PHP doesn't have a good OO environment, well either does javascript! And really that is the heart of all web 2.0 projects; javascript. The back end today is becoming more of a resource for the front end. What you can do in JAVA now days you can do in PHP 5.3 - to some degree. If you are a good developer you will be clever enough to abstract your design to make it maintainable and if you are brillant you can match and even improve object sharing in PHP, which majority of web "designers" don't know about - or dare I say, comprehend. Check this article out by O'Reilly ON JAVA!.
I develop both in Java and PHP. I'll always use PHP for my server side and I'll use Java for Android Development, and desktop development. (By the way I have developed in java for backend development, but it take twice as long to do something in JAVA then to do it in PHP. That is why I stick to PHP.
I hear this spagetti code problem with PHP all the time. Yeah. Maybe 5 years ago! If you project ends up like this then the person, or you, is a poor programer, and you should stick to drawing pretty pictures. It is easy to separate your logic from presentation, and it is also simple to separate your business logic from you data layer. Think before you code. Don't just open up a note pad and start typing. Plan! People who fail to plan, plan to fail! Jacco you're on the money!
I see uni students all the time building code where I think, "The person who is going to end up with this guy is going to regret it". If the student just planed and documented what he was going to do then every thing would be organised and ready for scaling - again if he was good enough.
Both technologies are great and you should use what is more comfortable to you or your developers. If you go down the road where you think one is better than the other and you know nothing about that technology, well guess what? No matter what you do your projects outcome will be missed, and you'll end up having to do it again.
Other constraints are usually taken into account. Things like
development time,
maintainance cost of the codebase
availability of qualified programmers
salary cost for available qualified programmers
to name a few.
Hardware and software are cheap if you compare them to the above so they tend to be less important.
I did a non-scientific performance comparison of J2EE and PHP. The comparision was to see the user experience of each system under various load conditions.
I found that PHP's response time was very slow and CPU maxed out very quickly. I understand there are some compilers that will probably help, but I wanted to make an out of the box comparison of performance of rapid development systems.
You can read the full details here: PHP vs J2EE: a Practical Approach
It depends on what you're doing. Choosing a language/framework without analyzing your project requirements is a bad idea.
Choosing a language depends on what you want to do, But I am very sure that the different hard disk space requirement will be the least important aspect of your decision.
Here is a possible hint: If you want to reuse your work (or parts of it) in a desktop application, Use Java. PHP is virtually non-existent for everything except web programming.
I really don't think that it is a question that can objectively be answered. In the end it is about people and what they feel more comfortable with. That is why e.g. Facebook developed a PHP to C++ compiler (with which the performance benefit that Java has might become smaller, too) instead of just hiring C++ developers for doing the Job.
On the other hand, the Java platform offers some interesting new approaches like Grails (which is basically a Groovy Wrapper around Spring) and Lift, as well. That makes Frontend development faster and easier (I still find that this is a real pain with plain Java) and you can combine the benefits that other languages have with your existing Java codebase and expertise (btw. most of the Frameworks mentioned don't need a J2EE runtime environment a simple Tomcat installation with around 5M and an installed JRE should be enough). So it is not really about the Java programming language alone anymore.
And if you really can't decide at all you just run PHP in Java (works as well for Ruby, Python, Javascript ...).
PHP wins in front end in web development. Because it has much smaller development time which make things cheaper and cheaper.
PHP will lose in mobile app development. There is no way to develop a mobile app front end with PHP. And Because its performance gap with java and other static languages, PHP will lose the back end battle. Java is old, but it has a pretty young and professional community. Check out those names: lucene, weka, hadoop,scala,cassandra, hbase, what does php provide us in back end service???????
I do not really agree on the fact that the choice of a language is related to system resources.
Hardware is cheap and we are not in a time where we need to closely look at the system resources as we used to have. Don't misunderstand me: we still do need to pay attention, but the time where people were xoring their pointers to save some space is over (luckilly).
And if your main concern is performance, then either running a JVM or an interpreted language is probably not the best option.
I do not think it is related to the orientation of the language per se either. Ok, I know, PHP is not object oriented but still, you can now code OO with it. You will find descent web frameworks for almost any language.
I agree with Jacco on his list.
Another aspect is indeed the culture the language refers to.
PHP is for script kiddies. Java is for serious, wearing suits business developers. Of course, we all have many counter examples but still. Java was largely adopted by big companies, now competited by .Net. There are good reasons for this, among which the fact that it a lot easier to write poor code in PHP than in Java (and almost any other language). On the other hand, Java is not exactly freedom oriented.
If your project is strictly personal, you can choose whatever suits your tastes better. If you plan to develop as a team, the choice of the language will impact its general mood/way of thinking.
I would finally add some important parameters to me: fun and elegance
This may be a matter of taste here again, but I have much more fun coding in python than in C# for instance.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been doing some research into taking my programming experience and moving into the java programming marketplace, due to a combination of personal interest and local market forces. As you can gather from the title, the vast majority of my experience has been in building web-based sites and applications, and I'd like to move as much of my previous experience as possible.
One thing that I've been unable to find a concrete answer for when should a website or web-based application designer look to going with a Java based solution, over other options currently on the market. What options would Java provide that would have a designer select Java as the basic coding language to base a project upon?
Thank you for any constructive replies that may arrive from this inquiry.
EDIT: I should have included the caveat of if other factors are equal, for example if hardware, software, developer skill in java is up to where they should be for such projects, and so forth.
The main factor is what your developers are adept in. If you've got a bunch of Java developers, go with Java.
Consider this also: Java tends to run on app servers where there is a persistent global program running, and separate threads/processes spawn off to service individual requests. However, if the main global VM croaks for some reason, your whole app can go down. The benefit of course is that you get application/system level resources that you can initialize and use continuously across all requests
Other environments like PHP basically tear down and rebuild the entire environment for each request. You can code in application level data persistence using a database, but you don't get it for free. On the other hand, if one php process croaks while processing app data, it won't kill the whole system , as the entire environment is just torn down/rebuilt for the next request.
Agreed with many of the previous posters, but one possible consideration is runtime speed.
If you are using a very basic LAMP stack server, running PHP4 or lower, Python or Perl, if you do not set pre-compilation, all of your scripts will have to be re-compiled at runtime. This can cause immense stress on the server for high intensity applications. If you're in the situation where you cannot enable pre-compiling for LAMP, but you can for Java (most Java servers require this), then this should be of concern. The disadvantage is that you may have to re-compile large chunks of your web application every time you edit it. I realize this is becoming less and less of an issue nowadays, but its something to check.
Be sure to include a learning curve in the development time if developers aren't familiar with the chosen language.
For the most part, the best technology is the one you are already using.
If you have coders that know java, have system administrators that can configure java apps and know what to do when a java app stops working, and project managers who know how to accurately schedule and plan a java deployment, you would need a very, very compelling reason to pick something else like .NET for a new project, even if .NET is "better" (whatever that means).
There are, of course, exceptions; if you're using something obsolete and/or is not going to be supported in the future (like classic ASP), or you have no legacy systems, then it's time to use something new.
I believe that the conventional wisdom on this subject is that Java is better suited to very large systems that need the discipline of static typing. Also, on very busy sites, Java can use less memory and run faster than most interpreters.
(Right out of the box, Java wants lots of memory. But on a busy system Java has only one copy of all running code.)
There are also certain prosaic reasons to stick with Java, for specific sites. They might need back-office integration or some other big piece of existing code.
I would use Java if there was a library or framework that provided specific features that no other language did (or not as well).
For example, if I had an in-house-built java library for running our Gruntmaster rock crusher, then it naturally would make sense to use Java to build an app that needed to control the Gruntmaster.
Some might say that whatever one's shop's official language is the language one should use--I disagree with that rule, as in my experience a good developer can learn any language.
There is no hard and fast rule otherwise; each language has its own strengths and weaknesses. The fact that you are asking this question about Java tells me that you are not as familiar with it.
I'd suggest you go ahead and build an app or three in Java -- then you'll know. :)
There is very little separation between the capabilities of the various technologies available today for web programming.
Java at one time was the default choice since it far surpassed the abilities of the competing technologies, but that is no longer true.
The Microsoft answer has matured rapidly; the days of classic ASP are far gone with .Net now providing all the abilities and ease of programming that Java has offered.
New languages such as PHP and Ruby have arrived or become much more mainstream, and are also valid choices based on your programming needs.
So as many others are saying it boils down to what language you or your developers are familiar with.
Another aspect to consider, is the ability to use a vast eco-system of open source libraries.
Languages like PHP, Perl or Ruby have such lib market places (almost) built in. .Net is rather closed in that sense. Java on the other hand has a a very large, enterprise grade eco-system of libraries to choose from and communities to learn from as well.
Practically I agree with the guys about leveraging existing human infrastructure.
Technologically, Java is quite good for non-standard web things - like heavy use of AJAX (GWT, DWR, Comet spring to mind), Mobile (where you generally need lots of session data and less front-end bling), really simple things that are going to be put under immense load (it will definitely trounce Apache mod_XXX every time, the only thing faster in wide-spread use is native code).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
As a Java newbie I'm wondering: of all the languages in the world, why is Java frequently used for enterprise applications? What makes it that way compared to the other languages? Will it continue to be this way in the upcoming years?
I'd appreciate your insights. Thanks in advance :)
One word: libraries. Java has an vast array of excellent libraries for solving most of the common problems one needs to solve when developing enterprise applications. In many cases, there is more than one good choice for addressing a particular need, and oftentimes those libraries are free and open source under a business-friendly license.
Some have argued that there are, in fact, too many choices in the Java ecosystem, and that developing enterprise software in Java requires developers to make a large number of decisions that can have far-reaching impact on the end product for better or worse. This has probably helped propel the popularity of alternatives like .NET, which has a reputation of offering fewer choices, but with the benefits of a more well-integrated application stack and tools set. What direction you choose depends, I guess, on whether you place more value on "freedom of choice" or "freedom from choice".
There are lots of reasons a large company (the type to go for enterprise solutions) would pick Java. Note I'm not saying all these reasons are correct or valid. But the relevant point is that they appear valid to a CTO at MegaCorp.
Learning Curve
Java is a simple language without much of the flexibility of other members of the C family, this cuts both ways, but it is seen as a straightforward language for use by an army of programmers. Enterprise projects tend to involve large numbers of developers (rightly or wrongly) and it is much easier to get a developer to a minimum level of competence in Java than C++. You also have a whole generation of graduates who have probably been largely schooled in Java.
Choice
Java has a vast array of libraries, frameworks, tools and IDEs, and server providers. To an enterprise its good to have choice, even if that's just for use as a bargaining chip when negotiating price. The language lends itself to code quality tools that allow enforcement of corporate standards (and as mentioned there are a lot of those tools).
Platform Independence
Java is write once, run (well, debug) everywhere. Sun has actively encouraged open standards that allow multiple vendors to implement their solutions. These standards give the customer the comfort that they can migrate from one vendor to another if a given vendor goes under or starts charging more. Of course the reality is that each vendor does their best to provide some "added value" features that tie the customer to them quite nicely.
Maturity
Its been around a long time, running a lot of servers. If your web application needs to be "6 sigma" or similar and you are the MegaCorp CTO, you are not going to look that kindly on Joe the developer wanting to do it in RoR.
Timing/Marketing
Java came out when programming was moving towards the web. It was positioned cleverly and got a strong position early in web development. Because of the open standards, there are some very big companies producing these platforms and they market Java pretty hard to sell those platforms.
Inertia
Large corporations move forward at a glacial pace (a lot are still using Java 1.4 five years after 5 was released), so once they've picked Java, it takes a massive investment to move to another platform. With each day that goes by they're cranking out more Java that would need to be migrated. Most of these companies are not primarily coding shops, so it is a very hard sell to convince the business to spend a few tens of millions rewriting their entire code base for no immediate business benefit.
Another reason might be the care Sun has taken to keep Java backwards compatible. The vast majority of Java code can be run on the latest version of the JVM without a problem. That is quite an achievement, given the age of Java. On the other hand you might argue Java has not changed all that much in all these years.
Enterprises like stability in a platform.
Sun targeted Java to speak to the needs of enterprises early on. It pushes standards that promote vendor independance at every level. Platform independant, database independant, application server independant, etc.
In addition they promoted enterprise level tools for it, in terms of messaging, transaction management and other things that the enterpise worries about.
Before Java, enterprise level stuff tended to be done in C++ (there were plenty of exceptions (does anyone remember PowerBuilder?) but that was the rule) and Java fits well as a successor to C++ for business applications, where that kind of memory management isn't something worth paying for.
In addition to all of that the language itself speaks to enterprises in terms of avoiding hard-to-get-right constructs that can really mess up a code base, such as operator overloading. Enterprise level applications tend to get handled by many different hands, not all of which are the top of the line programmers, and having safty nets to prevent shooting themselves in the foot is a desirable thing.
It also came along at the right time. A new paradigm (this was well before .NET existed) that promissed to combine multiple vendors into an ability to compete with Microsoft, which got the likes of IBM and Oracle on board, that happened to fill a new hole, which was the emerging requirement to develop web applications, where C++ was no longer an obvious choice.
I shouldn't be saying this, but...
The real reason is because it's named after coffee!
Business is about time, money and opportunity.
Using Java means that your number of errors in the code goes down, simply because pointers are hard. You use a GC and you instantly remove an entire class of errors from your code.
Secondly, Java was one of the first languages to ship with a pre written library of functions, which really did cover a lot of the development phase. This restricted the way things were done but it meant that people could learn faster, had more tools at their disposal and had a great set of libraries to do things like network, GUI, web, encryption etc. Java on its own as a language really wasn't that special, but Java plus the Java API was.
So if you've got a language that has less errors and more infrastructure for free, then you end up with more code in less time. Sure the code doesn't cure cancer, it's not as fast as C++ code to achieve the same task, but it will achieve the business' goal of getting an application.
If you make more code, for less money, you can pursue more opportunities. You then bring inertia to the table in terms of code that's already been implemented in Java and you start seeing why the business doesn't want to move away from their comfort zone.
Personally I believe one major reason is the cross-platform issue.
Java programs written "correctly" (without assumptions of the underlying operating system) can run on any JVM. This means that you are not tied to a particular platform, unlike .NET which marries you to Windows.
I have seen Java code run on mainframes, Linux routers, inside Oracle database, and naturally on PC's.
It's cheap, RAD, cross-platform, and developers abound.
Developing in C++ is too slow and expensive and .NET has not been around for long enough. Business inertia is huge, remember.
Businesses want languages that are backed by a professional provider (ie. a company like Sun) and often stay away from Open Source languages for the simple reason that it was not written by a company.
Also for client-server applications, you have an abundance of choices for production-quality app servers that have the same J2EE interface (IBM WebSphere, BEA Weblogic, JBoss). Alternatively, you could use the Spring Framework on any server like Apache Tomcat the complies to the Servlet API if you're convinced you don't need EJBs. In contrast to .NET, it's hard to find choices with respect to app servers.
There are an abundance of choices with regards to frameworks for a given task be it an ORM tool, logging, collections, caching, web UIs, etc. There is no hardly any need to reinvent the wheel.
Finally, while it's fashionable these days to lament the very real shortcomings of Java the language, it's a language where folks know how to get things done and how to avoid certain anti-patterns.
The other answers are all good. Two things need to be added, corporate standards and the bandwagon effect. If you want to build an enterprise system you need to have pretty strong case for not using your company's entrenched standards and this is mostly JavaEE. And if you need to resource a project it is a lot easier to recruit a Java programmer than it is, say, Erlang.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am a competent C++ developer. I understand and use polymorphism, templates, the STL, and I have a solid grasp of how streams work. For all practical purposes, I've done no Java development. I'm sure some of you were in a similar situation at one point when you had to learn Java. How long did it take you to become a competent Java programmer?
I think that learning the language is not difficult. In fact, I used to be a full time C++ developer, and at some point I started writing Java code. But the thing is that I don't remember ever learning Java, so I guess I just figured it as I went. I've been doing full time Java for a long time now.
If you are well familiar with C++, you may want to read a list of the major differences (e.g., everything is dynamically-bound) and then start practicing on an environment (just download Eclipse). The small differences are the main thing you would have to get adjusted to.
Now that Java supports generics, one of the major switching pains is gone. Multiple inheritance, while not supported, is not a big deal if you get used to interfaces, and in fact having interfaces rather than abstract classes with pure virtual functions (PVFs) improves readability.
To me Java is a nice and friendly and relaxing sandboxed version of C++. I don't have to worry about general protection faults (GPFs), I don't have to worry about memory leaks, I don't have to worry about messing with pointers. However, don't let that confuse you, there are still plenty of opportunities to screw up royally, and they're sometimes even nastier to detect.
Just take the leap. If you have the instinct, it shouldn't be a problem.
I went the opposite way. Started with Java, then moved to C and C++. For my own personal experience, it was much easier to learn Java than C/C++ (C++ especially).
Java in many ways is meant to be C++ with many of the undefined and unnecessarily complicated portions removed or simplified. IMHO, it had great success with that goal. As a result it's a very easy language to learn and use. Especially for someone who is familiar with C++.
The actual time it will take is very dependent upon the person learning the language. However, I think it's safe to say it will take less time to become competent in Java than it did in C++.
Shouldn't be too bad. The syntax and classes should be very easy for you to grasp. There are some differences but none of it is too challenging.
The hardest part is more about learning the packages, since those will be different. The built in Java classes and functions, and then to use Java in a practical manner, you'll need to learn J2EE or whatever you might be actually using it for. The latter part will probably take more of your time than the language itself.
If you're already a competent programmer (especially in C++) then Java doesn't take long to learn at all. The books I would recommend (in order) for anyone who wants to learn Java are:
Head First Java
Thinking in Java
Effective Java
You may find that you zip through Head First Java rather quickly, given your experience. For that reason I suggest you check it out of the library and skim it before moving on to Thinking in Java.
Also check out Sun's Java Tutorials.
C++ to Java: 1 week.
Java to C++: 1 month.
As Tom Hawtin wrote, the key issue is how you define competent.
You'll be able to pick-up the language fairly easily, but it's the idioms and the libraries that you will have to learn. And there are quite a few differences between niches you work in (e.g. embedded or enterprise), and between libraries that supposedly solve the same problems. Here are a few examples:
In business/enterprise apps, you generally work with databases. There you can have:
plain JDBC
SQL mapper (iBatis), wrapper around verbose and repetitive JDBC
ORM solution (Hibernate), with a philosophy of it's own
With desktop UIs, you have two competing platforms:
Swing, a part of JRE
SWT/JFace, from Eclispe foundation, originated by IBM, with native UI support
Web frameworks are too many to mention, with different ideas of representing the UI, configuration, folder/package structure etc.
DI (dependency injection) is common in business apps, either by 3rd party frameworks like Spring, or as a part of EJB3 standard. But, I don't think it is ever used in embedded set-up.
It would be fair to say this is just a tip of the iceberg.
Back in 1995 when I did it, it took me about half a day to get comfortable with the tools and basic ideas, a day or two to get the language, a week to get the more obscure parts of the language (there were less of them at the time) and a month to get the libraries (there were WAY less of them at that time).
Now I would guess that the tools and basic language will take as much time, a couple of weeks to a month for the obscure parts of the language (depends on what parts you hit, and when). The basic libraries will be a month to two months (java.lang, java.util, and a few others). The remaining class libraries 6 months to forever depending on what you need to learn and how often the keep updating them :-)
I know C++, and had to work with Java once and picked it up in 2 weeks. Of course there were quite a few surprises but it's easy.
I have C++ background. Picking up Java took me few days - the language seems really simple - at least its basis. I still consult my Java guru - google quite a bit, but it's usually a matter of exploring API and standard libraries. Java has some annoyances, but you should spot most of them them easily and quickly.
I was recommended Thinking in Java (there's an ebook for free), but was never persistent enough to read through it. I don't write rocket-science code in Java and to do it, my skills are sufficient.
Having said that, it would be good to have better formal knowledge of the language. At the moment I'm thinking about studying for SCJP, which seems a sensible way of learning, plus you will get well-recoginized programming certificate once you pass it (I've heard it's not worth much, but still it may be a motivation...).
You can also try Java Black Belt - the answers frequenty surprises me. After taking few tests I wonder how my programs even compile, which suggests I'm probably not the most competent Java programmer around :)
How would you define competent? For my money, most professional (as in they do it for money) Java programmers never manage to reach competent.
These days, a programming language derives much of its power from its libraries and accepted idioms.
While it takes relatively short time to learn the Java language, learning to use the available libraries (collections, io, etc.) effectively will probably take significantly more time.
I think there are two approaches to meaning of term "competent Java programmer".
If it is about lexems, syntax and terms of OOP I began to completly understand Java before 2 (two) days of learning.
But firstly you will be charmed by impossibility to shoot your own leg ;)
But if it is case of embeded class system (i.e. packages), APIs references, tips-and-tricks and etc., it takes about half-year to feel yourself friendly with Java. I think.
I too learnt C++ first and then Java. It took very less time as I was already familiar with OOPS concepts. In the initial phase of learning I was really happy with new concepts in Jave like garbage collector. I referred The Complete Reference by Herbert Schildt and it did help me to get the syntax quickly.
I started from C++ and learned C#/.NET. That didn't take long.
As C#/.NET is developed very near to Java (they used many of Java's base techniques such as GC, reference classes, JIT, ...) I think it is not that hard to learn Java.
I would go with six to eight weeks.
Shouldn't take you more than a day or two to learn the language, but you might have to spend a few weeks on the class library: how to use collections, the concurreny package, reflection, logging, swing/awt, dynamic proxies, MBeans etc.
i learned c++ at a small age of 15 and became a professional software programmer. But when i searched for job there was only job available for java developers.I thought it was hard to change my language.So just for trial i Downloaded java compiler and just for fun typed some code and i found it is not much different than c++. and only after 6 hours of research and learning i became a java developer .so it is very easy to switch between c++ to java.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is best language to learn next to Java?
Criteria for this secondary language are:
High potential of being the "next big thing". e.g. If the market for Java open positions hypothetically dies/dwindles, what is the next programming language that will have a bigger market for open positions? Another way to frame this question is: If I own a small company that implements solutions in Java, what is the other language that I should use?
Can produce web applications.
Can produce desktop applications.
Easy and fun to learn.
Wide range of available libraries and frameworks (free or open source) that enhance and speed up your solutions.
Python almost meets all of them, but I don't know about being "the next big thing", but hey, Google uses it, and I think its popularity is raising.
It's a scripting language, btw.
I use it for web applications (using django), and you can definitely create desktop applications with it (although I haven't done that myself).
It is easy and fun! (although this is quite subjective, but it's tons easier and "funner" than Java)
For employability: Any of the .Net languages, probably C#. Then you're well set for most potential customers.
For stretching yourself: something functional (F# to cover .Net too?), or something Lisp, or Smalltalk - was once the next big thing but it probably never will be again, but still a language that changed signficantly my approach to programming in other languages.
If you are expert in java, you will probably really enjoy groovy.
It is backwards compatible with java and has a lot of the nice features of ruby and similar dynamic languages. It also has what is shaping up to be a nice rails-a-like in grails, and a good object-relational mapping framework in GORM.
What is really nice about it is you can mix and match groovy classes and java classes. So if you find yourself forgetting the groovy syntax, you can just drop into Java. And of course you can get at any Java library from it. At the same time you can benefit from groovy's really concise idioms for things like Beans properties.
(By the way it meets all your criteria listed above, too)
Learn a language that will probably not be the Next Big Thing™. Learning a new language usually means learning new concepts (unless you learn one that's very similar to another one you already know).
Learning new concepts has great advantages, no matter which language you program in, so it's a pretty good thing to do.
If you limit yourself to a language that's going to be the Next Big Thing™, then chances are that you'll find a lot of familiar concepts and only relatively few new ones (the IT world is conservative like that).
Learn something that looks interesting to you. Not only will you be able to learn faster, if it's interesting, but you'll also have more fun doing so!
How about Scala or JavaScript? Functional paradigms will stretch your thinking further and will be of benefit whether they are "the next big thing", or not.
Go for a different paradigm : functionnal, lisp, haskell, ocaml, erlang, scala, etc.
If you don't have any religious issues with Microsoft, I would argue for C#.
The only downside I can see is that it's not cross-platform. Otherwise it fits your requirements as far as I can see
Your criteria fairly closely matches Python and Ruby, they both have a growing market base in Web development, and are fully capable of producing desktop applications as well. Whilst they are fairly closely matched, Python has a slightly larger library of re-usable code modules, whilst Ruby's strength leans more to it's well-established frameworks.
As a side-note, You should ensure that you don't stop at 2 languages. Start learning a second one, then pick up a third and even fourth as you progress. Learning new programming languages becomes a more trivial task as the general learning curve evens out.
I must second Gilles here; to learn a different paradigm is very rewarding, and functional programming is [not unlikely to be] the Next Thing.
Erlang is great both in flexibility, ease of use (once you grasp the basic ideas) and - the best of all - it it very well suited for the high parallelism of future and current hardware. It also covers all your five criteria, though it might be more of a "server" language than a "desktop" language.
If you are interested, I suggest the book Programming Erlang by Joe Armstrong.
Personally, I'd go with Ruby and focus on running your Ruby scripts under JRuby. this way you get the expressiveness of Ruby with the JVM running your code. I've seen Rails and Merb running under Glassfish. Might seem odd, but you get all the nice instrumentation of Glassfish with your Ruby code. Things like JMX, RMI, etc. work well with JRuby.
Squeak by Example