Loading a progressive JPEG causes OutOfMemoryError
TreeViewer with input set throws AssertionFailedException
Eclipse unusable over X with slow network connection
TreeItem doesn't have setToolTipText
KeyReleased not working correctly.
Allow better Integration with existing java2d
Address platform-specific UI performance problems
And ad nauseum
Seriously, show me an UI-API + implementation that hasn't got bugs. All of them have. Lots of. Swing is relatively bug free. I've been working with >100kloc software for many years now and so far Swing is the best UI toolkit I've seen. It's not easy, it's not full featured, but it sure is flexible and most of the components have well thought customizable MVC structures. Everything is possible. It's so cross platform that the difference in code needed to support all three major platforms is few hundred lines out of 100k+.
> You are wrong. Java client-side development is far from dead - it is growing, and at the end of last year overtook MS WinForms as the most popular client-side development platform in North America.
Hey! You didn't count all the gazillions of mobile phones out there that all (well >95%) run java.
> Swing went through years of poor performance, but.... got better. Now it is hardware accelerated.
What you mean is that some of the drawing operations are accelerated. 1.5 is quite good and 1.6 will finally get rid of the famous 'gray rect' for good. Most of the components that are geared towards heavy use (e.g. JTree, JTable) are top performers already.
The event handling framework is quite complex (you can do practically anything with it) and the fact that each java class behaves almost like a dynamically linked library in more static languages will keep the start-up performance forever behind.
> Swing on Java 1.5 is neither memory hungry or slow.
The memory usage hasn't shrank since I was introduced to java. The extra hit that comes from the VM and GC is major pain in small applications but negligible in bigger ones. Class data sharing for java's built in classes (introduced in 1.5) helps too little in that respect and I don't expect major improvements in that area, at least not in the near future. Speed is getting better and better with every release and I expect java 1.6 (Mustang) to finally put an end to this everlasting java is slow whining.
> I don't know if it is because of the VM, or the late bidding, or whatever..
It's not the native code part that is the problem. The native code can even be faster than it's C++ counterpart because of the run time analysis. Sun's server JVM optimizes aggressively and (for example) get's rid of the method calls when a variable can be accessed directly.
I can show you numerous benchmarks where Sun's server JVM beats C/C++ in number crunching operations (FFT for example).
So why the apparent slowness?
1. Java's advanced garbage collection needs lot's of memory to operate efficiently. If you're running low on memory that causes swapping which slows the application down.
2. When you start up a Java program, you're actually starting a small 'operating system'. Java has built in security functions and lot's of libraries that need to be loaded with the application. Since there's no common continuously running java process these libraries are reloaded for each java application. (1.5 has some class data sharing that helps a little in this)
3. Swing. Swing is a GUI toolkit that's almost completely separated from the operating system. This makes (mostly effortless) porting possible, but has (again) some performance bottlenecks because sh*tload of libraries needs to be loaded and JITted when you start a swing program. Swing is also highly flexible and customizable beast so it's very easy to create inefficient applications with it if you don't know what you're doing.
4. Swing's AWT Event thread. All the GUI updating is done on an AWT Event thread. There's nothing wrong with that (almost every multithread capable GUI toolkit uses single GUI update thread to do drawing) but the fact that it's just another thread running within a JVM. Native windows applications do the drawing in special high priority GUI thread which is given priority over others. Swing doesn't have this luxury - so if the machine is swapping (because of the memory hogging java application) the AWT Event thread doesn't get enough processor time to update GUI! The famous 'grey rectangles' are fairly common symptoms of this 'feature'. This doesn't mean that the Swing application itself is slow, it only appears to be slow because it doesn't get the processor time to update GUI. Java 1.6 (Mustang) promises to correct this anomaly (possibly by hooking AWT Event thread to windows GUI thread??) which should finally put an end to the 'endless' swing is slow ranting..
Have I given you enough reasons to java's apparent slowness already? =)
Personally I enjoy writing Java, the language is simple, it has it's drawbacks but the base is sound and the future looks more promising than ever. Swing is absolutely the most powerful 'toolkit' out there (even if it has mostly crappy GUI builders) and java on the server side is really good solution to almost any problem out there.
> Yeah, how many people it took to generate this sort of output in US as opposed to Europe?
Don't think about people. Think about workin hours. You'll soon find out that people in europe have life outside work too. I live in Finland. My annual salary (without taxes) falls within the 40000..50000$ range. I have 30 days off + ~12 national holidays and 8 hour working day with 1/2 hour lunch + 2*15 minute coffee breaks.
Even though we finns are mostly workaholics it's nothing compared to you guys over there.
Got my point? The average american works much much longer hours with much lower salary to remain competitive than average european and even then he doesn't have 40+ days off.
Re:It's due to bandwidth and transmit time mostly.
on
Titan Photos and Sounds
·
· Score: 3, Informative
Huygens had lot's of scientific data to transmit. The pictures were not it's main objective. They might have only got 1 minute or so for the pictures.
Re:Flaws in both Languages
on
Java 1.5 vs C#
·
· Score: 1
> This is nonsense. Please read the license terms.
> Java is not open source in any way.
This is nonsense? The source code to all platform dependent implementations of the virtual machine and all the API sources are available.
Obviously they're not letting you to take the credit and distribute/sell it to customers that don't have a clue (MS already tried to do that, luckily they lost the case). You can however: modify the code to your hearts content as long as you keep it within your company.
Now please explain where are the sources to Windows Forms and CLR. How can I check those to see if there're any MS specific 'extensions' not available to other parties? It would be also nice to see how many lines of Sun's VM have been verbatim copied to CLR.
Re:Flaws in both Languages
on
Java 1.5 vs C#
·
· Score: 1
I am under the impression that they aren't. There exists a open-source implementation of Java, but the virtual machine and SDK provided by Sun do not have the source with them, and it is generally not available. Sun rejected the pleas of the open source community to open-source Java (link)
here.
You need to create an account to be able to download. There's HotSpot client and server VM sources for different platforms and processor architectures. I'm pretty sure MS has studied these carefully when cop*ing *cough* implementing their own.
NetBeans IDE is also open source.
Re:Flaws in both Languages
on
Java 1.5 vs C#
·
· Score: 2, Interesting
1. What exactly does it mean if a language is "open source?" Surely, the specification is available for free. If you wanted to, you could write a lexer/parser/compiler without paying anything to Microsoft/Sun. Do you mean that the tools provided by the companies aren't open-source?
Java is 'open source'. Everything: JDK classes and the virtual machine, all are there for everyone to see. Sun owns the Java trademark and is in control of what language features are in and what are out.
.NET is not open source. Correct me if I'm wrong but I think that the CLR source isn't available. C# is a standardized language. That means that 'theoretically' other parties can influence the direction of the language in the future.
.NET implementation does just-in-time compilation of the.NET assembly generated by the C# compiler (the bytecodes, basically), so it doesn't actually run inside of a virtual machine, nor is it interpreted. Since Sun's javac is supposed to generate portable bytecodes to run on different architectures, they decided to use a VM to avoid having to write a thousand different JIT compilers.
Sun's Java VM has had JIT compilation already in the last millennium. Java is not interpreted, it's native code just like your regular C. HotSpot compiler compiles those pieces that get the most action and interprets those that don't benefit from compiling.
CLR and Java VM are essentially the same thing. CLR is more flexible (it supports more languages, even though the list of currently supported languages is actually bigger for Java VM) and you can mix different languages for the same project. They both have advanced garbage collection schemes and both run 'inside' a virtual machine, although in C# you can 'step outside' (unmanaged mode) to do your own memory management (which is a big bonus for some projects).
Since this story is supposed to be about new language features in Java, I don't see how bitching about Microsoft/Sun's implementations is really relavent.
public static void main(String[] args) { Scanner sc = Scanner.create(System.in).useDelimiter("(\\W|\\d)+ "); final HashMap<String,Integer> map = new HashMap<String,Integer>(); while (sc.hasNext()) { String word = sc.next().toLowerCase(); map.put(word, (map.containsKey(word) ? 1 + map.get(word) : 1)); } ArrayList<String> list = new ArrayList<String>(map.keySet()); Collections.sort(list, new Comparator<String>() { public int compare(String s1, String s2) { int c = map.get(s2) - map.get(s1); return (c == 0) ? s2.compareTo(s1) : c; } }); for (String word : list) System.out.printf("%7d\t%s\n", map.get(word), word); }
How is it now? I ripped all the annoying comments to give it a more 'perlish' look? There're 12 lines of code. I seriously doubt that the task..
Takes text on standard input, outputs word frequency counts sorted first by count, then alphabetically.
..can be handled with 5 lines and with equal clarity. (Even if the Java's original clarity is seriously obscured by these 'new' bells'n'whistles like static imports and templates. I like the new for loop though..)
Comparing the portability of ServerSide java to the entire.NET platform doesn't make any sense whatsoever.
I wasn't comparing java to anything. I just stated the facts from my perspective.
Java isn't a silver fucking bullet.
Did I say it is? It certainly isn't. But I believe that at the moment it's the best platform independent implementation out there (aka right tool for the job if you need to write portable application). Dunno about the future.
P.S.
You still didn't provide an example of nonportability. Your previous message seemed to indicate that you had some kind of experience in that area?
We develop, deploy and run on three systems W2000, WXP and Debian linux.
The server doesn't contain a single line of different code. Client has few, but compared to the total codebase the percentage of different lines in client is
Even the build script is 100% same since it's an Ant build and Ant is a java tool in itself.
So cut the crap and report what those 'real world differencies' were?
Why is it that we can brainwash the masses into thinking that it's okay for us to spend billions on space crap while ignoring the homeless people living in the streets and at the YMCA?
Why is it that we can brainwash the masses into thinking that it's okay for us to spend hundreds of billions on military crap while ignoring the homeless people living in the streets and at the YMCA?
> But when it's 2 AM and dark and some stranger is in my house, possibly armed, and I don't know what they are going to do, I honestly would shoot first and ask questions later.
My wife woke me up at 2 AM last November when she thought she heard something from the downstairs. I went down the stairs bare naked since I believed it to be nothing more than either of our two cats being clumsy on furniture. Scanning the darkness for the cause of noise I suddenly saw a silhuette of a man against the dim lighting from the street lamps outside. Pulse must have jumped to 200, I grabbed the man from his shirt and shouted - what the f**k are you doing here!! - while pushing him towards the door. 5 seconds later he was outside and I locked the door (which I obviously forgot to lock earlier). Only then I noticed the smell of alcohol and the shoes on the hall floor. Ten minutes later me and my wife had come to a conclusion that some poor drunk had missed a building (with wide margin) and tried to find a place to sleep. (Novembers in here a cold, and that night it was almost -10 C) I called to a police quickly after that and told them that there's someone out without shoes and proper clothing and too drunk to find home, or whatever place it was where he was trying to go to.
That's the end of the story.
> But when it's 2 AM and dark and some stranger is in my house, possibly armed, and I don't know what they are going to do, I honestly would shoot first and ask questions later.
But if I was like you, the story would not have ended there. I'd have a dead person in my doorstep. One life ended, another ruined.
> I changed I guess. In your view, they have a useage and we are given a right to have them. But in my view now, just having a right to have them doesn't mean I HAVE to have them.
One of the best interpretations of the constitution for a long time! I live in a small (populationwise) country which has bigger guns/men ratio than your country. Yet the "killings with a gun"/men ratio is something like 100x lower than yours.
Why?
Because you can't buy a gun or ammo if you don't have a licence! To get a licence you apply for one from the local police station. If it's your first they probably want to talk about it with you for a while (just to make sure that you're "ok"). They also run a routine background check on you (having a criminal record doesn't help when applying for a licence) and you really should be a member of a hunting club or "sport shooter" club. That last one is not mandatory, but if you're not a member, the friendly police officer is going to be extra "careful" when interviewing you. Oh, and you're also not allowed to take that gun to anywhere else than shooting track or hunting.
So every reasonable person can get a gun for reasonable purposes - that's reasonable, eh?
Criminals and villains have to "go to the black market" to get one and to get ammo. Black market sellers have a high risk of getting caught. Armed robberies are 'safe' in a sense that only the other half has guns. You give the money, thief runs away, police later catches the thief, you get your money back.
I don't need a gun, 'cos I don't need one. It's simple.
Let's face it - the US legal system is a money making machine for the lawyers and big companies. You know it and I know it, the whole world knows it.
The patent system (which you are now successfully trying to shove down to the european throat) protects big companies.
See: in europe the competition is regulated by government which most of the US citizens see as a communist way.
In the US competition is regulated by the big companies with 10k+ patents in their briefcases.
Disclaimer: I'm not living in America.. and I'm not sorry.
Mozilla user for 1 1/2 years now. Switched to phoenix (now renamed as Mozilla Firebird?) at the end of last year. Currently using:
Mozilla Firebird 0.6 (20030702) - Just great!
Politics and moral rarely go hand in hand but I use it becouse the day when the IE is the only browser - the internet dies. (for me)
Re:The fast .NET startup times are due to ngen.exe
on
.Net:... 3 Years Later
·
· Score: 1
Ok. Still one of the biggest drawback of Java for desktop is not the speed but the 'singletasking' VM. Modern, well written swing apps are responsive and easily fast enough if you have P3+ level computer. But the start up time is a killer and each and every java program running on your desktop has it's 'own VM' running too.
An example scenario where version x of server software y was stress tested with low memory conditions:
Command options -Xms10m -Xmx10m (min and max memory boundaries both 10MB) which leaves exactly 10MB for your program to run with. But the actual memory consumption (fully saturated) rose to ~19MB. So in that particular case the VM and all the needed libraries where consuming ~9MB of memory. So if you're someday to run 10 java programs simultaneously the extra bloat is at least 90MB. I'm really looking forward to tyger which promises to fix this issue with multitasking VM where all running java programs share the same 'commond codebase'.
This was originally about the MS benchmark against the sadly implemented Pet Shop demo. I made no claims about java performance in general. Sun and Oracle are just like MS when it comes to benchmarking, everybody wants to do their best to win a competitor at all costs.
I've no confidence about java being to outperform.NET. I've studied tens of meaningless and meaningful bmarks out there + done some of my own and the conclusion is that their performance is identical.
I can present you with cases where java runs faster than optimized C (if C is built with gcc -o2 -o3 + some other tweaks - java loses against intel's more optimized compiler). I can also present you with cases where C outperforms java by a big margin. I'd like to think that the C# performance is somewhere near C performance.
C# has few more features than java some of which include: (autoboxing, built in delegate syntax (very cool), unmanaged mode (not cool), for each loops, metadata,..)
Java 1.5 (available near the end of 2003) includes autoboxing, generics (generics are coming to C# later too), for each loops, metadata)
Where java loses is that MS can embed the.NET runtime in the operating system thus the faster startup time for.NET apps compared to swing apps. Hopefully the Tyger's (java 1.5) multitasking JVM will make startup times faster (only the first app takes the hit). OS X has java 'embedded' and in multitasking mode. I have not used it or seen how it performs but I'd expect it to be more close to the native app startup speeds)
Make it happen you ask? I code for a living, right now a java based server for industrial desing tool (Plant design + information management). Few months more when the next version goes public, and I can direct you to the company web page. So far the performance is ok to me. Simulated workload of 3000 remote server queries per second caused a 2% processor usage on the server (2200+ athlon, linux)
Re:It actually outperforms J2EE by a lot
on
.Net:... 3 Years Later
·
· Score: 2, Interesting
It's not the JRE improvements it's the code.
The java version had transactions on every freaking operation
MS code had transactions on only the most critical places
The java version used JDBC (which in itself is very good) but the statements
were not using prepared queries! So the oracle db had to 'reinvent' the wheel
on every query
MS version used highly optimized stored procedures
Java version was built as a 'demonstration' or school book implementation
which used lots of meaningless (and performance killing) design patterns
MS version was built by MS to destroy the java version
So ask yourself this:
A few programmers write a petshop demo app that shows one possible way of building such app. How hard it is for any given company X to best that performance?
Hey don't believe me - the sources are there (theserverside) for all to see. Grab both versions and do some comparison. You'll learn that it was a total waste of time to put those two implementations to test.
Who's the pathetic here? What's wrong with a bit of overenthusiasm? Perphaps as a person who lost all passion to code the article will appear as annoying.
Don't know about you. I think it's great when people have great time.:-)
If I had to switch to other language from java I'd probably switch to python too!
Have you checked psyco? It's a JIT compiler for python which brings the performance close to the level of java.
But these are the things that are 'keeping' me with java:
huge developer base
almost all universities teach it
It works equally good (if not better) on linux and OS X
Options, options, options. No single vendor lock in.
BTW: I just run Scimark benchmark with 1.4.2b and the results are 2x compared to 1.4.1! The new experimental SSE optimisations in JIT are really showing off;-) (Score ~260 on a 1,6GHz laptop)
Well, here we go..
Some open/unresolved etc. SWT bugs, just SWT bugs.
https://bugs.eclipse.org/bugs/buglist.cgi?query_f
And ad nauseum
Seriously, show me an UI-API + implementation that hasn't got bugs. All of them have. Lots of. Swing is relatively bug free. I've been working with >100kloc software for many years now and so far Swing is the best UI toolkit I've seen. It's not easy, it's not full featured, but it sure is flexible and most of the components have well thought customizable MVC structures. Everything is possible. It's so cross platform that the difference in code needed to support all three major platforms is few hundred lines out of 100k+.
>> Yet almost nobody uses them any more. Why?
.... got better. Now it is hardware accelerated.
> You are wrong. Java client-side development is far from dead - it is growing, and at the end of last year overtook MS WinForms as the most popular client-side development platform in North America.
Hey! You didn't count all the gazillions of mobile phones out there that all (well >95%) run java.
> Swing went through years of poor performance, but
What you mean is that some of the drawing operations are accelerated. 1.5 is quite good and 1.6 will finally get rid of the famous 'gray rect' for good. Most of the components that are geared towards heavy use (e.g. JTree, JTable) are top performers already.
The event handling framework is quite complex (you can do practically anything with it) and the fact that each java class behaves almost like a dynamically linked library in more static languages will keep the start-up performance forever behind.
> Swing on Java 1.5 is neither memory hungry or slow.
The memory usage hasn't shrank since I was introduced to java. The extra hit that comes from the VM and GC is major pain in small applications but negligible in bigger ones. Class data sharing for java's built in classes (introduced in 1.5) helps too little in that respect and I don't expect major improvements in that area, at least not in the near future. Speed is getting better and better with every release and I expect java 1.6 (Mustang) to finally put an end to this everlasting java is slow whining.
> I don't know if it is because of the VM, or the late bidding, or whatever..
It's not the native code part that is the problem. The native code can even be faster than it's C++ counterpart because of the run time analysis. Sun's server JVM optimizes aggressively and (for example) get's rid of the method calls when a variable can be accessed directly.
I can show you numerous benchmarks where Sun's server JVM beats C/C++ in number crunching operations (FFT for example).
So why the apparent slowness?
1. Java's advanced garbage collection needs lot's of memory to operate efficiently. If you're running low on memory that causes swapping which slows the application down.
2. When you start up a Java program, you're actually starting a small 'operating system'. Java has built in security functions and lot's of libraries that need to be loaded with the application. Since there's no common continuously running java process these libraries are reloaded for each java application. (1.5 has some class data sharing that helps a little in this)
3. Swing. Swing is a GUI toolkit that's almost completely separated from the operating system. This makes (mostly effortless) porting possible, but has (again) some performance bottlenecks because sh*tload of libraries needs to be loaded and JITted when you start a swing program. Swing is also highly flexible and customizable beast so it's very easy to create inefficient applications with it if you don't know what you're doing.
4. Swing's AWT Event thread. All the GUI updating is done on an AWT Event thread. There's nothing wrong with that (almost every multithread capable GUI toolkit uses single GUI update thread to do drawing) but the fact that it's just another thread running within a JVM. Native windows applications do the drawing in special high priority GUI thread which is given priority over others. Swing doesn't have this luxury - so if the machine is swapping (because of the memory hogging java application) the AWT Event thread doesn't get enough processor time to update GUI! The famous 'grey rectangles' are fairly common symptoms of this 'feature'. This doesn't mean that the Swing application itself is slow, it only appears to be slow because it doesn't get the processor time to update GUI. Java 1.6 (Mustang) promises to correct this anomaly (possibly by hooking AWT Event thread to windows GUI thread??) which should finally put an end to the 'endless' swing is slow ranting..
Have I given you enough reasons to java's apparent slowness already? =)
Personally I enjoy writing Java, the language is simple, it has it's drawbacks but the base is sound and the future looks more promising than ever. Swing is absolutely the most powerful 'toolkit' out there (even if it has mostly crappy GUI builders) and java on the server side is really good solution to almost any problem out there.
End of rant. (excuse my english..)
> Yeah, how many people it took to generate this sort of output in US as opposed to Europe?
Don't think about people. Think about workin hours. You'll soon find out that people in europe have life outside work too. I live in Finland. My annual salary (without taxes) falls within the 40000..50000$ range. I have 30 days off + ~12 national holidays and 8 hour working day with 1/2 hour lunch + 2*15 minute coffee breaks.
Even though we finns are mostly workaholics it's nothing compared to you guys over there.
Got my point? The average american works much much longer hours with much lower salary to remain competitive than average european and even then he doesn't have 40+ days off.
Huygens had lot's of scientific data to transmit. The pictures were not it's main objective. They might have only got 1 minute or so for the pictures.
> This is nonsense. Please read the license terms. > Java is not open source in any way.
This is nonsense? The source code to all platform dependent implementations of the virtual machine and all the API sources are available.
Obviously they're not letting you to take the credit and distribute/sell it to customers that don't have a clue (MS already tried to do that, luckily they lost the case). You can however: modify the code to your hearts content as long as you keep it within your company.
Now please explain where are the sources to Windows Forms and CLR. How can I check those to see if there're any MS specific 'extensions' not available to other parties? It would be also nice to see how many lines of Sun's VM have been verbatim copied to CLR.
It's funny that the InnoDB tables have been available to MySQL users since the last millennium - but you people still don't have a clue.
InnoDB
fast and ACID compliant.
here. You need to create an account to be able to download. There's HotSpot client and server VM sources for different platforms and processor architectures. I'm pretty sure MS has studied these carefully when cop*ing *cough* implementing their own.
NetBeans IDE is also open source.
CLR and Java VM are essentially the same thing. CLR is more flexible (it supports more languages, even though the list of currently supported languages is actually bigger for Java VM) and you can mix different languages for the same project. They both have advanced garbage collection schemes and both run 'inside' a virtual machine, although in C# you can 'step outside' (unmanaged mode) to do your own memory management (which is a big bonus for some projects). Duh!
..and it doesn't actually look that bad. =)
public static void main(String[] args)+ ");
{
Scanner sc = Scanner.create(System.in).useDelimiter("(\\W|\\d)
final HashMap<String,Integer> map = new HashMap<String,Integer>();
while (sc.hasNext()) {
String word = sc.next().toLowerCase();
map.put(word, (map.containsKey(word) ? 1 + map.get(word) : 1));
}
ArrayList<String> list = new ArrayList<String>(map.keySet());
Collections.sort(list, new Comparator<String>() {
public int compare(String s1, String s2) {
int c = map.get(s2) - map.get(s1);
return (c == 0) ? s2.compareTo(s1) : c;
}
});
for (String word : list)
System.out.printf("%7d\t%s\n", map.get(word), word);
}
How is it now? I ripped all the annoying comments to give it a more 'perlish' look? There're 12 lines of code. I seriously doubt that the task..
Takes text on standard input, outputs word frequency counts sorted first by count, then alphabetically.
..can be handled with 5 lines and with equal clarity. (Even if the Java's original clarity is seriously obscured by these 'new' bells'n'whistles like static imports and templates. I like the new for loop though..)
P.S.
You still didn't provide an example of nonportability. Your previous message seemed to indicate that you had some kind of experience in that area?
We develop, deploy and run on three systems W2000, WXP and Debian linux.
The server doesn't contain a single line of different code. Client has few, but compared to the total codebase the percentage of different lines in client is
Even the build script is 100% same since it's an Ant build and Ant is a java tool in itself. So cut the crap and report what those 'real world differencies' were?
Why is it that we can brainwash the masses into thinking that it's okay for us to spend hundreds of billions on military crap while ignoring the homeless people living in the streets and at the YMCA?
IntelliJ IDEA smokes eclipse.
> But when it's 2 AM and dark and some stranger is in my house, possibly armed, and I don't know what they are going to do, I honestly would shoot first and ask questions later.
My wife woke me up at 2 AM last November when she thought she heard something from the downstairs. I went down the stairs bare naked since I believed it to be nothing more than either of our two cats being clumsy on furniture. Scanning the darkness for the cause of noise I suddenly saw a silhuette of a man against the dim lighting from the street lamps outside. Pulse must have jumped to 200, I grabbed the man from his shirt and shouted - what the f**k are you doing here!! - while pushing him towards the door. 5 seconds later he was outside and I locked the door (which I obviously forgot to lock earlier). Only then I noticed the smell of alcohol and the shoes on the hall floor. Ten minutes later me and my wife had come to a conclusion that some poor drunk had missed a building (with wide margin) and tried to find a place to sleep. (Novembers in here a cold, and that night it was almost -10 C)
I called to a police quickly after that and told them that there's someone out without shoes and proper clothing and too drunk to find home, or whatever place it was where he was trying to go to.
That's the end of the story.
> But when it's 2 AM and dark and some stranger is in my house, possibly armed, and I don't know what they are going to do, I honestly would shoot first and ask questions later.
But if I was like you, the story would not have ended there. I'd have a dead person in my doorstep. One life ended, another ruined.
---
> I changed I guess. In your view, they have a useage and we are given a right to have them. But in my view now, just having a right to have them doesn't mean I HAVE to have them.
One of the best interpretations of the constitution for a long time!
I live in a small (populationwise) country which has bigger guns/men ratio than your country. Yet the "killings with a gun"/men ratio is something like 100x lower than yours.
Why?
Because you can't buy a gun or ammo if you don't have a licence! To get a licence you apply for one from the local police station. If it's your first they probably want to talk about it with you for a while (just to make sure that you're "ok"). They also run a routine background check on you (having a criminal record doesn't help when applying for a licence) and you really should be a member of a hunting club or "sport shooter" club. That last one is not mandatory, but if you're not a member, the friendly police officer is going to be extra "careful" when interviewing you. Oh, and you're also not allowed to take that gun to anywhere else than shooting track or hunting.
So every reasonable person can get a gun for reasonable purposes - that's reasonable, eh?
Criminals and villains have to "go to the black market" to get one and to get ammo. Black market sellers have a high risk of getting caught. Armed robberies are 'safe' in a sense that only the other half has guns. You give the money, thief runs away, police later catches the thief, you get your money back.
I don't need a gun, 'cos I don't need one. It's simple.
---
Let's face it - the US legal system is a money making machine for the lawyers and big companies. You know it and I know it, the whole world knows it.
The patent system (which you are now successfully trying to shove down to the european throat) protects big companies.
See: in europe the competition is regulated by government which most of the US citizens see as a communist way.
In the US competition is regulated by the big companies with 10k+ patents in their briefcases.
Disclaimer: I'm not living in America.. and I'm not sorry.
Mozilla user for 1 1/2 years now. Switched to phoenix (now renamed as Mozilla Firebird?) at the end of last year. Currently using:
Mozilla Firebird 0.6 (20030702) - Just great!
Politics and moral rarely go hand in hand but I use it becouse the day when the IE is the only browser - the internet dies. (for me)
Ok. Still one of the biggest drawback of Java for desktop is not the speed but the 'singletasking' VM. Modern, well written swing apps are responsive and easily fast enough if you have P3+ level computer. But the start up time is a killer and each and every java program running on your desktop has it's 'own VM' running too.
An example scenario where version x of server software y was stress tested with low memory conditions: Command options -Xms10m -Xmx10m (min and max memory boundaries both 10MB) which leaves exactly 10MB for your program to run with. But the actual memory consumption (fully saturated) rose to ~19MB. So in that particular case the VM and all the needed libraries where consuming ~9MB of memory. So if you're someday to run 10 java programs simultaneously the extra bloat is at least 90MB. I'm really looking forward to tyger which promises to fix this issue with multitasking VM where all running java programs share the same 'commond codebase'.
Polished swing apps.
Perhaps you're a troll but I'll still reply:
.NET. I've studied tens of meaningless and meaningful bmarks out there + done some of my own and the conclusion is that their performance is identical. ..)
.NET runtime in the operating system thus the faster startup time for .NET apps compared to swing apps. Hopefully the Tyger's (java 1.5) multitasking JVM will make startup times faster (only the first app takes the hit). OS X has java 'embedded' and in multitasking mode. I have not used it or seen how it performs but I'd expect it to be more close to the native app startup speeds)
This was originally about the MS benchmark against the sadly implemented Pet Shop demo. I made no claims about java performance in general. Sun and Oracle are just like MS when it comes to benchmarking, everybody wants to do their best to win a competitor at all costs.
I've no confidence about java being to outperform
I can present you with cases where java runs faster than optimized C (if C is built with gcc -o2 -o3 + some other tweaks - java loses against intel's more optimized compiler). I can also present you with cases where C outperforms java by a big margin. I'd like to think that the C# performance is somewhere near C performance.
C# has few more features than java some of which include: (autoboxing, built in delegate syntax (very cool), unmanaged mode (not cool), for each loops, metadata,
Java 1.5 (available near the end of 2003) includes autoboxing, generics (generics are coming to C# later too), for each loops, metadata)
Where java loses is that MS can embed the
Make it happen you ask? I code for a living, right now a java based server for industrial desing tool (Plant design + information management). Few months more when the next version goes public, and I can direct you to the company web page. So far the performance is ok to me. Simulated workload of 3000 remote server queries per second caused a 2% processor usage on the server (2200+ athlon, linux)
- The java version had transactions on every freaking operation
- MS code had transactions on only the most critical places
- The java version used JDBC (which in itself is very good) but the statements
were not using prepared queries! So the oracle db had to 'reinvent' the wheel
on every query
- MS version used highly optimized stored procedures
- Java version was built as a 'demonstration' or school book implementation
which used lots of meaningless (and performance killing) design patterns
- MS version was built by MS to destroy the java version
So ask yourself this: A few programmers write a petshop demo app that shows one possible way of building such app. How hard it is for any given company X to best that performance? Hey don't believe me - the sources are there (theserverside) for all to see. Grab both versions and do some comparison. You'll learn that it was a total waste of time to put those two implementations to test.Who's the pathetic here? What's wrong with a bit of overenthusiasm? Perphaps as a person who lost all passion to code the article will appear as annoying. :-)
Don't know about you. I think it's great when people have great time.
- huge developer base
- almost all universities teach it
- It works equally good (if not better) on linux and OS X
- JDBC - works equally well on all databases
- JBoss Hey it's free, and it's good.
- IntelliJ IDEA not free, but worth every euro!
- Jakarta community is unrivalled.
- ANT simply the best build tool.
- Options, options, options. No single vendor lock in.
BTW: I just run Scimark benchmark with 1.4.2b and the results are 2x compared to 1.4.1! The new experimental SSE optimisations in JIT are really showing off