If Java Wasn't Cool 10 Years Ago, What About Now?
10 years ago today on this site, readers answered the question "Why is Java considered un-cool?" 10 years later, Java might not be hip, but it's certainly stuck around. (For slightly more than 10 years, it's been the basis of the Advanced Placement test for computer science, too, which means that lots of American students are exposed to Java as their first formally taught language.) And for most of that time, it's been (almost entirely) Free, open source software, despite some grumbling from Oracle. How do you see Java in 2014? Are the pessimists right?
Java is the (only) required programming course for the IT major at my University. /sigh
Java is not only about FOSS. It also has a strong hold on enterprise software. Which is why is still relevant.
Still not cool, it's about as "cool" as activex with all of the broken sandbox and security issues though.
Om, nomnomnom...
The problem is what's the point of Java?
If speed is absolutely critical, you're going to go with C/C++/ASM/whatever native-compiled-language works well for your problem.
If speed is not absolutely critical, there's plenty of "scripting" languages that get the job done more easily with less code. And if you're talking about something cloud-based, you can probably handle the lower speed of these options by adding another server node.
Java seems to be in the middle ground where it's more cumbersome than the "scripting" options, yet slower than the "native" options. Leaving not much of a reason to choose it in the vast majority of cases.
Java just doesn't seem to have much a a role today beyond "Google decided to use it for Android apps".
I'm not enough of a programmer to level judgements on the language, but I'm enough of an IT professional to tell you that the JRE plugin is terrible, and has been for a very long time. Most people don't know the difference, but the plugin gives the language a bad name, which probably makes the whole thing 'uncool'.
Java (and C#) arent meant to be cool, they're meant to get the "menial" work done
Software engineers can use their choice of language: from Assembly to Ruby\Python and other languages to accomplish what they want
Java and C# are meant for us programmers to accomplish the "boring" tasks, writing business specific code,etc... Club Java with SAP rather than other programming languages IMO
Java is moving into archaic irrelevance faster than ever. That is, the language itself.
The JVM, however, is now more useful and relevant than it ever was. It used to be naught but an implementation detail. Now, rather, it's central to an entire ecosystem of languages that will inevitably send Java the way of C: used only when the greatest speed is necessary.
Scala is basically a next-generation Java. Java with functional programming, or really, vice versa. JRuby make Ruby actually scalable, given the presence of native threads and interoperability with existing enterprise libraries that commonly only ship in the form of Java or C# libraries. Clojure enables LISPers of yore and Schemers of new import explore functional programming as it used to be, without having to drop the wealth of Java libraries available. Ceylon, Groovy, Jython, and dozen of others are paving a way to give the JVM much more to do after Java becomes obsolete.
Java will never die - it'll just become like COBOL, Fortran, and C before it: used in enterprise software, operating systems, and outdated educational assessments.
Colin Dean Go a year without DRM
Many websites run on Java based systems (tomcat, JBOSS, WebSphere, etc.). I'd really miss it there. Also, many mobile apps are Java based (android). But where I really would not mis it: in my browser or on my desktop.... or at least, after Burp Proxy becomes be available in some other platform-independant language....
It's still shit and always will be. Please kill it! damn zombie...
Yes! Yes! Yes!
It's kludgy crap piled up on more kludgy crap. And Oracle owns it. That right there should have led to complete abandonment. This is just like politics. We keep on reusing, reelecting crap.
It's trying to be.
There almost needs to be two separate considerations. From a language standpoint Java is a bit middle of the road. It has some well known pain factors, but more or less it's one of the easier OO languages to master. It's used in a lot of high profile web site.
The VM on the other hand does a lot of interesting things under the covers that make the language quite fast. When JRuby hit the scene it was faster than the core ruby project at quite a few things because the VM was doing all sorts of optimizations behind the scenes. Also, because the Java OP code is so stable with relatively few changes per major release you have a bit of a boom in languages you can run inside the Java VM. You get all the benefits of the R&D Sun and Oracle put into JIT, while retaining the ability to do interesting and contemporary things with your language.
Clojure, Groovy, Scala, Python being the primary languages with another 16 that can compile to Java Op code.
Were Java fails mostly is as a client application, running with some sort of Windows GUI. Sure, you can do it, but it realistically people who do Java Swing apps are writing some sort of thick client that could almost always could run inside a contemporary browser without any plugins.
Its been around for ages (in IT terms) and has caused more heartburn to developers than bad doughnuts. Used a lot in the monstrous systems that run the Corporates but not so much for developers looking to have a bit of coding fun. Java is as cool as Vanilla Ice was back in the early nineties.
java is intolerable, i don't care what you developers say about it, its technical merits and failings asside, its annoying, daily updates. very app/applet followed by a half dozen nag screens because of all the security failings in it.
Then you get to enjoy the unbearably slow performance, and HP-UX style UI from 1992.
The strange thing about Java is that it still uses a virtual machine. There's so much "packaging" associated with Java that compiling to machine code and linking would almost be simpler.
What good engineer gives a f**k about what language "cool", aside from considering his/her ability to hire hipsters to staff the project?
If you're worried about the "coolness" of a language when doing your day job, you're almost certainly doing your job poorly.
Given Android is the largest / fastest growing platform, and given all the new languages on the block run on top of the JVM, Java is here to stay for a very very long time. It's only 'not cool' when people say they are programming in 'Java'. If they say they are 'writing a 'droid app', suddenly it's cool.
One of the main reasons Java may be "cooler" today than when it was first introduced is performance.
In the early days of Java, it's VM architecture meant that it was significantly behind fully compiled languages like C/C++ in terms of performance. People were supposed to sacrifice speed for portability. Even for non-speed critical applications, slower languages were thought to be "less cool". Real men used C, and real, real men still coded in assembly language.
But the VM technology in Java has gotten so sophisticated that it isn't significantly behind languages like C/C++ in terms of performance, and that can't be ignored. This is allowing some of the advantages of Java over C/C++ such as garbage collection, dynamic class loading, a certain degree of reflection, various safety systems, etc., to win over some programmers. Java may well be cooler today than it was 10 years ago, because it's really grown up and become a fairly useful language.
If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
I really wish the academic world would go back to the actual proper learning languages, such as PASCAL. In my university, the introductory course for programming is C++ (as a freshman.) C++ has little 'English logic.' However, if you know English, you should be able to read PASCAL code much better than C/Java code. PASCAL is closer to pseudocode, which is (usually) the first assignment in these classes. Why would you jump from pseudocode to a 'stricter language' like Java? What does /. think?
I'm in the process of hiring software engineers right now, so I've been exposed to a lot of resumes and had the opportunity to talk to a lot of people on the phone (standard phone screen). Invariably, all recent CS graduates list C on their resume as one of their languages. One of the things I ask every candidate to do on the phone is to describe how C strings work. This is my "marker", the test of how much time they've spent in C (vs Java, or ObjC, or whatever). If you're a serious C programmer, you know how C strings work. No exceptions. If you've spent your entire time in college (or even professionally) programming within an environment where strings are handled by object abstraction, you've probably never had to deal with C strings directly. A suitable answer to the question is as simple as "A C string is an array of chars with a null termination at the end".
You'd be surprised at how many people fail the screening process (and thus are rejected) based on this single question. Probably close to 75%, and every single one of them has a CS degree.
People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
Other than Minecraft, I haven't used anything that made use of Java in at least 10 years.
"But the VM technology in Java has gotten so sophisticated it isn't significantly behind languages like C/C++ in terms of performance, and that can't be ignored." I highly disagree. First, For every level of abstract sophistication you add, you may increase the 'agility' of the language, however you are still farther away from raw machine code. Java is notorious for stacking crap on top of crap on top of crap. Second, Java is far behind in performance. Any true huge performance gains are usually done with the aid of a third-party library, coded in C/C++. Java still can't do integer math anywhere near the speed of C. Java WILL NEVER be as fast as C/C++, because C/C++ isn't run as interpreted bytecode. It compiles straight to machine code. In these terms, this is more a physics problem, not (just) a code problem.
Java as a language isn't fun - I haven't used it for many, many years now - but the advent of JVM-targeted languages makes the Java ecosystem fantastic.
Starting with the JVM - a very good machine that runs on pretty much anything, without having to re-compile your program. Perfect, no, but is anything? And the performance (given that it's a virtual machine) is top-notch.
Then there are the JVM-targeted languages: Scala, Groovy, JPython, BeanShell, etc, etc... Pick your poison.
Then there is a crap-ton of very useful libraries out there, and they can be used with any of the above targeted JVM-targeted languages.
So, we can whine about Java (the language) but really, I use it (the JVM, the other languages, and the libraries) to get stuff done. Cool, no. Productive, yes.
Yes, the middle ground has some disadvantages of both extremes, but it has some of the advantages to both.
C++ maps to hardware well. An enterprise web solution, doesn't need that. It should have automatic memory management. The scripting languages are not strongly typed. That makes the code a little less maintainable and a little slower.
When Twitter used RoR, it was a nightmare. It just wasn't performant enough. When they went to Scala things got a lot better.
Would Twitter ever want to use C++? I doubt it. They are probably a bit hardware agnostic and they don't want to deal with the classes of bugs that C++ has.
Democracy Now! - your daily, uncensored, corporate-free
How is that strange? The main reason why Java is still around is because of the virtual machine. It never ceases to astonish me how ignorant some of you people are. It's asinine to use Java to program things where you know are only going to be used on one platform as there are better languages for that. However, if you know that you need your software to work on a wide variety of platforms and run mostly the same on all of them, then Java is one of the few choices you have.
Succinctly, Java is the middle ground between low-level C languages, higher level languages and popular scripting languages (JavaScript). It's neither good, nor bad, at general purpose programming tasks; and consider it an answer to the "What flavor of vanilla ice cream do you want?" question. Purchase decision makers will look at it as a lower risk, and much more likely to be viable in 5 years, than the latest trendy scripting, framework or JavaScript library.
"Will it be alive in with recently added significant new features 5 years?" is a critical business question for the development and consulting industry. This is why the 2 guys in a garage open source solution or niche scripting language/framework are avoided by business decision makers. Refer to the 1970s "Nobody got fired for choosing IBM" statement.
I was a Java beta user before it was even released. The issue then as it is still to this day: It "almost" works. If you actually try to use the language to accomplish something non-trivial then you will hit roadblock after roadblock. Either a buggy API or a not-quite fully functional API. In the end you end up doing so much work to make your damn program run correctly that you might as well use something that is better in the first place (those choices generally being C/C++ or a scripting language like Lua).
This is not to mention how horribly and annoyingly verbose it is.
I used to hate Java, but there is no better language than java to write business related applications specially because of the huge library that comes with it and vast amount of tools that you can choose from to do your job. Despite from all negative talks I believe Java is still a nice language to build both desktop and server applications and don't forget android market ;) :|
Again I'm a big fan of C/C++ but hey let's be honest, how much you can make out of C++ these days. Unless youre a game developer C++ is for no use.
What the fuck is this? Is it "cool"? Cool not a term that has a sharp definition, so it's kind of pointless to talk about what is cool. I think A is cool, you think B is cool, that's the end of it.
Java highly used. It solves problems that people want to solve and some people would even say are interesting to solve.
About ten years ago Java 5 came out making it a little more modern and relevant. Then it stalled. However, Oracle has picked up the momentum and it is releasing new versions again. It now supports Lambas and it is expected to have new versions with new features being added every couple of years. I believe that if Oracle keeps releasing new things it won't be relegated to being the language of legacy code. Eventually when there is too much cruft, Scala or something else will start to take over. But that could take a very long time. Look at C++. It's still going strong.
Democracy Now! - your daily, uncensored, corporate-free
Kids, why not go out to play, while grownups get dinner ready.
Now that it belongs to Oracle, Java isn't even cool enough to be uncool anymore. Bah.
It bugs me that we're using words like "hip" and "cool" to describe programming languages. That anyone would choose to learn (or use) a language on the basis of it being "hip" is dumb. I'm looking at you, Ruby.
Hipsters, begone! You have Swift now. You have Dart. You have JavaScript. Meanwhile, professional programmers will keep using Perl, Java, COBOL, and all the other languages you've thankfully and mercifully left alone. We're going to get real work done with them, as we always have, long before you came and long after you're gone.
Create a calendar showing scantily clad beautiful women reclined on cars and motorcycles writing code, and it will appear to be cool. To 12 year old boys.
Java still can't do integer math anywhere near the speed of C.Java WILL NEVER be as fast as C/C++, because C/C++ isn't run as interpreted bytecode
Er... wait, what? A Java "int" is a 32-bit integer, and "long" is 64 bits. They work just like C ints and longs, and Java floats and doubles are the same things as C floats and doubles. Java math compiles into the same machine instructions as C does, there is no special slowed-down instruction set in your CPU for Java.
If you are somehow running interpreted Java, that's *way* retro. Hotspot, the current Sun/Oracle Java system, started compiling byte code into machine code some time in the last millennium. And it's been getting steadily faster ever since - that is the nature of compiler development.
Got a good public shot in the arm with Minecraft as far as the desktop goes for gaming. Java on the server is doing good as well or you wouldn't have things like Liferay and such still around and being developed. The crap code is being cleaned up and it isn't that bad of a language even though it's far from perfect.
What is cool? Programming isn't cool. Programmers aren't cool. Being a guitar player in a great band is probably cool. Being a chick magnet might be cool. When has being a Java dev gotten anybody laid?
The only people who care about how "cool" a language is are posers. A professional developer is going to choose the tool that is going to let him/her build what he/she wants with the least fuss. For a lot of today's applications, that tool may well be Java.
What's uncool is a skill that won't get you a job. Java can get you a job, help you buy a car, a house, live your life.
there are 3 kinds of people:
* those who can count
* those who can't
Since moving to Android development (from the back-end Java world) I'm a little surprised that ProGuard doesn't get used more in the non-app space. That gives you another round of optimization before your byte code even hits the JVM.
"WILL NEVER": gosh, not true and never has been unless you know the exact CPU and execution paths and data sets that you are compiling for, for all executions of the statically-compiled code. Please don't regurgitate this stuff.
When maintaining a C++ build system used internationally by a large bank I had to guess what the optimal target instruction set variant, cache line size, etc, would be over the lifetime of the output code, which was always a compromise over London/NYC/TOK/etc and a huge range of dev and production hosts of various ages. And with most/much of the library stack unsafe for C/C++ threading even though almost none of our machines (eg desktop or server-farm) where single CPU you could not then and could not now say whether C++ or Java would be necessarily faster on a given machine, given all the CPU- and run- specific optimisations the JVM has available to it that C++ does not.
I currently work on a Java low-latency high-frequency trading platform in the day job and an ASM/C/C++ based microcontroller platform for my start-up. And I think that I've been using C++ and Java for most of their existences, amongst other languages (I've been writing ASM for >30y); I have a fair idea of what is fast and what is productive.
Rgds
Damon
http://m.earth.org.uk/
But it a necessary evil until Android support app made in different language and become the primary dev language. I don't personally see java use anywhere else. And it would never get natively install on my computer, though I would tolerate an application that have java bundled to itself, but as long it not installed system wide.
So for part of the past ten years I have maintained a commercial software package written in Java. And the biggest issue with Java is Oracle. Users hate the way the JVM treats them... always has an update always wants to install software that is a detriment to their computer. I hate the bugs in Swing and the poor integration on the Mac side. I also hate the functional programming is cool so let's make Java more functional stuff that is happening. Not because I have a dislike for functional programming but because it seems to be just more bloat. It's the reason I hate PERL. I don't need another way to do something, I just need the obvious thing to work. So really the best thing that could happen to Java would be for Oracle to give it to Apache and be done with it.
PS Programming languages are a tool. Tools should be boring. Boring means it is comprehensible, reliable and just plain gets the job done.
When you search for jobs for developers, Java/.Net devs are in general better paid than the "cool" script-kiddies. There are also some C/C++ jobs but not as many. I've also seen a decline in RoR jobs lately, so there you go.
The thing with working in "cool" projects based on the technology used, is that you'll have to keep on learning the new fad every two or three years. We had this with PHP, then it was RoR, now it's Node.JS. If you chose Python, tough luck because it hasn't been mainstream yet. It doesn't matter what language you're using, probably the project is a CRUD application and believe me, doing user authentication, input validation, database operations or sending emails is a PITA in Ruby, in JavaScript, in PHP and in every freaking language.
OTOH I've been developing software for the last 15 years using different languages/platforms and I don't see where all this hate for Java comes from. I mean, it's everywhere, it's free, it has great tools and libraries, lots of documentation and lots of people working on or with it and big names behind it. Name one language/platform that has all of this and we can have a talk.
is it limits the damage mediocre programmers can do to a system.
We have a couple of people who grew up with Visual Basic and really shouldn't be let loose in a complex C++ environment. With Java there
are enough constraints and type checking and IDE support so they can do pretty well.
Plus if you want a cross-platform GUI it's probably your best hope.
If Java can be made to do that, that's got to mean something ...
(this is not a
Ignoring the fact that Android doesn't really use Java but only something almost like it:
Look at the stats, the percentage of pure-Java apps on Android is constantly shrinking, for performance and portability reasons most apps switch to e.g. C++ with only the tiniest possibly wrapper in Java. And if it was possible to get rid of that, they probably would.
So on Android it's not the language of _choice_, but the one Google chose for them and they now have to use.
+1 for ProGuard; I use it for my main Java Web app and apart from anything else PG vastly reduces the size of the .war I'd otherwise have to ship.
Also, not all of my target hosts have a full server-class JVM/optimiser, so getting stuff done up front is a good thing.
Rgds
Damon
http://m.earth.org.uk/
I remember attending a meet-up on this very topic within the past year. It was held at the offices of a small startup recently acquired by twitter. The presenter made the distinction between Java as the programming language and Java as the runtime environment (i.e. JVM).
In his opinion, Java the programming language was on its way out whereas Java the runtime environment was here to stay.
Why is that? The JVM reflects countless man hours of stability fixes, performance improvements, and scalability work. It's a real big investment that only mega corps with deep pockets can make.
In my experience, what I have found is that there is a certain breed of programmer who doesn't like Java the programming language. It seems to me that it is because Java is statically typed. This means you have to type out all these interface and class names with every method signature. It's a lot of typing. You add in all those getters and setters boilerplate and you find that you have a larger, some would say cumbersome, code base to maintain.
If you find that you resemble that description, then check out Clojure which is a version of lisp that compiles to Java byte code running in the JVM. It can, but doesn't have to, be pre-compiled and it is dynamically typed. You can provide type hints but you don't have to. For this reason, Clojure programs are much more dense than Java programs. Less typing in order to get the job done.
Be careful what you ask for. All that typing means that you can find and fix a lot of bugs in the compile step. With dynamically typed languages, you get to find those bugs at runtime. Maybe that is why other posters here believe that Java is for the B programmers.
Java, XML, and Web Services were being pitched together as the new foundation for enterprise IT. Maybe that had something to do with Java not being considered cool.
Ten years later, XML has been largely superseded by REST and Web Services is basically gone (well, on the same trajectory as CORBA before it), but Python and RoR have not succeeded in replacing Java. And C# is Microsoft-centric.
Java has stuck around for the same reason Cobol stuck around for so long: It's corporate.
Does that mean Java isn't cool? No. But are we going to say Cobol is cool because it stuck around for so long?
Seastead this.
You should run some benchmarks with and without Proguard. I'm curious to know what performance benefits it provides (if any). I was actually thinking more of running things like the web containers themselves through ProGuard. Tomcat vs. Tomcat+Proguard. JBoss vs. JBoss+Proguard. Or Eclipse, for that matter.
I thought a programming language is just a tool to do some job. Some tool are better some other are not so good and some cannot do particular task. Sometimes we work with a tool that is not suited for the job because of bad choice made long time ago by a person long gone and the change to more suitable tool never happens because it costs money and time. Sometimes the tool we have to work with is just good enough. I know none that is perfect for the job and by nature of things doing next project with the same tool may feel uncomfortable in slightly different then it used to. Other than that you still need to know about memory management even if you use a system with GC. But for all purposes the language is just a tool no need for it to be hip or cool. In fact I felt certain coolness about a programming language only once in my life. It was long time ago and when I look at this now then I wonder how silly I was back than.
i was expecting an article about the current state of java, maybe it's prospects............. something?
Java combines the wonderfull readability of C++ with the blazing speed of smalltalk. C# is an innovative language from Microsoft that takes those two features of Java and adds in the portability of Visual Basic.
We suffer more in our imagination than in reality. - Seneca
Java was originally the free alternative to the Evil Empire--Microsoft. Because everything Microsoft sold was serious green--and because everything in the Java world could be found for free [Eclipse vs Visual Studio], [MySQL vs SQL Server], [Tomcat, JBoss, etc vs IIS] it was a no brainer.
.NET is dead or dying while Java is the bearded king, hanging on and going strong.
Now, the single reason that Java is allegedly uncool is because it's the incumbent. It has been kicking ass, dominating the Enterprise Tech stack for so long that it's obviously not going to be hip and cool.
Sure you have Python or Perl or Ruby or Go or Hack or Node.js or whatever but they just never seem to catch on in a big way. Sure, you'll find somebody who swears by Python or who thinks that Facebook's Hack abortion is the shit but they just don't catch on and they become curiosities.
Java remains the shit because it was the Anti Microsoft. Write Once, Run Anywhere [which of course was never totally true] but at least it's not Microsoft. Now that Microsoft is dead you have all these companies that tried to dethrone it but they have not been able. Google's "Go"? Even Google chose to base Android on Java. Java is not cool but it still owns the marketplace. For the foreseeable future.
Its a programming language, not a car.. It should be treated like a tool. What should be 'cool' is what you do with it..
---- Booth was a patriot ----
I am sure from a programmers perspective Java is a great language, since it allows you to do things which allow you to run crappy code, but run it just before a deadline. C/C++ is less forgiving. From a desktop technician to sysadmin's perspective it's a steaming pile. When I faced that fork in the road in college I am glad I chose C/C++.
You're an idiot. Java byte code compiles to native machine code and has the advantage of dynamically crafting the native code for the specific CPU it's running on. C/C++ can't do that because it's statically compiled. Also, Java allows for AOT compilation, thus, allowing you to compile the entire app to native code with no hotspotting.
Woosh! That was the sound of his comment over your >30y assembler skills. What he said was correct. Instructions in Java are encoded into bytecodes, which must still be interpreted and by the JVM and executed as machine code on a processor. All this translation takes time. You cannot tell me that adding two integers in Java is "directly" translated (without overhead) into the same machine code the a C compiler would generate.
Is that a roll of dimes in your pocket or are you happy to see me?
Whether or not it is "cool" java has always been extraordinarily effective. Performance and scaleability that far exceed any of the "cool" scripting languages of the past decade. Far better reliability and productivity than C. Nothing has come along that beats it. (By "Java" I mean "any language that runs on the JVM")
Until somebody makes a real effort to get rid of it. Juts look at PHP, JavaScript, etc.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
[Ducking from a cloud of hurled, sharpened WIndows 8 install discs.]
http://vertx.io/
http://cassandra.apache.org/
http://en.wikipedia.org/wiki/Hadoop
Yeah Java is the COBOL of the 21st Century. It's the lowest common denominator, almost every programmer knows at least the rudiments, and the tool and support ecosystem around it is huge.
We are the 198 proof..
It's a product of its times - with many more "computer science" people in the field, math says you're much more likely to run across crappy ones than you were before. (Not a bell curve issue, the bad ones are more memorable) Add in the H1B headwobble factor, and you have a lot of shitty java code, doing things because it can not because it should. Add in a corporate culture where time to market trumps reliability or maintainability, and you have a management philosophy that rewards the above behaviors.
Java is shitty because the world has turned.
I want to delete my account but Slashdot doesn't allow it.
Java as a language is a pain to develop with. Java selling points have always revolved around the JVM itself and a bullet proof, over-engineered backbone that is needed for "enterprise" workloads. In big company's who don't have urgent timelines where they are willing to invest time to micro-engineer solutions it's used very heavily. For applications under heavy workloads, the high stress parts are usually built in Java for maximum efficiency but it's been the JVM, JDBC, server infrastructure and the polished library of tools around it that have buoyed it's success.
With the ability to run other languages on the JVM and get ALL those benefits without actually being required to code in Java though...now that's pretty cool. jRuby, Scala, Groovy, Clojure, etc are making the Java world a heck of a lot more interesting. If the early rumblings around the dramatic gains that jRuby is making with Java 8 are true you might just see the world implode at the idea of Java performance with Ruby development timelines. Early public benchmarks on Techempower are already looking about 30% faster than Scala.
"Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
https://www.youtube.com/watch?v=Aa55RKWZxxI
I'm moving more of my own work from Java to JavaScript, but that is mainly because JavaScript is easiest to deploy almost every where. I generally like Java+Eclipse better for big projects otherwise. However, with tools that compile other languages to JavaScript, and browsers that can get near native performance from JavaScript if written in a certain way, I'm hoping the "JavaScript" approach will continue to gain in benefits because it is just easier to deploy than Java. It's too bad Java app deployment to the desktop was never a real priority (even with Java Web Start). As an example of the difference (including in sandboxing), some school teachers can get fired for installing new software without permission (which could include a Java app which can do anything), but they can use a web browser to load up an educational web page which uses JavaScript to run a simulation without too many worries.
I fought against Java back in the late 1990s compared to using Smalltalk. Back then Java was just a mess and a mass of hype. But I can accept Java is now a half-way-decent solution for many things now that many of the worst rough edges of Java have been smoothed off. I still miss Smalltalk though, and to some extent (not all), JavaScript recaptures some of the Smalltalk flavor and community -- if I squint just right, I can kind of see the entire Web as one big multi-threaded Smalltalk image. :-)
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
I promise you that it was worth saving many MB in the .WAR and associated thumb-twiddling time, plus showing me in the logs which library and other routines were actually being used. I never felt the need to time stuff (since performance was at least not visibly worse). Shame on me!
If I get a chance I'll do as you suggest, though it'll be tricky with all the many things going on concurrently.
Rgds
Damon
http://m.earth.org.uk/
Except that once JIT/Hotspot is involved all or most of the executions *are* of compiled machine code, optimised to the particular CPU on hand and the particular data set for this particular job. So things like dynamic inlining *for this particular job* can allow the JVM to produce *better* machine code which will execute more quickly than statically-compiled code.
The translation takes time, but for long-running tasks that may well be easily amortised away.
So single-threaded Java can beat single-threaded C++.
But I can also bring more CPUs to bear on the code safely with Java for a given level of code complexity (well, now C++ finally has some sensible volatile semantics, that's a little less true).
And there are other factors such as the generally forced synchronous nature of C++ heap handling which can work against it.
Rgds
Damon
http://m.earth.org.uk/
Now Java is obsolete, because you can create portable applications easily with libraries like Qt.
Really? When did Qt for Solaris get introduced?
On the language level, broken piece of shit that is at least 5 years behind C#.
To list a few:
1.True generics has not yet come
2.Checked exception. Thanks to it there are now excessive use of try-catch, printStackTrace and non-handling or wrong-handling (ex: return null) of exceptions everywhere in 3rd party Java libraries.
3.Lack of generator (yield-return) is a pain in ass when writing iterators.
4.No language-integrated expression tree - part of LINQ, not lambda/closure but code being translated into AST to be evaluated and modified at runtime, so you may eventually have LINQ-to-SQL or portable workflow rule or FXML binding expression written in Java.
As a non-programmer, Java stinks.
The idea of it being sandboxed and thus 'more secure' is blown out of the water every time there's an update, of which there are many. Each update from Oracle wants to install the Ask toolbar.
In its earlier days applications had to be distributed with specific versions of the JRE. Even more recently there were plugins that only worked with Java 6 and the vendor had no intention of getting them to work Java 7. The idea of 'write once run everywhere' is mostly dead.
On the server side (Tomcat) it's okay. On the embedded side (Android) it really seems to have finally found its stride..
As long as the later is adequate, success of the former is immaterial. A language like Scala that runs on top of JVM can make full use of availability of the platform and libraries of existing code. For me, the biggest limitations of JVM seem to be 2^32-1 limit on array indices and no option for explicit, real time memory management. Perhaps experts greater than me can comment more. Does byte code provide enough information to support vector instructions of modern CPUS/GPUS?
The deal is its an operating system running inside an operating system but it is very inefficient at it.
The idea of portable code is nice. Even isolating each app from the host operating system
And being able to run code on any machine which the virtual machine compiles for..
Um but the issue of it being interpreted rather than a distint platform in which its code compiles and runs natively on all operating systems? Meh. Basically it is more efficient if Java was a language which compiled to native code on any platform IMO, performing as good as ASM or C .. And having a native set of tools which replicate operating system APIs but work on all operating systems akin to Java based DirectX, database APIs, interface APIs, storage APIs, etc. It has more value than the current system which runs and interprets everything at run time.
POSIX is nice. Each and every operating system out there is technically compliant with it, even Windows using services for Unix, and Mac OSX, Linux, BSD, etc. Therefore Unix/PoSIX is waaay more powerful than Java .. And almost just as clean and neat.
Sun's slogan for Java used to be, "Write once, run anywhere." Remember that? Sun didn't make JVMs for many platforms, and didn't even have an official JVM for GNU/Linux for ages. Add to that the fact that each major version of the JVM deprecated features and introduced incompatible ways to do things previously done other ways, and it's no wonder it has become the case that we (meaning IT folks) have to keep around an older (perhaps virtual) machine which has an older and certainly insecure JVM to talk to some hardware device or application which requires older Java. Qlogic switches come to mind.
Since the JVM isn't portable, Java isn't portable. Since software written for one JVM version can't necessarily run on another version, it's not very backwards compatible. Since it has so many security issues, you either have to hope that whoever makes your JVM keeps it up to date or that you're very careful about how it's deployed.
I can't personally think of anything more precarious than trying to deploy real software using Java.
Linux killed Solaris. Didn't you get the memo?
At least give some examples... like the inability to create symlinks until Java 7.
My workplace provides Java consultants for hire, and is doing quite well.
Recruiters are in contact with me every week.
The amount of Open Source Java software available and actively developed, especially libraries, is amazing!
All Android apps are Java-based too.
To balance this out, some of my colleagues and I are looking into other languages and consider ourselves polyglot programmers, not Java-only.
Especially other languages on the JVM like Groovy and Scala are popular.
in C# UI programming is like a breeze while in Java it is like someone farting in your face.
Because there's nothing quite like a nice cup of hot java....
blindly antisocialist = antisocial
Preface: I'm a big fan of James Gosling, Bjarne Stroustrup, and Anders Hejlsberg.
Let me take you back to 1997. C++ might have been the language which got you the raw power of the PC and gave you all the APIs you needed to minimize external dependencies, it also left you debugging memory management, and debugging raw calls all the time with no safety. Java introduced dependable checks on everything and requirements that you catch or declare things that could go wrong. In addition, the JavaDoc mechanism of taking comments and turning them into HTML documentation went a great distance to enable people to explore and with the aid of a search engine find the answer faster. Java's requirement of naming the files the same as the classes helped impose structure on the code that C++ left as an exercise to the user, and the removal of the header file ordering problems also eased life for developers. Java introduced well-thought out runtime frameworks with built-in string syntax that resembled nicer languages at the time like Visual Basic, and enabled rapid application development of GUI tools as well as server side code. Reflection was also something that was new to people who had previously only programmed in compiled languages like C, C++, or Visual Basic.
Some time in 2000/2001, C# gained a huge amount from Java, just as Java gained a huge amount from C++, but added a lot as well, beginning with compatibility for directly calling native code without wrappers using the C# struct type and Attributes, and the .NET Framework was a highly efficient runtime that was deployed along with Microsoft Windows XP and updated. C# quickly added "new" language and framework features like generic support along with new generics packages, but the biggest win over Java that C# brought was the Visual Studio product release focused on the editing and debugging and refactoring of C#. To be fair, Microsoft dedicated the entire Development Division (devdiv) to C# at the sacrifice of C++ and VB (which irked quite a few C++ and VB developers back then).
Mono deserves a short mention, as does functional programming with lambdas, and the fact that Java and C++ gained many of these features in competition with C# - C++ had generics before C#, and C++ templates are far more powerful. Some of the newer language features like dynamic programming - duck typing and anonymous inline methods and lambdas come from JavaScript and other functional programming languages. var - the compiler determined static type and LINQ - language integrated query along with extension methods in the framework and outside the framework are all mechanisms to help modern developers more concisely do what they want to do.
Today, the landscape of developers is shifting again, to languages like JavaScript on platforms such as NodeJS and Chrome. The front end languages like TypeScript (also authored by the founder of C#) and Swift (Apple's new contender) attempt to enable more efficient representations of data and code, while expressing as much type specificity and simplification of developer patterns. Compiler intermediate languages and runtimes like LLVM, the JVM, MSIL, and V8 blur the performance line between different languages to the extent that it doesn't really matter terribly which language you program in today - C++, C#, Java, JavaScript / TypeScript, or a dozen others, or which framework you use. We have lots and lots of tools. Java is like C++ - it's got a lot of baggage. Even C# is feeling heavy these days. JavaScript + TypeScript seems to be the new contender of "Write Once, Run Anywhere". All you need is to download Node, and npm install some modules, and boom, you're up and running. Whether your code runs in a browser and gets debugged by the browser debugger which is _quite_ competitive with the best tools out there like Visual Studio or XCode, or your code runs under a NodeJS instance and you connect it to a browser or IDE to debug it.
My point is that any language or framework is good. It's progress. Rejoice for the great choices you have today and the wonderful support that you get by today's editors and other tools. Java unmistakably contributed to their existence.
Note that there is nothing that makes JIT compilers generate slower code.
On the opposite: JIT compiler can gather profiling data, and improve code over time. (e.g. knowing which branch would be taken most of the time) what static compiler can not.
Inherent "slowness" and "memory hungriness" comes from the automatic memory management (garbage collection) and additional runtime type/boundary checks. Also a bit because of "write once run everywhere" (e.g. sin/cos functions are like 100 times slower than in C/C++, because CPU's features aren't used, to get exactly the same result on all platforms)
From my personal experience, Java's speed was on par with C/C++ code, while having much bigger mem footprint.
"archaic irrelevance" is a slight exaggeration when it's still occupying the 2nd spot on the TIOBE index.
Having looked a bit into scala, it doesn't have too many features on java once you factor in Java 8 (which admittedly copies it's features straight from scala). OO programmer veterans will still use scala to write java-like code. It's compiler is a mess, both internally and performance wise.
The type system, while alleviating some of Java's annoyances (primitive types not being classes) and being "beautiful", is complicated and unintuitive. If you look at the standard library, the method signatures are completely overwhelming, especially once you go into higher order functions. I find the operator overloading ugly, too, once you go further than overloading basic arithmetics and collection operations. All these things look cool and useful in small projects or in a talk, but if you work with huge codebases they lead to issues when maintaining code that other people write. I also remember it feeling kinda "hacky" around the edges, where they had to make poor design decisions, just because the "hardware" of the JVM demanded them.
Maybe because when one think of Java, one automatically thinks of a heavy framework and bad user experience. That is the general feeling about anything associated with java.
It's Microsoft
I used Java a number of years ago for a few courses back in uni. I found it better than C++ but it still felt really clumsy. It might not be the "cool" or popular opinion to have, but I feel like C# craps all over Java and then some (particularly in the last 2-3 years with the improvements in the .NET Framework). The only area where Java has clear superiority is its cross-platform ability, and that's only because Microsoft can't get their heads out of their bums and make the CLR cross-platform (Mono doesn't count).
It'll be interesting though to see what ends up happening in the long term. With all these languages built on top of it, I suspect the JVM will grow increasingly more important and Java less relevant as better languages are build on top of the JVM.
I feel like Oracle's update practices are trying to force Java into users' faces. Your choices for updates seem to be to not update at all, or to have whatever your doing interrupted to tell you about the update, and the updates seem to require that the average user sit there and watch the update process so they can see all the things that Java does, but which Java isn't really doing for them. There has got to be a better way to do that.
When I read "_how_ C strings work...", I began to think of what I knew about how the C language is actually implemented. And frankly, I don't know how C is implemented (eg. what happens after parsing, how things get converted to CPU instructions). Even though I've spent a fair bit of time writing in the language, I would have stumbled on that question and perhaps have asked you to clarify (something a younger person is less likely to do).
When I read your answer, I realized you were asking "how are strings defined in C" or "how do you use C with string types".
See the difference? On that alone, I guess you may have screened out a lot of good people.
Tangentially, this is also a good reason to not pay too much attention to survey results unless you have actually read the questions that were asked in the survey.
"Consensus" in science is _always_ a political construct.
I doubt too many people think a cast iron pan is cool. Yet it can be used to bake, broil, fry, sauté, reduce, and more.
Is mergesort cool? Are linked lists and hash tables cool? They are common building blocks, but are very useful.
Is DRAM cool? Are x86_64 processors sexy?
Is the Honda Accord or the Toyota Camry "bitchin'"?
Are asphalt shingles as impressive as a slate roof?
When your job calls for a sturdy workhorse, you don't need a thoroughbred racehorse. You don't haul gravel in a Huracan. If your project calls for Java, or C++, or Fortran, Ada, or even for COBOL then you use what gets the job done. If it calls for rapid deployment from a small team, you might use Perl, Python, Ruby, Javascript, or even a shell script. If you need Erlang, Forth, Swift, some assembly language, or some Basic dialect due to platform, existing code, etc then you just suck it up and do that. If you have a chance to do greenfield development and can pick your language, pick anything that works.
If you're in a Java shop working on a Java project, you write and debug Java. Sometimes there's more than one right tool for the job, but you use the one everyone in your workshop has and can use.
Learning a language is easy, but learning a paradigm is not. I usually pick up a language in a matter of days and can program fairly competitively pretty soon.... but I found that most developers that came to Java programmed how they did before because they failed to grasp the paradigm that the language was designed for. Programmed in Java for 15+ years, but prefer programming in Scala over Java. Java ecosystem is scattered with "advancements" that only later did we learn was holding us back. I am sure Scala will eventually be the same way. I found that moving to Scala with it's full support of object-oriented paradigm and full support of functional paradigm has allowed me to produce cleaner more concise code.
I prefer C# honestly. I live in Seattle, so I figured a C# job would be easy to get. And it was...but the Java jobs paid a lot more. So I am still a java programmer.
It's mostly free and mostly opensource, that it until Larry changes his mind.
As you said, they use Java.
You don't really have any citations for anything you said. But I doubt they did huge amounts of refactoring in three months and then stayed with their new solution even after they found out the language wasn't the problem.
"Over time, they wrote more and more parts in other languages, which is natural because they're big and they want each piece to be optimized."
Exactly. I didn't say Java was one language to rule over all. I said it has it's place and companies such as Twitter and Google agree.
Democracy Now! - your daily, uncensored, corporate-free
1. Java is obnoxiously verbose. Despite having an example of properties from C# and cries for them to support them, they have failed to do so. So the syntax for creating getters and setters takes so much longer. Everytime I wrote code in Java over C#, it takes so many more lines. C++ compiler should support properties by now too.
A few years old but: http://www.slideshare.net/jeff...
2. The IDE. Besides having the look of an app from the 90's, Eclipse is a mess. It takes hours and hours of plugin research to get the same feature set as the default install of VS. Even basic features, like basic font size and themes, are unacceptably difficult. Then you have to add plugins to do anything worth while. Netbeans seemed to work better for some things but have less plugins.
3. The java installation is a pain. Both java and the IDE. Microsoft has the benefit of .NET embedded by default. And if a new version is needed, it comes with the IDE. The install of Visual Studio is simple and easy. You download and install it and it will install the needed .NET version and everything just works with one install. With Java, you have to find the right JRE/JDK and heaven forbid you get the one that doesn't have that enterprise feature. Eclipse is just a zip file. It isn't even an installer. So you have to manually add options to the Start page yourself if you want them. Not to mention the pinning issue. You pin it, but when you run it, it doesn't run under the pinned icon.
4. Oracle. Enough said.
Huh. Well, let's see what the good old CVE database thinks of Java.
http://web.nvd.nist.gov/view/vuln/statistics-results?adv_search=true&cves=on&query=java&pub_date_start_month=0&pub_date_start_year=2014&pub_date_end_month=7&pub_date_end_year=2014&cvss_sev_base=HIGH
75 critical vulnerabilities this year, nice! Granted, some of these are IBM|(?:Sun|Oracle)|OpenJ(DK|VM) repeats of the same bug, them all having copied the same security flaw...I do recall some developer stating that their Java app never needed restarting, and was designed as such. Then, the JVM stated corrupting its heap after several hundred days of no restarts, and boy were their restarts and good fun to be had.
As witnessed by the 100+line stack traces when tomcat crashes....
mark
Java became an industry standard not because it was well designed. I balked at diving into it when I worked at Sun Microsystems in 2003; I had hired on there in 1997 because of my experience with system admin, the shell, C and Fortran and absolutely hated the design of Java class libraries, both for their stupid complexity and the fact that the language was, and is very unfriendly to a visually impaired engineer.
The reason for Java's use is that the class library design is complex enough to obscure the code written in Glass Houses and corporate and business applications that programmers would have to be specialized by a long learning curve. This was intentional and it created an artificial elite, and artificial security. It was the PL/1 of the Millenium, and like IBM, Sun marketed it as sufficiently daunting that casual use would be discouraged. There was no manageable subset that one could use without getting on a relatively steep and verbose learning curve. As soon as Java was open sourced in 2006 ACM came out with its own interface that remedied many of the interface flaws of Sun's libraries, see acm.jar. And although that was intended for use in a teaching environment, it was an interface that would have made the language far more useful.
This is not merely the strong typing issue. It is the history of the class libraries, this and other issues such as around inheritance are being addressed by newer languages, such as Julia and Python. Any CS department that makes Java its introductory language should reconsider and Python seems like a good choice. It is a good choice for scientific programmers with the ipython notebook establishing a new standard for literate and reproducable programming.
has anyone heard if the jave 7 version 67 is safe because i heard it got hacked by the russians and yah i want to no if i should be updating it
Why is java obscure? Sure you need to write a bunch of boilerplate code, but it is just a programming language which happens to be widely used. There is nothing about it which makes it particularly hard to learn or "elite". Python is not "easier". It just takes less boilerplate to do a lot of common things (although in many cases the performance suffers). There are certainly things in the Java language which I'm not fond of, but show me any language and I'll tell you about its flaws. I have yet to find a perfect one.
No two ways about it. PIA to develop in, PIA to debug in, PIA to maintain. Still it seems we're in the critical patch of the week club. Fix it ORACLE! Tired of you guys band aiding it and then patches to the patch and patches to that patch instead of fixing the base problem. Might be painful to fix code once the base problem is fixed, however it seems like we're dying of a thousand cuts.
There are quite a few languages using the JVM now so your not tied to java syntax if you don't like it. And .net did the same thing with it's CLR.
I don't know why people get so entrenched in the ms versus java arguments. Some time soon it'll all change again and we'll all have to learn something new. Hopefully it'll be better than what we have now.
Java is one of the most pure and structured OOP languages i know of.
I think the hate boils down from the fact that, just like with python, it's a language that has a "right way" of doing things.
It's not just all javascript do what you feel like land.
If Java is not cool, when Java was?
Why is java obscure?
What is the very first thing you have to say to write a Java program as required by Sun's Class Libraries?
It is:
public static void main(String[] args)
This has to be shown to a complete and utter novice in the very first program he can write, and it is "biolerplate", as you put it, which that person will not understand at all without knowing quite a bit about object hierarchy and method prototypes. The design of acm.jar hides this nonsense, behind an object console. The interface for the novice is much simpler.
Sure you need to write a bunch of boilerplate code, but it is just a programming language which happens to be widely used. There is nothing about it which makes it particularly hard to learn or "elite". Python is not "easier". It just takes less boilerplate to do a lot of common things (although in many cases the performance suffers).
Java has been taught as an introductory programming language, and not necessarily to CS majors, only. It is widely used, especially by business, and I think that the way it was designed and sold to them was as a language that was intentionally designed to be hard to learn; only for people who could tough it out through a steep learning curve; lots of up-front concepts and details to learn before you can write your first useful program. I know, I took Sun's Java courses in the 1997 time frame. The most difficult part is not the language design, you can eventually learn the rationale for the way main is called, it is the complexity and number of class libraries. As proof of that note how fat the Java in a Nutshell book from O'Rieley is. Last time I looked it was close to 600 pages of dense text, Like PL/1, I think the language was designed to be obscure and to select for an elite that worked for a bank or financial company in their Glass House, and it was sold that way by Sun as a form of security by obscurity. Java will be used for a long time, but if you note the number of other languages with totally different syntax that use the JVM, that tells you that others think they can readily design a better language. The alternative interface in acm.jar, written by the ACM in 2006 should inform you as to how much it needed improvement as soon as Sun open sourced the class libraries.
Wasn't all that keen on it when I first saw it back in the mid 90's, but I've been working with it for the last 13 years now and I've come to like it.
One of my favorite aspects of it, is that it is so strongly type cast ... yes more typing (blah blah), but knowing that the right type is always being use is great! :)