- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Which is why computers get faster and yet when you get a new machine, they run as slow or slower as your old machine. The new software eats up all of the new hardware's capability.
While I would agree that you have to consider development time vs performance, I see developers these days choosing development time far too often when performance is still needed. Saying that "Well the user has a gig of RAM/Fast CPU/quick hard drive/etc. so I can be lazy" is becoming acceptable and that is truly TRWTF.
That said, I would never agree with Dick in this particular situation :)
Admin
Here are more from this one [green=additions, red=deletions]:
"...anger to one of the lead developers in the other group..."
"...Dick had of predictably blamed Java..."
Admin
Homophones are homonyms. It's just a more specific kind of homonym. See the "variant definitions" section of that Wikipedia article. For instance, the first two definitions Merriam-Webster gives for "homonym" are "homophone" and "homograph" -- it's probably noteworthy that these appear before the definition Wikipedia gives.
Admin
Now, just a minute, sonny. Is that an aleph-null-iterations infinite loop or an aleph-one-iterations infinite loop?
Admin
C++ apps have a runtime too, but so what? The jdk is easily found and installed. The special server thing has been dropped, I see - good thing too, since java servers are just like other servers.
Java is absolutely fasater than C++ when you consider dev time.
Admin
If I can write a system that works quickly and use a ton of RAM doing it, that just may be the thing to do. Writing the prototype app quickly and iterating the design a bit before making the code tight is my preferred approach, although the apps are usually not that wasteful.
Admin
... anyways...
wow, the language zealots are out in full force! can't we all just pick on PHP and VB and be happy?
Admin
You think Java code is "ugly" and the "language semantics are a bitch", but would code in C#? Perhaps there's some other language called C# out there that I'm not aware of, but the one I use looks 95% the same as Java.
Admin
It's important to take the right tool for the job. There's no language that is the best for all jobs. It's not like that and it never will.
At this time, from my POV, it's pretty clear.
If portability is important for you, I'd go with Java, everytime. It's the main strenght of Java, there's no doubt into that. Java is easy enough to maintain too. It a bit hard to find good people however since there's a broad range of different libraries that do the same things making experience difficult to acquire.
C++ is the expert language. It's good for really dedicated application. You have so much freedom into everything that it's the easiest way to make your tool the best for its job. You can have no tradeoff at all. Put everything in performance or memory management for the maximum boost. It's difficult to maintain however and the deadlines are always too close for everybody. Ask the game developpers.
C# with the .NET framework is really appealing to a lot of people. You can go web-based with the same code with ASP.NET. The .NET framework is really solid too and well known. If you hire someone with C# experience, you know he will do the job since .NET is universal. It's also faster than java and is better supported.
I might be biaised however but it's my view on things.
Admin
Yep, the code is really similar. Some syntax is better in C# however. The whole foreach() for example. Do not forget that the framework is also better in C#. Did you ever try to work with dates in Java? You'll want to kill yourself the first week you try to get something working. I exaggerate but so do you!
Admin
The installer pictured on the screenshot was actually awfully slow on one computer I had to install JRE on. It kept on trucking for 15 minutes or so. So I thought it was generally slow, and then it ran in under a minute on an another PC.
Admin
They didn't get the contract, because Peter was lying out the kazoo and Dick was oblivious to what they were selling. If Peter was the good little programmer he makes himself out to be, why didn't he leave year after year?
Admin
I guess it depends on what the system is supposed to do. If you are writing something that is to run on a Windows machine and mostly likely have to share resources with other programs being open at the same time, I'd rather you work a little slower and use the RAM more efficiently so I can still have some left over for other programs that I may be running at the same time.
On the other hand, if you are writing a system that is going to run in Unix and needs to crunch a lot of data very quickly, I see no reason to try and be efficient with memory.
I was generalizing above (and in my previous post as well), and you probably were too, but my point still stands: I see lots of lazy developers these days and when my brand new, top of the line computer grinds to a halt because of it, that is irritating and I think it should be unacceptable.
I would definitely agree with you that iterating over the code/design is a good method to use.
Admin
The Java is Faster than C++ and C++ Sucks Unbiased Benchmark.
Have fun ;-)
Admin
This argument is making me homophobic
Admin
A man had a problem. He said, "I know I'll fix it using Java!" Then all his co-workers took him out back and beat him to death.
Admin
"Some syntax is better in C# however. The whole foreach() for example."
Ok.
C#:
foreach (Thing t in my_list) { // do some stuff }
Java:
for (Thing t : my_list) { // do some stuff }
I don't see much of a difference. I suppose if you enjoy typing "each" and "in", the C# example is "better", and if you enjoy typing colons, the Java example is better, but it's pretty much, um, the same.
I have never met a date library I liked.
Admin
TRWTF is letting the customer establish language platform as a functional requirement.
Admin
Well, not everyone is aware of Java's enhanced for loops since...uhmm...version 1.5 or so. Some people seem to conveniently forget about Java's JIT and Hotspot optimizations, too.
Admin
Hahahaha. That was worth reading through all the crap about managed code being so much slower than native code. Anyone see Quake ported over in C#?
Admin
Java after 1.5 has for(i:iterable), which is the same as foreach. Dates work fine - use Calendar and the DateFormatter classes.
Admin
// java.h // Purpose: make stupid java stuff work right in a real langauge
#ifndef JAVA_H #define JAVVA_H
#define : in
#endif
Admin
First!
(Comment was written in Java, running on a nulla machine, so it may be slow to post)
Admin
I've seen the Quake 2 port from C to C++.NET (CLR). It was quite a bit slower but in practice it was at least playable. The framerate suffered more than I would have liked for a video game though
Admin
// Java MyNumberClass number = new MyNumberClass(5); MyNumberClass number2 = new MyNumberClass(6); number = number.divideBy(number2.multiplyBy(number.add(number2))).subtract(number2);
// C++ MyNumberClass number(5); MyNumberClass number2(6); number = (number / (number2 * (number + number2))) - number2;
The pointer and reference operators in C/C++ don't make the code easier to read, but they give the programmer more control over the program and let him or her do exactly what they want. It isn't n00b friendly, but then n00bs shouldn't be entrusted with writing important software anyway. Java doesn't make the code maintainable automatically. It just limits what the programmer can do through its language semantics with the belief that it will lead to fewer errors. We've seen just as many WTFs on this site for Java, if not more, than we have for C or C++. :P The real truth is that not everybody can program well and creating "dummy-proof" languages to encourage them to try is TRWTF. :D
Performance is not Java's strength and probably never will be. Anybody arguing that is insane. It can perform OK for simple tasks, but workstations (particularly for developers like ourselves) are always being pushed to the limits (I probably have something like 60+ tabs open in Firefox right now). Java doesn't perform well enough for me to enjoy using it. On top of that, in my experience, .NET performs better (although honestly I've noticed that ASP.NET is also very slow, at least how "we're" using it, but that could just be because we're doing it wrong). I'm not trying to come across as a senseless Java basher. I recognize that Java has its niche and can be used effectively. I just haven't really found it useful yet, and I've tried many times (both in college and out). The syntax of Java is very similar to C and C++ because it's a C-like language. The semantics, however, are VERY different. If you don't understand semantics, implicitly passing arguments by reference is an example of a semantic with consequences.Another thing that bothers me about Java is its lack of constants...
The first language I learned was C++ and I've picked up C along the way. And I prefer them to anything else I've used. Although D sounds like a great compromise between C-like and high-level, it won't really be useful until it gets a powerful standard library and it really catches on, which could take a few more years.
How many programs do you know of that spend more time in development then being executed? Probably not that many. While lots of time can be spent developing software, it is usually run much longer and by many more people (thousands, hundreds of thousands, millions, etc.). End users want a user-friendly experience and part of that is responsiveness and the ability to play nice with the rest of the system.Admin
Fine, fine, I'll do it.
Ok, let's see.. s... h... i... t... end of a sentence, period, no initial capital...
It's fine, everyone! Now get back to work.
Admin
Right; although my point is that, typos and such notwithstanding, Alex is turning, post by post, into a truly accomplished writer here.
Admin
Admin
Omega baby, we're talking THE INFINITE.
shout out to rudy rucker
Admin
Omega baby, we're talking THE INFINITE.
shout out to rudy rucker
Admin
[quote user="snoofle" I was always under the impression that a company cafeteria/snack machine was there to keep you from going out and taking longer to get back to your desk; not to make a profit. [/quote] That's usually true, until the beancounters take over.
Admin
Admin
Or words to that effect. He's a better speaker than I am a paraphraser.
Admin
Ah, but can you do this:
foreach(var t in myList) { }
in java??
For example
for (MultipleComponentProfileHolder m : myList) { }
I tried to find a longer java class name but I couldn't.
Personally? C# over java any day of the week. There are just too many good things about developing in C# that java can never give you (ex. Web Applications). Yes multiplatform IS the upside to Java, but reality is unless its research or home user downloadable software, its really quite a useless requirement.
Commercial and Enterprise applications? Only if you can't afford Visual Studio + programmers :)
Agree 100% with previous post.
Admin
Try dating humans.
Admin
The naming scheme is stupid, but that's such an idiotic quibble it reflects badly on your argument.
I'm not sure that arguing about the immutability of strings in Java is helping you. If you want a C string, pass around a char[] array, it's the same damn thing (except, you know, it's bounds checked), or use java.lang.StringBuilder since its intended use is more closely aligned with std::string than java.lang.String is.
Yes, more verbose, goes to below which I concede.
That is one of the most oft leveled complaints at BigDecimal, BigInteger, and matrix libraries, I'll give you that. Operator overloading is nice.
I'm not sure where you would want to pass by value in Java...
Java has a final keyword. On fields it makes them readonly, on method parameters, it prevents the object from being modified. This goes to the above where, again, I'm not sure where you'd need to pass by value in Java.
Admin
My experience with C++, .net and Java has generally been that C++ is often overkill for smaller applications. But with Java and .net you reach a certain point where you are fighting with the language itself to get to where you need to go. This results in a project where you spend the last half of the project in the "90% done" phase. With C+ you begin the fight with your first line of code but generally it will be able to plod along to a final product at a predictable speed. I suspect that Dick not only didn't like Java but also didn't like anything new in C++ if I had to guess he also was still using MFC or something. Bring things like Boost and QT to the table and C++ can actually be fun to develop in.
All that said, I use PHP most of the time now. Right tool for the job is the real rule.
P.S. I use Eclipse for most coding and am regularly reminded that Java apps are almost always twitchy apps. Please find me a multi platform, multi language IDE developed in C++ please.
Admin
Admin
I saw a Quake 2 port to C# (i think it was the second one now that I think about it) with an added map interface in a seperate GUI. There was a framerate drop, but not by much.
Admin
A fast x86 java compiler.
In my experience, the shorter dev time of java results in more time being spent creating quality code and adding new features. Higher performance algorithms are implemented, and the end result runs faster than C++ apps, without memory leaks or other bugs.
"1x to 3x slower" isn't even worth mentioning. C++ is roughly that much slower than assembly, but you'd take C++ over ASM because of the dev time alone.
And don't give me that crap about the modern compiler optimizing more than assembly can. If you write the entire program in ASM, it will be significantly faster than a C++ program would be.
It's a scale; for dev time and ease of implementing features, C++ is somewhere in the middle.
Admin
2 pages of comments and nobody points out that the story directly amounts to "cockblock?"
Admin
If you can't figure our marketing driven naming, then you may not be cut out for programming.
Wrong metric, but you're a noob, so it's ok. It's cheaper to spend a bit more (50%, say) to make a java web app run well than it is to write it in C++, mainly because C++ sucks from a dev time perspective. Sure, if you're shipping to a million people, 1 second saved is a big deal, but we're talking about web apps and backend processing.
Admin
I like that in D (AFAIK: it's been a while since I've look into D), there is no string class at all. Between the char type and arrays as objects, everything a conventional string class can do can be accomplished with an array of characters. It's brilliant.
Admin
After Java 1.4.2, Java got so fast they could skip Java 2,3 and 4 and go straight to Java 5. I think that's remarkable.
Admin
C-strings. Blah. I think char arrays have been beaten to death, so I think that's why string classes showed up to begin with. Sounds like a step backwards. Not sure how in the world that's brilliant...
FYI, I think it was a great design decision to make strings immutable.
Admin
I don't think this is a good example; AFAIK, pretty much everyone in the C++ community now thinks making std::string mutable was a mistake, and that, if the C++ standard were being written today, there would be an immutable string class (it's much more efficient in the more common case where strings aren't mutated, especially in multithreaded applications).
You're right that Java's lack of operator overloading is annoying, as is the lack of user-defined value types. And Java's generics are a bit weak, too (though making them just syntactic sugar for casts to and from Object maintains backwards combatibility, which was probably the right trade-off to make).
(captcha: "persto," which I assume, in keeping with the theme of this comments thread, is a type for "pesto")
Admin
Since a couple of versions ago, java does have a foreach equivalent as well.
Not sure if i would agree that the framework is better just based on functionality around dates/calendar... what i find most interesting and scary at the same time is the sheer infinite number of frameworks that are out there, lot's of them are very powerful, but only few play well together...
Admin
Why is that a WTF? Many customers want to buy the initially developed and tested source code and maintain it themselves. Almost all of the projects I've worked on have a RFQ that specifies a preferred language.
Admin
emacs
Admin
And yet, Java is slow.