java

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
has replaced Lotus Notes as the thing I hate most in the world. it's official!

that is all, move along...
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,077,018
About bloody time, java is fucking awful at doing highly performant tasks unless you throw Crays and Supercomputers at the job in hand :)
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
I fixed it. and deebs is not only illiterate (performant is not a fucking word you architect ****) but wrong.
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,077,018
I fixed it. and deebs is not only illiterate (performant is not a fucking word you architect ****) but wrong.

Oh fuckoff :p You knew what I was saying....
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
it was architect-speak, screamed from your balcony in the ivory tower (tm) while you flail away at yourself like a rabid monkey.

and Chilly has indeed solved it :D

and he dissed my code :(
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
wow, I am happy to report: IT IS WORKING!!! :D:D:D
 

Cyradix

FH is my second home
Joined
Dec 22, 2003
Messages
2,128
I've used my sources at IBM to make sure the next Lotus Notes is java based.
Just for you!
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
well maybe, but I have to send it off first...
 

Chosen

Resident Freddy
Joined
Dec 29, 2003
Messages
2,615
Agreed, working with java is f***ing shit! And so many bad coders using it aswell.
 

ford prefect

Can't get enough of FH
Joined
Aug 27, 2006
Messages
1,386
I'm only very much an amatuer when it comes to java, but it does seem to be an incredibly idiotic language, it is like someone has looked as C++ and thought, hmm, lets get rid of most of the good stuff, make the complex stuff more complicated and lets see if we can make it run 20 times slower while using more ram to do similar tasks. If there is any possible way to avoid it, I try to. Luckily PHP or Ruby can do most things I need these days.
 

ECA

I am a FH squatter
Joined
Dec 23, 2003
Messages
9,452
Tbh I don't like Java. I much prefer Guatemalan or Brazilian.
No milk, no sugar.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
I'm only very much an amatuer when it comes to java, but it does seem to be an incredibly idiotic language, it is like someone has looked as C++ and thought, hmm, lets get rid of most of the good stuff, make the complex stuff more complicated and lets see if we can make it run 20 times slower while using more ram to do similar tasks. If there is any possible way to avoid it, I try to. Luckily PHP or Ruby can do most things I need these days.

fucking rofl. You're trying to tell me php and ruby are more memory efficient and faster than java (all things like coder skill being equal) ?

Java has it's flaws, but it's great for big complex systems. There's so much tooling out there to support it.
 

ford prefect

Can't get enough of FH
Joined
Aug 27, 2006
Messages
1,386
fucking rofl. You're trying to tell me php and ruby are more memory efficient and faster than java (all things like coder skill being equal) ?

Java has it's flaws, but it's great for big complex systems. There's so much tooling out there to support it.

Not at all, I'm simply saying for my needs I prefer to use the alternatives. Tis a personal view, I'm not a professional, just a long term hobbyist really. Java is certainly much better in terms of dev tools and sure it is faster than the other two, but it is very slow, resource hungry and over complicated considering its C Origins, albeit with a much simpler object model. I prefer Ruby in terms of debugging and maintenance, simply because there is less code and for quickly scaling up I find PHP much better.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
but I haven't even posted my code yet :(
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
java is certainly much better in terms of dev tools and sure it is faster than the other two, but it is very slow, resource hungry and over complicated considering its C Origins

C doesnt have an object model. Java is not slow, if it's slow you've written it badly. The optimising compiler and jvm are amazingly good and can do some mad shit when it comes to analysing programs while they're executing and recompiling them on the fly. C simply cannot do that and in certain cases java is significantly faster than C.

The JVM uses less memory every release, it's down to a few megs these days - if you cant afford that you're either doing embedded dev or are a stingy ****.

Saying "for quickly scaling up I find PHP much better" is classic bullshit. It's got nothing to do with the language. It's all to do with how familiar you are with it and the tooling around it - which you obviously are. That's fair enough, but lets not start pretending it's anything except personal choice.

PHP is a toy language. It leaks memory, is insecure, non type safe, riddled with internal inconsistency and slow as a bastard. It's great for noddy websites and random stuff (I use it myself, have done for years) but is basically useless for hardcore stuff.

Before anyone starts mentioning facebook - they hate php so much, they translate all their PHP to C++ before executing it and generally do everything they can to speed it up or avoid using it.
 

kirennia

Part of the furniture
Joined
Dec 26, 2003
Messages
3,857
Do agree with PHP, not a huge fan of it myself either. I am wondering though which type of applications are faster with java then in C if written by comparatively knowledgable people? I always thought C's main advantage was speed and javas was multi platform...ability?

I'm not so sure which language is quicker to develop with. To be honest, I don't really notice any difference once you get into a rhythm.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
Basically, once the JVM is running, it will run as fast as or faster than an equivalent C program these days. However: for that to happen the java has to be perfect in terms of memory allocation and object usage etc. But if you're just doing a load of sums, then it's basically the same.

Startup-wise a C program will always beat java cos there's no middle layer to init, it just executed directly on the CPU.

There are cases where C will do better than java, generally around very large scale memory churn - but it's not dramatic. Java can pull ahead massively in a very complicated program because hotspot can collect stats on he fly and use various optimisations that only work if you know the type of data and execution rates going on in your code.

As for ease of writing, you need less code in java, basically. Mainly because of the GC and not having to mop up all your objects, which adds a malloc and a free before and after a lot of things, whereas you just new in java and then make sure you clear all references to it so the GC can sort it out.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
I will be doing (more) Java, C/++, PHP, Ruby, some of the markup languages.

as semesters I have down (two out of three) things called:
- "Create a High Performance Network Application"
- "Create a Distributed Object Oriented Application"

as to third semester and minor I currently have no f*****g clue at all :(
 

kirennia

Part of the furniture
Joined
Dec 26, 2003
Messages
3,857
Basically, once the JVM is running, it will run as fast as or faster than an equivalent C program these days. However: for that to happen the java has to be perfect in terms of memory allocation and object usage etc. But if you're just doing a load of sums, then it's basically the same.

Startup-wise a C program will always beat java cos there's no middle layer to init, it just executed directly on the CPU.

There are cases where C will do better than java, generally around very large scale memory churn - but it's not dramatic. Java can pull ahead massively in a very complicated program because hotspot can collect stats on he fly and use various optimisations that only work if you know the type of data and execution rates going on in your code.

As for ease of writing, you need less code in java, basically. Mainly because of the GC and not having to mop up all your objects, which adds a malloc and a free before and after a lot of things, whereas you just new in java and then make sure you clear all references to it so the GC can sort it out.

'new' objects are the only ones you have to clear in C++ which can be done pretty quickly using effective class constructors and headers though; once you get into the habit it's pretty fast and more control should lead to a faster program anyway as the destructor equivalent in java is done auto-magically... so has to account for a larger scope of instances and is slower. This is the issue with all of javas speed woes I thought; because of less code being required, more automatic handles for call types slow it down... e.g. visual basics var is slower then directly creating an int in C++ or java.

I have to say though, I may perhaps be mixing C and C++, I'm still to this day unsure of the exact differences in them both. As far as I'm concerned, I write C++ apps but they have C incorporated into them anyway. I love it and have had no speed issues whereas java was a completely different ball game.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
C is a 30+ year old language with no notion of object orientation or polymorphism. C++ keeps much of the syntax and introduces:

-OO
-polymorphism
-templates
-lots of other goodness.

Generally, you shoulnt be using C unless you have a very good reason, since C++ is better. For certain embedded tasks you may have to use C rather than C++ (or CPP as it is sometimes referred to).

Most operating systems are written in C for two reasons:

C was seen as the defacto best language around when they were first written.
C is fast and lets you get at the innards of the machine.

If you were writing an OS from scratch today, you'd probably use C++.
 

Ovron

One of Freddy's beloved
Joined
Nov 4, 2004
Messages
471
Basically, once the JVM is running, it will run as fast as or faster than an equivalent C program these days

---

Generally, you shoulnt be using C unless you have a very good reason, since C++ is better.

---

If you were writing an OS from scratch today, you'd probably use C++.

Those are rather frivolous statements. :eek7:
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,077,018
Chilly,

Real world use here leads me to disagree with your view that once the JVM is running JAVA is fast. It is not.

Java is used internally here for a variety of things (commercial products) and we always find that they require shedloads more RAM and CPU to do the same workload as non-java equivalent in the same application space.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
Chilly,

Real world use here leads me to disagree with your view that once the JVM is running JAVA is fast. It is not.

Java is used internally here for a variety of things (commercial products) and we always find that they require shedloads more RAM and CPU to do the same workload as non-java equivalent in the same application space.

Deebs: hire better coders. I'm sorry, but the JVM today is a thing of beauty. If it's guzzling memory and CPU then your developers are shit.

/edit - to clarify:
There are plenty of shit frameworks for doing "enterprisey things". And if your architecture team (COUGH) lets you use them, then that's your own stupid fucking fault. There are plenty of equivalently crap frameworks in C++ (or indeed any language).

Real world experience HERE tells me it's shit hot if we want it to be. We serve all our price requests and bet statement requests (up to 70k/sec) purely from java applications that exist in a few gigs of memory across a handful of servers.
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,396
Real world experience HERE tells me it's shit hot if we want it to be. We serve all our price requests and bet statement requests (up to 70k/sec) purely from java applications that exist in a few gigs of memory across a handful of servers.

Oooo 70k/sec?

Try this one for size.

Data feed streaming updates at a constant 120 Mbps rising to in excess of 320 Mbps at US markets open. Overall we have seen data rates in over 7.1 million messages per second through our ticker plant.

Our processing for all of this real time data? Java. :)
 

Users who are viewing this thread

Top Bottom