Friday, April 24, 2009
Here's where Java actually takes something cool and makes it suck:
Python is cool. Jython sucks because it's missing key language features like generators (a.k.a. the yield statement.) Lame. IronPython was able to implement generators on the .Net runtime. Why is the JVM so deficient?
Python is cool. Jython sucks because it's missing key language features like generators (a.k.a. the yield statement.) Lame. IronPython was able to implement generators on the .Net runtime. Why is the JVM so deficient?
Tuesday, December 28, 2004
Java hides the socket handle. How cool!
It's impossible to get the socket handle from a Java socket. How freakin' lame. It would be just one more method on Java's socket class, but I guess that would be 'impure.' Whatever.
Here's the whole sad story:
http://groups-beta.google.com/group/comp.lang.java.help/browse_thread/thread/b6b235290b016084/b085116ea9b5fafd#b085116ea9b5fafd
With no good work-arounds, the best solution this programmer could come up with was to use C++.
It's impossible to get the socket handle from a Java socket. How freakin' lame. It would be just one more method on Java's socket class, but I guess that would be 'impure.' Whatever.
Here's the whole sad story:
http://groups-beta.google.com/group/comp.lang.java.help/browse_thread/thread/b6b235290b016084/b085116ea9b5fafd#b085116ea9b5fafd
With no good work-arounds, the best solution this programmer could come up with was to use C++.
Monday, October 18, 2004
Found a bug in the java compiler?
Just wait 3 weeks to "take a number." Unbelievable. Yes, that means after three weeks, sun will assign your bug a number. Who knows when they'll fix it.
This code:
prints "Heinz."
And the funniest part is that the author of this post asks everyone not to be too hard on Sun, because "they are overloaded with bug reports as it is."
Just wait 3 weeks to "take a number." Unbelievable. Yes, that means after three weeks, sun will assign your bug a number. Who knows when they'll fix it.
This code:
final String name = false ? "Heinz" : null;
System.out.println(name);
prints "Heinz."
And the funniest part is that the author of this post asks everyone not to be too hard on Sun, because "they are overloaded with bug reports as it is."
Java is awesome because it's not like C++
No, wait, Java is awesome because it has all these new features like generics, enumerated types, and varags. Wait, those have all been in C++ for years. Why would Java want to bring in all these bad things?
Either way, Java sucks.
Here a Java lover complains that Java is becoming too much like C++.
Tuesday, August 31, 2004
Garbage Collection Sucks
Here is the story of a poor soul who just needs to display 200 labels. And what does Java do, allocate 40 megabytes and never free it, naturally.
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=1vgps6oteirco%24.a4bq78r09mww%24.dlg%4040tude.net&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.java.help
The funny thing is, garbage collection works very well in many other languages, such as C#, Python, and Lisp. What is it about Java that makes garbage collection so consistently suck across all platforms, virtual machines, and compilers?
Here is the story of a poor soul who just needs to display 200 labels. And what does Java do, allocate 40 megabytes and never free it, naturally.
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=1vgps6oteirco%24.a4bq78r09mww%24.dlg%4040tude.net&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.java.help
The funny thing is, garbage collection works very well in many other languages, such as C#, Python, and Lisp. What is it about Java that makes garbage collection so consistently suck across all platforms, virtual machines, and compilers?
The Java Concept Technology Map
When your map looks like a ball of string, maybe its time to reconsider your design?
Nah.
Wednesday, June 23, 2004
Does "test" == "test"? Maybe. It's a "really complicated issue."
Once again, Java forces you to understand the details of the virtual machine implementation to answer this question. Here's a message to pass along to the Java designers: if you have to understand the underlying implementation, then the abstraction sucks. Therefore, java sucks.
Here's the explanation:
The whole sad story is here.
Once again, Java forces you to understand the details of the virtual machine implementation to answer this question. Here's a message to pass along to the Java designers: if you have to understand the underlying implementation, then the abstraction sucks. Therefore, java sucks.
Here's the explanation:
This is really a complicated issue. The easiest answer is to recognize
that you're right about one thing: == compares two references to
determine whether they refer to the same object, but doesn't pay
attention to whether the objects themselves are "equal".
As for the various examples, the complexity arises from the JVM's String
pool, which is is required to maintain. If the same string literal is
encountered twice in your code, the same object will be referenced both
times, because each time the resulting String is obtained from this
String pool. So, for example:
"ab" == "ab" is true
String a = "ab", b = "ab";
a == b is also true;
String a = "a", b = "b";
(a + b) == "ab" is NOT true because (a + b) is not a literal, so is
not taken from the String pool but created at
runtime.
To further complicate the matter, there are certain String
concatenations that are required to be implemented within the bytecode
compiler rather than the JVM. So the following:
final String a = "a", b = "b";
(a + b) == "ab" is true again!
This last example differs from the third only in the qualifier 'final'
for the variable declarations. That's because the word 'final' gives
The whole sad story is here.
Wednesday, June 16, 2004
Want a string with exactly 20 'x's in it?
No problem, either write class definition with a static method and 5 lines of code, or "get a real text editor."
My favorite part of this thread is how people actually benchmarked different 5-line solutions to see which is fastest.
Read the whole story at:
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=f091d05n79mhgr27jetogn5og0a12gi670%404ax.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.java.help
No problem, either write class definition with a static method and 5 lines of code, or "get a real text editor."
My favorite part of this thread is how people actually benchmarked different 5-line solutions to see which is fastest.
Read the whole story at:
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=f091d05n79mhgr27jetogn5og0a12gi670%404ax.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.java.help
Sunday, June 13, 2004
Build it yourself with Java!
Love to build everything from scratch? Love to re-invent the wheel? Java is the language for you!
In this article, a programmer needed a register and authenticate library for JSP. He concludes that using either PHP or ASP, he could download a package in ten minutes and quickly have something working. But for JSP, there was no such solution. Where are all those free-software programmers when you need them? Not using Java, apprently.
Love to build everything from scratch? Love to re-invent the wheel? Java is the language for you!
In this article, a programmer needed a register and authenticate library for JSP. He concludes that using either PHP or ASP, he could download a package in ten minutes and quickly have something working. But for JSP, there was no such solution. Where are all those free-software programmers when you need them? Not using Java, apprently.