This is complicated to summarize, and questionable. In a note 11 I try to explain why frameworks can be a problem, in my opinion. Donovan, Brian W. Kernighan :. Furthermore, although frameworks are convenient in the early phases of a project, their additional complexity can make longer-term maintenance harder. The idea was to make a language which prevented novice mistakes and abuse. Java was basically a language designed by experts for non-experts.
Mission failed. Novices make all sort of mistakes and abuse. In general poor design also happens , and the Java language culture fosters it. Java sucks. The more I use it, the more I confirm it. People might disagree because they swiftly put together a working Product using tons of cool frameworks, some clicks, some copy-pasting, few digging into Stackoverflow… And everything automagically seems to work.
It seems like they are in a rush, maybe to show that the language is alive and kicking and following the stream towards modernity i. Talking about the type system here. This is my encounter with the partial in C : I had a project in which a big part of code was generated. A learned one could say that if the method code is so long to need its own file, it is too long and it must exist a way to make it differently, maybe decomposing it so to achieve the desired shortness per method.
One can wonder what a public Type attribute is for. This question on Stackoverflow has answers. Not totally satisfactory to me, but better than nothing. Object has a clone method you can override.
And you need to say that your class implements Cloneable. You can imagine solutions which are worse than the hole in the Java language. This is, of course, a horror. Imagine a class with a method that modifies a state of the object and then dumps certain values held by the instance into a database table. Not all clients should be allowed to call that method. So it can internally infer it and check if you wrote the correct type for y in our case.
These frameworks can do their magic well enough, but in their way. Just seeing how it works the unit tests and documentation is enough. Yes, you can unit-test your Python and Ruby code as well, but that doesn't stop another developer from injecting a method into your class at runtime that breaks everything.
In the end it comes down to which trade-offs you like best or which match the goals of the project. In theory anyway. But to me, I need a good reason to abandon a JVM that's faster than a C compiler, IDEs like Eclipse, tools for correctness and profiling and debugging and analysis, the vast array of quality libraries, and millions of people who are already familiar with the environment. Blog Please Stop Saying Please Stop Saying Java Sucks. Jason Cohen. So my question is: Which language makes it easier to work on large code bases?
You Might Also Like. By Sergejs Cuhrajs. The Kingdom of Quality is in disarray. One lock for everything, only one bit of python code can run at a time! At first, you can generally get away with writing a serial program, and it will work, up until you realize you need to do more work at once.
At that point, you have two choices:. However, the correct answer is always to reach for 2. The reason why is when you've maxed out the number of CPUs you can put in a single machine, you can never max out the number of machines you can buy. If you wrote your program for a multi-process architecture, moving it to multiple machines is almost trivial. But, but, but, you might say, what about optimizing that single process to more efficiently utilize the CPU and other resources?
In that case, you'll want to go with an asynchronous solution using an event loop. Such code is much easier to write and maintain and debug than threaded code.
The difference is with real threads, you never know when you might lose control. With asynchronous "threads" the places where one thread loses control is explicit. Also, locking and unlocking every single variable is really, really slow. It's one of the reason why CPython can beat Java in certain cases. The DNS client that comes with Java is horribly broken. The default is to cache DNS responses forever. You can change this configuration to cache responses for a specific amount of time for all domains.
VeriSign recommends its users who happen to use Java disable caching altogether because it is horrible broken. I heard a report from someone that they have a big problem with running more than one JVM on a box at a time. Java appears to be so resource hungry that it doesn't get along with itself. I recall that Java people would always prefer each process has its own box, though I never really questioned why at the time. Python seems to do a really good job at sharing memory and other things, so I don't have to think really hard before throwing stuff on a box to try it out.
I'll try to collect more data and anecdotes on this, but I may be wrong and I am open to that too. When you use proprietary software , things can go wrong in a really bad way. According to Murphy's Law, if something bad can happen, it will happen, and so you are almost guaranteed that eventually, one of the bad things associated with proprietary software will happen to you.
Combine this with the economic incentive to hurt you, you really shouldn't use proprietary software for anything. Google chose to use Java for its Android platform. It had to make some substantial changes to Java so much so that they simply rewrote the core part of it, the libraries.
Google's version was designed to work with the platform they were building. For whatever reason, Sun's version was simply not feasible, and since it was proprietary, Google couldn't use their code and adapt it to their needs, and then merge their changes upstream.
Sun sued Google because they basically copied the API, meaning, Google's version of the code library was compatible with Sun's version. It doesn't matter what the result was years were spent, fortunes were spent, and careers came and gone as the lawsuit trudged on. I don't say that Sun Microsystems are evil.
As a hardcore conservative capitalist, I know for a fact that not only are all corporations are bad, all people are bad, myself included. That's why I don't put my trust in them anymore than I put my trust in the government. The solution isn't to ban corporations or create marketing campaigns about how bad corporations are.
The solution is to stop using proprietary software. It's really that simple. Think of it this way: There is no corporation that owns the English language. You are free to use it and adapt it whatever way you like, as much as anyone else, and no one can sue you for changing it or re-implementing key parts of it. Even though all the corporations in the world would like to own English, or whatever language everyone is speaking, they can't. So don't give corporations that kind of power by using the languages and software they created and maintain ownership of.
A lot of people are pointing out how wonderful Java 8 is and how it addresses all of the concerns I have. I'll admit that I am not familiar with Java 8. What little I have seen makes me think it's more of the same, but this time with all the right buzzwords. Me: "Communists are traitors to Americal. They want to overthrow the government and enforce their twisted ideas by force at the point of a gun.
Me: "Then explain to me why communism has done those things in other countries, and why it has the highest body count? The Great Leap Forward? Pol Pot? Hitler doesn't even compare to what you guys have actually done. Java 8 is written by the same company and the same people that gave us Java The fact that those languages were horrible messes makes me think that Java 8 can't be much better. When someone pays me to write Java 8, I'll list out all the problems with it.
Until then, realize that "Java 8" is about as convincing an argument as "new communism". And also, by saying "Java 8" fixes that, you admit that it was broken in the first place. That makes me right. If you intend to use Java, I encourage you to write down all the reasons you'd like to use it. Then check the list of things I made above and reconsider. Once you've done that, I would ask that you consider the following languages seriously:.
Once you've examined those languages, if you still feel like you should use Java, I would appreciate to hear why. Please email me at jgardner jonathangardner. I still write Java. I write Java because other people do. I wish I could convince more people to stop using Java and start using Python because I get more done with Python than I do in Java, and I hate being unproductive.
Whenever I code in Java, I feel like I am digging a ditch with a spoon, while there is a backhoe right beside me that is already gassed up and ready to go. I've been getting about emails a week about this article for the past month. I don't know what's inspired so many people to write, but I imagine I've hit a raw nerve. Argumentum ad hominem is a logical fallacy, and those who employ it have already lost the argument. The experiences I've had above were not experienced in a vacuum.
I was working at a huge corporation with many, many Java experts. I've consulted with them in trying to resolve my issues. Every single one I approached with the attitude, "You can't be serious. I must've understood something wrong.
After having writing 10's of thousands of lines of production-quality Java, I think I qualify as an expert, regardless.
Argumentum ad populum is another logical fallacy, and shows you don't have any arguments left. Besides, Java is not popular. The Java thread pig farm Node. During its initial days, Java threads were extremely lightweight when comapared to competing. This are my reasons for hating Java. What are yours? Do you agree with them? Tell us in the comments. You must be logged in to post a comment. Keywords that are locked and we cannot use, but Java does not use them either.
You need something like that?
0コメント