Domain: javaworld.com
Stories and comments across the archive that link to javaworld.com.
Comments · 183
-
Re:Microsoft evilness>The Microsoft JVM was fully compatible with Sun's JDK 1.1.
Huh? What about RMI? What about JNI? Having to find work-arounds for that caused me a few sleepless weeks. I even used "delegate" as a variable in one piece of code that someone else later tried to build with J++
...!It's ancient history now, but check this: JavaWorld article.
Dude, the MSJ++ product gratuitously used the extensions. It didn't make it that obvious.
> Sun claimed such features could harm the portability of java. But extending a programming language is not a crime.
It's a breach of contract if you say you won't do it, then do it and stick the other guy's trademark on it. Which is what MS did. They called it "Java". It wasn't Java. Sun own that mark, and IMHO they did the Right Thing in defending what it stands for. And they won that one.
Of course, what was amusing at the time was that Netscape's VM was far less compliant than MS's. But that was because it was so bug-ridden - lots of comments floating around about "malice vs stupidity"...
:-)Go on. Add the JVM to your list of reasons to hate them! You won't be alone...
-
Re:Language DifferencesUsing GTK native peers would accomplish this easily, but to do it in Java code seems impractical.
Swing implements GTK through com.sun.java.swing.plaf.gtk. I don't honestly know how difficult it would be to have the Swing team add the ability to ask the OS which theme is current, but it would probably be a hell of a lot easier than rewriting all the native peers to use AWT instead. They have been very responsive to my inquiries before, so I would highly recommend it if that is something you really want.
According to the API reference this creates a lightweight component with no native peer, much the way Swing does. A JButton is a subclass of java.awt.Component too.
Looking at the page you referenced, what it said was A lightweight component is a component that is not associated with a native opaque window. So, I guess the Component class itself is not associated with a Peer... utilizing any of the other AWT classes should cause it to be heavyweight. In fact, here's the list of AWT Peers from java.awt.peer in 1.5:
ButtonPeer,CanvasPeer,CheckboxMenuItemPeer,Checkbo xPeer,ChoicePeer,ComponentPeer,ContainerPeer,Dialo gPeer,FialDialogPeer,FontPeer,FramePeer,KeyboardFo cusManagerPeer,LabelPeer,LightweightPeer,ListPeer, MenuBarPeer,MenuComponentPeer,MenuItemPeer,MenuPee r,MouseInfoPeer,PanelPeer,PopupMenuPeer,RobotPeer, ScrollbarPeer,ScrollPanePeer,TextAreaPeer,TextComp onentPeer,TextFieldPeer,WindowPeer
Imagine invoking a new Java VM for every incomming web process!
I don't need to do that. I start up a couple threads/selectors for each port, but I have no need to start a new process or thread for each request. I did look into using some of the Apache java mods, but I couldn't get them to work right.
I meant that the look and feel doesn't match my desktop GTK+ theme as I mentioned above.
Swing can, if we can determine which one is current... then again, maybe the GTK theme in 1.5 DOES use the currently selected GTK theme? Have you tried GTK in 1.5 to test it?
All one saves with Java is a compile step
After working for companies that build everything on Windows, Linux, Solaris, HP-UX, AIX, AS/400, etc.... I can't tell you how happy I am to only compile once. I no longer have to modify the makefile every time we try to build X or Y on platform Z... it really is a HUGE timesaver for the developer.
In addition, I have downloaded services for my BSD box (that were newer than the Port Collection), and been completely unable to figure out how to get them to compile properly, and fix the errors. Had they distributed it as a jar (especially over JNLP), I would not have had to go through all that hassles, and those services would be currently running.
On the other side, I believe performance will suffer, particularly on non-Windows platforms where the Sun VM is grotesquely slow.
I am not sure where you have been running it, but the Linux JDK on my 350MHz BSD box has no apparent speed problems at all. And I haven't even tried JDK 1.5 on BSD yet, which should be faster still.
Non-blocking I/O is indeed efficient but this feature is at least as easy to use in C.
How so? It is extremely easy to use in Java. I wrote a couple base classes (which I learned how to do originally from this article), and now all I have to do is call super() and call startServer(port).
On the flip side, I have done some select() work in C(not C++) and found that the behavior was inconsistent between the various platforms I mentioned above. Some of the functionality wasn't implemented on a couple of the platforms, and some of the functionality behaved completely different with Winsocks 2. It took me less time to write the NIO base classes for Java than to debug the s
-
Being sandbagged by java?
"The constant security-related problems associated with Microsoft's products are due to its fundamental platform architecture. Java technology, in contrast, enjoys exceptional immunity to viruses because of its sandbag architecture."
I think she means sandbox architecture -
ummm ok
that's cool and all,..but what are smartcards exactly?
I was looking all over the site and all I could make of it was that they were cards with microprocessors that could be contactless?
I did find this and it told me that it could be storage medium or a microcomputer, Could these be really cool ways to add a second or third CPU to my box??
oh yeah, check this out too
404'ed! -
Re:How can Java be closed source?
I would have to agree. I actually went and looked at his website.... I didn't see a single class that one wouldn't find in a Java text book or seen posted on a Java forum.
In fact, the author clearly states his ideas for the Launch a Browser from anywhere class was taken from a Java Tip on JavaWorld
-
Re:Startup sure, but how fast does it run?
"In Java, you'd have to define an interface and have all possible objects you're interested in registering with implement that interface."
Isn't this a good thing? Don't you want to think about everything that wants to use register()? What about the posibility of name-space clashing, i.e. that register() registers itself with an object that supports the register() but in a totally unexpected way, and was never intended to be used in this way?
I wouldn't say it's another level of abstraction, but rather a shortcut. One that is prone to unexpected behavoir. Java tends to not trust the programmer and forces the programmer to code in a standard fashion. This is why there isn't multiple inheritence and multiple parameter polymorphism. The java people consciously made this descision because they thought it would result in code that is cleaner, more readable, less prone to bugs. See here. Also java is getting templating, type-safe enums, and auto-boxing and a host of other features in version 1.5 "tiger" due out later this year.
If 2 languages have classes, inheritance, data-hiding, and polymorphism, I would say that they are at the same highness. Am I missing other features of python? I am not a python guru. -
Re:Memory Isssue
http://www.javaworld.com/javaworld/javatips/jw-ja
v atip130.htmlAn object with no fields requires 8 bytes of memory. I would guess that four bytes are a reference to the class, and the other four are related to synchronization.
-
Re:PHP and Java
-
Re:Not quiet
Sure, it's possible to generate a class file with invalid, 'dangerous' byte code by using a Java assembler, but it won't pass the mandatory verification stage of the virtual machine.
Unless you turn the verifier off.
-
Re:Enumeration classes
This isn't the forum for a detailed discussion, but I actually prefer enumeration classes now over simple enumerations. The basic idea is to write a class something like:
final class Color {
[snip]
static final Color RED = new Color("red");
static final Color BLUE = new Color("blue");
static final Color GREEN = new Color("green");
}
This idiom works great in some situations, but can be an absolute nightmare in others - see this article for some examples. Real enumerators address some problems that can't be solved using this mechanism. -
Re:enumerators
The type-safe enum pattern shows the correct way of handling enumerations. And you can the Jakarta Commons Lang library [apache.org] to make it a bit easier.
The typesafe enum idiom is broken. It looks pretty but it's not a substitute for real first-class enumerators. In many cases it is actually worse than using plain ints as it can lead to very subtle bugs.
This article discusses some of the problems with it. -
Quality Java Client Apps are possibleI've been writing Client side Java GUI programs for about 3 years now. Some have been small interactive graphing tools, but more recently I've been working on a large Debugging Tool API program. In my experience, it is possible to create Swing applications that are:
- Visually pleasing
- Fast and Responsive
- Scalable
However, I have found to achieve these goals at a high level of quality has taken significant experience and many dead-ends. Java Swing GUI's are NOT for "rapid GUI application" the same way that VB is marketed as for instance. It takes solid knowledge of the Swing API - which in my opinion is a very powerful flexible GUI API, but one which comes with lots of "gotchas" to watch out for.
In my experience I would say that a good Client side Java GUI can be developed, but the following pitfalls need to be avoided:
- Avoid GUI Code Generator tools to design your GUI layouts. They lead to highly unmaintainable GUI code but more importantly to less consistent screens (have a read of Building user interfaces for object-oriented systems for more details
- Build a decent framework that sits ontop of Swing to automate and standardise the process of view creation. I've found Swing GUI work can be made significantly more productive and easier to maintain if Swing screens are being automatically generated from data objects. For example, I use a Field builder to generate appropraite Swing fields (text box, combo box, check box etc) depending on the Type of the data field (String = text box, Boolean = check box etc). This way the interface remains constant and up to date with any chances to the data model.
- Know when to deligate work to a background thread, instead of tying up the AWT Event thread
... this is a common mistake in Java GUI's that gives the perception of an unresponsive or frozen application - For large applications, distribute a decent Java Runtime for your application to run on. This is the approach Borland takes with JBuilder. You are distributing a big app, so why not bundle with it a robust JVM that you have tested your app on?
-
Type Safe Enum considered harmful
Well, since Effective Java was published a bug has been found in this idiom.
This JavaWorld article describes the problem in detail.
Basically if you deploy such a class in a multiple classloader environment you can get multiple instance of the same static final enum value thus blowing your equality testing.
Of course C# has included enums in the language. Because despite all of their faults, programmers like working with enums. -
gee, what timing (JavaWorld goes "subscription")the price for the service really needs to reflect the cost of the service. obviously, $1 per page is too much, as are rediculous subscription rates like the $49.99 for access to the once-free Javaworld Archives. You'd think some of these places might make a survey of readers before bringing up such rediculously non-net-like price tags. Nobody who took micro-econ would have come up with such an overvalued view of such things (which can all be fetched by careful use of google caches anyways).
A question on that -- do the authors of old articles get any more compensation when their material is effectively "sold" a second time (which is certainly the case in JavaWorld). In England, Robert Fripp won a very significant lawsuit on the issue of artist compensation when the back catalog of EG was sold to Virgin and BMG without the bands getting a dime at first.
-
Java is slow?
I'm hardly a Java junky, but I've spent a lot of time recently with the language and I've heard a lot of complaints from my peers about Java being slow. Most of the time, just like this author, they're wrong! Java isn't slow, but sometimes you do have to program more thoughtfully to make Java fast.
First things first, though. No one would ever claim that JDK 1.4 is the ultimate Java speed demon. Even the "HotSpot" in server mode is going to be slow if your code isn't written well. But the author fails to do any profiling, and fails to give anyone even a hint as to why Java doesn't perform well. But I shouldn't get on him about his coding, or lack of profiling... neither issue is the reason his test showed Java to be slow.
The real problem: Firs, I'll cut him some slack for not profiling. However, I won't cut him any slack for using an interpreter instead of a JIT compiler. Java's been shown time and time again to be as fast as FORTRAN/C++ when using a good compiler, rather than an interpreter. *sigh* When will the madness end? A 0.07 second query to Google should explain that one to even a novice. Java IS fast. Interpreted byte-code is slow. Java != interpreted byte code; Java is a language.
Anyway, here's a link to a weak, biased, and not so rigorous argument backing up that statement. But, it's an easy read for Java newbies, so I'll risk posting it anyway: Java is Fast for Dummies(tm) -
struts and JavaServer FacesDon't now if they mention this topic or not in this book -
If you are currently using Struts 1.1, you should consider the upcoming changes to it vis-a-vis Sun's JavaServer Faces specification.A recent and good introductory article about JSF is A First Look at JavaServer Faces
Craig McClanahan mentioned the transition to using JSP Faces in one of his Struts presentations at the recent ApacheCon and it has been discussed on the Struts mailing lists (e.g. http://www.mail-archive.com/struts-dev@jakarta.ap
a che.org/msg08457.html -
Re:MVC to all who say "I just write..."
Patterns and UML are fine, and MVC has its place too, but currently it's overrated, suffering from the hammer/nail syndrome. Check out this article on why in many cases, real OO is better than MVC:
-
Re:Why use struts? Just do it yourself.
You're right that simple MVC webapps are easy, but the easiest approach is actually the one described in this article by Govind Seshadri.
What your approach misses that you get from Struts:
- validation of form submissions (to java types, regexps, whatever)
- automatic population of form beans, which leads to...
- automagic prepopulation of forms from beans used earlier in the session (with struts custom tags)
- tool support for designing complex sites (there are lots of GUIs for struts these days)
- you don't need to write or maintain any of the framework :)
Every framework brings with it some constraints in how you work, but pays off in spades if you use all the features. Struts is no exception. If all you're doing is the stuff you describe, Govind's article might improve your life a little. If you build complex sites, Struts will simplify your life a lot.
Just a quick concrete example: in struts, the equivalent of the IndexServlet you describe is the DispatchAction. You'd configure like so:
Then you can write:
package funky;
class IndexAction extends org.apache.struts.actions.DispatchAction {
public ActionForward login(...);
public ActionForward mainmenu(...);
public ActionForward saveform(...);
public ActionForward etc(...);
} ...and the methods are automatically called depending on the value of 'f'. Like you said, "Of course some actions can be used for more than one thing if you code smartly.", and in this case the smartly was done for you ;)
-Baz -
Come on - Use your eyes,From the JCP FAQ
Q: Whats a JSR?
A: A JSR is a Java Specification Request. This is the document submitted to the PMO by one or more members to propose the development of a new specification or significant revision to an existing specification. There are currently more than 90 Java technology specifications in development in the JCP program, including the next versions of Java(TM) 2, Micro Edition (J2ME(TM)), Java(TM) 2 Platform Enterprise Edition (J2EE(TM)), and Java(TM) 2 Standard Edition (J2SE(TM)).From Effort on the edge, Part 1
But how can you, as a JSR lead, grant that right, where those patents are owned by the companies that make up your expert group? The JCP 2.5 JSPA addresses both in-bound and out-bound intellectual property. In-bound intellectual property is the set of patents, licenses, or other rights that you and your expert group members bring to the table. Out-bound intellectual property signifies the rights of your specification's users, reference implementation, and compatibility test kit.
In essence, when your experts join your expert group, they grant the spec lead the right to sublicense the existing intellectual property they bring to developing the JSR. That not only includes patents, but copyrights, trademarks, and trade secrets as well. You and your experts can, in turn, choose whatever license form you desire for your output. If you choose the new Open Source License, you steer your technology's users clear of possible infringement on patents, trademarks, or other intellectual property they might not initially be aware of.
Sun is playing by those new rules. "Prior to the use of JCP 2.0, [Sun's Java licensees] were the only ones to gain access to the technologies needed to implement the things that comprise the Java technology from Sun," explains Gingell. "And licensees typically got all of the specifications, implementations, and conformance tests along with service and support programs as a bundle.
"One way to look at JCP and its evolution is that it's a process of unbundling all of these things. As of JCP 2.5...the specifications, reference implementations, conformance tests are all separately available," adds Gingle. "J2SE is not today available under the terms of JCP 2.5. Sun did commit to making available some of the JSRs it has led under 2.5 terms prior to the adoption of 2.5 by the JCP, and we have committed that all prior JSRs would be available under those terms but on an indefinite schedule. The expectation is that those changes will occur as maintenance on the technology occurs, roughly over the course of a year or so we'd expect."
To facilitate open source J2SE implementations, in August 2002, Sun announced a scholarship program for qualified nonprofit organizations that require access to Sun's compatibility tests to verify their adherence to JSR standards. Nonprofit groups that qualify can obtain Sun's compatibility test kits free of charge.
Gingell notes that, "When J2SE is available under the terms of JCP 2.5, if someone wanted to implement it from specifications, they could do so without also licensing the reference implementation. They would have to license the TCKs to verify that they'd made a compatible implementation. They would thus have to be a TCK licensee, which would be available for free to qualified nonprofits."
At least Sun is making concrete steps towards being more open.
Where are the equivalent public declarations from Microsoft? -
Re:Privacy Policy?
I hope that yahoo! does not have the same lax privacy policy for paying customers as for non-paying customers
The really interesting part of all of this is that when Yahoo first started, thier service was exemplary. They were effecient, thoughtful, smart, and they implemented a host of useful resources.
Then, like the vast majority of the dot-com companies, the VCs and big-business types pulled the wool over the eyes of the original founders(people like Jerry Yang). Or, put another way, the original founders sold out. After that happened(about 1 year before the dot-com crash) Yahoo's service has continually degraded. That's about 2 years of constant monotonic degradation of service. Now they're insisting on customers paying for a service that was taken for granted 2 years ago?
Understandably the dot-com business model has all but evaporated in the face of diminished advertising revenue. (Ad companies are paying 1/10th what they used to per ad). This coupled with the fact that the stock inflators have all left town or gone broke, pretty much means that Yahoo has very little to go on. This of course is true of almost all the .com's, as the majority of them relied on advertising for revenue. (except sites like e-bay, etc. who are doing fine in this kind of environment).
It's very unlikely that any of this will change, as consumers are more and more fervently seeking out products that will block advertisments. The latest batch of "pop-up" style advertising techniques has pretty much buried any respect the advertising industry ever had in the mind of the consumer. Said another way, advertisers are paying less and less per ad because they percieve how ofter those ads are being avoided. In turn they insist on "eyeball time" and make even more hostile ads. This in turn increases the consumers anger, and the customer finds even more effective ways to block out all advertisements. It's a cycle that bears very little hope for the advertisement based web-business model.
I would suggest that there is a light at the end of the tunnel. But it requires the vast majority of us to embrace 2 distinct technologies. Wireless broadband, and Peer-To-Peer file-sharing, HTTP, and computing.
Those are big hurdles, but in conjunction they appear to be within our grasp:
1) Wireless broadband means buying a dedicated commodity unit for ~$150(before prices drop) that will provide 10Mbps 24/7(does your telco/cable co offer this?). Most importantly, there is no monthly cost...goodbye $50/month to Bell X.
2) P2P transfer of not only files, but also dynamic content like webpages. This would involve a dramatic paradigm shift away from the current client-server model. But with > 100 10Mbps nodes per square-mile in urban areas, and intelligent caching, there's every reason to suggest this is possible.
The client-server model that the "old internet" has relied on is broken. The ad-revenue cycle is destroying quality of service, shutting down many good sites permanently, and we're losing vast quantities of content in the process.
Currently 99% of the server load is on 1% of the connected machines. Leaving the other 99% of the client base Idle. A small investment of ~$150(about the price of a 2nd harddrive, or a new soundcard) could change all of this. Then those 99% idle client boxes could become very powerful P2P nodes.
This is not the distant future folks, it just takes a catalytic moment to get everyone to buy that 802.11X card. It happened to CD-ROM drives, sound-cards, etc. sooner or later a new standard component is adopted. Then the folks at Dell etc. will include one in every standard box they sell. Hopefully this will happen sooner rather than later. Then the OSS/private sector can build HTTP over P2P(challenging, but not impossible within this infrastructure).
I'm sincerely hoping all of this happens soon, because many great web-sites are going down, and we're losing a lot of good content. There's less and less in that Google cache every day, and we need to change that. -
Re:Architecture -- not interaction design
Just been through all of the current posts, and no-one mentions H-MVC - hierarchical MVC. There's an article on it here. It's an interesting adaptation of MVC for complex guis, and can go right through the UI/client from the base to the smallest, tip-most configuration dialog.
-
Re:Singleton Pattern / Double-check Locking
Double checked locking does not work in Java. Javaworld is fed up with people posing new solutions to the problem. See these articles
They specifically cover your solution in that article. Hint: yours only works if there are no Object references or more than one primitive member in the class. -
Re:Tisk, Tisk...
-
Commercial prior art: Activerse, DingBot SDK 1998In 1997-1999, Austin, TX-based Activerse developed a product called DingBot SDK, debuted in early 1998 released for general use in late 1998.
This product was a Java-based development toolkit for building IM bots. The SDK was made available for free download, and was used to build 'bots for the Ding! buddy list / IM product, though the Java code could easily be repurposed for any buddy list which used similar design principles.
Activerse did not obtain patent protection on this technology before it was purchased by CMGI in April of 1999. It is unclear what CMGI might have done with the technology and intellectual property since that point.
At first glance, ActiveBuddy's SDK appears to be very similar to the Activerse DingBot SDK. The patent claims conflict with this (and potentially other) prior art, and this patent should never have been granted. Eliza aside, the existance of commercial products 1-2 years before ActiveBuddy's Aug 2000 filing demonstrates prior invention.
This patent in particular is a prime example of the egregious and continuing inability of the PTO to do adequate due diligence on patent applications. Anyone seeking to overturn this patent will need to file a reexamination request and associated affidavits related to the prior art. In the preparation of this material, the assistance of former Activerse developers and executives could prove useful; they should be sought out for this purpose.
-
Commercial prior art: Activerse, DingBot SDK 1998In 1997-1999, Austin, TX-based Activerse developed a product called DingBot SDK, debuted in early 1998 released for general use in late 1998.
This product was a Java-based development toolkit for building IM bots. The SDK was made available for free download, and was used to build 'bots for the Ding! buddy list / IM product, though the Java code could easily be repurposed for any buddy list which used similar design principles.
Activerse did not obtain patent protection on this technology before it was purchased by CMGI in April of 1999. It is unclear what CMGI might have done with the technology and intellectual property since that point.
At first glance, ActiveBuddy's SDK appears to be very similar to the Activerse DingBot SDK. The patent claims conflict with this (and potentially other) prior art, and this patent should never have been granted. Eliza aside, the existance of commercial products 1-2 years before ActiveBuddy's Aug 2000 filing demonstrates prior invention.
This patent in particular is a prime example of the egregious and continuing inability of the PTO to do adequate due diligence on patent applications. Anyone seeking to overturn this patent will need to file a reexamination request and associated affidavits related to the prior art. In the preparation of this material, the assistance of former Activerse developers and executives could prove useful; they should be sought out for this purpose.
-
Javascript is not just for browsers anymore!
I too usually surf with Javascript turned off (tip: add the Preferences toolbar to mozilla to be able to toggle js/java/cookies/etc. on and off quickly) but Javascript is gaining ground as a more general purpose language. See a recent article in Javaworld on using Netscape's free Rhino library to add javascriptability to your applications. Also, Javascript is how many XUL mini-apps are implemented.
-
Maybe not so pointless after all
What a pointless "technology".
"Pointless" would be to argue with you about the meaning of higher education.
Let's think what the article actually says: IBM has employed a technique which lets them estimate the original distribution of data by adding a certain amount of random data with know distribution. That surely should be useful in other areas as well?!
A Google seachr on Random Perturbation gives quite a long list with applications in wheather simulation, computer graphics, chaotic dynamical systems, etc.
Still pointless? What about a search in the then NEC Research Index? Wowwww... Pointless, eh...? -
Leaning Java on the web
It's probably no suprise that the best place to learn java is http://java.sun.com/. Why? Because of the Java Tutorial and the Java Developer's Connection.
The Tutorial will ease any programmer familiar with similar-level languages in to doing Java devlopment in a few hours, and given a couple of days to go through the pertinent parts of the Tutorial, said devloper will be able to sart accomplishing a lot. The JDC has a bunch of tips, many forums and the bug database. Getting answers to particular problems at the JDC is pretty damm easy.
The Java-specific sites are probably going to be the next best resource. Javaworld usually does well, so much so that I rarely need to go elsewhere.
HTH, /mike. -
Re:What the heck is autoboxing?
The feature that I want to see added to java is that I want to be able for the java vm to create objects on the stack. Then if they get assigned to a member pointer, get promoted to the heap. This way you could keep objects on the stack where they could be easily collected when the function that created them ends scope.
That's already part of Hotspot:
"A generational collector takes advantage of the fact that in most programs the vast majority of objects (often >95%) are very short-lived (i.e. are used as temporary data structures). By segregating newly created objects into an object "nursery", a generational collector can accomplish several things. First, because new objects are allocated contiguously in stack-like fashion in the object nursery, allocation becomes extremely fast, since it involves merely updating a single pointer and performing a single check for nursery overflow. Secondly, by the time the nursery overflows, most of the objects in the nursery are already "dead", allowing the garbage collector to simply move the few surviving objects elsewhere, and avoid doing any reclamation work for dead objects in the nursery."
Here's an in-depth explanation with pictures. -
JavaWorld storySun's announcement that they were withdrawing from the ECMA process was in December '99.
The March 2000 JavaWorld has an interview with ECMA officials that, as Gosling says, makes for interesting reading:
- ECMA responded by chastising Sun for causing an "enormous waste of experts' time and companies' money." In an interview today, a top ECMA official said Sun's criticisms of the group are merely a smokescreen for its real motives for ending the relationship.
"They just don't want to give up control" of Java, said Jan van den Beld, secretary-general of ECMA. "It is 100 percent my opinion that Sun is publicly saying they want to make Java a standard, but privately not making it happen."
-
Re:Technology *does* change "too fast"
(* Do note that we are generally moving away from efficiency towards clarity and simplicity. *)
How do you explain that sh*t Java then?
Java is simpler and clearer than C++. Or do you disagree?
My point was that if it was compiled, it would have an edge over a VM.
You can compile it. But the report (and this one) shows that the compilation vs VM issue is quite irrelevant. You can create fast code with a VM!
Where did I say that Java sucked because that writer was stupid? It is both. Java AND that writer suck.
You put it on a page that is called: "Why Java Sucks". Put it on a seperate page if it's a seperate topic.
(* blaming the language for having flaws that are not explained (what is wrong with the reflection in Java?) *)
It is too convoluted. There is plenty of criticism of it on the web and ng's. Go look.
I know it has limitations. The point is that you should explain your claims. Complaining that X is lousy without giving proof or even telling people why it sucks will make me ignore it. Who are you trying to reach with your critique? Programmers that already know all about Java's reflection limitations (only an issue to experts really)? If they already know the limitations, what good does your page do? Your critique is pointless.
What is wrong with being multi-paradigm? C++ can be multi-paradigm.
Multi-paradigm means chaos then. I prefer clean design, not Perl or C++.
Only zealOOts think one paradigm fits all.
I don't remember saying that Java needs to replace all competing languages. I do think it's a very good one. BTW, you can use various scripting languages with Java. You can also call native code if Java doesn't cut it.
How hard would it be to add functions to Java anyhow?
Excuse me? Could you elaborate? -
Theoretically interesting/Practically irrelevantThis obsesion with algorithms is theoretically interesting but practically irrelevant. When was the last time you needed to write a sort algorithm? (And by needed I mean qsort and friends and their source were of no use.)
In the real world 99.999% of people, smart and stupid, should use the algorythms that smart people like Knuth have invented. It would take a stupid person to think that in all but the 0.001% of cases there is any need for any more. And if you are wondering if you are in the 0.001% of cases - you're not.
James Gosling said the same thing recently.
The rest of the world learnt a long time ago to stop re-inventing the wheel why can't CS people learn the same lessons. Algorithms may keep your CS master happy, but they won't help you in the real world.
-
This was my final year project thesis
This was my final year project thesis. Just remember the golden rule unstructured 2 structured == convert 2 XML I wrote a [very bad] program in C++/Perl/tcsh IPC=pipes to add XML tags to English, and then index them into a search engine which would use the lingual data stored in the XML tags to help the search.
NIST does a MASSIVE competition on this annually. I don't want to be an XML-buzzword whore <Arnold Schwarzenegger accent> (XML commando eats Green berets, C++, Java, Perl, COBOL for breakfast)</Arnold Schwarzenegger accent> but you can't beat XML for easily converting anything that you can make sense out of into computer readable format. Real h3cKoRs use SGML, but us underlings have to stick with things we can understand like XML. As for expandability, if we want to encode something else into the document, then just tag-it-and-go
It took me 200 hours to fish out all these links (before the Google days), I don't want anyone to have to waste as much time as I did feeding the search engines exotic foods. It's a year old so pardon me for the odd broken link, armed with these you could probably turn jello into XML ;-)
My favourite bookmarx
PROJect[21 links]
Beginners' Guide[13 links]
Berkeley Linguistics Dept. Course Summaries, general stuffzzzzzzzzzzzzzzCryptic IR Vocabulary defined
Explanations of weird words like hypernym zzzzzzzzzzzzzzHow do we produce and understand speech
How Inverted Files are Created - Univeristy of Berkeley zzzzzzzzzzzzzzNLP Univ. of Indiana, very good basics e.g. word sense d
Simple langauge - useful.... zzzzzzzzzzzzzzWhat is Natural Language Processing, links
What is POS tagging........ zzzzzzzzzzzzzzWord Sense Disambiguation defined
Word Sense Disambiguation in detail, scroll down far zzzzzzzzzzzzzzWord Sense Disambiguator - LOLITA (tested at MUC-7 and SENSEVAL competition as best)
XML for the absolute beginner
HTML, XML stuff + parsers[19 links]
Apache plug-in that uhhh does stuff with XML zzzzzzzzzzzzzzConvert COM to XML
convert XML, HTML to Unix pipeable formats zzzzzzzzzzzzzzconverters to and from HTML
expat XML parser zzzzzzzzzzzzzzHTML Tidy - converts HTML 2 XML + source code!!
Parse DB (RDBMS, whatever) to XML zzzzzzzzzzzzzzPerl-XML Module List
PHP Manual XML parser functions - what the hell are they talking about, PHP Virtual M... zzzzzzzzzzzzzzPublic SGML-XML Software
Pyxie - XML Processor for Python, Perl, etc. zzzzzzzzzzzzzzSGML+XML tools.org
The XML Resource Centre - massive number of links zzzzzzzzzzzzzzW4F wrapper - wrapper converts XML to HTML
XFlat - convert flat file into XML zzzzzzzzzzzzzzXML Parsers and other XML stuff
XML.com - Parsers, etc. zzzzzzzzzzzzzzXML-Data Catalog System - uhhhh looks close
XTAL's general converter - convert anything 2 XML
other Background[8 links]
Is Linux ready for the Enterprise, scalable... zzzzzzzzzzzzzzLinux reliability
Linux Versus Windows NT, Mark(sysinternals bloke) zzzzzzzzzzzzzzPC reliability (pcworld)
SPEC - Standard Performance Evaluation Corp. zzzzzzzzzzzzzzSystems benchmarks
TPC - Transaction Processing Performance Council zzzzzzzzzzzzzzUnix Beats Back NT In EDA Workstation Arena
Proper TREC(-8) QA systems[2 links]
pg. 387 LIMSI-CNRS pretty deep parsing[2 links]
More links....
NLP, IR links - lots to corpii, etc.
pg. 575 U. of Ottawa and NRL (shit system, got 0%)[1 links]
LAKE Lab
pg. 607! University of Sheffield (crap system, but OPEN SOURCE!)[2 links]
GATE - FREE IE app w`source code
LaSIE - ER, coreference, template (cv)
pg. 617 Univ of Surrey (inconclusive matches)[2 links]
System Quirk - Or is this their search system..... Hmmmmmm
Univ of Surrey - pointers (hopefully this is their WILDER search system...)
SMU - Pg. 65[1 links]
Natural Language Processing Laboratory at SMU
Textract[2 links]
Cymfony - Technology
Textract - State of the Art Information Extraction
Xerox uhhhhh maybe[1 links]
Xerox Palo Alto Research Center
(OVERVIEW) 1999 TREC-8 Q&A Track Home Page
NLP bloke, Univ Sussex
Tcl-Tk[4 links] Tcl tutorial
Tcl-Tk Contributed Programs Index
Tcl-Tk Resources, sources
TclXML - manipulating XML using Tcl-Tk
Artificial Natural Language - Is this what I'm trying to parse into...
Comparison of Indexers - Prise vs. Inquery vs. MG, etc.
Eagles - Language Engineering Standards
Language Technology Group - lots of modules!
LDC - Linguistic Data Consortium, lots of corpora
Lexical Resources
Links 2 resources, indexers.....
Lots of IR stuff, University of uhhh
Managing Gigabytes Indexer
Managing Gigabytes Manuals and stuff
Htdig search system
NLP & IR (NLPIR, NIST) Group
OVERVIEW OF MUC-7-MET-2
Perl XML Indexing - XML search engine type thing
Phrasys Language Processing Software Components (money)
QA HCI bullshit
SIGIR - TREC-type thing, resources
SMART indexer system documentation
Text REtrieval Conference (TREC) Home Page
The Natural Language Software Registry
Thunderstone IE and IR products
WordNet - FREE DOWNLOADABLE lexical English database
Page created with URL+, nice utility for working with internet shortcuts -
Re:Asserts
I'm one of those people who really don't get assertions either. But regardless, from what I've read in order to use them, you have add a "-source 1.4" flag on your javac command in order to compile which I think is weird... I mean, if you're going to add a feature, you should add it and not start messing around with flags.
-Russ
-
Re: enums and Java
if I defined all the enum lables as finals in Java, and then used them in switch statements/assigns on variables, I don't get the type-checking I do in C. So in C:
True, which is why you shouldn't do enumerations in Java that way
enum PersonType aPerson = Desktop;
would be flagged as an error, but in Java the equivalent
int PersonType = DESKTOP;
would be perfectly fine as far as the compiler is concerned.
This could be a problem. :-). See this article for a description of how to do typesafe enumerations. However, as is pointed out in the article, you still must do more work in Java than in C++ to accomplish this. -
Re:Genericity?
-
Re:apply the razor please
Oh, goody! The chance to duke it out in front of an audience!
I have done development in both. I can definitively say that the ;-) .Net class libraries are in fact stable and full featured.You'll excuse me if I have my doubts based on the previous track record.
I'll bite. how is this more evil than the file system hierarchy imposed by Java?First things first. There is no file system hierarchy imposed by Java. The usual package naming convention you see is just that, a convention, and doesn't signify that the packages are in a parent-child relationship. As for the folders, I guess it was just a convenient way of representing the existing convention in a file system. A repository/database based system like Visual Age for Java is free to use whatever it wants. You can just as easily put your classes in a flat list of directories corresponding to packages as long as you have a compiler that understands it (easy to do in a day by driving JDK compiler). The point is, you don't violate the language or API specification by doing so.
nothing similar to inner classes (very powerful feature in Java but easily misused)
yet i could say the same for operator overloading.I wouldn't say inner classes and operator overloading are at the same level of utility. One is (useful) syntactic sugar, the other is a way to create fine grained objects not easily represented otherwise. See this for an example of their use. This is not to say that operator overloading isn't useful, it's a great way to write seamless data structures. In fact, I wish I had them in Java, but with names and interfaces and without the C++ syntax.
no classloaders (and no, assembly loading is not the equivalent) How is it not the equivalent?It's not fine grained. AppDomain's and Assembly's are okay when all you want is to isolate unrelated components from each other (like web apps in a servlet engine), but they fail when those components need to interact with each other. In effect, this precludes a whole class of software that use aggressively component based architectures, like JBoss, HP's Core Services Framework, Apache Jakarta Avalon or the Eclipse IDE Framework, for that matter. The basic problem is that isolation and resolution are lumped together in
event handling integrated into language (gack! twice) .NET, and you won't be able to isolate components and resolve references from one component to another at the same time. See the Developer's Guide on MSDN for details. I'd love to be proved wrong on this because I like some of AppDomain's details and similar stuff with more advanced functionality is in JSR 121 for application isolation, so let me know if this line of reasoning is not correct.
why gack?Because it's a big mechanism with lots of artifacts hard coded into the language itself. Funny, because you pointed out the difficulty of using operator overloading correctly when I see the cryptic application of operators for managing event listeners in C#. See this article on why delegates are not a good idea, it covers the basics even though it's not about C#'s version of them (I like Objective-C's delegates though, but they are different).
metadata attributes inside source code (gack! three times). Do you know how elegant metadata would make JUnit?Reflection works just as well, thankyouverymuch. I find it fundamentally wrong to stuff code with metadata when you can have it separate. I like the descriptor stuff in J2EE, I wouldn't want bits of it in my source code. Yes, sometimes it's more work, but it gives you the flexibility to change mappings (it's always a mapping to something else, be it EJB's, WebMethods in
.NET, or whatever) on the fly. Of course there are exceptions, it becomes tedious when there is a 1-to-1 mapping from the code to target domain with no properties on the mapping itself. A canonical example is the @deprecated Javadoc tag in Java. In the end, I think it makes a big difference to have discipline to not abuse such a system, and all previous experience says that MS doesn't have that.But that's just me, and objects in the mirror may seem further than they really are to you...
-
Alternatives to UML
Javaworld had an article on OO design recently, outlining alternatives to expensive modelling tools such as UML. Read more here.
For those that don't feel like reading the article, basically the author found that UML doesn't make life easier all the time, and the tools are painful to use efficiently.
So he decided to do away with all CASE / Modelling tools and draw things up on a whiteboard, and take photos with a digital camera. Using a software package to make the pictures clearer (correcting lighting, angle etc), the model diagram is available nearly immediately.
The costs are once-off (most software firms have whiteboards, markers already etc) for a digital camera and the whiteboard photo software. I quite liked the mix of seemingly primitive technology used, and pretty much all costs are once-off. Sure you still have to train them up about understanding some parts of the diagrams, but it would be a lot more intuitive. Training for the software... give them an hour for a slow learner.
-
Interesting to see where this goes...Microsoft's big problem is that they don't play well with others. Hence the IBM divorce. Hence their limited (nonexistent?) role in the development of an XSL standard, despite their domination of early XSL efforts and their ongoing efforts to create new XSL software. Hence their ongoing feud with Sun, which had more to do with technical quibbles about AWT and native methods than any conspiracy to "poison" Java.
People often see a dark agenda in MS's actions. And sometimes that's actually true. But I think they play Cousin Dudley more often than Voldemort.
With
.NET, MS has really conflicting goals. On the one hand, they need something to compete with Java, and will insulate apps from the convoluted NT API. But that means something very similar to Java, a software platform that's hardware agnostic. And that means cooperating with other companies, something they just don't like to do. Not a formula for success. -
Re:Why objective C?
Actually, Java does support Dynamic Proxies. Check out this class, this Javaworld Article, and this overview at sun.
ebw -
Re:I hope it changes my life as much as Jini did!
Jini lacked a killer application
I'm sure the following people might disagree with you:
- U.S. Army
- Raytheon (U.S. Navy)
- Cisco
- eko systems (medical data and equipment)
- More success stories here and here
Jini isn't dead, it is just poorly marketed by Sun (Jini is about services not devices and what is the current trend in industry? - that's right, service based systems ala web services), probably because they've put all their eggs into the J2EE basket (which also has its place).
I strongly encourage you to re-evaluate Jini. It can be a truly powerful paradigm even for none Java enabled machines/devices (e.g. using a surrogate architecture).
Read the Jini FAQ, see the following excellent article on Jini and have a look at the Jini user mailing list sometime and you will be surprised by how powerful Jini can be.
-
Re:Perhaps you should read the article
Double locking is not broken. Your understanding of it is broken. Because of that, I'm not surprised that your multithreaded apps are crashing.
Read this. Read it carefully. Only then may you comment on DCL. -
Re:Changing to JBoss from other App Servers
To get some idea where things are going currently, you can check this article from JavaWorld:
The Art of EJB Deployment -
Slashdotted!
For those who feel like they're downloading the page over a 110-baud modem with an acoustic coupler located in the same room as a Disaster Area concert, here are some other similar comparisons.
-
A comparison of Linux IDEsI like quiche.
IDE's can help find and resolve some problems a hell of a lot quicker than CLI tools. It can also generate quality code or program templates.
Before trolling again in such a cute manner, why don't you check out this and this.
Quick summary of the 2nd link:
How do some of the integrated development environments (IDEs) for Linux rate, especially when compared with old favorites like Emacs? And does Linux need IDEs at all? Sam Mikes dons his flameproof suit as he investigates this controversial topic, comparing Metrowerks's CodeWarrior, Cygnus's GNUPro Toolkit, and John Lindal's Code Crusader with XEmacs and Microsoft Visual Studio. (6,000 words)
rgds,
Al. -
JBuilder and a text editor works for me ...
IMO, I think it's important to be comfortable with more than one "type" of IDE when writing Java code. The sophisticated Java IDE's are often very slow to startup, especially if they are written in Java itself (e.g. JBuilder, Forte take upwards of 20 seconds to startup on my machine sometimes - JDK1.3, 512 MB, 400 MHz) which can be a pain in the arse for impulse coding or quick changes to code when the IDE is not running.
Therefore I've found it helpful to have two IDE's I'm comfortable with:
1) A stripped down, quick and dirty text editor which allows you to get in and out of files quick (e.g. notepad, ultraedit under Windows, whatever)
2) A whizz bang do everything for you IDE which provides a huge amount of features (Wizards, code management, plugins) like JBuilder, IBM VisualAge for Java, Forte, Oracle JDeveloper etc etc
See the following links for full lists of Java IDEs out there:
http://www.javaworld.com/javaworld/tools/jw-tools- ide.html
http://www.webdeveloper.com/java/java_ides.html
Personally I've used about 10-15 editors tailored for Java and enjoy using Borland JBuilder5 (Enterprise) at the moment for the following reasons:
Wizards for just about any Java component you would want to create - Servlets/JSPs/EJBs/CORBA/Javabeans/XML. This avoids writing a lot of tedious code.
The ability to code all parts of a Java web app. with proper syntax highlighting, and code completion etc. in the one IDE (HTML, Servlets, JSPs, EJBs). The ability to preview the web. app. in the IDE without starting up the app. server. etc, can be helpful (JBuilder comes bundled with Tomcat (and Cocoon), supports Websphere, Weblogic, Borland Appserver and other plugins).
Code completion and insight - Java has lotsOfLongMethodNamesWhichAreSometimesABitTooDesc
r iptive and a pain to type
Rapid GUI prototyping (null, XYLayout) for Swing clients (if anyone still builds Swing clients, just joking
;-))
XML support, Cocoon, XML to DTD, DTD to XML, XSLT transformation previews. You'll may need something like XmlSpy for more sophisticated XML development however.
Full customisation of pretty much any part of the IDE, keymappings, toolbars etc - I like to use my own keymappings.
Having all parts of a Java component (e.g. methods, attributes) accessible by clicking on its name in a GUI IDE panel - this can be nice to locate sections of code when a Java class becomes large.
I could go on and on, the full feature matrix is here. Of course JBuilder Enterprise costs a *lot of money* and I probably would'nt buy it for home use.
One problem, I refuse to work on JBuilder with less than 512MB RAM. It's written entirely in Java and although they do a great job to make it as fast as it is (using custom class loaders I've read somewhere), stuff like code insight and code completion is painful with anything less than 512MB RAM.
-
Here is a whole slew IDE's
I found this site while searching Google for Java IDE's - here is the link. Hope it helps. It appears to have a listing of a whole bunch of different Java IDE's - some commercial, some not..so.
-
Who killed Java? Who will kill Qt?
Java held great promise, but MS has succeeded in killing desktop Java.
Even if you subscribe to the worst MS conspiracy theories, you can't give MS sole credit for killing desktop Java.Sun deserves a lot of credit. If you're going to introduce a Revolutionary New Approach to Programming, you shouldn't do it with inefficient, buggy VMs, or quickie compilers that don't properly exploit garbage collection. Thos mistakes gave Java a reputation for flakiness and inefficiency it still hasn't fully dispelled.
And if you want everybody to start using Java to develop desktop apps, you don't suddenly shut down your own application development efforts before they've had a chance to bring their product to market. But of course IBM, Oracle, and all the other biggies were doing that too. Coinciding with the downfall of the Network Computer.
And that's what really went wrong with desktop Java. Platform independence was never enough by itself to make Java widely adopted on the desktop. You had to give people a reason to abandon their investment in Windows-based solutions. That reason, was the Java-based NC, which was supposed to lower the Cost of Ownership for big corporate computer buyers. (And, not incidentally, give these same buyers a reason to buy proprietary Sun and IBM hardware instead of commodity PCs.) Unfortunately, nobody bought the NC idea, and the main market for Java desktop apps disappeared.
Some, but not all, of this history is repeating itself with Qt and KDE. Being technically superior to Windows wasn't enough for Java, and it won't be enough for the Linux desktop.
-
trade shows
i think you will be hard pressed to find a trade show that is meaningful for developers. MOST trade shows are meant to push product, not technology per se.
the best bet is to go to those trade shows for ideas and attend the seminars trying to see a) how the technology could be helpful to your work b) how you could leverage it at your environment.
especially in the java world, you can mostly use the same techniques across differing Java Application Servers (aka Tomcat, Resin) the only time it gets harder is on the differing EJB servers. and even then you can still leverage the similar technologies, the deployment bits are the things that change, not the code.
another HUGE place to get java ideas is online. i use ibm's Developerworks and that has different sections on xml, java, web services. (as well as linux and open source) other good java sites include ONJava and the java publications like Javaworld or the java portal Javaskyline -
Bean scripting framework anyone?
Theoretically, there are bindings for several languages that can be run in a JVM, using the Bean scripting framework. The list of languages that can be run in it include a subset of Perl, Rexx, Jython, Javascript...