Hard Light Productions Forums

Off-Topic Discussion => Programming => Topic started by: DarkBasilisk on January 19, 2011, 01:30:03 am

Title: Java, do you speak it?
Post by: DarkBasilisk on January 19, 2011, 01:30:03 am
JAVA IS THE BEGINNING JAVA IS THE END.

That is all.
Title: Re: Re: iamzack requires a favor (and it
Post by: Nuke on January 19, 2011, 02:04:03 am
JAVA IS THE BEGINNING JAVA IS THE END.

That is all.

**** java

there i said it
Title: Re: Re: iamzack requires a favor (and it
Post by: peterv on January 19, 2011, 02:12:52 am
JAVA IS THE BEGINNING JAVA IS THE END.

That is all.

**** java

there i said it

My proposal for Nuke still stands   :pimp:
Title: Re: Re: iamzack requires a favor (and it
Post by: Flipside on January 19, 2011, 06:23:04 am
Nothing wrong with Java, perfectly good language to start from, it pretty much forces Object Orientation, which is a plus, and can serve as a launch pad for learning straight-compiled languages like C++. And let's face it, a lot of the rumours about Java are exactly that, rumours.
Title: Re: Re: iamzack requires a favor (and it
Post by: Grizzly on January 19, 2011, 06:57:28 am
Java is bassicly your step up to just about anything. I don't know about C++ (haven't done that one yet, might be that I never will) but PHP was a breeze after I tackled Java.
Title: Re: Re: iamzack requires a favor (and it
Post by: BloodEagle on January 19, 2011, 08:41:54 am
I worry that he will think his current trollish, antisocial behavior is acceptable long-term. Maybe I'm wrong, though. :|

 :wakka:



[attachment deleted by ninja]
Title: Re: Re: iamzack requires a favor (and it
Post by: Titan on January 19, 2011, 08:57:32 am
Minecraft is in Java.

I'm lucky, since my high school actually has a Game Design class, we're starting with Blender and Unity/or/Alice next week. Thank God, means I can get out of actionscript.
Title: Re: Re: iamzack requires a favor (and it
Post by: karajorma on January 19, 2011, 10:38:32 am
C++ is the way to go, and being a high-level programming language can do things Java cannot.

Falls about laughing at the idea that C++ is a higher level language than Java.


Try actually learning what the languages are before you start pointlessly having a go at Java. Both languages have advantages and disadvantages.
Title: Re: Re: iamzack requires a favor (and it
Post by: Flipside on January 19, 2011, 11:08:43 am
Agreed, I've heard C++ described as 'nothing more than machine-code with go-slower stripes', so it's all up to personal definition ;)

The impressions I have recieved are that Java has particular strengths in ease of use, multi-platform support and connectivity, whereas C++ excels in low-level manipulation, optimisation and deployability. Even the speed argument is heavily debated, there is a version of Quake written in Java3D that actually runs faster than the original C program.

Might move this to the programming section...
Title: Re: Re: iamzack requires a favor (and it
Post by: Polpolion on January 19, 2011, 11:12:42 am
You know, I honestly can't say that I think having zack's brother jump into an IRC channel full of people that think he has srs problems is a good idea. Keep in mind that the only person that knows the kid here is zack, and that if any of us think up a way to help, it should probably go through her and not random people on the intarbutt.

Agreed, I've heard C++ described as 'nothing more than machine-code with go-slower stripes', so it's all up to personal definition ;)

The impressions I have recieved are that Java has particular strengths in ease of use, multi-platform support and connectivity, whereas C++ excels in low-level manipulation, optimisation and deployability. Even the speed argument is heavily debated, there is a version of Quake written in Java3D that actually runs faster than the original C program.

I've actually been told that the overhead C++ oop adds makes C++ about twice as slow as straight up C. Personally I'd love java if you didn't need to run everything through the jvm.
Title: Re: Re: iamzack requires a favor (and it
Post by: Nuke on January 19, 2011, 03:22:56 pm
i was an honor student all the way through highschool. did well in college too. i didnt start the downward spiral till i started attempting to become part of the real world. i kinda think hanging out with a shady crowd might be a good thing. you would have no illusions to **** with your head. you would know that the world was **** from day one, and do your best to get on top of the pile, instead of getting buried by it. so id say hes likely on the right track to success.

java has its place, but it shoudnt even be the first language you learn. you should start as close to the cpu as you can get and work your way up, instead of starting with a high level language and staying there. the first language you should have to learn should be assembly. its sad that a lot of programmers are completely unaware of what happens past the compiler.

Agreed, I've heard C++ described as 'nothing more than machine-code with go-slower stripes', so it's all up to personal definition ;)

The impressions I have recieved are that Java has particular strengths in ease of use, multi-platform support and connectivity, whereas C++ excels in low-level manipulation, optimisation and deployability. Even the speed argument is heavily debated, there is a version of Quake written in Java3D that actually runs faster than the original C program.

Might move this to the programming section...

of course you missed the point. quake's minimum requirements were a 486 with math co-processor and 8 megs of ram. lets see a java vm run in that. and you still have to run the game. quake was never meant to be fast, it was meant to run on almost every pc available at its time, and in very little memory.

i find the further your code is from the processor, the less efficient it becomes (for example: lua is a very fast scripting language, but it does it my being a total memory whore). java compiles to byte codes that the jvm can understand, and it translates them to equivalent instructions that are compatable with the hardware platform. when you do something like that it completely excludes the possibility of low level optimizations (unless you have the source to the vm). it may be possible for java to outperform c/++ in some situations, but a c/++ programmer has the option of low level optimizations.

i also kinda think that in many cases object oriented programming is completely unnecessary, and can really slow a program down if used haphazardly.
Title: Re: Re: iamzack requires a favor (and it
Post by: Flipside on January 19, 2011, 03:29:52 pm
So because it wasn't very useful 10 years ago, it must therefore be crap now?

Interesting reasoning...

As of OOP, the whole point of OOP is not about speed, it's about modularity and flexibility.

Oh, and for the record, the first programming language I learned was Z80 machine code. In Hex.

Personally, I think Java is a far better place to start because 90% of applications are not speed-centric. Certainly, if you want to judge a language by it's speed then Machine code upwards is the way to go, but that's a pretty archaic viewpoint, almost everyone who works in programming isn't interested in speed, it's only the gaming market that really pushes in that direction, and even then not entirely, most programmers are more concerned about cross-compatability and ease of coding, they don't want to spend months on a project which should take weeks, and in that respect, Java is a very useful language. It has good database access, RMI support, and a good UI interface, the easier it is to put together and maintain an app, the better in almost every every business situation.
Title: Re: Re: iamzack requires a favor (and it
Post by: Mika on January 19, 2011, 04:33:09 pm
Not to meddle with the original topic, but I think you are both right and approaching programming from different backgrounds.

What I know from hardware development (optical measurement systems and other stuff you don't want to know about), programming is almost always done with C/C++. There is always the case you are doing something completely new and it is you who needs to write the drivers. Occasionally with a little bit of Assembly involved, but not that much from what I have heard.

From general programming point of view, cross platform languages tend to become more popular for reasons listed above.

Depends on what you are trying to accomplish with programming.
Title: Re: Re: iamzack requires a favor (and it
Post by: Flipside on January 19, 2011, 04:36:39 pm
Agreed, I'm not saying, nor would I ever say, that one is better or worse than the other, but declaring "**** java" because it doesn't suit your own programming purposes is just plain wrong, I suppose that's the point I'm trying to make :)

I'll split this out and move it to Programming because it's pretty much derailed Zacks original thread.

Edit: Did what I could, but some posts were a mixture of opinions on both topics.
Title: Re: Java, do you speak it?
Post by: Mika on January 19, 2011, 04:56:48 pm
Quote
Agreed, I'm not saying, nor would I ever say, that one is better or worse than the other, but declaring "**** java" because it doesn't suit your own programming purposes is just plain wrong,

This depends on if you read "**** java" as an opinion or as a statement of general truth.  :lol:

I haven't learned Java, but know some fundamentals of Assembly, C and MATLAB. OOP stuff really isn't for me.

Sigh, if I only had time and the occasional interest to learn DirectX... and the will power to tackle with Windows API.
Title: Re: Java, do you speak it?
Post by: CP5670 on January 19, 2011, 05:00:08 pm
I would say C/C++ is the best thing to learn if you're only going to learn one thing. Most of the other languages are based on it anyway, and it's trivial to pick up the others one you get the basic ideas. There is also the fact that it's what games use, so you can mess around with the source code of things like FS2 or D2X-XL (this is a game modding site after all :p).

Most of the programming I do is with numerical algorithms though. I use Mathematica for trying out my ideas (very inefficient, but it lets you test out things quickly that would take hours to do in lower level languages), Matlab for stuff I intend to distribute/publish (it's standard in academic circles) and usually pure C for things that are performance sensitive.
Title: Re: Java, do you speak it?
Post by: Flipside on January 19, 2011, 05:10:39 pm
I suppose the position I look at it from is that, if you are seeking a career in coding for organisations etc, Java doesn't hurt to know, it's far from useless as a language, and can be carried into several lines of work. Even at college we went from Pascal to VB to Java, fortunately, Pascal is a piece of piss, I was writing Turbo Pascal about 10 years ago, but no-one ever uses it any more. VB is more of a macro-language in my experience, it's great for things like writing complex Access or Excel forms, but its uses outside of that are somewhat limited.

C++ is a good language to learn if you want to get into the art of programming, you have to think a lot more deeply about what the computer is actually doing in order to get the best from the language, and have a deeper understanding of how and why a computer works the way it does, but the actual call for that level of coding ability in the general application market outside of gaming is limited, whereas Java is a more transportable language. I quite like working in C++, but the user-friendliness of Java means that if I want to put stuff together that is pretty complex, but within a limited time-frame for design and testing, I'll usually take the Java route.
Title: Re: Java, do you speak it?
Post by: CP5670 on January 19, 2011, 05:34:28 pm
It depends on what sort of career you're looking at. C is widely used in engineering for embedded devices/controllers, with Matlab typically used for higher level design work. C++ is also very standard in the financial industry.

I certainly wouldn't say that other languages are useless, far from it. But the nice thing about C++ is it encompasses a bit of everything. If you then need to learn Java for work, it's easy to adapt to it. If you need to learn some form of assembly instead, that's also not too hard. For my part, if I'm using a general purpose language at all, it's either because I need speed in my algorithms or a game does something I don't like and I'm trying to change that in its source code. :p
Title: Re: Java, do you speak it?
Post by: Flipside on January 19, 2011, 05:51:29 pm
Actually, in my experience, Java is becoming more and more common in Finance for client-level programs :)

Though I will add an admission on my own part that it is impossible for me to view Java from the point of view of a first-time coder, since I wasn't when I learned it. It could also be a side effect of the fact that, apparently, lot of companies complain that programmers are not taught to document their work properly, and it's a lot easier for a new recruit to decode a poorly documented Java program than a C++ one :)
Title: Re: Java, do you speak it?
Post by: Topgun on January 19, 2011, 05:56:03 pm
Don't learn java first. other than that its okay but I prefer python for high-level stuff and c++ for low-level stuff.
Title: Re: Java, do you speak it?
Post by: Sushi on January 19, 2011, 05:57:04 pm
"You must understand, young Hobbit, it takes a long time to say anything in Old Entish Java. And we never say anything unless it is worth taking a long time to say. "
Title: Re: Java, do you speak it?
Post by: Flipside on January 19, 2011, 06:01:56 pm
Can't say I've encountered that specific problem. Will admit, if I were to say Java has one specific weakness, it's the fact it can almost encourage over-design, you start trying to split things up into Interfaces and Superclasses etc, and if you're not careful, you can get carried away with the whole thing ;)
Title: Re: Java, do you speak it?
Post by: CP5670 on January 19, 2011, 06:04:22 pm
Quote
Actually, in my experience, Java is becoming more and more common in Finance for client-level programs :)

You may be right about that. I was thinking more along the lines of the quant trading software they use internally, which is almost always in C++, although some outfits use specialized low level languages.
Title: Re: Java, do you speak it?
Post by: sayoqod on January 19, 2011, 06:06:06 pm
Java is the first programming class I'm taking for my Comp Sci major...so far, pretty much the same as C++
Title: Re: Java, do you speak it?
Post by: Flipside on January 19, 2011, 06:12:59 pm
It has a great deal of common ancestry as far as structure/syntax is concerned. The real programming differences are the fact it is far more designed around Object Orientation, it likes to be split up into Classes, it only allows one Superclass for each Class (Which can be a pain) and it doesn't allow the kind of memory access facilities that C++ does. It demands a lot less 'cleanliness' from the programmer because of the internal Garbage collection, but you pay for that in other ways.
Title: Re: Java, do you speak it?
Post by: Ghostavo on January 19, 2011, 06:32:01 pm
Although I use Java a lot, which featured in most of my course work and whatnot (my dissertation is going to be implemented in Java even), some decisions by the language designers and the standards libraries leave a lot to be desired.

The last annoying one I've encountered was the PriorityQueue (http://download.oracle.com/javase/1.5.0/docs/api/java/util/PriorityQueue.html) implementations.

It withholds a method as private that would allow you to reorder the queue correctly if you changed one of its elements. As it is, you have to remove the element and add it again, which means instead of a O(log n) operation you have a O(n) one.
Title: Re: Java, do you speak it?
Post by: sayoqod on January 19, 2011, 06:34:06 pm
It has a great deal of common ancestry as far as structure/syntax is concerned. The real programming differences are the fact it is far more designed around Object Orientation, it likes to be split up into Classes, it only allows one Superclass for each Class (Which can be a pain) and it doesn't allow the kind of memory access facilities that C++ does. It demands a lot less 'cleanliness' from the programmer because of the internal Garbage collection, but you pay for that in other ways.

'cleanliness' was never really a problem for me. Ah well, I suppose I'll see how it goes
Title: Re: Java, do you speak it?
Post by: Flipside on January 19, 2011, 06:37:08 pm
Although I use Java a lot, which featured in most of my course work and whatnot (my dissertation is going to be implemented in Java even), some decisions by the language designers and the standards libraries leave a lot to be desired.

The last annoying one I've encountered was the PriorityQueue (http://download.oracle.com/javase/1.5.0/docs/api/java/util/PriorityQueue.html) implementations.

It withholds a method as private that would allow you to reorder the queue correctly if you changed one of its elements. As it is, you have to remove the element and add it again, which means instead of a O(log n) operation you have a O(n) one.

Yeah, there are a few like that, one that annoys me is that certain elements of the Observable class are Protected, which means that you cannot observe things outside the package it is operating in.
Title: Re: Java, do you speak it?
Post by: Nuke on January 19, 2011, 06:50:53 pm
Agreed, I'm not saying, nor would I ever say, that one is better or worse than the other, but declaring "**** java" because it doesn't suit your own programming purposes is just plain wrong, I suppose that's the point I'm trying to make :)

I'll split this out and move it to Programming because it's pretty much derailed Zacks original thread.

Edit: Did what I could, but some posts were a mixture of opinions on both topics.

i must point out that i made that comment in a different context (before the thread mutated into what it is now). had the thread been in a programming context at the time, id have probably used more tact.

So because it wasn't very useful 10 years ago, it must therefore be crap now?

Interesting reasoning...

As of OOP, the whole point of OOP is not about speed, it's about modularity and flexibility.

Oh, and for the record, the first programming language I learned was Z80 machine code. In Hex.

Personally, I think Java is a far better place to start because 90% of applications are not speed-centric. Certainly, if you want to judge a language by it's speed then Machine code upwards is the way to go, but that's a pretty archaic viewpoint, almost everyone who works in programming isn't interested in speed, it's only the gaming market that really pushes in that direction, and even then not entirely, most programmers are more concerned about cross-compatability and ease of coding, they don't want to spend months on a project which should take weeks, and in that respect, Java is a very useful language. It has good database access, RMI support, and a good UI interface, the easier it is to put together and maintain an app, the better in almost every every business situation.

my point was that quake was an invalid example. unlike modern idtech engines, it was designed to run on hardware that was already quite old at the time, and not all that fast. quake was released well into the pentium era but was still capable of running on much older hardware. you made the claim that the java3d based quake engine was faster. of course it would be faster because its running in a vm that required much much more resources than the original game used. the way i see it its an entirely different game engine from the original quake engine (sorta like glquake or winquake). it is not a fair comparison. its like comparing retail fs1 in software mode to fs2open 3.6.12, running the fsport. the newer executable may be somewhat faster, but thats because its been optimized for modern hardware.

as i said somewhere (not that i can find it after the split) that java has its place (same can be said for oop). but its certainly not in performance oriented applications. speed (as well as efficient memory usage) might not required of most software, but it does come in handy. since almost all computer systems emphasize multitasking, and which all dip into the same pool of resources, the more tasks you can run concurrently without impeding the system, the more responsive the system is. efficient code is better code.
Title: Re: Java, do you speak it?
Post by: Thaeris on January 19, 2011, 09:10:02 pm
Thanks Nuke. That was kind of my tangent to begin with.

And yes, I did mess up a bit with the high/low level terminology to an extent, but then, you really can do just about everything with C++. (and thus high- and low-level coding)

As far as teaching proper, understandable logic goes, I really liked C++ as well. My only other formal code training was in MATLAB, which I hate with a pashion - until you get into things such as tools which can solve derivatives and integrals from just punching in the base equation. Then I'll give MATLAB a bit more time. :)

I would still stand by learning C++ first, and then I'd be willing to invest time in Python if I ever got a chance as well. Apparently Python is quite abundant in the financial world as well.
Title: Re: Java, do you speak it?
Post by: Flipside on January 20, 2011, 06:33:08 am
Quote
as i said somewhere (not that i can find it after the split) that java has its place (same can be said for oop). but its certainly not in performance oriented applications. speed (as well as efficient memory usage) might not required of most software, but it does come in handy. since almost all computer systems emphasize multitasking, and which all dip into the same pool of resources, the more tasks you can run concurrently without impeding the system, the more responsive the system is. efficient code is better code.

Well, you know, I've looked through the Mod board etc, nothing's been deleted, and I've looked through the original thread and I didn't leave any of your posts relating to this behind, and don't remember you saying what you claim to have said, so something wierd is going on here. Either the board is eating posts without record, or you posted that to a different thread.

Title: Re: Java, do you speak it?
Post by: iamzack on January 25, 2011, 01:13:37 pm
...i didn't notice this thread got moved
Title: Re: Java, do you speak it?
Post by: sayoqod on January 25, 2011, 01:15:16 pm
...i didn't notice this thread got moved

Not very observant, are you? :P
Title: Re: Java, do you speak it?
Post by: Jeff Vader on January 25, 2011, 04:42:41 pm
http://evvk.com/javakurssi/ . For those who don't speak Finnish, it's a Java course:

Part 1: Dye your hair orange, purple or green.
Part 2: Get a piercing.
Part 3: Get a piercing.
Part 4: Get a tribal tattoo.
Part 5: Get overall-shaped Diesel jeans.
Part 6: Learn to say "Javabeanz enterprise".
Part 7: Get one more piercing.
Part 8: Read "Teach Yourself Java in Two Minutes" by petterijärvinen.
Part 9: Get one more piercing.

Congratulations. You are now a Java expert and can get a job at any Java business with a good salary.
Title: Re: Java, do you speak it?
Post by: Topgun on January 25, 2011, 04:47:11 pm
http://evvk.com/javakurssi/ . For those who don't speak Finnish, it's a Java course:

Part 1: Dye your hair orange, purple or green.
Part 2: Get a piercing.
Part 3: Get a piercing.
Part 4: Get a tribal tattoo.
Part 5: Get overall-shaped Diesel jeans.
Part 6: Learn to say "Javabeanz enterprise".
Part 7: Get one more piercing.
Part 8: Read "Teach Yourself Java in Two Minutes" by petterijärvinen.
Part 9: Get one more piercing.

Congratulations. You are now a Java expert and can get a job at any Java business with a good salary.

lol. I know a few java "experts" like that.