0
pope

Any Java/C++ code gurus here?

Recommended Posts

I'm not actually sure that it is either of these, but I'm getting killed trying to figure something out. If anyone could answer a few basic questions for me via email, PM or telephone, I'd sure appreciate it!
Contact information can be found at: http://www.triaxproductions.com/contact or via my profile.
Thanks,
pope

Share this post


Link to post
Share on other sites
Well what sort of thing are you after? C++ is used to make programs for windows, Java on the other hand can be used across multiple operating systems, like windows or mac or linux, and you usualy find them on the internet, because of its power and cross platform compartabality.
He who makes a beast of himself gets rid of the pain of being a man.

Share this post


Link to post
Share on other sites
Quote

Well what sort of thing are you after? C++ is used to make programs for windows, Java on the other hand can be used across multiple operating systems, like windows or mac or linux, and you usualy find them on the internet, because of its power and cross platform compartabality.



Actually, c++ is not only used for windows and it is most definitly not platform specific. You just need to avoid using the windows API's when coding.

Java might have started out as only being used on the internet but its grown far beyond that. You'd be hard pressed to try and code something in c++ that cant also be done in Java (im talking about the whole functionality of the program, not slight differences like Java not using pointers in the same way as c++ etc).

Anyway, to the op, hope you find what you are looking for.

Share this post


Link to post
Share on other sites
Quote


Actually, c++ is not only used for windows and it is most definitly not platform specific. You just need to avoid using the windows API's when coding.



Actually the difference stands in the way Java and C/C++ code gets translated into machine code to be executed by the CPU.
Java has only one compiler that works on any platform and only translates Java code into Java Virtual Machine code (also called bytecode) and then the platform-specific part is in the form of an interpreter. Thus, the same java code will have exactly the same results on any platform because the low-level part (the bytecode) will be the same.
C/C++ on the other hand needs different compilers for Windows and Unix, and each compiler has its peculiarities, so the same C/C++ code might have plenty of bugs on one machine and work perfectly fine on the other.

Quote


You'd be hard pressed to try and code something in c++ that cant also be done in Java


What C/C++ offers is access to some more low-level operations, so it lets you tweak more subtle things like you could do with an assembly language. Java keeps itself as a much more higher-level language.

Share this post


Link to post
Share on other sites
Quote

Java has only one compiler that works on any platform



Both the compiler and the interpreter are machine-dependent. It's the bytecode (the compiled application) that is machine independent (as long as there is an interpreter for that machine). That's true for the Sun Java compiler (which most people still use for Java development).

There are other Java compilers that are machine-independent, such as JavaCC. But interestingly, they require the Java interpreter to work, so which came first, the chicken or the egg? ;)
Trapped on the surface of a sphere. XKCD

Share this post


Link to post
Share on other sites
Quote

Well what sort of thing are you after? C++ is used to make programs for windows, Java on the other hand can be used across multiple operating systems, like windows or mac or linux, and you usualy find them on the internet, because of its power and cross platform compartabality.



this is funny and highly inaccurate. it's like you read every other word in the first chapter of "programming java for dummies".

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites
Quote

Quote


Actually, c++ is not only used for windows and it is most definitly not platform specific. You just need to avoid using the windows API's when coding.



Actually the difference stands in the way Java and C/C++ code gets translated into machine code to be executed by the CPU.
Java has only one compiler that works on any platform and only translates Java code into Java Virtual Machine code (also called bytecode) and then the platform-specific part is in the form of an interpreter. Thus, the same java code will have exactly the same results on any platform because the low-level part (the bytecode) will be the same.
C/C++ on the other hand needs different compilers for Windows and Unix, and each compiler has its peculiarities, so the same C/C++ code might have plenty of bugs on one machine and work perfectly fine on the other.

Quote


You'd be hard pressed to try and code something in c++ that cant also be done in Java


What C/C++ offers is access to some more low-level operations, so it lets you tweak more subtle things like you could do with an assembly language. Java keeps itself as a much more higher-level language.



Haha, I love being a techie/programmer :P We're always fighting to make sure we are 100% correct and make sure each word has its purpose, or we'll soon find another programmer proving us wrong.

But yes, you're absolutely correct.

Share this post


Link to post
Share on other sites
Quote


What C/C++ offers is access to some more low-level operations, so it lets you tweak more subtle things like you could do with an assembly language. Java keeps itself as a much more higher-level language.



So to protect the user, fair enough it's not just internet applications anymore (limewire I think is java?) but anyway, point is you can do more stuff with C++, whereas java is used for lighter stuff if that makes sence.
He who makes a beast of himself gets rid of the pain of being a man.

Share this post


Link to post
Share on other sites
Quote

not just internet applications anymore (limewire I think is java?)



Java never started out for Internet application. It was always, and still is, a high-level language, like C++, Ada, Fortran, etc. It just happened to be OO and easily adaptable to good Internet applications because of the inherent security and portability. When I started writing Java apps in early '95, the compiler was an alpha version, and few people had much knowledge of the web. Netscape wasn't out yet, we were still using Mosaic, and the original full package of Java (formerly "oak") included a Solaris compiler and interpreter at just over 1 megabyte.

Java was a full-fledged language, just like C++, but it has easy-to-manage capabilities - I could write a full network connection in three lines, unlike C++, which required network stack manipulation. At the time, the web was one-way - you could only retrieve information, and not send it. It was simple - you wrote a Hello World application using VI (or EMACS if you were really good), compiled it, and ran it from a command line. It printed out "Hello World" on the command line. There were no web or Internet applications to run Java programs. At the time, I was writing Windows applications, but was disgruntled with Microsoft, which was releasing Windows 95, and basically cornered the C++ market because they introduced the Microsoft Foundation Classes for writing Windows 95 apps, which they refused to license to Borland, or an other compiler manufacturer. So Java came out and I jumped on that because it was much more open.

From there, once web servers and browsers started supporting CGI for two-way information, you could tie a CGI interface to a Java backend application. Java had really basic graphics capabilities at this point, but the Interpreter originally did not run on Mac - only Solaris and Windows. Right about at the same time that Sun finally released Interpreters that supported graphics on Mac and Irix (which took forever), they also released a secure web container called an applet. Once applets came out, people starting thinking that Java was a web language and nothing more. It didn't help that Netscape re-branded their browser-scripting language from LiveScript to Javascript (and no, Java and Javascript are NOT the same language).

Then things got really interesting with server-side Javascript, Netscape introduced a commerce server and starting making strides to enterprise applications, which would become Enterprise Java several years later.

All the above is from my memory over ten years old, and may be completely wrong. The point is that Java is a real, live application language, and not dependent on the Internet. I've managed to make a pretty good living from Java and the Internet for the last 11 years, so I don't mind saying "way back when".

Oh yeah, Limewire is a Java application.
Trapped on the surface of a sphere. XKCD

Share this post


Link to post
Share on other sites
Quote

I like Java more than C++, but like C# more than all of them :P:D



C# has the advantage of being the new kid on the block and learning from everyone else's mistakes.

of course, it DOES make you sound like an MS h0r3.....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites
Quote

Quote

I like Java more than C++, but like C# more than all of them :P:D



C# has the advantage of being the new kid on the block and learning from everyone else's mistakes.

of course, it DOES make you sound like an MS h0r3.....



To avoid that, use D.

http://www.digitalmars.com/d/

Never used it myself, but it it tries to improve upon C and C++.

Here is the comparison chart(between C, C++, Java, and C#):

http://www.digitalmars.com/d/comparison.html
Why yes, my license number is a palindrome. Thank you for noticing.

Share this post


Link to post
Share on other sites
I tried out C#, and didn't care for it. First and foremost, it's a M$ app, so that means all sorts of visual studio, graphical development environment, etc. There's a command-line compiler, but it was obviously an afterthought. When I run Java, I do it from command line almost exclusively - easy to download, setup, and run.

For second, C# is fine if you're sold on the Windows OS. I'm not. I have four laptops and two desktop servers in my office. Only one is a Windows box, and it's not even mine. The rest are Linux and OS-X systems. Novell has a .NET interpreter for Mac and Linux, but it's pretty obvious that M$ couldn't care less about running C# on anything except Win-blows (although they say they're all for cross-platform, but I invite anyone to try it - it sucks).

Lastly - I hope you can come visit us at the new wind tunnel! I have it on good authority that the rats are starting their final training tonight :)
Trapped on the surface of a sphere. XKCD

Share this post


Link to post
Share on other sites
Quote

C# is fine if you're sold on the Windows OS. I'm not. I have four laptops and two desktop servers in my office.



M$ forever has and likely ever will (in our lifetimes) dominated the desktop market. But servers are still open with many Linux/Unix flavors out there. I'm a little delinquent with my software development expertise (I never should have become a skydiver), but I have been working in C, C++ and Java for 21 years now and yes I recently got back into the industry with hopefully a new attitude. I see WebServices as the next wave in internet operability and WebServices won't be dominated by Mr Bill. M$ will continue to have it's market share (especially on the desktop) but as long as there is a need for server software, we need not worry about the evil M$ man. Java and what lies beyond will always be available. OpenSource is a beautiful thing.

So has Mr Pope's original question been answered? Did someone mention it actually being an HTML/Javascript problem and not a C++/Java problem?


Try not to worry about the things you have no control over

Share this post


Link to post
Share on other sites
Yeah, I had a look at it. It's web-related. If you know your DOM & Javascript, give him a shout...


As for webservices, two words: error handling. Last time I checked there was no way to deal with exceptions in a cross-platform manner. Which kinda buggers the whole thing up.

Share this post


Link to post
Share on other sites
On one hand, I use open source mostly. I can find tons of people who use what I use and can help me with my problems. For instance, when I found a bug in mySQL Control Center, it was fixed in the next release after I posted it. On the other hand there is this...arrogance...that sometimes comes along with Opensource, particularly with less savvy users.

take the Firefox forum for instance. Someone posts a question on there about a problem they are having...say a bug or something not acting correctly. The responses are:

"Maybe you should pitch in and try to fix it."

"I don't see the problem. It must be you. Try starting in safe mode and disabling everything. Then press Cntrl-T and spin around three times" (I may have added some extra stuff, but they give this laundry list of shit you are supposed to do before they will even help

"You suck. Firefox rules!"

and so on.

open source wants to tout how great it is, but often times it does nothing to make the newbie feel welcome. If the community wants to expand and actually make a dent in MS, they better start getting a little more user friendly.
Why yes, my license number is a palindrome. Thank you for noticing.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0